BlackKnight683

Level system

Dec 2nd, 2020 (edited)
1,140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $eval
  2. try{
  3. var xpMade = $rollnum(1,5)
  4. var level$ID = (level$ID == null) ? 1 : level$ID += 0;
  5. var xp$ID = (xp$ID == null) ? xpMade : xp$ID += xpMade;
  6.  
  7. //idea taken from Doggo Man aka chris the legend [Festive Doggo#6049]
  8. //code edited by •OofyOofOof•#2018
  9.  
  10. var tolvlup = level$ID * 125;                                                                                                                                                                                                                                                                                
  11.  
  12. if(xp$ID + xpMade>=tolvlup) {
  13. xp$ID -= xp$ID
  14. level$ID += 1
  15. };
  16.  
  17. var Msgforlvl = ""
  18. var output = ""
  19.  
  20. if(xp$ID === 0) {Msgforlvl = "🥳 **You are now level" + " `" + encodeURIComponent(level$ID) + "` 🥳**"};
  21.  
  22. //sub to blackknight683
  23. //sub to festive doggo [Doggo images]
  24.  
  25. if(Msgforlvl !== "") {var output = decodeURI(Msgforlvl)};
  26. }catch(oofy) {var output = ""}
  27. $halt $get(output)
Add Comment
Please, Sign In to add comment