Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var config = {
- betPer: { value: 0.005, type: 'multiplier', label:'BR % eg. 0.10 = 10%' },
- };
- log('Script is running..');
- var currentBet = 0;
- var startingBalance = userInfo.balance;
- var betNumber = 0;
- var betSize = userInfo.balance * config.betPer.value;
- engine.on('GAME_STARTING', onGameStarted);
- engine.on('GAME_ENDED', onGameEnded);
- function onGameStarted() {
- if(currentBet == 1){
- engine.bet(roundBit(betSize), config.payout.value);
- betNumber += 1;
- log('Betting', roundBit(betSize)/100);
- }else{
- betNumber = 0
- }
- };
- function onGameEnded() {
- var lastGame = engine.history.first();
- if(lastGame.wager){
- if(userInfo.balance > startingBalance){
- log('Current Profit =', (userInfo.balance - startingBalance)/100);
- }else{
- if(userInfo.balance < startingBalance){
- log('Current Loss =', (startingBalance - userInfo.balance)/100);
- } }
- };
- //Did the last game crash at 1x?
- if(lastGame.bust == 1.00){
- currentBet = 1;
- log('We will bet next round');
- }else{
- //Did we bet last game?
- if(lastGame.wager){
- currentBet = 1;
- log('We will bet next round');
- }else{
- currentBet = 0;
- log('we are waiting for a 1x');
- }
- }
- //Stop if we have made 25 bets
- if(betNumber = 25){
- currentBet = 0;
- }
- };
- function roundBit(bet) {
- return Math.round(bet / 100) * 100;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement