Advertisement
il0l

leaderboard

Aug 25th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.59 KB | None | 0 0
  1. game.Players.PlayerRemoving:connect(function(player)
  2. ds:SetAsync(player.UserId, player.leaderstats.Cash.Value)
  3. end)
  4. game.Players.PlayerAdded:Connect(function(plr)
  5. local leaderstats = Instance.new("BoolValue",plr)
  6. leaderstats.Name = "leaderstats"
  7. local money = Instance.new("IntValue",leaderstats)
  8. money.Name = "Money"
  9. money.Value = 0
  10. local exp = Instance.new("IntValue",leaderstats)
  11. exp.Name = "Exp"
  12. exp.Value = 0
  13. local level = Instance.new("IntValue",leaderstats)
  14. level.Name = "Level"
  15. level.Value = 0
  16.  
  17. exp.Changed:Connect(function()
  18.     level.Value = math.floor(exp.Value / 1000)
  19. end)
  20. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement