Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var config = {};
- //For BustABit
- //1.32x Script by SellingScripts
- //You can change these variables:
- var wageredBits = 5000;
- var maxLosses = 12;
- var risingBetPercentage = 1;
- var baseCashout = 1.32;
- var maxBet = 3000;
- var currentBet;//used in determining what the current bet amount is
- var currentCashout = baseCashout;//used in determining what the current cashout is
- //var stopScriptOnLoss = true;//will stop the script in the event of "maxLosses" losses in a row
- var playing = false;//will delay initial start by one game so that if script is ran between 'game_started' and 'game_crash' phase
- //it will not prematurly increase bet if busts below "currentCashout"
- var lossStreak = 0;//number of losses in a row
- var userBalance = userInfo.balance/100;//the users balance
- //used to determine if all user set variables were set to values that make sense
- function idiotTest(){
- if(userBalance<wageredBits)
- stop("wageredBits is higher than your balance");
- if(maxLosses<3 || maxLosses>20)
- stop("use a number between 3 and 20 for max losses inclusive");
- if(risingBetPercentage>1 || risingBetPercentage<0)
- stop("risingBetPercentage must be between 0 and 1 inclusive");
- }
- idiotTest();
- //calculates the base bet as determined by your maxLosses and wageredBits
- function calcBase(wagered,limit){
- var base = wagered;
- var multiplier = 1;
- if(base>maxBet)
- base = maxBet;
- for(let i=0;i<limit-1;i++){
- base = (base*multiplier)/(multiplier+1);
- }
- if(Math.floor(base)<1)
- stop("Need a min of " + 1*Math.pow(5,limit-1) + " bits to run with your parameters, and you only set wageredBits to " + wageredBits);
- return Math.floor(base);
- }
- currentBet = calcBase(wageredBits,maxLosses);
- //log("Bet " + currentBet);
- engine.on('GAME_STARTING', function() {
- if(playing){
- log("Current balance: " + userInfo.balance + " will bet " + currentBet + " at " + currentCashout);
- engine.bet(currentBet*100, currentCashout);
- }
- });
- engine.on('GAME_ENDED', function() {
- if(!playing){
- playing = true;
- log("Game start!");
- return;
- }
- if(engine.history.first().bust<currentCashout){
- currentCashout = 2;
- if(lossStreak==0)
- currentBet *= 2;
- else
- currentBet *= 2;
- lossStreak++;
- log("LOST: new bet is " + currentBet + " new cashout is " + currentCashout);
- }
- else{
- currentBet = calcBase(Math.floor(wageredBits),maxLosses);
- currentCashout = baseCashout;
- lossStreak = 0;
- if(risingBetPercentage!=0){
- wageredBits = initialWagered;
- var newBal = parseFloat((userInfo.balance/100-userBalance).toFixed(2));
- wageredBits += newBal*risingBetPercentage
- currentBet = calcBase(Math.floor(wageredBits),maxLosses);
- }
- log("WON: "+ "new bet is " + currentBet + " new cashout is " + currentCashout);
- }
- if(lossStreak==maxLosses){
- stop("Max Losses reached");
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment