Advertisement
SourceYT

Leaderstats Script (UPDATED)

Apr 6th, 2021
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.03 KB | None | 0 0
  1. game.Players.PlayerAdded:Connect(function(Player)
  2.     local leaderstats = Instance.new("Folder")
  3.     leaderstats.Name = "leaderstats"
  4.     leaderstats.Parent = Player
  5.    
  6.     local Value = Instance.new("IntValue")
  7.     Value.Name = "Points" -- This is going to be your primary value of the game. This is also going to be used to buy new items. Change it to whatever you want!
  8.     Value.Parent = leaderstats
  9.     Value.Value = 0
  10.    
  11.     local Value2 = Instance.new("IntValue")
  12.     Value2.Name = "Rebirths" -- Rebirths aren't required for simulators. This is just an extra necessity that you can use in the game.
  13.     Value2.Parent = leaderstats
  14.     Value2.Value = 0
  15.    
  16. end)
  17.  
  18. -- Our leaderstats script will be used to create that little billboard thing at the top right of your screen where it displays the player.
  19. -- Next to our names, it'll show our main value and our secondary value, in my case, it's Points and Rebirths.
  20. -- If you don't want this to be shown, remove the "Value.Parent = leaderstats" line. This won't show it at the top right but will still be stored and scored.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement