SellingScripts

Untitled

Jan 9th, 2019
186
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 (skipAfterGreen >= maxSkipAfterGreen) {
  50. currentBet = lastBet;
  51. losestreak = 0;
  52. isAfterGreen = true;
  53. log("We will resume. There has been " + config.maxSkipAfterGreen.value + " greens.");
  54. log("Gay 13");
  55. } else if (isAfterGreen) {
  56. engine.bet(roundBit(currentBet), config.secondCrashTarget.value);
  57. skipAfterGreen = 0;
  58. log("Betting: " + roundBit(currentBet) / 100 + " bits");
  59. log("Gay 1");
  60. } else {
  61. engine.bet(roundBit(currentBet), config.crashTarget.value);
  62. log("Betting: " + roundBit(currentBet) / 100 + " bits");
  63. log("Gay 2");
  64. }
  65. }
  66.  
  67. //Game Ending Event
  68. function ongameend() {
  69. var lastGame = engine.history.first()
  70.  
  71. // Xgames counter
  72. if (lastGame.bust < config.underXgames.value) {
  73. Xgames++;
  74. } else {
  75. Xgames = 0;
  76. }
  77.  
  78. // Did we bet last round?
  79. if (lastGame.wager) {
  80. //We Won
  81. if (lastGame.cashedAt) {
  82. currentBet = 0;
  83. lastBet = 0;
  84. isAfterGreen = false;
  85. losestreak = 0;
  86. log("We won, cashed at: " + lastGame.cashedAt + "x");
  87. log("Gay 5");
  88. } else {
  89. losestreak++;
  90. log("We lost!");
  91. log("Gay 6");
  92. if (losestreak >= maxLosestreak) {
  93. if (isLosestreak === false) {
  94. lastBet = currentBet;
  95. log("Gay 7");
  96. }
  97. currentBet = 0;
  98. isLosestreak = true;
  99. log("We will pause. Maximum of " + maxLosestreak + " losses reached.");
  100. log("Gay 8");
  101. } else {
  102. if (isAfterGreen) {
  103. currentBet *= config.secondMultiOnloss.value;
  104. isLosestreak = false;
  105. log('We lost. Betting', roundBit(currentBet) / 100, 'next round');
  106. log("Gay 9");
  107. } else {
  108. currentBet *= config.multiOnloss.value;
  109. isLosestreak = false;
  110. log('We lost. Betting', roundBit(currentBet) / 100, 'next round');
  111. log("Gay 10");
  112. }
  113. }
  114. }
  115. } else {
  116. if (isLosestreak === true && roundCounter !== 0) {
  117. if (lastGame.bust >= 2) {
  118. skipAfterGreen++;
  119. log("Gay 12");
  120. losestreak = 0;
  121. log('The red streak ended, waiting for ' + maxSkipAfterGreen + ' greens before betting. ' + skipAfterGreen);
  122. }
  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