Advertisement
Brucord-Xloxn1296

Most Advanced Button Pages: Part 1/2 | By: Xloxn#4050

Oct 7th, 2022 (edited)
1,965
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 2.09 KB | None | 0 0
  1. $c[Trigger: (Anything you’d like)]
  2.  
  3. $c[⚠️ IMPORTANT: Inside of this `$var[Made by Xloxn#4050;…]` put whatever you want, separate it with a |, you could make help commands, reminders, etc… If you have any ideas I could make with this DM me (Xloxn#4050)]
  4.  
  5. $var[Made by Xloxn#4050;]
  6.  
  7. $var[⚠️ IMPORTANT: Go to the copy whatever you put inside the `$var[Made by Xloxn#4050.]` and put it inside other `$var[Made by Xloxn#4050.]` inside the `$onInteraction` command!]
  8.  
  9. $c[⚠️ IMPORTANT: Once you’ve followed these steps you should be done, keep in mind, it’ll seperate every 9 |’s]
  10.  
  11. $c[// Cool Features:
  12. - Could go up to `10,000` pages (command breaks after that, but I don’t know why would you ever use that much)
  13. - This is more efficient than creating multiple `$įf` statements and button and etc…
  14. - Calculates the amount of pages based on the amount of `|` you put inside the `$vār` at the top of the code]
  15.  
  16. $nomention
  17. $textSplit[$var[Made by Xloxn#4050];|]
  18. $if[$splitText[1]!=]
  19. $description[
  20. $splitText[1]
  21. $splitText[2]
  22. $splitText[3]
  23. $splitText[4]
  24. $splitText[5]
  25. $splitText[6]
  26. $splitText[7]
  27. $splitText[8]]
  28. $else
  29. $description[Nothing to see here…]
  30. $endif
  31.  
  32. $c[// This calculates the pages, I lost multiple brain cells from this]
  33.  
  34. $enableDecimals[yes]
  35. $if[$checkContains[$divide[$getTextSplitLength;9];.]==true]
  36. $textSplit[$divide[$getTextSplitLength;9];.]
  37. $var[pages;$sum[$splitText[1];1]]
  38. $else
  39. $var[pages;$divide[$getTextSplitLength;9]]
  40. $endif
  41.  
  42. $footer[Page 1 of $var[pages]]
  43.  
  44. $textSplit[$var[Made by Xloxn#4050];|]
  45.  
  46. $color[#2f3136]
  47.  
  48. $c[// Change the button emojis if you’d like, it won’t effect the code 👌 then go to the `$onInteraction` and change it there too, otherwise it’d look weird]
  49.  
  50. $addButton[no;hfirst-$authorID;;secondary;yes;⏪]
  51.  
  52. $addButton[no;hpage1-$authorID;;secondary;yes;⬅️]
  53.  
  54. $if[$splitText[8]!=]
  55. $addButton[no;hpage2-$authorID-;;secondary;no;➡️]
  56. $addButton[no;hlast-$authorID;;secondary;no;⏩]
  57. $else
  58. $addButton[no;hpage2-$authorID;;secondary;yes;➡️]
  59. $addButton[no;hlast-$authorID;;secondary;yes;⏩]
  60. $endif
  61.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement