HowToRoblox

EggHuntPrize

Apr 28th, 2020
1,139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.42 KB | None | 0 0
  1. game.Players.PlayerAdded:Connect(function(plr)
  2.    
  3.     local leaderstats = Instance.new("Folder")
  4.     leaderstats.Name = "leaderstats"
  5.     leaderstats.Parent = plr
  6.    
  7.     local money = Instance.new("IntValue")
  8.     money.Name = "Money"
  9.     money.Value = 0
  10.     money.Parent = leaderstats
  11. end)
  12.  
  13.  
  14. game.ReplicatedStorage.OnAllEggsFound.OnServerEvent:Connect(function(plr)
  15.    
  16.     plr.leaderstats.Money.Value = plr.leaderstats.Money.Value + 1000
  17. end)
Add Comment
Please, Sign In to add comment