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 14:12:52 -- Luau version 6, Types version 3 -- Time taken: 0.002262 seconds

    -- KONSTANTERROR: [0] 1. Error Block 99 start (CF ANALYSIS FAILED) local ReplicatedStorage = game:GetService("ReplicatedStorage") local Remotes_upvr = ReplicatedStorage:WaitForChild("Remotes") local Servers_2_upvr = game.Players.LocalPlayer.PlayerGui:WaitForChild("Gui"):WaitForChild("Servers") local Servers = Servers_2_upvr:WaitForChild("Servers") local Viewing_upvr = Servers:WaitForChild("Viewing") local Survival_Versus_upvr = Servers:WaitForChild("Survival/Versus") for _, v_upvr in pairs(Survival_Versus_upvr:GetDescendants()) do if v_upvr.Name == "Join" and v_upvr:IsA("TextButton") then v_upvr.Activated:Connect(function() -- Line 19 --[[ Upvalues[2]: [1]: Remotes_upvr (readonly) [2]: v_upvr (readonly) ]] Remotes_upvr.Join:FireServer(v_upvr.Parent.Name) end) end end for _, v_2_upvr in pairs(Servers_2_upvr.Servers.Events:GetDescendants()) do if v_2_upvr.Name == "Join" and v_2_upvr:IsA("TextButton") then local var21_upvw = false v_2_upvr.Activated:Connect(function() -- Line 27 --[[ Upvalues[3]: [1]: var21_upvw (read and write) [2]: Remotes_upvr (readonly) [3]: v_2_upvr (readonly) ]] if var21_upvw == false then else return end Remotes_upvr.Join:FireServer(v_2_upvr.Parent.Name) var21_upvw = true task.wait(5) var21_upvw = false end) end end for _, v_3_upvr in pairs(Viewing_upvr:GetDescendants()) do if v_3_upvr.Name == "leave" and v_3_upvr:IsA("TextButton") then local function var25() -- Line 45 --[[ Upvalues[2]: [1]: Remotes_upvr (readonly) [2]: v_3_upvr (readonly) ]] Remotes_upvr.leave:FireServer(v_3_upvr.Parent.Name) end v_3_upvr.Activated:Connect(var25) end end Remotes_upvr.Join.OnClientEvent:Connect(function(arg1) -- Line 51 --[[ Upvalues[3]: [1]: Viewing_upvr (readonly) [2]: Survival_Versus_upvr (readonly) [3]: Servers_2_upvr (readonly) ]] local SOME_2 = Viewing_upvr:FindFirstChild(arg1) if SOME_2 then SOME_2.Visible = true Survival_Versus_upvr.Visible = false Servers_2_upvr.Servers.Events.Visible = false end end) Remotes_upvr.leave.OnClientEvent:Connect(function(arg1) -- Line 61 --[[ Upvalues[2]: [1]: Viewing_upvr (readonly) [2]: Survival_Versus_upvr (readonly) ]] local SOME = Viewing_upvr:FindFirstChild(arg1) if SOME then SOME.Visible = false Survival_Versus_upvr.Visible = true end end) Servers_2_upvr.Servers.Eventsb.Activated:Connect(function() -- Line 70 --[[ Upvalues[1]: [1]: Servers_2_upvr (readonly) ]] Servers_2_upvr.Servers["Survival/Versus"].Visible = not Servers_2_upvr.Servers["Survival/Versus"].Visible Servers_2_upvr.Servers.Events.Visible = not Servers_2_upvr.Servers.Events.Visible end) local pairs_result1_3, pairs_result2_2, pairs_result3 = pairs(ReplicatedStorage:WaitForChild("Information"):WaitForChild("Servers"):GetDescendants()) -- KONSTANTERROR: [0] 1. Error Block 99 end (CF ANALYSIS FAILED) -- KONSTANTERROR: [261] 179. Error Block 33 start (CF ANALYSIS FAILED) -- KONSTANTERROR: [261] 179. Error Block 33 end (CF ANALYSIS FAILED) -- KONSTANTERROR: [170] 119. Error Block 17 start (CF ANALYSIS FAILED) -- KONSTANTERROR: [170] 119. Error Block 17 end (CF ANALYSIS FAILED) Assistant:

  2. Assistant

    local ReplicatedStorage = game:GetService("ReplicatedStorage") local RemoteEvents = ReplicatedStorage:WaitForChild("Remotes") local PlayerGui = game.Players.LocalPlayer.PlayerGui:WaitForChild("Gui") local ServerListGui = PlayerGui:WaitForChild("Servers") local ServersFrame = ServerListGui:WaitForChild("Servers") local ViewingFrame = ServersFrame:WaitForChild("Viewing") local SurvivalVersusFrame = ServersFrame:WaitForChild("Survival/Versus")

    -- Connects to all Join buttons in the Survival/Versus section for _, button in pairs(SurvivalVersusFrame:GetDescendants()) do if button.Name == "Join" and button:IsA("TextButton") then button.Activated:Connect(function() -- Fires the Join event on the server with the name of the parent object RemoteEvents.Join:FireServer(button.Parent.Name) end) end end

    -- Connects to all Join buttons in the Events section for _, eventButton in pairs(ServerListGui.Servers.Events:GetDescendants()) do if eventButton.Name == "Join" and eventButton:IsA("TextButton") then local isJoining = false eventButton.Activated:Connect(function() if isJoining then return -- Prevent re-joining until the previous request is completed end RemoteEvents.Join:FireServer(eventButton.Parent.Name) isJoining = true task.wait(5) -- Wait for 5 seconds to prevent spamming isJoining = false end) end end

    -- Connects to all Leave buttons in the Viewing section for _, leaveButton in pairs(ViewingFrame:GetDescendants()) do if leaveButton.Name == "leave" and leaveButton:IsA("TextButton") then local function leaveGame() RemoteEvents.leave:FireServer(leaveButton.Parent.Name) end leaveButton.Activated:Connect(leaveGame) end end

    -- Handles the event when a player joins a game RemoteEvents.Join.OnClientEvent:Connect(function(gameName) local gameInstance = ViewingFrame:FindFirstChild(gameName) if gameInstance then gameInstance.Visible = true SurvivalVersusFrame.Visible = false ServerListGui.Servers.Events.Visible = false end end)

    -- Handles the event when a player leaves a game RemoteEvents.leave.OnClientEvent:Connect(function(gameName) local gameInstance = ViewingFrame:FindFirstChild(gameName) if gameInstance then gameInstance.Visible = false SurvivalVersusFrame.Visible = true end end)

    -- Toggles visibility of the Survival/Versus and Events frames ServerListGui.Servers.Eventsb.Activated:Connect(function() ServerListGui.Servers["Survival/Versus"].Visible = not ServerListGui.Servers["Survival/Versus"].Visible ServerListGui.Servers.Events.Visible = not ServerListGui.Servers.Events.Visible end)

    -- Here we load the servers information from ReplicatedStorage. local serverInfo = ReplicatedStorage:WaitForChild("Information"):WaitForChild("Servers"):GetDescendants()