Advertisement
il0l

leaderboard script

Aug 21st, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.55 KB | None | 0 0
  1. local DataStore = game:GetService("DataStoreService"):GetDataStore(Dta)
  2. local Player = game:GetService("Players")
  3.  
  4. Player.PlayerAdded:connect(function(plr)
  5.     local leaderboard = Instance.new("IntValue", plr)
  6.     leaderboard.Name = "leaderstats"
  7.    
  8.     local points = Instance.new("IntValue",leaderboard)
  9.     points.Name = "Points"
  10.    
  11.    
  12.  
  13.     local level = Instance.new("IntValue",leaderboard)
  14.     level.Name = "Level"
  15.    
  16.    
  17.     Points.Changed:connect(function()
  18.         level.Value = loints.Value/100
  19.     end)
  20.    
  21.    
  22. end)
  23.  
  24. Player.PlayerRemoving:connect(function(plr)
  25.    
  26. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement