·   · 8 posts
  •  · 6 friends

csgoempire coinflip script

// Youtube.com/c/BitcoinWizards

//THIS CAN YOU EDIT, 1 = 0.25

//--------------------------

var startBet = 1;

// if TCT is 1 its betting on CT.

// If TCT is 0 its betting on T.

var TCT = 0;


//--------------------------

// DO NOT TOUCH WHATS BELOW THIS!

var lastBet = 0;

var currentBet = 0;

var currentBank = 0;

var previousBank = 0;

var startBank = 0;

var profit = 0;

const INCREASER = 2.15;

var didIWin = true;

var resultFinder;


// FIND ALL THE BUTTONS

var btn001;

var btn01;

var btn1;

var btn10;

var btn100;

var btn_clear;

var btn_half;

var btn_2time;

var btn_open_bet;


var btn_bet_ct;

var btn_bet_t;

var btn_bet_dice;


var btn_to_close_bet;


var stepToPreform = 1;


function bindbtns() {

    var btn_to_bind = document.getElementsByTagName('button');


    for (var i=0; i<btn_to_bind.length; i++){

        if(btn_to_bind[i].innerText.indexOf('+0.25') > -1){

            btn001 = btn_to_bind[i];

        } else if(btn_to_bind[i].innerText.indexOf(' +0.1 ') > -1){

            btn_to_bind[i].click();

            btn01 = btn_to_bind[i];

        } else if(btn_to_bind[i].innerText.indexOf(' +1 ') > -1){

            btn_to_bind[i].click();

            btn1 = btn_to_bind[i];

        } else if(btn_to_bind[i].innerText.indexOf(' +10 ') > -1){

            btn_to_bind[i].click();

            btn10 = btn_to_bind[i];

        } else if(btn_to_bind[i].innerText.indexOf(' +100 ') > -1){

            btn_to_bind[i].click();

            btn100 = btn_to_bind[i];

        } else if(btn_to_bind[i].innerText.indexOf(' 1/2 ') > -1){

            btn_to_bind[i].click();

            btn_half = btn_to_bind[i];

        } else if(btn_to_bind[i].innerText.indexOf(' x2 ') > -1){

            btn_to_bind[i].click();

            btn_2time = btn_to_bind[i];

        } else if(btn_to_bind[i].innerText.indexOf(' Clear ') > -1){

            btn_to_bind[i].click();

            btn_clear = btn_to_bind[i];

        } else if(btn_to_bind[i].innerText.indexOf(' PLACEBET ') > -1){

            btn_to_bind[i].click();

            btn_clear = btn_to_bind[i];

        }

    }


    var btn_to_t = document.getElementsByClassName('side coin-t');

    var btn_to_ct = document.getElementsByClassName('side coin-ct');


    var btn_to_place_bet = document.getElementsByClassName('ml-1 relative button-primary button-primary--gold');



    btn_bet_ct = btn_to_ct[0];

    btn_bet_t = btn_to_t[0];

    btn_open_bet = btn_to_place_bet[0];


}


bindbtns();

currentBet = startBet;

//put up starting bank to keep track of profit

var bankFinder2 = document.getElementsByClassName('whitespace-no-wrap');

for(var i=0; i<bankFinder2.length; i++){

    startBank = bankFinder2[1].innerHTML.valueOf();

}


// USE BUTTONS IN A LOOP

//Maintained by CSGO Betting Review

var stepToPreform = 1;

setInterval(function(){

    //Checking if its posible to place bets

    if (stepToPreform == 1) {

        //Find the bankroll to check if you win.

        var bankFinder = document.getElementsByClassName('whitespace-no-wrap');

        for(var i=0; i<bankFinder.length; i++){

            currentBank = bankFinder[1].innerHTML.valueOf();

            profit = currentBank - startBank;

            console.log('Your profit/lose is: ' + profit);

        }


        //Reset bankroll is current bank roll is high than previous bank roll.

        if (didIWin){

            currentBet = startBet;

            if (TCT == 0){

                console.log("Change to bet on T");

                TCT = 1;

            } else if (TCT == 1){

                console.log("Change to bet on CT");

                TCT = 0;

            }

        } else {

            console.log("Doubbel the amount you bet");

            currentBet = lastBet*INCREASER;

        }


        //Go to the next action

        stepToPreform = 2;

    }

    //Placeing the bet.

    else if (stepToPreform == 2) {

        //Clean last bet

        CloseBets();

        btn_clear.click();

        //Place bet

        console.log("Placing bet now");

        for (var l=0; l<Math.floor(currentBet); l++){

            btn001.click();

        }

        ChooseTCT(TCT);

        btn_open_bet.click();

        lastBet = currentBet;

        stepToPreform = 3;

    } else if (stepToPreform == 3) {

        //Check the new bank roll

        var bankFinder = document.getElementsByClassName('whitespace-no-wrap');

        for(var i=0; i<bankFinder.length; i++){

            previousBank = bankFinder[1].innerHTML.valueOf();

        }


        stepToPreform = 4;

    } else if (stepToPreform == 4) {

        var spinnerChecker = document.getElementsByClassName('gamelist flex flex-wrap relative mb-2')[0].getElementsByClassName('button-primary button-primary--gold py-2 h-auto mb-1');

        if (spinnerChecker.length != 0){

            stepToPreform = 5;

        }

    } else if (stepToPreform == 5) {

        var GameGone = document.getElementsByClassName('ml-1 text-lg text-light-grey-3 inline-block');

        if (GameGone[0].innerHTML == 1){



            console.log("checking if i won or lost");

            resultFinder = document.getElementsByClassName('gamelist flex flex-wrap relative mb-2')[0].getElementsByClassName('coinflip-coin-gif');


            if (TCT == 0) {

                if (resultFinder[0].style.cssText.includes("coin-ct")){

                    didIWin = true;

                    console.log("You won on CT");

                    stepToPreform = 1;

                } else {

                    didIWin = false;

                    console.log("You lost");

                    stepToPreform = 1;

                }

            } else if (TCT == 1){

                if (resultFinder[0].style.cssText.includes("coin-t")){

                    didIWin = true;

                    console.log("You won on T");

                    stepToPreform = 1;

                } else {

                    didIWin = false;

                    console.log("You lost");

                    stepToPreform = 1;

                }

            }




        }

    }

},2000);




console.log('Script started');



function ChooseTCT(x) {

    if (x == 0){

        btn_bet_ct.click();

    } else if (x == 1) {

        btn_bet_t.click();

    }

}


function CloseBets() {

    var spinnerChecker = document.getElementsByClassName('gamelist flex flex-wrap relative mb-2')[0].getElementsByClassName('button-primary button-primary--gold py-2 h-auto mb-1');

    for (var i = 0; spinnerChecker.length  > i; i++){

        console.log("Closing earlyer games");

        var btn_to_close_bet2 = spinnerChecker[i];

        btn_to_close_bet2.click();

    }

}

  • 134
Comments (0)
Info
Category:
Created:
Updated: