rajat_cj

BDFD • Tetris

Jun 8th, 2022 (edited)
1,190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 4.21 KB | None | 0 0
  1. "TETRIS for BDFD
  2. - Game by Rajat#1004
  3. - API by reset#8278
  4.  
  5.  
  6. Variable 1
  7. --------------------------------------------------------------------------------
  8. Name : tetris
  9. Value : {blank}
  10.  
  11.  
  12.  
  13. Code 1
  14. --------------------------------------------------------------------------------
  15. Trigger : ?tetris
  16. Language : BDScript 2
  17. Code :
  18. "
  19.  
  20. $nomention
  21. $description[
  22. **Score : **0
  23. ⬜$repeatMessage[10;⬛]
  24. ⬜$repeatMessage[10;⬛]
  25. ⬜$repeatMessage[10;⬛]
  26. ⬜$repeatMessage[10;⬛]
  27. ⬜$repeatMessage[10;⬛]
  28. ⬜$repeatMessage[10;⬛]
  29. ⬜$repeatMessage[10;⬛]
  30. ⬜$repeatMessage[10;⬛]
  31. ⬜$repeatMessage[10;⬛]
  32. ⬜$repeatMessage[10;⬛]
  33. ⬜$repeatMessage[10;⬛]
  34. ⬜$repeatMessage[10;⬛]
  35. ⬜$repeatMessage[10;⬛]
  36. ⬜$repeatMessage[10;⬛]
  37. ⬜$repeatMessage[10;⬛]
  38. ⬜$repeatMessage[10;⬜]]
  39. $color[ff8888]
  40. $title[Tetris]
  41. $footer[$username is playing]
  42. $addButton[no;$authorIDtetrisstart;Start;primary;no;]
  43.  
  44.  
  45.  
  46. "
  47. Code 2
  48. --------------------------------------------------------------------------------
  49. Trigger : $onInteraction
  50. Language : BDScript 2
  51. Code :
  52. "
  53.  
  54. $nomention
  55. $if[$checkContains[$customID;tetris]==true]
  56. $var[S;https://cdn.discordapp.com/attachments/837219640874631197/984092775962279966/unknown.png]
  57. $var[Z;https://cdn.discordapp.com/attachments/837219640874631197/984092615643385886/unknown.png]
  58. $var[L;https://cdn.discordapp.com/attachments/837219640874631197/984092585394053210/unknown.png]
  59. $var[T;https://cdn.discordapp.com/attachments/837219640874631197/984092789212078110/unknown.png]
  60. $var[O;https://cdn.discordapp.com/attachments/837219640874631197/984092577106116638/unknown.png]
  61. $var[I;https://cdn.discordapp.com/attachments/837219640874631197/984092603769298944/unknown.png]
  62. $var[J;https://cdn.discordapp.com/attachments/837219640874631197/984092594151768124/unknown.png]
  63. $if[$checkContains[$customID;$authorID]==true]
  64. $if[$checkContains[$customID;$authorIDtetrisstart]==true]
  65. $httpPost[https://api.resetxd.xyz/game/tetris/create;{}]
  66. $setUserVar[tetris;$httpResult[game_id]@tet@$messageID;$authorID]
  67. $description[
  68. **Score : **$httpResult[score]
  69. ⬜$replaceText[$replaceText[$replaceText[$httpResult[board];⬛;🔲;-1];⬜;⬛;-1];$c[‼️‼️‼️‼️ Delete all the spaces after this comment if any ‼️‼️ 1/3]
  70. ;⬜
  71. ⬜;-1]
  72. ⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜]
  73. $color[ff8888]
  74. $title[Tetris]
  75. $thumbnail[$var[$httpResult[next]]]
  76. $footer[$username is playing.]
  77. $removeButtons
  78. $addButton[no;$authorIDtetrisleft;;secondary;no;⏪]
  79. $addButton[no;$authorIDtetrishard_drop;;primary;no;⏬]
  80. $addButton[no;$authorIDtetrisright;;secondary;no;⏩]
  81. $addButton[no;$authorIDtetrisrotate;;danger;no;🔁]
  82. $addButton[no;$authorIDtetrissoft_drop;;secondary;no;🔽]
  83. $addButton[yes;$authorIDtetrisswap;;secondary;no;🔀]
  84. $addButton[no;$authorIDtetrishold;;secondary;no;⏸️]
  85. $else
  86. $textSplit[$getUserVar[tetris;$authorID];@tet@]
  87. $if[$splitText[2]==$messageID]
  88. $httpPost[https://api.resetxd.xyz/game/tetris/action;{
  89.   "game_id": "$splitText[1]",
  90.   "action": "$replaceText[$customID;$authorIDtetris;;1]"}]
  91.  
  92.  
  93. $if[$httpResult[win]==False]
  94. $thumbnail[$var[$httpResult[next]]]
  95. $description[
  96. **Score : **$round[$httpResult[score];0]    
  97. ⬜$replaceText[$replaceText[$replaceText[$httpResult[board];⬛;🔲;-1];⬜;⬛;-1];$c[‼️‼️‼️‼️ Delete all the spaces after this comment if any ‼️‼️ 2/3]
  98. ;⬜
  99. ⬜;-1]
  100. ⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜]
  101. $color[ff8888]
  102. $title[Tetris]
  103. $footer[$username, Game ended.]
  104. $sendMessage[‼️ Game ended, your score was $round[$httpResult[score];0]]
  105. $removeButtons
  106. $addButton[no;$authorIDtetrisstart;Play Again;primary;no;]
  107. $else
  108. $thumbnail[$var[$httpResult[next]]]
  109. $description[
  110. **Score : **$round[$httpResult[score];0]    
  111. ⬜$replaceText[$replaceText[$replaceText[$httpResult[board];⬛;🔲;-1];⬜;⬛;-1];$c[‼️‼️‼️‼️ Delete all the spaces after this comment if any ‼️‼️ 3/3]
  112. ;⬜
  113. ⬜;-1]
  114. ⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜]
  115. $color[ff8888]
  116. $title[Tetris]
  117. $footer[$username is playing.]
  118. $endif
  119. $else
  120. $removeButtons
  121. $ephemeral
  122. ⏰ This game is **Expired**!
  123. $endif
  124. $endif
  125. $else
  126. $removeButtons
  127. $ephemeral
  128. ‼️ This not your game!
  129. $endif
  130. $endif
  131.  
Add Comment
Please, Sign In to add comment