Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- game.Players.PlayerRemoving:connect(function(player)
- ds:SetAsync(player.UserId, player.leaderstats.Cash.Value)
- end)
- game.Players.PlayerAdded:Connect(function(plr)
- local leaderstats = Instance.new("BoolValue",plr)
- leaderstats.Name = "leaderstats"
- local money = Instance.new("IntValue",leaderstats)
- money.Name = "Money"
- money.Value = 0
- local exp = Instance.new("IntValue",leaderstats)
- exp.Name = "Exp"
- exp.Value = 0
- local level = Instance.new("IntValue",leaderstats)
- level.Name = "Level"
- level.Value = 0
- exp.Changed:Connect(function()
- level.Value = math.floor(exp.Value / 1000)
- end)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement