SellingScripts

Untitled

Jan 9th, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.95 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. skipAfterGreen = 0;
  52. log("Betting: " + roundBit(currentBet) / 100 + " bits");
  53. log("Gay 1");
  54. } else {
  55. engine.bet(roundBit(currentBet), config.crashTarget.value);
  56. log("Betting: " + roundBit(currentBet) / 100 + " bits");
  57. log("Gay 2");
  58. }
  59. }
  60.  
  61. //Game Ending Event
  62. function ongameend() {
  63. var lastGame = engine.history.first()
  64.  
  65. // Xgames counter
  66. if (lastGame.bust < config.underXgames.value) {
  67. Xgames++;
  68. } else {
  69. Xgames = 0;
  70. }
  71.  
  72. // Did we bet last round?
  73. if (lastGame.wager) {
  74. //We Won
  75. if (lastGame.cashedAt) {
  76. currentBet = 0;
  77. lastBet = 0;
  78. isAfterGreen = false;
  79. losestreak = 0;
  80. log("We won, cashed at: " + lastGame.cashedAt + "x");
  81. log("Gay 5");
  82. } else {
  83. losestreak++;
  84. log("We lost!");
  85. log("Gay 6");
  86. if (losestreak >= maxLosestreak) {
  87. if (isLosestreak === false) {
  88. lastBet = currentBet;
  89. log("Gay 7");
  90. }
  91. currentBet = 0;
  92. isLosestreak = true;
  93. log("We will pause. Maximum of " + maxLosestreak + " losses reached.");
  94. log("Gay 8");
  95. } else {
  96. if (isAfterGreen) {
  97. currentBet *= config.secondMultiOnloss.value;
  98. isLosestreak = false;
  99. log('We lost. Betting', roundBit(currentBet) / 100, 'next round');
  100. log("Gay 9");
  101. } else {
  102. currentBet *= config.multiOnloss.value;
  103. isLosestreak = false;
  104. log('We lost. Betting', roundBit(currentBet) / 100, 'next round');
  105. log("Gay 10");
  106. }
  107. }
  108. }
  109. } else {
  110. if (isLosestreak === true && roundCounter !== 0) {
  111. if (lastGame.bust >= 2) {
  112. skipAfterGreen++;
  113. log("Gay 12");
  114. losestreak = 0;
  115. log('The red streak ended, waiting for ' + maxSkipAfterGreen + ' greens before betting. ' + skipAfterGreen);
  116. }
  117. } else {
  118. if (Xgames >= config.playafterXgames.value) {
  119. currentBet = config.baseBet.value;
  120. log('X Games target of', config.playafterXgames.value, 'has been met. Next round we will bet. ');
  121. isAfterGreen = false;
  122. losestreak = 0;
  123. log("Gay 14");
  124. } else {
  125. currentBet = 0;
  126. log('X Games count', Xgames);
  127. losestreak = 0;
  128. log("Gay 15");
  129. }
  130. if (skipAfterGreen >= maxSkipAfterGreen) {
  131. currentBet = lastBet;
  132. losestreak = 0;
  133. isAfterGreen = true;
  134. log("We will resume. There has been " + config.maxSkipAfterGreen.value + " greens.");
  135. log("Gay 13");
  136. }
  137. }
  138. }
  139. roundCounter++;
  140. }
  141.  
  142. //Math Rounding Function
  143. function roundBit(bet) {
  144. return Math.round(bet / 100) * 100;
  145. }
Add Comment
Please, Sign In to add comment