|
10 | 10 | //3.#.#-release for release |
11 | 11 | //this ensures that each version of the script is counted as different |
12 | 12 |
|
13 | | -// @version 3.3.0-pre1 |
| 13 | +// @version 3.3.0-pre2 |
14 | 14 |
|
15 | 15 | // @match *://shellshock.io/* |
16 | 16 | // @match *://algebra.best/* |
|
75 | 75 | (function () { |
76 | 76 | //script info |
77 | 77 | const name="StateFarm Client"; |
78 | | - const version="3.3.0-pre1"; |
| 78 | + const version="3.3.0-pre2"; |
79 | 79 | //startup sequence |
80 | 80 | const startUp=function () { |
81 | 81 | mainLoop() |
|
91 | 91 | window.newGame=false |
92 | 92 | let binding=false; |
93 | 93 | let lastSpamMessage=0; |
| 94 | + let lastAutoJump=0; |
94 | 95 | let lastAntiAFKMessage=0; |
95 | 96 | let lastSentMessage=""; |
96 | 97 | let yawCache=0; |
|
400 | 401 | initTab({ location: tp.automationFolder, storeAs: "automationTab" }) |
401 | 402 | 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"}); |
402 | 403 | 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,}); |
403 | 407 | initFolder({ location: tp.automationTab.pages[0], title: "Auto Join Options", storeAs: "autoJoinFolder",}); |
404 | 408 | initModule({ location: tp.autoJoinFolder, title: "Auto Join", storeAs: "autoJoin", bindLocation: tp.automationTab.pages[1],}); |
405 | 409 | initModule({ location: tp.autoJoinFolder, title: "Join Code", storeAs: "joinCode", defaultValue: "CODE",}); |
|
417 | 421 | initModule({ location: tp.botParamsFolder, title: "CopyNames", storeAs: "botCopyName", bindLocation: tp.bottingTab.pages[1],}); |
418 | 422 | initModule({ location: tp.botParamsFolder, title: "Game Code", storeAs: "botJoinCode", defaultValue: "CODE",}); |
419 | 423 | 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],}); |
422 | 426 | initModule({ location: tp.botParamsFolder, title: "DoSeizure", storeAs: "botSeizure", bindLocation: tp.bottingTab.pages[1],}); |
423 | 427 | initModule({ location: tp.botParamsFolder, title: "DoShoot", storeAs: "botAutoShoot", bindLocation: tp.bottingTab.pages[1],}); |
424 | 428 | 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],}); |
425 | 430 | 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")},}); |
427 | 432 | //MISC MODULES |
428 | 433 | initFolder({ location: tp.pane, title: "Misc", storeAs: "miscFolder",}); |
429 | 434 | initTab({ location: tp.miscFolder, storeAs: "miscTab" }) |
|
1483 | 1488 | return finalDir; |
1484 | 1489 | }; |
1485 | 1490 | const injectScript = function () { |
| 1491 | + //TODO: replace with anon functions |
1486 | 1492 | window.fixCamera = function () { |
1487 | 1493 | return isKeyToggled[bindsArray.zoom] && (extract("zoom")*(Math.PI / 180)) || (extract("fov")*(Math.PI/180)) || 1.25; |
1488 | 1494 | }; |
|
1515 | 1521 | }; |
1516 | 1522 | return msg; |
1517 | 1523 | }; |
| 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 | + }; |
1518 | 1534 | const originalXHROpen = XMLHttpRequest.prototype.open; //wtf??? libertymutual collab?????? |
1519 | 1535 | const originalXHRGetResponse = Object.getOwnPropertyDescriptor(XMLHttpRequest.prototype, 'response'); |
1520 | 1536 | let shellshockjs |
|
1554 | 1570 | getVar("RENDERLIST", '&&([a-zA-Z]+\\.getShadowMap\\(\\)\\.renderList)'); |
1555 | 1571 | getVar("GAMEMAP", '>=([a-zA-Z]+)\\.height&&\\(this\\.climbing=!1\\)'); |
1556 | 1572 | 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"'); |
1558 | 1574 | getVar("RAYS", '\\.25\\),([a-zA-Z_$]+)\\.rayCollidesWithPlayer'); |
1559 | 1575 | getVar("GAMECODE", 'gameCode:([a-zA-Z]+)\\|\\|'); |
1560 | 1576 | // getVar("vs", '(vs)'); //todo |
|
1603 | 1619 | //bypass chat filter |
1604 | 1620 | match = new RegExp(`"&&\\s*([a-zA-Z]+)\\.indexOf\\("<"\\)<0`).exec(js)[1]; |
1605 | 1621 | 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+');'); |
1616 | 1630 |
|
1617 | 1631 | //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') |
1618 | 1640 | // js=js.replace('et.booted','et.noboot') |
1619 | 1641 | // js=js.replace('eu(t)','Bc(t)') |
1620 | 1642 | // js=js.replace('vueApp.showPlayerActionsPopup(i)','vueApp.showPlayerActionsPopup(i);console.log(i)') |
|
1715 | 1737 | params=params+"enableSeizureX%3E"+JSON.stringify(extract("botSeizure"))+"," |
1716 | 1738 | params=params+"enableSeizureY%3E"+JSON.stringify(extract("botSeizure"))+"," |
1717 | 1739 |
|
1718 | | - if (extract("botAimbot")) { |
| 1740 | + if (extract("botAimbot")) { //add antisneak |
1719 | 1741 | params=params+"aimbotTargeting%3E"+JSON.stringify(1)+"," |
1720 | 1742 | params=params+"prediction%3E"+JSON.stringify(true)+"," |
1721 | 1743 | params=params+"aimbot%3E"+JSON.stringify(true)+"," |
|
1726 | 1748 | params=params+"enableSeizureY%3E"+JSON.stringify(false)+"," |
1727 | 1749 | }; |
1728 | 1750 |
|
| 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 | + |
1729 | 1757 | params=params+"joinCode%3E%22"+extract("botJoinCode")+"%22"; |
1730 | 1758 | window.open("https://"+proxyURL+"/"+params, '_blank', 'width=450,height=300,left='+leftOffset+',top='+topOffset); |
1731 | 1759 | }; |
|
0 commit comments