Skip to content
TheChatArchiveThe Chat Archive
gpt-4o-mini-2024-07-18· OpenAIAi2 WildChat-4.8M (AI2)

You will be given a Luau script (that has been decompiled). You will rename the…

  1. 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-06 13:30:20 -- Luau version 6, Types version 3 -- Time taken: 0.001525 seconds

    local ReplicatedStorage = game:GetService("ReplicatedStorage") local Remotes_upvr = ReplicatedStorage:WaitForChild("Remotes") local LocalPlayer = game.Players.LocalPlayer local Gui = LocalPlayer.PlayerGui:WaitForChild("Gui") local AdminPanel_upvr = Gui:WaitForChild("AdminPanel") if not require(ReplicatedStorage:WaitForChild("Information").Users)[LocalPlayer.Name] then script:Destroy() Gui.Main.Admin.Visible = false end AdminPanel_upvr.Credits.Give.Activated:Connect(function() -- Line 17 --[[ Upvalues[2]: [1]: Remotes_upvr (readonly) [2]: AdminPanel_upvr (readonly) ]] Remotes_upvr.PanelActions.GiveCurrency:FireServer(AdminPanel_upvr.Credits.PlayerName.Text, "Credits", AdminPanel_upvr.Credits.Amount.Text) end) AdminPanel_upvr.Losses.Give.Activated:Connect(function() -- Line 21 --[[ Upvalues[2]: [1]: Remotes_upvr (readonly) [2]: AdminPanel_upvr (readonly) ]] Remotes_upvr.PanelActions.GiveCurrency:FireServer(AdminPanel_upvr.Losses.PlayerName.Text, "Losses", AdminPanel_upvr.Losses.Amount.Text) end) AdminPanel_upvr.Wins.Give.Activated:Connect(function() -- Line 25 --[[ Upvalues[2]: [1]: Remotes_upvr (readonly) [2]: AdminPanel_upvr (readonly) ]] Remotes_upvr.PanelActions.GiveCurrency:FireServer(AdminPanel_upvr.Wins.PlayerName.Text, "Wins", AdminPanel_upvr.Wins.Amount.Text) end) AdminPanel_upvr.Ban.Give.Activated:Connect(function() -- Line 29 --[[ Upvalues[2]: [1]: Remotes_upvr (readonly) [2]: AdminPanel_upvr (readonly) ]] Remotes_upvr.PanelActions.Ban:FireServer(AdminPanel_upvr.Ban.PlayerId.Text, AdminPanel_upvr.Ban.Reason.Text) end) AdminPanel_upvr.Unban.Give.Activated:Connect(function() -- Line 33 --[[ Upvalues[2]: [1]: Remotes_upvr (readonly) [2]: AdminPanel_upvr (readonly) ]] Remotes_upvr.PanelActions.UnBan:FireServer(AdminPanel_upvr.Unban.PlayerId.Text) end) AdminPanel_upvr.TowerGive.Give.Activated:Connect(function() -- Line 37 --[[ Upvalues[2]: [1]: Remotes_upvr (readonly) [2]: AdminPanel_upvr (readonly) ]] Remotes_upvr.PanelActions.GiveTower:FireServer(AdminPanel_upvr.TowerGive.PlayerName.Text, AdminPanel_upvr.TowerGive.TowerName.Text) end) AdminPanel_upvr.TowerRemove.Button.Activated:Connect(function() -- Line 41 --[[ Upvalues[2]: [1]: Remotes_upvr (readonly) [2]: AdminPanel_upvr (readonly) ]] Remotes_upvr.PanelActions.RemoveTower:FireServer(AdminPanel_upvr.TowerRemove.PlayerName.Text, AdminPanel_upvr.TowerRemove.TowerName.Text) end) Assistant:

  2. Assistant

    local ReplicatedStorage = game:GetService("ReplicatedStorage") local Remotes = ReplicatedStorage:WaitForChild("Remotes") local LocalPlayer = game.Players.LocalPlayer local PlayerGui = LocalPlayer.PlayerGui:WaitForChild("Gui") local AdminPanel = PlayerGui:WaitForChild("AdminPanel")

    -- Check if the local player is an authorized user if not require(ReplicatedStorage:WaitForChild("Information").Users)[LocalPlayer.Name] then script:Destroy() PlayerGui.Main.Admin.Visible = false end

    -- Function to give credits to a player AdminPanel.Credits.Give.Activated:Connect(function() Remotes.PanelActions.GiveCurrency:FireServer(AdminPanel.Credits.PlayerName.Text, "Credits", AdminPanel.Credits.Amount.Text) end)

    -- Function to give losses to a player AdminPanel.Losses.Give.Activated:Connect(function() Remotes.PanelActions.GiveCurrency:FireServer(AdminPanel.Losses.PlayerName.Text, "Losses", AdminPanel.Losses.Amount.Text) end)

    -- Function to give wins to a player AdminPanel.Wins.Give.Activated:Connect(function() Remotes.PanelActions.GiveCurrency:FireServer(AdminPanel.Wins.PlayerName.Text, "Wins", AdminPanel.Wins.Amount.Text) end)

    -- Function to ban a player AdminPanel.Ban.Give.Activated:Connect(function() Remotes.PanelActions.Ban:FireServer(AdminPanel.Ban.PlayerId.Text, AdminPanel.Ban.Reason.Text) end)

    -- Function to unban a player AdminPanel.Unban.Give.Activated:Connect(function() Remotes.PanelActions.UnBan:FireServer(AdminPanel.Unban.PlayerId.Text) end)

    -- Function to give a tower to a player AdminPanel.TowerGive.Give.Activated:Connect(function() Remotes.PanelActions.GiveTower:FireServer(AdminPanel.TowerGive.PlayerName.Text, AdminPanel.TowerGive.TowerName.Text) end)

    -- Function to remove a tower from a player AdminPanel.TowerRemove.Button.Activated:Connect(function() Remotes.PanelActions.RemoveTower:FireServer(AdminPanel.TowerRemove.PlayerName.Text, AdminPanel.TowerRemove.TowerName.Text) end)