0% found this document useful (0 votes)
101 views12 pages

Chess.com Bot Script by MrAuzzie

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)
101 views12 pages

Chess.com Bot Script by MrAuzzie

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

// additional copyright/license info:

//� All Rights Reserved


//
//[Link] Bot/Cheat � 2023 by MrAuzzie#998142
//
// ==UserScript==
// @name [Link] Bot/Cheat
// @namespace MrAuzzie
// @version [Link]
// @description [Link] Bot/Cheat that finds the best move!
// @author MrAuzzie
// @license [Link] Bot/Cheat � 2023 by MrAuzzie#998142, � All Rights
Reserved
// @match [Link]
// @match [Link]
// @match [Link]
// @match [Link]
// @icon
data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant GM_getValue
// @grant GM_setValue
// @grant GM_xmlhttpRequest
// @grant GM_getResourceText
// @grant GM_registerMenuCommand
// @resource [Link]
[Link]
// @require [Link]
// @require [Link]
// @run-at document-start
// @antifeature ads
// @downloadURL [Link]
%[Link]
// @updateURL [Link]
%[Link]
// ==/UserScript==

//Don't touch anything below unless you know what your doing!
[Link]('nice')
[Link]('head')[0].innerHTML+=`<link
href="[Link]
family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap" rel="stylesheet">`
const show_elm_arr=['KRYPTONITE [Link] BOT HACK (EDITED ONLY)','FINDS THE BEST
MOVE AT EVERY STEP','JUST DESTROYED MITTENS AND STOCKFISH','USES STOCKFISH ENGINE
ITSELF','HAVE FUN AND ENJOY HACKING']

const currentVersion = '1.2.9'; // Sets the current version

function main() {
let my_color='yellow'
var stockfishObjectURL;
var engine = [Link] = {};
var myVars = [Link] = {};
[Link] = false;
[Link] = false;
[Link] = 0;
var myFunctions = [Link] = {};
stop_b = stop_w = 0;
s_br = s_br2 = s_wr = s_wr2 = 0;
obs = "";
[Link] = function(lev) {
var ari = $("chess-board")
.find(".piece")
.map(function() {
return [Link];
})
.get();
jack = [Link](f => [Link]([Link](' ') + 1));
function removeWord(arr, word) {
for (var i = 0; i < [Link]; i++) {
arr[i] = arr[i].replace(word, '');
}
}
removeWord(ari, 'square-');
jack = [Link](f => [Link]([Link](' ') + 1));
for (var i = 0; i < [Link]; i++) {
jack[i] = jack[i].replace('br', 'r')
.replace('bn', 'n')
.replace('bb', 'b')
.replace('bq', 'q')
.replace('bk', 'k')
.replace('bb', 'b')
.replace('bn', 'n')
.replace('br', 'r')
.replace('bp', 'p')
.replace('wp', 'P')
.replace('wr', 'R')
.replace('wn', 'N')
.replace('wb', 'B')
.replace('br', 'R')
.replace('wn', 'N')
.replace('wb', 'B')
.replace('wq', 'Q')
.replace('wk', 'K')
.replace('wb', 'B')
}
str2 = "";
var count = 0,
str = "";
for (var j = 8; j > 0; j--) {
for (var i = 1; i < 9; i++) {
(str = ([Link](el => [Link]([i] + [j])))) ? str =
[Link](/[^a-zA-Z]+/g, ''): str = "";
if (str == "") {
count++;
str = [Link]();
if (!isNaN([Link]([Link] - 1))) str2 = [Link](0,
-1);
else {
count = 1;
str = [Link]()
}
}
str2 += str;
if (i == 8) {
count = 0;
str2 += "/";
}
}
}
str2 = [Link](0, -1);
//str2=str2+" KQkq - 0"
color = "";
wk = wq = bk = bq = "0";
const move = $('vertical-move-list')
.children();
if ([Link] < 2) {
stop_b = stop_w = s_br = s_br2 = s_wr = s_wr2 = 0;
}
if (stop_b != 1) {
if ([Link](".[Link]:contains('K')")
.length) {
bk = "";
bq = "";
stop_b = 1;

}
} else {
bq = "";
bk = "";
}
if (stop_b != 1)(bk = ([Link](".[Link]:contains('O-
O'):not(:contains('O-O-O'))")
.length) ? "" : "k") ? (bq =
([Link](".[Link]:contains('O-O-O')")
.length) ? bk = "" :
"q") : bq = "";
if (s_br != 1) {
if ([Link](".[Link]:contains('R')")
.text()
.match('[abcd]+')) {
bq = "";
s_br = 1
}
} else bq = "";
if (s_br2 != 1) {
if ([Link](".[Link]:contains('R')")
.text()
.match('[hgf]+')) {
bk = "";
s_br2 = 1
}
} else bk = "";
if (stop_b == 0) {
if (s_br == 0)
if ([Link](".[Link]:contains('xa8')")
.length > 0) {
bq = "";
s_br = 1;

}
if (s_br2 == 0)
if ([Link](".[Link]:contains('xh8')")
.length > 0) {
bk = "";
s_br2 = 1;

}
}
if (stop_w != 1) {
if ([Link](".[Link]:contains('K')")
.length) {
wk = "";
wq = "";
stop_w = 1;

}
} else {
wq = "";
wk = "";
}
if (stop_w != 1)(wk = ([Link](".[Link]:contains('O-
O'):not(:contains('O-O-O'))")
.length) ? "" : "K") ? (wq =
([Link](".[Link]:contains('O-O-O')")
.length) ? wk = "" :
"Q") : wq = "";
if (s_wr != 1) {
if ([Link](".[Link]:contains('R')")
.text()
.match('[abcd]+')) {
wq = "";
s_wr = 1
}
} else wq = "";
if (s_wr2 != 1) {
if ([Link](".[Link]:contains('R')")
.text()
.match('[hgf]+')) {
wk = "";
s_wr2 = 1
}
} else wk = "";
if (stop_w == 0) {
if (s_wr == 0)
if ([Link](".[Link]:contains('xa1')")
.length > 0) {
wq = "";
s_wr = 1;

}
if (s_wr2 == 0)
if ([Link](".[Link]:contains('xh1')")
.length > 0) {
wk = "";
s_wr2 = 1;

}
}
if ($('.coordinates')
.children()
.first()
.text() == 1) {
str2 = str2 + " b " + wk + wq + bk + bq;
color = "white";
} else {
str2 = str2 + " w " + wk + wq + bk + bq;
color = "black";
}
//[Link](str2);
return str2;
}
[Link] = function(dat){
[Link](my_color)
response = dat;
var res1 = [Link](0, 2);
var res2 = [Link](2, 4);

if([Link] == true){
[Link](res1, res2);
}
isThinking = false;

res1 = [Link](/^a/, "1")


.replace(/^b/, "2")
.replace(/^c/, "3")
.replace(/^d/, "4")
.replace(/^e/, "5")
.replace(/^f/, "6")
.replace(/^g/, "7")
.replace(/^h/, "8");
res2 = [Link](/^a/, "1")
.replace(/^b/, "2")
.replace(/^c/, "3")
.replace(/^d/, "4")
.replace(/^e/, "5")
.replace(/^f/, "6")
.replace(/^g/, "7")
.replace(/^h/, "8");
$([Link])
.prepend('<div class="highlight square-' + res2 + ` bro"
style="background-color:transparent;border:4px solid ${my_color}; opacity: 1;"
></div>`)
.children(':first')
.delay(1800)
.queue(function() {
$(this)
.remove();
});
$([Link])
.prepend('<div class="highlight square-' + res1 + ` bro"
style="background-color:transparent;border:4px solid ${my_color}; opacity:
1;"></div>`)
.children(':first')
.delay(1800)
.queue(function() {
$(this)
.remove();
});
}

[Link] = function(from, to){


for (var each=0;each<[Link]().length;each++){
if([Link]()[each].from == from){
if([Link]()[each].to == to){
var move = [Link]()[each];
[Link]({
...move,
promotion: 'false',
animate: false,
userGenerated: true
});
}
}
}
}

function parser(e){
if([Link]('bestmove')){

[Link]([Link](' ')[1]);
isThinking = false;
}
}

[Link] = function() {

[Link]();
isThinking = false;
[Link]();
}

[Link] = function() {
if(!stockfishObjectURL) {
stockfishObjectURL = [Link](new
Blob([GM_getResourceText('[Link]')], {type: 'application/javascript'}));
}

if(stockfishObjectURL) {
[Link] = new Worker(stockfishObjectURL);

[Link] = e => {
parser(e);
};
[Link] = e => {

};

[Link]('ucinewgame');
}

var lastValue = 11;


[Link] = function(depth){
//var fen = [Link]();
var fen = [Link]();
[Link](`position fen ${fen}`);

isThinking = true;
[Link](`go depth ${depth}`);
lastValue = 14;
}

[Link] = function(lstValue){
if([Link]() == [Link]()){
[Link](14);
}
}

[Link] = function() {
if(isThinking == true){
$('#overlay')[0].[Link] = 'block';
}
if(isThinking == false) {
$('#overlay')[0].[Link] = 'none';
}
}

let dynamicStyles = null;

function addAnimation(body) {
if (!dynamicStyles) {
dynamicStyles = [Link]('style');
[Link] = 'text/css';
[Link](dynamicStyles);
}

[Link](body, [Link]);
}

[Link] = function(){
try {

$('#sky-atf')[0].children[0].remove();
var ifr = [Link]('iframe');
[Link] = '[Link]
[Link] = 'myAd1';
[Link] = '600px';
[Link] = '160px';
$('#sky-atf')[0].appendChild(ifr)
} catch (er) {}
}

var loaded = false;


[Link] = function(){
try{
var tmpStyle;
var tmpDiv;
board = $('chess-board')[0] || $('wc-chess-board')[0];
[Link] = board;

var div = [Link]('div')

var content = `<div style="margin: auto;width:300px"><br><p


id="depthText" style="font-family: 'Roboto Mono';color:#fff;">Kryptonite Wayne
</p><br><input type="checkbox" id="autoRun" name="autoRun" value="false">
<label for="autoRun" style="font-family: 'Roboto Mono';color:yellow;letter-
spacing:2px;">Get Hint</label><br>
<input type="checkbox" id="autoMove" name="autoMove" value="false">
<label for="autoMove" style="font-family: 'Roboto Mono';color:yellow;letter-
spacing:2px;">LET BOT PLAYS HIMSELF</label><br>
</div>
<div style="padding:20px 20px;display:flex;flex-direction:column;gap:10px;">

<h2 style="font-family: 'Roboto Mono';color:purple">Choose Color</h2>


<div style="display:grid;grid-gap:10px;grid-template-columns:auto auto;">
<div>
<input class="my-checkbox" type="checkbox" onclick="if([Link])
{myFunctions.clear_check(this,'red')}"><span style="font-family: 'Roboto
Mono';color:white" >Red</span></div>
<div>
<input class="my-checkbox" type="checkbox" onclick="if([Link])
{myFunctions.clear_check(this,'blue')}"><span style="font-family: 'Roboto
Mono';color:white" >Blue</span></div>
<div>
<input class="my-checkbox" type="checkbox" onclick="if([Link])
{myFunctions.clear_check(this,'yellow')}"><span style="font-family: 'Roboto
Mono';color:white" }>Yellow</span></div>

<div>
<input class="my-checkbox" type="checkbox" onclick="if([Link])
{myFunctions.clear_check(this,'yellow')}"><span style="font-family: 'Roboto
Mono';color:white" }>Purple</span></div>

<div>
<input class="my-checkbox" type="checkbox" onclick="if([Link])
{myFunctions.clear_check(this,'pink')}"><span style="font-family: 'Roboto
Mono';color:white" }>Pink</span></div>

<div>
<input class="my-checkbox" type="checkbox" onclick="if([Link])
{myFunctions.clear_check(this,'aqua')}"><span style="font-family: 'Roboto
Mono';color:white" }>Aqua</span></div>

<div>
<input class="my-checkbox" type="checkbox" onclick="if([Link])
{myFunctions.clear_check(this,'#333')}"><span style="font-family: 'Roboto
Mono';color:white" }>Kryptonite-color</span></div>

</div>
`
myFunctions.clear_check= function(that,color)
{
for(let elm of [...[Link]('my-checkbox')])
{

[Link]=false
}
[Link]=true
my_color=color
[Link](my_color)

}
[Link] = content;

[Link]('style','height:400px;display:flex;justify-
content:space-evenly;align-items:center;background-color:black; height:auto;
background-repeat:no-repeat;background-size:cover;');
[Link]('id','settingsContainer');

[Link](div);

//spinnerContainer
var spinCont = [Link]('div');
[Link]('style','display:none;');
[Link]('id','overlay');
[Link](spinCont);
//spinner
var spinr = [Link]('div')
[Link]('style',`
margin: 0 auto;
height: 64px;
width: 64px;
animation: rotate 0.8s infinite linear;
border: 5px solid firebrick;
border-right-color: transparent;
border-radius: 50%;
`);

addAnimation(`@keyframes rotate {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}`);

//Reload Button
var reSty = `
#relButDiv {
position: relative;
text-align: center;
margin: 0 0 8px 0;
}
#relEngBut {
position: relative;
color: #ffef85;
background-color: #3cba2c;
font-size: 19px;
border: 1px solid #000000;
padding: 15px 50px;
letter-spacing: 1px;
cursor: pointer
}
#relEngBut:hover {
color: #000000;
background-color: #ba1212;
}
#relEngBut:active {
background-color: #ba1212;
transform: translateY(4px);
}`;
var reBut = `<button type="button" name="reloadEngine" id="relEngBut"
onclick="[Link]()">Reload Chess Engine</button>`;
tmpDiv = [Link]('div');
var relButDiv = [Link]('div');
[Link] = 'relButDiv';
[Link] = reBut;
reBut = [Link];

tmpStyle = [Link]('style');
[Link] = reSty;
[Link](tmpStyle);

[Link](relButDiv);

// Issue Button
var isBut = `<button type="button" name="isBut"
onclick="[Link]('Can I take you to the issues page?') ? [Link] =
'[Link] : [Link]('cancled')">Got An
Issue/Bug?</button>`;
tmpDiv = [Link]('div');
var isButDiv = [Link]('div');

[Link] = `

position: relative;
text-align: center;
margin: 0 0 8px 0;

`;

[Link] = isBut;
isBut = [Link];

[Link] = 'isBut';
[Link] = `

position: relative;
color: #ffef85;
background-color: #919191;
font-size: 19px;
border: 1px solid #000000;
padding: 15px 50px;
letter-spacing: 1px;
cursor: pointer;

`;

loaded = true;
} catch (error) {}
}

function other(delay){
var endTime = [Link]() + 0;
var timer = setInterval(()=>{
if([Link]() >= endTime){
[Link](13);
canGo = true;
clearInterval(timer);
}
},10);
}

async function getVersion(){


var GF = new GreasyFork; // set upping api
var code = await [Link]().script().code(460208); // Get code
var version = [Link](code).filter(e => [Link] ===
'@version')[0].value; // filtering array and getting value of @version

if(currentVersion !== version){


while(true){
alert('UPDATE THIS SCRIPT IN ORDER TO PROCEED!');
}
}
}

const waitForChessBoard = setInterval(() => {


if(loaded) {
board = $('chess-board')[0] || $('wc-chess-board')[0];
[Link] = $('#autoRun')[0].checked;
[Link] = $('#autoMove')[0].checked;

[Link] = isThinking;
[Link]();
if([Link]() == [Link]()){myTurn = true;}
else {myTurn = false;}

} else {
[Link]();
}

if(!($('#myAd1')[0])){
[Link]();
}

if(![Link]){
[Link]();
}
if([Link] == true && canGo == true && isThinking == false &&
myTurn){
//[Link](`going: ${canGo} ${isThinking} ${myTurn}`);
canGo = false;
var currentDelay = [Link] != undefined ? [Link] * 1000 :
10;
other(0);
}
}, 100);
}
//Touching below may break the script

var isThinking = false


var canGo = true;
var myTurn = false;
var board;
var l = '';

[Link]("load", (event) => {


let currentTime = [Link]();
main();
if(parseInt([Link]('ads')) + 300000 <= currentTime ||
[Link]('ads') == null){
[Link]('ads', currentTime);
setTimeout(()=>{
//[Link] = '[Link]
},1000);
} else if([Link]('ads') == 'true' || [Link]('ads')
== 'false' || [Link]('ads') == null){
[Link]('ads', currentTime);
}
});

You might also like