Advertisement
Eliquimzzz

Advance Calculator command

Feb 9th, 2022
445
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.09 KB | None | 0 0
  1. And also join my discord server :)
  2. https://discord.gg/MEZHmVPPag
  3.  
  4. Variables required
  5.  
  6. calc = 0
  7.  
  8. ````````````````````````````````````````````````````````````
  9.  
  10. Command 1
  11.  
  12. Trigger:(your choice)
  13.  
  14. Type: BDSript
  15.  
  16. Code:
  17.  
  18. $nomention
  19. $addField[Calculator;0]
  20. $addButton[no;7;7;secondary;no;]
  21. $addButton[no;8;8;secondary;no;]
  22. $addButton[no;9;9;secondary;no;]
  23. $addButton[no;x;x;primary;no;]
  24. $addButton[yes;4;4;secondary;no;]
  25. $addButton[no;5;5;secondary;no;]
  26. $addButton[no;6;6;secondary;no;]
  27. $addButton[no;+;+;primary;no;]
  28. $addButton[no;-;-;primary;no;]
  29. $addButton[yes;1;1;secondary;no;]
  30. $addButton[no;2;2;secondary;no;]
  31. $addButton[no;3;3;secondary;no;]
  32. $addButton[no;=;=;primary;no;]
  33. $addButton[no;<;<;danger;no;]
  34. $addButton[yes;0;0;secondary;no;]
  35. $addButton[no;00;00;secondary;no;]
  36. $addButton[no;000;000;secondary;no;]
  37. $addButton[no;ac;↻ AC;danger;no;]
  38.  
  39. ````````````````````````````````````````````````````````````
  40. ````````````````````````````````````````````````````````````
  41.  
  42. Command 2
  43.  
  44. Trigger: $onInteraction[1]
  45.  
  46. Type: BDSript 2
  47.  
  48. Code:
  49.  
  50. $nomention
  51. $textSplit[$getServerVar[calc]; ]
  52.  
  53. $addField[Calculator;$replaceText[$replaceText[$checkContains[$splitText[$getTextSplitLength];+;-;x;÷];false;$getServerVar[calc]1;-1];true;$getServerVar[calc] 1;-1]]
  54. $setServerVar[calc;$replaceText[$replaceText[$checkContains[$splitText[$getTextSplitLength];+;-;x;÷];false;$getServerVar[calc]1;-1];true;$getServerVar[calc] 1;-1]]
  55.  
  56. ——————————————————————————————————————————————————————————
  57.  
  58. Command 3
  59.  
  60. Trigger: $onInteraction[2]
  61.  
  62. Type: BDSript 2
  63.  
  64. Code:
  65.  
  66. $nomention
  67. $textSplit[$getServerVar[calc]; ]
  68.  
  69. $addField[Calculator;$replaceText[$replaceText[$checkContains[$splitText[$getTextSplitLength];+;-;x;÷];false;$getServerVar[calc]2;-1];true;$getServerVar[calc] 2;-1]]
  70. $setServerVar[calc;$replaceText[$replaceText[$checkContains[$splitText[$getTextSplitLength];+;-;x;÷];false;$getServerVar[calc]2;-1];true;$getServerVar[calc] 2;-1]]
  71.  
  72. ````````````````````````````````````````````````````````````
  73. ````````````````````````````````````````````````````````````
  74.  
  75. Command 4
  76.  
  77. Trigger: $onInteraction[3]
  78.  
  79. Type: BDSript 2
  80.  
  81. Code:
  82.  
  83. $nomention
  84. $textSplit[$getServerVar[calc]; ]
  85.  
  86. $addField[Calculator;$replaceText[$replaceText[$checkContains[$splitText[$getTextSplitLength];+;-;x;÷];false;$getServerVar[calc]3;-1];true;$getServerVar[calc] 3;-1]]
  87. $setServerVar[calc;$replaceText[$replaceText[$checkContains[$splitText[$getTextSplitLength];+;-;x;÷];false;$getServerVar[calc]3;-1];true;$getServerVar[calc] 3;-1]]
  88.  
  89. ````````````````````````````````````````````````````````````
  90. ````````````````````````````````````````````````````````````
  91.  
  92. Command 5
  93.  
  94. Trigger: $onInteraction[4]
  95.  
  96. Type: BDSript 2
  97.  
  98. Code:
  99.  
  100. $nomention
  101. $textSplit[$getServerVar[calc]; ]
  102.  
  103. $addField[Calculator;$replaceText[$replaceText[$checkContains[$splitText[$getTextSplitLength];+;-;x;÷];false;$getServerVar[calc]4;-1];true;$getServerVar[calc] 4;-1]]
  104. $setServerVar[calc;$replaceText[$replaceText[$checkContains[$splitText[$getTextSplitLength];+;-;x;÷];false;$getServerVar[calc]4;-1];true;$getServerVar[calc] 4;-1]]
  105.  
  106. ````````````````````````````````````````````````````````````
  107. ````````````````````````````````````````````````````````````
  108.  
  109. Command 6
  110.  
  111. Trigger: $onInteraction[5]
  112.  
  113. Type: BDSript 2
  114.  
  115. Code:
  116.  
  117. $nomention
  118. $textSplit[$getServerVar[calc]; ]
  119.  
  120. $addField[Calculator;$replaceText[$replaceText[$checkContains[$splitText[$getTextSplitLength];+;-;x;÷];false;$getServerVar[calc]5;-1];true;$getServerVar[calc] 5;-1]]
  121. $setServerVar[calc;$replaceText[$replaceText[$checkContains[$splitText[$getTextSplitLength];+;-;x;÷];false;$getServerVar[calc]5;-1];true;$getServerVar[calc] 5;-1]]
  122.  
  123. ````````````````````````````````````````````````````````````
  124. ````````````````````````````````````````````````````````````
  125.  
  126. Command 7
  127.  
  128. Trigger: $onInteraction[6]
  129.  
  130. Type: BDSript 2
  131.  
  132. Code:
  133.  
  134. $nomention
  135. $textSplit[$getServerVar[calc]; ]
  136.  
  137. $addField[Calculator;$replaceText[$replaceText[$checkContains[$splitText[$getTextSplitLength];+;-;x;÷];false;$getServerVar[calc]6;-1];true;$getServerVar[calc] 6;-1]]
  138. $setServerVar[calc;$replaceText[$replaceText[$checkContains[$splitText[$getTextSplitLength];+;-;x;÷];false;$getServerVar[calc]6;-1];true;$getServerVar[calc] 6;-1]]
  139.  
  140. ````````````````````````````````````````````````````````````
  141. ````````````````````````````````````````````````````````````
  142.  
  143. Command 8
  144.  
  145. Trigger: $onInteraction[7]
  146.  
  147. Type: BDSript 2
  148.  
  149. Code:
  150.  
  151. $nomention
  152. $textSplit[$getServerVar[calc]; ]
  153.  
  154. $addField[Calculator;$replaceText[$replaceText[$checkContains[$splitText[$getTextSplitLength];+;-;x;÷];false;$getServerVar[calc]7;-1];true;$getServerVar[calc] 7;-1]]
  155. $setServerVar[calc;$replaceText[$replaceText[$checkContains[$splitText[$getTextSplitLength];+;-;x;÷];false;$getServerVar[calc]7;-1];true;$getServerVar[calc] 7;-1]]
  156.  
  157. ````````````````````````````````````````````````````````````
  158.  
  159. Command 9
  160.  
  161. Trigger: $onInteraction[8]
  162.  
  163. Type: BDSript 2
  164.  
  165. Code:
  166.  
  167. $nomention
  168. $textSplit[$getServerVar[calc]; ]
  169.  
  170. $addField[Calculator;$replaceText[$replaceText[$checkContains[$splitText[$getTextSplitLength];+;-;x;÷];false;$getServerVar[calc]8;-1];true;$getServerVar[calc] 8;-1]]
  171. $setServerVar[calc;$replaceText[$replaceText[$checkContains[$splitText[$getTextSplitLength];+;-;x;÷];false;$getServerVar[calc]8;-1];true;$getServerVar[calc] 8;-1]]
  172.  
  173. ````````````````````````````````````````````````````````````
  174. ````````````````````````````````````````````````````````````
  175.  
  176. Command 10
  177.  
  178. Trigger: $onInteraction[9]
  179.  
  180. Type: BDSript 2
  181.  
  182. Code:
  183.  
  184. $nomention
  185. $textSplit[$getServerVar[calc]; ]
  186.  
  187. $addField[Calculator;$replaceText[$replaceText[$checkContains[$splitText[$getTextSplitLength];+;-;x;÷];false;$getServerVar[calc]9;-1];true;$getServerVar[calc] 9;-1]]
  188. $setServerVar[calc;$replaceText[$replaceText[$checkContains[$splitText[$getTextSplitLength];+;-;x;÷];false;$getServerVar[calc]9;-1];true;$getServerVar[calc] 9;-1]]
  189.  
  190. ````````````````````````````````````````````````````````````
  191. ````````````````````````````````````````````````````````````
  192.  
  193. Command 11
  194.  
  195. Trigger: $onInteraction[0]
  196.  
  197. Type: BDSript 2
  198.  
  199. Code:
  200.  
  201. $nomention
  202. $textSplit[$getServerVar[calc]; ]
  203.  
  204. $addField[Calculator;$replaceText[$replaceText[$checkCondition[$splitText[$getTextSplitLength]==0];true;$getServerVar[calc];-1];false;$replaceText[$replaceText[$checkContains[$splitText[$getTextSplitLength];+;-;x;÷];false;$getServerVar[calc]0;-1];true;$getServerVar[calc] 0;-1];-1]]
  205. $setServerVar[calc;$replaceText[$replaceText[$checkCondition[$splitText[$getTextSplitLength]==0];true;$getServerVar[calc];-1];false;$replaceText[$replaceText[$checkContains[$splitText[$getTextSplitLength];+;-;x;÷];false;$getServerVar[calc]0;-1];true;$getServerVar[calc] 0;-1];-1]]
  206.  
  207. ````````````````````````````````````````````````````````````
  208. ````````````````````````````````````````````````````````````
  209.  
  210. Command 12
  211.  
  212. Trigger: $onInteraction[00]
  213.  
  214. Type: BDSript 2
  215.  
  216. Code:
  217.  
  218. $nomention
  219. $textSplit[$getServerVar[calc]; ]
  220.  
  221. $addField[Calculator;$replaceText[$replaceText[$checkCondition[$splitText[$getTextSplitLength]==0];true;$getServerVar[calc];-1];false;$replaceText[$replaceText[$checkContains[$splitText[$getTextSplitLength];+;-;x;÷];false;$getServerVar[calc]00;-1];true;$getServerVar[calc] 0;-1];-1]]
  222. $setServerVar[calc;$replaceText[$replaceText[$checkCondition[$splitText[$getTextSplitLength]==0];true;$getServerVar[calc];-1];false;$replaceText[$replaceText[$checkContains[$splitText[$getTextSplitLength];+;-;x;÷];false;$getServerVar[calc]00;-1];true;$getServerVar[calc] 0;-1];-1]]
  223.  
  224. ````````````````````````````````````````````````````````````
  225. ````````````````````````````````````````````````````````````
  226.  
  227. Command 13
  228.  
  229. Trigger: $onInteraction[000]
  230.  
  231. Type: BDSript 2
  232.  
  233. Code:
  234.  
  235. $nomention
  236. $textSplit[$getServerVar[calc]; ]
  237.  
  238. $addField[Calculator;$replaceText[$replaceText[$checkCondition[$splitText[$getTextSplitLength]==0];true;$getServerVar[calc];-1];false;$replaceText[$replaceText[$checkContains[$splitText[$getTextSplitLength];+;-;x;÷];false;$getServerVar[calc]000;-1];true;$getServerVar[calc] 0;-1];-1]]
  239. $setServerVar[calc;$replaceText[$replaceText[$checkCondition[$splitText[$getTextSplitLength]==0];true;$getServerVar[calc];-1];false;$replaceText[$replaceText[$checkContains[$splitText[$getTextSplitLength];+;-;x;÷];false;$getServerVar[calc]000;-1];true;$getServerVar[calc] 0;-1];-1]]
  240.  
  241. ````````````````````````````````````````````````````````````
  242. ````````````````````````````````````````````````````````````
  243.  
  244. Command 14
  245.  
  246. Trigger: $onInteraction[/]
  247.  
  248. Type: BDSript 2
  249.  
  250. Code:
  251.  
  252. $nomention
  253. $textSplit[$getServerVar[calc]; ]
  254. $onlyIf[$checkContains[$splitText[$getTextSplitLength];+;-;x;÷]==false;You already have an operator at the end that is $splitText[$getTextSplitLength]]
  255. $addField[Calculator;$getServerVar[calc] ÷]
  256. $setServerVar[calc;$getServerVar[calc] ÷]
  257.  
  258. ````````````````````````````````````````````````````````````
  259. ````````````````````````````````````````````````````````````
  260.  
  261. Command 15
  262.  
  263. Trigger: $onInteraction[x]
  264.  
  265. Type: BDSript 2
  266.  
  267. Code:
  268.  
  269. $nomention
  270. $textSplit[$getServerVar[calc]; ]
  271. $onlyIf[$checkContains[$splitText[$getTextSplitLength];+;-;x;÷]==false;You already have an operator at the end that is $splitText[$getTextSplitLength]]
  272. $addField[Calculator;$getServerVar[calc] x]
  273. $setServerVar[calc;$getServerVar[calc] x]
  274.  
  275. ````````````````````````````````````````````````````````````
  276.  
  277. Command 16
  278.  
  279. Trigger: $onInteraction[+]
  280.  
  281. Type: BDSript 2
  282.  
  283. Code:
  284.  
  285. $nomention
  286. $textSplit[$getServerVar[calc]; ]
  287. $onlyIf[$checkContains[$splitText[$getTextSplitLength];+;-;x;÷]==false;You already have an operator at the end that is $splitText[$getTextSplitLength]]
  288. $addField[Calculator;$getServerVar[calc] +]
  289. $setServerVar[calc;$getServerVar[calc] +]
  290.  
  291. ````````````````````````````````````````````````````````````
  292. ````````````````````````````````````````````````````````````
  293.  
  294. Command 17
  295.  
  296. Trigger: $onInteraction[-]
  297.  
  298. Type: BDSript 2
  299.  
  300. Code:
  301.  
  302. $nomention
  303. $textSplit[$getServerVar[calc]; ]
  304. $onlyIf[$checkContains[$splitText[$getTextSplitLength];+;-;x;÷]==false;You already have an operator at the end that is $splitText[$getTextSplitLength]]
  305. $addField[Calculator;$getServerVar[calc] -]
  306. $setServerVar[calc;$getServerVar[calc] -]
  307.  
  308. ````````````````````````````````````````````````````````````
  309.  
  310. Command 18
  311.  
  312. Trigger: $onInteraction[=]
  313.  
  314. Type: BDSript 2
  315.  
  316. Code:
  317.  
  318. $nomention
  319. $onlyIf[$checkContains[$getServerVar[calc];+;-;x;÷]==true;you haven’t chosen any operator in your calculation yet please choose one]
  320. $textSplit[$getServerVar[calc]; ]
  321. $onlyIf[$checkContains[$splitText[$getTextSplitLength];+;-;x;÷]==false;Your calculation ends with an operator which kinda doesn’t make any sense]
  322. $addField[Calculator;$getServerVar[calc] = $calculate[$replaceText[$replaceText[$getServerVar[calc];x;*;-1];÷;/;-1]]]
  323. $setServerVar[calc;$calculate[$replaceText[$replaceText[$getServerVar[calc];x;*;-1];÷;/;-1]]]
  324.  
  325. ````````````````````````````````````````````````````````````
  326. ````````````````````````````````````````````````````````````
  327.  
  328. Command 19
  329.  
  330. Trigger: $onInteraction[ac]
  331.  
  332. Type: BDSript 2
  333.  
  334. Code:
  335.  
  336. $nomention
  337. $resetServerVar[calc]
  338. $addField[Calculator;$getServerVar[calc]]
  339.  
  340. ````````````````````````````````````````````````````````````
  341. ````````````````````````````````````````````````````````````
  342.  
  343. Command 20
  344.  
  345. Trigger: $onInteraction[<]
  346.  
  347. Type: BDSript 2
  348.  
  349. Code:
  350.  
  351. $nomention
  352.  
  353. $textSplit[$getServerVar[calc];]
  354.  
  355. $removeSplitTextElement[$getTextSplitLength]
  356.  
  357. $addField[Calculator;$joinSplitText[]]
  358. $setServerVar[calc;$joinSplitText[]]
  359.  
  360. CONGRATS, YOU'VE MADE IT TO THE END!hope you didnt get bored lol
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement