chill-blox123

Leaderboard script

May 24th, 2018
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. game.Players.PlayerAdded:connect(function()
  2. local folder = Instance.new("Folder",player)
  3. folder.Name = "leaderstats"
  4. local currency1 = Instance,new("IntValue",folder)
  5. currency1.Name = "Cash"
  6.  
  7. player.CharacterAdded:connect(function(character)
  8. character:WaitForChild("Humanoid").Died:connect(function()
  9. local tag = character.Humanoid:FirstFindChild("creator")
  10. if tag ~= nil then
  11. if tag.Value ~= nil then
  12. currency1.Value = currency1.Value + 10 --This is the reward after the player died.
  13. end
  14. end
  15. end)
  16. end)
  17. end)
Advertisement
Add Comment
Please, Sign In to add comment