stopPercentage = 0.001, // In %. I wouldn't recommend going past 0.08 maxWait = 500, // In milliseconds stopped = false, stopBefore = 3; // In minutes var $loButton = $('#double_your_btc_bet_lo_button'), $hiButton = $('#double_your_btc_bet_hi_button'); function multiply(){ var current = $('#double_your_btc_stake').val(); var multiply = (current * 2).toFixed(8); $('#double_your_btc_stake').val(multiply); } function getRandomWait(){ var wait = Math.floor(Math.random() * maxWait ) + 100; console.log('Waiting for ' + wait + 'ms before next bet.'); return wait ; } function startGame(){ console.log('Game started!'); reset(); $loButton.trigger('click'); } function stopGame(){ console.log('Game will stop soon! Let me finish.'); stopped = true; } function reset(){ $('#double_your_btc_stake').val(startValue); }kdjkjf,dhfksljdfnmjdhjfdlfkdsknhgerih // qui