Advertisement
twogz

Untitled

Jul 8th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. on first join:
  2. set {xp::%uuid of player%} to 0
  3. set {maxxp::%uuid of player%} to 10
  4. set {level::%uuid of player%} to 1
  5.  
  6. command /xp [<text>] [<player>] [<integer>]:
  7. trigger:
  8. if arg 1 is "add":
  9. if player does not have permission "leveling.*":
  10. message "&cInsufficient permissions."
  11. else:
  12. add arg 3 to {xp::%uuid of arg 2%}
  13. message "&6&l+ %arg 3% Player XP" to arg 2
  14. if {xp::%uuid of arg 2%} >= {maxxp::%uuid of arg 2%}:
  15. add 1 to {level::%uuid of arg 2%}
  16. set {xp::%uuid of arg 2%} to 0
  17. message "&e&lYou are now Lvl. %{level::%uuid of player%}%" to arg 2
  18.  
  19. command /resetxp:
  20. trigger:
  21. message "&c&lYour Level and XP have been reset."
  22. set {xp::%uuid of player%} to 0
  23. set {maxxp::%uuid of player%} to 10
  24. set {level::%uuid of player%} to 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement