|
1 | 1 | // ==UserScript== |
2 | 2 | // @name StateFarm Client V3 |
3 | 3 | // @namespace http://github.com/ |
4 | | -// @version 3.0.1 |
5 | | -// @description Best hack client for shellshockers |
| 4 | +// @version 3.1.1 |
| 5 | +// @description Best cheats menu for Shell Shockers in 2024. Many modules such as Aimbot, PlayerESP, AmmoESP, Chams, Nametags, Join/Leave messages, Chat Filter Disabling, AntiAFK, FOV Slider, Zooming, Co-ords, Player Stats, Auto Refill and many more whilst having unsurpassed customisation options such as binding to any key and easily editable colour scheme - all on the fly! |
6 | 6 | // @author Hydroflame521 and onlypuppy7 |
7 | 7 | // @match *://shellshock.io/* |
8 | 8 | // @match *://algebra.best/* |
|
66 | 66 | (function () { |
67 | 67 | //script info |
68 | 68 | const name="StateFarmClient"; |
69 | | - const version="3.0.1"; |
| 69 | + const version="3.1.1"; |
70 | 70 | //startup sequence |
71 | 71 | const startUp=function() { |
72 | 72 | mainLoop() |
|
1230 | 1230 | transform: translate(-120%, 0); |
1231 | 1231 | opacity: 0; |
1232 | 1232 | } |
1233 | | -
|
1234 | 1233 | to { |
1235 | 1234 | transform: none; |
1236 | 1235 | opacity: 1; |
|
1247 | 1246 | position: absolute; |
1248 | 1247 | left: 10px; |
1249 | 1248 | color: #fff; |
1250 | | - background: rgba(0, 0, 0, 0.6); |
| 1249 | + background: rgba(0, 0, 0, 0.7); |
1251 | 1250 | font-weight: normal; |
1252 | 1251 | padding: 10px; |
1253 | 1252 | border-radius: 5px; |
|
1325 | 1324 | ]; |
1326 | 1325 | return resultRgb; |
1327 | 1326 | }; |
1328 | | - const distancePlayers = function(myPlayer,player) { |
1329 | | - return Math.hypot( player.x - myPlayer.x, player.y - myPlayer.y, player.z - myPlayer.z ); |
| 1327 | + const distancePlayers = function(yourPlayer,player) { |
| 1328 | + return Math.hypot(player.x-yourPlayer.x,player.y-yourPlayer.y,player.z-yourPlayer.z ); //pythagoras' theorem in 3 dimensions. no one owns maths, zert. |
1330 | 1329 | }; |
1331 | 1330 | const isPartialMatch = function(array, searchString) { |
1332 | 1331 | return array.some(item => searchString.toLowerCase().includes(item.toLowerCase())); |
|
1479 | 1478 | console.log(3, injectionString); |
1480 | 1479 | }; |
1481 | 1480 | try { |
1482 | | - getVarName("BABYLON", 'this\\.origin=new ([a-zA-Z]+)\\.Vector3'); //todo |
| 1481 | + getVarName("BABYLON", ';([a-zA-Z]+)\\.TransformNode\\.prototype\\.setVisible'); //done |
1483 | 1482 | getVarName("players", '=([a-zA-Z]+)\\[this\\.controlledBy\\]'); //done |
1484 | | - getVarName("myPlayer", '"fire":document.pointerLockElement&&([^&]+)&&'); //todo |
| 1483 | + getVarName("yourPlayer", '&&([a-zA-Z]+)\\.grenadeCountdown<=0\\)this\\.cancelGrenade'); //done |
1485 | 1484 | getVarName("weapons", ';([a-zA-Z]+)\\.classes=\\[\\{name:"Soldier"'); |
1486 | 1485 | // getVarName("game", 'packInt8\\(([a-zA-Z]+)\\.explode\\),'); |
1487 | 1486 | getVarName("renderList", '&&([a-zA-Z]+\\.getShadowMap\\(\\)\\.renderList)'); |
|
1552 | 1551 | const mainLoop = function() { |
1553 | 1552 | const oneTime = function (ss) { |
1554 | 1553 | crosshairsPosition=new ss.BABYLON.Vector3(); |
1555 | | - Object.defineProperty(ss.myPlayer.scene, 'forceWireframe', { |
| 1554 | + Object.defineProperty(ss.yourPlayer.scene, 'forceWireframe', { |
1556 | 1555 | get: () => { |
1557 | 1556 | return extract("wireframe"); |
1558 | 1557 | } |
|
1565 | 1564 | window.newGame=false; |
1566 | 1565 | }; |
1567 | 1566 |
|
1568 | | - crosshairsPosition.copyFrom(ss.myPlayer.actor.mesh.position); |
1569 | | - const horizontalOffset = Math.sin(ss.myPlayer.actor.mesh.rotation.y); |
1570 | | - const verticalOffset = Math.sin(-ss.myPlayer.pitch); |
| 1567 | + crosshairsPosition.copyFrom(ss.yourPlayer.actor.mesh.position); |
| 1568 | + const horizontalOffset = Math.sin(ss.yourPlayer.actor.mesh.rotation.y); |
| 1569 | + const verticalOffset = Math.sin(-ss.yourPlayer.pitch); |
1571 | 1570 | crosshairsPosition.x += horizontalOffset; |
1572 | | - crosshairsPosition.z += Math.cos(ss.myPlayer.actor.mesh.rotation.y); |
| 1571 | + crosshairsPosition.z += Math.cos(ss.yourPlayer.actor.mesh.rotation.y); |
1573 | 1572 | crosshairsPosition.y += verticalOffset + 0.4; |
1574 | 1573 |
|
1575 | | - ammo=ss.myPlayer.weapon.ammo; |
| 1574 | + ammo=ss.yourPlayer.weapon.ammo; |
1576 | 1575 |
|
1577 | 1576 | whitelistPlayers=extract("whitelist").split(','); |
1578 | 1577 | blacklistPlayers=extract("blacklist").split(','); |
|
1603 | 1602 | if (extract("playerESP")||extract("tracers")||extract("chams")||extract("nametags")||extract("joinMessages")||extract("leaveMessages")) { |
1604 | 1603 | for (let i=0; i<ss.players.length; i++) { |
1605 | 1604 | const player=ss.players[i]; |
1606 | | - if ( player && player !== ss.myPlayer && ( ss.myPlayer.team === 0 || player.team !== ss.myPlayer.team ) ) { |
| 1605 | + if ( player && player !== ss.yourPlayer && ( ss.yourPlayer.team === 0 || player.team !== ss.yourPlayer.team ) ) { |
1607 | 1606 | const whitelisted=(extract("whitelistESPType")=="highlight"||!extract("enableWhitelistTracers")||isPartialMatch(whitelistPlayers,player.name)); |
1608 | 1607 | const blacklisted=(extract("blacklistESPType")=="justexclude"&&extract("enableBlacklistTracers")&&isPartialMatch(blacklistPlayers,player.name)); |
1609 | 1608 | const passedLists=whitelisted&&(!blacklisted); |
|
1615 | 1614 | } else if (extract("enableBlacklistTracers") && extract("blacklistESPType")=="highlight" && isPartialMatch(blacklistPlayers,player.name) ) { |
1616 | 1615 | color=hexToRgb(extract("blacklistColor")); |
1617 | 1616 | } else if ( tracersType=="proximity" ) { |
1618 | | - const distance = distancePlayers(ss.myPlayer,player); |
| 1617 | + const distance = distancePlayers(ss.yourPlayer,player); |
1619 | 1618 | if (distance < extract("tracersColor1to2")) { //fade between first set |
1620 | 1619 | progress=(distance/extract("tracersColor1to2")); |
1621 | 1620 | color=fadeBetweenColors(extract("tracersColor1"),extract("tracersColor2"),progress); |
|
1647 | 1646 | if (extract("nametags") && player.actor && player.actor.nameSprite) { //taken from shellshock.js, so var names are weird |
1648 | 1647 | player.actor.nameSprite._manager.renderingGroupId = 1; |
1649 | 1648 | player.actor.nameSprite.renderingGroupId = 1; |
1650 | | - var h = Math.length3(player.x - ss.myPlayer.x, player.y - ss.myPlayer.y, player.z - ss.myPlayer.z), |
| 1649 | + var h = Math.length3(player.x - ss.yourPlayer.x, player.y - ss.yourPlayer.y, player.z - ss.yourPlayer.z), |
1651 | 1650 | d = Math.pow(h, 1.25)*2; |
1652 | 1651 | player.actor.nameSprite.width = d / 10 + .6, player.actor.nameSprite.height = d / 20 + .3; |
1653 | | - ss.myPlayer.actor.scene.activeCamera.fov=0.75 |
| 1652 | + ss.yourPlayer.actor.scene.activeCamera.fov=0.75 |
1654 | 1653 | }; |
1655 | 1654 | if (!player.logged) { |
1656 | 1655 | player.logged=true; |
|
1707 | 1706 | }; |
1708 | 1707 | } else { //grenades |
1709 | 1708 | const regime=extract("grenadeESPRegime"); |
1710 | | - if (regime=="whendepleted" && ss.myPlayer.grenadeCount==0) { |
| 1709 | + if (regime=="whendepleted" && ss.yourPlayer.grenadeCount==0) { |
1711 | 1710 | willBeVisible=true; |
1712 | | - } else if (regime=="whenlow" && ss.myPlayer.grenadeCount<=1) { |
| 1711 | + } else if (regime=="whenlow" && ss.yourPlayer.grenadeCount<=1) { |
1713 | 1712 | willBeVisible=true; |
1714 | | - } else if (regime=="belowmax" && ss.myPlayer.grenadeCount<ss.myPlayer.grenadeCapacity) { |
| 1713 | + } else if (regime=="belowmax" && ss.yourPlayer.grenadeCount<ss.yourPlayer.grenadeCapacity) { |
1715 | 1714 | willBeVisible=true; |
1716 | 1715 | } else if (regime=="alwayson") { |
1717 | 1716 | willBeVisible=true; |
|
1742 | 1741 | }; |
1743 | 1742 | }; |
1744 | 1743 | window[mainLoopFunction] = function ( ss ) { |
1745 | | - if ( !ss.myPlayer ) { return }; //injection fail |
| 1744 | + if ( !ss.yourPlayer ) { return }; //injection fail |
1746 | 1745 | if ( !ranOneTime ) { oneTime(ss) }; |
1747 | 1746 | initVars(ss); |
1748 | 1747 | framesPassed=framesPassed+1; |
|
1752 | 1751 | }; |
1753 | 1752 |
|
1754 | 1753 | if ( extract("freecam") ) { |
1755 | | - ss.myPlayer.actor.mesh.position.y = ss.myPlayer.actor.mesh.position.y + 1; |
| 1754 | + ss.yourPlayer.actor.mesh.position.y = ss.yourPlayer.actor.mesh.position.y + 1; |
1756 | 1755 | }; |
1757 | 1756 |
|
1758 | 1757 | if ( extract("spamChat") ) { |
|
1763 | 1762 | }; |
1764 | 1763 |
|
1765 | 1764 | if ( extract("showCoordinates") ) { |
1766 | | - const fonx = Number((ss.myPlayer.actor.mesh.position.x).toFixed(3)); |
1767 | | - const fony = Number((ss.myPlayer.actor.mesh.position.y).toFixed(3)); |
1768 | | - const fonz = Number((ss.myPlayer.actor.mesh.position.z).toFixed(3)); |
| 1765 | + const fonx = Number((ss.yourPlayer.actor.mesh.position.x).toFixed(3)); |
| 1766 | + const fony = Number((ss.yourPlayer.actor.mesh.position.y).toFixed(3)); |
| 1767 | + const fonz = Number((ss.yourPlayer.actor.mesh.position.z).toFixed(3)); |
1769 | 1768 | const personalCoordinate = `XYZ: ${fonx}, ${fony}, ${fonz}`; |
1770 | 1769 | coordElement.innerText = personalCoordinate; |
1771 | 1770 | void coordElement.offsetWidth; |
|
1777 | 1776 | for ( let i = 0; i < ss.players.length; i ++ ) { |
1778 | 1777 | const player = ss.players[i]; |
1779 | 1778 | globalPlayer=ss; |
1780 | | - if ( player && player !== ss.myPlayer && player.playing && ( ss.myPlayer.team === 0 || player.team !== ss.myPlayer.team ) ) { |
| 1779 | + if ( player && player !== ss.yourPlayer && player.playing && ( ss.yourPlayer.team === 0 || player.team !== ss.yourPlayer.team ) ) { |
1781 | 1780 | playerStates=playerStates+player.name+": "+Math.round(player.hp)+" HP\n"; |
1782 | 1781 | }; |
1783 | 1782 | }; |
|
1792 | 1791 | } |
1793 | 1792 | if ( extract("autoRefill") ) { |
1794 | 1793 | if (ammo.rounds==0) { |
1795 | | - ss.myPlayer.reload(); |
| 1794 | + ss.yourPlayer.reload(); |
1796 | 1795 | }; |
1797 | 1796 | // console.log("round",t.rounds); |
1798 | 1797 | // console.log("capacity",t.capacity); |
1799 | 1798 | } |
1800 | 1799 |
|
1801 | | - if (extract("aimbot") && ( extract("aimbotRightClick") ? isRightButtonDown : true ) && ss.myPlayer.playing) { |
| 1800 | + if (extract("aimbot") && ( extract("aimbotRightClick") ? isRightButtonDown : true ) && ss.yourPlayer.playing) { |
1802 | 1801 | if (!extract("lockOn") || !currentlyTargeting) { |
1803 | 1802 | currentlyTargeting=false |
1804 | 1803 | const targetType=extract("aimbotTargeting"); |
1805 | 1804 | let minimumValue = Infinity; |
1806 | 1805 | for ( let i = 0; i < ss.players.length; i ++ ) { |
1807 | 1806 | const player = ss.players[ i ]; |
1808 | | - if ( player && player !== ss.myPlayer && player.playing && ( ss.myPlayer.team === 0 || player.team !== ss.myPlayer.team ) ) { |
| 1807 | + if ( player && player !== ss.yourPlayer && player.playing && ( ss.yourPlayer.team === 0 || player.team !== ss.yourPlayer.team ) ) { |
1809 | 1808 | const whitelisted=(!extract("enableWhitelistAimbot")||extract("enableWhitelistAimbot")&&isPartialMatch(whitelistPlayers,player.name)); |
1810 | 1809 | const blacklisted=(extract("enableBlacklistAimbot")&&isPartialMatch(blacklistPlayers,player.name)); |
1811 | 1810 | const passedLists=whitelisted&&(!blacklisted); |
1812 | 1811 | if (passedLists) { |
1813 | 1812 | if (targetType=="nearest") { |
1814 | | - const distance = distancePlayers(ss.myPlayer,player); |
| 1813 | + const distance = distancePlayers(ss.yourPlayer,player); |
1815 | 1814 | if ( distance < minimumValue ) { |
1816 | 1815 | minimumValue = distance; |
1817 | 1816 | currentlyTargeting = player; |
1818 | 1817 | }; |
1819 | 1818 | } else if (targetType=="pointingat") { |
1820 | 1819 | // Calculate the direction vector pointing to the player |
1821 | 1820 | const directionToPlayer = new ss.BABYLON.Vector3( |
1822 | | - player.actor.mesh.position.x - ss.myPlayer.actor.mesh.position.x, |
1823 | | - player.actor.mesh.position.y - ss.myPlayer.actor.mesh.position.y, |
1824 | | - player.actor.mesh.position.z - ss.myPlayer.actor.mesh.position.z |
| 1821 | + player.actor.mesh.position.x - ss.yourPlayer.actor.mesh.position.x, |
| 1822 | + player.actor.mesh.position.y - ss.yourPlayer.actor.mesh.position.y, |
| 1823 | + player.actor.mesh.position.z - ss.yourPlayer.actor.mesh.position.z |
1825 | 1824 | ); |
1826 | 1825 | // Calculate the angles between the direction vector and the player vector |
1827 | | - const angleYaw = Math.radAdd( |
1828 | | - Math.atan2(directionToPlayer.x, directionToPlayer.z),0 |
1829 | | - ); |
| 1826 | + const angleYaw = Math.radAdd(Math.atan2(directionToPlayer.x, directionToPlayer.z),0); |
1830 | 1827 | const anglePitch = -Math.atan2( |
1831 | 1828 | directionToPlayer.y, |
1832 | 1829 | Math.hypot(directionToPlayer.x, directionToPlayer.z) |
1833 | 1830 | ); |
1834 | 1831 | // Calculate the absolute angular difference |
1835 | | - const angleDifference = Math.abs(ss.myPlayer.yaw - angleYaw) + Math.abs(ss.myPlayer.pitch - anglePitch); |
| 1832 | + const angleDifference = Math.abs(ss.yourPlayer.yaw - angleYaw) + Math.abs(ss.yourPlayer.pitch - anglePitch); |
1836 | 1833 | if (angleDifference < minimumValue) { |
1837 | 1834 | minimumValue = angleDifference; |
1838 | 1835 | currentlyTargeting = player; |
|
1847 | 1844 | y=currentlyTargeting.actor.mesh.position.y |
1848 | 1845 | z=currentlyTargeting.actor.mesh.position.z; |
1849 | 1846 | if (extract("prediction")) { |
1850 | | - const distanceBetweenPlayers=distancePlayers(ss.myPlayer,currentlyTargeting); |
1851 | | - const bulletSpeed=ss.weapons.classes[ss.myPlayer.primaryWeaponItem.exclusive_for_class].weapon.velocity; |
| 1847 | + const distanceBetweenPlayers=distancePlayers(ss.yourPlayer,currentlyTargeting); |
| 1848 | + const bulletSpeed=ss.weapons.classes[ss.yourPlayer.primaryWeaponItem.exclusive_for_class].weapon.velocity; |
1852 | 1849 | const timeToReachTarget = distanceBetweenPlayers / bulletSpeed; |
1853 | 1850 | x = x + currentlyTargeting.dx * timeToReachTarget; |
1854 | 1851 | z = z + currentlyTargeting.dz * timeToReachTarget; |
|
1858 | 1855 | y = y + currentlyTargeting.dy * timeToReachTarget; |
1859 | 1856 | }; |
1860 | 1857 | }; |
1861 | | - x = x - ss.myPlayer.actor.mesh.position.x; |
1862 | | - y = y - ss.myPlayer.actor.mesh.position.y; |
1863 | | - z = z - ss.myPlayer.actor.mesh.position.z; |
| 1858 | + x = x - ss.yourPlayer.actor.mesh.position.x; |
| 1859 | + y = y - ss.yourPlayer.actor.mesh.position.y; |
| 1860 | + z = z - ss.yourPlayer.actor.mesh.position.z; |
1864 | 1861 |
|
1865 | | - const finalYaw = (Math.log(Math.abs(x) + Math.sqrt(z ** 2)) / Math.log(2)) + 0; |
1866 | | - const finalPitch = -Math.acos(y / Math.sqrt(x ** 2 + z ** 2)) % 1.5; |
| 1862 | + const finalYaw = Math.radAdd(Math.atan2(x,z),0); |
| 1863 | + const finalPitch = -Math.atan2(y,Math.hypot(x,z))%1.5; |
1867 | 1864 |
|
1868 | 1865 | const antiSnap=1-(extract("aimbotAntiSnap")||0); |
1869 | 1866 | function lerp(start, end, alpha) { |
|
1872 | 1869 | value=end |
1873 | 1870 | }; |
1874 | 1871 | return value |
1875 | | - } |
| 1872 | + }; |
1876 | 1873 | // Exponential lerp towards the target rotation |
1877 | | - ss.myPlayer.yaw = lerp(ss.myPlayer.yaw, finalYaw, antiSnap); |
1878 | | - ss.myPlayer.pitch = lerp(ss.myPlayer.pitch, finalPitch, antiSnap); |
| 1874 | + ss.yourPlayer.yaw = lerp(ss.yourPlayer.yaw, finalYaw, antiSnap); |
| 1875 | + ss.yourPlayer.pitch = lerp(ss.yourPlayer.pitch, finalPitch, antiSnap); |
1879 | 1876 | if (extract("tracers")) { |
1880 | 1877 | currentlyTargeting.tracerLines.color = new ss.BABYLON.Color3(...hexToRgb(extract("aimbotColor"))); |
1881 | | - } |
| 1878 | + }; |
1882 | 1879 | if (extract("playerESP")) { |
1883 | 1880 | const boxMaterial = currentlyTargeting.box.material; |
1884 | 1881 | boxMaterial.emissiveColor = boxMaterial.diffuseColor = new ss.BABYLON.Color3(...hexToRgb(extract("aimbotColor"))); |
1885 | | - } |
| 1882 | + }; |
1886 | 1883 | if (extract("autoFire")) { |
1887 | 1884 | if (ammo.capacity>0) { |
1888 | | - ss.myPlayer.pullTrigger(); |
| 1885 | + ss.yourPlayer.pullTrigger(); |
1889 | 1886 | } else { |
1890 | | - ss.myPlayer.melee(); |
| 1887 | + ss.yourPlayer.melee(); |
1891 | 1888 | }; |
1892 | 1889 | }; |
1893 | 1890 | } else { |
|
0 commit comments