SellingScripts

Untitled

Jan 8th, 2019
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.93 KB | None | 0 0
  1. var config = {
  2. msg: { type: 'noop', label: '-- Created By SellingScripts --' },
  3. baseBet: { value: 10000, type: 'balance', label: 'Base Bet' },
  4. crashTarget: { value: 5, type: 'multiplier', label: 'Cash Out' },
  5. multiOnloss: { value: 1.25, type: 'multiplier', label: 'Increase on Loss - First Cash Out' },
  6. playafterXgames: { value: 5, type: 'multiplier', label: 'Only Play After X Games' },
  7. underXgames: { value: 5, type: 'multiplier', label: 'Only Play After X Games UNDER this multiplier' },
  8. maxLosestreak1: { value: 2, type: 'text', label: 'Number of Reds Before Pausing' },
  9. maxSkipAfterGreen1: { value: 2, type: 'text', label: 'Number of Greens Before Resuming' },
  10. secondCrashTarget1: { value: 3, type: 'text', label: 'New Cash Out After Resuming' },
  11. secondMultiOnLoss1: { value: 1.6, type: 'text', label: 'Increase on Loss - Second Cash Out' },
  12. };
  13.  
  14. log('Script is running..');
  15. log('Welcome! Your balance is ' + userInfo.balance / 100 + ' bits!');
  16. log('Good Luck =)');
  17.  
  18.  
  19.  
  20. var maxLosestreak = parseFloat(config.maxLosestreak1.value);
  21. var maxSkipAfterGreen = parseFloat(config.maxSkipAfterGreen1.value);
  22. var secondCrashTarget = parseFloat(config.secondCrashTarget1.value);
  23. var secondMultiOnLoss = parseFloat(config.secondMultiOnLoss1.value);
  24.  
  25.  
  26.  
  27.  
  28. var lastBet;
  29.  
  30. var losestreak = 0;
  31. var skipAfterGreen = 0;
  32. var roundCounter = 0;
  33.  
  34. var isLosestreak = false;
  35. var isAfterGreen = false;
  36.  
  37.  
  38. var currentBet = 0;
  39. var Xgames = 0;
  40.  
  41.  
  42.  
  43. //Events to follow
  44. engine.on('GAME_STARTING', ongamestart);
  45. engine.on('GAME_ENDED', ongameend);
  46.  
  47. //Game Starting Event
  48. function ongamestart() {
  49. if (isAfterGreen) {
  50. engine.bet(roundBit(currentBet), config.secondCrashTarget.value);
  51. log("Betting: " + roundBit(currentBet) / 100 + " bits");
  52. log("Gay 1");
  53. } else {
  54. engine.bet(roundBit(currentBet), config.crashTarget.value);
  55. log("Betting: " + roundBit(currentBet) / 100 + " bits");
  56. log("Gay 2");
  57. }
  58. }
  59.  
  60. //Game Ending Event
  61. function ongameend() {
  62. var lastGame = engine.history.first()
  63.  
  64. // Xgames counter
  65. if (lastGame.bust < config.underXgames.value) {
  66. Xgames++;
  67. } else {
  68. Xgames = 0;
  69. }
  70.  
  71. // Did we bet last round?
  72. if (lastGame.wager) {
  73. //We Won
  74. if (lastGame.cashedAt) {
  75. currentBet = 0;
  76. lastBet = 0;
  77. isAfterGreen = false;
  78. losestreak = 0;
  79. log("We won, cashed at: " + lastGame.cashedAt + "x");
  80. log("Gay 5");
  81. } else {
  82. losestreak++;
  83. log("We lost!");
  84. log("Gay 6");
  85. if (losestreak >= maxLosestreak) {
  86. if (isLosestreak === false) {
  87. lastBet = currentBet;
  88. log("Gay 7");
  89. }
  90. currentBet = 0;
  91. isLosestreak = true;
  92. log("We will pause. Maximum of " + maxLosestreak + " losses reached.");
  93. log("Gay 8");
  94. } else {
  95. if (isAfterGreen) {
  96. currentBet *= config.secondMultiOnloss.value;
  97. isLosestreak = false;
  98. log('We lost. Betting', roundBit(currentBet) / 100, 'next round');
  99. log("Gay 9");
  100. } else {
  101. currentBet *= config.multiOnloss.value;
  102. isLosestreak = false;
  103. log('We lost. Betting', roundBit(currentBet) / 100, 'next round');
  104. log("Gay 10");
  105. }
  106. }
  107. }
  108. } else {
  109. if (isLosestreak === true && roundCounter !== 0) {
  110. if (lastGame.bust >= 2) {
  111. skipAfterGreen++;
  112. log("Gay 12");
  113. losestreak = 0;
  114. log('The red streak ended, waiting for ' + maxSkipAfterGreen + ' greens before betting. ' + skipAfterGreen);
  115. }
  116. } else if (skipAfterGreen >= maxSkipAfterGreen) {
  117. currentBet = lastBet;
  118. skipAfterGreen = 0;
  119. losestreak = 0;
  120. isAfterGreen = true;
  121. log("We will resume. There has been " + config.maxSkipAfterGreen.value + " greens.");
  122. log("Gay 13");
  123. } else {
  124. if (Xgames >= config.playafterXgames.value) {
  125. currentBet = config.baseBet.value;
  126. log('X Games target of', config.playafterXgames.value, 'has been met. Next round we will bet. ');
  127. isAfterGreen = false;
  128. losestreak = 0;
  129. log("Gay 14");
  130. } else {
  131. currentBet = 0;
  132. log('X Games count', Xgames);
  133. losestreak = 0;
  134. log("Gay 15");
  135. }
  136. }
  137. }
  138. roundCounter++;
  139. }
  140.  
  141. //Math Rounding Function
  142. function roundBit(bet) {
  143. return Math.round(bet / 100) * 100;
  144. }
Advertisement
Add Comment
Please, Sign In to add comment