Facebook
From LeaderBoard, 1 Month ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 143
  1. local Players = game:GetService("Players")
  2. local function leaderboardSetup(player)
  3.  local leaderstats = Instance.new("Folder")
  4.  leaderstats.Name = "leaderstats"
  5.  leaderstats.Parent = player
  6.  
  7.  local gold = Instance.new("IntValue")
  8.  gold.Name = "Coins"
  9.  gold.Value = 0
  10.  gold.Parent = leaderstats
  11.  
  12.  local exp = Instance.new("IntValue")
  13.  exp.Name = "Exp"
  14.  exp.Value = 0
  15.  exp.Parent = leaderstats
  16. end
  17. Players.PlayerAdded:Connect(leaderboardSetup)
  18.  
  19.  
  20. Players.PlayerAdded:Connect(leaderboardSetup)
  21.  
  22. for _, player in ipairs(Players:GetPlayers()) do
  23.  leaderboardSetup(player)
  24. end