Advertisement
IamnotJamesBG

Advanced Highlow Command (WITH BUTTONS + BET)

Apr 21st, 2025 (edited)
988
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 6.16 KB | None | 1 0
  1. $c[MADE BY iamnotjamesbg]
  2. $c[Advanced Highlow command with buttons ORIGINAL IDEA]
  3. $c[Used $try blocks to delete cooldowns, cool right?]
  4. $c[Took me hours to make this]
  5. $c[VARS NEEDED
  6. money=0
  7. betAmount=0
  8. playerRoll=empty]
  9. $c[OR replace all the vars with your money var!]
  10.  
  11. $c[======CODE 1======]
  12. BDScript 2
  13. Trigger: <prefix>highlow <bet>
  14. Code:
  15. $nomention
  16. $suppressErrors
  17. $try
  18. $cooldown[15s;]
  19. $catch
  20. $var[cooldown;$sendMessage[$randomText[
  21. ⏳ Hold on! Wait **<t:$sum[$getTimestamp;$getCooldown[normal]]:R>** before playing again!;
  22. ⏳ Chill out! You can play again in **<t:$sum[$getTimestamp;$getCooldown[normal]]:R>**.;
  23. ⏳ Take it easy! You’ll be able to play again in **<t:$sum[$getTimestamp;$getCooldown[normal]]:R>**.;
  24. ⏳ Patience, my friend! **<t:$sum[$getTimestamp;$getCooldown[normal]]:R>** until you can play again!;
  25. ⏳ Hold up! Wait for **<t:$sum[$getTimestamp;$getCooldown[normal]]:R>** before trying again.;
  26. ⏳ Don’t rush! You have to wait **<t:$sum[$getTimestamp;$getCooldown[normal]]:R>** to play again!
  27. ];yes]]
  28. $replyIn[$getCooldown[normal]]
  29. $deleteMessage[$channelID;$var[cooldown]]
  30. $stop
  31. $endtry
  32. $argsCheck[>1;🚫 Please bet **atleast** something!]
  33. $onlyIf[$isNumber[$replaceText[$message;all;$getUserVar[money;$authorID];1]]==true;🚫 **$message** is not a valid number!]
  34. $onlyIf[$replaceText[$message;all;$getUserVar[money;$authorID];1]>=1;🚫 The minimum bet amount is 1!]
  35. $onlyIf[$replaceText[$message;all;$getUserVar[money;$authorID];1]<=$getUserVar[money;$authorID];🚫 You don’t have enough coins!]
  36.  
  37. $if[$message==all]
  38.   $var[betAmount;$min[$getUserVar[money;$authorID];200000]]
  39. $else
  40.   $var[betAmount;$min[$message;200000]]
  41. $endif
  42.  
  43. $setUserVar[money;$sub[$getUserVar[money;$authorID];$var[betAmount]];$authorID]
  44. $var[playerRoll;$random[26;86]]
  45.  
  46. $setVar[playerRoll;$var[playerRoll];$authorID]
  47. $setVar[betAmount;$var[betAmount];$authorID]
  48. $var[diceRoll;$random[2;101]]
  49.  
  50. $title[🎲 $username's High/Low Game]
  51. $addField[Your Guess;$var[playerRoll];yes]
  52. $addField[Dice Roll;?;yes]
  53. $addButton[yes;high;⏫;secondary;no;]
  54. $addButton[no;low;⏬;secondary;no;]
  55. $color[00ff00]
  56. $footer[Requested by $username | Your Bet: $numberSeparator[$var[betAmount]] Coins]
  57.  
  58. $c[======CODE 2======]
  59. BDScript 2
  60. Trigger: $onInteraction[high]
  61. Code:
  62. $c[I added a lostChance cuz BDFD's random is so easy to predict LOL]
  63. $c[You can change the lostChance percentage inside if conditions, if you want!]
  64. $nomention
  65. $suppressErrors
  66. $var[betAmount;$getVar[betAmount;$authorID]]  
  67. $var[playerRoll;$getVar[playerRoll;$authorID]]  
  68. $var[lostChance;$random[1;101]]  
  69.  
  70. $if[$var[lostChance]<=70]
  71.     $var[diceRoll;$random[2;$sub[$var[playerRoll];1]]]
  72. $else
  73.     $var[diceRoll;$random[$sum[$var[playerRoll];1];101]]
  74. $endif
  75.  
  76. $if[$var[diceRoll]>$var[playerRoll]]  
  77.     $setUserVar[money;$sum[$getUserVar[money;$authorID];$multi[$var[betAmount];2]];$authorID]  
  78.     $title[🎲 $username's High/Low Game]  
  79.    $addField[Your Guess;$var[playerRoll];yes]  
  80.    $addField[Dice Roll;$var[diceRoll];yes]  
  81.    $addField[You win!;The dice roll was higher;no]  
  82.    $footer[Requested by $username | You won: $numberSeparator[$var[betAmount]] Coins!]  
  83.    $color[00ff00]  
  84.    $editButton[high;⏫;success;yes;]
  85.    $editButton[low;⏬;secondary;yes;]
  86. $elseif[$var[diceRoll]==$var[playerRoll]]  
  87.    $setUserVar[money;$sum[$getUserVar[money;$authorID];$var[betAmount]];$authorID]  
  88.    $title[🎲 $username's High/Low Game]  
  89.     $addField[Your Guess;$var[playerRoll];yes]  
  90.     $addField[Dice Roll;$var[diceRoll];yes]  
  91.     $addField[It's a tie!;The dice roll matched your guess;no]  
  92.    $footer[Requested by $username | You get your bet back: $numberSeparator[$var[betAmount]] Coins!]  
  93.    $color[FFFF00]  
  94.    $editButton[high;⏫;secondary;yes;]
  95.    $editButton[low;⏬;secondary;yes;]
  96. $else  
  97.    $title[🎲 $username's High/Low Game]  
  98.     $addField[Your Guess;$var[playerRoll];yes]  
  99.     $addField[Dice Roll;$var[diceRoll];yes]  
  100.     $addField[You lose!;The dice roll was lower;no]  
  101.     $footer[Requested by $username | You lost: $numberSeparator[$var[betAmount]] Coins!]  
  102.     $color[FF0000]  
  103.     $editButton[high;;danger;yes;]
  104.     $editButton[low;;secondary;yes;]
  105. $endif
  106. $c[======CODE 3======]
  107. Trigger: $onInteraction[low]
  108. BDScript 2
  109. Code:
  110. $c[I also added a lostChance in here cuz BDFD's random is so easy to predict LOL]
  111. $c[You can change the lostChance percentage inside if conditions, if you want!]
  112. $nomention
  113. $suppressErrors
  114. $var[betAmount;$getVar[betAmount;$authorID]]
  115. $var[playerRoll;$getVar[playerRoll;$authorID]]
  116. $var[lostChance;$random[1;101]]
  117. $if[$var[lostChance]<=70]
  118.    $var[diceRoll;$random[$sum[$var[playerRoll];1];101]]
  119. $else
  120.    $var[diceRoll;$random[2;$sub[$var[playerRoll];1]]]
  121. $endif
  122. $if[$var[diceRoll]<$var[playerRoll]]
  123.    $setUserVar[money;$sum[$getUserVar[money;$authorID];$multi[$var[betAmount];2]];$authorID]
  124.    $title[🎲 $username's High/Low Game]
  125.     $addField[Your Guess;$var[playerRoll];yes]
  126.     $addField[Dice Roll;$var[diceRoll];yes]
  127.     $addField[You win!;The dice roll was lower;no]
  128.     $footer[Requested by $username | You won: $numberSeparator[$var[betAmount]] Coins!]
  129.     $color[00ff00]
  130.     $editButton[high;;secondary;yes;]
  131.     $editButton[low;;success;yes;]
  132. $elseif[$var[diceRoll]==$var[playerRoll]]
  133.     $setUserVar[money;$sum[$getUserVar[money;$authorID];$var[betAmount]];$authorID]
  134.     $title[🎲 $username's High/Low Game]
  135.    $addField[Your Guess;$var[playerRoll];yes]
  136.    $addField[Dice Roll;$var[diceRoll];yes]
  137.    $addField[It's a tie!;The dice roll matched your guess;no]
  138.     $footer[Requested by $username | You get your bet back: $numberSeparator[$var[betAmount]] Coins!]
  139.     $color[FFFF00]
  140.     $editButton[high;;secondary;yes;]
  141.     $editButton[low;;secondary;yes;]
  142. $else
  143.     $title[🎲 $username's High/Low Game]
  144.    $addField[Your Guess;$var[playerRoll];yes]
  145.    $addField[Dice Roll;$var[diceRoll];yes]
  146.    $addField[You lose!;The dice roll was higher;no]
  147.    $footer[Requested by $username | You lost: $numberSeparator[$var[betAmount]] Coins!]
  148.    $color[FF0000]
  149.    $editButton[high;⏫;secondary;yes;]
  150.    $editButton[low;⏬;danger;yes;]
  151. $endif
  152. $c[======END OF CODE======]
Tags: BDFD
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement