0% found this document useful (0 votes)
27 views3 pages

Predict Stop Dice

This userscript checks for an autobets button on a betting site every 5 seconds. It will restart the autobets if they are stopped. The script adds a button to manually start and stop the checking.

Uploaded by

galeriecezanne
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views3 pages

Predict Stop Dice

This userscript checks for an autobets button on a betting site every 5 seconds. It will restart the autobets if they are stopped. The script adds a button to manually start and stop the checking.

Uploaded by

galeriecezanne
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

// ==UserScript==

// @name STAKE AUTOBETS Restart


// @description Stake autobets restart
// @author mrdogecoin
// @version 1.0
// @license apache
// @match https://stake.com/*
// @grant none
// @namespace none
// ==/UserScript==

var intervalCheck = 05; //interval checking, seconds


var runCheck = false;
var autoButton;
var autoButtonFound = false;

function checkButton(){
autoButtonFound = false;
for (var i = 0; i < 100; i++) {
try{
if (document.querySelectorAll('button')[i].dataset.test == 'auto-bet-button')
{
autoButton = document.querySelectorAll('button')[i];
autoButtonFound = true;
break;
}
}catch(error){
//console.log('Error');
}
}
if(autoButtonFound){
console.log('Autobets found');
checkAuto(); ///start checking
}else{
console.log('Autobets not found');
alert('Autobets not found');
}
//autoButton.click();
}

function checkAuto(){
if(autoButtonFound && runCheck){
if(autoButton.dataset.autobetStatus == 'start'){
console.log('Autobets stopped, restarting ...');
autoButton.click();
}else{
console.log('Autobets running');
}
if(autoButtonFound && runCheck) setTimeout(() => { checkAuto() },
intervalCheck * 1000); //interval checking, sec.
}
}
//if(autoButtonFound && runCheck) setTimeout(() => { checkAuto() }, 10 * 1000);
//start checking

var _sstart = 0;
function addLib(src, cb) {
var s = document.createElement('script');
s.type = 'text/javascript';
s.src = src;
s.onload = cb;
document.head.appendChild(s);
}
addLib('https://code.jquery.com/jquery-3.6.3.min.js', () => {
$(`<style>
#script, #rescript {
position: absolute;
margin-left: 10%;
top: 10%;
width: 200px;
height: 45px;
background: #111;
border: none;
border-radius: 3px;
color: #fff;
cursor: pointer;
}
/*
#rescript {
margin-left: 25%;
width: 70px;
height: 45px;
background: #ace
}
*/
#script:hover, #rescript:hover {
background: #333
}

</style>
<input type="button" value="START Checking" id="script">`).appendTo('body');
//<input type="button" value="START Checking" id="script"><input type="button"
value="RESET" id="rescript">`).appendTo('body');
$('#script').click(function(){
_sstart = !_sstart;
if (!_sstart) {
this.value='START Checking';
//this.style='color:green';
this.style='background:#111';
runCheck = false;
return;
} else {
this.value='STOP Checking';
//this.style='color:red';
this.style='background:#a00';
runCheck = true;
checkButton();
///if(autoButtonFound && runCheck) checkAuto(); //setTimeout(() =>
{ checkAuto() }, 10 * 1000); //start checking
};
});
/*
$('#rescript').click(function(){
_f();
});
*/
})

You might also like