Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Players = game:GetService("Players")
- local MessagingService = game:GetService("MessagingService")
- local WinManager = require(game.ServerScriptService:WaitForChild("WinManager"))
- for _, plr in ipairs(Players:GetPlayers()) do
- if plr.Character and plr.Character:FindFirstChildOfClass("Humanoid") then
- local humanoid = plr.Character:FindFirstChildOfClass("Humanoid")
- if humanoid.Health > 0 then
- -- Award this player a win
- WinManager.AwardWin(plr)
- end
- end
- end
- -- Tell lobby servers to refresh their leaderboard
- pcall(function()
- MessagingService:PublishAsync("WinsUpdated", {})
- end)
Add Comment
Please, Sign In to add comment