Advertisement
Guest User

Untitled

a guest
Jun 20th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. --Put this in ServerScriptService--
  2.  
  3. game.Players.PlayerAdded:connect(function(Player)
  4. local Data = Instance.new("IntValue",Player)
  5. Data.Name = "Data"
  6. local XP = Instance.new("IntValue",Data)
  7. XP.Name = "XP"
  8. XP.Value = 0
  9. local Level = Instance.new("IntValue",Data)
  10. Level.Name = "Level"
  11. Level.Value = 1
  12.  
  13. XP.Changed:connect(function() XPChange(Player,XP,Level) end)
  14.  
  15. end)
  16.  
  17. function XPChange(Player,XP,Level)
  18. if XP.Value >= Level.Value*150 then
  19. XP.Value = 0
  20. Level.Value = Level.Value + 1
  21. game.Players.LocalPlayer.Character.Humanoid.MaxHealth = game.Players.LocalPlayer.Character.Humanoid.MaxHealth + 50
  22. end
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement