SHARE
TWEET

script

a guest May 19th, 2019 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var config = {   iks: { value: '5', type: 'number', label: 'after x losses' },
  2. igrek: { value: '3', type: 'number', label: 'skip y rounds' },
  3. };
  4.  var iks = parseInt(config.iks.value);
  5.  var igrek = parseInt(config.igrek.value);
  6.  var wait = 0;
  7. var inrowlosses = 0;
  8. log('simulation begins here')
  9. //For BustABit
  10. //1.25x Script
  11.  
  12. //You can change these variables:
  13. var wageredBits = 25;//the total amount of bits to allow this script to bet with
  14. var maxLosses = 3;//the number of losses you can take in a row, after "maxLosses" losses the program will terminate
  15. var risingBetPercentage = .00;//percent of winnings to reinvest into betting for example if your risingBetPercentage is at .50 and
  16. //basebet comes out to 100 bits on 1.08 a win would give you 8 bits on win therefore 4 would be reinvested into raising your bets the other 4 would be safe and not used to bet
  17. //if you dont want to reinvest any set it to 0 if you want to reinvest all set it to 1
  18.  
  19. //You can change these variables but it is recommended to leave them as is:
  20. var baseCashout = 1.08;//this is the cashout that will be returned to on a win, the cashout will be variable after a loss (suggested range is 1.04x - 1.08x)
  21. var maxBet = 1000000;//
  22. //Do not change these variables:
  23. var initialWagered = wageredBits;// has to be kept track of so that when increasing wageredBits it will increase it correctly
  24. var currentBet;//used in determining what the current bet amount is
  25. var currentCashout = baseCashout;//used in determining what the current cashout is
  26. //var stopScriptOnLoss = true;//will stop the script in the event of "maxLosses" losses in a row
  27. var lossStreak = 0;//number of losses in a row
  28. var userBalance = userInfo.balance/100;//the users balance
  29. var totalWon = 0;//total profit from the script thus far
  30. var prevLoss = false;//used to determine if the last game was won or lost to figure out if wageredBits should increase
  31.  
  32. //used to determine if all user set variables were set to values that make sense
  33. function idiotTest(){
  34.     if(userBalance<wageredBits)
  35.         stop("wageredBits is higher than your balance");
  36.     if(maxLosses<3 || maxLosses>9)
  37.         stop("use a number between 3 and 9 for max losses inclusive");
  38.     if(risingBetPercentage>1 || risingBetPercentage<0)
  39.         stop("risingBetPercentage must be between 0 and 1 inclusive");
  40. }
  41. idiotTest();
  42.  
  43. //calculates the base bet as determined by your maxLosses and wageredBits
  44. function calcBase(wagered,limit){
  45.     var base = wagered;
  46.     var multiplier = 0.25;
  47.     if(base>maxBet*1.25)
  48.         base = maxBet*1.25;
  49.     for(let i=0;i<limit-1;i++){
  50.         base = (base*multiplier)/(multiplier+1);
  51.     }
  52.     if(Math.floor(base)<1)
  53.         stop("Need a min of " + 1*Math.pow(5,limit-1) + " bits to run with your parameters, and you only set wageredBits to " + wageredBits);
  54.     return Math.floor(base);
  55. }
  56. currentBet = calcBase(wageredBits,maxLosses);
  57.  
  58. engine.on('GAME_STARTING', function() {
  59.     if(wait > 0){
  60.         wait = wait - 1;
  61.         log("Waiting "+ wait +" rounds more")
  62.     }
  63.     else{
  64.     log("Current balance: " + userInfo.balance + " will bet " + currentBet + " at " + currentCashout);
  65.     engine.bet(currentBet*100, currentCashout);}
  66. });
  67.  
  68. engine.on('GAME_ENDED', function() {
  69.  
  70.     if(engine.history.first().bust<currentCashout && engine.history.first().wager!=0){
  71.        inrowlosses++;
  72.         currentCashout = 1.25;
  73.         if(lossStreak==0)
  74.             currentBet *= 4;
  75.         else
  76.             currentBet *= 5;  
  77.        
  78.         lossStreak++;
  79.         log("LOST: new bet is " + currentBet + " new cashout is " + currentCashout);
  80.         prevLoss = true;
  81.     }
  82.     else if(engine.history.first().wager==0){
  83.         log("No bets were placed");
  84.         return;
  85.     }
  86.     else{
  87.         currentBet = calcBase(Math.floor(wageredBits),maxLosses);
  88.         currentCashout = baseCashout;
  89.         lossStreak = 0;
  90.         if(risingBetPercentage!=0 && !prevLoss){
  91.             wageredBits = initialWagered;
  92.             totalWon += parseFloat((currentBet*currentCashout-currentBet).toFixed(2));
  93.             wageredBits += totalWon*risingBetPercentage;
  94.             currentBet = calcBase(Math.floor(wageredBits),maxLosses);
  95.         }
  96.         prevLoss = false;
  97.         log("WON: "+ "new bet is " + currentBet + " new cashout is " + currentCashout);
  98.     }
  99.     if(lossStreak==maxLosses){
  100.         stop("Max Losses reached");
  101.     }
  102.     if(lossStreak >= iks){
  103.       inrowlosses = 0;
  104.       wait = igrek;  
  105.  
  106.     }
  107. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top