Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Put this in ServerScriptService--
- game.Players.PlayerAdded:connect(function(Player)
- local Data = Instance.new("IntValue",Player)
- Data.Name = "Data"
- local XP = Instance.new("IntValue",Data)
- XP.Name = "XP"
- XP.Value = 0
- local Level = Instance.new("IntValue",Data)
- Level.Name = "Level"
- Level.Value = 1
- XP.Changed:connect(function() XPChange(Player,XP,Level) end)
- end)
- function XPChange(Player,XP,Level)
- if XP.Value >= Level.Value*150 then
- XP.Value = 0
- Level.Value = Level.Value + 1
- game.Players.LocalPlayer.Character.Humanoid.MaxHealth = game.Players.LocalPlayer.Character.Humanoid.MaxHealth + 50
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement