Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- game.Players.PlayerAdded:Connect(function(Plr)
- local stats = Instance.new("Folder", Plr)
- stats.Name = "leaderstats"
- local Money = Instance.new("IntValue", stats)
- Money.Name = "Money"
- Money.Value = 0
- end)
- game.ReplicatedStorage.AddExp.OnServerEvent:Connect(function(plr)
- plr.leaderstats.Exp.Value = plr.leaderstats.Exp.Value + 50
- end)
- game.Players.PlayerAdded:Connect(function(plr)
- wait(.1)
- local exp = plr.leaderstats.Exp
- local levels = plr.leaderstats.Levels
- while wait() do
- if exp.Value >= (100 * (levels.Value + 1)) then
- levels.Value = levels.Value + 1
- exp.Value = 0
- game.ReplicatedStorage.LevelUpGui:FireClient(plr)
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement