Advertisement
UmCaraHue

leaderstats

Oct 16th, 2019
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. PointData = jogo: GetService ("DataStoreService"): GetDataStore ("PointData")
  2. PrestigeData = jogo: GetService ("DataStoreService"): GetDataStore ("PrestigeData")
  3.  
  4. game.Players.PlayerAdded: Connect (função (plr)
  5. LB local = Instance.new ("IntValue")
  6. LB.Name = "leaderstats"
  7.  
  8. local p = Instance.new ("IntValue")
  9. p.Name = "Pontos"
  10. p.Value = PointData: GetAsync (plr.userId) ou 0
  11.  
  12. local r = Instance.new ("IntValue")
  13. r.Name = "Prestígio"
  14. r.Value = PrestigeData: GetAsync (plr.userId) ou 0
  15.  
  16. LB.Parent = plr
  17. p.Parent = LB
  18. r.Parent = LB
  19. fim)
  20.  
  21. game.Players.PlayerRemoving: Connect (função (plr)
  22. PointData: SetAsync (plr.userId, plr.leaderstats.Points.Value)
  23. PrestigeData: SetAsync (plr.userId, plr.leaderstats.Prestige.Value)
  24. fim)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement