I’m pretty sure this script is the one repeating multiple times as players get 2 wins and then like 8 wins then 11 for no reason (the amount is random but it appears to be giving players around 1-10 wins per round)
Dead = false
plr = game.Players.PlayerAdded:Connect(function(plr)
game.ServerScriptService.GameSorting.GameChange.Event:Connect(function()
print("Starting the death penalty thing")
local Char = plr.Character
if Char == nil then
repeat
task.wait()
until Char ~= nil
end
Char:WaitForChild("Humanoid").Died:Connect(function()
Dead = true
end)
game.ServerScriptService.GameSorting.GameEnd.Event:Connect(function()
if Dead == false then
print("Plr survived")
plr.leaderstats.Survivals.Value = plr.leaderstats.Survivals.Value + 1
plr.leaderstats.Grub.Value = plr.leaderstats.Grub.Value + 10
else
print("Player Died")
Dead = false
end
end)
end)
end)
how is this happening? (this script is a server script in serverscriptservice)