Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local p = game:GetService("Players").LocalPlayer
- local r = game:GetService("ReplicatedStorage")
- local Folder = p:WaitForChild("PlayerGui")
- local Settings = Folder:WaitForChild("Settings")
- local SV = Settings:WaitForChild("SeamlessRetry")
- local End, Max = 0, 4
- local function setSeamlessRetry(state)
- r.Remotes.SetSettings:InvokeServer("SeamlessRetry")
- SV.Value = state
- end
- if End == 0 then
- if not SV.Value then
- setSeamlessRetry(true)
- end
- end
- Folder.ChildAdded:Connect(function(c)
- if c.Name == "EndGameUI" then
- End += 1
- if End >= Max then
- setSeamlessRetry(false)
- task.wait(1)
- if not SV.Value then
- r.Remotes.RestartMatch:FireServer()
- end
- End = 0
- task.wait(2)
- setSeamlessRetry(true)
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment