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:14:05 -- Luau version 6, Types version 3 -- Time taken: 0.002238 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 Remotes = ReplicatedStorage:WaitForChild("Remotes") local PlayerGui = game.Players.LocalPlayer.PlayerGui:WaitForChild("Gui") local ServersGui = PlayerGui:WaitForChild("Servers") local ViewingFrame = ServersGui:WaitForChild("Viewing") local SurvivalVersusFrame = ServersGui:WaitForChild("Survival/Versus")

    -- Connects join buttons within the Survival/Versus frame for _, serverButton in pairs(SurvivalVersusFrame:GetDescendants()) do if serverButton.Name == "Join" and serverButton:IsA("TextButton") then serverButton.Activated:Connect(function() -- Fires a server event to join a game Remotes.Join:FireServer(serverButton.Parent.Name) end) end end

    -- Connects join buttons within the events frame for _, eventButton in pairs(ServersGui.Servers.Events:GetDescendants()) do if eventButton.Name == "Join" and eventButton:IsA("TextButton") then local isJoining = false eventButton.Activated:Connect(function() -- Prevents multiple join requests in quick succession if isJoining then return end isJoining = true Remotes.Join:FireServer(eventButton.Parent.Name) task.wait(5) -- Wait for 5 seconds before re-enabling joining isJoining = false end) end end

    -- Connects leave buttons within the viewing frame for _, leaveButton in pairs(ViewingFrame:GetDescendants()) do if leaveButton.Name == "leave" and leaveButton:IsA("TextButton") then local function leaveGame() -- Fires a server event to leave a game Remotes.leave:FireServer(leaveButton.Parent.Name) end leaveButton.Activated:Connect(leaveGame) end end

    -- Handles the event when a player joins a game Remotes.Join.OnClientEvent:Connect(function(serverName) local serverFrame = ViewingFrame:FindFirstChild(serverName) if serverFrame then serverFrame.Visible = true SurvivalVersusFrame.Visible = false ServersGui.Servers.Events.Visible = false end end)

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

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

    -- Fetches server information from ReplicatedStorage local serverInfo = ReplicatedStorage:WaitForChild("Information"):WaitForChild("Servers"):GetDescendants()