RyanzX15

leveling system in aoi.js

Nov 28th, 2022
722
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JavaScript 2.69 KB | Source Code | 0 0
  1. //Aoi.js Leveling
  2. //Before you copy This Please Subscribe my Youtube Channel To Support Me :)
  3.  
  4. //BASIC YLeveling Sytems
  5. [ Variable ]
  6. //tips : First You Create A New Var With name Like This  put in index.js
  7.  
  8. > rank
  9. > exp
  10. > levelling
  11. > level_channel
  12. > level_msg
  13.  
  14. [ Commands 1 >> enable leveling]
  15. //fisrt command to enable leveling in your serever
  16.  
  17. module.exports = ({
  18.    
  19. name:"enable-levelling",
  20.    
  21. aliases:"nlevel",
  22.  
  23.    
  24. category:"Levelling",
  25.    
  26. code:`
  27.    
  28. $setservervar[levelling;true]
  29.    
  30. $setservervar[level_channel;$findchannel[$message[1]]]
  31.    
  32. $setservervar[level_msg;$replacetext[$replacetext[$checkcondition[$message[2]==];true;$getservervar[level_msg]];false;$nomentionmessage]]
  33.    
  34. $title[1;Sucess To Enable Levelling]
  35. $color[1;WHITE]
  36. $description[1;Levelling system successfully set up! If you did not use any place holders, and want to use them, check below ->
  37.    
  38. \`\`\`
  39. > username -> $username
  40. > usertag -> <@$authorid>
  41. > level -> 1
  42. \`\`\`]
  43.    
  44. $onlyif[$mentionedchannels[1]!=;Could not find the channel!]
  45. $onlyperms[manageserver;Not enough permissions! You need manage server permissions to execute this!]`})
  46. //tips : you can edit like you want
  47.  
  48. [ Command 2 >> reset / disable the leveling]
  49. //to disable the leveling
  50.  
  51. module.exports = ({
  52.    
  53. name:"dis-levelling",
  54.    
  55. aliases:"un-level",
  56.  
  57.    
  58. category:"Levelling",
  59.    
  60. code:`
  61.    
  62. $setservervar[levelling;false]
  63.    
  64. $title[I successfully reset levelling for this server!]
  65. $color[WHITE]
  66.  
  67. `})
  68. //tips you can edit what ever like you want
  69.  
  70. [ Command 3 >> Stats / Ranks / Profile]
  71. //to see level in user
  72.  
  73. module.exports = ({
  74.    
  75. name:"rank",
  76.    
  77. aliases:"level",
  78.    
  79. category:"Levelling",
  80.    
  81. description:"Check the rank of a user.",
  82.    
  83. usage:"rank <optional user>",
  84.    
  85. code:`
  86.    
  87. $onlyIf[$message!=;in falid usage try this \`<prefix>rank <mentioned user>\`]
  88.  
  89. $author[Rank of $usertag[$mentioned[1]];$authoravatar]
  90. $description[
  91. > Ranks And Level
  92. \`\`\`
  93. 🏆 | level : $getUserVar[rank;$mentioned[1]]
  94. 👑 | exp : $getUserVar[exp;$mentioned[1]] / 100
  95. \`\`\`]
  96.  
  97.    
  98. $color[WHITE]
  99.    
  100. $onlyif[$getservervar[levelling]==true;{newEmbed:{title:The levelling system is disabled!}{color:WHITE}}]`})
  101. //you can change what ever you want
  102.  
  103. [ Command 4 >> handler / loop]
  104. //to execute loop if an user is levelup
  105.  
  106. module.exports = ({
  107.    
  108. name:"$alwaysExecute",
  109.    
  110. code:`$setUserVar[exp;$sum[$getUserVar[exp];$random[4;8]]]
  111. $setUserVar[rank;$sum[$getUserVar[rank];1]]
  112. $title[🎁 | You Level Up]
  113. $color[WHITE]
  114. $description[You have leveled up to **$math[$getUserVar[rank]+1]**]
  115. $globalCooldown[140s]
  116. $deleteIn[10s] 
  117. $onlyif[$getservervar[levelling]==true;]`})
  118.  
  119. //you cam change what ever you want
  120.  
  121. //SUBSCRIBE FOR MORE :)
  122.    
  123.  
  124.    
  125.    
  126.  
Advertisement
Add Comment
Please, Sign In to add comment