Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Players = game:GetService("Players")
- local function leaderboardSetup(player)
- wait(1)
- game.Workspace.Data.Player.Value = player
- local char = game.Workspace:WaitForChild(player.Name)
- local coins = player.leaderstats.Coins
- while true do
- wait(1)
- if coins.Value % 10 == 0 and coins.Value > 9 then
- local potion = game.ServerStorage.Potion:Clone()
- potion.Parent = player.Backpack
- coins.Value = 0
- script.Enabled = false
- wait(3)
- script.Enabled=true
- end
- end
- end
- Players.PlayerAdded:Connect(leaderboardSetup)
Advertisement
Add Comment
Please, Sign In to add comment