SellingScripts

Untitled

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