Skip to content

Commit 87de9e9

Browse files
authored
pre2: add autojump, autowalk, bot automove and other stuff
1 parent 7d1b457 commit 87de9e9

1 file changed

Lines changed: 45 additions & 17 deletions

File tree

StateFarmClient.js

Lines changed: 45 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
//3.#.#-release for release
1111
//this ensures that each version of the script is counted as different
1212

13-
// @version 3.3.0-pre1
13+
// @version 3.3.0-pre2
1414

1515
// @match *://shellshock.io/*
1616
// @match *://algebra.best/*
@@ -75,7 +75,7 @@
7575
(function () {
7676
//script info
7777
const name="StateFarm Client";
78-
const version="3.3.0-pre1";
78+
const version="3.3.0-pre2";
7979
//startup sequence
8080
const startUp=function () {
8181
mainLoop()
@@ -91,6 +91,7 @@
9191
window.newGame=false
9292
let binding=false;
9393
let lastSpamMessage=0;
94+
let lastAutoJump=0;
9495
let lastAntiAFKMessage=0;
9596
let lastSentMessage="";
9697
let yawCache=0;
@@ -400,6 +401,9 @@
400401
initTab({ location: tp.automationFolder, storeAs: "automationTab" })
401402
initModule({ location: tp.automationTab.pages[0], title: "AutoWeapon", storeAs: "autoWeapon", bindLocation: tp.automationTab.pages[1], dropdown: [{text: "Disabled", value: "disabled"}, {text: "EggK-47", value: "eggk47"}, {text: "Scrambler", value: "scrambler"}, {text: "Free Ranger", value: "freeranger"}, {text: "RPEGG", value: "rpegg"}, {text: "Whipper", value: "whipper"}, {text: "Crackshot", value: "crackshot"}, {text: "Tri-Hard", value: "trihard"}], defaultValue: "pointingat"});
402403
initModule({ location: tp.automationTab.pages[0], title: "AutoRespawn", storeAs: "autoRespawn", bindLocation: tp.automationTab.pages[1],});
404+
initModule({ location: tp.automationTab.pages[0], title: "AutoWalk", storeAs: "autoWalk", bindLocation: tp.automationTab.pages[1],});
405+
initModule({ location: tp.automationTab.pages[0], title: "AutoJump", storeAs: "autoJump", bindLocation: tp.automationTab.pages[1],});
406+
initModule({ location: tp.automationTab.pages[0], title: "Jump Delay", storeAs: "autoJumpDelay", slider: {min: 0, max: 10000, step: 1}, defaultValue: 0,});
403407
initFolder({ location: tp.automationTab.pages[0], title: "Auto Join Options", storeAs: "autoJoinFolder",});
404408
initModule({ location: tp.autoJoinFolder, title: "Auto Join", storeAs: "autoJoin", bindLocation: tp.automationTab.pages[1],});
405409
initModule({ location: tp.autoJoinFolder, title: "Join Code", storeAs: "joinCode", defaultValue: "CODE",});
@@ -417,13 +421,14 @@
417421
initModule({ location: tp.botParamsFolder, title: "CopyNames", storeAs: "botCopyName", bindLocation: tp.bottingTab.pages[1],});
418422
initModule({ location: tp.botParamsFolder, title: "Game Code", storeAs: "botJoinCode", defaultValue: "CODE",});
419423
initModule({ location: tp.botParamsFolder, title: "Get Code", storeAs: "getCode", button: "Retrieve", clickFunction: function(){change("botJoinCode",ss.GAMECODE)},});
420-
initModule({ location: tp.botParamsFolder, title: "EnableMock", storeAs: "botMock", bindLocation: tp.bottingTab.pages[1],});
421-
initModule({ location: tp.botParamsFolder, title: "EnablePlay", storeAs: "botRespawn", bindLocation: tp.bottingTab.pages[1],});
424+
initModule({ location: tp.botParamsFolder, title: "DoMock", storeAs: "botMock", bindLocation: tp.bottingTab.pages[1],});
425+
initModule({ location: tp.botParamsFolder, title: "DoPlay", storeAs: "botRespawn", bindLocation: tp.bottingTab.pages[1],});
422426
initModule({ location: tp.botParamsFolder, title: "DoSeizure", storeAs: "botSeizure", bindLocation: tp.bottingTab.pages[1],});
423427
initModule({ location: tp.botParamsFolder, title: "DoShoot", storeAs: "botAutoShoot", bindLocation: tp.bottingTab.pages[1],});
424428
initModule({ location: tp.botParamsFolder, title: "DoAimbot", storeAs: "botAimbot", bindLocation: tp.bottingTab.pages[1],});
429+
initModule({ location: tp.botParamsFolder, title: "DoMove", storeAs: "botAutoMove", bindLocation: tp.bottingTab.pages[1],});
425430
initModule({ location: tp.bottingTab.pages[0], title: "Deploy", storeAs: "deployBots", bindLocation: tp.bottingTab.pages[1], button: "START BOTS!", clickFunction: function(){deployBots()},});
426-
431+
initModule({ location: tp.bottingTab.pages[0], title: "How To?", storeAs: "bottingGuide", button: "Link", clickFunction: function(){window.open("https://github.com/Hydroflame522/StateFarmClient/tree/main#botting")},});
427432
//MISC MODULES
428433
initFolder({ location: tp.pane, title: "Misc", storeAs: "miscFolder",});
429434
initTab({ location: tp.miscFolder, storeAs: "miscTab" })
@@ -1483,6 +1488,7 @@
14831488
return finalDir;
14841489
};
14851490
const injectScript = function () {
1491+
//TODO: replace with anon functions
14861492
window.fixCamera = function () {
14871493
return isKeyToggled[bindsArray.zoom] && (extract("zoom")*(Math.PI / 180)) || (extract("fov")*(Math.PI/180)) || 1.25;
14881494
};
@@ -1515,6 +1521,16 @@
15151521
};
15161522
return msg;
15171523
};
1524+
window.modifyControls = function(CONTROLKEYS) {
1525+
if (extract("autoWalk")) { CONTROLKEYS|=1 };
1526+
if (extract("autoJump")) {
1527+
if (Date.now()>(lastAutoJump+extract("autoJumpDelay"))) {
1528+
CONTROLKEYS|=16;
1529+
lastAutoJump=Date.now();
1530+
};
1531+
};
1532+
return CONTROLKEYS;
1533+
};
15181534
const originalXHROpen = XMLHttpRequest.prototype.open; //wtf??? libertymutual collab??????
15191535
const originalXHRGetResponse = Object.getOwnPropertyDescriptor(XMLHttpRequest.prototype, 'response');
15201536
let shellshockjs
@@ -1554,7 +1570,7 @@
15541570
getVar("RENDERLIST", '&&([a-zA-Z]+\\.getShadowMap\\(\\)\\.renderList)');
15551571
getVar("GAMEMAP", '>=([a-zA-Z]+)\\.height&&\\(this\\.climbing=!1\\)');
15561572
getVar("TEAMCOLORS", '\\{([a-zA-Z_$]+)\\.themClass\\[');
1557-
getVar("CAMERA", ',([a-zA-Z_$]+)=new T\\.TargetCamera\\("camera"'); //todo
1573+
getVar("CAMERA", ',([a-zA-Z_$]+)=new '+vars.BABYLONJS+'\\.TargetCamera\\("camera"');
15581574
getVar("RAYS", '\\.25\\),([a-zA-Z_$]+)\\.rayCollidesWithPlayer');
15591575
getVar("GAMECODE", 'gameCode:([a-zA-Z]+)\\|\\|');
15601576
// getVar("vs", '(vs)'); //todo
@@ -1603,18 +1619,24 @@
16031619
//bypass chat filter
16041620
match = new RegExp(`"&&\\s*([a-zA-Z]+)\\.indexOf\\("<"\\)<0`).exec(js)[1];
16051621
js=js.replace('.value.trim()','.value.trim();'+match+'=window.modifyChat('+match+')')
1606-
//admin spoof lol
1607-
js=js.replace('isGameOwner(){return qr}','isGameOwner(){return true}')
1608-
js=js.replace('get adminRoles(){return O.adminRoles}','get adminRoles(){return 255}')
1609-
//sus
1610-
js=js.replace('Wo(t){','Wo(t){console.log("Wo",t);')
1611-
js=js.replace('Ts(t){','Ts(t){console.log("Ts",t);')
1612-
//motion blue
1613-
js=js.replace('._motionBlurEnabled=!1','._motionBlurEnabled=!0')
1614-
1615-
1622+
//hook for control interception
1623+
const PLAYERTHING=new RegExp('\\.weapon\\.actor\\.equip\\(\\)\};([a-zA-Z]+)\\.prototype\\.update').exec(js)[1];
1624+
const ARGTHING=new RegExp(PLAYERTHING+'\\.prototype\\.update=function\\(([a-zA-Z]+)\\)').exec(js)[1];
1625+
const CONTROLKEYS=new RegExp('\\);if\\(([a-zA-Z]+)!=0\\)\\{if\\(').exec(js)[1];
1626+
console.log("CONTROLKEYS:",CONTROLKEYS);
1627+
console.log("PLAYERTHING:",PLAYERTHING);
1628+
console.log("ARGTHING:",ARGTHING);
1629+
js=js.replace(PLAYERTHING+'.prototype.update=function('+ARGTHING+'){',PLAYERTHING+'.prototype.update=function('+ARGTHING+'){'+CONTROLKEYS+'=window.modifyControls('+CONTROLKEYS+');');
16161630

16171631
//replace graveyard:
1632+
// //admin spoof lol
1633+
// js=js.replace('isGameOwner(){return qr}','isGameOwner(){return true}')
1634+
// js=js.replace('get adminRoles(){return O.adminRoles}','get adminRoles(){return 255}')
1635+
// //sus
1636+
// js=js.replace('Wo(t){','Wo(t){console.log("Wo",t);')
1637+
// js=js.replace('Ts(t){','Ts(t){console.log("Ts",t);')
1638+
// //motion blur
1639+
// js=js.replace('._motionBlurEnabled=!1','._motionBlurEnabled=!0')
16181640
// js=js.replace('et.booted','et.noboot')
16191641
// js=js.replace('eu(t)','Bc(t)')
16201642
// js=js.replace('vueApp.showPlayerActionsPopup(i)','vueApp.showPlayerActionsPopup(i);console.log(i)')
@@ -1715,7 +1737,7 @@
17151737
params=params+"enableSeizureX%3E"+JSON.stringify(extract("botSeizure"))+","
17161738
params=params+"enableSeizureY%3E"+JSON.stringify(extract("botSeizure"))+","
17171739

1718-
if (extract("botAimbot")) {
1740+
if (extract("botAimbot")) { //add antisneak
17191741
params=params+"aimbotTargeting%3E"+JSON.stringify(1)+","
17201742
params=params+"prediction%3E"+JSON.stringify(true)+","
17211743
params=params+"aimbot%3E"+JSON.stringify(true)+","
@@ -1726,6 +1748,12 @@
17261748
params=params+"enableSeizureY%3E"+JSON.stringify(false)+","
17271749
};
17281750

1751+
if (extract("botAutoMove")) {
1752+
params=params+"autoWalk%3E"+JSON.stringify(true)+","
1753+
params=params+"autoJump%3E"+JSON.stringify(true)+","
1754+
params=params+"autoJumpDelay%3E"+JSON.stringify(1500)+","
1755+
};
1756+
17291757
params=params+"joinCode%3E%22"+extract("botJoinCode")+"%22";
17301758
window.open("https://"+proxyURL+"/"+params, '_blank', 'width=450,height=300,left='+leftOffset+',top='+topOffset);
17311759
};

0 commit comments

Comments
 (0)