Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2018
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.72 KB | None | 0 0
  1. {
  2. Java script
  3. var startValue = '0.00000001', // Don't lower the decimal point more than 4x of
  4. current balance
  5. stopPercentage = 0.001 // In %, I wouldn't recommand going past 0.08
  6. maxWait = 500,in milliseconds
  7. stopped = false,
  8. stopBefore = 3; // In minutes
  9. var $loButton = $('#double_your_btc_bet_lo_button'),
  10. $hiButton = $('#double_your_btc_bet_hi_button');
  11. function multiply(){
  12. var current = $('#double_your_btc_stake').val();
  13. var multiply = (current * 2).toFixed(8);
  14. $('#double_your_btc_stake').val(multiply);
  15. }
  16. function getRandomWait(){
  17. var wait = Math.floor(Math.random() * maxWait ) + 100;
  18. console.log('Waiting for ' + wait + 'ms before next bet.');
  19. return wait ;
  20. }
  21. function startGame(){
  22. console.log('Game started!');
  23. reset();
  24. $loButton.trigger('click');
  25. }
  26. function stopGame(){
  27. console.log('Game will stop soon! Let me finish.');
  28. stopped = true;
  29. }
  30. function reset(){
  31. $('#double_your_btc_stake').val(startValue);
  32. }
  33. // quick and dirty if you have very little bitcoins like 0.0000001
  34. function deexponentize(number){
  35. return number * 10000000;
  36. }
  37. function iHaveEnoughMoni(){
  38. var balance = deexponentize(parseFloat($('#balance').text()));
  39. var wait = Math.floor(Math.random() * maxWait ) + 100;
  40. console.log('Waiting for ' + wait + 'ms before next bet.');
  41. return wait ;
  42. }
  43. function startgame(){
  44. console.log('Game started!');
  45. reset();
  46. $loButton.trigger('click');
  47. }
  48. function stopGame(){
  49. console.log('Game will stop soon! Let me finish.');
  50. stopped = true;
  51. }
  52. function reset(){
  53. $('#double_your_btc_stake').val(startValue);
  54. }
  55. //quick and dirty hack if you have very little bitcoins like 0.0000001
  56. function deexponentize(number){
  57. return number * 1000000;
  58. function startGame(){
  59. console.log('Game started!');
  60. reset();
  61. $loButton.trigger('click');
  62. }
  63. function stopGame(){
  64. console.log('Game will stop soon! Let me finish.');
  65. stopped = true;
  66. }
  67. function reset(){
  68. $('#double_your_btc_stake').val(startValue);
  69. }
  70. // quick and dirty if you have very little bitcoins like 0.0000001
  71. function deexponentize(number){
  72. return number * 1000000;
  73. }
  74. function iHaveEnoughMoni(){
  75. var balance = deexponentize(parseFloat($('#balance').text()));
  76. var current = deexponentize($('#double_your_btc_stake').val());
  77. return ((balance)*2/100) * (current*2) > stopPercentage/100;
  78. }
  79.  
  80. function stopBeforeRedirect(){
  81. var minutes = parseInt($('title').text());
  82. if( minutes < stopBefore )
  83. {
  84. console.log('Approaching redirect! Stop the game so we don\'t get redirected while
  85. loosing.');
  86. stopGame();
  87. return true;
  88. }
  89. return false;
  90. }
  91. //Unbind old shit
  92. $('#double_your_btc_bet_lose').unbind();
  93. $('#double_your_btc_bet_win').unbind();
  94. //Loser
  95. $('#double_your_btc_bet_lose').bind("DOMSubtreeModified",function(event){
  96. if( $(event.currentTarget).is(':contains("lose")') )
  97. {
  98. console.log('You LOST! Multiplying your bet and betting again.');
  99. multiply();
  100. setTimeout(function(){
  101. $loButton.trigger('click');
  102. }, getRandomWait());
  103. //$loButton trigger('click');
  104. }
  105. });
  106. if( $(event.currentTarget).is(':contains("lose")') )
  107. {
  108. console.log('You LOST! Multiplying your bet and betting again.');
  109. multiply();
  110. setTimeout(function(){
  111. $loButton.trigger('click');
  112. }, getRandomWait());
  113. //$loButton.trigger('click');
  114. }
  115. });
  116. //winner
  117. $('#double_your_btc_bet_win').bind("DOMSubtreeModified",function(event){
  118. if( $(event.currentTarget).is(':contains("win")') )
  119. {
  120. if( stopBeforeRedirect() )
  121. {
  122. 0.51488171 BTC
  123. return;
  124. }
  125. if( iHaveEnoughMoni() )
  126. {
  127. console.log('You WON! But don\'t be greedy. Restarting!');
  128. reset();
  129. if( stopped )
  130. {
  131. stopped = false;
  132. return false;
  133. }
  134. }
  135. else
  136. {
  137. console.log('You WON! Betting again');
  138. }
  139. setTimeout(function(){
  140. $loButton.trigger('click');
  141. }, getRandomWait());
  142. }
  143. });startGame()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement