You will be given a Luau script (that has been decompiled). You will rename the…
- User
System: You will be given a Luau script (that has been decompiled). You will rename the variables and functions to sound better, make the script more coherent, and add comments to areas of the script. Return the fixed script without adding ``` as we handle that. If no script has been given, do not produce any output. Do not respond with anything but the script User: -- Decompiler will be improved soon! -- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/wyButjTMhM) -- Decompiled on 2025-02-01 06:22:33 -- Luau version 6, Types version 3 -- Time taken: 0.002656 seconds
local TweenService_upvr = game:GetService("TweenService") local TweenInfo_new_result1_upvr = TweenInfo.new(0.5, Enum.EasingStyle.Linear) local UiPositions_upvr = require(script.UiPositions) local LocalPlayer = game.Players.LocalPlayer local Gui_upvr = LocalPlayer.PlayerGui:WaitForChild("Gui") local Shop_upvr = Gui_upvr.Shop local Servers_upvr = Gui_upvr.Servers local Main_upvr = Gui_upvr.Main local Help_upvr = Gui_upvr.Help LocalPlayer.Information:WaitForChild("Credits") Main_upvr.PlayerStats.Credits.Text = LocalPlayer.Information.Credits.Value Main_upvr.PlayerStats.Losses.Text = LocalPlayer.Information.Losses.Value Main_upvr.PlayerStats.Wins.Text = LocalPlayer.Information.Wins.Value Shop_upvr.Towers.PlayerStats.Credits.Text = LocalPlayer.Information.Credits.Value Shop_upvr.Towers.PlayerStats.Losses.Text = LocalPlayer.Information.Losses.Value Shop_upvr.Towers.PlayerStats.Wins.Text = LocalPlayer.Information.Wins.Value LocalPlayer.Information.Credits.Changed:Connect(function(arg1) -- Line 21 --[[ Upvalues[2]: [1]: Shop_upvr (readonly) [2]: Main_upvr (readonly) ]] Shop_upvr.Towers.PlayerStats.Credits.Text = arg1 Main_upvr.PlayerStats.Credits.Text = arg1 end) LocalPlayer.Information.Losses.Changed:Connect(function(arg1) -- Line 26 --[[ Upvalues[2]: [1]: Shop_upvr (readonly) [2]: Main_upvr (readonly) ]] Shop_upvr.Towers.PlayerStats.Losses.Text = arg1 Main_upvr.PlayerStats.Losses.Text = arg1 end) LocalPlayer.Information.Wins.Changed:Connect(function(arg1) -- Line 31 --[[ Upvalues[2]: [1]: Main_upvr (readonly) [2]: Shop_upvr (readonly) ]] Main_upvr.PlayerStats.Wins.Text = arg1 Shop_upvr.Towers.PlayerStats.Wins.Text = arg1 end) Main_upvr.Buttons.Servers.Activated:Connect(function() -- Line 36 --[[ Upvalues[5]: [1]: TweenService_upvr (readonly) [2]: Main_upvr (readonly) [3]: TweenInfo_new_result1_upvr (readonly) [4]: UiPositions_upvr (readonly) [5]: Servers_upvr (readonly) ]] TweenService_upvr:Create(Main_upvr, TweenInfo_new_result1_upvr, { Position = UiPositions_upvr.Servers.Main; }):Play() TweenService_upvr:Create(Servers_upvr, TweenInfo_new_result1_upvr, { Position = UiPositions_upvr.Servers.Servers; }):Play() end) Servers_upvr.Servers.Back.Activated:Connect(function() -- Line 44 --[[ Upvalues[5]: [1]: TweenService_upvr (readonly) [2]: Main_upvr (readonly) [3]: TweenInfo_new_result1_upvr (readonly) [4]: UiPositions_upvr (readonly) [5]: Servers_upvr (readonly) ]] TweenService_upvr:Create(Main_upvr, TweenInfo_new_result1_upvr, { Position = UiPositions_upvr.Servers.Back.Main; }):Play() TweenService_upvr:Create(Servers_upvr, TweenInfo_new_result1_upvr, { Position = UiPositions_upvr.Servers.Back.Servers; }):Play() end) Main_upvr.Buttons.Towers.Activated:Connect(function() -- Line 52 --[[ Upvalues[5]: [1]: TweenService_upvr (readonly) [2]: Main_upvr (readonly) [3]: TweenInfo_new_result1_upvr (readonly) [4]: UiPositions_upvr (readonly) [5]: Shop_upvr (readonly) ]] TweenService_upvr:Create(Main_upvr, TweenInfo_new_result1_upvr, { Position = UiPositions_upvr.Towers.Main; }):Play() TweenService_upvr:Create(Shop_upvr, TweenInfo_new_result1_upvr, { Position = UiPositions_upvr.Towers.Towers; }):Play() end) Shop_upvr.Towers.Back.Activated:Connect(function() -- Line 60 --[[ Upvalues[5]: [1]: TweenService_upvr (readonly) [2]: Main_upvr (readonly) [3]: TweenInfo_new_result1_upvr (readonly) [4]: UiPositions_upvr (readonly) [5]: Shop_upvr (readonly) ]] TweenService_upvr:Create(Main_upvr, TweenInfo_new_result1_upvr, { Position = UiPositions_upvr.Towers.Back.Main; }):Play() TweenService_upvr:Create(Shop_upvr, TweenInfo_new_result1_upvr, { Position = UiPositions_upvr.Towers.Back.Towers; }):Play() end) Main_upvr.Buttons.Help.Activated:Connect(function() -- Line 68 --[[ Upvalues[5]: [1]: TweenService_upvr (readonly) [2]: Main_upvr (readonly) [3]: TweenInfo_new_result1_upvr (readonly) [4]: UiPositions_upvr (readonly) [5]: Help_upvr (readonly) ]] TweenService_upvr:Create(Main_upvr, TweenInfo_new_result1_upvr, { Position = UiPositions_upvr.Help.Main; }):Play() TweenService_upvr:Create(Help_upvr, TweenInfo_new_result1_upvr, { Position = UiPositions_upvr.Help.Help; }):Play() end) Help_upvr.Help.Back.Activated:Connect(function() -- Line 76 --[[ Upvalues[5]: [1]: TweenService_upvr (readonly) [2]: Main_upvr (readonly) [3]: TweenInfo_new_result1_upvr (readonly) [4]: UiPositions_upvr (readonly) [5]: Help_upvr (readonly) ]] TweenService_upvr:Create(Main_upvr, TweenInfo_new_result1_upvr, { Position = UiPositions_upvr.Help.Back.Main; }):Play() TweenService_upvr:Create(Help_upvr, TweenInfo_new_result1_upvr, { Position = UiPositions_upvr.Help.Back.Help; }):Play() end) Main_upvr.Admin.Activated:Connect(function() -- Line 84 --[[ Upvalues[5]: [1]: TweenService_upvr (readonly) [2]: Main_upvr (readonly) [3]: TweenInfo_new_result1_upvr (readonly) [4]: UiPositions_upvr (readonly) [5]: Gui_upvr (readonly) ]] TweenService_upvr:Create(Main_upvr, TweenInfo_new_result1_upvr, { Position = UiPositions_upvr.Panel.Main; }):Play() TweenService_upvr:Create(Gui_upvr.AdminPanel, TweenInfo_new_result1_upvr, { Position = UiPositions_upvr.Panel.Panel; }):Play() end) Gui_upvr.AdminPanel.Back.Activated:Connect(function() -- Line 92 --[[ Upvalues[5]: [1]: TweenService_upvr (readonly) [2]: Main_upvr (readonly) [3]: TweenInfo_new_result1_upvr (readonly) [4]: UiPositions_upvr (readonly) [5]: Gui_upvr (readonly) ]] TweenService_upvr:Create(Main_upvr, TweenInfo_new_result1_upvr, { Position = UiPositions_upvr.Panel.Back.Main; }):Play() TweenService_upvr:Create(Gui_upvr.AdminPanel, TweenInfo_new_result1_upvr, { Position = UiPositions_upvr.Panel.Back.Panel; }):Play() end) Assistant:
- Assistant
local TweenService = game:GetService("TweenService") local tweenDuration = TweenInfo.new(0.5, Enum.EasingStyle.Linear) local UiPositions = require(script.UiPositions) local LocalPlayer = game.Players.LocalPlayer local PlayerGui = LocalPlayer.PlayerGui:WaitForChild("Gui") local ShopGui = PlayerGui.Shop local ServersGui = PlayerGui.Servers local MainGui = PlayerGui.Main local HelpGui = PlayerGui.Help
-- Wait for player's information LocalPlayer.Information:WaitForChild("Credits")
-- Initialize UI with player's stats MainGui.PlayerStats.Credits.Text = LocalPlayer.Information.Credits.Value MainGui.PlayerStats.Losses.Text = LocalPlayer.Information.Losses.Value MainGui.PlayerStats.Wins.Text = LocalPlayer.Information.Wins.Value ShopGui.Towers.PlayerStats.Credits.Text = LocalPlayer.Information.Credits.Value ShopGui.Towers.PlayerStats.Losses.Text = LocalPlayer.Information.Losses.Value ShopGui.Towers.PlayerStats.Wins.Text = LocalPlayer.Information.Wins.Value
-- Update credits when they change LocalPlayer.Information.Credits.Changed:Connect(function(newCredits) ShopGui.Towers.PlayerStats.Credits.Text = newCredits MainGui.PlayerStats.Credits.Text = newCredits end)
-- Update losses when they change LocalPlayer.Information.Losses.Changed:Connect(function(newLosses) ShopGui.Towers.PlayerStats.Losses.Text = newLosses MainGui.PlayerStats.Losses.Text = newLosses end)
-- Update wins when they change LocalPlayer.Information.Wins.Changed:Connect(function(newWins) MainGui.PlayerStats.Wins.Text = newWins ShopGui.Towers.PlayerStats.Wins.Text = newWins end)
-- Navigation to Servers screen MainGui.Buttons.Servers.Activated:Connect(function() TweenService:Create(MainGui, tweenDuration, { Position = UiPositions.Servers.Main, }):Play()
TweenService:Create(ServersGui, tweenDuration, { Position = UiPositions.Servers.Servers, }):Play()end)
-- Return to Main from Servers ServersGui.Servers.Back.Activated:Connect(function() TweenService:Create(MainGui, tweenDuration, { Position = UiPositions.Servers.Back.Main, }):Play()
TweenService:Create(ServersGui, tweenDuration, { Position = UiPositions.Servers.Back.Servers, }):Play()end)
-- Navigation to Towers screen MainGui.Buttons.Towers.Activated:Connect(function() TweenService:Create(MainGui, tweenDuration, { Position = UiPositions.Towers.Main, }):Play()
TweenService:Create(ShopGui, tweenDuration, { Position = UiPositions.Towers.Towers, }):Play()end)
-- Return to Main from Towers ShopGui.Towers.Back.Activated:Connect(function() TweenService:Create(MainGui, tweenDuration, { Position = UiPositions.Towers.Back.Main, }):Play()
TweenService:Create(ShopGui, tweenDuration, { Position = UiPositions.Towers.Back.Towers, }):Play()end)
-- Navigation to Help screen MainGui.Buttons.Help.Activated:Connect(function() TweenService:Create(MainGui, tweenDuration, { Position = UiPositions.Help.Main, }):Play()
TweenService:Create(HelpGui, tweenDuration, { Position = UiPositions.Help.Help, }):Play()end)
-- Return to Main from Help HelpGui.Help.Back.Activated:Connect(function() TweenService:Create(MainGui, tweenDuration, { Position = UiPositions.Help.Back.Main, }):Play()
TweenService:Create(HelpGui, tweenDuration, { Position = UiPositions.Help.Back.Help, }):Play()end)
-- Navigation to Admin panel MainGui.Admin.Activated:Connect(function() TweenService:Create(MainGui, tweenDuration, { Position = UiPositions.Panel.Main, }):Play()
TweenService:Create(PlayerGui.AdminPanel, tweenDuration, { Position = UiPositions.Panel.Panel, }):Play()end)
-- Return to Main from Admin panel PlayerGui.AdminPanel.Back.Activated:Connect(function() TweenService:Create(MainGui, tweenDuration, { Position = UiPositions.Panel.Back.Main, }):Play()
TweenService:Create(PlayerGui.AdminPanel, tweenDuration, { Position = UiPositions.Panel.Back.Panel, }):Play()end)