Advertisement
Eliquimzzz

Advance guess the number command with buttons

Feb 7th, 2022
403
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.29 KB | None | 0 0
  1. //advanced guess the number command with buttons//
  2.  
  3.  
  4. //join to me discord: https://discord.gg/MEZHmVPPag//
  5.  
  6. ======================================
  7. ======================================
  8.  
  9. **VARS NEDEED**
  10.  
  11. numbers = 0
  12.  
  13. ======================================
  14. ======================================
  15.  
  16. **COMMANDS**
  17. command 1:
  18. trigger: !numguess
  19. need: BDScript
  20. code: $nomention
  21. $setUserVar[numbers;$random[1;5]]
  22. $addButton[no;buttonguess1-$authorID;1;primary;no;]
  23. $addButton[no;buttonguess2-$authorID;2;primary;no;]
  24. $addButton[no;buttonguess3-$authorID;3;primary;no;]
  25. $addButton[no;buttonguess4-$authorID;4;primary;no;]
  26. $title[:1234: __GUESS THE NUMBER__]
  27. $description[Pick the correct number below to win, you only have one guess]
  28. $thumbnail[$authorAvatar]
  29. $color[447f4]
  30. $suppressErrors
  31.  
  32. ======================================
  33. ======================================
  34.  
  35. command 2:
  36. trigger: $onInteraction
  37. need: BDScript
  38. code: $nomention
  39. $if[$customID==buttonguess1-$authorID]
  40. $if[$getUserVar[numbers]==1]
  41. $editButton[buttonguess1-$authorID;✅;success;yes;]
  42. $editButton[buttonguess2-$authorID;2;secondary;yes;]
  43. $editButton[buttonguess3-$authorID;3;secondary;yes;]
  44. $editButton[buttonguess4-$authorID;4;secondary;yes;]
  45. $setUserVar[numbers;$random[1;5]]
  46. $title[:1234: __CORRECT NUMBER__]
  47. $description[You picked the right number]
  48. $thumbnail[$authorAvatar]
  49. $color[447f4]
  50. $else
  51. $editButton[buttonguess1-$authorID;❌;danger;yes;]
  52. $editButton[buttonguess2-$authorID;2;secondary;yes;]
  53. $editButton[buttonguess3-$authorID;3;secondary;yes;]
  54. $editButton[buttonguess4-$authorID;4;secondary;yes;]
  55. $title[:1234: __INCORRECT NUMBER__]
  56. $description[You picked the wrong number, the correct number was `$getUserVar[numbers]`]
  57. $thumbnail[$authorAvatar]
  58. $color[447f4]
  59. $endif
  60. $endif
  61.  
  62. $if[$customID==buttonguess2-$authorID]
  63. $if[$getUserVar[numbers]==2]
  64. $editButton[buttonguess2-$authorID;✅;success;yes;]
  65. $editButton[buttonguess1-$authorID;1;secondary;yes;]
  66. $editButton[buttonguess3-$authorID;3;secondary;yes;]
  67. $editButton[buttonguess4-$authorID;4;secondary;yes;]
  68. $setUserVar[numbers;$random[1;5]]
  69. $title[:1234: __CORRECT NUMBER__]
  70. $description[You picked the right number]
  71. $thumbnail[$authorAvatar]
  72. $color[447f4]
  73. $else
  74. $editButton[buttonguess2-$authorID;❌;danger;yes;]
  75. $editButton[buttonguess1-$authorID;1;secondary;yes;]
  76. $editButton[buttonguess3-$authorID;3;secondary;yes;]
  77. $editButton[buttonguess4-$authorID;4;secondary;yes;]
  78. $title[:1234: __INCORRECT NUMBER___]
  79. $description[You picked the wrong number, the correct number was `$getUserVar[numbers]`]
  80. $thumbnail[$authorAvatar]
  81. $color[447f4]
  82. $endif
  83. $endif
  84.  
  85. $if[$customID==buttonguess3-$authorID]
  86. $if[$getUserVar[numbers]==3]
  87. $editButton[buttonguess3-$authorID;✅;success;yes;]
  88. $editButton[buttonguess2-$authorID;2;secondary;yes;]
  89. $editButton[buttonguess1-$authorID;1;secondary;yes;]
  90. $editButton[buttonguess4-$authorID;4;secondary;yes;]
  91. $setUserVar[numbers;$random[1;5]]
  92. $title[:1234: __CORRECT NUMBER__]
  93. $description[You picked the right number]
  94. $thumbnail[$authorAvatar]
  95. $color[447f4]
  96. $else
  97. $editButton[buttonguess3-$authorID;❌;danger;yes;]
  98. $editButton[buttonguess2-$authorID;2;secondary;yes;]
  99. $editButton[buttonguess1-$authorID;1;secondary;yes;]
  100. $editButton[buttonguess4-$authorID;4;secondary;yes;]
  101. $title[:1234: __INCORRECT NUMBER__]
  102. $description[You picked the wrong number, the correct number was `$getUserVar[numbers]`]
  103. $thumbnail[$authorAvatar]
  104. $color[447f4]
  105. $endif
  106. $endif
  107.  
  108. $if[$customID==buttonguess4-$authorID]
  109. $if[$getUserVar[numbers]==4]
  110. $editButton[buttonguess4-$authorID;✅;success;yes;]
  111. $editButton[buttonguess2-$authorID;2;secondary;yes;]
  112. $editButton[buttonguess3-$authorID;3;secondary;yes;]
  113. $editButton[buttonguess1-$authorID;1;secondary;yes;]
  114. $setUserVar[numbers;$random[1;5]]
  115. $title[:1234: __CORRECT NUMBER__]
  116. $description[You picked the right number]
  117. $thumbnail[$authorAvatar]
  118. $color[447f4]
  119. $else
  120. $editButton[buttonguess4-$authorID;❌;danger;yes;]
  121. $editButton[buttonguess2-$authorID;2;secondary;yes;]
  122. $editButton[buttonguess3-$authorID;3;secondary;yes;]
  123. $editButton[buttonguess1-$authorID;1;secondary;yes;]
  124. $title[:1234: __INCORRECT NUMBER__]
  125. $description[You picked the wrong number, the correct number was `$getUserVar[numbers]`]
  126. $thumbnail[$authorAvatar]
  127. $color[447f4]
  128. $endif
  129. $endif
  130. $suppressErrors
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement