Advertisement
Roblox_Scripter481

Leaderstats script roblox studio

Aug 14th, 2022 (edited)
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.66 KB | None | 0 0
  1. local Players = game:GetService("Players")
  2.  
  3. local function leaderboardSetup(player)
  4.     local leaderstats = Instance.new("Folder")
  5.     leaderstats.Name = "leaderstats"
  6.     leaderstats.Parent = player
  7.    
  8.     local power = Instance.new("IntValue")
  9.     power.Name = "Power"
  10.     power.Value = 0
  11.     power.Parent leaderstats
  12.  
  13.     local cash = Instance.new("IntValue")
  14.     cash.Name = "Cash"
  15.     cash.Value = 0
  16.     cash.Parent = leaderstats
  17.    
  18.     local rebriths = Instance.new("IntValue")
  19.     rebriths.Name = "Rebirths"
  20.     rebriths.Value = 0
  21.     rebriths.Parent = leaderstats
  22. end
  23.  
  24. -- Connect the "leaderboardSetup()" function to the "PlayerAdded" event
  25. Players.PlayerAdded:Connect(leaderboardSetup)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement