Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $c[MADE BY iamnotjamesbg]
- $c[Advanced Highlow command with buttons ORIGINAL IDEA]
- $c[Used $try blocks to delete cooldowns, cool right?]
- $c[Took me hours to make this]
- $c[VARS NEEDED
- money=0
- betAmount=0
- playerRoll=empty]
- $c[OR replace all the vars with your money var!]
- $c[======CODE 1======]
- BDScript 2
- Trigger: <prefix>highlow <bet>
- Code:
- $nomention
- $suppressErrors
- $try
- $cooldown[15s;]
- $catch
- $var[cooldown;$sendMessage[$randomText[
- ⏳ Hold on! Wait **<t:$sum[$getTimestamp;$getCooldown[normal]]:R>** before playing again!;
- ⏳ Chill out! You can play again in **<t:$sum[$getTimestamp;$getCooldown[normal]]:R>**.;
- ⏳ Take it easy! You’ll be able to play again in **<t:$sum[$getTimestamp;$getCooldown[normal]]:R>**.;
- ⏳ Patience, my friend! **<t:$sum[$getTimestamp;$getCooldown[normal]]:R>** until you can play again!;
- ⏳ Hold up! Wait for **<t:$sum[$getTimestamp;$getCooldown[normal]]:R>** before trying again.;
- ⏳ Don’t rush! You have to wait **<t:$sum[$getTimestamp;$getCooldown[normal]]:R>** to play again!
- ];yes]]
- $replyIn[$getCooldown[normal]]
- $deleteMessage[$channelID;$var[cooldown]]
- $stop
- $endtry
- $argsCheck[>1;🚫 Please bet **atleast** something!]
- $onlyIf[$isNumber[$replaceText[$message;all;$getUserVar[money;$authorID];1]]==true;🚫 **$message** is not a valid number!]
- $onlyIf[$replaceText[$message;all;$getUserVar[money;$authorID];1]>=1;🚫 The minimum bet amount is 1!]
- $onlyIf[$replaceText[$message;all;$getUserVar[money;$authorID];1]<=$getUserVar[money;$authorID];🚫 You don’t have enough coins!]
- $if[$message==all]
- $var[betAmount;$min[$getUserVar[money;$authorID];200000]]
- $else
- $var[betAmount;$min[$message;200000]]
- $endif
- $setUserVar[money;$sub[$getUserVar[money;$authorID];$var[betAmount]];$authorID]
- $var[playerRoll;$random[26;86]]
- $setVar[playerRoll;$var[playerRoll];$authorID]
- $setVar[betAmount;$var[betAmount];$authorID]
- $var[diceRoll;$random[2;101]]
- $title[🎲 $username's High/Low Game]
- $addField[Your Guess;$var[playerRoll];yes]
- $addField[Dice Roll;?;yes]
- $addButton[yes;high;⏫;secondary;no;]
- $addButton[no;low;⏬;secondary;no;]
- $color[00ff00]
- $footer[Requested by $username | Your Bet: $numberSeparator[$var[betAmount]] Coins]
- $c[======CODE 2======]
- BDScript 2
- Trigger: $onInteraction[high]
- Code:
- $c[I added a lostChance cuz BDFD's random is so easy to predict LOL]
- $c[You can change the lostChance percentage inside if conditions, if you want!]
- $nomention
- $suppressErrors
- $var[betAmount;$getVar[betAmount;$authorID]]
- $var[playerRoll;$getVar[playerRoll;$authorID]]
- $var[lostChance;$random[1;101]]
- $if[$var[lostChance]<=70]
- $var[diceRoll;$random[2;$sub[$var[playerRoll];1]]]
- $else
- $var[diceRoll;$random[$sum[$var[playerRoll];1];101]]
- $endif
- $if[$var[diceRoll]>$var[playerRoll]]
- $setUserVar[money;$sum[$getUserVar[money;$authorID];$multi[$var[betAmount];2]];$authorID]
- $title[🎲 $username's High/Low Game]
- $addField[Your Guess;$var[playerRoll];yes]
- $addField[Dice Roll;$var[diceRoll];yes]
- $addField[You win!;The dice roll was higher;no]
- $footer[Requested by $username | You won: $numberSeparator[$var[betAmount]] Coins!]
- $color[00ff00]
- $editButton[high;⏫;success;yes;]
- $editButton[low;⏬;secondary;yes;]
- $elseif[$var[diceRoll]==$var[playerRoll]]
- $setUserVar[money;$sum[$getUserVar[money;$authorID];$var[betAmount]];$authorID]
- $title[🎲 $username's High/Low Game]
- $addField[Your Guess;$var[playerRoll];yes]
- $addField[Dice Roll;$var[diceRoll];yes]
- $addField[It's a tie!;The dice roll matched your guess;no]
- $footer[Requested by $username | You get your bet back: $numberSeparator[$var[betAmount]] Coins!]
- $color[FFFF00]
- $editButton[high;⏫;secondary;yes;]
- $editButton[low;⏬;secondary;yes;]
- $else
- $title[🎲 $username's High/Low Game]
- $addField[Your Guess;$var[playerRoll];yes]
- $addField[Dice Roll;$var[diceRoll];yes]
- $addField[You lose!;The dice roll was lower;no]
- $footer[Requested by $username | You lost: $numberSeparator[$var[betAmount]] Coins!]
- $color[FF0000]
- $editButton[high;⏫;danger;yes;]
- $editButton[low;⏬;secondary;yes;]
- $endif
- $c[======CODE 3======]
- Trigger: $onInteraction[low]
- BDScript 2
- Code:
- $c[I also added a lostChance in here cuz BDFD's random is so easy to predict LOL]
- $c[You can change the lostChance percentage inside if conditions, if you want!]
- $nomention
- $suppressErrors
- $var[betAmount;$getVar[betAmount;$authorID]]
- $var[playerRoll;$getVar[playerRoll;$authorID]]
- $var[lostChance;$random[1;101]]
- $if[$var[lostChance]<=70]
- $var[diceRoll;$random[$sum[$var[playerRoll];1];101]]
- $else
- $var[diceRoll;$random[2;$sub[$var[playerRoll];1]]]
- $endif
- $if[$var[diceRoll]<$var[playerRoll]]
- $setUserVar[money;$sum[$getUserVar[money;$authorID];$multi[$var[betAmount];2]];$authorID]
- $title[🎲 $username's High/Low Game]
- $addField[Your Guess;$var[playerRoll];yes]
- $addField[Dice Roll;$var[diceRoll];yes]
- $addField[You win!;The dice roll was lower;no]
- $footer[Requested by $username | You won: $numberSeparator[$var[betAmount]] Coins!]
- $color[00ff00]
- $editButton[high;⏫;secondary;yes;]
- $editButton[low;⏬;success;yes;]
- $elseif[$var[diceRoll]==$var[playerRoll]]
- $setUserVar[money;$sum[$getUserVar[money;$authorID];$var[betAmount]];$authorID]
- $title[🎲 $username's High/Low Game]
- $addField[Your Guess;$var[playerRoll];yes]
- $addField[Dice Roll;$var[diceRoll];yes]
- $addField[It's a tie!;The dice roll matched your guess;no]
- $footer[Requested by $username | You get your bet back: $numberSeparator[$var[betAmount]] Coins!]
- $color[FFFF00]
- $editButton[high;⏫;secondary;yes;]
- $editButton[low;⏬;secondary;yes;]
- $else
- $title[🎲 $username's High/Low Game]
- $addField[Your Guess;$var[playerRoll];yes]
- $addField[Dice Roll;$var[diceRoll];yes]
- $addField[You lose!;The dice roll was higher;no]
- $footer[Requested by $username | You lost: $numberSeparator[$var[betAmount]] Coins!]
- $color[FF0000]
- $editButton[high;⏫;secondary;yes;]
- $editButton[low;⏬;danger;yes;]
- $endif
- $c[======END OF CODE======]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement