SHARE
TWEET

Untitled

a guest May 25th, 2019 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const min = 2;
  2. const max = 30;
  3. const minimum = 1000;
  4. const amount = 5000;
  5. const profitper = 1;
  6. const rate = 3;
  7. const arrayamount = 3;
  8. const base = 1;
  9. const rateincreasement = 0.75;
  10. const ratedecreasement = 0.005;
  11. const betlimit = 1000000;
  12. const logging = 1;
  13. const setting1 = 50000;
  14.  
  15. let currentrate = rate;
  16. let c = 0;
  17. let history = new Array(0);
  18. let target = 0;
  19. let totalloss = 0;
  20. let lossstreak = 0;
  21. let currentBet = base;
  22. let lastlost = false;
  23.  
  24. function sleep(ms) {
  25. return new Promise(resolve => setTimeout(resolve, ms));
  26. }
  27.  
  28. function insert(element, array) {
  29. array.splice(locationOf(element, array) + 1, 0, element);
  30. return array;
  31. }
  32.  
  33. function locationOf(element, array, start, end) {
  34. start = start || 0;
  35. end = end || array.length;
  36. var pivot = parseInt(start + (end - start) / 2, 10);
  37. if (end-start <= 1 || array[pivot] === element) return pivot;
  38. if (array[pivot] < element) {
  39. return locationOf(element, array, pivot, end);
  40. } else {
  41. return locationOf(element, array, start, pivot);
  42. }
  43. }
  44.  
  45. const main = async () => {
  46. await this.log("starting script");
  47. while (true) {
  48. c++;
  49. if (target > 0) {
  50. if (lastlost) {
  51. currentBet = (1/(target-1)) * (totalloss + profitper);
  52. lossstreak++;
  53. } else {
  54. currentBet = base
  55. lossstreak = 0;
  56. }
  57. const {multiplier} = await this.bet(Math.round(currentBet) * 100, target);
  58. history.unshift(multiplier);
  59. if (multiplier < target) {
  60. lastlost = true;
  61. totalloss += currentBet
  62. if (totalloss >= setting1) {
  63. currentrate += rateincreasement;
  64. }
  65. } else {
  66. if (logging) {
  67. this.log(`#${c} ${Math.max(Math.round(currentBet),1) * (target - 1)}`);
  68. }
  69. totalloss = 0;
  70. currentrate = rate;
  71. lastlost = false;
  72. }
  73. target = 0;
  74. } else {
  75. if (currentrate > rate) {
  76. currentrate -= ratedecreasement
  77. if (currentrate < rate) {
  78. currentrate = rate
  79. }
  80. }
  81. if (c%2==0) {
  82. const {multiplier} = await this.bet(100,1.01);
  83. history.unshift(multiplier);
  84. } else {
  85. const {multiplier} = await this.skip();
  86. history.unshift(multiplier);
  87. }
  88. }
  89. if (c < amount) {
  90. continue;
  91. }
  92. if (history.length > amount) {
  93. history.pop()
  94. }
  95. let medians = new Array(0);
  96. let filtered = new Array(0);
  97. let median = 0
  98. for (let i = 0; filtered.length < arrayamount; i++) {
  99. if (i >= history.length) {
  100. filtered.push(history.slice(0,i));
  101. break;
  102. }
  103. if (i == minimum) {
  104. medians.sort(function(a,b){return a-b});
  105. }
  106. if (i >= minimum) {
  107. insert(history[i], medians);
  108. if (filtered.length <= 0) {
  109. let center = parseInt(medians.length / 2);
  110. if (medians.length % 2 == 0) {
  111. median = medians[center];
  112. } else {
  113. median = (medians[center - 1] + medians[center]) / 2;
  114. }
  115. if (Math.abs(median - 1.98) < 0.001) {
  116. filtered.push(history.slice(0,i));
  117. }
  118. } else {
  119. if (Math.abs(medians.length - filtered[filtered.length - 1].length) > 10) {
  120. medians.sort(function(a, b) { return a - b });
  121. let center = parseInt(medians.length / 2);
  122. if (medians.length % 2 == 1) {
  123. median = medians[center];
  124. } else {
  125. median = (medians[center - 1] + medians[center]) / 2;
  126. }
  127. if (Math.abs(median - 1.98) < 0.001) {
  128. filtered.push(history.slice(0,i));
  129. }
  130. }
  131. }
  132. } else {
  133. medians.unshift(history[i]);
  134. }
  135. }
  136. for (let i = 0; i < Math.abs(max - min) * 100; i++) {
  137. let streak = 0;
  138. let avgstreak = 0;
  139. let count = 0;
  140. let avgstreakc = 0;
  141. for (let j = 0; j < filtered.length; j++) {
  142. for (let p = 0; p < filtered[j].length ; p++) {
  143. if (filtered[j][p] < (i / 100) + min) {
  144. avgstreak++;
  145. } else {
  146. avgstreakc++;
  147. }
  148. if (j == (filtered.length-1)) {
  149. if (filtered[filtered.length-1][p] < (i / 100) + min) {
  150. streak++;
  151. } else {
  152. streak = 0;
  153. }
  154. if (filtered[filtered.length-1][p] >= (i / 100) + min) {
  155. count++;
  156. }
  157. }
  158. }
  159. }
  160. avgstreak /= avgstreakc;
  161. count /= filtered[filtered.length-1].length;
  162. count *= 100;
  163. let probstreak = (100/(99/((i / 100) + min))) - 1
  164. let prob = ((99/((i / 100) + min)) * ((avgstreak / probstreak) + (streak / probstreak) + (streak / avgstreak) + ((99/((i / 100) + min)) / count))) / 4
  165. if ((prob / (99/((i / 100) + min))) >= currentrate) {
  166. target = Math.round(((i / 100) + min) * 100) / 100
  167. }
  168. }
  169. }
  170. }
  171.  
  172. while (true) {
  173. try {
  174. await main();
  175. } catch (error) {
  176. this.log("Connection Closed. Restart After 1 Second.")
  177. await sleep(1000);
  178. continue;
  179. }
  180. }
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