🏠 Home 

Shell Shockers Aimbot & ESP: StateFarm Client V3 - Bloom, Chat, Botting, Unban & More, shellshock.io

Shell Shockers Aimbot & ESP of the highest level. Best shellshock.io menu in 2025 with NO ADS! Many cheats such as Aimbot, PlayerESP, AmmoESP, Chams, Nametags, Join/Leave alerts, Chat Filter Bypass, AntiAFK, FOV Slider, Zooming, Player Stats, Auto Reload, Auto Unban and many more whilst having unsurpassed customisation options such as binding to any key, easily editable color scheme and themes - all on the fly!


Install this script?
  1. // ==UserScript==
  2. // @name Shell Shockers Aimbot & ESP: StateFarm Client V3 - Bloom, Chat, Botting, Unban & More, shellshock.io
  3. // @description Shell Shockers Aimbot & ESP of the highest level. Best shellshock.io menu in 2025 with NO ADS! Many cheats such as Aimbot, PlayerESP, AmmoESP, Chams, Nametags, Join/Leave alerts, Chat Filter Bypass, AntiAFK, FOV Slider, Zooming, Player Stats, Auto Reload, Auto Unban and many more whilst having unsurpassed customisation options such as binding to any key, easily editable color scheme and themes - all on the fly!
  4. // @author Hydroflame521, onlypuppy7, enbyte, notfood, 1ust, OakSwingZZZ, Seq and de_Neuublue
  5. // @namespace http://github.com/Hydroflame522/StateFarmClient/
  6. // @supportURL http://github.com/Hydroflame522/StateFarmClient/issues/
  7. // @license GPL-3.0
  8. // @run-at document-start
  9. // @grant GM_setValue
  10. // @grant GM_getValue
  11. // @grant GM_deleteValue
  12. // @grant GM_listValues
  13. // @grant GM_info
  14. // @grant GM_setClipboard
  15. // @grant GM_openInTab
  16. // @grant GM.setValue
  17. // @grant GM.getValue
  18. // @grant GM.deleteValue
  19. // @grant GM.listValues
  20. // @grant GM.info
  21. // @grant GM.setClipboard
  22. // @grant GM.openInTab
  23. // @icon https://raw.githubusercontent.com/Hydroflame522/StateFarmClient/main/icons/StateFarmClientLogo384px.png?v=1
  24. // @require https://cdn.jsdelivr.net/npm/tweakpane@3.1.10/dist/tweakpane.min.js
  25. // version naming:
  26. //3.#.#-pre[number] for development versions, increment for every commit (not full release) note: please increment it
  27. //3.#.#-release for release (in the unlikely event that happens)
  28. // this ensures that each version of the script is counted as different
  29. // @version 3.4.2-pre7
  30. // @match *://*.shellshock.io/*
  31. // @match *://*.shell.onlypuppy7.online/*
  32. // @match *://*.algebra.best/*
  33. // @match *://*.algebra.monster/*
  34. // @match *://*.algebra.vip/*
  35. // @match *://*.biologyclass.club/*
  36. // @match *://*.combateggs.com/*
  37. // @match *://*.deadlyegg.com/*
  38. // @match *://*.deathegg.life/*
  39. // @match *://*.deathegg.world/*
  40. // @match *://*.eggbattle.com/*
  41. // @match *://*.eggboy.club/*
  42. // @match *://*.eggboy.me/*
  43. // @match *://*.eggboy.xyz/*
  44. // @match *://*.eggcombat.com/*
  45. // @match *://*.egg.dance/*
  46. // @match *://*.eggfacts.fun/*
  47. // @match *://*.egggames.best/*
  48. // @match *://*.egghead.institute/*
  49. // @match *://*.eggisthenewblack.com/*
  50. // @match *://*.eggsarecool.com/*
  51. // @match *://*.eggshock.com/*
  52. // @match *://*.eggshock.me/*
  53. // @match *://*.eggshock.net/*
  54. // @match *://*.eggshooter.best/*
  55. // @match *://*.eggshooter.com/*
  56. // @match *://*.eggwarfare.com/*
  57. // @match *://*.eggwars.io/*
  58. // @match *://*.geometry.best/*
  59. // @match *://*.geometry.monster/*
  60. // @match *://*.geometry.pw/*
  61. // @match *://*.geometry.report/*
  62. // @match *://*.hardboiled.life/*
  63. // @match *://*.hardshell.life/*
  64. // @match *://*.humanorganising.org/*
  65. // @match *://*.mathactivity.club/*
  66. // @match *://*.mathactivity.xyz/*
  67. // @match *://*.mathdrills.info/*
  68. // @match *://*.mathdrills.life/*
  69. // @match *://*.mathfun.rocks/*
  70. // @match *://*.mathgames.world/*
  71. // @match *://*.math.international/*
  72. // @match *://*.mathlete.fun/*
  73. // @match *://*.mathlete.pro/*
  74. // @match *://*.overeasy.club/*
  75. // @match *://*.risenegg.com/*
  76. // @match *://*.scrambled.tech/*
  77. // @match *://*.scrambled.today/*
  78. // @match *://*.scrambled.us/*
  79. // @match *://*.scrambled.world/*
  80. // @match *://*.shellgame.me/*
  81. // @match *://*.shellplay.live/*
  82. // @match *://*.shellshockers.best/*
  83. // @match *://*.shellshockers.ca/*
  84. // @match *://*.shellshockers.club/*
  85. // @match *://*.shellshockers.life/*
  86. // @match *://*.shellshockers.site/*
  87. // @match *://*.shellshockers.today/*
  88. // @match *://*.shellshockers.us/*
  89. // @match *://*.shellshockers.website/*
  90. // @match *://*.shellshockers.wiki/*
  91. // @match *://*.shellshockers.world/*
  92. // @match *://*.shellshockers.xyz/*
  93. // @match *://*.shellshock.guru/*
  94. // @match *://*.shellsocks.com/*
  95. // @match *://*.softboiled.club/*
  96. // @match *://*.urbanegger.com/*
  97. // @match *://*.violentegg.club/*
  98. // @match *://*.violentegg.fun/*
  99. // @match *://*.yolk.best/*
  100. // @match *://*.yolk.life/*
  101. // @match *://*.yolk.monster/*
  102. // @match *://*.yolk.rocks/*
  103. // @match *://*.yolk.tech/*
  104. // @match *://*.yolk.quest/*
  105. // @match *://*.yolk.today/*
  106. // @match *://*.zygote.cafe/*
  107. // @match *://getstate.farm/*
  108. // @match *://localhost:5173/*
  109. // ==/UserScript==
  110. let attemptedInjection = false;
  111. // log("StateFarm: running (before function)");
  112. (function () {
  113. if (location.hostname == 'getstate.farm' || location.hostname == 'localhost') {
  114. unsafeWindow.userscript = typeof GM_info !== 'undefined' ? GM_info : false;
  115. return;
  116. }
  117. if (typeof isCrackedShell !== 'undefined') alert('CrackedShell v1 is no longer supported. Upgrade to v2.');
  118. let crackedShell = typeof $WEBSOCKET !== 'undefined';
  119. if (crackedShell) {
  120. GM_getValue = (name) => {
  121. try {
  122. return JSON.parse(localStorage.getItem(name));
  123. } catch {
  124. return localStorage.getItem(name);
  125. };
  126. };
  127. GM_setValue = (name, value) => {
  128. if (typeof value === 'object') localStorage.setItem(name, JSON.stringify(value));
  129. else localStorage.setItem(name, value);
  130. };
  131. GM_listValues = () => localStorage;
  132. GM_deleteValue = (...a) => localStorage.removeItem(...a);
  133. GM_openInTab = (link) => window.open(link, '_blank');
  134. GM_setClipboard = (text, _, callback) => navigator.clipboard.writeText(text).then(() => callback());
  135. unsafeWindow = window;
  136. };
  137. const storageKey = "StateFarm_" + (unsafeWindow.document.location.host.replaceAll(".", "")) + "_";
  138. const log = function(...args) {
  139. let condition;
  140. try {
  141. condition = extract("consoleLogs");
  142. } catch (error) {
  143. condition = GM_getValue(storageKey + "DisableLogs");
  144. };
  145. if (!condition) {
  146. console.log(...args);
  147. };
  148. };
  149. let originalReplace = String.prototype.replace;
  150. let originalReplaceAll = String.prototype.replaceAll;
  151. String.prototype.originalReplace = function () {
  152. return originalReplace.apply(this, arguments);
  153. };
  154. String.prototype.originalReplaceAll = function () {
  155. return originalReplaceAll.apply(this, arguments);
  156. };
  157. log("StateFarm: running (after function)");
  158. //script info
  159. const name = "ЅtateFarm Client";
  160. const version = typeof (GM_info) !== 'undefined' ? GM_info.script.version : "3";
  161. const menuTitle = name + " v" + version;
  162. //INIT WEBSITE LINKS: store them here so they are easy to maintain and update!
  163. const discordURL = "https://dsc.gg/sfnetwork";
  164. const githubURL = "https://github.com/Hydroflame522/StateFarmClient";
  165. const downloadURL = "https://update.greasyfork.org/scripts/482982/Shell%20Shockers%20Aimbot%20%20ESP%3A%20StateFarm%20Client%20V3%20-%20Cheats%20For%20Bloom%2C%20Chat%2C%20Botting%2C%20Unbanning%20%20More.user.js";
  166. const updateURL = "https://update.greasyfork.org/scripts/482982/Shell%20Shockers%20Aimbot%20%20ESP%3A%20StateFarm%20Client%20V3%20-%20Cheats%20For%20Bloom%2C%20Chat%2C%20Botting%2C%20Unbanning%20%20More.meta.js";
  167. const scriptInfoURL = "https://greasyfork.org/scripts/482982.json";
  168. const featuresGuideURL = "https://github.com/Hydroflame522/StateFarmClient/tree/main?tab=readme-ov-file#-features";
  169. const bottingGuideURL = "https://github.com/Hydroflame522/StateFarmClient/tree/main?tab=readme-ov-file#-botting";
  170. const violentmonkeyURL = "https://violentmonkey.github.io/get-it/";
  171. const babylonURL = "https://cdn.jsdelivr.net/npm/babylonjs@{0}/babylon.min.js";
  172. const replacementLogoURL = "https://cdn.jsdelivr.net/gh/Hydroflame522/StateFarmClient@main/icons/shell-logo-replacement.png";
  173. const replacementLogoHalloweenURL = "https://cdn.jsdelivr.net/gh/Hydroflame522/StateFarmClient@main/icons/shell-logo-replacement-halloween.png";
  174. const replacementLogoChristmasURL = "https://cdn.jsdelivr.net/gh/Hydroflame522/StateFarmClient@main/icons/shell-logo-replacement-christmas.png";
  175. const replacementLogoNewYearsURL = "https://cdn.jsdelivr.net/gh/Hydroflame522/StateFarmClient@main/icons/shell-logo-replacement-new-years.png";
  176. const replacementFeedURL = "https://raw.githubusercontent.com/Hydroflame522/StateFarmClient/main/ingamefeeds/";
  177. const commitFeedURL = "https://api.github.com/repos/Hydroflame522/StateFarmClient/commits?path=StateFarmClient.js";
  178. const badgeListURL = "https://cdn.jsdelivr.net/gh/Hydroflame522/StateFarmClient@main/ingamebadges/";
  179. const iconURL = "https://cdn.jsdelivr.net/gh/Hydroflame522/StateFarmClient@main/icons/StateFarmClientLogo384px.png";
  180. const itsOverURL = "https://cdn.jsdelivr.net/gh/Hydroflame522/StateFarmClient@main/assets/its%20over/ItsOver4Smaller.png";
  181. const sfxURL = "https://api.github.com/repos/Hydroflame522/StateFarmClient/contents/soundpacks/sfx";
  182. const skyboxListURL = "https://api.github.com/repos/Hydroflame522/StateFarmClient/contents/skyboxes/";
  183. const shellPrintURL = 'https://shellprint.villainsrule.xyz/v3/account?key=';
  184. const jsArchiveURL = "https://cdn.jsdelivr.net/gh/onlypuppy7/ShellShockJSArchives@main/js_archive/";
  185. const clientKeysURL = "https://raw.githubusercontent.com/StateFarmNetwork/client-keys/main/statefarm_";
  186. const sfChatURL = "https://raw.githack.com/OakSwingZZZ/StateFarmChatFiles/main/index.html";
  187. //startup sequence
  188. const startUp = function () {
  189. log("StateFarm: detectURLParams()");
  190. detectURLParams();
  191. log("StateFarm: mainLoop()");
  192. mainLoop();
  193. log("StateFarm: injectScript()");
  194. injectScript();
  195. document.addEventListener("DOMContentLoaded", function () {
  196. onContentLoaded();
  197. log("StateFarm: DOMContentLoaded, ran onContentLoaded, fetching sfx");
  198. try {
  199. log("fetching badge list...", badgeListURL + "badges.json");
  200. badgeList = fetchTextContent(badgeListURL + "badges.json");
  201. badgeList = JSON.parse(badgeList);
  202. log(badgeList);
  203. } catch (error) {
  204. log("couldnt fetch badge list :(");
  205. };
  206. try {
  207. log("fetching greasyfork info...", scriptInfoURL);
  208. scriptInfo = fetchTextContent(scriptInfoURL);
  209. scriptInfo = JSON.parse(scriptInfo);
  210. log(scriptInfo);
  211. } catch (error) {
  212. log("couldnt fetch greasyfork info :(");
  213. };
  214. let oldVersion = load("version");
  215. save("version", version);
  216. if (extract("statefarmUpdates")) {
  217. const maxAttempts = 30;
  218. const interval = 500;
  219. let attempts = 0;
  220. const checkForElement = function() {
  221. const existingContainer = document.querySelector('.secondary-aside-wrap');
  222. if (existingContainer) {
  223. log('Element found:', existingContainer);
  224. createAndAppendCommitHistoryBox(existingContainer);
  225. } else if (attempts < maxAttempts) {
  226. attempts++;
  227. // log(`Attempt ${attempts}/${maxAttempts} failed. Retrying...`);
  228. setTimeout(checkForElement, interval); //retry after interval
  229. } else {
  230. log('Element not found after maximum attempts');
  231. }
  232. };
  233. const createAndAppendCommitHistoryBox = function(existingContainer) {
  234. let commitHistoryBox = document.createElement('div');
  235. commitHistoryBox.className = 'media-tabs-wrapper box_relative border-blue5 roundme_sm bg_blue6 common-box-shadow ss_margintop_sm';
  236. let commitHistoryContent = `
  237. <div class="media-tab-container display-grid align-items-center gap-sm bg_blue3">
  238. <h4 class="common-box-shadow text-shadow-black-40 text_white dynamic-text" style="display: flex; align-items: center;">
  239. <div class="dynamic-text" style="width: 10em; font-size: 1em;">
  240. <div class="dynamic-text" style="font-size: 1em;">StateFarm Updates</div>
  241. </div>
  242. <a href="${discordURL}" target="_blank" style="text-decoration: none; margin-left: auto;">
  243. <button class="ss_button btn_blue bevel_blue box_relative pause-screen-ui btn-account-w-icon text-shadow-none text_blue1" style="font-size: 0.75em; display: flex; align-items: center; padding: 0.5em 1em; width: 12em; margin-left: -3em;">
  244. <i class="fab fa-discord" style="font-size: 1.2em; margin-right: 0.5em;"></i>
  245. <span>Join Discord</span>
  246. </button>
  247. </a>
  248. </h4>
  249. </div>
  250. <div class="media-tabs-content f_col">
  251. <div class="tab-content ss_paddingright ss_paddingleft">
  252. <div class="news-container f_col v_scroll" style="height: 20em; overflow-y: auto;">
  253. `;
  254. let disablePlayButton = vueApp.disablePlayButton;
  255. vueApp.disablePlayButton = (isDisabled) => {
  256. log('called disablePlayButton, so we are handling the statefarm updates box')
  257. if (isDisabled) commitHistoryBox.style.display = 'none';
  258. else commitHistoryBox.style.display = '';
  259. return disablePlayButton(isDisabled);
  260. };
  261. fetch(commitFeedURL).then(response => {
  262. if (response.ok) return response.json();
  263. else throw new Error('Failed to fetch commit history contents');
  264. }).then(commitHistory => {
  265. log("retrieved: commit history", commitHistory);
  266. if (oldVersion !== version) {
  267. commitHistoryContent += `
  268. <a href="${githubURL}" target="_blank" style="text-decoration: none;">
  269. <div class="updated-notice" style="background-color: #28a745; color: #fff; padding: 0.75em; text-align: center; font-weight: bold; margin-bottom: 0.15em; margin-top: 0.25em; border-radius: 10px; border: 2px solid #155724;">
  270. <p style="margin: 0; font-size: 0.95em;">🎉 StateFarm has been updated (v${version})! Check out the latest updates below.</p>
  271. </div>
  272. </a>
  273. `;
  274. }
  275. if (scriptInfo && scriptInfo.version && scriptInfo.version !== version && typeof (GM_info) !== 'undefined') {
  276. commitHistoryContent += `
  277. <a href="${downloadURL}" target="_blank" style="text-decoration: none;">
  278. <div class="attention-notice" style="background-color: #ffcc00; color: #000; padding: 0.75em; text-align: center; font-weight: bold; margin-bottom: 0.15em; margin-top: 0.25em; border-radius: 5px; border: 2px solid #ffff00;">
  279. <p style="margin: 0; font-size: 0.95em;">🚨 A new update for StateFarm is available (v${scriptInfo.version})! Click to install it.</p>
  280. </div>
  281. </a>
  282. `;
  283. }
  284. commitHistory.forEach(commit => {
  285. const commitDate = new Date(commit.commit.author.date).toLocaleString();
  286. const authorProfileURL = `https://github.com/${commit.author.login}`; //replace with actual url if available
  287. const messageParts = commit.commit.message.split('\n\n', 2); //split by the first occurrence of '\n\n'
  288. const title = messageParts[0]; //title part of the message
  289. const description = messageParts[1] || ''; //description part of the message, defaults to empty string if not present
  290. commitHistoryContent += `
  291. <div class="commit-item" style="padding: 0.2em 0.3em; background-color: #95e2fe; border-bottom: 2px solid #0B93BD;">
  292. <div style="display: flex; align-items: flex-start;">
  293. <a href="${authorProfileURL}" target="_blank" style="margin-right: 0.3em; display: flex; align-items: flex-start;">
  294. <img src="${commit.author.avatar_url}" alt="${commit.author.login}" style="width: 24px; height: 24px; border-radius: 50%;">
  295. </a>
  296. <div style="display: flex; flex-direction: column; justify-content: flex-start;">
  297. <a href="${commit.html_url}" target="_blank" style="color: #0E7697; text-decoration: none; font-size: 0.75em; font-weight: bold; line-height: 1.2;">
  298. ${title}
  299. </a>
  300. ${description ? `<p style="color: #0B93BD; font-size: 0.65em; margin: 0; line-height: 1.2;">${description}</p>` : ''}
  301. <span style="color: white; font-size: 0.75em; font-weight: bold;">
  302. by <a href="${authorProfileURL}" target="_blank" style="color: #0E7697; text-decoration: none; font-size: 0.75em;">${commit.author.login}</a> on ${commitDate}
  303. </span>
  304. </div>
  305. </div>
  306. </div>
  307. `;
  308. });
  309. commitHistoryContent += `
  310. </div>
  311. </div>
  312. </div>
  313. `;
  314. commitHistoryBox.innerHTML = commitHistoryContent;
  315. existingContainer.appendChild(commitHistoryBox);
  316. }).catch(error => {
  317. log('Error:', error);
  318. });
  319. };
  320. checkForElement();
  321. };
  322. (async () => {
  323. try {
  324. var response = await fetch(sfxURL);
  325. if (!response.ok) throw new Error('Failed to fetch folder contents (custom sfx)');
  326. var data = await response.json();
  327. data.forEach((file) => {
  328. retrievedSFX.push({ text: file.name.replace(".zip", ""), value: btoa(file.download_url) });
  329. });
  330. //1ust i hated your implementation and this is me showing that i reached my breaking point.
  331. var response = await fetch(skyboxListURL); //when the nice guy loses his temper
  332. if (!response.ok) throw new Error('Failed to fetch folder contents (custom skyboxes)');
  333. var data = await response.json();
  334. data.forEach((folder) => {
  335. if (folder.type === "dir") {
  336. let url = folder.url;
  337. //make it into a download url
  338. url = url.replace("//api.github.com/repos/", "//raw.githubusercontent.com/");
  339. url = url.replace("/contents/", "/master/");
  340. url = `${url.split("?")[0]}/`;
  341. log(folder.name, url, folder);
  342. loadedSkyboxes.push({
  343. text: folder.name,
  344. value: btoa(url)
  345. });
  346. };
  347. });
  348. initMenu(false);
  349. tp.mainPanel.hidden = extract("hideAtStartup");
  350. } catch (error) {
  351. console.error('Error:', error);
  352. initMenu(false);
  353. tp.mainPanel.hidden = extract("hideAtStartup");
  354. };
  355. })();
  356. });
  357. };
  358. //INIT VARS
  359. const inbuiltPresets = { //Don't delete onlypuppy7's Config
  360. "onlypuppy7's Config": `sfChatNotifications>true<sfChatNotificationSound>true<sfChatAutoStart>true<sfChatInvitations>true<aimbot>true<aimbotTargetMode>0<aimbotVisibilityMode>1<aimbotRightClick>true<silentAimbot>false<aimbSemiSilent>false<noWallTrack>false<prediction>true<antiBloom>true<antiSwitch>false<oneKill>false<aimbotMinAngle>360<antiSneak>1.8<aimbotAntiSnap>0<aimbotAntiSnapRegime>3<maxAimTime>64<autoRefill>true<smartRefill>true<enableAutomatic>true<enableAutoFire>true<autoFireType>3<autoFireAccuracy>0.05<grenadeMax>true<grenadePower>1<playerESP>true<tracers>true<chams>false<trajectories>true<predictionESP>false<nametags>true<nametagInfo>false<nametagInfoInterval>5<aimbotColor>"#0000ff"<aimbotRainbow>false<tracersType>2<tracersColor1Rainbow>true<tracersColor1>"#ff0000"<tracersColor2>"#00ff00"<tracersColor3>"#ffffff"<tracersColor1to2>5<tracersColor2to3>15<predictionESPColor>"#ff0000"<predictionESPColorRainbow>false<ammoESP>true<ammoTracers>false<ammoESPRegime>1<ammoESPColor>"#ffff00"<grenadeESP>true<grenadeTracers>false<grenadeESPRegime>2<grenadeESPColor>"#00ffff"<lookTracers>false<lookTracersRGI1>false<lookTracersColor>"#00ffff"<fov>120<zoom>15<perspective>0<perspectiveY>0.5<perspectiveZ>2<freecam>false<wireframe>false<particleSpeedMultiplier>0.35<eggSize>1<setDetail>0<enableTextures>true<renderDelay>0<revealBloom>true<showLOS>true<showMinAngle>true<highlightLeaderboard>true<showCoordinates>true<radar>false<playerStats>true<playerInfo>true<gameInfo>true<showStreams>true<minimap>false<minimapZoom>5<minimapSize>1<chatExtend>true<chatHighlight>false<maxChat>10<disableChatFilter>true<unfilterNames>true<chatFilterBypass>false<tallChat>false<fakeMessageID>0<fakeMessageText>"dsc.gg/s𝖿network: ЅtateFarm Client v3.4.1-pre154 On Top! "<fakeMessageBold>false<spamChat>false<spamChatDelay>500<spamChatText>"dsc.gg/s𝖿network: ЅtateFarm Client v3.4.1-pre154 On Top! "<mockMode>false<announcer>false<autoEZ>false<cheatAccuse>false<joinMessages>true<leaveMessages>true<publicBroadcast>false<joinLeaveBranding>false<whitelist>"User-1, User-2"<enableWhitelistAimbot>false<enableWhenNoneVisible>false<enableWhitelistTracers>false<whitelistESPType>0<whitelistColor>"#e80aac"<blacklist>"User-1, User-2"<enableBlacklistAimbot>false<enableBlacklistTracers>false<blacklistESPType>0<blacklistColor>"#00ff00"<bunnyhop>true<autoWalk>false<autoStrafe>false<autoJump>false<autoJumpDelay>1<autoWeapon>0<autoGrenade>false<autoJoin>false<joinCode>"CODE"<useCustomName>false<usernameAutoJoin>"ЅtateFarmer"<autoRespawn>false<autoTeam>0<gameBlacklist>false<gameBlacklistCodes>""<leaveEmpty>false<autoLeave>false<autoLeaveDelay>300<autoGamemode>0<autoRegion>0<eggColor>14<autoStamp>0<autoHat>0<skybox>1<randomSkyBox>true<randomSkyBoxInterval>5.9<legacyModels>true<filter>0<gunPosition>true<bobModifierEnabled>true<bobModifier>0.25<bobModifierWhenStill>true<muteGame>false<distanceMult>1.5<customSFX1>3<customSFX2>4<customSFX3>5<replaceLogo>true<titleAnimation>true<themeType>5<partyLightsEnabled>true<partyLightsIntensity>1.87<worldFlattening>1<loginEmailPass>"ssss"<loginDatabaseSelection>1<autoLogin>0<accountGmail>"example (NO @gmail.com)"<accountPass>"password69"<accountRecordsLogging>false<shellPrintKey>""<autoUnban>true<adBlock>true<spoofVIP>true<noAnnoyances>true<noTrack>true<antiAFK>true<quickRespawn>true<statefarmUpdates>true<replaceFeeds>true<customBadges>true<unlockSkins>false<adminSpoof>false<autoChickenWinner>true<chickenWinnerNotifs>true<customMacro>"log('cool');"<autoMacro>false<silentRoll>false<enableSeizureX>false<amountSeizureX>2<enableSeizureY>false<amountSeizureY>2<vardataFallback>0<vardataType>0<vardataCustom>"{}"<hideAtStartup>false<consoleLogs>false<popups>true<tooltips>true<enablePanic>true<panicURL>"https://classroom.google.com/"<selectedPreset>0<debug>false`,
  361. "OP7 + Server Hopper": `sfChatNotifications>true<sfChatNotificationSound>true<sfChatAutoStart>true<aimbot>true<aimbotTargetMode>0<aimbotVisibilityMode>1<aimbotRightClick>true<silentAimbot>false<aimbSemiSilent>false<noWallTrack>false<prediction>true<antiBloom>true<antiSwitch>true<oneKill>true<aimbotMinAngle>174<aimbotAntiSnap>0.75<antiSneak>1.8<aimbotColor>"#0000ff"<autoRefill>true<smartRefill>true<enableAutoFire>true<autoFireType>3<grenadeMax>true<playerESP>true<tracers>true<chams>false<nametags>true<targets>false<predictionESP>false<tracersType>0<tracersColor1>"#ff0000"<tracersColor2>"#00ff00"<tracersColor3>"#ffffff"<tracersColor1to2>5<tracersColor2to3>15<predictionESPColor>"#ff0000"<ammoESP>true<ammoTracers>false<ammoESPRegime>1<ammoESPColor>"#ffff00"<grenadeESP>true<grenadeTracers>false<grenadeESPRegime>2<grenadeESPColor>"#00ffff"<lookTracers>false<lookTracersRGI1>false<lookTracersColor>"#00ffff"<fov>120<zoom>15<perspective>0<perspectiveAlpha>false<perspectiveY>0.5<perspectiveZ>2<freecam>false<wireframe>false<particleSpeedMultiplier>0.35<eggSize>1<setDetail>0<enableTextures>true<renderDelay>0<revealBloom>true<showLOS>true<showMinAngle>false<highlightLeaderboard>true<showCoordinates>true<radar>false<playerStats>true<playerInfo>true<gameInfo>true<showStreams>true<chatExtend>true<chatHighlight>false<maxChat>10<disableChatFilter>true<unfilterNames>true<chatFilterBypass>false<tallChat>false<antiAFK>false<spamChat>false<fakeMessageID>12<fakeMessageText>"dsc.gg/s𝖿network: ЅtateFarm Client v3.4.1-pre94 On Top! "<fakeMessageBold>false<spamChatDelay>500<spamChatText>"dsc.gg/s𝖿network: ЅtateFarm Client v3.4.1-pre71 On Top! "<mockMode>false<announcer>false<autoEZ>false<cheatAccuse>false<joinMessages>true<leaveMessages>true<publicBroadcast>false<joinLeaveBranding>false<whitelist>"User-1, User-2"<enableWhitelistAimbot>false<enableWhenNoneVisible>false<enableWhitelistTracers>false<whitelistESPType>0<whitelistColor>"#e80aac"<blacklist>"User-1, User-2"<enableBlacklistAimbot>false<enableBlacklistTracers>false<blacklistESPType>0<blacklistColor>"#00ff00"<bunnyhop>true<autoWalk>false<autoStrafe>false<autoJump>false<autoJumpDelay>1<autoWeapon>0<autoGrenade>false<autoJoin>false<joinCode>"CODE"<useCustomName>false<usernameAutoJoin>"ЅtateFarmer"<autoRespawn>false<autoTeam>0<gameBlacklist>false<gameBlacklistCodes>""<leaveEmpty>true<autoLeave>true<autoLeaveDelay>150<autoGamemode>5<autoRegion>8<eggColor>0<autoStamp>0<autoHat>0<skybox>9<legacyModels>true<filter>2<gunPosition>0<muteGame>false<distanceMult>1.5<customSFX1>3<customSFX2>4<customSFX3>1<replaceLogo>true<titleAnimation>true<themeType>5<loginEmailPass>"ssss"<loginDatabaseSelection>1<autoLogin>0<accountGmail>"example (NO @gmail.com)"<accountPass>"password69"<accountRecordsLogging>false<shellPrintKey>""<adBlock>true<spoofVIP>false<noAnnoyances>true<noTrack>true<quickRespawn>true<statefarmUpdates>true<replaceFeeds>true<customBadges>true<unlockSkins>false<adminSpoof>false<autoUnban>true<autoChickenWinner>true<customMacro>"log('cool');"<autoMacro>false<silentRoll>false<enableSeizureX>false<amountSeizureX>2<enableSeizureY>false<amountSeizureY>2<hideAtStartup>false<consoleLogs>false<popups>true<enablePanic>false<panicURL>"https://classroom.google.com/"<selectedPreset>0<debug>false`,
  362. "OP7 + Server Hopper + Stream Stealth": `sfChatNotifications>true<sfChatNotificationSound>true<sfChatAutoStart>true<aimbot>true<aimbotTargetMode>0<aimbotVisibilityMode>1<aimbotRightClick>true<silentAimbot>true<aimbSemiSilent>false<noWallTrack>false<prediction>true<antiBloom>true<antiSwitch>false<oneKill>false<aimbotMinAngle>174<aimbotAntiSnap>0.75<antiSneak>1.8<aimbotColor>"#0000ff"<autoRefill>true<smartRefill>true<enableAutoFire>true<autoFireType>3<grenadeMax>true<playerESP>false<tracers>false<chams>false<nametags>true<targets>false<predictionESP>false<tracersType>0<tracersColor1>"#ff0000"<tracersColor2>"#00ff00"<tracersColor3>"#ffffff"<tracersColor1to2>5<tracersColor2to3>15<predictionESPColor>"#ff0000"<ammoESP>false<ammoTracers>false<ammoESPRegime>1<ammoESPColor>"#ffff00"<grenadeESP>false<grenadeTracers>false<grenadeESPRegime>2<grenadeESPColor>"#00ffff"<lookTracers>false<lookTracersRGI1>false<lookTracersColor>"#00ffff"<fov>120<zoom>15<perspective>0<perspectiveAlpha>false<perspectiveY>0.5<perspectiveZ>2<freecam>false<wireframe>false<particleSpeedMultiplier>0.35<eggSize>1<setDetail>0<enableTextures>true<renderDelay>0<revealBloom>false<showLOS>false<showMinAngle>false<highlightLeaderboard>true<showCoordinates>false<radar>false<playerStats>false<playerInfo>false<gameInfo>true<showStreams>false<chatExtend>true<chatHighlight>false<maxChat>10<disableChatFilter>true<unfilterNames>true<chatFilterBypass>false<tallChat>false<antiAFK>false<spamChat>false<fakeMessageID>1<fakeMessageText>"dsc.gg/s𝖿network: ЅtateFarm Client v3.4.1-pre95 On Top! "<fakeMessageBold>false<spamChatDelay>500<spamChatText>"dsc.gg/s𝖿network: ЅtateFarm Client v3.4.1-pre95 On Top! "<mockMode>false<announcer>false<autoEZ>false<cheatAccuse>false<joinMessages>true<leaveMessages>true<publicBroadcast>false<joinLeaveBranding>false<whitelist>"User-1, User-2"<enableWhitelistAimbot>false<enableWhenNoneVisible>false<enableWhitelistTracers>false<whitelistESPType>0<whitelistColor>"#e80aac"<blacklist>"User-1, User-2"<enableBlacklistAimbot>false<enableBlacklistTracers>false<blacklistESPType>0<blacklistColor>"#00ff00"<bunnyhop>true<autoWalk>false<autoStrafe>false<autoJump>false<autoJumpDelay>1<autoWeapon>0<autoGrenade>false<autoJoin>false<joinCode>"CODE"<useCustomName>true<usernameAutoJoin>"[sfc] onlypuppy7"<autoRespawn>false<autoTeam>0<gameBlacklist>false<gameBlacklistCodes>""<leaveEmpty>true<autoLeave>true<autoLeaveDelay>150<autoGamemode>5<autoRegion>8<eggColor>0<autoStamp>0<autoHat>0<skybox>9<legacyModels>true<filter>true<gunPosition>true<muteGame>false<distanceMult>1.5<customSFX1>3<customSFX2>4<customSFX3>1<replaceLogo>true<titleAnimation>false<themeType>5<loginEmailPass>"ssss"<loginDatabaseSelection>1<autoLogin>0<accountGmail>"example (NO @gmail.com)"<accountPass>"password69"<accountRecordsLogging>false<shellPrintKey>""<adBlock>true<spoofVIP>false<noAnnoyances>true<noTrack>true<quickRespawn>true<statefarmUpdates>true<replaceFeeds>true<customBadges>true<unlockSkins>false<adminSpoof>false<autoUnban>true<autoChickenWinner>true<customMacro>"log('cool');"<autoMacro>false<silentRoll>false<enableSeizureX>false<amountSeizureX>2<enableSeizureY>false<amountSeizureY>2<hideAtStartup>false<consoleLogs>false<popups>false<enablePanic>false<panicURL>"https://classroom.google.com/"<selectedPreset>1<debug>false`,
  363. "Doeshotter's Crackshot Config": `sfChatNotifications>false<sfChatNotificationSound>false<sfChatAutoStart>false<sfChatInvitations>true<aimbot>true<aimbotTargetMode>0<aimbotVisibilityMode>2<aimbotRightClick>true<silentAimbot>true<aimbSemiSilent>false<noWallTrack>false<prediction>true<antiBloom>true<antiSwitch>true<oneKill>false<aimbotMinAngle>7<antiSneak>0<aimbotAntiSnap>0<autoRefill>true<smartRefill>true<enableAutomatic>true<enableAutoFire>true<autoFireType>3<autoFireAccuracy>0.15000000000000002<grenadeMax>false<grenadePower>1<playerESP>true<tracers>false<chams>false<trajectories>true<predictionESP>false<nametags>true<nametagInfo>false<nametagInfoInterval>14<aimbotColor>"#ff0000"<aimbotRainbow>false<tracersType>2<tracersColor1Rainbow>true<tracersColor1>"#ff0000"<tracersColor2>"#0000ff"<tracersColor3>"#ffffff"<tracersColor1to2>5<tracersColor2to3>15<predictionESPColor>"#ff0000"<predictionESPColorRainbow>false<ammoESP>false<ammoTracers>false<ammoESPRegime>0<ammoESPColor>"#ffff00"<grenadeESP>false<grenadeTracers>false<grenadeESPRegime>0<grenadeESPColor>"#00ffff"<lookTracers>false<lookTracersRGI1>false<lookTracersColor>"#00ffff"<fov>72<zoom>15<perspective>0<perspectiveAlpha>false<perspectiveY>0.5<perspectiveZ>2<freecam>false<wireframe>false<particleSpeedMultiplier>1<eggSize>1<setDetail>0<enableTextures>true<renderDelay>0<revealBloom>true<showLOS>true<showMinAngle>false<highlightLeaderboard>false<showCoordinates>false<radar>false<playerStats>false<playerInfo>false<gameInfo>false<showStreams>false<minimap>false<minimapZoom>5<minimapSize>1<chatExtend>false<chatHighlight>false<maxChat>5<disableChatFilter>false<unfilterNames>false<chatFilterBypass>false<tallChat>false<fakeMessageID>1<fakeMessageText>"dsc.gg/s𝖿network: ЅtateFarm Client v3.4.1-pre147 On Top! "<fakeMessageBold>false<spamChat>false<spamChatDelay>500<spamChatText>"dsc.gg/s𝖿network: ЅtateFarm Client v3.4.1-pre147 On Top! "<mockMode>false<announcer>false<autoEZ>false<cheatAccuse>false<joinMessages>false<leaveMessages>false<publicBroadcast>false<joinLeaveBranding>false<whitelist>"User-1, User-2"<enableWhitelistAimbot>false<enableWhenNoneVisible>false<enableWhitelistTracers>false<whitelistESPType>0<whitelistColor>"#e80aac"<blacklist>"User-1, User-2"<enableBlacklistAimbot>false<enableBlacklistTracers>false<blacklistESPType>0<blacklistColor>"#00ff00"<bunnyhop>true<autoWalk>false<autoStrafe>false<autoJump>false<autoJumpDelay>1<autoWeapon>0<autoGrenade>false<autoJoin>false<joinCode>"CODE"<useCustomName>false<usernameAutoJoin>"ЅtateFarmer"<autoRespawn>false<autoTeam>0<gameBlacklist>false<gameBlacklistCodes>""<leaveEmpty>false<autoLeave>false<autoLeaveDelay>300<autoGamemode>0<autoRegion>0<eggColor>0<autoStamp>0<autoHat>0<skybox>true<randomSkyBox>false<randomSkyBoxInterval>3<legacyModels>false<filter>true<gunPosition>true<muteGame>false<distanceMult>1<customSFX1>true<customSFX2>true<customSFX3>true<replaceLogo>false<titleAnimation>false<themeType>5<partyLightsEnabled>false<partyLightsIntensity>0.5<loginEmailPass>"ex@gmail.com:passwd"<loginDatabaseSelection>0<autoLogin>0<accountGmail>"example (NO @gmail.com)"<accountPass>"password69"<accountRecordsLogging>false<shellPrintKey>""<adBlock>false<spoofVIP>false<noAnnoyances>true<noTrack>true<antiAFK>true<quickRespawn>true<statefarmUpdates>true<replaceFeeds>true<customBadges>true<unlockSkins>true<adminSpoof>false<autoUnban>true<autoChickenWinner>false<customMacro>"log('wow ur cool!');"<autoMacro>true<silentRoll>false<enableSeizureX>false<amountSeizureX>2<enableSeizureY>false<amountSeizureY>2<vardataFallback>0<vardataType>0<vardataCustom>"{}"<hideAtStartup>false<consoleLogs>false<popups>true<tooltips>true<enablePanic>false<panicURL>"https://classroom.google.com/"<selectedPreset>0<debug>false`,
  364. // ^^ no idea how to fix blue filter being on, its whatever
  365. // "onlypuppy7's Silent Config": `aimbot>true<aimbotTargetMode>1<aimbotVisibilityMode>1<aimbotRightClick>true<silentAimbot>true<noWallTrack>false<prediction>true<antiBloom>true<antiSwitch>false<oneKill>false<aimbotMinAngle>360<aimbotAntiSnap>0.77<antiSneak>1.8<aimbotColor>"#0000ff"<autoRefill>true<smartRefill>true<enableAutoFire>true<autoFireType>3<grenadeMax>true<playerESP>true<tracers>true<chams>false<nametags>true<targets>true<tracersType>0<tracersColor1>"#ff0000"<tracersColor2>"#00ff00"<tracersColor3>"#ffffff"<tracersColor1to2>5<tracersColor2to3>15<ammoESP>true<ammoTracers>false<ammoESPRegime>1<ammoESPColor>"#ffff00"<grenadeESP>true<grenadeTracers>false<grenadeESPRegime>0<grenadeESPColor>"#00ffff"<fov>120<zoom>15<freecam>false<wireframe>false<eggSize>1<setDetail>0<enableTextures>true<renderDelay>0<revealBloom>true<showLOS>true<showMinAngle>false<highlightLeaderboard>false<showCoordinates>true<radar>false<playerStats>true<playerInfo>true<gameInfo>true<showStreams>true<chatExtend>true<chatHighlight>false<maxChat>10<disableChatFilter>true<chatFilterBypass>false<tallChat>false<antiAFK>true<spamChat>false<spamChatDelay>500<spamChatText>"dsc.gg/s𝖿network: ЅtateFarm Client v3.4.0-pre19 On Top! "<mockMode>false<announcer>false<autoEZ>false<cheatAccuse>false<joinMessages>true<leaveMessages>true<publicBroadcast>false<joinLeaveBranding>false<whitelist>"User-1, User-2"<enableWhitelistAimbot>false<enableWhitelistTracers>false<whitelistESPType>0<whitelistColor>"#e80aac"<blacklist>"User-1, User-2"<enableBlacklistAimbot>false<enableBlacklistTracers>false<blacklistESPType>0<blacklistColor>"#00ff00"<bunnyhop>true<autoWalk>false<autoStrafe>false<autoJump>false<autoJumpDelay>1<autoWeapon>0<autoGrenade>false<autoJoin>false<joinCode>"CODE"<useCustomName>false<usernameAutoJoin>"ЅtateFarmer"<autoRespawn>false<autoTeam>0<gameBlacklist>false<gameBlacklistCodes>""<leaveEmpty>false<autoLeave>false<autoLeaveDelay>300<autoGamemode>0<autoRegion>0<eggColor>0<autoStamp>0<autoHat>0<muteGame>false<distanceMult>1<customSFX>0<adBlock>true<spoofVIP>false<unlockSkins>false<adminSpoof>false<autoUnban>true<silentRoll>false<enableSeizureX>false<amountSeizureX>2<enableSeizureY>false<amountSeizureY>2<popups>true<replaceLogo>true<titleAnimation>true<themeType>5<enablePanic>false<panicURL>"https://classroom.google.com/"<selectedPreset>0<debug>false`,
  366. "Hydroflame521's Config": `aimbot>true<aimbotTargetMode>0<aimbotVisibilityMode>0<aimbotRightClick>true<silentAimbot>false<noWallTrack>true<prediction>true<antiBloom>true<antiSwitch>true<oneKill>true<aimbotMinAngle>30<aimbotAntiSnap>0.77<antiSneak>1.8<aimbotColor>"#0000ff"<autoRefill>true<smartRefill>true<enableAutoFire>true<autoFireType>3<grenadeMax>true<playerESP>true<tracers>true<chams>false<nametags>true<targets>true<tracersType>1<tracersColor1>"#b200ff"<tracersColor2>"#ff0000"<tracersColor3>"#00ff4b"<tracersColor1to2>3<tracersColor2to3>20<ammoESP>true<ammoTracers>false<ammoESPRegime>1<ammoESPColor>"#ffff00"<grenadeESP>true<grenadeTracers>false<grenadeESPRegime>0<grenadeESPColor>"#00ffff"<fov>120<zoom>15<freecam>false<wireframe>false<eggSize>1<setDetail>0<enableTextures>true<renderDelay>0<revealBloom>true<showLOS>true<showMinAngle>false<highlightLeaderboard>false<showCoordinates>true<radar>false<playerStats>true<playerInfo>true<gameInfo>true<showStreams>true<chatExtend>true<chatHighlight>false<maxChat>10<disableChatFilter>true<chatFilterBypass>false<tallChat>false<antiAFK>false<spamChat>false<spamChatDelay>1440<spamChatText>"Live now at twitch.tv/ЅtateFarmNetwork! "<mockMode>false<announcer>false<autoEZ>false<cheatAccuse>false<joinMessages>true<leaveMessages>true<publicBroadcast>false<joinLeaveBranding>false<whitelist>"User-1, User-2"<enableWhitelistAimbot>false<enableWhitelistTracers>false<whitelistESPType>0<whitelistColor>"#e80aac"<blacklist>"User-1, User-2"<enableBlacklistAimbot>false<enableBlacklistTracers>false<blacklistESPType>0<blacklistColor>"#00ff00"<bunnyhop>false<autoWalk>false<autoStrafe>false<autoJump>false<autoJumpDelay>1<autoWeapon>0<autoGrenade>false<autoJoin>false<joinCode>"CODE"<useCustomName>false<usernameAutoJoin>"CaptainShell74"<autoRespawn>false<autoTeam>0<gameBlacklist>false<gameBlacklistCodes>""<leaveEmpty>false<autoLeave>false<autoLeaveDelay>240<autoGamemode>0<autoRegion>0<eggColor>0<autoStamp>0<autoHat>0<muteGame>false<distanceMult>0.59<customSFX>true<adBlock>true<spoofVIP>false<unlockSkins>false<adminSpoof>false<autoUnban>true<silentRoll>false<enableSeizureX>false<amountSeizureX>2<enableSeizureY>false<amountSeizureY>0.04772456526919999<popups>true<replaceLogo>false<titleAnimation>false<themeType>7<enablePanic>false<panicURL>"https://classroom.google.com/"<selectedPreset>0<debug>false`,
  367. // "Server Hopper + Non-Silent": `aimbot>true<aimbotTargetMode>0<aimbotVisibilityMode>0<aimbotRightClick>true<silentAimbot>false<noWallTrack>true<prediction>true<antiBloom>true<antiSwitch>true<oneKill>true<aimbotMinAngle>30<aimbotAntiSnap>0.77<antiSneak>1.8<aimbotColor>"#0000ff"<autoRefill>true<smartRefill>true<enableAutoFire>true<autoFireType>0<grenadeMax>true<playerESP>true<tracers>true<chams>false<nametags>true<targets>true<tracersType>0<tracersColor1>"#ff0000"<tracersColor2>"#00ff00"<tracersColor3>"#ffffff"<tracersColor1to2>5<tracersColor2to3>15<ammoESP>true<ammoTracers>false<ammoESPRegime>1<ammoESPColor>"#ffff00"<grenadeESP>true<grenadeTracers>false<grenadeESPRegime>0<grenadeESPColor>"#00ffff"<fov>120<zoom>15<freecam>false<wireframe>false<eggSize>1<setDetail>0<enableTextures>true<renderDelay>0<revealBloom>true<showLOS>true<showMinAngle>false<highlightLeaderboard>false<showCoordinates>true<radar>false<playerStats>true<playerInfo>true<gameInfo>true<showStreams>true<chatExtend>true<chatHighlight>false<maxChat>10<disableChatFilter>true<chatFilterBypass>false<tallChat>false<antiAFK>true<spamChat>false<spamChatDelay>1440<spamChatText>"Live now at twitch.tv/ЅtateFarmNetwork! "<mockMode>false<announcer>false<autoEZ>false<cheatAccuse>false<joinMessages>true<leaveMessages>true<publicBroadcast>false<joinLeaveBranding>false<whitelist>"User-1, User-2"<enableWhitelistAimbot>false<enableWhitelistTracers>false<whitelistESPType>0<whitelistColor>"#e80aac"<blacklist>"User-1, User-2"<enableBlacklistAimbot>false<enableBlacklistTracers>false<blacklistESPType>0<blacklistColor>"#00ff00"<bunnyhop>true<autoWalk>false<autoStrafe>false<autoJump>false<autoJumpDelay>1<autoWeapon>0<autoGrenade>false<autoJoin>false<joinCode>"CODE"<useCustomName>false<usernameAutoJoin>"CaptainShell74"<autoRespawn>false<autoTeam>0<gameBlacklist>false<gameBlacklistCodes>""<leaveEmpty>false<autoLeave>true<autoLeaveDelay>240<autoGamemode>0<autoRegion>0<eggColor>0<autoStamp>0<autoHat>0<muteGame>false<distanceMult>0.59<customSFX>0<adBlock>true<spoofVIP>false<unlockSkins>false<adminSpoof>false<autoUnban>true<silentRoll>false<enableSeizureX>false<amountSeizureX>2<enableSeizureY>false<amountSeizureY>0.04772456526919999<popups>true<replaceLogo>true<titleAnimation>true<themeType>2<enablePanic>false<panicURL>"https://classroom.google.com/"<selectedPreset>0<debug>false`,
  368. // "Server Hopper + Silent": `aimbot>true<aimbotTargetMode>1<aimbotVisibilityMode>1<aimbotRightClick>true<silentAimbot>true<noWallTrack>false<prediction>true<antiBloom>true<antiSwitch>false<oneKill>false<aimbotMinAngle>360<aimbotAntiSnap>0.77<antiSneak>1.8<aimbotColor>"#0000ff"<autoRefill>true<smartRefill>true<enableAutoFire>true<autoFireType>3<grenadeMax>true<playerESP>true<tracers>true<chams>false<nametags>true<targets>true<tracersType>0<tracersColor1>"#ff0000"<tracersColor2>"#00ff00"<tracersColor3>"#ffffff"<tracersColor1to2>5<tracersColor2to3>15<ammoESP>true<ammoTracers>false<ammoESPRegime>1<ammoESPColor>"#ffff00"<grenadeESP>true<grenadeTracers>false<grenadeESPRegime>0<grenadeESPColor>"#00ffff"<fov>120<zoom>15<freecam>false<wireframe>false<eggSize>1<setDetail>0<enableTextures>true<renderDelay>0<revealBloom>true<showLOS>true<showMinAngle>false<highlightLeaderboard>false<showCoordinates>true<radar>false<playerStats>true<playerInfo>true<gameInfo>true<showStreams>true<chatExtend>true<chatHighlight>false<maxChat>10<disableChatFilter>true<chatFilterBypass>false<tallChat>false<antiAFK>true<spamChat>false<spamChatDelay>1440<spamChatText>"Live now at twitch.tv/ЅtateFarmNetwork! "<mockMode>false<announcer>false<autoEZ>false<cheatAccuse>false<joinMessages>true<leaveMessages>true<publicBroadcast>false<joinLeaveBranding>false<whitelist>"User-1, User-2"<enableWhitelistAimbot>false<enableWhitelistTracers>false<whitelistESPType>0<whitelistColor>"#e80aac"<blacklist>"User-1, User-2"<enableBlacklistAimbot>false<enableBlacklistTracers>false<blacklistESPType>0<blacklistColor>"#00ff00"<bunnyhop>true<autoWalk>false<autoStrafe>false<autoJump>false<autoJumpDelay>1<autoWeapon>0<autoGrenade>false<autoJoin>false<joinCode>"CODE"<useCustomName>false<usernameAutoJoin>"CaptainShell74"<autoRespawn>false<autoTeam>0<gameBlacklist>false<gameBlacklistCodes>""<leaveEmpty>false<autoLeave>true<autoLeaveDelay>240<autoGamemode>0<autoRegion>0<eggColor>0<autoStamp>0<autoHat>0<muteGame>false<distanceMult>0.59<customSFX>true<adBlock>true<spoofVIP>false<unlockSkins>false<adminSpoof>false<autoUnban>true<silentRoll>false<enableSeizureX>false<amountSeizureX>2<enableSeizureY>false<amountSeizureY>0.04772456526919999<popups>true<replaceLogo>true<titleAnimation>true<themeType>2<enablePanic>false<panicURL>"https://classroom.google.com/"<selectedPreset>0<debug>false`,
  369. };
  370. const presetStorageLocation = "StateFarmUserPresets";
  371. let hudElementPositions = {};
  372. let cachedRealData = {};
  373. let blacklistedGameCodes = [];
  374. let sfChatIframe;
  375. let sfChatContainer;
  376. let sfChatUsername;
  377. let presetIgnore = ['sfChatUsername', 'otherSettingYouMightWantNotToBeExported'];
  378. log("Save key:", storageKey);
  379. let binding = false;
  380. let previousFrame = 0;
  381. let framesPassed = 0;
  382. let previousLogin = 0;
  383. let lastSpamMessage = [0, ""];
  384. let startTime = Date.now();
  385. let lastAutoJump = 0;
  386. let lastAntiAFKMessage = 0;
  387. let miniCamera;
  388. let spamMessageCount = 0;
  389. let currentFrameIndex = 0;
  390. let deciSecondsPassed = 0;
  391. let timeJoinedGame = 0;
  392. let lastSentMessage = "";
  393. let spamDelay = 0;
  394. let URLParams = "";
  395. let playerInfoCache = {};
  396. let retrievedSFX = [{ text: "Default", value: "default" }];
  397. let soundsSFC = {};
  398. let targetingComplete = false;
  399. let firstExecution = false;
  400. let username = "";
  401. let autoStrafeValue = [0, 0, "left"];
  402. let TEAMCOLORS = ["#fed838", "#40e0ff", "#ffc0a0"];
  403. let autoLeaveReminder = 9999;
  404. let lastRandomSkyBoxChangeTime = Date.now(); //in milliseconds
  405. const allModules = [];
  406. const allFolders = [];
  407. const F = [];
  408. const createAudioContext = function () { return new (window.AudioContext || window.webkitAudioContext)() };
  409. const audioContexts = {
  410. "BGM": createAudioContext(),
  411. "KOTC": createAudioContext(),
  412. "OTHER1": createAudioContext(),
  413. "OTHER2": createAudioContext(),
  414. "OTHER3": createAudioContext(),
  415. "OTHER4": createAudioContext(),
  416. "OTHER5": createAudioContext(),
  417. "OTHER6": createAudioContext(),
  418. "OTHER7": createAudioContext(),
  419. "OTHER8": createAudioContext(),
  420. "OTHER9": createAudioContext(),
  421. "SOUNDS": createAudioContext(),
  422. };
  423. const loadedSkyboxes = [
  424. { text: 'Default', value: 'default' }
  425. ];
  426. const divertContexts = {
  427. "KOTC": ["kotc_capture", "kotc_capturing_opponents", "kotc_capturing_player", "kotc_contested", "kotc_pointscore", "kotc_roundend", "kotc_zonespawn"],
  428. };
  429. const L = {};
  430. const functionNames = [];
  431. const isKeyToggled = {};
  432. let ESPArray = [];
  433. var trajectory = null;
  434. var trajectoryNade = null;
  435. let onlinePlayersArray = [];
  436. let bindsArray = {};
  437. let currentAimTime = 0;
  438. let nowOld = 0;
  439. // blank variables
  440. let ss = {};
  441. let H = {}; // obfuscated shit lol
  442. const tp = {}; // <-- tp = tweakpane
  443. let msgElement, tooltipElement, vardataOverlay, vardataPopup, closeVardataPopup, botBlacklist, botWhitelist, hash, onlineClientKeys, initialisedCustomSFX, accuracyPercentage, automatedBorder, clientID, partyLight, didStateFarm, menuInitiated, GAMECODE, noPointerPause, sneakyDespawning, resetModules, amountOnline, errorString, playersInGame, loggedGameMap, startUpComplete, isBanned, attemptedAutoUnban, coordElement, performanceElement, gameInfoElement, playerinfoElement, playerstatsElement, firstUseElement, minangleCircle, redCircle, crosshairsPosition, currentlyTargeting, ammo, ranOneTime, lastWeaponBox, lastChatItemLength, configMain, configBots, playerLogger;
  444. let whitelistPlayers, scrambledMsgEl, accountStatus, updateMenu, badgeList, scriptInfo, annoyancesRemoved, oldGa, newGame, previousDetail, previousLegacyModels, previousTitleAnimation, blacklistPlayers, playerLookingAt, forceControlKeys, forceControlKeysCache, playerNearest, enemyLookingAt, enemyNearest, AUTOMATED, ranEverySecond, enemyAimNearest
  445. let cachedCommand = "", cachedCommandTime = Date.now();
  446. let activePath, findNewPath, activeNodeTarget;
  447. let pathfindingTargetOverride = undefined;
  448. let isFirstFrameAttemptingToPathfind = true;
  449. let despawnIfNoPath = false;
  450. let isLeftButtonDown = false;
  451. let isRightButtonDown = false;
  452. let configNotSet = true;
  453. let nameTextures = {};
  454. let tooltips = {};
  455. let amountVisible = 0;
  456. const weaponArray = { //this could be done differently but i cba
  457. eggk47: 0,
  458. scrambler: 1,
  459. freeranger: 2,
  460. rpegg: 3,
  461. whipper: 4,
  462. crackshot: 5,
  463. trihard: 6,
  464. random: 3, // :trol_fancy:
  465. };
  466. // const antiAFKString = "AntiAFK Message. This message is not visible to others. || ";
  467. const filteredList = [ //a selection of filtered words for antiafk. brimslate reports afk messages, so have fun reporting this and trying to explain this to the "eggforcers"
  468. 'date', 'dick', 'fuck', 'fuk', 'suck', 'piss', 'hate', 'nude', 'fux', 'hate', 'pussy',
  469. ]; //filteredList[randomInt(0,filteredList.length-1)]
  470. let proxyList = [
  471. 'shellshock.io', 'algebra.best', 'algebra.vip', 'biologyclass.club', 'combateggs.com', 'deadlyegg.com', 'deathegg.life', 'deathegg.world', 'eggbattle.com', 'eggboy.club', 'eggboy.me', 'eggboy.xyz', 'eggcombat.com', 'egg.dance',
  472. 'eggfacts.fun', 'egghead.institute', 'eggisthenewblack.com', 'eggsarecool.com', 'eggshock.com', 'eggshooter.best', 'eggshooter.com', 'eggwarfare.com', 'geometry.best', 'geometry.monster', 'geometry.pw', 'geometry.report', 'hardboiled.life',
  473. 'hardshell.life', 'humanorganising.org', 'mathactivity.club', 'mathactivity.xyz', 'mathdrills.info', 'mathdrills.life', 'mathfun.rocks', 'mathgames.world', 'math.international',
  474. 'mathlete.fun', 'mathlete.pro', 'overeasy.club', 'risenegg.com', 'scrambled.tech', 'scrambled.today', 'scrambled.us', 'scrambled.world', 'shellshockers.best', 'shellshockers.club', 'shellshockers.life', 'shellshockers.site',
  475. 'shellshockers.today', 'shellshockers.us', 'shellshockers.wiki', 'shellshockers.world', 'shellshockers.xyz', 'shellsocks.com', 'softboiled.club', 'urbanegger.com', 'violentegg.club', 'violentegg.fun', 'yolk.best', 'yolk.life',
  476. 'yolk.rocks', 'yolk.tech', 'yolk.quest', 'yolk.today', 'zygote.cafe'
  477. ];
  478. proxyList = proxyList.filter(item => item !== unsafeWindow.location.hostname);
  479. proxyList = [...proxyList].sort(() => Math.random() - 0.5);
  480. let proxyListIndex = 0;
  481. const monitorObjects = {};
  482. //title animation
  483. const titleAnimationFrames = [
  484. '︻デ═一',
  485. '︻デ═一',
  486. 'デ═一 -',
  487. '═一   -',
  488. '一    -',
  489. '.     -',
  490. '.    -',
  491. '.   -',
  492. '.    -  0',
  493. '.     -0',
  494. '.    \\/',
  495. '.   _-_',
  496. '. ___',
  497. '__',
  498. '.',
  499. 'STATEFARMCLIEN',
  500. 'TATEFARMCLIENT',
  501. 'ATEFARMCLIENTV',
  502. 'TEFARMCLIENTV3',
  503. 'EFARMCLIENTV3 ',
  504. 'FARMCLIENTV3 S',
  505. 'ARMCLIENTV3 ST',
  506. 'RMCLIENTV3 STA',
  507. 'MCLIENTV3 STAT',
  508. 'CLIENTV3 STATE',
  509. 'LIENTV3 STATEF',
  510. 'IENTV3 STATEFA',
  511. 'ENTV3 STATEFAR',
  512. 'NTV3 STATEFARM',
  513. 'TV3 STATEFARMC',
  514. 'V3 STATEFARMCL',
  515. '3 STATEFARMCLI',
  516. 'STATEFARMCLIEN',
  517. 'TATEFARMCLIENT',
  518. 'STATEFARM',
  519. 'CLIENT V3',
  520. 'STATEFARM',
  521. 'CLIENT V3',
  522. 'STATEFARM',
  523. 'CLIENT V3',
  524. 'STATEFARM',
  525. 'CLIENT V3',
  526. ':)',
  527. ';)',
  528. ':)',
  529. '⠝⠓⠗⠅ ஃ ⠟⠑⠙⠟',
  530. '⠑⠑⠟⠟ ஃ ⠙⠛⠟⠕',
  531. '⠛⠟⠍⠑ ஃ ⠅⠑⠍⠃',
  532. '⠅⠟⠇⠝ ஃ ⠟⠕⠗⠕',
  533. '⠝⠓⠗⠅ ஃ ⠟⠑⠙⠟',
  534. '⠑⠑⠟⠟ ஃ ⠙⠛⠟⠕',
  535. '⠛⠟⠍⠑ ஃ ⠅⠑⠍⠃',
  536. '⠅⠟⠇⠝ ஃ ⠟⠕⠗⠕',
  537. '( ͡° ͜ʖ ͡°)',
  538. '( ͠° ͟ʖ ͡°)',
  539. '( ͡° ͟ʖ ͡°)',
  540. '( ͡° ͟ʖ ͠°)一',
  541. '( ͡° ͟ʖ ͠°)═一',
  542. '( ͡° ͟ʖ ͠°)デ═一',
  543. '( ͡° ͟ʖ ͠°)︻デ═一',
  544. ' ͡° ͟ʖ ͠°)︻デ═一',
  545. ' ͟ʖ ͠°)︻デ═一',
  546. ' ͠°)︻デ═一',
  547. ')︻デ═一',
  548. ];
  549. const getScrambled = () => Array.from({ length: 10 }, () => String.fromCharCode(97 + Math.floor(Math.random() * 26))).join('');
  550. let skyboxName = getScrambled();
  551. let mapData = getScrambled();
  552. //menu interaction functions
  553. //menu extraction
  554. const extract = function (variable, shouldUpdate) {
  555. if (shouldUpdate) { updateConfig() };
  556. return configMain[variable] || configBots[variable];
  557. };
  558. const extractDropdownList = function (variable) {
  559. return tp[variable + "Button"].controller_.binding.value.constraint_.constraints[0].options;
  560. };
  561. const extractAsDropdownInt = function (variable) {
  562. const options = extractDropdownList(variable);
  563. const state = extract(variable);
  564. for (let i = 0; i < options.length; i++) {
  565. if (options[i].value === state) {
  566. return i;
  567. };
  568. };
  569. };
  570. const beginBinding = function (value) {
  571. if (binding == false) {
  572. binding = value;
  573. tp[binding + "BindButton"].title = "PRESS KEY";
  574. };
  575. };
  576. //one day i should make this unshit. dom is not the correct way to go about this.
  577. //unfortunately tweakpane is a pain in the ass and has barely anything for actually extracting/changing vars
  578. //a way it could be done is export preset => change value => import preset
  579. //but doesnt account for it being a button... and dropdowns wouldnt switch properly too. laziness. the problem is that this works fine.
  580. //suppose i could always just log the type of module and refer to it later. you can also get the parent object from the tp object, that would save iterating over everything.
  581. const change = function (module, newValue) { //its important to note that every module must have a unique name (the title of the module, NOT the storeAs)
  582. const labels = document.querySelectorAll('.tp-lblv_l');
  583. const moduleButton = module + "Button";
  584. const moduleLabel = tp[moduleButton].label;
  585. for (const label of labels) {
  586. if (label.textContent == moduleLabel) {
  587. const inputContainer = label.nextElementSibling;
  588. const currentValue = extract(module);
  589. // check for checkbox
  590. const checkbox = inputContainer.querySelector('.tp-ckbv_i');
  591. if (checkbox) {
  592. if (newValue == undefined) {
  593. newValue = (!currentValue);
  594. };
  595. if (newValue !== (!!currentValue)) {
  596. checkbox.click(); // Toggle checkbox
  597. };
  598. log(module, "checkbox", currentValue, newValue);
  599. return extract(module, true);
  600. };
  601. // check for button
  602. const button = inputContainer.querySelector('.tp-btnv_b');
  603. if (button) {
  604. button.click(); // Trigger button click
  605. log(module, "button", currentValue, newValue);
  606. return ("NOMSG"); //no change of state, dont show pop up message
  607. };
  608. // check for dropdown
  609. const dropdown = inputContainer.querySelector('.tp-lstv_s');
  610. if (dropdown) {
  611. if (newValue == undefined) { //if youre going to set a list to a certain value, use the int value of the list item
  612. newValue = (dropdown.selectedIndex + 1) % dropdown.options.length;
  613. };
  614. dropdown.selectedIndex = newValue;
  615. dropdown.dispatchEvent(new Event('change')); // trigger change event for dropdown
  616. log(module, "dropdown", currentValue, newValue);
  617. return extract(module, true);
  618. };
  619. // check for text input
  620. const textInput = inputContainer.querySelector('.tp-txtv_i');
  621. if (textInput) {
  622. textInput.value = newValue;
  623. textInput.dispatchEvent(new Event('change')); // trigger change event for dropdown
  624. return extract(module, true);
  625. };
  626. };
  627. };
  628. };
  629. document.addEventListener('mousedown', function (event) {
  630. if (event.button === 2) {
  631. isRightButtonDown = true;
  632. } else if (event.button === 0) {
  633. isLeftButtonDown = true;
  634. };
  635. }, true);
  636. document.addEventListener('mouseup', function (event) {
  637. if (event.button === 2) {
  638. isRightButtonDown = false;
  639. } else if (event.button === 0) {
  640. isLeftButtonDown = false;
  641. };
  642. }, true);
  643. //menu
  644. document.addEventListener("keydown", function (event) {
  645. event = (event.code.originalReplace("Key", ""));
  646. isKeyToggled[event] = true;
  647. if (event == "Escape") {
  648. noPointerPause = false; unsafeWindow.document.onpointerlockchange();
  649. };
  650. });
  651. document.addEventListener("keyup", function (event) {
  652. event = (event.code.originalReplace("Key", ""));
  653. isKeyToggled[event] = false;
  654. if (document.activeElement && document.activeElement.tagName === 'INPUT') {
  655. return;
  656. } else if (binding != false) {
  657. if (event == "Delete") { event = "Set Bind" };
  658. tp[binding + "BindButton"].title = event;
  659. bindsArray[binding] = event;
  660. save(binding + "Bind", event);
  661. createPopup("Bound " + tp[binding + "Button"].label + " to key: " + event);
  662. binding = false;
  663. } else {
  664. Object.keys(bindsArray).forEach(function (module) {
  665. if ((bindsArray[module] == event) && module != "zoom") {
  666. let state = change(module);
  667. let popupText = state;
  668. if (state != "NOMSG") {
  669. if (state === true || state === false || state === undefined) { state = (state ? "ON" : "OFF") };
  670. popupText = "Set " + module + " to: " + state;
  671. if (extract("announcer")) {
  672. sendChatMessage("I just set " + module + " to " + state + "!");
  673. };
  674. } else {
  675. switch (module) {
  676. case ("hide"):
  677. popupText = "Toggled StateFarm Panel"; break;
  678. case ("showBotPanel"):
  679. popupText = "Toggled Bot Panel"; break;
  680. case ("sfChatShowHide"):
  681. popupText = "Toggled SFC Chat"; break;
  682. case ("panic"):
  683. popupText = "Exiting to set URL..."; break;
  684. default:
  685. popupText = module; break;
  686. };
  687. };
  688. createPopup(popupText);
  689. };
  690. });
  691. };
  692. });
  693. const initTabs = function (tab, guideData) {
  694. tp[tab.storeAs] = tab.location.addTab({
  695. pages: [
  696. { title: 'Modules' },
  697. { title: 'Binds' },
  698. { title: 'Guide' },
  699. ],
  700. });
  701. if (guideData) {
  702. const thePages = [];
  703. guideData.forEach(aPage => {
  704. thePages.push({ title: aPage.title });
  705. });
  706. tp[tab.storeAs + "Guide"] = tp[tab.storeAs].pages[2].addTab({ pages: thePages }); //is there a one liner for this? uhhh probabyl
  707. //tp[tab.storeAs + "Guide"] = tab.location.addTab({ thePages: guideData.map(page => ({ title: page.title })) });
  708. for (let i = 0; i < guideData.length; i++) {
  709. const storeAs = tab.storeAs + "Guide" + i;
  710. const text = (guideData[i].content || "Not set up correctly lmao");
  711. initModule({ location: tp[tab.storeAs + "Guide"].pages[i], storeAs: storeAs, monitor: (text.split('\n').length + 0.25), });
  712. monitorObjects[storeAs] = text;
  713. const infoElement = tp[storeAs + "Button"].controller_.view.element.children[1].children[0];
  714. infoElement.style.width = "270px";
  715. infoElement.style.setProperty("margin-left", "-110px", "important");
  716. };
  717. };
  718. };
  719. const initFolder = function (folder) {
  720. tp[folder.storeAs] = folder.location.addFolder({
  721. title: folder.title,
  722. expanded: load(folder.storeAs) !== null ? load(folder.storeAs) : false
  723. });
  724. allFolders.push(folder.storeAs);
  725. };
  726. const initModule = function (module) {
  727. if (module.requirements) {
  728. };
  729. const value = {};
  730. value[module.storeAs] = (module.defaultValue !== undefined ? module.defaultValue : false);
  731. if (module.tooltip) tooltips[module.title] = module.tooltip;
  732. tp[module.storeAs + "TiedModules"] = {
  733. showConditions: (module.showConditions || false),
  734. hideConditions: (module.hideConditions || false),
  735. enableConditions: (module.enableConditions || false),
  736. //why have disable when there is already enable?
  737. //enable acts like an AND operator,
  738. //whereas having conditions for the opposite allows for an OR operation.
  739. //it is messy, but hey it works lmao?
  740. disableConditions: (module.disableConditions || false),
  741. };
  742. if (!(module.slider && module.slider.step)) { module.slider = {} };
  743. const config = {
  744. label: module.title,
  745. options: module.dropdown,
  746. min: module.slider.min,
  747. max: module.slider.max,
  748. step: module.slider.step,
  749. title: module.button,
  750. };
  751. const tpStoreAs = module.storeAs + "Button";
  752. if (module.button) {
  753. tp[tpStoreAs] = module.location.addButton({
  754. label: module.title,
  755. title: module.button,
  756. }).on("click", (value) => {
  757. try {
  758. if (module.clickFunction !== undefined) { module.clickFunction(value) };
  759. } catch (error) {
  760. log("OooOoOoops, error in click function", module.storeAs, error);
  761. };
  762. if (module.botParam !== undefined) { updateBotParams(module.botParam) };
  763. log("click", module.storeAs, value);
  764. onOptionChanged(module.storeAs, value);
  765. });
  766. } else if (module.monitor) {
  767. monitorObjects[module.storeAs] = "Text Goes Here";
  768. tp[tpStoreAs] = module.location.addMonitor(monitorObjects, module.storeAs, {
  769. label: '',
  770. expanded: true,
  771. multiline: true,
  772. lineCount: module.monitor,
  773. });
  774. } else {
  775. tp[tpStoreAs] = module.location.addInput(value, module.storeAs, config
  776. ).on("change", (value) => {
  777. try {
  778. if (module.changeFunction !== undefined) { module.changeFunction(value) };
  779. } catch (error) {
  780. log("OooOoOoops, error in change function", module.storeAs, error);
  781. };
  782. setTimeout(() => {
  783. if (startUpComplete) {
  784. if ((module.botParam !== undefined)) {
  785. updateBotParams(module.botParam);
  786. };
  787. };
  788. updateHiddenAndDisabled();
  789. saveConfig();
  790. }, 150);
  791. log("change", module.storeAs, value);
  792. onOptionChanged(module, value);
  793. });
  794. };
  795. allModules.push(module.storeAs);
  796. if (module.bindLocation) { initBind(module) };
  797. };
  798. const initBind = function (module) {
  799. if (resetModules) { remove(module.storeAs + "Bind") };
  800. const theBind = (load(module.storeAs + "Bind") || module.defaultBind || "Set Bind");
  801. tp[(module.storeAs + "BindButton")] = module.bindLocation.addButton({
  802. label: module.title,
  803. title: theBind,
  804. }).on("click", (value) => {
  805. beginBinding(module.storeAs);
  806. });
  807. bindsArray[module.storeAs] = theBind;
  808. };
  809. const initMenu = function (reset) {
  810. //INIT MENU
  811. //init tp.mainPanel
  812. resetModules = reset === true;
  813. menuInitiated = false;
  814. if (tp.mainPanel) { tp.mainPanel.dispose() };
  815. if (tp.botPanel) { tp.botPanel.dispose() };
  816. tp.mainPanel = new Tweakpane.Pane(); // eslint-disable-line
  817. tp.mainPanel.hidden = true;
  818. tp.mainPanel.title = menuTitle;
  819. //SFC CHAT
  820. initFolder({ location: tp.mainPanel, title: "StateFarm Chat", storeAs: "sfChatFolder", });
  821. initTabs({ location: tp.sfChatFolder, storeAs: "sfChatTab" }, [
  822. {
  823. title: "WIP", content:
  824. `Sorry! No guide yet!`},
  825. ]);
  826. initModule({ location: tp.sfChatTab.pages[0], title: "Username", storeAs: "sfChatUsername", tooltip: "Your username in the chatroom", defaultValue: ("Guest" + (Math.floor(Math.random() * 8999) + 1000)), });
  827. // initModule({ location: tp.sfChatTab.pages[0], title: "Join Chat", storeAs: "sfChatJoin", button: "Join", bindLocation: tp.sfChatTab.pages[1], clickFunction: function(){
  828. // if (sfChatIframe != undefined){
  829. // createPopup("Already Started. Try Showing it.");
  830. // } else {
  831. // startStateFarmChat();
  832. // };
  833. // },});
  834. tp.sfChatTab.pages[0].addSeparator();
  835. initModule({
  836. location: tp.sfChatTab.pages[0], title: "Show/Hide", storeAs: "sfChatShowHide", tooltip: "Toggle chat panel visibility", button: "Show/Hide", bindLocation: tp.sfChatTab.pages[1], defaultBind: "K", clickFunction: function () {
  837. if (sfChatContainer != undefined) {
  838. if (sfChatContainer.style.display == "none") {
  839. sfChatContainer.style.display = "block";
  840. } else {
  841. sfChatContainer.style.display = "none";
  842. };
  843. } else {
  844. startStateFarmChat(); //its just easier this way imo
  845. };
  846. },
  847. });
  848. tp.sfChatTab.pages[0].addSeparator();
  849. initModule({ location: tp.sfChatTab.pages[0], title: "Notifications", storeAs: "sfChatNotifications", tooltip: "Shows an in-game notification for every new chat message", bindLocation: tp.sfChatTab.pages[1], });
  850. initModule({ location: tp.sfChatTab.pages[0], title: "Notification Sound", storeAs: "sfChatNotificationSound", tooltip: "Play a sound for every new message", bindLocation: tp.sfChatTab.pages[1], });
  851. tp.sfChatTab.pages[0].addSeparator();
  852. initModule({ location: tp.sfChatTab.pages[0], title: "Auto Start Chat", storeAs: "sfChatAutoStart", tooltip: "Automatically connects to the chatroom on startup", bindLocation: tp.sfChatTab.pages[1], });
  853. tp.sfChatTab.pages[0].addSeparator();
  854. initModule({ location: tp.sfChatTab.pages[0], title: "Prompt Invitations", storeAs: "sfChatInvitations", tooltip: "Show invite prompts when someone sends a game code in the chatroom", bindLocation: tp.sfChatTab.pages[1], defaultValue: true, });
  855. //COMBAT MODULES
  856. initFolder({ location: tp.mainPanel, title: "Combat", storeAs: "combatFolder", });
  857. initTabs({ location: tp.combatFolder, storeAs: "combatTab" }, [
  858. {
  859. title: "Basics", content:
  860. `This is the combat tab. Here you will find
  861. options relating to aimbotting, and other
  862. useful macros. Aimbot is made active by
  863. turning it on. Using ToggleRM will give you
  864. more control by allowing you to switch by
  865. pressing the right mouse button.
  866. TargetMode also allows a more intuitive
  867. means of selecting who you will target.
  868. The most powerful features you can use
  869. are Predictions and Antibloom. These
  870. improve the accuracy of the tracking.
  871. AntiSwitch will make you lock on to a
  872. target until they die, and if you don't want
  873. to target anyone else after they die then
  874. choose 1Kill too. Auto Refill helps you
  875. stay topped up and choosing the Smart
  876. mode allows you to refill at the moment
  877. when you will not have a long
  878. reload time. GrenadeMAX makes all
  879. grenades get thrown at max strength.`},
  880. {
  881. title: "Visibility", content:
  882. `There are a couple of options related to
  883. visibility (Line-of-Sight). First is
  884. TargetVisible. This tunes the aimbot to
  885. be more strategic with where it aims.
  886. NoWallTrack makes it such that if a
  887. targeted player goes behind a wall, you
  888. stop aimlocking them. There is also an
  889. AutoFire mode with this sort of
  890. functionality.`},
  891. {
  892. title: "Advanced", content:
  893. `If you want to increase stealthiness,
  894. make use of MinAngle and AntiSnap. The
  895. first will make it so that you have to
  896. manually move your reticle within your
  897. specified radius to lock on. The latter
  898. smooths snapping, which evades
  899. detection on botter spotter scripts.
  900. If you want to be more powerful, opt for
  901. SilentAim. This modifies your direction
  902. packets instead of making you lock on.
  903. However, this can lead to slightly glitchy
  904. movement. When this is on, MinAngle
  905. changes to instead narrow down the
  906. selection of targets rather than acting
  907. as a guide.
  908. AntiSneak is a module which, while not
  909. always showing use, can help you in a
  910. difficult situation. It automatically
  911. switches targets to a player that enters
  912. your specified range, and begins
  913. shooting with your primary gun, and then
  914. the pistol. Ideal use case is when you are
  915. sniping and someone sneaks up on you
  916. (...hence it is called... AntiSneak).`},
  917. ]);
  918. initModule({ location: tp.combatTab.pages[0], title: "Aimbot", storeAs: "aimbot", tooltip: "Locks onto targeted player", bindLocation: tp.combatTab.pages[1], defaultBind: "V", });
  919. initFolder({ location: tp.combatTab.pages[0], title: "Aimbot Options", storeAs: "aimbotFolder", });
  920. initModule({ location: tp.aimbotFolder, title: "TargetMode", storeAs: "aimbotTargetMode", tooltip: "Decides the priority for which player aimbot should target", bindLocation: tp.combatTab.pages[1], defaultBind: "T", dropdown: [{ text: "Pointing At", value: "pointingat" }, { text: "Nearest", value: "nearest" }, { text: "Lowest HP", value: "lowestHp" }, { text: "Most Kills", value: "mostKills" }, {text: "Aiming At Me", value: "aimingAt" }], defaultValue: "pointingat", enableConditions: [["aimbot", true]], });
  921. initModule({ location: tp.aimbotFolder, title: "TargetVisible", storeAs: "aimbotVisibilityMode", tooltip: "A filter, applied after TargetMode helping to pick the aimbot target", bindLocation: tp.combatTab.pages[1], dropdown: [{ text: "Disabled", value: "disabled" }, { text: "Prioritise Visible", value: "prioritise" }, { text: "Only Visible", value: "onlyvisible" }], defaultValue: "disabled", enableConditions: [["aimbot", true]] });
  922. tp.aimbotFolder.addSeparator();
  923. initModule({ location: tp.aimbotFolder, title: "ToggleRM", storeAs: "aimbotRightClick", tooltip: "Modifies aimbot to only lock when the right mouse is held", bindLocation: tp.combatTab.pages[1], enableConditions: [["aimbot", true]], });
  924. initModule({ location: tp.aimbotFolder, title: "SilentAim", storeAs: "silentAimbot", tooltip: "Shoots without moving the camera. ONLY visual, VERY blatant cheating. Refer to the GitHub README for more information", bindLocation: tp.combatTab.pages[1], enableConditions: [["aimbot", true]], });
  925. initModule({ location: tp.aimbotFolder, title: "SemiSilent", storeAs: "aimbSemiSilent", tooltip: "SilentAimbot behavior, but will move the camera after a shot has been fired", bindLocation: tp.combatTab.pages[1], enableConditions: [["aimbot", true], ["silentAimbot", true]], });
  926. initModule({ location: tp.aimbotFolder, title: "NoWallTrack", storeAs: "noWallTrack", tooltip: "Aimbot ignores the player if they're behind obstacles", bindLocation: tp.combatTab.pages[1], enableConditions: [["aimbot", true], ["silentAimbot", false]], });
  927. tp.aimbotFolder.addSeparator();
  928. initModule({ location: tp.aimbotFolder, title: "Prediction", storeAs: "prediction", tooltip: "Predicts where the player will be when the bullet hits them and ajusts aimbot accordingly", bindLocation: tp.combatTab.pages[1], enableConditions: [["aimbot", true]], defaultValue: true, });
  929. initModule({ location: tp.aimbotFolder, title: "AntiBloom", storeAs: "antiBloom", tooltip: "Locks onto the predicted bloom point. Good for shooting & moving", bindLocation: tp.combatTab.pages[1], enableConditions: [["aimbot", true]], defaultValue: true, });
  930. tp.aimbotFolder.addSeparator();
  931. initModule({ location: tp.aimbotFolder, title: "AntiSwitch", storeAs: "antiSwitch", tooltip: "Prevents the aimbot from changing the target until they die", bindLocation: tp.combatTab.pages[1], enableConditions: [["aimbot", true]], });
  932. initModule({ location: tp.aimbotFolder, title: "1 Kill", storeAs: "oneKill", tooltip: "Disables aimbot when the targeted player dies", bindLocation: tp.combatTab.pages[1], enableConditions: [["aimbot", true]], });
  933. tp.aimbotFolder.addSeparator();
  934. initModule({ location: tp.aimbotFolder, title: "MinAngle", storeAs: "aimbotMinAngle", tooltip: "Prevents you from snapping if the angle between you and the player is greater than this value (in degrees)", slider: { min: 0.05, max: 360, step: 1 }, defaultValue: 360, enableConditions: [["aimbot", true]], });
  935. initModule({ location: tp.aimbotFolder, title: "AntiSneak", storeAs: "antiSneak", tooltip: "Recommended distance under 2. This automatically kills players in the given range", slider: { min: 0, max: 5, step: 0.2 }, defaultValue: 0, enableConditions: [["aimbot", true]], });
  936. tp.aimbotFolder.addSeparator();
  937. initModule({ location: tp.aimbotFolder, title: "AntiSnap", storeAs: "aimbotAntiSnap", tooltip: "This makes snapping smooth at higher values. useful to avoid being spotted", slider: { min: 0, max: 0.99, step: 0.01 }, defaultValue: 0, enableConditions: [["aimbot", true], ["silentAimbot", false]], });
  938. initFolder({ location: tp.aimbotFolder, title: "AntiSnap Options", storeAs: "antisnapFolder", });
  939. initModule({ location: tp.antisnapFolder, title: "AntiSnap Regime", storeAs: "aimbotAntiSnapRegime", tooltip: "Changes the method of smoothing\n\nCredit to de_Neuublue for this code", bindLocation: tp.combatTab.pages[1], dropdown: [{ text: "Linear", value: "linear" }, { text: "Slow End", value: "slowEnd" }, { text: "Fast End", value: "fastEnd" }, { text: "Time Based", value: "timeBased" }], defaultValue: "linear", enableConditions: [["aimbot", true], ["silentAimbot", false]], });
  940. initModule({ location: tp.antisnapFolder, title: "Max Aim Time (ms)", storeAs: "maxAimTime", tooltip: "How long to aim for until you force the locking.", slider: { min: 10, max: 5000, step: 1 }, defaultValue: 700, enableConditions: [["aimbot", true], ["silentAimbot", false]], showConditions: [["aimbotAntiSnapRegime", "timeBased"]], });
  941. tp.combatTab.pages[0].addSeparator();
  942. initModule({ location: tp.combatTab.pages[0], title: "Auto Refill", storeAs: "autoRefill", tooltip: "This automatically reloads your gun if there is no more ammo", bindLocation: tp.combatTab.pages[1], });
  943. initModule({ location: tp.combatTab.pages[0], title: "Smart Refill", storeAs: "smartRefill", tooltip: "This makes your weapon refill at the best moment, which reduces reload time", bindLocation: tp.combatTab.pages[1], showConditions: [["autoRefill", true]], });
  944. tp.combatTab.pages[0].addSeparator();
  945. initModule({ location: tp.combatTab.pages[0], title: "Auto Fire", storeAs: "enableAutomatic", tooltip: "Makes every gun act like an automatic one", bindLocation: tp.combatTab.pages[1], });
  946. initModule({ location: tp.combatTab.pages[0], title: "Triggerbot", storeAs: "enableAutoFire", tooltip: "Automatically shoot the gun", bindLocation: tp.combatTab.pages[1], });
  947. initModule({ location: tp.combatTab.pages[0], title: "TriggerType", storeAs: "autoFireType", tooltip: "Picks how to shoot the gun", bindLocation: tp.combatTab.pages[1], dropdown: [{ text: "Force Automatic", value: "forceAutomatic" }, { text: "While Visible", value: "whileVisible" }, { text: "While Aimbotting", value: "whileAimbot" }, { text: "Visible and Aimbotting", value: "whileVisAimbot" }, { text: "Always", value: "always" }], defaultValue: "leftMouse", enableConditions: [["enableAutoFire", true]] });
  948. initModule({ location: tp.combatTab.pages[0], title: "MinAccuracy%", storeAs: "autoFireAccuracy", tooltip: "Minimum spread/accuracy before shooting. Helpful for sniper guns, bad for automatics. Leave at 0 for default.", slider: { min: 0, max: 1, step: 0.05 }, defaultValue: 0, enableConditions: [["enableAutoFire", true]], });
  949. tp.combatTab.pages[0].addSeparator();
  950. initModule({ location: tp.combatTab.pages[0], title: "GrenadeMAX", storeAs: "grenadeMax", tooltip: "Sets grenades to be thrown to max power immediately without the need of charging", bindLocation: tp.combatTab.pages[1], });
  951. initModule({ location: tp.combatTab.pages[0], title: "Nade Power", storeAs: "grenadePower", tooltip: "porcupane hijinks ensue — Today at 6:33 PM• goo/ber grenade power override for how long you hold ot", slider: { min: 0, max: 1, step: 0.05 }, defaultValue: 1, });
  952. //RENDER MODULES
  953. initFolder({ location: tp.mainPanel, title: "Render", storeAs: "renderFolder", });
  954. initTabs({ location: tp.renderFolder, storeAs: "renderTab" }, [
  955. {
  956. title: "WIP", content:
  957. `Sorry! No guide yet!`},
  958. ]);
  959. initModule({ location: tp.renderTab.pages[0], title: "PlayerESP", storeAs: "playerESP", tooltip: "Creates boxes around enemy players", bindLocation: tp.renderTab.pages[1], });
  960. initModule({ location: tp.renderTab.pages[0], title: "Tracers", storeAs: "tracers", tooltip: "Creates lines pointing from the center of the screen to the location of enemy players", bindLocation: tp.renderTab.pages[1], });
  961. initModule({ location: tp.renderTab.pages[0], title: "Chams", storeAs: "chams", tooltip: "Renders players through walls", bindLocation: tp.renderTab.pages[1], });
  962. initModule({ location: tp.renderTab.pages[0], title: "Trajectories", storeAs: "trajectories", tooltip: "Shows the path your grenade will take when thrown", bindLocation: tp.renderTab.pages[1], });
  963. //initModule({ location: tp.renderTab.pages[0], title: "Targets", storeAs: "targets", tooltip: "It's borked rn", bindLocation: tp.renderTab.pages[1], });
  964. initModule({ location: tp.renderTab.pages[0], title: "PredictionESP", storeAs: "predictionESP", tooltip: "Creates an ESP box at the predicted position of the player", bindLocation: tp.renderTab.pages[1], });
  965. tp.renderTab.pages[0].addSeparator();
  966. initModule({ location: tp.renderTab.pages[0], title: "NametagESP", storeAs: "nametags", tooltip: "Enlarges nametags and makes them appear through walls", bindLocation: tp.renderTab.pages[1], });
  967. initModule({ location: tp.renderTab.pages[0], title: "NametagInfo", storeAs: "nametagInfo", tooltip: "Adds extra info to nametags such as HP and score stats (Warning: Lags)", bindLocation: tp.renderTab.pages[1], });
  968. initModule({ location: tp.renderTab.pages[0], title: "Info Update Interval", storeAs: "nametagInfoInterval", tooltip: "If the info updater lags you, increase this value to make it update less often.", slider: { min: 1, max: 180, step: 1 }, defaultValue: 180, showConditions: [["nametagInfo", true]], });
  969. tp.renderTab.pages[0].addSeparator();
  970. initFolder({ location: tp.renderTab.pages[0], title: "Player ESP/Tracers Options", storeAs: "tracersFolder", });
  971. initModule({ location: tp.tracersFolder, title: "TargetedColor", storeAs: "aimbotColor", tooltip: "The color used to highlight the ESP line of a targeted player. Useless if PlayerESP is disabled", defaultValue: "#0000ff", showConditions: [["aimbotRainbow", false]] });
  972. initModule({ location: tp.tracersFolder, title: "Targeted RGB", storeAs: "aimbotRainbow", tooltip: "Adds RGB to the ESP, for fun", defaultValue: true, bindLocation: tp.renderTab.pages[1] });
  973. tp.aimbotFolder.addSeparator();
  974. initModule({ location: tp.tracersFolder, title: "Type", storeAs: "tracersType", tooltip: "The mode for how ESP/Tracers are coloured. Different colour options present themselves based on option.\n\nStatic: Just stays as one colour.\nProximity: Fades between three colours based on how close someone is.\nVisibility: Switches between two colours if there is Line of Sight.", bindLocation: tp.renderTab.pages[1], dropdown: [{ text: "Static", value: "static" }, { text: "Proximity", value: "proximity" }, { text: "Visibility", value: "visibility" }], defaultValue: "static", disableConditions: [["tracers", false], ["playerESP", false]], });
  975. initModule({ location: tp.tracersFolder, title: "RGB Color 1", storeAs: "tracersColor1Rainbow", tooltip: "rainbow. 🌈", defaultValue: false, disableConditions: [["tracers", false], ["playerESP", false]], });
  976. initModule({ location: tp.tracersFolder, title: "Color 1", storeAs: "tracersColor1", tooltip: "Static: Just stays this colour.\nProximity: Very close colour\nVisibility: Not visible.", defaultValue: "#ff0000", disableConditions: [["tracers", false], ["playerESP", false]], showConditions: [["tracersColor1Rainbow", false]], });
  977. //TODO: I hate having it like that so maybe a initmodule helper func for color with creates both color opt and rainbow opt. Same with the getColors() btw ~Sq
  978. //also speed customisation and shit, people love customization.
  979. //--------
  980. initModule({ location: tp.tracersFolder, title: "Color 2", storeAs: "tracersColor2", tooltip: "Static: (Unused)\nProximity: Moderately close colour\nVisibility: Visible.", defaultValue: "#00ff00", disableConditions: [["tracers", false], ["playerESP", false]], hideConditions: [["tracersType", "static"]], });
  981. //initModule({ location: tp.tracersFolder, title: "C2 rainbow", storeAs: "tracersColor2Rainbow", tooltip: "🌈", defaultValue: true, disableConditions: [["tracers", false], ["playerESP", false]], hideConditions: [["tracersType", "static"]], });
  982. //--------
  983. initModule({ location: tp.tracersFolder, title: "Color 3", storeAs: "tracersColor3", tooltip: "Static: (Unused)\nProximity: Furthest colour\nVisibility: (Unused)", defaultValue: "#ffffff", disableConditions: [["tracers", false], ["playerESP", false]], showConditions: [["tracersType", "proximity"]], });
  984. //initModule({ location: tp.tracersFolder, title: "C3 rainbow", storeAs: "tracersColor3Rainbow", tooltip: "🌈", defaultValue: false, disableConditions: [["tracers", false], ["playerESP", false]], showConditions: [["tracersType", "proximity"]], });
  985. //-------ä
  986. initModule({ location: tp.tracersFolder, title: "Dist 1->2", storeAs: "tracersColor1to2", tooltip: "Proximity: Distance from which it fades from 1 to 2. Should be the smaller range.", slider: { min: 0, max: 30, step: 0.25 }, defaultValue: 5, showConditions: [["tracersType", "proximity"]], disableConditions: [["tracers", false], ["playerESP", false]], });
  987. initModule({ location: tp.tracersFolder, title: "Dist 2->3", storeAs: "tracersColor2to3", tooltip: "Proximity: Distance from which it fades from 2 to 3. Should be the larger range.", slider: { min: 0, max: 30, step: 0.25 }, defaultValue: 15, showConditions: [["tracersType", "proximity"]], disableConditions: [["tracers", false], ["playerESP", false]], });
  988. tp.tracersFolder.addSeparator();
  989. initModule({ location: tp.tracersFolder, title: "PredictionESPColor", storeAs: "predictionESPColor", tooltip: "Colour to use for the PredictionESP box", defaultValue: "#ff0000", disableConditions: [ ["predictionESP", false]], });
  990. initModule({ location: tp.tracersFolder, title: "PredictionESPColorRainbow", storeAs: "predictionESPColorRainbow", tooltip: "Color to use for the PredictionESP box rainbow?", defaultValue: false, disableConditions: [ ["predictionESP", false]], });
  991. tp.renderTab.pages[0].addSeparator();
  992. initFolder({ location: tp.renderTab.pages[0], title: "Ammo ESP/Tracers Options", storeAs: "tracersAmmoFolder", });
  993. initFolder({ location: tp.tracersAmmoFolder, title: "Ammo", storeAs: "ammoFolder", });
  994. initModule({ location: tp.ammoFolder, title: "AESP", storeAs: "ammoESP", tooltip: "Displays where ammo is on the map", bindLocation: tp.renderTab.pages[1], });
  995. initModule({ location: tp.ammoFolder, title: "ATracers", storeAs: "ammoTracers", tooltip: "No tooltip available", bindLocation: tp.renderTab.pages[1], });
  996. tp.ammoFolder.addSeparator();
  997. initModule({ location: tp.ammoFolder, title: "ARegime", storeAs: "ammoESPRegime", tooltip: "No tooltip available", bindLocation: tp.renderTab.pages[1], dropdown: [{ text: "When Depleted", value: "whendepleted" }, { text: "When Low", value: "whenlow" }, { text: "Below Max", value: "belowmax" }, { text: "Always On", value: "alwayson" },], defaultValue: "whendepleted", disableConditions: [["ammoESP", false], ["ammoTracers", false]], });
  998. initModule({ location: tp.ammoFolder, title: "AColor", storeAs: "ammoESPColor", tooltip: "No tooltip available", defaultValue: "#ffff00", disableConditions: [["ammoESP", false], ["ammoTracers", false]], });
  999. initFolder({ location: tp.tracersAmmoFolder, title: "Grenades", storeAs: "grenadesFolder", });
  1000. initModule({ location: tp.grenadesFolder, title: "GESP", storeAs: "grenadeESP", tooltip: "Displays where grenade pickupables is on the map", bindLocation: tp.renderTab.pages[1], });
  1001. initModule({ location: tp.grenadesFolder, title: "GTracers", storeAs: "grenadeTracers", tooltip: "No tooltip available", bindLocation: tp.renderTab.pages[1], });
  1002. tp.grenadesFolder.addSeparator();
  1003. initModule({ location: tp.grenadesFolder, title: "GRegime", storeAs: "grenadeESPRegime", tooltip: "No tooltip available", bindLocation: tp.renderTab.pages[1], dropdown: [{ text: "When Depleted", value: "whendepleted" }, { text: "When Low", value: "whenlow" }, { text: "Below Max", value: "belowmax" }, { text: "Always On", value: "alwayson" },], defaultValue: "whendepleted", disableConditions: [["grenadeESP", false], ["grenadeTracers", false]], });
  1004. initModule({ location: tp.grenadesFolder, title: "GColor", storeAs: "grenadeESPColor", tooltip: "No tooltip available", defaultValue: "#00ffff", disableConditions: [["grenadeESP", false], ["grenadeTracers", false]], });
  1005. tp.renderTab.pages[0].addSeparator();
  1006. initModule({ location: tp.renderTab.pages[0], title: "Show Look Dir", storeAs: "lookTracers", tooltip: "Renders the looking direction of each player as a line", bindLocation: tp.renderTab.pages[1], });
  1007. initFolder({ location: tp.renderTab.pages[0], title: "Look Direction Options", storeAs: "lookTracersFolder", });
  1008. initModule({ location: tp.lookTracersFolder, title: "Render Above", storeAs: "lookTracersRGI1", tooltip: "Renders LookTracers above obstacles", bindLocation: tp.renderTab.pages[1], });
  1009. //initModule({ location: tp.lookTracersFolder, title: "length", storeAs: "lookTracersLength", slider: { min: 0, max: 100, step: 0.25 }, defaultValue: 75, });
  1010. initModule({ location: tp.lookTracersFolder, title: "LookTracerColor", storeAs: "lookTracersColor", tooltip: "Color of the LookTracers", defaultValue: "#00ffff", });
  1011. tp.renderTab.pages[0].addSeparator();
  1012. initModule({ location: tp.renderTab.pages[0], title: "FOV", storeAs: "fov", tooltip: "Controls the FOV of the game", slider: { min: 0, max: 360, step: 3 }, defaultValue: 72, });
  1013. initModule({ location: tp.renderTab.pages[0], title: "Zoom FOV", storeAs: "zoom", tooltip: "Controls how zoomed in/out you are. Default keybind is C to zoom", slider: { min: 0, max: 72, step: 1 }, defaultValue: 15, bindLocation: tp.renderTab.pages[1], defaultBind: "C", });
  1014. tp.renderTab.pages[0].addSeparator();
  1015. initModule({ location: tp.renderTab.pages[0], title: "Perspective", storeAs: "perspective", tooltip: "Allows you to switch between third and first person. Think Minecraft F5!", bindLocation: tp.renderTab.pages[1], dropdown: [{ text: "1st Person (Default)", value: "firstPerson" }, { text: "3rd Person", value: "thirdPerson" }, { text: "3rd Person (Alt)", value: "thirdPersonAlt" } ], defaultValue: "disabled", defaultBind: "Digit5", });
  1016. initFolder({ location: tp.renderTab.pages[0], title: "Perspective Options", storeAs: "perspectiveFolder", });
  1017. // initModule({ location: tp.perspectiveFolder, title: "Alpha Effect", storeAs: "perspectiveAlpha", tooltip: "Makes players a bit transparent when in third person", bindLocation: tp.renderTab.pages[1], });
  1018. // tp.perspectiveFolder.addSeparator();
  1019. initModule({ location: tp.perspectiveFolder, title: "Y Offset", storeAs: "perspectiveY", tooltip: "Offset of the camera in y-direction (how far behind should it be?)", slider: { min: 0, max: 30, step: 0.25 }, defaultValue: 0.5});
  1020. initModule({ location: tp.perspectiveFolder, title: "Z Offset", storeAs: "perspectiveZ", tooltip: "Offset of the camera in z-direction (how far above should it be?)", slider: { min: 0, max: 30, step: 0.25 }, defaultValue: 2});
  1021. initModule({ location: tp.renderTab.pages[0], title: "CamWIP", storeAs: "freecam", tooltip: "Still a WIP (lazy devs lmaooooooooooo)", bindLocation: tp.renderTab.pages[1], });
  1022. initModule({ location: tp.renderTab.pages[0], title: "Wireframe", storeAs: "wireframe", tooltip: "Outlines map objects to allow you to see directly though walls. Will leave rendering artifacts on the skybox, making the game basically unplayable", bindLocation: tp.renderTab.pages[1], });
  1023. initModule({ location: tp.renderTab.pages[0], title: "Particle Speed", storeAs: "particleSpeedMultiplier", tooltip: "Adjusts speed of particles :D", slider: { min: 0.05, max: 5, step: 0.05 }, defaultValue: 1, });
  1024. initModule({ location: tp.renderTab.pages[0], title: "Egg Size", storeAs: "eggSize", tooltip: "Changes how big eggs are. This does not affect hitboxes and is client-side only", slider: { min: 0, max: 10, step: 0.25 }, defaultValue: 1, });
  1025. tp.renderTab.pages[0].addSeparator();
  1026. initModule({ location: tp.renderTab.pages[0], title: "Set Detail", storeAs: "setDetail", tooltip: "Changes quality of game graphics", bindLocation: tp.renderTab.pages[1], dropdown: [{ text: "Disabled", value: "disabled" }, { text: "Auto Detail", value: "autodetail" }, { text: "No Details", value: "nodetails" }, { text: "Shadows", value: "shadows" }, { text: "High Res", value: "highres" }, { text: "Shadows+High Res", value: "shadowshighres" }], defaultValue: "disabled" });
  1027. initModule({ location: tp.renderTab.pages[0], title: "Textures", storeAs: "enableTextures", tooltip: "Disables some textures. primarily, the sky", bindLocation: tp.renderTab.pages[1], defaultValue: true, });
  1028. initModule({ location: tp.renderTab.pages[0], title: "Render Delay", storeAs: "renderDelay", tooltip: "Basically, this adds extra FPS buffer", slider: { min: 0, max: 30000, step: 10 }, defaultValue: 0, });
  1029. //HUD MODULES
  1030. initFolder({ location: tp.mainPanel, title: "HUD", storeAs: "hudFolder", });
  1031. initTabs({ location: tp.hudFolder, storeAs: "hudTab" }, [
  1032. {
  1033. title: "WIP", content:
  1034. `Sorry! No guide yet!`},
  1035. ]);
  1036. initModule({ location: tp.hudTab.pages[0], title: "Show Bloom", storeAs: "revealBloom", tooltip: "Displays the next shot's bloom as a red dot onscreen", bindLocation: tp.hudTab.pages[1], });
  1037. initModule({ location: tp.hudTab.pages[0], title: "Show LOS", storeAs: "showLOS", tooltip: "Changes the crosshair's color if the player is in an enemy's line of sight", bindLocation: tp.hudTab.pages[1], });
  1038. initModule({ location: tp.hudTab.pages[0], title: "Show MinAngle", storeAs: "showMinAngle", tooltip: "Draws a circle representing the aimbot's minAngle to the hud", bindLocation: tp.hudTab.pages[1], });
  1039. initModule({ showConditions: [["disabledlmao", true]], location: tp.hudTab.pages[0], title: "Leaderboard", storeAs: "highlightLeaderboard", tooltip: "Sie wurden enterbt", bindLocation: tp.hudTab.pages[1], enableConditions: [["aimbot", true]], });
  1040. tp.hudTab.pages[0].addSeparator();
  1041. initModule({ location: tp.hudTab.pages[0], title: "Co-ords", storeAs: "showCoordinates", tooltip: "Displays current position on the map", bindLocation: tp.hudTab.pages[1], });
  1042. initModule({ location: tp.hudTab.pages[0], title: "RadarWIP", storeAs: "radar", tooltip: "Work-in-progress module. You should leave this off if you are not a dev", bindLocation: tp.hudTab.pages[1], });
  1043. initModule({ location: tp.hudTab.pages[0], title: "HP Display", storeAs: "playerStats", tooltip: "Displays the health of your opponents", bindLocation: tp.hudTab.pages[1], });
  1044. initModule({ location: tp.hudTab.pages[0], title: "PlayerInfo", storeAs: "playerInfo", tooltip: "Displays added information about the player you're targeting", bindLocation: tp.hudTab.pages[1], });
  1045. initModule({ location: tp.hudTab.pages[0], title: "GameInfo", storeAs: "gameInfo", tooltip: "Displays extra game information", bindLocation: tp.hudTab.pages[1], });
  1046. initModule({ location: tp.hudTab.pages[0], title: "Performance", storeAs: "performanceInfo", tooltip: "Shows performance information like memory usage", bindLocation: tp.hudTab.pages[1], });
  1047. initModule({ location: tp.hudTab.pages[0], title: "ShowStream", storeAs: "showStreams", tooltip: "Detects & displays ongoing twitch streamers", bindLocation: tp.hudTab.pages[1], });
  1048. tp.hudTab.pages[0].addSeparator();
  1049. initModule({ location: tp.hudTab.pages[0], title: "MiniMap", storeAs: "minimap", tooltip: "Displays a top down view of your game", bindLocation: tp.hudTab.pages[1], });
  1050. initModule({ location: tp.hudTab.pages[0], title: "MiniMap Zoom", storeAs: "minimapZoom", tooltip: "How much the minimap camera should zoom in", slider: { min: 0.1, max: 20, step: 0.1 }, defaultValue: 5, showConditions: [["minimap", true]], });
  1051. initModule({ location: tp.hudTab.pages[0], title: "MiniMap Size", storeAs: "minimapSize", tooltip: "How big the minimap should be on the screen", slider: { min: 0.1, max: 5, step: 0.1 }, defaultValue: 1, showConditions: [["minimap", true]], });
  1052. //CHAT MODULES
  1053. initFolder({ location: tp.mainPanel, title: "Chat", storeAs: "chatFolder", });
  1054. initTabs({ location: tp.chatFolder, storeAs: "chatTab" }, [
  1055. {
  1056. title: "WIP", content:
  1057. `Sorry! No guide yet!`},
  1058. ]);
  1059. initModule({ location: tp.chatTab.pages[0], title: "InfiniHistory", storeAs: "chatExtend", tooltip: "Disables the default limiting of message history", bindLocation: tp.chatTab.pages[1], });
  1060. initModule({ location: tp.chatTab.pages[0], title: "HighlightTxt", storeAs: "chatHighlight", tooltip: "Allows you to highlight text from the chat to copy somewhere else", bindLocation: tp.chatTab.pages[1], });
  1061. // initModule({ location: tp.chatTab.pages[0], title: "RestoreScroll", storeAs: "restoreScroll", tooltip: "Dont fucking add tooltips to modules that HAVE BEEN COMMENTED OUT WTF PUPPY?", bindLocation: tp.chatTab.pages[1], });
  1062. initModule({ location: tp.chatTab.pages[0], title: "Max Ingame", storeAs: "maxChat", tooltip: "The number of messages to show ingame (if unset, infinite history will cause issues)", slider: { min: 0, max: 30, step: 1 }, defaultValue: 5, });
  1063. initModule({ location: tp.chatTab.pages[0], title: "ShowFiltered", storeAs: "disableChatFilter", tooltip: "View messages that are caught by the game filter in red", bindLocation: tp.chatTab.pages[1], });
  1064. initModule({ location: tp.chatTab.pages[0], title: "UnfilterNames", storeAs: "unfilterNames", tooltip: "See filtered people's real names, highlighed in the leaderboard", bindLocation: tp.chatTab.pages[1], });
  1065. tp.chatTab.pages[0].addSeparator();
  1066. initModule({ location: tp.chatTab.pages[0], title: "BypassFilter", storeAs: "chatFilterBypass", tooltip: "Bypass naughty word game message filter!!!!1111 :D", bindLocation: tp.chatTab.pages[1], });
  1067. initModule({ location: tp.chatTab.pages[0], title: "Tall Chat", storeAs: "tallChat", tooltip: "Makes the chat text taller, appends a character to all sent messages", bindLocation: tp.chatTab.pages[1], });
  1068. tp.chatTab.pages[0].addSeparator();
  1069. initFolder({ location: tp.chatTab.pages[0], title: "FakeMessage", storeAs: "fakeMessageFolder", });
  1070. let listOfIDs = [];
  1071. if (unsafeWindow.extern && unsafeWindow.extern.inGame && ss && ss.PLAYERS) {
  1072. ss.PLAYERS.forEach((player) => {
  1073. listOfIDs.push({ text: player.name, value: String(player.id) });
  1074. log({ text: player.name, value: player.id })
  1075. });
  1076. };
  1077. initModule({ location: tp.fakeMessageFolder, title: "Send As", storeAs: "fakeMessageID", tooltip: "Who to send fake message as", bindLocation: tp.chatTab.pages[1], dropdown: [ ...listOfIDs, { text: "MOD", value: "254" }, { text: "SERVER", value: "255" } ], defaultValue: "255" });
  1078. initModule({ location: tp.fakeMessageFolder, title: '(Refresh List)', storeAs: 'fakeMessageRefresh', button: 'REFRESH', tooltip: "Refreshes list", bindLocation: tp.chatTab.pages[1], clickFunction: function () {
  1079. updateMenu = true;
  1080. } });
  1081. initModule({ location: tp.fakeMessageFolder, title: "Content", storeAs: "fakeMessageText", tooltip: "The content of the fake message", defaultValue: "ЅtateFarm Client On Top! ", });
  1082. initModule({ location: tp.fakeMessageFolder, title: "Bold Text", storeAs: "fakeMessageBold", tooltip: "Bold text", bindLocation: tp.chatTab.pages[1], });
  1083. initModule({ location: tp.fakeMessageFolder, title: 'SEND', storeAs: 'fakeMessageSend', button: 'SEND MESSAGE', tooltip: "Allows sending messages as MOD or SERVER (client sided only)", bindLocation: tp.chatTab.pages[1], clickFunction: function () {
  1084. if (ss.addChat && unsafeWindow.extern.inGame) {
  1085. try {
  1086. if (ss.isBadWord(extract("fakeMessageText"))) createPopup("Message would be filtered.", "error");
  1087. ss.addChat(extract("fakeMessageText"), !!extract("fakeMessageBold"), Number(extract("fakeMessageID")));
  1088. } catch (error) {
  1089. log("shit, sending a fake message failed. damn lmao.", error)
  1090. };
  1091. }
  1092. } });
  1093. tp.chatTab.pages[0].addSeparator();
  1094. initModule({ location: tp.chatTab.pages[0], title: "Spammer", storeAs: "spamChat", tooltip: "Automatically send messages", bindLocation: tp.chatTab.pages[1], });
  1095. initFolder({ location: tp.chatTab.pages[0], title: "Spammer Options", storeAs: "spammerFolder", });
  1096. initModule({ location: tp.spammerFolder, title: "Delay (ms)", storeAs: "spamChatDelay", tooltip: "The interval to send messages", slider: { min: 250, max: 60000, step: 10 }, defaultValue: 500, enableConditions: [["spamChat", true]], });
  1097. initModule({ location: tp.spammerFolder, title: "Spam Text", storeAs: "spamChatText", tooltip: "The message to spam", defaultValue: "ЅtateFarm Client On Top! ", });
  1098. tp.chatTab.pages[0].addSeparator();
  1099. initFolder({ location: tp.chatTab.pages[0], title: "Trolling", storeAs: "trollingFolder", });
  1100. initModule({ location: tp.trollingFolder, title: "Mock", storeAs: "mockMode", tooltip: "Rudely mocks people talking in chat", bindLocation: tp.chatTab.pages[1], });
  1101. initModule({ location: tp.trollingFolder, title: "Mock no repeat", storeAs: "mockModeNoRePeat", tooltip: "Makes mock not respond if it doesn't have an answer, instead of copying the message", bindLocation: tp.chatTab.pages[1], });
  1102. initModule({ location: tp.trollingFolder, title: "Announcer", storeAs: "announcer", tooltip: "Announces when you change GUI config", bindLocation: tp.chatTab.pages[1], });
  1103. tp.trollingFolder.addSeparator();
  1104. initModule({ location: tp.trollingFolder, title: "AutoEZ", storeAs: "autoEZ", tooltip: "Gloats on people when you kill them", bindLocation: tp.chatTab.pages[1], });
  1105. initModule({ location: tp.trollingFolder, title: "CheatAccuse", storeAs: "cheatAccuse", tooltip: "Accuses your killer of cheating", bindLocation: tp.chatTab.pages[1], });
  1106. tp.chatTab.pages[0].addSeparator();
  1107. initFolder({ location: tp.chatTab.pages[0], title: "Join/Leave Msgs Options", storeAs: "joinLeaveFolder", });
  1108. initModule({ location: tp.joinLeaveFolder, title: "Join Msgs", storeAs: "joinMessages", tooltip: " Notify you when players join", bindLocation: tp.chatTab.pages[1], });
  1109. initModule({ location: tp.joinLeaveFolder, title: "Leave Msgs", storeAs: "leaveMessages", tooltip: "Notify you when players leave", bindLocation: tp.chatTab.pages[1], });
  1110. tp.joinLeaveFolder.addSeparator();
  1111. initModule({ location: tp.joinLeaveFolder, title: "Send2Chat", storeAs: "publicBroadcast", tooltip: "Decides if these messages are shown to only you or everyone", bindLocation: tp.chatTab.pages[1], disableConditions: [["joinMessages", false], ["leaveMessages", false]], });
  1112. initModule({ location: tp.joinLeaveFolder, title: "[SFC]Added", storeAs: "joinLeaveBranding", tooltip: "If send2chat is enabled, this will add [SFC] to the beginning of the join/leave messages", bindLocation: tp.chatTab.pages[1], disableConditions: [["joinMessages", false], ["leaveMessages", false]], });
  1113. //LISTS MODULES
  1114. initFolder({ location: tp.mainPanel, title: "Lists", storeAs: "listsFolder", });
  1115. initTabs({ location: tp.listsFolder, storeAs: "listsTab" }, [
  1116. {
  1117. title: "WIP", content:
  1118. `Sorry! No guide yet!`},
  1119. ]);
  1120. initModule({ location: tp.listsTab.pages[0], title: "Whitelist", storeAs: "whitelist", tooltip: "A list of names to use the below configuration. Separate with commas", defaultValue: "User-1, User-2", });
  1121. initFolder({ location: tp.listsTab.pages[0], title: "Whitelist (Target Only) Options", storeAs: "whitelistFolder", });
  1122. initModule({ location: tp.whitelistFolder, title: "WAimbot", storeAs: "enableWhitelistAimbot", tooltip: "Only will aimbot on the specified whitelist player(s). if the player(s) are all dead, you will target nothing", bindLocation: tp.listsTab.pages[1], });
  1123. initModule({ location: tp.whitelistFolder, title: "When None Visible", storeAs: "enableWhenNoneVisible", tooltip: "Still targets non-whitelisted players if no whitelisted player is a valid target", bindLocation: tp.listsTab.pages[1], });
  1124. initModule({ location: tp.whitelistFolder, title: "WESP", storeAs: "enableWhitelistTracers", tooltip: "A special behavior will appear to whitelisted ESP people", bindLocation: tp.listsTab.pages[1], disableConditions: [["tracers", false], ["playerESP", false]], });
  1125. initModule({ location: tp.whitelistFolder, title: "WESPType", storeAs: "whitelistESPType", tooltip: "Make their ESP line a special color, or exclude", bindLocation: tp.listsTab.pages[1], dropdown: [{ text: "Only Include", value: "onlyinclude" }, { text: "Highlight", value: "highlight" },], defaultValue: "onlyinclude", disableConditions: [["tracers", false], ["playerESP", false]], showConditions: [["enableWhitelistTracers", true]], });
  1126. initModule({ location: tp.whitelistFolder, title: "WHighlight", storeAs: "whitelistColor", tooltip: "The color to highlight whitelisted players in", defaultValue: "#e80aac", disableConditions: [["tracers", false], ["playerESP", false]], showConditions: [["enableWhitelistTracers", true], ["whitelistESPType", "highlight"]], });
  1127. tp.listsTab.pages[0].addSeparator();
  1128. initModule({ location: tp.listsTab.pages[0], title: "Blacklist", storeAs: "blacklist", tooltip: "A list of names to use the below configuration. Separate with commas", defaultValue: "User-1, User-2", });
  1129. initFolder({ location: tp.listsTab.pages[0], title: "Blacklist (Exclude) Options", storeAs: "blacklistFolder", });
  1130. initModule({ location: tp.blacklistFolder, title: "BAimbot", storeAs: "enableBlacklistAimbot", tooltip: "Never will aimbot on the specified whitelist player(s)", bindLocation: tp.listsTab.pages[1], });
  1131. initModule({ location: tp.blacklistFolder, title: "BESP", storeAs: "enableBlacklistTracers", tooltip: "A special behavior will appear to blacklisted ESP people", bindLocation: tp.listsTab.pages[1], disableConditions: [["tracers", false], ["playerESP", false]], });
  1132. initModule({ location: tp.blacklistFolder, title: "BESPType", storeAs: "blacklistESPType", tooltip: "what", bindLocation: tp.listsTab.pages[1], dropdown: [{ text: "Just Exclude", value: "justexclude" }, { text: "Highlight", value: "highlight" },], defaultValue: "justexclude", disableConditions: [["tracers", false], ["playerESP", false]], showConditions: [["enableBlacklistTracers", true]], });
  1133. initModule({ location: tp.blacklistFolder, title: "BHighlight", storeAs: "blacklistColor", tooltip: "Color to use for blacklisted highlighting", defaultValue: "#00ff00", disableConditions: [["tracers", false], ["playerESP", false]], showConditions: [["enableBlacklistTracers", true], ["blacklistESPType", "highlight"]], });
  1134. //AUTOMATION MODULES
  1135. initFolder({ location: tp.mainPanel, title: "Automation", storeAs: "automationFolder", });
  1136. initTabs({ location: tp.automationFolder, storeAs: "automationTab" }, [
  1137. {
  1138. title: "WIP", content:
  1139. `Sorry! No guide yet!`},
  1140. ]);
  1141. initModule({
  1142. location: tp.automationTab.pages[0], title: "Flood Report", storeAs: "floodReport", tooltip: "Mass reports everyone. o7, comrade", bindLocation: tp.automationTab.pages[1], button: "Spam Now!", clickFunction: function () {
  1143. createPopup("Thank you for your efforts comrade! o7");
  1144. spamReport();
  1145. },
  1146. });
  1147. tp.automationTab.pages[0].addSeparator();
  1148. initModule({ location: tp.automationTab.pages[0], title: "Bunnyhop", storeAs: "bunnyhop", tooltip: "Makes you automatically bunnyhop when holding down the jump button", bindLocation: tp.automationTab.pages[1], });
  1149. initModule({ location: tp.automationTab.pages[0], title: "Auto Walk", storeAs: "autoWalk", tooltip: "Walks forward automatically", bindLocation: tp.automationTab.pages[1], });
  1150. initModule({ location: tp.automationTab.pages[0], title: "Auto Strafe", storeAs: "autoStrafe", tooltip: "Strafes automatically", bindLocation: tp.automationTab.pages[1], });
  1151. initModule({ location: tp.automationTab.pages[0], title: "Auto Jump", storeAs: "autoJump", tooltip: "Jumps on the specified interval", bindLocation: tp.automationTab.pages[1], });
  1152. initModule({ location: tp.automationTab.pages[0], title: "Jump Delay", storeAs: "autoJumpDelay", tooltip: "How often should AutoJump trigger", slider: { min: 1, max: 10000, step: 1 }, defaultValue: 1, showConditions: [["autoJump", true]], });
  1153. tp.automationTab.pages[0].addSeparator();
  1154. initModule({ location: tp.automationTab.pages[0], title: "AutoWeapon", storeAs: "autoWeapon", tooltip: "Automatically picks a weapon", 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" }, { text: "Randomised", value: "random" }], defaultValue: "disabled" });
  1155. initModule({ location: tp.automationTab.pages[0], title: "AutoGrenade", storeAs: "autoGrenade", tooltip: "Automatically grenades w/ a delay", bindLocation: tp.automationTab.pages[1], });
  1156. tp.automationTab.pages[0].addSeparator();
  1157. initFolder({ location: tp.automationTab.pages[0], title: "Auto Join Options", storeAs: "autoJoinFolder", });
  1158. initModule({ location: tp.autoJoinFolder, title: "Auto Join", storeAs: "autoJoin", tooltip: "Automatically joins a game", bindLocation: tp.automationTab.pages[1], });
  1159. initModule({ location: tp.autoJoinFolder, title: "Join Code", storeAs: "joinCode", tooltip: "The gamecode used by AutoJoin", defaultValue: "CODE", enableConditions: [["autoJoin", true]], });
  1160. initModule({ location: tp.autoJoinFolder, title: "Get Code", storeAs: "getCode", tooltip: "Get the current gamecode for the autoJoin code field, uses last code you were in if in menu", button: "Retrieve", clickFunction: function () { change("joinCode", GAMECODE) }, enableConditions: [["autoJoin", true]], });
  1161. initFolder({ location: tp.automationTab.pages[0], title: "Auto Name Options", storeAs: "autoNamesFolder", });
  1162. initModule({ location: tp.autoNamesFolder, title: "Use Name", storeAs: "useCustomName", tooltip: "Automaticaly names yourself", bindLocation: tp.automationTab.pages[1], });
  1163. initModule({ location: tp.autoNamesFolder, title: "New Name", storeAs: "usernameAutoJoin", tooltip: "The name used by useCustomName", defaultValue: "ЅtateFarmer", enableConditions: [["useCustomName", true]], });
  1164. //the name usernameAutoJoin is only kept for compatability
  1165. initModule({ location: tp.autoNamesFolder, title: "Copy Name", storeAs: "copyName", button: "Steal Name", enableConditions: [["useCustomName", true]], tooltip: "Steals a random lobby player's name", bindLocation: tp.automationTab.pages[1], clickFunction: function(){
  1166. const copiedName = retrieveCopiedName();
  1167. log("Retrieved copied name:",copiedName);
  1168. change("usernameAutoJoin",(copiedName||"ЅtateFarmer"));
  1169. },});
  1170. initModule({ location: tp.autoNamesFolder, title: "Random Name", storeAs: "randomName", button: "Randomise Name", enableConditions: [["useCustomName", true]], tooltip: "Gets a random shell shockers default sounding name", bindLocation: tp.automationTab.pages[1], clickFunction: function(){
  1171. const randomisedName = unsafeWindow.extern.generateRandomName();
  1172. change("usernameAutoJoin",(randomisedName||"ЅtateFarmer"));
  1173. },});
  1174. tp.automationTab.pages[0].addSeparator();
  1175. initModule({ location: tp.automationTab.pages[0], title: "AutoRespawn", storeAs: "autoRespawn", tooltip: "Automatically respawn", bindLocation: tp.automationTab.pages[1], });
  1176. initModule({ location: tp.automationTab.pages[0], title: "Auto Team", storeAs: "autoTeam", tooltip: "Automatically picks a team", bindLocation: tp.automationTab.pages[1], dropdown: [{ text: "Disabled", value: "disabled" }, { text: "Red Team", value: "red" }, { text: "Blue Team", value: "blue" }, { text: "Random Team", value: "random" }], defaultValue: "disabled" });
  1177. tp.automationTab.pages[0].addSeparator();
  1178. initFolder({ location: tp.automationTab.pages[0], title: "Game Blacklist Settings", storeAs: "gameBlacklistFolder", });//Game Blacklist Folder
  1179. initModule({ location: tp.gameBlacklistFolder, title: "Blacklist On", storeAs: "gameBlacklist", tooltip: "Prevents you from joining specific games", bindLocation: tp.automationTab.pages[1], });
  1180. initModule({ location: tp.gameBlacklistFolder, title: "Codes:", storeAs: "gameBlacklistCodes", tooltip: "The game list used by GameBlacklist, seperated with commas", defaultValue: "", });
  1181. initModule({ location: tp.gameBlacklistFolder, title: "Get BL Code", storeAs: "getCodeBlacklist", button: "Retrieve", tooltip: "Get the current gamecode for the GameBlacklist code field, uses last code you were in if in menu", bindLocation: tp.automationTab.pages[1], clickFunction: function(){
  1182. if (GAMECODE != undefined && GAMECODE != null){
  1183. if (extract("gameBlacklistCodes") != "" && extract("gameBlacklistCodes") != undefined) { //does the list exist yet?
  1184. let cds = extract("gameBlacklistCodes").split(","); //get the codes as an array
  1185. if(cds.includes(GAMECODE)){ //the code is already in the list!
  1186. createPopup("Gamecode already in list!"); //notify user that we aren't adding the code'
  1187. return; //no need to add code to list, so gtfo
  1188. }
  1189. }
  1190. extract("gameBlacklistCodes") != undefined ? change("gameBlacklistCodes", extract("gameBlacklistCodes")+GAMECODE+",") : change("gameBlacklistCodes", GAMECODE+",");
  1191. } else {
  1192. createPopup("Join a game first");
  1193. };
  1194. },});
  1195. initModule({ location: tp.gameBlacklistFolder, title: "Clear BL Codes", storeAs: "clearCodeBlacklist", button: "Clear", tooltip: "Empties the GameBlacklist code list", bindLocation: tp.automationTab.pages[1], clickFunction: function(){ //capitalise PLS
  1196. //not a big fan of this "logic in init" thing, but it's basically the norm now + the funcs are really designed to be used this way so yh :( (Seq rant)
  1197. if(extract("gameBlacklistCodes") != undefined) //do we have codes yet? Otherwise the log is either gonna be pointless or error...
  1198. log("Clearing BL codes, cleared list: " +extract("gameBlacklistCodes")); //wouldn't be needed but allows for retrival of codes on accidental/partial deletion, and one more line of log can't hurt too much, can it?
  1199. change("gameBlacklistCodes", ""); //just set the blacklist to an empty String
  1200. },});
  1201. tp.automationTab.pages[0].addSeparator();
  1202. initModule({ location: tp.automationTab.pages[0], title: "LeaveGame", storeAs: "leaveGame", button: "Unjoin Game", tooltip: "Leave to the menu", bindLocation: tp.automationTab.pages[1], clickFunction: function () { unsafeWindow.vueApp.onLeaveGameConfirm() }, });
  1203. initModule({ location: tp.automationTab.pages[0], title: "LeaveEmpty", storeAs: "leaveEmpty", tooltip: "Leaves empty games", bindLocation: tp.automationTab.pages[1], });
  1204. initModule({ location: tp.automationTab.pages[0], title: "Auto Leave", storeAs: "autoLeave", tooltip: "Automatically leaves after a specified interval", bindLocation: tp.automationTab.pages[1], });
  1205. initModule({ location: tp.automationTab.pages[0], title: "Delay (s)", storeAs: "autoLeaveDelay", tooltip: "The interval after which autoLeave evacuates to the lobby", slider: { min: 0, max: 3600, step: 1 }, defaultValue: 300, enableConditions: [["autoLeave", true]] });
  1206. tp.automationTab.pages[0].addSeparator();
  1207. initModule({ location: tp.automationTab.pages[0], title: "Gamemode", storeAs: "autoGamemode", tooltip: "Picks a gamemode for autojoin", bindLocation: tp.automationTab.pages[1], dropdown: [{ text: "Disabled", value: "disabled" }, { text: "FFA", value: "ffa" }, { text: "Teams", value: "teams" }, { text: "Captula", value: "captula" }, { text: "KotC", value: "kotc" }, { text: "Randomised", value: "random" }], defaultValue: "disabled" });
  1208. initModule({ location: tp.automationTab.pages[0], title: "Auto Region", storeAs: "autoRegion", tooltip: "Automatically selects a region to play in", bindLocation: tp.automationTab.pages[1], dropdown: [{ text: "Disabled", value: "disabled" }, { text: "Chile", value: "santiago" }, { text: "Germany", value: "germany" }, { text: "Singapore", value: "singapore" }, { text: "Sydney", value: "sydney" }, { text: "US Central", value: "uscentral" }, { text: "US East", value: "useast" }, { text: "US West", value: "uswest" }, { text: "Randomised", value: "random" }], defaultValue: "disabled" });
  1209. tp.automationTab.pages[0].addSeparator();
  1210. initModule({ location: tp.automationTab.pages[0], title: "Egg Color", storeAs: "eggColor", tooltip: "Picks the egg color automatically", bindLocation: tp.automationTab.pages[1], dropdown: [{ text: "Disabled", value: "disabled" }, { text: "White", value: "white" }, { text: "Light Blue", value: "lightblue" }, { text: "Light Eggshell", value: "lighteggshell" }, { text: "Eggshell", value: "eggshell" }, { text: "Dark Eggshell", value: "darkeggshell" }, { text: "Darker Eggshell", value: "darkereggshell" }, { text: "Darkest Eggshell", value: "darkesteggshell" }, { text: "Red (VIP)", value: "red" }, { text: "Purple (VIP)", value: "purple" }, { text: "Pink (VIP)", value: "pink" }, { text: "Yellow (VIP)", value: "yellow" }, { text: "Blue (VIP)", value: "blue" }, { text: "Green (VIP)", value: "green" }, { text: "Lime (VIP)", value: "lime" }, /*{text: "Randomised", value: "random"}*/], defaultValue: "disabled" });
  1211. initModule({ location: tp.automationTab.pages[0], title: "Auto Stamp", storeAs: "autoStamp", tooltip: "Picks the egg stamp automatically", bindLocation: tp.automationTab.pages[1], dropdown: [{ text: "Disabled", value: "disabled" }, { text: "Target Stamp", value: "target" }, { text: "No Sign Stamp", value: "nosign" }, { text: "Question Mark Stamp?", value: "question" }, { text: "Peace Stamp", value: "peace" }, { text: "Thumbs Up Stamp", value: "thumbsup" }, { text: "Pablo Smile Stamp", value: "pablosmile" }], defaultValue: "disabled" });
  1212. initModule({ location: tp.automationTab.pages[0], title: "Auto Hat", storeAs: "autoHat", tooltip: "Picks the egg hat automatically", bindLocation: tp.automationTab.pages[1], dropdown: [{ text: "Disabled", value: "disabled" }, { text: "Ball Cap", value: "ballcap" }, { text: "Boat Fedora", value: "boatfedora" }, { text: "Top Hat", value: "tophat" }, { text: "Derby Hat", value: "derbyhat" }, { text: "Mountie Hat", value: "mountiehat" }, { text: "Pablo Hat", value: "pablohat" }], defaultValue: "disabled" });
  1213. //BOTTING MODULES
  1214. initFolder({ location: tp.mainPanel, title: "Botting", storeAs: "bottingFolder", });
  1215. initTabs({ location: tp.bottingFolder, storeAs: "bottingTab" }, [
  1216. {
  1217. title: "WIP", content:
  1218. `Sorry! No guide yet!
  1219. But check out the GitHub guide.`},
  1220. ]);
  1221. initModule({ location: tp.bottingTab.pages[0], title: "Show Panel", storeAs: "showBotPanel", tooltip: "Show the bot panel", bindLocation: tp.bottingTab.pages[1], button: "Show Panel", defaultBind: "J", clickFunction: () => {
  1222. tp.botPanel.hidden = !tp.botPanel.hidden;
  1223. }});
  1224. tp.bottingTab.pages[0].addSeparator();
  1225. initModule({ location: tp.bottingTab.pages[0], title: "How To?", storeAs: "bottingGuide", tooltip: "Click for infos on how to get started and free candy", button: "Link", clickFunction: function () { GM_openInTab(bottingGuideURL, { active: true }) }, });
  1226. //THEMING MODULES
  1227. initFolder({ location: tp.mainPanel, title: "Theming", storeAs: "themingFolder", });
  1228. initTabs({ location: tp.themingFolder, storeAs: "themingTab" }, [
  1229. {
  1230. title: "WIP", content:
  1231. `Sorry! No guide yet!`},
  1232. ]);
  1233. initModule({ location: tp.themingTab.pages[0], title: "Skybox", storeAs: "skybox", tooltip: "Allows you to switch out Shell's default skybox", bindLocation: tp.themingTab.pages[1], dropdown: loadedSkyboxes, changeFunction: (newSkybox) => {
  1234. if (!unsafeWindow[skyboxName]) return;
  1235. unsafeWindow[skyboxName].material.reflectionTexture.coordinatesMode = 5; //L.BABYLON.Texture.SKYBOX_MODE;
  1236. }});
  1237. initModule({ location: tp.themingTab.pages[0], title: "Randomize Skybox", storeAs: "randomSkyBox", tooltip: "Switches the skybox to a random one", bindLocation: tp.themingTab.pages[1], });
  1238. initModule({ location: tp.themingTab.pages[0], title: "Switch Interval", storeAs: "randomSkyBoxInterval", tooltip: "The interval after which the skybox is switched, given that randomSkyBox is enabled. In minutes", slider: { min: 1, max: 10, step: 0.1 }, defaultValue: 3, });
  1239. tp.themingTab.pages[0].addSeparator();
  1240. initModule({ location: tp.themingTab.pages[0], title: "Legacy Models", storeAs: "legacyModels", tooltip: "Switches to the old models", bindLocation: tp.themingTab.pages[1], });
  1241. initModule({ location: tp.themingTab.pages[0], title: "Game Filter", storeAs: "filter", tooltip: "Adds a color tint to the game", bindLocation: tp.themingTab.pages[1], dropdown: [
  1242. {text: "Default", value: 2},
  1243. {text: "Blue", value: 3},
  1244. {text: "Mexico", value: 4},
  1245. ],});
  1246. initModule({ location: tp.themingTab.pages[0], title: "Gun Position", storeAs: "gunPosition", tooltip: "Changes the position of your player's gun", bindLocation: tp.themingTab.pages[1], dropdown: [
  1247. {text: "Right", value: "right"},
  1248. {text: "Left", value: "left"},
  1249. {text: "Hidden", value: "hidden"},
  1250. ],});
  1251. tp.themingTab.pages[0].addSeparator();
  1252. initModule({ location: tp.themingTab.pages[0], title: "Enable Bob Modifier", storeAs: "bobModifierEnabled", tooltip: "Enable/disable setting the bob effect", bindLocation: tp.themingTab.pages[1], });
  1253. initFolder({ location: tp.themingTab.pages[0], title: "Bob Modifier Settings", storeAs: "bobFolder", });
  1254. initModule({ location: tp.bobFolder, title: "Bobbing Value", storeAs: "bobModifier", tooltip: "Set to 0 to disable. Mess with other numbers for funny effects.", slider: { min: 0, max: 99, step: 0.01 }, defaultValue: 0, });
  1255. initModule({ location: tp.bobFolder, title: "Only When Still", storeAs: "bobModifierWhenStill", tooltip: "Disables while you're still.", bindLocation: tp.themingTab.pages[1], });
  1256. tp.themingTab.pages[0].addSeparator();
  1257. initFolder({ location: tp.themingTab.pages[0], title: "Audio Settings", storeAs: "audioFolder", });
  1258. initModule({ location: tp.audioFolder, title: "Mute Game", storeAs: "muteGame", tooltip: "Mute the game?", bindLocation: tp.themingTab.pages[1], });
  1259. initModule({ location: tp.audioFolder, title: "DistanMult", storeAs: "distanceMult", tooltip: "Makes the distance when playing sfx change", slider: { min: 0.01, max: 2, step: 0.01 }, defaultValue: 1, });
  1260. tp.audioFolder.addSeparator();
  1261. initModule({ location: tp.audioFolder, title: "CustomSFX (1st)", storeAs: "customSFX1", tooltip: "Select a custom sound pack. Changes in-game sounds. Three pack slots available at once", bindLocation: tp.themingTab.pages[1], enableConditions: [["muteGame", false]], dropdown: JSON.parse(JSON.stringify(retrievedSFX)), });
  1262. initModule({ location: tp.audioFolder, title: "CustomSFX (2nd)", storeAs: "customSFX2", tooltip: "Select a custom sound pack. Changes in-game sounds. Three pack slots available at once", bindLocation: tp.themingTab.pages[1], enableConditions: [["muteGame", false]], dropdown: JSON.parse(JSON.stringify(retrievedSFX)), });
  1263. initModule({ location: tp.audioFolder, title: "CustomSFX (3rd)", storeAs: "customSFX3", tooltip: "Select a custom sound pack. Changes in-game sounds. Three pack slots available at once", bindLocation: tp.themingTab.pages[1], enableConditions: [["muteGame", false]], dropdown: JSON.parse(JSON.stringify(retrievedSFX)), });
  1264. tp.themingTab.pages[0].addSeparator();
  1265. initModule({ location: tp.themingTab.pages[0], title: "Replace Logo", storeAs: "replaceLogo", tooltip: "Replaces shell shockers' BORING logo with the BEAUTIFUL StateFarm logo", bindLocation: tp.themingTab.pages[1], });
  1266. initModule({ location: tp.themingTab.pages[0], title: "Animate Title", storeAs: "titleAnimation", tooltip: "Makes the page title look cool", bindLocation: tp.themingTab.pages[1], });
  1267. initModule({ location: tp.themingTab.pages[0], title: "Client Theme", storeAs: "themeType", tooltip: "Controls the client's UI theme", bindLocation: tp.themingTab.pages[1], dropdown: [
  1268. {text: "Default", value: "defaultTheme"},
  1269. {text: "Iceberg", value: "icebergTheme"},
  1270. {text: "Jet Black", value: "jetblackTheme"},
  1271. {text: "Light", value: "lightTheme"},
  1272. {text: "Retro", value: "retroTheme"},
  1273. {text: "Translucent", value: "translucentTheme"},
  1274. {text: "StateFarmer", value: "statefarmerTheme"},
  1275. {text: "Blurple", value: "blurpleTheme"},
  1276. {text: "ShellFarm", value: "shellFarmTheme"},
  1277. ], defaultValue: "defaultTheme", changeFunction: function(value) {
  1278. applyTheme(value.value);
  1279. }});
  1280. tp.themingTab.pages[0].addSeparator();
  1281. initModule({ location: tp.themingTab.pages[0], title: "Enable Party Lights", storeAs: "partyLightsEnabled", tooltip: "🥳🥳 Let the party begin 🎉🎉", bindLocation: tp.themingTab.pages[1], });
  1282. initModule({ location: tp.themingTab.pages[0], title: "Party Lights Intensity", storeAs: "partyLightsIntensity", tooltip: "Intensity of the party 🥳", slider: { min: 0.01, max: 20, step: 0.01 }, defaultValue: 0.5, });
  1283. tp.themingTab.pages[0].addSeparator();
  1284. initModule({ location: tp.themingTab.pages[0], title: "World Flattening", storeAs: "worldFlattening", tooltip: "Make the world F-L-A-T", slider: { min: 0.05, max: 10, step: 0.05 }, defaultValue: 1, });
  1285. //ACCOUNT MODULES
  1286. initFolder({ location: tp.mainPanel, title: "Accounts", storeAs: "accountsFolder", });
  1287. initTabs({ location: tp.accountsFolder, storeAs: "accountsTab" }, [
  1288. {
  1289. title: "Basics", content:
  1290. `This is the accounts tab. Here you will find
  1291. options relating to managing your thousands of
  1292. shell accounts and options that will enable you
  1293. to alt like a pro.
  1294. NOTE: ShellPrint is currently unsupported on
  1295. this version of StateFarm Client.`},
  1296. {
  1297. title: "Login DB", content:
  1298. `The Login DB allows you to alt with ease. Put
  1299. simply, it is just a list of EmailPass combos.
  1300. It is simpler than AccountRecords, but one does
  1301. not replace the other. Login DB is stored
  1302. universally across all Shell proxies, and
  1303. has a queue system. Each time an account
  1304. from this list is logged into, it moves it
  1305. to the back of the list, allowing you to
  1306. have a steady stream of fresh accounts.
  1307. PRIVACY NOTE: This database will contain some
  1308. important information. All data is stored locally
  1309. and will never be requested by the StateFarm
  1310. development team, but can theoretically be stolen
  1311. via the use of other userscripts not authorised
  1312. by the StateFarm developers. This DB is not
  1313. exposed to the Shell Shockers game (unless you
  1314. have enabled debug mode).`},
  1315. {
  1316. title: "AccRecord", content:
  1317. `The AccountRecords database is similar, but
  1318. different to the Login DB. Whilst the Login DB
  1319. serves to allow you to quickly switch to a new
  1320. account, AccountRecords saves information
  1321. related to accounts you've logged into. It saves
  1322. info such as your egg count, items in your
  1323. inventory and the value of your inventory.
  1324. This feature is even more advanced than the
  1325. Login DB, and is only recommended for use by
  1326. people who really know what they're doing. If
  1327. you just like aimbotting, you really don't need
  1328. to worry about this.
  1329. FYI: This will attempt to save info about any
  1330. account, but will only perform best when you
  1331. are using an account that you logged into using
  1332. StateFarm's login or account creation modules.
  1333. Other accounts will have limited info, such as
  1334. masked emails and no EmailPass combos.
  1335. PRIVACY NOTE: This database will contain some
  1336. important information. You can disable the
  1337. logging of this info in the settings. All data
  1338. is stored locally and will never be requested
  1339. by the StateFarm development team, but can
  1340. theoretically be stolen via the use of other
  1341. userscripts not authorised by the StateFarm
  1342. developers. This DB is not exposed to the
  1343. Shell Shockers game (unless you have enabled
  1344. debug mode).`},
  1345. ]);
  1346. initFolder({ location: tp.accountsTab.pages[0], title: "Account Login (Basic)", storeAs: "loginFolder", });
  1347. initModule({ location: tp.loginFolder, title: 'Email:Pass', storeAs: 'loginEmailPass', tooltip: "Field for loginLogin", defaultValue: "ex@gmail.com:passwd" });
  1348. initModule({ location: tp.loginFolder, title: 'Login Account', storeAs: 'loginLogin', tooltip: "Log into an account using email:pass without using shell's UI", button: 'LOGIN', bindLocation: tp.accountsTab.pages[1], clickFunction: function () {
  1349. let emailPass = extract("loginEmailPass");
  1350. if (emailPass.includes(":")) {
  1351. loginOrCreateWithEmailPass(emailPass);
  1352. } else {
  1353. emailPass = prompt('Your email:pass isn\'t valid. Enter your combo below or input the correct one in the box.', '');
  1354. if (emailPass.includes(":")) {
  1355. loginOrCreateWithEmailPass(emailPass);
  1356. }; //else fuck you. im not doing anything with that.
  1357. };
  1358. } });
  1359. tp.accountsTab.pages[0].addSeparator();
  1360. initFolder({ location: tp.accountsTab.pages[0], title: "Account Login (Login Database)", storeAs: "loginDatabaseFolder", });
  1361. initModule({ location: tp.loginDatabaseFolder, title: 'Login Next Account', storeAs: 'loginDatabaseLogin', button: 'LOGIN', tooltip: "Tools for managing accounts in a Database", bindLocation: tp.accountsTab.pages[1], clickFunction: function () {
  1362. let loginDB = GM_getValue("StateFarm_LoginDB") || []; //why declare this so many times? the DBs need to be constantly rechecked, as other clients may have modified. we wouldnt want to be overwriting each other. (yes this needed to be said again)
  1363. let loginDBlength = loginDB.length;
  1364. if (loginDBlength > 0) {
  1365. let index = extract("loginDatabaseSelection") == "inorder" ? 0 : Math.ceil((Math.random()*0.75)*(loginDBlength-1));
  1366. log(`selecting index ${index}, this is out of ${loginDBlength} entries.`);
  1367. let [emailPass] = loginDB.splice(index, 1); //delete and retrieve
  1368. loginDB.push(emailPass);
  1369. log(`deleted and reinserted ${emailPass} at the end.`);
  1370. loginOrCreateWithEmailPass(emailPass);
  1371. GM_setValue("StateFarm_LoginDB", loginDB);
  1372. createPopup(`Logging in from index ${index}...`);
  1373. } else {
  1374. createPopup("LoginDB is empty!", "error");
  1375. };
  1376. } });
  1377. initModule({ location: tp.loginDatabaseFolder, title: "Selection Type", storeAs: "loginDatabaseSelection", tooltip: "Tools for managing accounts in a Database", bindLocation: tp.accountsTab.pages[1], dropdown: [{ text: "In Order", value: "inorder" }, { text: "Random", value: "random" }], defaultValue: "inorder" });
  1378. initModule({ location: tp.loginDatabaseFolder, title: "Auto Login", storeAs: "autoLogin", tooltip: "Tools for managing accounts in a Database", bindLocation: tp.accountsTab.pages[1], dropdown: [{ text: "Disabled", value: "disabled" }, { text: "When No Account", value: "noaccount" }, { text: "Always", value: "always" }], defaultValue: "disabled" });
  1379. tp.loginDatabaseFolder.addSeparator();
  1380. initModule({ location: tp.loginDatabaseFolder, title: 'Export DB(JSON)', storeAs: 'loginDatabaseExport', tooltip: "Tools for managing accounts in a Database", button: 'EXPORT (COPY)', bindLocation: tp.accountsTab.pages[1], clickFunction: function () {
  1381. GM_setClipboard(JSON.stringify(GM_getValue("StateFarm_LoginDB") || []), "text", () => log("Clipboard set!"));
  1382. createPopup("Login DB copied to clipboard...");
  1383. } });
  1384. initModule({ location: tp.loginDatabaseFolder, title: 'Import Into LoginDB', storeAs: 'loginDatabaseExport', tooltip: "Tools for managing accounts in a Database", button: 'APPEND (PASTE)', bindLocation: tp.accountsTab.pages[1], clickFunction: function () {
  1385. let userInput = prompt(`Input data you would like to add to your LoginDB. This will NOT replace your current data. All data added here will be put at the end of the queue. Also make sure that this data goes here and not into the AccountRecords DB.`, 'Reminder: JSON format!');
  1386. try {
  1387. let loginDB = GM_getValue("StateFarm_LoginDB") || []; //why declare this so many times? the DBs need to be constantly rechecked, as other clients may have modified. we wouldnt want to be overwriting each other. (yes this needed to be said again)
  1388. let appendedData = JSON.parse(userInput);
  1389. appendedData.forEach(data => {
  1390. if (data && !loginDB.includes(data)) loginDB.push(data);
  1391. });
  1392. GM_setValue("StateFarm_LoginDB", loginDB);
  1393. createPopup("Success! Data appended to LoginDB.", "success");
  1394. } catch {
  1395. createPopup("Failed! Check the formatting.", "error");
  1396. };
  1397. } });
  1398. initModule({ location: tp.loginDatabaseFolder, title: 'ImportFromRecords', storeAs: 'loginDatabaseImportRecords', tooltip: "Tools for managing accounts in a Database", button: 'APPEND', bindLocation: tp.accountsTab.pages[1], clickFunction: function () {
  1399. if (prompt("This action will import any Email:Pass combos you have in AccountRecords. Make sure you want to do this, as this will potentially add a lot of new records. Type 'ok' to proceed. This cannot be reversed, export first to be safe. Note: all the new records are added to the end of the queue.") === 'ok') {
  1400. let accountRecords = GM_getValue("StateFarm_AccountRecords") || {}; //why declare this so many times? the DBs need to be constantly rechecked, as other clients may have modified. we wouldnt want to be overwriting each other.
  1401. let loginDB = GM_getValue("StateFarm_LoginDB") || []; //why declare this so many times? the DBs need to be constantly rechecked, as other clients may have modified. we wouldnt want to be overwriting each other. (yes this needed to be said again)
  1402. Object.entries(accountRecords).forEach(([key, account]) => {
  1403. let emailPass = account.emailPass;
  1404. if (emailPass && !loginDB.includes(emailPass)) {
  1405. loginDB.push(emailPass);
  1406. };
  1407. });
  1408. GM_setValue("StateFarm_LoginDB", loginDB);
  1409. createPopup("Appended from AccountDetails!", "success");
  1410. };
  1411. } });
  1412. initModule({ location: tp.loginDatabaseFolder, title: 'Delete LoginDB', storeAs: 'loginDatabaseDelete', tooltip: "Tools for managing accounts in a Database", button: 'DELETE!', bindLocation: tp.accountsTab.pages[1], clickFunction: function () {
  1413. if (prompt("WARNING! This is a destructive action! Type 'ok' if you are really sure you want to delete your LoginDB! This cannot be reversed, export first to be safe.") === 'ok') {
  1414. GM_setValue("StateFarm_LoginDB", []); //o7 data
  1415. };
  1416. } });
  1417. initModule({ location: tp.loginDatabaseFolder, title: 'LoginDB Info', storeAs: 'loginDatabaseInfo', tooltip: "Tools for managing accounts in a Database", button: 'INFO', bindLocation: tp.accountsTab.pages[1], clickFunction: function () {
  1418. let loginDB = GM_getValue("StateFarm_LoginDB") || []; //why declare this so many times? the DBs need to be constantly rechecked, as other clients may have modified. we wouldnt want to be overwriting each other. (yes this needed to be said again)
  1419. alert(`You currently have ${loginDB.length} accounts in LoginDB. For info on what this is, check the guide tab.`);
  1420. } });
  1421. tp.accountsTab.pages[0].addSeparator();
  1422. initFolder({ location: tp.accountsTab.pages[0], title: "Account Generator (Basic)", storeAs: "generatorFolder", });
  1423. initModule({ location: tp.generatorFolder, title: 'Gmail (before @)', storeAs: 'accountGmail', tooltip: "The gmail prefix", defaultValue: "example (NO @gmail.com)" });
  1424. initModule({ location: tp.generatorFolder, title: 'Password to use', storeAs: 'accountPass', tooltip: "The account's password", defaultValue: "password69" });
  1425. initModule({ location: tp.generatorFolder, title: 'Create (Basic)', storeAs: 'accountCreate', tooltip: "Basic Gmail account creation", button: 'CREATE', bindLocation: tp.accountsTab.pages[1], clickFunction: function () {
  1426. loginOrCreateWithEmailPass(extract("accountGmail")+"+"+getScrambled()+"@gmail.com:"+extract("accountPass"));
  1427. } });
  1428. tp.accountsTab.pages[0].addSeparator();
  1429. initFolder({ location: tp.accountsTab.pages[0], title: "Account Records Database", storeAs: "accountRecordsFolder", });
  1430. initModule({ location: tp.accountRecordsFolder, title: "Disable Logging", storeAs: "accountRecordsLogging", tooltip: "Account Records Database options. Only needed when dealing with a lot of accounts", bindLocation: tp.accountsTab.pages[1], });
  1431. initModule({ location: tp.accountRecordsFolder, title: 'Export DB (JSON)', storeAs: 'accountRecordsExport', tooltip: "Account Records Database options. Only needed when dealing with a lot of accounts", button: 'EXPORT (COPY)', bindLocation: tp.accountsTab.pages[1], clickFunction: function () {
  1432. GM_setClipboard(JSON.stringify(GM_getValue("StateFarm_AccountRecords") || {}), "text", () => log("Clipboard set!"));
  1433. createPopup("AccountRecords DB copied to clipboard...");
  1434. } });
  1435. initModule({ location: tp.accountRecordsFolder, title: 'Import Into DB', storeAs: 'accountRecordsImport', tooltip: "Account Records Database options. Only needed when dealing with a lot of accounts", button: 'APPEND (PASTE)', bindLocation: tp.accountsTab.pages[1], clickFunction: function () {
  1436. let userInput = prompt(`Input data you would like to add to your AccountRecords DB. This will NOT replace your current data. All data added here either be added or replace existing records. Also make sure that this data goes here and not into the LoginDB.`, 'Reminder: JSON format!');
  1437. try {
  1438. let accountRecords = GM_getValue("StateFarm_AccountRecords") || {}; //why declare this so many times? the DBs need to be constantly rechecked, as other clients may have modified. we wouldnt want to be overwriting each other.
  1439. let appendedData = JSON.parse(userInput);
  1440. Object.entries(appendedData).forEach(([key, account]) => {
  1441. if (account) accountRecords[key] = account;
  1442. });
  1443. GM_setValue("StateFarm_AccountRecords", accountRecords);
  1444. createPopup("Success! Data appended to AccountRecords.", "success");
  1445. } catch {
  1446. createPopup("Failed! Check the formatting.", "error");
  1447. };
  1448. } });
  1449. initModule({ location: tp.accountRecordsFolder, title: 'Delete DB', storeAs: 'accountRecordsDelete', tooltip: "Account Records Database options. Only needed when dealing with a lot of accounts", button: 'DELETE!', bindLocation: tp.accountsTab.pages[1], clickFunction: function () {
  1450. if (prompt("WARNING! This is a destructive action! Type 'ok' if you are really sure you want to delete your AccountRecords DB! This cannot be reversed, export first to be safe.") === 'ok') {
  1451. GM_setValue("StateFarm_AccountRecords", {}); //o7 data
  1452. };
  1453. } });
  1454. initModule({ location: tp.accountRecordsFolder, title: 'View Info', storeAs: 'accountRecordsInfo', tooltip: "Account Records Database options. Only needed when dealing with a lot of accounts", button: 'INFO', bindLocation: tp.accountsTab.pages[1], clickFunction: function () {
  1455. let userInput = prompt(`This will output some information relating to what information you have in your AccountRecords DB.\nParameters: Enter 1 to only print Email:Pass list of those with items, enter 2 for those with no items.`, '');
  1456. let accountRecords = GM_getValue("StateFarm_AccountRecords") || {}; //why declare this so many times? the DBs need to be constantly rechecked, as other clients may have modified. we wouldnt want to be overwriting each other.
  1457. let tierCache = GM_getValue("StateFarm_TierCache") || {};
  1458. const itemCounts = {};
  1459. const tierCounts = {};
  1460. let emailPassList = [];
  1461. let accountCount = 0;
  1462. let accountWithItemsCount = 0;
  1463. let itemCountTotal = 0;
  1464. Object.entries(accountRecords).forEach(([key, account]) => {
  1465. if (account) {
  1466. let countedAccount = false; accountCount++;
  1467. let inventoryList=[];
  1468. account.inventory.forEach(item=>{inventoryList.push(item.name)});
  1469. if (inventoryList) {
  1470. for (let item of inventoryList) {
  1471. if (!countedAccount) {countedAccount = true; accountWithItemsCount++};
  1472. if (tierCache[item]) {
  1473. item = `${item} [T${tierCache[item]}]`;
  1474. };
  1475. let tier = item.match(/\[T([0-9])\]/);
  1476. if (tier && tier[1]) {
  1477. if (tierCounts.hasOwnProperty(tier[1])) {
  1478. tierCounts[tier[1]]++;
  1479. } else {
  1480. tierCounts[tier[1]] = 1;
  1481. };
  1482. };
  1483. itemCountTotal++;
  1484. if (itemCounts.hasOwnProperty(item)) {
  1485. itemCounts[item]++;
  1486. } else {
  1487. itemCounts[item] = 1;
  1488. };
  1489. };
  1490. if (account.emailPass && !emailPassList.includes(account.emailPass)) {
  1491. if ((userInput == "1" && inventoryList.length > 0) || // with items
  1492. (userInput == "2" && inventoryList.length < 1) || // no items
  1493. (userInput !== "1" && userInput !== "2")) { // do them all
  1494. emailPassList.push(account.emailPass);
  1495. };
  1496. };
  1497. };
  1498. };
  1499. });
  1500. log('%c' + ' '.repeat(500), 'background: white; color: white; font-size: 50px;');
  1501. log('%cAccountRecords Info', 'color: red; font-size: 30px;');
  1502. log("Full AccountRecords:");
  1503. log(accountRecords);
  1504. log(`itemCounts (Total items: ${itemCountTotal}):`);
  1505. log(itemCounts);
  1506. log(`tierCounts:`);
  1507. log(tierCounts);
  1508. log(`tierCache:`);
  1509. log(tierCache);
  1510. log(`emailPassList (Count: ${emailPassList.length}):`);
  1511. log(JSON.stringify(emailPassList));
  1512. log('%c' + ' '.repeat(500), 'background: white; color: white; font-size: 50px;');
  1513. alert(`Results:\nAccounts Total: ${accountCount}; With Items: ${accountWithItemsCount}\nItem Count: ${itemCountTotal}\nOther info has been pasted into console.`);
  1514. } });
  1515. tp.accountsTab.pages[0].addSeparator();
  1516. initFolder({ location: tp.accountsTab.pages[0], title: "Account Generator (ShellPrint)", storeAs: "shellPrintFolder", });
  1517. initModule({ location: tp.shellPrintFolder, title: 'ShellPrint Key', storeAs: 'shellPrintKey', tooltip: "ShellPrint token. NOTE: ShellPrint is currently unsupported on this version of StateFarm Client", defaultValue: "" });
  1518. initModule({ location: tp.shellPrintFolder, title: ' ', storeAs: 'getSPKey', tooltip: "ShellPrint help. NOTE: ShellPrint is currently unsupported on this version of StateFarm Client", button: 'Get a Key', clickFunction: () => GM_openInTab(discordURL, { active: true }) });
  1519. initModule({ location: tp.shellPrintFolder, title: 'Create (ShellPrint)', storeAs: 'shellprintGen', tooltip: "Account creation using ShellPrint™ technology. NOTE: ShellPrint is currently unsupported on this version of StateFarm Client", button: 'Generate!', clickFunction: () => F.register(), bindLocation: tp.accountsTab.pages[1] });
  1520. tp.accountsTab.pages[0].addSeparator();
  1521. //MISC MODULES
  1522. initFolder({ location: tp.mainPanel, title: "Misc", storeAs: "miscFolder", });
  1523. initTabs({ location: tp.miscFolder, storeAs: "miscTab" }, [
  1524. {
  1525. title: "WIP", content:
  1526. `Sorry! No guide yet!`},
  1527. ]);
  1528. //move this stuff to top bc its more important
  1529. initFolder({ location: tp.miscTab.pages[0], title: "Ban Evasion Options", storeAs: "banFolder", });
  1530. initModule({ location: tp.banFolder, title: "Unban", storeAs: "unban", tooltip: "Unbans you by signing out. You will lose skins if you're not signed in.", bindLocation: tp.miscTab.pages[1], button: "UNBAN NOW", clickFunction: function(){
  1531. if (GM_getValue('StateFarm_Unbanned')) unban();
  1532. else if (prompt("By proceeding, you will be signed out. If you don't have an account, your stats will be lost.\nEnter 'ok' to confirm this.\nThis popup will not be shown again for future unbans.") === 'ok') {
  1533. GM_setValue('StateFarm_Unbanned', 'true');
  1534. unban();
  1535. } else {
  1536. alert('You did not entire "ok", so the unban was cancelled.');
  1537. };
  1538. },});
  1539. initModule({ location: tp.banFolder, title: "Auto Unban", storeAs: "autoUnban", tooltip: "Automatically detects bans & unbans in above fashion", bindLocation: tp.miscTab.pages[1],});
  1540. initModule({ location: tp.banFolder, title: "New Proxy", storeAs: "newProxy", tooltip: "Switches to a new shell shockers link. SF config won't be transferred", bindLocation: tp.miscTab.pages[1], button: "NEW PROXY", clickFunction: function(){
  1541. const userConfirmed=confirm("Switching to a proxy URL. By proceeding, you will enter another URL for Shell Shockers but your data doesn't get transferred.");
  1542. if (userConfirmed) {
  1543. newProxy();
  1544. };
  1545. },});
  1546. initModule({ location: tp.banFolder, title: "Reload Page", storeAs: "reload", tooltip: "Reloads the page", bindLocation: tp.miscTab.pages[1], button: "RELOAD NOW", clickFunction: function(){
  1547. reloadPage();
  1548. },});
  1549. tp.miscTab.pages[0].addSeparator();
  1550. initFolder({ location: tp.miscTab.pages[0], title: "Ad & Privacy Options", storeAs: "adFolder", });
  1551. initModule({ location: tp.adFolder, title: "Ad Block", storeAs: "adBlock", tooltip: "Prevents the anti-adblocker code. NOTE: this will always display the VIP badge as a side effect", bindLocation: tp.miscTab.pages[1], });
  1552. initModule({ location: tp.adFolder, title: "VIP Spoof", storeAs: "spoofVIP", tooltip: "Makes the VIP badge visible locally (other players won't see)", bindLocation: tp.miscTab.pages[1], });
  1553. initModule({ location: tp.adFolder, title: "NoAnnoyances", storeAs: "noAnnoyances", tooltip: "Removes ads", bindLocation: tp.miscTab.pages[1], });
  1554. initModule({ location: tp.adFolder, title: "NoTrack", storeAs: "noTrack", tooltip: "Removes some user data tracking code", bindLocation: tp.miscTab.pages[1], });
  1555. tp.miscTab.pages[0].addSeparator();
  1556. initModule({ location: tp.miscTab.pages[0], title: "AntiAFK", storeAs: "antiAFK", tooltip: "Bypasses AFK kicks", bindLocation: tp.miscTab.pages[1], });
  1557. initModule({ location: tp.miscTab.pages[0], title: "Quick Respawn", storeAs: "quickRespawn", tooltip: "Respawns quicker than usual", bindLocation: tp.miscTab.pages[1], });
  1558. initModule({ location: tp.miscTab.pages[0], title: "Sneaky Despawn", storeAs: "sneakyDespawn", tooltip: "Despawns, similar to the Esc key, but you can move while despawning, not that you cannot deal damage while sneaky despawning", bindLocation: tp.miscTab.pages[1], button: "Despawn... soon!", defaultBind: "Backquote", clickFunction: function(){
  1559. if (!(unsafeWindow.extern.gamePaused || sneakyDespawning)) {
  1560. sneakyDespawning = true;
  1561. ss.PAUSE(); createPopup("SneakyDespawn: 3 seconds.");
  1562. setTimeout(() => { createPopup("SneakyDespawn: 2 seconds.");
  1563. }, 1e3);
  1564. setTimeout(() => { createPopup("SneakyDespawn: 1 second.");
  1565. }, 2e3);
  1566. setTimeout(() => { createPopup("SneakyDespawn: Now despawning!");
  1567. document.exitPointerLock(); document.onpointerlockchange();
  1568. setTimeout(() => {
  1569. sneakyDespawning = false;
  1570. }, 200);
  1571. }, 3e3);
  1572. };
  1573. },});
  1574. initModule({ location: tp.miscTab.pages[0], title: "InstantSpectate", storeAs: "instantSpectate", tooltip: "Don't wait around for the spectate button to appear", bindLocation: tp.miscTab.pages[1], });
  1575. tp.miscTab.pages[0].addSeparator();
  1576. initFolder({ location: tp.miscTab.pages[0], title: "StateFarm UI Options", storeAs: "sfcUIFolder", });
  1577. initModule({ location: tp.sfcUIFolder, title: "StateFarm Updates", storeAs: "statefarmUpdates", tooltip: "Shows a element at the home screen about statefarm's update history, notifies you when update is available", bindLocation: tp.miscTab.pages[1], defaultValue: true, });
  1578. initModule({ location: tp.sfcUIFolder, title: "Replace Feeds", storeAs: "replaceFeeds", tooltip: "Replaces the game menu's news and videos feed with content by the StateFarm dev team", bindLocation: tp.miscTab.pages[1], defaultValue: true, });
  1579. initModule({ location: tp.sfcUIFolder, title: "Custom Badges", storeAs: "customBadges", tooltip: "Enables custom StateFarm badges", bindLocation: tp.miscTab.pages[1], defaultValue: true, });
  1580. tp.miscTab.pages[0].addSeparator();
  1581. initModule({ location: tp.miscTab.pages[0], title: "Unlock Skins (View Only)", storeAs: "unlockSkins", tooltip: "Unlocks all skins in locally (other players will not see these)", bindLocation: tp.miscTab.pages[1], });
  1582. initModule({ location: tp.miscTab.pages[0], title: "Unlock Bros Grenade", storeAs: "brosGrenade", tooltip: "Unlocks the real bros grenade skin to your account", bindLocation: tp.miscTab.pages[1], button: "Unlock, real.", clickFunction: function(){
  1583. extern.giveBasketBrosReward();
  1584. },});
  1585. initModule({ location: tp.miscTab.pages[0], title: "Admin Spoof", storeAs: "adminSpoof", tooltip: "Shows admin options such as BOOT and BAN in games. No ACTUAL functionality", bindLocation: tp.miscTab.pages[1], });
  1586. tp.miscTab.pages[0].addSeparator();
  1587. initModule({ location: tp.miscTab.pages[0], title: "Switch Focus", storeAs: "unfocus", tooltip: "Controls the focus of the game. Allows for tabbing out without despawning", bindLocation: tp.miscTab.pages[1], button: "FOCUS/UNFOCUS", defaultBind: "P", clickFunction: function(){
  1588. if (document.pointerLockElement !== null) { //currently locked
  1589. noPointerPause=true; unsafeWindow.document.exitPointerLock();
  1590. } else if (noPointerPause) { //already unlocked?
  1591. noPointerPause=false;
  1592. unsafeWindow.canvas.requestPointerLock();
  1593. };
  1594. },});
  1595. tp.miscTab.pages[0].addSeparator();
  1596. initFolder({ location: tp.miscTab.pages[0], title: "Chicken Winner Options", storeAs: "chwFolder", });
  1597. initModule({ location: tp.chwFolder, title: "FastChickenWinner", storeAs: "chickenWinner", tooltip: "Instantly plays the chick'n winner minigame", bindLocation: tp.miscTab.pages[1], button: "Force Play", clickFunction: function(){
  1598. unsafeWindow.extern.chwTryPlay();
  1599. const eggElement = document.getElementById("eggOne");
  1600. eggElement.click();eggElement.click();eggElement.click();eggElement.click();eggElement.click();eggElement.click();eggElement.click();eggElement.click();eggElement.click();
  1601. let chicknWinnerElementLoaded = false;
  1602. const checkInterval = setInterval(() => {
  1603. const chicknWinnerElement = document.getElementById('chicknWinner');
  1604. chicknWinnerElementLoaded = (chicknWinnerElement?.style?.display == ''); //idk, this is kind of shit? but who actually cares that much...
  1605. if (chicknWinnerElementLoaded) {
  1606. const gotWinnerOkElement = document.getElementById('gotWinnerOk');
  1607. if (gotWinnerOkElement) {
  1608. gotWinnerOkElement.click();
  1609. };
  1610. if (chicknWinnerElement.style.display == 'none') {
  1611. log("ermm, found");
  1612. clearInterval(checkInterval);
  1613. updateAccountRecords();
  1614. accountStatus = "chwDone";
  1615. };
  1616. };
  1617. }, 100);
  1618. },});
  1619. initModule({ location: tp.chwFolder, title: "AutoChickenWinner", storeAs: "autoChickenWinner", tooltip: "Automatically plays the chick'n winner minigame when cooldowns are over", bindLocation: tp.miscTab.pages[1],});
  1620. initModule({ location: tp.chwFolder, title: "Chw Info Notifications", storeAs: "chickenWinnerNotifs", tooltip: "Alerts you of the tier of what you just earned and other infos.", bindLocation: tp.miscTab.pages[1],});
  1621. tp.miscTab.pages[0].addSeparator();
  1622. initModule({ location: tp.miscTab.pages[0], title: "Get Game History", storeAs: "getGameHistory", tooltip: "Displays a list of the last few lobbies you were in", bindLocation: tp.miscTab.pages[1], button: "get", clickFunction: function(){
  1623. let games = GM_getValue("StateFarm_GameHistory");
  1624. //alert(GM_getValue("StateFarm_GameHistory"));
  1625. if(!games) {
  1626. alert("no history!");
  1627. return;
  1628. }
  1629. games = JSON.parse(games);
  1630. let gString = "";
  1631. games.forEach(g => {
  1632. gString+= g.code;
  1633. if(g.amount>1) gString += ` (${g.amount})`;
  1634. gString+= ": ";
  1635. gString+= g.string; //omggggg
  1636. gString+= ` (left at ${new Date(g.time).toLocaleString()} via ${g.closeCode} ${g.message})`
  1637. gString += "\n";
  1638. });
  1639. console.log(gString); //debated using log(), but this is a direct user input so yhhhhhhhh
  1640. gString+="\na copy of this list has been dumped into the console, if you wish to copy a code.";
  1641. alert(gString);
  1642. },});
  1643. initModule({ location: tp.miscTab.pages[0], title: "Clear Game History", storeAs: "clearGameHistory", tooltip: "Clear your stored game history", bindLocation: tp.miscTab.pages[1], button: "clear", clickFunction: function(){
  1644. if(!GM_getValue("StateFarm_GameHistory")) return;
  1645. log("deleting game history: " + GM_getValue("StateFarm_GameHistory"));
  1646. GM_deleteValue("StateFarm_GameHistory");
  1647. createPopup("game history deleted!");
  1648. },});
  1649. initModule({ location: tp.miscTab.pages[0], title: "Custom Macro", storeAs: "customMacro", tooltip: "The JavaScript macro executed via executeMacro", defaultValue: "log('cool');" });
  1650. initModule({ location: tp.miscTab.pages[0], title: "Execute Macro", storeAs: "executeMacro", tooltip: "Allows for JS code to be executed from the client itself. Runs in userscript environment, so use unsafeWindow etc.", bindLocation: tp.miscTab.pages[1], button: "EXECUTE", clickFunction: function(){
  1651. //use at your own risk, i guess. but is this really any more dangerous than pasting something into console? not really.
  1652. (async () => {
  1653. try {
  1654. log(extract("customMacro"));
  1655. // stay safe out there. this runs in the **userscript** environment. make sure to use unsafeWindow for whatever reason you may need the window object.
  1656. await eval(extract("customMacro")); // eslint-disable-line
  1657. } catch (error) {
  1658. console.error("Error executing code:", error);
  1659. }
  1660. })();
  1661. },}); //but yes, as you can see "macros" are just scripts you can execute for whatever purposes you need. reminds me of userscripts...
  1662. initModule({ location: tp.miscTab.pages[0], title: "Do At Startup", storeAs: "autoMacro", tooltip: "Executes the entered macro at client startup", bindLocation: tp.miscTab.pages[1],});
  1663. tp.miscTab.pages[0].addSeparator();
  1664. initModule({ location: tp.miscTab.pages[0], title: "[WIP]RandomPath", storeAs: "randomPath", tooltip: "Forces a new random path (pathfinding currently disabled)", bindLocation: tp.miscTab.pages[1], button: "Random Path", clickFunction: function(){
  1665. findNewPath = true;
  1666. },});
  1667. findNewPath = false;
  1668. tp.miscTab.pages[0].addSeparator();
  1669. initModule({ location: tp.miscTab.pages[0], title: "SilentRoll", storeAs: "silentRoll", tooltip: "Rolls around without showing it client sided", bindLocation: tp.miscTab.pages[1], });
  1670. initFolder({ location: tp.miscTab.pages[0], title: "Seizure Options", storeAs: "seizureFolder", });
  1671. initModule({ location: tp.seizureFolder, title: "SeizureX", storeAs: "enableSeizureX", tooltip: "Rotates the player by the specified amount around the y-axis (yaw)", bindLocation: tp.miscTab.pages[1], });
  1672. initModule({ location: tp.seizureFolder, title: "X Amount", storeAs: "amountSeizureX", tooltip: "Amount to roll", slider: { min: -6.283185307179586, max: 6.283185307179586, step: Math.PI / 280 }, defaultValue: 2, });
  1673. initModule({ location: tp.seizureFolder, title: "SeizureY", storeAs: "enableSeizureY", tooltip: "Rotates the player by the specified amount around the x-axis (pitch)", bindLocation: tp.miscTab.pages[1], });
  1674. initModule({ location: tp.seizureFolder, title: "Y Amount", storeAs: "amountSeizureY", tooltip: "Amount to roll", slider: { min: -6.283185307179586, max: 6.283185307179586, step: Math.PI / 280 }, defaultValue: 2, });
  1675. //CLIENT MODULES
  1676. initFolder({ location: tp.mainPanel, title: "Client & About", storeAs: "clientFolder", });
  1677. initTabs({ location: tp.clientFolder, storeAs: "clientTab" }, [
  1678. {
  1679. title: "WIP", content:
  1680. `Sorry! No guide yet!`},
  1681. ]);
  1682. initModule({ location: tp.clientTab.pages[0], title: "VarData Fallback", storeAs: "vardataFallback", tooltip: "What to try if varData loading fails", bindLocation: tp.clientTab.pages[1], dropdown: [{ text: "None", value: "none" }, { text: "Load Latest (online)", value: "loadLatest" }, { text: "Load Cached (current hash)", value: "loadCached" }, { text: "Load Cached (latest cache)", value: "loadRecent" }, { text: "Custom String", value: "loadCustom" }], defaultValue: "none", });
  1683. initModule({ location: tp.clientTab.pages[0], title: "Fallback Behavior", storeAs: "vardataType", tooltip: "When to use fallback", bindLocation: tp.clientTab.pages[1], dropdown: [{ text: "Never", value: "never" }, { text: "Just This Once", value: "justOnce" }, { text: "Until Next Hash", value: "nextHash" }, { text: "Always", value: "always" }], defaultValue: "never", });
  1684. initModule({ location: tp.clientTab.pages[0], title: "Custom VarData", storeAs: "vardataCustom", tooltip: "Uses the entered varData", defaultValue: "{}", enableConditions: [["vardataFallback", "loadCustom"]] });
  1685. tp.clientTab.pages[0].addSeparator();
  1686. initModule({ location: tp.clientTab.pages[0], title: "Hide GUI", storeAs: "hide", tooltip: "Hides the big StateFarm menu. default key to do this is H", bindLocation: tp.clientTab.pages[1], button: "Hide!", clickFunction: function () { tp.mainPanel.hidden = !tp.mainPanel.hidden }, defaultBind: "H", });
  1687. initModule({ location: tp.clientTab.pages[0], title: "Hide at Startup", storeAs: "hideAtStartup", tooltip: "Hides the StateFarm menu by default", bindLocation: tp.clientTab.pages[1], defaultValue: false,});
  1688. initModule({ location: tp.clientTab.pages[0], title: "No Console Logs", storeAs: "consoleLogs", tooltip: "Blocks the client frome sending messages to the browser console", bindLocation: tp.clientTab.pages[1], defaultValue: false,});
  1689. initModule({ location: tp.clientTab.pages[0], title: "Pop-ups", storeAs: "popups", tooltip: "Disables/enables bottom-left corner popups of configs changed & notifications", bindLocation: tp.clientTab.pages[1], defaultValue: true, });
  1690. initModule({ location: tp.clientTab.pages[0], title: "Tooltips", storeAs: "tooltips", tooltip: "Controls whether you want to see tooltips (the box displaying this very message!) (I'm just an innocent tooltip! I did nothing! Let me live! Don't disable me :( )", bindLocation: tp.clientTab.pages[1], defaultValue: true, });
  1691. tp.clientTab.pages[0].addSeparator();
  1692. initModule({ location: tp.clientTab.pages[0], title: "Panic", storeAs: "panic", tooltip: "Allows you to quickly exit to a set URL. great for hacking in class", bindLocation: tp.clientTab.pages[1], button: "EXIT!", clickFunction: function () { if (extract("enablePanic")) { unsafeWindow.location.replace(extract("panicURL")) } }, defaultBind: "X", enableConditions: [["enablePanic", true]], });
  1693. initFolder({ location: tp.clientTab.pages[0], title: "Panic Options", storeAs: "panicFolder", });
  1694. initModule({ location: tp.panicFolder, title: "Enable", storeAs: "enablePanic", tooltip: "Enable evacuation", bindLocation: tp.clientTab.pages[1], defaultValue: false, });
  1695. initModule({ location: tp.panicFolder, title: "Set URL", storeAs: "panicURL", tooltip: "What url to evacuate to", defaultValue: "https://classroom.google.com/", enableConditions: [["enablePanic", true]], });
  1696. tp.clientTab.pages[0].addSeparator();
  1697. let presetList = [];
  1698. Object.entries(inbuiltPresets).forEach(([key, value]) => {//Get all presets from inbuilt presets var
  1699. let options = {};
  1700. options.text = key;//not the best way to add things to a dictionary, but the only way i could get to work
  1701. options.value = key; // idiot could've not violated eslint smfh
  1702. presetList.push(options);
  1703. });
  1704. //PRESETS: OakSwingZZZ 😎
  1705. initFolder({ location: tp.clientTab.pages[0], title: "Presets", storeAs: "presetFolder",});
  1706. initModule({ location: tp.presetFolder, title: "Preset List", storeAs: "selectedPreset", tooltip: "A set of predefined configs made by the StateFarm developers", defaultValue: "onlypuppy7's Config", bindLocation: tp.clientTab.pages[1], dropdown: presetList, });
  1707. initModule({ location: tp.presetFolder, title: "Apply", storeAs: "applyPreset", tooltip: "Apply the preset selected in the comboBox above", button: "Apply Preset", clickFunction: function () {
  1708. const userConfirmed = confirm( "Are you sure you want to continue? This will replace most of your current config." );
  1709. if (userConfirmed) { applySettings(inbuiltPresets[extract("selectedPreset")], true); };
  1710. },
  1711. });
  1712. tp.presetFolder.addSeparator();
  1713. initModule({ location: tp.presetFolder, title: "Save", storeAs: "savePreset", tooltip: "Saves your current settings as a preset", button: "Save As Preset", clickFunction: function () {
  1714. // log("Config Main: ", configMain);
  1715. let saveString = '';
  1716. const addParam = function(module,setTo) {saveString=saveString+module+">"+JSON.stringify(setTo)+"<"};
  1717. Object.entries(configMain).forEach(([key, value]) => {
  1718. log(key, value);
  1719. if (typeof(value) == 'string') {
  1720. try {
  1721. let dropdown = extractAsDropdownInt(key)
  1722. value = dropdown;
  1723. } catch (error) {
  1724. //dont care lmaoooo
  1725. };
  1726. };
  1727. if (!presetIgnore.includes(key)){
  1728. addParam(key, value);
  1729. }
  1730. });
  1731. saveString = saveString.substring(0, saveString.length - 1);
  1732. let presetName = prompt("Name of preset:"); // asks user for name of preset
  1733. if (presetName == "" || presetName == null) {
  1734. log("User cancelled save");
  1735. } else {
  1736. let result = saveUserPreset(presetName, saveString);//saves user preset
  1737. addUserPresets(loadUserPresets()); //updates inbuiltPresets to include
  1738. log("Saved Preset: ", saveString);
  1739. log("User Preset Result: ", result);
  1740. };
  1741. log("InbuiltPrests:");
  1742. log(inbuiltPresets);
  1743. initMenu(false); //Reloads menu to add to dropdown list
  1744. },});
  1745. initModule({ location: tp.presetFolder, title: "Delete", storeAs: "deletePreset", tooltip: "Deletes a preset", button: "Remove Preset", clickFunction: function () { // Function won't do anything if they select a preset that was loaded in the gamecode
  1746. let currUserPresets = loadUserPresets(); //gets current presets from storage
  1747. delete currUserPresets[extract("selectedPreset")];//deletes
  1748. delete inbuiltPresets[extract("selectedPreset")];//deletes
  1749. save(presetStorageLocation, currUserPresets); // saves cnages to file.
  1750. log("Current User Presets: ",currUserPresets);
  1751. initMenu(false); //reloads menu
  1752. },});
  1753. tp.presetFolder.addSeparator();
  1754. initModule({ location: tp.presetFolder, title: "Import", storeAs: "importPreset", tooltip: "Imports a custom preset", button: "Import Preset", clickFunction: function () {
  1755. let preset = prompt("Paste preset here:"); // asks user to paste preset
  1756. if (preset == "" || preset == null) {
  1757. log("User cancelled save");
  1758. } else {
  1759. const pattern = /([a-zA-Z]*>[^<]*<)+[a-zA-Z]*>[^<]*/;
  1760. if (pattern.test(preset)){
  1761. let presetName = prompt("Name of preset:"); // asks user for name of preset
  1762. if (presetName == "" || presetName == null) {
  1763. log("User cancelled save");
  1764. } else {
  1765. let result = saveUserPreset(presetName, preset);//saves user preset
  1766. addUserPresets(loadUserPresets()); //updates inbuiltPresets to include
  1767. log("Saved Preset: ", preset);
  1768. log("User Preset Result: ", result);
  1769. }
  1770. } else {
  1771. alert("Not A Valid Preset!");
  1772. log("Preset Not Valid");
  1773. };
  1774. initMenu(false);
  1775. };
  1776. },});
  1777. initModule({ location: tp.presetFolder, title: "Export", storeAs: "exportPreset", tooltip: "Copies your current preset to the clipboard", button: "Copy To Clipboard", clickFunction: function () {
  1778. let saveString = '';
  1779. const addParam = function(module,setTo) {saveString=saveString+module+">"+JSON.stringify(setTo)+"<"};
  1780. Object.entries(configMain).forEach(([key, value]) => {
  1781. log(key, value);
  1782. if (typeof(value) == 'string') {
  1783. try {
  1784. let dropdown = extractAsDropdownInt(key)
  1785. value = dropdown;
  1786. } catch (error) {
  1787. //dont care lmaoooo
  1788. };
  1789. };
  1790. if (!presetIgnore.includes(key)){
  1791. addParam(key, value);
  1792. }
  1793. });
  1794. saveString = saveString.substring(0, saveString.length - 1);
  1795. GM_setClipboard(saveString, "text", () => log("Clipboard set!"));
  1796. createPopup("Preset copied to clipboard...");
  1797. },});
  1798. tp.clientTab.pages[0].addSeparator();
  1799. initFolder({ location: tp.clientTab.pages[0], title: "Creator's Links", storeAs: "linksFolder",});
  1800. initModule({ location: tp.linksFolder, title: "Discord", storeAs: "discord", tooltip: "The official StateFarm Client Discord server", button: "Link", clickFunction: () => GM_openInTab(discordURL, { active: true }) });
  1801. initModule({ location: tp.linksFolder, title: "GitHub", storeAs: "github", tooltip: "The official StateFarm Client GitHub Repository! Check out the devs suffering here", button: "Link", clickFunction: () => GM_openInTab(githubURL, { active: true }) });
  1802. tp.clientTab.pages[0].addSeparator();
  1803. initModule({ location: tp.clientTab.pages[0], title: "Reset", storeAs: "clear", tooltip: "Powerwashes StateFarm completely", button: "DELETE", clickFunction: function(){
  1804. const userConfirmed=confirm("Are you sure you want to continue? This will clear all stored module states and keybinds.");
  1805. if (userConfirmed) {
  1806. initMenu(true);
  1807. alert("Reset to defaults.");
  1808. };
  1809. },});
  1810. tp.clientTab.pages[0].addSeparator();
  1811. initFolder({ location: tp.clientTab.pages[0], title: "Developer Options", storeAs: "devFolder",});
  1812. initModule({ location: tp.devFolder, title: "Debug", storeAs: "debug", tooltip: "Converts SFC into a development tool.\nExposes globalSS to the window (allowing you to manipulate many game variables directly) and also enables some extra logs.", bindLocation: tp.clientTab.pages[1], });
  1813. initModule({ location: tp.devFolder, title: "Force Import", storeAs: "forceImport", tooltip: "Forces importing of Babylon instead of making fake babylon. Use only for testing or if fake babylon doesn't work.", bindLocation: tp.clientTab.pages[1], });
  1814. tp.mainPanel.addSeparator();
  1815. initModule({ location: tp.mainPanel, title: "Update", storeAs: "update", tooltip: "Go to the client's update page", button: "Link", clickFunction: () => GM_openInTab(downloadURL, { active: true }) });
  1816. initModule({ location: tp.mainPanel, title: "Guide", storeAs: "documentation", tooltip: "A guide with more in-depth information on modules", button: "Link", clickFunction: () => GM_openInTab(featuresGuideURL, { active: true }) });
  1817. tp.botPanel = new Tweakpane.Pane(); // eslint-disable-line
  1818. tp.botPanel.title = "StateFarm Bot Control Panel";
  1819. tp.botPanel.containerElem_.style.left = "15%";
  1820. tp.botPanel.containerElem_.style.top = "25%";
  1821. tp.botPanel.hidden = true;
  1822. tp.botTabs = tp.botPanel.addTab({
  1823. pages: [
  1824. { title: 'Deploy' },
  1825. { title: 'Manage' },
  1826. { title: 'Params' },
  1827. { title: 'Info' },
  1828. ],
  1829. });
  1830. //DEPLOY STUFF
  1831. initModule({ location: tp.botTabs.pages[0], title: "Bots Amount", storeAs: "numberBots", tooltip: "The number of bots/windows opened", slider: { min: 1, max: 18, step: 1 }, defaultValue: 1, });
  1832. initModule({ location: tp.botTabs.pages[0], title: "Deploy", storeAs: "deployBots", tooltip: "Open the bot's windows. If only one opens, make sure you have popups allowed", button: "START BOTS!", bindLocation: tp.bottingTab.pages[1], clickFunction: function () { deployBots() }, });
  1833. initModule({ location: tp.botTabs.pages[0], title: "Restart Bots", storeAs: "restartBots", tooltip: "Completely closes and restarts all bot instances", button: "RESTART BOTS", bindLocation: tp.bottingTab.pages[1], clickFunction: function () { broadcastToBots("kill"); setTimeout(function(){deployBots()}, 1000) }, });
  1834. tp.botTabs.pages[0].addSeparator();
  1835. initModule({ location: tp.botTabs.pages[0], title: "Window Width", storeAs: "botWindowWidth", tooltip: "Horizontal size of the bot's windows", slider: { min: 0, max: 10000, step: 1 }, defaultValue: 450, botParam: true, });
  1836. initModule({ location: tp.botTabs.pages[0], title: "Window Height", storeAs: "botWindowHeight", tooltip: "Vertical size of the bot's windows", slider: { min: 0, max: 10000, step: 1 }, defaultValue: 300, botParam: true, });
  1837. tp.botTabs.pages[0].addSeparator();
  1838. initModule({ location: tp.botTabs.pages[0], title: "Use Names", storeAs: "useCustomNameBots", tooltip: "Use special customized names", defaultValue: true, botParam: true, });
  1839. initModule({ location: tp.botTabs.pages[0], title: "Bot Name", storeAs: "botUsername", tooltip: "The names used by the bots", defaultValue: "ЅtateFarmer", enableConditions: [["useCustomNameBots", true]], });
  1840. initModule({ location: tp.botTabs.pages[0], title: "AntiDupe", storeAs: "botAntiDupe", tooltip: "Prevents duplication of names with a random letter at the end", enableConditions: [["useCustomNameBots", true]], });
  1841. initModule({ location: tp.botTabs.pages[0], title: "CopyNames", storeAs: "botCopyName", tooltip: "Copies names from other players in the lobby", enableConditions: [["useCustomNameBots", true]], });
  1842. tp.botTabs.pages[0].addSeparator();
  1843. initModule({ location: tp.botTabs.pages[0], title: "Use Macro", storeAs: "useBotMacro", tooltip: "Execute a macro at bot startup", defaultValue: true, botParam: true, });
  1844. initModule({ location: tp.botTabs.pages[0], title: "Bot Macro", storeAs: "botMacro", tooltip: "The macro to be executed by the module above", defaultValue: "createPopup('success?');", botParam: true, });
  1845. tp.botTabs.pages[0].addSeparator();
  1846. initModule({ location: tp.botTabs.pages[0], title: "Proxy URL", storeAs: "proxyBots", tooltip: "Use random proxy urls for each bot instance", dropdown: [{ text: "Randomised", value: "randomised" }, { text: "Static", value: "static" },], defaultValue: "darkesteggshell", });
  1847. tp.botTabs.pages[0].addSeparator();
  1848. initModule({ location: tp.botTabs.pages[0], title: "Bot Color", storeAs: "eggColorBots", tooltip: "Sets the egg skin color of your bots", dropdown: [{ text: "Disabled", value: "disabled" }, { text: "White", value: "white" }, { text: "Light Blue", value: "lightblue" }, { text: "Light Eggshell", value: "lighteggshell" }, { text: "Eggshell", value: "eggshell" }, { text: "Dark Eggshell", value: "darkeggshell" }, { text: "Darker Eggshell", value: "darkereggshell" }, { text: "Darkest Eggshell", value: "darkesteggshell" }, { text: "Red (VIP)", value: "red" }, { text: "Purple (VIP)", value: "purple" }, { text: "Pink (VIP)", value: "pink" }, { text: "Yellow (VIP)", value: "yellow" }, { text: "Blue (VIP)", value: "blue" }, { text: "Green (VIP)", value: "green" }, { text: "Lime (VIP)", value: "lime" }, { text: "Randomised", value: "random" }], defaultValue: "darkesteggshell", });
  1849. initModule({ location: tp.botTabs.pages[0], title: "Bot Stamp", storeAs: "autoStampBots", tooltip: "Sets the stamp of your bots", dropdown: [{ text: "Disabled", value: "disabled" }, { text: "Target Stamp", value: "target" }, { text: "No Sign Stamp", value: "nosign" }, { text: "Question Mark Stamp?", value: "question" }, { text: "Peace Stamp", value: "peace" }, { text: "Thumbs Up Stamp", value: "thumbsup" }, { text: "Pablo Smile Stamp", value: "pablosmile" }, { text: "Randomised", value: "random" }], defaultValue: "pablosmile", });
  1850. initModule({ location: tp.botTabs.pages[0], title: "Bot Hat", storeAs: "autoHatBots", tooltip: "Sets the hat of your bots", dropdown: [{ text: "Disabled", value: "disabled" }, { text: "Ball Cap", value: "ballcap" }, { text: "Boat Fedora", value: "boatfedora" }, { text: "Top Hat", value: "tophat" }, { text: "Derby Hat", value: "derbyhat" }, { text: "Mountie Hat", value: "mountiehat" }, { text: "Pablo Hat", value: "pablohat" }, { text: "Randomised", value: "random" }], defaultValue: "pablohat", });
  1851. //MANAGE STUFF
  1852. initModule({ location: tp.botTabs.pages[1], title: "Close Bots", storeAs: "killBots", tooltip: "Closes all bot tabs & kills all bots", button: "CLOSE TABS", clickFunction: function () { broadcastToBots("kill") }, });
  1853. initModule({ location: tp.botTabs.pages[1], title: "Refresh Pages", storeAs: "refreshBots", tooltip: "Reloads all bot tabs", button: "REFRESH", clickFunction: function () { broadcastToBots("refresh") }, });
  1854. tp.botTabs.pages[1].addSeparator();
  1855. initModule({ location: tp.botTabs.pages[1], title: "New Proxies", storeAs: "newProxyBots", tooltip: "Moves bots to new proxies", button: "NEW PROXIES", clickFunction: function () { broadcastToBots("newproxy") }, });
  1856. initModule({ location: tp.botTabs.pages[1], title: "Unban All", storeAs: "unbanBots", tooltip: "Unbans all bots", button: "UNBAN BOTS", clickFunction: function () { broadcastToBots("unban") }, });
  1857. initModule({ location: tp.botTabs.pages[1], title: "AutoUnbanBot", storeAs: "botAutoUnban", tooltip: "Automatically unbans all bots when they're banned", botParam: true, });
  1858. initModule({ location: tp.botTabs.pages[1], title: "AutoLoginBot", storeAs: "botAutoLogin", tooltip: "Automatically logs bots into accounts", dropdown: [{ text: "Disabled", value: "disabled" }, { text: "When No Account", value: "noaccount" }, { text: "Always", value: "always" }], defaultValue: "disabled", botParam: true, });
  1859. tp.botTabs.pages[1].addSeparator();
  1860. initModule({ location: tp.botTabs.pages[1], title: "Don'tKillMe", storeAs: "botNoKillMe", tooltip: "Forces bots to ignore you", botParam: true, });
  1861. initModule({ location: tp.botTabs.pages[1], title: "Don'tKillBot", storeAs: "botNoKillBots", tooltip: "Forces bots to ignore other bots", botParam: true, });
  1862. initModule({ location: tp.botTabs.pages[1], title: "FollowMe", storeAs: "botFollowMe", tooltip: "semibroken", botParam: true, });
  1863. initModule({ location: tp.botTabs.pages[1], title: "FollowBots", storeAs: "botFollowBots", tooltip: "semibroken", botParam: true, });
  1864. tp.botTabs.pages[1].addSeparator();
  1865. initModule({ location: tp.botTabs.pages[1], title: "Leave Games", storeAs: "leaveBots", tooltip: "Makes all bots leave their games", button: "LEAVE", clickFunction: function () { broadcastToBots("leave") }, });
  1866. initModule({ location: tp.botTabs.pages[1], title: "Leave Empty", storeAs: "leaveEmptyBots", tooltip: "Makes bots leave empty games", botParam: true, });
  1867. initModule({ location: tp.botTabs.pages[1], title: "AutoLeave", storeAs: "autoLeaveBots", tooltip: "Makes bots leave after the specified interval", botParam: true, });
  1868. initModule({ location: tp.botTabs.pages[1], title: "Delay (s)", storeAs: "autoLeaveDelayBots", tooltip: "Interval to leave after", slider: { min: 0, max: 3600, step: 1 }, defaultValue: 300, enableConditions: [["autoLeaveBots", true]], botParam: true, });
  1869. tp.botTabs.pages[1].addSeparator();
  1870. initModule({ location: tp.botTabs.pages[1], title: "Spam Report", storeAs: "reportBots", tooltip: "Makes the bots report everyone in the lobby", button: "SPAM REPORT!", clickFunction: function () { broadcastToBots("report") }, });
  1871. tp.botTabs.pages[1].addSeparator();
  1872. initModule({ location: tp.botTabs.pages[1], title: "Join Game", storeAs: "botAutoJoin", tooltip: "Forces bots to join a game", botParam: true, });
  1873. initModule({ location: tp.botTabs.pages[1], title: "Game Code", storeAs: "botJoinCode", tooltip: "The code of the game the bots will join. If not specified, they'll find a random game", defaultValue: "CODE", botParam: true, });
  1874. initModule({ location: tp.botTabs.pages[1], title: "Get Code", storeAs: "getCodeBots", tooltip: "Get your current game as ID", button: "Retrieve", clickFunction: function () { change("botJoinCode", GAMECODE) }, botParam: true, });
  1875. tp.botTabs.pages[1].addSeparator();
  1876. initModule({ location: tp.botTabs.pages[1], title: "GameType", storeAs: "autoGamemodeBots", tooltip: "The game type the bots join - ffa, kotc, etc. can be random or disabled", dropdown: [{ text: "Disabled", value: "disabled" }, { text: "FFA", value: "ffa" }, { text: "Teams", value: "teams" }, { text: "Captula", value: "captula" }, { text: "KotC", value: "kotc" }, { text: "Randomised", value: "random" }], defaultValue: "disabled", botParam: true, });
  1877. initModule({ location: tp.botTabs.pages[1], title: "AutoRegion", storeAs: "autoRegionBots", tooltip: "The region the bots join - use, usc, etc. can be random or disabled", dropdown: [{ text: "Disabled", value: "disabled" }, { text: "Chile", value: "santiago" }, { text: "Germany", value: "germany" }, { text: "Singapore", value: "singapore" }, { text: "Sydney", value: "sydney" }, { text: "US Central", value: "uscentral" }, { text: "US East", value: "useast" }, { text: "US West", value: "uswest" }, { text: "Randomised", value: "random" }], defaultValue: "disabled", botParam: true, });
  1878. tp.botTabs.pages[1].addSeparator();
  1879. initModule({ location: tp.botTabs.pages[1], title: "Select Team", storeAs: "botTeam", tooltip: "Automatically picks the bots' teams", botParam: true, dropdown: [{ text: "Disabled", value: "disabled" }, { text: "Red Team", value: "red" }, { text: "Blue Team", value: "blue" }, { text: "Random Team", value: "random" }], defaultValue: "disabled", });
  1880. //PARAMS STUFF
  1881. initModule({ location: tp.botTabs.pages[2], title: "DoPlay", storeAs: "botRespawn", tooltip: "Make the bots spawn", botParam: true, });
  1882. initModule({ location: tp.botTabs.pages[2], title: "LowRes", storeAs: "botLowRes", tooltip: "Keeps resolution of the game low, reduces resources needed", botParam: true, })
  1883. initModule({ location: tp.botTabs.pages[2], title: "RenderDelay", storeAs: "renderDelayBots", tooltip: "Adds a forced fps buffer, makes game laggier", slider: { min: 0, max: 30000, step: 10 }, defaultValue: 0, botParam: true, });
  1884. initModule({ location: tp.botTabs.pages[2], title: "MuteGame", storeAs: "botMuteGame", tooltip: "Shuts the game up", botParam: true, })
  1885. tp.botTabs.pages[2].addSeparator();
  1886. initModule({ location: tp.botTabs.pages[2], title: "DoSeizure", storeAs: "botSeizure", tooltip: "Will the bots enable seizure mode?", botParam: true, enableConditions: [["botRespawn", true]], });
  1887. tp.botTabs.pages[2].addSeparator();
  1888. initModule({ location: tp.botTabs.pages[2], title: "DoTallChat", storeAs: "botTallChat", tooltip: "Enables the Tall Chat module for bots", botParam: true, });
  1889. initModule({ location: tp.botTabs.pages[2], title: "DoMock", storeAs: "botMock", tooltip: "Makes the bots mock chatting players", botParam: true, });
  1890. initModule({ location: tp.botTabs.pages[2], title: "DoAutoEZ", storeAs: "botAutoEZ", tooltip: "Makes the bots gloat about their kills", botParam: true, });
  1891. initModule({ location: tp.botTabs.pages[2], title: "DoChAccuse", storeAs: "botCheatAccuse", tooltip: "Makes the bots accuse their killers when dying", botParam: true, });
  1892. tp.botTabs.pages[2].addSeparator();
  1893. initModule({ location: tp.botTabs.pages[2], title: "DoSpam", storeAs: "botSpam", tooltip: "Makes the bots spam", botParam: true, });
  1894. initModule({ location: tp.botTabs.pages[2], title: "SpamText", storeAs: "spamChatTextBot", tooltip: "The message spammed by the bots", defaultValue: "ЅtateFarm Client On Top! ", botParam: true, });
  1895. tp.botTabs.pages[2].addSeparator();
  1896. initModule({ location: tp.botTabs.pages[2], title: "SelectWeapon", storeAs: "botWeapon", tooltip: "Makes the bots pick a weapon", dropdown: [{ 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" }, { text: "Randomised", value: "random" }], botParam: true, defaultValue: "eggk47", enableConditions: [["botRespawn", true]], });
  1897. initModule({ location: tp.botTabs.pages[2], title: "DoMove", storeAs: "botAutoMove", tooltip: "Makes the bots move around", botParam: true, enableConditions: [["botRespawn", true]], });
  1898. initModule({ location: tp.botTabs.pages[2], title: "DoShoot", storeAs: "botAutoShoot", tooltip: "Makes the bots shoot", tooltip: "Makes the bot autoshoot.", botParam: true, enableConditions: [["botRespawn", true]], });
  1899. initModule({ location: tp.botTabs.pages[2], title: "DoAimbot", storeAs: "botAimbot", tooltip: "Makes the bots have aimbot", botParam: true, enableConditions: [["botRespawn", true]], });;
  1900. initModule({ location: tp.botTabs.pages[2], title: "UseMinAccuracy", storeAs: "botAccuracy", tooltip: "Makes the bots only fire if the spread is lower than the given value", slider: { min: 0, max: 1, step: 0.05 }, defaultValue: 0, botParam: true, enableConditions: [["botRespawn", true]], });
  1901. //INFO STUFF
  1902. initModule({ location: tp.botTabs.pages[3], storeAs: "botOnline", tooltip: "Sex", monitor: 17.5, botParam: true, });
  1903. if (!AUTOMATED) {
  1904. if (!load("StateFarmConfigMainPanel") || reset===true) {
  1905. saveConfig();
  1906. } else {
  1907. log("##############################################")
  1908. tp.mainPanel.importPreset(load("StateFarmConfigMainPanel"));
  1909. tp.botPanel.importPreset(load("StateFarmConfigBotPanel"));
  1910. try {
  1911. let specialItems = load("StateFarmConfigSpecialItems"); //this is for the fucking shit that doesnt apply for NO reason!!
  1912. if (specialItems) {
  1913. specialItems.forEach(item => {
  1914. change(item[0], item[1]);
  1915. log(item[0], item[1]);
  1916. });
  1917. };
  1918. } catch (error) {
  1919. }
  1920. };
  1921. };
  1922. updateConfig();
  1923. setTimeout(() => {
  1924. if (AUTOMATED) { //why after 500ms? perhaps we'll never know. maybe because it gives a visual indication that statefarm is statefarming.
  1925. tp.mainPanel.hidden = true;
  1926. };
  1927. updateHiddenAndDisabled();
  1928. let specialItems = load("StateFarmConfigSpecialItems"); //this is for the fucking shit that doesnt apply for NO reason!!
  1929. if (specialItems) {
  1930. specialItems.forEach(item => {
  1931. change(item[0], item[1]);
  1932. log(item[0], item[1]);
  1933. });
  1934. };
  1935. //tooltip events
  1936. unsafeWindow.document.querySelectorAll('.tp-lblv_l').forEach(label => {
  1937. if (extract("debug") && !tooltips[label.innerText]) log("Warning: no tooltip assigned for module:", label.innerText);
  1938. label.addEventListener('mouseenter', () => {
  1939. if (extract("tooltips")) {
  1940. tooltipElement.innerText = tooltips[label.innerText] || 'Tooltip parameter not found';
  1941. tooltipElement.style.opacity = '1';
  1942. const rect = label.getBoundingClientRect();
  1943. tooltipElement.style.top = `${rect.top + window.scrollY - 12}px`;
  1944. tooltipElement.style.left = `${rect.left + window.scrollX - tooltipElement.offsetWidth - 10}px`;
  1945. }
  1946. });
  1947. label.addEventListener('mouseleave', () => {
  1948. tooltipElement.style.opacity = '0';
  1949. });
  1950. });
  1951. }, 500);
  1952. menuInitiated = reset == "init" ? "init" : true;
  1953. const defaultSpamText = ("dsc.gg/s𝖿network: " + menuTitle + " On Top! ");
  1954. if (extract("spamChatText").includes("On Top!")) { change("spamChatText", defaultSpamText) };
  1955. if (extract("spamChatTextBot").includes("On Top!")) { change("spamChatTextBot", defaultSpamText) };
  1956. if (extract("fakeMessageText").includes("On Top!")) { change("fakeMessageText", defaultSpamText) };
  1957. makeDraggable(tp.mainPanel.containerElem_);
  1958. makeDraggable(tp.botPanel.containerElem_);
  1959. };
  1960. const onContentLoaded = function () {
  1961. log("StateFarm: initMenu()");
  1962. initMenu("init");
  1963. log("StateFarm: applyStylesAddElements()");
  1964. applyStylesAddElements(); //set font and change menu cass, and other stuff to do with the page
  1965. const intervalId1 = setInterval(every15Seconds, 15000);
  1966. const intervalId2 = setInterval(everySecond, 1000);
  1967. const intervalId3 = setInterval(everyDecisecond, 100);
  1968. applyStateFarmLogo();
  1969. const observer = new MutationObserver(applyStateFarmLogo);
  1970. observer.observe(document.body, { subtree: true, childList: true });
  1971. };
  1972. //visual functions
  1973. const createPopup = function (text, type) {
  1974. log("Creating Popup Type:", type, "With Text:", text);
  1975. try {
  1976. if (extract("popups")) {
  1977. const messageContainer = document.getElementById('message-container');
  1978. const messages = messageContainer.getElementsByClassName(scrambledMsgEl);
  1979. if (messages.length > 5) {
  1980. messageContainer.removeChild(messages[0]);
  1981. };
  1982. const clonedMsgElement = msgElement.cloneNode(true);
  1983. clonedMsgElement.innerText = text;
  1984. switch (type) {
  1985. case ("success"):
  1986. clonedMsgElement.style.border = '2px solid rgba(0, 255, 0, 0.5)'; break;
  1987. case ("error"):
  1988. clonedMsgElement.style.border = '2px solid rgba(255, 0, 0, 0.5)'; break;
  1989. };
  1990. clonedMsgElement.style.display = 'none';
  1991. const messageOffset = (messages.length + 1) * 50;
  1992. clonedMsgElement.style.bottom = messageOffset + "px";
  1993. void clonedMsgElement.offsetWidth;
  1994. clonedMsgElement.style.display = '';
  1995. messageContainer.appendChild(clonedMsgElement);
  1996. //reorder such that newest is lowest
  1997. for (let i = messages.length - 1; i >= 0; i--) {
  1998. messages[i].style.bottom = (((messages.length - i) * 50) - 40) + "px";
  1999. };
  2000. };
  2001. } catch (error) {
  2002. // Handle the error and display an error message onscreen
  2003. console.error("An error occurred:", error);
  2004. alert("Bollocks! If you're getting this message, injection probably failed. To solve this, perform CTRL+F5 - this performs a hard reload. If this does not work, contact the developers.");
  2005. };
  2006. };
  2007. const createPrompt = function(text = "No text set", buttons = [], duration = 5000) {
  2008. unsafeWindow.BAWK.play("kotc_zonespawn");
  2009. // log(arguments);
  2010. const promptElement = document.createElement('div');
  2011. promptElement.innerText = text;
  2012. promptElement.setAttribute('style', `
  2013. position: absolute;
  2014. left: 10px;
  2015. top: 50%;
  2016. transform: translateY(-50%);
  2017. color: #fff;
  2018. background: rgba(0, 0, 0, 0.7);
  2019. font-weight: normal;
  2020. padding: 10px;
  2021. border-radius: 5px;
  2022. box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  2023. border: 2px solid rgba(255, 255, 255, 0.5);
  2024. animation: msg 0.5s forwards, msg 0.5s reverse forwards ${duration/1000}s;
  2025. pointer-events: none;
  2026. opacity: 0;
  2027. transition: opacity 0.3s ease-in-out;
  2028. font-family: 'Bahnschrift', sans-serif !important;
  2029. font-size: 16px;
  2030. z-index: 9999 !important;
  2031. white-space: pre-wrap;
  2032. width: 300px;
  2033. `);
  2034. const buttonContainer = document.createElement('div');
  2035. buttonContainer.setAttribute('style', 'margin-top: 10px; pointer-events: auto; text-align: center;');
  2036. const deleteButton = function(){
  2037. document.body.removeChild(promptElement);
  2038. };
  2039. buttons = [...buttons,
  2040. [`Dismiss (${Math.ceil(duration/1000)}s)`, () => deleteButton()]
  2041. ];
  2042. buttons.forEach(([buttonText, buttonFunction]) => {
  2043. const button = document.createElement('button');
  2044. button.innerText = buttonText;
  2045. button.setAttribute('style', `
  2046. background: #6c757d;
  2047. color: #fff;
  2048. border: none;
  2049. padding: 5px 10px;
  2050. margin-right: 5px;
  2051. border-radius: 3px;
  2052. cursor: pointer;
  2053. font-family: 'Bahnschrift', sans-serif !important;
  2054. `);
  2055. button.onclick = buttonFunction;
  2056. buttonContainer.appendChild(button);
  2057. });
  2058. promptElement.appendChild(buttonContainer);
  2059. document.body.appendChild(promptElement);
  2060. setTimeout(() => {
  2061. promptElement.style.opacity = '1';
  2062. }, 100);
  2063. setTimeout(() => {
  2064. promptElement.style.opacity = '0';
  2065. setTimeout(() => {
  2066. deleteButton();
  2067. }, 800);
  2068. }, duration);
  2069. };
  2070. const createVarDataPopup = function (vardataButtonsInfo) {
  2071. closeVardataPopup = () => {
  2072. vardataPopup.style.opacity = '0';
  2073. vardataOverlay.style.opacity = '0';
  2074. setTimeout(() => {
  2075. document.body.removeChild(vardataPopup);
  2076. document.body.removeChild(vardataOverlay);
  2077. reloadPage();
  2078. }, 400);
  2079. };
  2080. //create vardataOverlay
  2081. vardataOverlay = document.createElement('div');
  2082. vardataOverlay.style.position = 'fixed';
  2083. vardataOverlay.style.top = '0';
  2084. vardataOverlay.style.left = '0';
  2085. vardataOverlay.style.width = '100%';
  2086. vardataOverlay.style.height = '100%';
  2087. vardataOverlay.style.backgroundColor = 'rgba(0, 0, 0, 0.75)';
  2088. vardataOverlay.style.zIndex = '9998';
  2089. vardataOverlay.style.opacity = '0';
  2090. vardataOverlay.style.transition = 'opacity 0.4s ease-in-out';
  2091. //create vardataPopup
  2092. vardataPopup = document.createElement('div');
  2093. vardataPopup.style.position = 'fixed';
  2094. vardataPopup.style.left = '50%';
  2095. vardataPopup.style.top = '50%';
  2096. vardataPopup.style.width = '40em';
  2097. vardataPopup.style.transform = 'translate(-50%, -50%)';
  2098. vardataPopup.style.color = '#fff';
  2099. vardataPopup.style.backgroundColor = 'rgba(0, 0, 0, 0.7)';
  2100. vardataPopup.style.padding = '15px';
  2101. vardataPopup.style.borderRadius = '5px';
  2102. vardataPopup.style.boxShadow = '0 2px 10px rgba(0, 0, 0, 0.2)';
  2103. vardataPopup.style.border = '2px solid rgba(255, 255, 255, 0.5)';
  2104. vardataPopup.style.pointerEvents = 'auto';
  2105. vardataPopup.style.opacity = '0'; // Start invisible for fade-in effect
  2106. vardataPopup.style.transition = 'opacity 0.4s ease-in-out'; // Fade-in transition
  2107. vardataPopup.style.fontFamily = 'Bahnschrift, sans-serif';
  2108. vardataPopup.style.fontSize = '16px';
  2109. vardataPopup.style.zIndex = '9999';
  2110. vardataPopup.style.whiteSpace = 'pre-wrap';
  2111. //set vardataPopup content
  2112. const title = "Valid VarData for this hash could not be retrieved.";
  2113. const message = `This could be due to a conflicting script or StateFarm Client is out of date.<br>
  2114. <strong>Why am I seeing this?</strong>
  2115. StateFarm Client was unable to retrieve matching VarData from GitHub. Here are some common reasons for this happening:<br>
  2116. 1. Multiple scripts are running. This is usually the most common reason.
  2117. 2. There are multiple userscript managers. If you're using ViolentMonkey, check if Tampermonkey is installed and also affecting the site.<br>
  2118. <strong>What is VarData?</strong>
  2119. Shell Shockers uses obfuscation to protect its code. This makes the names of all the variables scrambled every update. VarData is an automatically generated JSON file that restores some information to make mods possible. It is maintained by the StateFarm dev team and hosted on GitHub.<br>
  2120. <strong>How do I generate VarData?</strong>
  2121. You can generate VarData by using the command "sf.vardata" in the StateFarm Network Discord bot channel.
  2122. <a href="${discordURL}" target="_blank" style="color: #1944ff; text-decoration: underline; font-size: inherit;">Join the StateFarm Network Discord server</a> to generate VarData!`;
  2123. const message2 = `<br>Alternatively, if you know what you're doing you can enable one of these options:`;
  2124. const image = `<img src='${itsOverURL}' style='width: 20%; height: 20%; margin-right: 15px; vertical-align: middle;'>`;
  2125. vardataPopup.innerHTML = `${image}<strong>${title}</strong><br><small style="color: rgba(255, 255, 255, 0.7); font-size: 14px;">Hash: ${hash}</small><br><br>${message}<br>
  2126. <label for="vardataInput">Enter VarData:</label>
  2127. <div style="display: flex; align-items: center;">
  2128. <input type="text" id="vardataInput" style="flex: 1; padding: 5px; width: 250px; border: 1px solid rgba(255, 255, 255, 0.5); background-color: rgba(255, 255, 255, 0.1); color: #fff; border-radius: 5px; margin-right: 10px;">
  2129. <button id="submitVarData" style="padding: 5px 15px; background-color: rgba(255, 255, 255, 0.1); color: #fff; border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 5px; cursor: pointer; transition: background-color 0.2s;">GO</button>
  2130. </div>${message2}`;
  2131. //create buttons
  2132. const vardataButtonContainer = document.createElement('div');
  2133. vardataButtonContainer.style.display = 'flex';
  2134. vardataButtonContainer.style.justifyContent = 'space-between';
  2135. vardataButtonContainer.style.marginTop = '10px';
  2136. vardataButtonsInfo.forEach(({ id, text, action }) => {
  2137. const button = document.createElement('button');
  2138. button.id = id;
  2139. button.innerHTML = text;
  2140. button.style.padding = '5px 10px';
  2141. button.style.backgroundColor = 'rgba(255, 255, 255, 0.1)';
  2142. button.style.color = '#fff';
  2143. button.style.border = '1px solid rgba(255, 255, 255, 0.5)';
  2144. button.style.borderRadius = '5px';
  2145. button.style.cursor = 'pointer';
  2146. button.style.transition = 'background-color 0.2s';
  2147. button.style.flex = '1';
  2148. button.style.marginRight = '10px';
  2149. button.style.fontSize = '12px';
  2150. button.style.whiteSpace = 'pre-wrap';
  2151. button.addEventListener('click', action);
  2152. button.addEventListener('mouseenter', () => button.style.backgroundColor = 'rgba(255, 255, 255, 0.3)');
  2153. button.addEventListener('mouseleave', () => button.style.backgroundColor = 'rgba(255, 255, 255, 0.1)');
  2154. vardataButtonContainer.appendChild(button);
  2155. });
  2156. vardataPopup.appendChild(vardataButtonContainer);
  2157. const setButtonState = function (buttonId, isEnabled) {
  2158. const button = unsafeWindow.document.getElementById(buttonId);
  2159. if (button) {
  2160. button.disabled = !isEnabled;
  2161. button.style.opacity = isEnabled ? '1' : '0.5';
  2162. button.style.pointerEvents = isEnabled ? 'auto' : 'none';
  2163. }
  2164. };
  2165. (setTimeout(() => {
  2166. vardataButtonsInfo.forEach(({ id, enabled }) => {
  2167. setButtonState(id, enabled);
  2168. });
  2169. }, 200));
  2170. //create checkbox
  2171. const vardataCheckboxContainer = document.createElement('div');
  2172. vardataCheckboxContainer.style.display = 'flex';
  2173. vardataCheckboxContainer.style.justifyContent = 'center';
  2174. vardataCheckboxContainer.style.alignItems = 'center';
  2175. vardataCheckboxContainer.style.marginTop = '15px';
  2176. vardataCheckboxContainer.style.fontSize = '16px';
  2177. const checkbox = document.createElement('input');
  2178. checkbox.type = 'checkbox';
  2179. checkbox.id = 'rememberCheckbox';
  2180. checkbox.style.display = 'none';
  2181. const customCheckbox = document.createElement('span');
  2182. customCheckbox.style.width = '20px';
  2183. customCheckbox.style.height = '20px';
  2184. customCheckbox.style.display = 'inline-block';
  2185. customCheckbox.style.backgroundColor = 'rgba(255, 255, 255, 0.1)';
  2186. customCheckbox.style.border = '1px solid rgba(255, 255, 255, 0.5)';
  2187. customCheckbox.style.borderRadius = '5px';
  2188. customCheckbox.style.marginRight = '8px';
  2189. customCheckbox.style.cursor = 'pointer';
  2190. customCheckbox.addEventListener('click', () => {
  2191. checkbox.checked = !checkbox.checked;
  2192. change("vardataType", checkbox.checked ? 2 : 1);
  2193. customCheckbox.style.backgroundColor = checkbox.checked ? 'rgba(255, 255, 255, 0.8)' : 'rgba(255, 255, 255, 0.1)';
  2194. });
  2195. vardataCheckboxContainer.appendChild(customCheckbox);
  2196. vardataCheckboxContainer.appendChild(checkbox);
  2197. vardataCheckboxContainer.appendChild(document.createTextNode('Remember until next hash'));
  2198. vardataPopup.appendChild(vardataCheckboxContainer);
  2199. document.body.appendChild(vardataOverlay);
  2200. document.body.appendChild(vardataPopup);
  2201. //add inputs stuff
  2202. const input = document.getElementById('vardataInput');
  2203. const submitButton = document.getElementById('submitVarData');
  2204. submitButton.addEventListener('click', () => {
  2205. const inputValue = input.value;
  2206. const error = function () {
  2207. createPopup("Inputted VarData isn't valid.", "error");
  2208. };
  2209. try {
  2210. let converted = JSON.parse(inputValue);
  2211. if (converted.vars && converted.checksum) {
  2212. change("vardataCustom", inputValue);
  2213. change("vardataFallback", 4);
  2214. change("vardataType", 1); //custom isnt consistent enough
  2215. closeVardataPopup();
  2216. } else {
  2217. error();
  2218. };
  2219. } catch (e) {
  2220. error();
  2221. }
  2222. });
  2223. input.addEventListener('keypress', (event) => {
  2224. if (event.key === 'Enter') {
  2225. submitButton.click();
  2226. }
  2227. });
  2228. //fade anims
  2229. setTimeout(() => {
  2230. vardataOverlay.style.opacity = '1';
  2231. vardataPopup.style.opacity = '1';
  2232. }, 10);
  2233. };
  2234. //StateFarmChat functions
  2235. const sfChatUsernameSet = function () {
  2236. let tagAdded = `[Shell] ${extract("sfChatUsername")}`;
  2237. if (sfChatUsername != tagAdded && sfChatIframe != undefined) {
  2238. sfChatUsername = tagAdded; log(sfChatUsername);
  2239. sfChatIframe.contentWindow.postMessage("SFCHAT-UPDATE" + JSON.stringify({ name: sfChatUsername }), "*");
  2240. };
  2241. };
  2242. const startStateFarmChat = function (startHidden) {
  2243. //UnsafewindowVars
  2244. const makeChatDragable = function (element) {
  2245. if (element.getAttribute("drag-true") != "true") {
  2246. element.addEventListener("mousedown", function (e) {
  2247. let offsetX = e.clientX - parseInt(window.getComputedStyle(this).left);
  2248. let offsetY = e.clientY - parseInt(window.getComputedStyle(this).top);
  2249. function mouseMoveHandler(e) {
  2250. let newX = e.clientX - offsetX;
  2251. let newY = e.clientY - offsetY;
  2252. if (newX >= 0 && newX + element.getBoundingClientRect().width <= window.innerWidth) {
  2253. element.style.left = newX + "px";
  2254. }
  2255. if (newY >= 0 && newY + element.getBoundingClientRect().height <= window.innerHeight) {
  2256. element.style.top = newY + "px";
  2257. }
  2258. }
  2259. function reset() {
  2260. window.removeEventListener("mousemove", mouseMoveHandler);
  2261. window.removeEventListener("mouseup", reset);
  2262. }
  2263. window.addEventListener("mousemove", mouseMoveHandler);
  2264. window.addEventListener("mouseup", reset);
  2265. });
  2266. element.setAttribute("drag-true", "true");
  2267. };
  2268. };
  2269. sfChatContainer = document.createElement("div");
  2270. sfChatContainer.style.padding = "1px";
  2271. let title = document.createElement("p");
  2272. title.style.fontSize = "medium";
  2273. title.style.color = "#D6D6D6";
  2274. title.innerHTML = "StateFarm Chat";
  2275. sfChatContainer.appendChild(title);
  2276. sfChatContainer.style.backgroundColor = "#555";
  2277. sfChatContainer.style.position = "absolute";
  2278. sfChatContainer.style.borderRadius = "10px";
  2279. sfChatContainer.style.textAlign = "center";
  2280. sfChatContainer.style.top = "20px";
  2281. sfChatContainer.style.left = "20px";
  2282. sfChatContainer.style.zIndex = 100000000;
  2283. if (startHidden){
  2284. sfChatContainer.style.display = 'none';
  2285. }
  2286. const sendSettings = function () {
  2287. let settings = GM_getValue("SFCHAT-SETTINGS");
  2288. if (settings) {
  2289. sfChatIframe.contentWindow.postMessage("SFCHAT-SETTINGS" + settings, "*");
  2290. } else {
  2291. sfChatIframe.contentWindow.postMessage("SFCHAT-SETTINGS", "*");
  2292. };
  2293. };
  2294. makeChatDragable(sfChatContainer);
  2295. sfChatIframe = document.createElement("iframe");
  2296. sfChatIframe.setAttribute(
  2297. "src", sfChatURL
  2298. );
  2299. sfChatIframe.id = "sfChat-iframe";
  2300. sfChatIframe.setAttribute("style", "width: 600px; height:700px; z-index: 10000;");
  2301. sfChatContainer.appendChild(sfChatIframe);
  2302. document.getElementsByTagName("body")[0].appendChild(sfChatContainer);
  2303. const startTimeout = setTimeout(function () {
  2304. log("settings");
  2305. sendSettings();
  2306. let nameChange = setTimeout(function () {
  2307. sfChatUsername = `[Shell] ${extract("sfChatUsername")}`;
  2308. sfChatIframe.contentWindow.postMessage("SFCHAT-UPDATE" + JSON.stringify({ name: sfChatUsername }), "*");
  2309. }, 500);
  2310. }, 1000);
  2311. unsafeWindow.addEventListener("message", (e) => {
  2312. if (typeof e.data == "string"){
  2313. if (e.data.startsWith("SFCHAT-UPDATE")) {
  2314. GM_setValue("SFCHAT-SETTINGS", e.data.replace(/SFCHAT-UPDATE/gm, ""));
  2315. }
  2316. if (e.data.startsWith("SFCHAT-REQUEST")) {
  2317. sendSettings();
  2318. };
  2319. if (e.data.startsWith("SFCHAT-MESSAGE")) {
  2320. let stringMessage = e.data.replace(/SFCHAT-MESSAGE/gm, "");
  2321. let message = JSON.parse(stringMessage);
  2322. if (extract("sfChatNotifications") && message.user && message.message && (sfChatContainer.style.display == "none")){
  2323. if (message.message.length <= 50){
  2324. createPopup(message.user.name + ": " + message.message);
  2325. } else {
  2326. createPopup(message.user.name + ": " + message.message.substring(0, 50) + "...");
  2327. }
  2328. if (extract("sfChatNotificationSound")){
  2329. unsafeWindow.BAWK.play("grenade_cellphone");
  2330. };
  2331. };
  2332. if (extract("sfChatInvitations")) {
  2333. let uppercaseMsg = message.message.toUpperCase();
  2334. const findCode = (input) => {
  2335. const allMatches = input.match(/(?:[A-Z]{4}-[A-Z]{4}-[A-Z]{4})/g);
  2336. if (allMatches) {
  2337. for (const match of allMatches) {
  2338. if (/[A-z]/.test(match)) {
  2339. return match;
  2340. };
  2341. };
  2342. };
  2343. return null;
  2344. };
  2345. let foundCode = findCode(uppercaseMsg);
  2346. if (foundCode) {
  2347. createPrompt(`INVITE! User "${message.user.name}" has invited you to join game "${foundCode}"! (via SFChat)`, [
  2348. ['JOIN', () => {
  2349. change("leaveGame");
  2350. setTimeout(() => {
  2351. vueApp.externPlayObject(
  2352. 2,
  2353. vueApp.currentGameType,
  2354. vueApp.playerName,
  2355. '',
  2356. foundCode,
  2357. );
  2358. }, 500);
  2359. }]
  2360. ], 10000);
  2361. };
  2362. };
  2363. };
  2364. };
  2365. });
  2366. };
  2367. const applyStylesAddElements = function (themeToApply = "null") {
  2368. const head = document.head || document.getElementsByTagName('head').pages[0];
  2369. if (AUTOMATED) {
  2370. automatedBorder = document.createElement('div');
  2371. automatedBorder.setAttribute('id', 'automated-border');
  2372. document.body.appendChild(automatedBorder);
  2373. const automatedBorderStyle = `
  2374. position: fixed;
  2375. top: 0;
  2376. left: 0;
  2377. width: 100%;
  2378. height: 100%;
  2379. border: 5px solid rgba(255, 0, 0, 1);
  2380. pointer-events: none;
  2381. z-index: 999999999;
  2382. `;
  2383. automatedBorder.style.cssText = automatedBorderStyle;
  2384. };
  2385. //menu customisation (apply font, button widths, adjust checkbox right slightly, make menu appear on top, add anim to message)
  2386. const styleElement = document.createElement('style');
  2387. styleElement.textContent = `
  2388. @font-face {
  2389. font-family: "Bahnschrift";
  2390. src: url("https://db.onlinewebfonts.com/t/0a6ee448d1bd65c56f6cf256a7c6f20a.eot");
  2391. src: url("https://db.onlinewebfonts.com/t/0a6ee448d1bd65c56f6cf256a7c6f20a.eot?#iefix")format("embedded-opentype"),
  2392. url("https://db.onlinewebfonts.com/t/0a6ee448d1bd65c56f6cf256a7c6f20a.woff2")format("woff2"),
  2393. url("https://db.onlinewebfonts.com/t/0a6ee448d1bd65c56f6cf256a7c6f20a.woff")format("woff"),
  2394. url("https://db.onlinewebfonts.com/t/0a6ee448d1bd65c56f6cf256a7c6f20a.ttf")format("truetype"),
  2395. url("https://db.onlinewebfonts.com/t/0a6ee448d1bd65c56f6cf256a7c6f20a.svg#Bahnschrift")format("svg");
  2396. }
  2397. .tp-dfwv, .tp-sglv_i, .tp-rotv_t, .tp-fldv_t, .tp-ckbv_l, .tp-txtv_i, .tp-lblv_l, .tp-tbiv_t, .coords, .gameinfo, .playerstats, .playerinfo, .performanceinfo, .automated {
  2398. font-family: 'Bahnschrift', sans-serif !important;
  2399. font-size: 16px;
  2400. z-index: 9999 !important;
  2401. }
  2402. .tp-rotv_m, .tp-fldv_m {
  2403. display: none;
  2404. }
  2405. .tp-dfwv {
  2406. min-width: 300px;
  2407. }
  2408. .tp-rotv_t {
  2409. cursor: move;
  2410. user-select: none;
  2411. }
  2412. .tp-tbiv_t {
  2413. font-family: 'Bahnschrift';
  2414. font-size: 13px;
  2415. }
  2416. .tp-lblv_v, .tp-lstv, .tp-btnv_b, .tp-btnv_t {
  2417. font-family: 'Bahnschrift';
  2418. font-size: 12px;
  2419. }
  2420. .tp-mllv {
  2421. font-family: 'Bahnschrift';
  2422. font-size: 12px;
  2423. letter-spacing: -1px;
  2424. width: 290px;
  2425. margin-left: -130px !important;
  2426. }
  2427. .tp-mllv_i::-webkit-scrollbar-thumb {
  2428. background-color: #888; /* Adjust the color as needed */
  2429. border: 2px solid #555; /* Change the color of the border and adjust the width as needed */
  2430. }
  2431. .tp-mllv_i::-webkit-scrollbar-track {
  2432. background-color: #000; /* Change the color as needed */
  2433. }
  2434. .tp-lblv_l {
  2435. font-size: 14px;
  2436. letter-spacing: -1px;
  2437. }
  2438. .tp-btnv {
  2439. width: 100px;
  2440. margin-left: 60px !important;
  2441. }
  2442. .tp-ckbv_w {
  2443. margin-left: 4px !important;
  2444. }
  2445. .tp-dfwv, .tp-rotv, .tp-rotv_c, .tp-fldv, .tp-fldv_c, .tp-lblv, .tp-lstv, .tp-btnv, .tp-sldv {
  2446. z-index: 99999 !important;
  2447. white-space: nowrap !important;
  2448. }
  2449. @keyframes msg {
  2450. from {
  2451. transform: translate(-120%, 0);
  2452. opacity: 0;
  2453. }
  2454. to {
  2455. transform: none;
  2456. opacity: 1;
  2457. }
  2458. }
  2459. `;
  2460. document.head.appendChild(styleElement);
  2461. applyTheme();
  2462. //initiate message div and css and shit
  2463. msgElement = document.createElement('div'); // create the element directly
  2464. scrambledMsgEl = getScrambled();
  2465. msgElement.classList.add(scrambledMsgEl);
  2466. msgElement.setAttribute('style', `
  2467. position: absolute;
  2468. left: 10px;
  2469. color: #fff;
  2470. background: rgba(0, 0, 0, 0.7);
  2471. font-weight: normal;
  2472. padding: 10px;
  2473. border-radius: 5px;
  2474. box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  2475. border: 2px solid rgba(255, 255, 255, 0.5);
  2476. animation: msg 0.5s forwards, msg 0.5s reverse forwards 3s;
  2477. pointer-events: none;
  2478. opacity: 0;
  2479. transition: opacity 0.3s ease-in-out;
  2480. font-family: 'Bahnschrift', sans-serif !important;
  2481. font-size: 16px;
  2482. z-index: 9999 !important;
  2483. `);
  2484. document.body.appendChild(msgElement);
  2485. msgElement.style.display = 'none';
  2486. const messageContainer = document.createElement('div'); //so it can be cloned. i think.
  2487. messageContainer.id = 'message-container';
  2488. document.body.appendChild(messageContainer);
  2489. //initiate tooltip div and css and shit
  2490. tooltipElement = document.createElement('div');
  2491. tooltipElement.style.cssText = `
  2492. position: absolute;
  2493. color: #fff;
  2494. background: rgba(0, 0, 0, 0.7);
  2495. font-weight: normal;
  2496. padding: 10px;
  2497. border-radius: 5px;
  2498. box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  2499. border: 2px solid rgba(255, 255, 255, 0.5);
  2500. animation: fadeIn 0.5s forwards, fadeOut 0.5s reverse forwards 3s;
  2501. pointer-events: none;
  2502. opacity: 0;
  2503. transition: opacity 0.3s ease-in-out;
  2504. font-family: 'Bahnschrift', sans-serif !important;
  2505. font-size: 16px;
  2506. z-index: 9999999 !important;
  2507. max-width: 300px;
  2508. word-wrap: break-word;
  2509. `;
  2510. document.body.appendChild(tooltipElement);
  2511. //initiate coord div and css and shit
  2512. coordElement = document.createElement('div'); // create the element directly
  2513. coordElement.classList.add('coords');
  2514. coordElement.setAttribute('style', `
  2515. position: fixed;
  2516. top: 0px;
  2517. left: 0px;
  2518. height: auto;
  2519. max-height: 30px;
  2520. min-height: 30px;
  2521. text-wrap: nowrap;
  2522. color: #fff;
  2523. background: rgba(0, 0, 0, 0.6);
  2524. font-weight: bolder;
  2525. padding: 2px;
  2526. border-radius: 5px;
  2527. box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  2528. border: 2px solid rgba(255, 255, 255, 0.5);
  2529. z-index: 999999;
  2530. `);
  2531. document.body.appendChild(coordElement);
  2532. coordElement.style.display = 'none';
  2533. //initiate game info div and css and shit
  2534. gameInfoElement = document.createElement('div'); // create the element directly
  2535. gameInfoElement.classList.add('gameinfo');
  2536. gameInfoElement.setAttribute('style', `
  2537. position: fixed;
  2538. bottom: 0px;
  2539. left: 0px;
  2540. height: auto;
  2541. max-height: 30px;
  2542. min-height: 30px;
  2543. text-wrap: nowrap;
  2544. color: #fff;
  2545. background: rgba(0, 0, 0, 0.6);
  2546. font-weight: bolder;
  2547. padding: 2px;
  2548. border-radius: 5px;
  2549. box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  2550. border: 2px solid rgba(255, 255, 255, 0.5);
  2551. z-index: 999999;
  2552. `);
  2553. document.body.appendChild(gameInfoElement);
  2554. gameInfoElement.style.display = 'none';
  2555. //initiate hp div and css and shit
  2556. playerstatsElement = document.createElement('div'); // create the element directly
  2557. playerstatsElement.classList.add('playerstats');
  2558. playerstatsElement.setAttribute('style', `
  2559. position: absolute;
  2560. top: 20px;
  2561. left: 280px;
  2562. height: auto;
  2563. min-height: 30px;
  2564. text-wrap: nowrap;
  2565. color: #fff;
  2566. background: rgba(0, 0, 0, 0.6);
  2567. font-weight: bolder;
  2568. padding: 10px;
  2569. border-radius: 5px;
  2570. box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  2571. border: 2px solid rgba(255, 255, 255, 0.5);
  2572. z-index: 999999;
  2573. `);
  2574. document.body.appendChild(playerstatsElement);
  2575. playerstatsElement.style.display = 'none';
  2576. //initiate player info div and css and shit
  2577. playerinfoElement = document.createElement('div'); // create the element directly
  2578. playerinfoElement.classList.add('playerinfo');
  2579. playerinfoElement.setAttribute('style', `
  2580. position: absolute;
  2581. top: 80%;
  2582. left: 90%;
  2583. height: auto;
  2584. max-height: 102;
  2585. text-wrap: nowrap;
  2586. color: #fff;
  2587. background: rgba(0, 0, 0, 0.6);
  2588. font-weight: bolder;
  2589. padding: 10px;
  2590. border-radius: 5px;
  2591. box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  2592. border: 2px solid rgba(255, 255, 255, 0.5);
  2593. z-index: 999999;
  2594. `);
  2595. document.body.appendChild(playerinfoElement);
  2596. playerinfoElement.style.display = 'none';
  2597. //initiate player info div and css and shit
  2598. performanceElement = document.createElement('div'); // create the element directly
  2599. performanceElement.classList.add('performanceinfo');
  2600. performanceElement.setAttribute('style', `
  2601. position: absolute;
  2602. top: 35%;
  2603. left: 90%;
  2604. height: auto;
  2605. max-height: 102;
  2606. text-wrap: nowrap;
  2607. color: #fff;
  2608. background: rgba(0, 0, 0, 0.6);
  2609. font-weight: bolder;
  2610. padding: 10px;
  2611. border-radius: 5px;
  2612. box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  2613. border: 2px solid rgba(255, 255, 255, 0.5);
  2614. z-index: 999999;
  2615. `);
  2616. document.body.appendChild(performanceElement);
  2617. performanceElement.style.display = 'none';
  2618. //initiate first use div and css and shit
  2619. firstUseElement = document.createElement('div'); // create the element directly
  2620. firstUseElement.classList.add('firstuse');
  2621. firstUseElement.setAttribute('style', `
  2622. position: fixed;
  2623. top: 0;
  2624. left: 0;
  2625. width: 100%;
  2626. height: 100%;
  2627. background-color: rgba(0, 0, 0, 0.8);
  2628. z-index: 99999999;
  2629. display: flex;
  2630. justify-content: center;
  2631. align-items: center;
  2632. `);
  2633. document.body.appendChild(firstUseElement);
  2634. firstUseElement.style.display = 'none';
  2635. //initiate bloom indicator div and css and shit
  2636. redCircle = document.createElement('div');
  2637. redCircle.style.position = 'fixed';
  2638. redCircle.style.width = '5px';
  2639. redCircle.style.height = '5px';
  2640. redCircle.style.borderRadius = '50%';
  2641. redCircle.style.backgroundColor = 'red';
  2642. redCircle.style.transform = 'translate(-50%, -50%)';
  2643. document.body.appendChild(redCircle);
  2644. //initiate minangle indicator div and css and shit
  2645. minangleCircle = document.createElement('div');
  2646. minangleCircle.style.position = 'fixed';
  2647. minangleCircle.style.borderRadius = '100%';
  2648. minangleCircle.style.border = 'thin solid red'
  2649. minangleCircle.style.transform = 'translate(50%, 50%)';
  2650. minangleCircle.style.pointerEvents = 'none';
  2651. document.body.appendChild(minangleCircle);
  2652. try {
  2653. hudElementPositions = load("HUD-Positions");
  2654. coordElement.style.top = hudElementPositions.coordElement.top + "px";
  2655. gameInfoElement.style.top = hudElementPositions.gameInfoElement.top + "px";
  2656. playerstatsElement.style.top = hudElementPositions.playerstatsElement.top + "px";
  2657. playerinfoElement.style.top = hudElementPositions.playerinfoElement.top + "px";
  2658. performanceElement.style.top = hudElementPositions.performanceElement.top + "px";
  2659. coordElement.style.left = hudElementPositions.coordElement.left + "px";
  2660. gameInfoElement.style.left = hudElementPositions.gameInfoElement.left + "px";
  2661. playerstatsElement.style.left = hudElementPositions.playerstatsElement.left + "px";
  2662. playerinfoElement.style.left = hudElementPositions.playerinfoElement.left + "px";
  2663. performanceElement.style.left = hudElementPositions.performanceElement.left + "px";
  2664. } catch (error) {
  2665. console.error(error);
  2666. hudElementPositions = {};
  2667. hudElementPositions.coordElement = { top: coordElement.getBoundingClientRect().top, left: coordElement.getBoundingClientRect().left };
  2668. hudElementPositions.gameInfoElement = { top: gameInfoElement.getBoundingClientRect().top, left: gameInfoElement.getBoundingClientRect().left };
  2669. hudElementPositions.playerstatsElement = { top: playerstatsElement.getBoundingClientRect().top, left: playerstatsElement.getBoundingClientRect().left };
  2670. hudElementPositions.playerinfoElement = { top: playerinfoElement.getBoundingClientRect().top, left: playerinfoElement.getBoundingClientRect().left };
  2671. hudElementPositions.performanceElement = { top: performanceElement.getBoundingClientRect().top, left: performanceElement.getBoundingClientRect().left };
  2672. save("HUD-Positions", hudElementPositions);
  2673. };
  2674. };
  2675. const makeDraggable = function (element, notMenu) {
  2676. if (element) {
  2677. let offsetX, offsetY;
  2678. element.addEventListener('mousedown', function (e) {
  2679. const dragElement = function (e) {
  2680. const x = (e.clientX - offsetX) / unsafeWindow.innerWidth * 100;
  2681. const y = (e.clientY - offsetY) / unsafeWindow.innerHeight * 100;
  2682. const maxX = 100 - (element.offsetWidth / unsafeWindow.innerWidth * 100);
  2683. const maxY = 100 - (element.offsetHeight / unsafeWindow.innerHeight * 100);
  2684. element.style.left = `${Math.max(0, Math.min(x, maxX))}%`;
  2685. element.style.top = `${Math.max(0, Math.min(y, maxY))}%`;
  2686. };
  2687. if (notMenu || e.target.classList.contains('tp-rotv_t')) {
  2688. offsetX = e.clientX - element.getBoundingClientRect().left;
  2689. offsetY = e.clientY - element.getBoundingClientRect().top;
  2690. document.addEventListener('mousemove', dragElement);
  2691. document.addEventListener('mouseup', function () {
  2692. document.removeEventListener('mousemove', dragElement);
  2693. });
  2694. e.preventDefault(); // Prevent text selection during drag
  2695. };
  2696. });
  2697. };
  2698. };
  2699. const makeHudElementDragable = function (element) {
  2700. if (element.getAttribute("drag-true") != "true") {
  2701. element.addEventListener("mousedown", function (e) {
  2702. let offsetX = e.clientX - parseInt(window.getComputedStyle(this).left);
  2703. let offsetY = e.clientY - parseInt(window.getComputedStyle(this).top);
  2704. function mouseMoveHandler(e) {
  2705. let newX = e.clientX - offsetX;
  2706. let newY = e.clientY - offsetY;
  2707. if (newX >= 0 && newX + element.getBoundingClientRect().width <= window.innerWidth) {
  2708. element.style.left = newX + "px";
  2709. };
  2710. if (newY >= 0 && newY + element.getBoundingClientRect().height <= window.innerHeight) {
  2711. element.style.top = newY + "px";
  2712. };
  2713. };
  2714. function reset() {
  2715. window.removeEventListener("mousemove", mouseMoveHandler);
  2716. window.removeEventListener("mouseup", reset);
  2717. //saves new positions
  2718. hudElementPositions.coordElement = { "top": coordElement.getBoundingClientRect().top, "left": coordElement.getBoundingClientRect().left };
  2719. hudElementPositions.gameInfoElement = { "top": gameInfoElement.getBoundingClientRect().top, "left": gameInfoElement.getBoundingClientRect().left };
  2720. hudElementPositions.playerstatsElement = { "top": playerstatsElement.getBoundingClientRect().top, "left": playerstatsElement.getBoundingClientRect().left };
  2721. hudElementPositions.playerinfoElement = { "top": playerinfoElement.getBoundingClientRect().top, "left": playerinfoElement.getBoundingClientRect().left };
  2722. hudElementPositions.performanceElement = { "top": performanceElement.getBoundingClientRect().top, "left": performanceElement.getBoundingClientRect().left };
  2723. save("HUD-Positions", hudElementPositions);
  2724. };
  2725. window.addEventListener("mousemove", mouseMoveHandler);
  2726. window.addEventListener("mouseup", reset);
  2727. });
  2728. element.setAttribute("drag-true", "true");
  2729. };
  2730. };
  2731. const applyTheme = function (setTheme) {
  2732. setTheme = (setTheme || extract("themeType") || "defaultTheme");
  2733. let rootTheme
  2734. switch (setTheme) {
  2735. case ("defaultTheme"):
  2736. rootTheme = `
  2737. --tp-base-background-color: hsla(230, 7%, 17%, 1.00);
  2738. --tp-base-shadow-color: hsla(0, 0%, 0%, 0.2);
  2739. --tp-button-background-color: hsla(230, 7%, 70%, 1.00);
  2740. --tp-button-background-color-active: hsla(230, 7%, 85%, 1.00);
  2741. --tp-button-background-color-focus: hsla(230, 7%, 80%, 1.00);
  2742. --tp-button-background-color-hover: hsla(230, 7%, 75%, 1.00);
  2743. --tp-button-foreground-color: hsla(230, 7%, 17%, 1.00);
  2744. --tp-container-background-color: hsla(230, 7%, 75%, 0.10);
  2745. --tp-container-background-color-active: hsla(230, 7%, 75%, 0.25);
  2746. --tp-container-background-color-focus: hsla(230, 7%, 75%, 0.20);
  2747. --tp-container-background-color-hover: hsla(230, 7%, 75%, 0.15);
  2748. --tp-container-foreground-color: hsla(230, 7%, 75%, 1.00);
  2749. --tp-groove-foreground-color: hsla(230, 7%, 75%, 0.10);
  2750. --tp-input-background-color: hsla(230, 7%, 75%, 0.10);
  2751. --tp-input-background-color-active: hsla(230, 7%, 75%, 0.25);
  2752. --tp-input-background-color-focus: hsla(230, 7%, 75%, 0.20);
  2753. --tp-input-background-color-hover: hsla(230, 7%, 75%, 0.15);
  2754. --tp-input-foreground-color: hsla(230, 7%, 75%, 1.00);
  2755. --tp-label-foreground-color: hsla(230, 7%, 75%, 0.70);
  2756. --tp-monitor-background-color: hsla(230, 7%, 0%, 0.20);
  2757. --tp-monitor-foreground-color: hsla(230, 7%, 75%, 0.70);`; break;
  2758. case ("icebergTheme"):
  2759. rootTheme = `
  2760. --tp-base-background-color: hsla(230, 20%, 11%, 1.00);
  2761. --tp-base-shadow-color: hsla(0, 0%, 0%, 0.2);
  2762. --tp-button-background-color: hsla(230, 10%, 80%, 1.00);
  2763. --tp-button-background-color-active: hsla(230, 10%, 95%, 1.00);
  2764. --tp-button-background-color-focus: hsla(230, 10%, 90%, 1.00);
  2765. --tp-button-background-color-hover: hsla(230, 10%, 85%, 1.00);
  2766. --tp-button-foreground-color: hsla(230, 20%, 11%, 1);
  2767. --tp-container-background-color: hsla(230, 25%, 16%, 1.00);
  2768. --tp-container-background-color-active: hsla(230, 25%, 31%, 1.00);
  2769. --tp-container-background-color-focus: hsla(230, 25%, 26%, 1.00);
  2770. --tp-container-background-color-hover: hsla(230, 25%, 21%, 1.00);
  2771. --tp-container-foreground-color: hsla(230, 10%, 80%, 1.00);
  2772. --tp-groove-foreground-color: hsla(230, 20%, 8%, 1.00);
  2773. --tp-input-background-color: hsla(230, 20%, 8%, 1.00);
  2774. --tp-input-background-color-active: hsla(230, 28%, 23%, 1.00);
  2775. --tp-input-background-color-focus: hsla(230, 28%, 18%, 1.00);
  2776. --tp-input-background-color-hover: hsla(230, 20%, 13%, 1.00);
  2777. --tp-input-foreground-color: hsla(230, 10%, 80%, 1.00);
  2778. --tp-label-foreground-color: hsla(230, 12%, 48%, 1.00);
  2779. --tp-monitor-background-color: hsla(230, 20%, 8%, 1.00);
  2780. --tp-monitor-foreground-color: hsla(230, 12%, 48%, 1.00);`; break;
  2781. case ("jetblackTheme"):
  2782. rootTheme = `
  2783. --tp-base-background-color: hsla(0, 0%, 0%, 1.00);
  2784. --tp-base-shadow-color: hsla(0, 0%, 0%, 0.2);
  2785. --tp-button-background-color: hsla(0, 0%, 70%, 1.00);
  2786. --tp-button-background-color-active: hsla(0, 0%, 85%, 1);
  2787. --tp-button-background-color-focus: hsla(0, 0%, 80%, 1.00);
  2788. --tp-button-background-color-hover: hsla(0, 0%, 75%, 1.00);
  2789. --tp-button-foreground-color: hsla(0, 0%, 0%, 1.00);
  2790. --tp-container-background-color: hsla(0, 0%, 10%, 1.00);
  2791. --tp-container-background-color-active: hsla(0, 0%, 25%, 1.00);
  2792. --tp-container-background-color-focus: hsla(0, 0%, 20%, 1.00);
  2793. --tp-container-background-color-hover: hsla(0, 0%, 15%, 1.00);
  2794. --tp-container-foreground-color: hsla(0, 0%, 50%, 1.00);
  2795. --tp-groove-foreground-color: hsla(0, 0%, 10%, 1.00);
  2796. --tp-input-background-color: hsla(0, 0%, 10%, 1.00);
  2797. --tp-input-background-color-active: hsla(0, 0%, 25%, 1.00);
  2798. --tp-input-background-color-focus: hsla(0, 0%, 20%, 1.00);
  2799. --tp-input-background-color-hover: hsla(0, 0%, 15%, 1.00);
  2800. --tp-input-foreground-color: hsla(0, 0%, 70%, 1.00);
  2801. --tp-label-foreground-color: hsla(0, 0%, 50%, 1.00);
  2802. --tp-monitor-background-color: hsla(0, 0%, 8%, 1.00);
  2803. --tp-monitor-foreground-color: hsla(0, 0%, 48%, 1.00);`; break;
  2804. case ("lightTheme"):
  2805. rootTheme = `
  2806. --tp-base-background-color: hsla(230, 5%, 90%, 1.00);
  2807. --tp-base-shadow-color: hsla(0, 0%, 0%, 0.10);
  2808. --tp-button-background-color: hsla(230, 7%, 75%, 1.00);
  2809. --tp-button-background-color-active: hsla(230, 7%, 60%, 1.00);
  2810. --tp-button-background-color-focus: hsla(230, 7%, 65%, 1.00);
  2811. --tp-button-background-color-hover: hsla(230, 7%, 70%, 1.00);
  2812. --tp-button-foreground-color: hsla(230, 10%, 30%, 1.00);
  2813. --tp-container-background-color: hsla(230, 15%, 30%, 0.20);
  2814. --tp-container-background-color-active: hsla(230, 15%, 30%, 0.32);
  2815. --tp-container-background-color-focus: hsla(230, 15%, 30%, 0.28);
  2816. --tp-container-background-color-hover: hsla(230, 15%, 30%, 0.24);
  2817. --tp-container-foreground-color: hsla(230, 10%, 30%, 1.00);
  2818. --tp-groove-foreground-color: hsla(230, 15%, 30%, 0.10);
  2819. --tp-input-background-color: hsla(230, 15%, 30%, 0.10);
  2820. --tp-input-background-color-active: hsla(230, 15%, 30%, 0.22);
  2821. --tp-input-background-color-focus: hsla(230, 15%, 30%, 0.18);
  2822. --tp-input-background-color-hover: hsla(230, 15%, 30%, 0.14);
  2823. --tp-input-foreground-color: hsla(230, 10%, 30%, 1.00);
  2824. --tp-label-foreground-color: hsla(230, 10%, 30%, 0.70);
  2825. --tp-monitor-background-color: hsla(230, 15%, 30%, 0.10);
  2826. --tp-monitor-foreground-color: hsla(230, 10%, 30%, 0.50);`; break;
  2827. case ("retroTheme"):
  2828. rootTheme = `
  2829. --tp-base-background-color: hsla(40, 3%, 90%, 1.00);
  2830. --tp-base-shadow-color: hsla(0, 0%, 0%, 0.30);
  2831. --tp-button-background-color: hsla(40, 3%, 70%, 1.00);
  2832. --tp-button-background-color-active: hsla(40, 3%, 55%, 1.00);
  2833. --tp-button-background-color-focus: hsla(40, 3%, 60%, 1.00);
  2834. --tp-button-background-color-hover: hsla(40, 3%, 65%, 1.00);
  2835. --tp-button-foreground-color: hsla(40, 3%, 20%, 1.00);
  2836. --tp-container-background-color: hsla(40, 3%, 70%, 1.00);
  2837. --tp-container-background-color-active: hsla(40, 3%, 55%, 1.00);
  2838. --tp-container-background-color-focus: hsla(40, 3%, 60%, 1.00);
  2839. --tp-container-background-color-hover: hsla(40, 3%, 65%, 1.00);
  2840. --tp-container-foreground-color: hsla(40, 3%, 20%, 1.00);
  2841. --tp-groove-foreground-color: hsla(40, 3%, 40%, 1.00);
  2842. --tp-input-background-color: hsla(120, 3%, 20%, 1.00);
  2843. --tp-input-background-color-active: hsla(120, 3%, 35%, 1.00);
  2844. --tp-input-background-color-focus: hsla(120, 3%, 30%, 1.00);
  2845. --tp-input-background-color-hover: hsla(120, 3%, 25%, 1.00);
  2846. --tp-input-foreground-color: hsla(120, 40%, 60%, 1.00);
  2847. --tp-label-foreground-color: hsla(40, 3%, 50%, 1.00);
  2848. --tp-monitor-background-color: hsla(120, 3%, 20%, 1.00);
  2849. --tp-monitor-foreground-color: hsla(120, 40%, 60%, 0.80);`; break;
  2850. case ("translucentTheme"):
  2851. rootTheme = `
  2852. --tp-base-background-color: hsla(0, 0%, 10%, 0.80);
  2853. --tp-base-shadow-color: hsla(0, 0%, 0%, 0.20);
  2854. --tp-button-background-color: hsla(0, 0%, 80%, 1.00);
  2855. --tp-button-background-color-active: hsla(0, 0%, 100%, 1.00);
  2856. --tp-button-background-color-focus: hsla(0, 0%, 95%, 1.00);
  2857. --tp-button-background-color-hover: hsla(0, 0%, 85%, 1.00);
  2858. --tp-button-foreground-color: hsla(0, 0%, 0%, 0.80);
  2859. --tp-container-background-color: hsla(0, 0%, 0%, 0.30);
  2860. --tp-container-background-color-active: hsla(0, 0%, 0%, 0.60);
  2861. --tp-container-background-color-focus: hsla(0, 0%, 0%, 0.50);
  2862. --tp-container-background-color-hover: hsla(0, 0%, 0%, 0.40);
  2863. --tp-container-foreground-color: hsla(0, 0%, 100%, 0.50);
  2864. --tp-groove-foreground-color: hsla(0, 0%, 0%, 0.20);
  2865. --tp-input-background-color: hsla(0, 0%, 0%, 0.30);
  2866. --tp-input-background-color-active: hsla(0, 0%, 0%, 0.60);
  2867. --tp-input-background-color-focus: hsla(0, 0%, 0%, 0.50);
  2868. --tp-input-background-color-hover: hsla(0, 0%, 0%, 0.40);
  2869. --tp-input-foreground-color: hsla(0, 0%, 100%, 0.50);
  2870. --tp-label-foreground-color: hsla(0, 0%, 100%, 0.50);
  2871. --tp-monitor-background-color: hsla(0, 0%, 0%, 0.30);
  2872. --tp-monitor-foreground-color: hsla(0, 0%, 100%, 0.30);`; break;
  2873. case ("statefarmerTheme"):
  2874. rootTheme = `
  2875. --tp-base-background-color: hsla(0, 80%, 40%, 1.00);
  2876. --tp-base-shadow-color: hsla(0, 0%, 0%, 0.2);
  2877. --tp-button-background-color: hsla(0, 0%, 100%, 1.00);
  2878. --tp-button-background-color-active: hsla(0, 0%, 85%, 1.00);
  2879. --tp-button-background-color-focus: hsla(0, 0%, 90%, 1.00);
  2880. --tp-button-background-color-hover: hsla(0, 0%, 95%, 1.00);
  2881. --tp-button-foreground-color: hsla(230, 20%, 11%, 1.00);
  2882. --tp-container-background-color: hsla(0, 0%, 0%, 0.20);
  2883. --tp-container-background-color-active: hsla(0, 0%, 0%, 0.35);
  2884. --tp-container-background-color-focus: hsla(0, 0%, 0%, 0.30);
  2885. --tp-container-background-color-hover: hsla(0, 0%, 0%, 0.25);
  2886. --tp-container-foreground-color: hsla(0, 0%, 100%, 0.90);
  2887. --tp-groove-foreground-color: hsla(0, 0%, 0%, 0.50);
  2888. --tp-input-background-color: hsla(0, 0%, 0%, 0.50);
  2889. --tp-input-background-color-active: hsla(0, 0%, 0%, 0.65);
  2890. --tp-input-background-color-focus: hsla(0, 0%, 0%, 0.60);
  2891. --tp-input-background-color-hover: hsla(0, 0%, 0%, 0.55);
  2892. --tp-input-foreground-color: hsla(0, 0%, 100%, 0.90);
  2893. --tp-label-foreground-color: hsla(0, 0%, 100%, 0.90);
  2894. --tp-monitor-background-color: hsla(0, 0%, 0%, 0.50);
  2895. --tp-monitor-foreground-color: hsla(0, 0%, 100%, 0.50);`; break;
  2896. case ("blurpleTheme"):
  2897. rootTheme = `
  2898. --tp-base-background-color: hsla(255, 68%, 39%, 1.00);
  2899. --tp-base-shadow-color: hsla(0, 0%, 0%, 0.2);
  2900. --tp-button-background-color: hsla(0, 0%, 100%, 1.00);
  2901. --tp-button-background-color-active: hsla(0, 0%, 85%, 1.00);
  2902. --tp-button-background-color-focus: hsla(0, 0%, 90%, 1.00);
  2903. --tp-button-background-color-hover: hsla(0, 0%, 95%, 1.00);
  2904. --tp-button-foreground-color: hsla(230, 20%, 11%, 1.00);
  2905. --tp-container-background-color: hsla(0, 0%, 0%, 0.20);
  2906. --tp-container-background-color-active: hsla(0, 0%, 0%, 0.35);
  2907. --tp-container-background-color-focus: hsla(0, 0%, 0%, 0.30);
  2908. --tp-container-background-color-hover: hsla(0, 0%, 0%, 0.25);
  2909. --tp-container-foreground-color: hsla(0, 0%, 100%, 0.90);
  2910. --tp-groove-foreground-color: hsla(0, 0%, 0%, 0.50);
  2911. --tp-input-background-color: hsla(0, 0%, 0%, 0.50);
  2912. --tp-input-background-color-active: hsla(0, 0%, 0%, 0.65);
  2913. --tp-input-background-color-focus: hsla(0, 0%, 0%, 0.60);
  2914. --tp-input-background-color-hover: hsla(0, 0%, 0%, 0.55);
  2915. --tp-input-foreground-color: hsla(0, 0%, 100%, 0.90);
  2916. --tp-label-foreground-color: hsla(0, 0%, 100%, 0.90);
  2917. --tp-monitor-background-color: hsla(0, 0%, 0%, 0.50);
  2918. --tp-monitor-foreground-color: hsla(0, 0%, 100%, 0.50);`; break;
  2919. case ("shellFarmTheme"):
  2920. rootTheme = `
  2921. --tp-base-background-color: hsla(198, 100%, 50%, 1.00);
  2922. --tp-base-shadow-color: hsla(0, 0%, 0%, 0.2);
  2923. --tp-button-background-color: hsla(0, 0%, 100%, 1.00);
  2924. --tp-button-background-color-active: hsla(0, 0%, 85%, 1.00);
  2925. --tp-button-background-color-focus: hsla(0, 0%, 90%, 1.00);
  2926. --tp-button-background-color-hover: hsla(0, 0%, 95%, 1.00);
  2927. --tp-button-foreground-color: hsla(230, 20%, 11%, 1.00);
  2928. --tp-container-background-color: hsla(0, 0%, 0%, 0.20);
  2929. --tp-container-background-color-active: hsla(0, 0%, 0%, 0.35);
  2930. --tp-container-background-color-focus: hsla(0, 0%, 0%, 0.30);
  2931. --tp-container-background-color-hover: hsla(0, 0%, 0%, 0.25);
  2932. --tp-container-foreground-color: hsla(0, 0%, 100%, 0.90);
  2933. --tp-groove-foreground-color: hsla(0, 0%, 0%, 0.50);
  2934. --tp-input-background-color: hsla(0, 0%, 0%, 0.50);
  2935. --tp-input-background-color-active: hsla(0, 0%, 0%, 0.65);
  2936. --tp-input-background-color-focus: hsla(0, 0%, 0%, 0.60);
  2937. --tp-input-background-color-hover: hsla(0, 0%, 0%, 0.55);
  2938. --tp-input-foreground-color: hsla(0, 0%, 100%, 0.90);
  2939. --tp-label-foreground-color: hsla(0, 0%, 100%, 0.90);
  2940. --tp-monitor-background-color: hsla(0, 0%, 0%, 0.50);
  2941. --tp-monitor-foreground-color: hsla(0, 0%, 100%, 0.50);`; break;
  2942. };
  2943. //menu customisation (apply font, button widths, adjust checkbox right slightly, make menu appear on top, add anim to message)
  2944. const styleElement = document.createElement('style');
  2945. styleElement.textContent = `
  2946. :root { ${rootTheme} }
  2947. `;
  2948. document.head.appendChild(styleElement);
  2949. };
  2950. const temp = document.createElement('div');
  2951. temp.innerHTML = `
  2952. <style>
  2953. .notif {
  2954. position: absolute;
  2955. border: 5px solid lightblue;
  2956. left: 70%;
  2957. top: 85%;
  2958. transform: translate(-50%, -50%);
  2959. display: flex;
  2960. align-items: center;
  2961. justify-content: center;
  2962. color: #fff;
  2963. text-align: center;
  2964. background: rgba(0, 0, 0, 0.6);
  2965. font-weight: bolder;
  2966. padding: 15px;
  2967. z-index: 999999;
  2968. border-radius: 2vw;
  2969. overflow: auto;
  2970. resize: both;
  2971. backdrop-filter: blur(4px);
  2972. overflow: hidden;
  2973. min-width: 10vw;
  2974. min-height: 4vh;
  2975. pointer-events: none;
  2976. }
  2977. .MiniMap {
  2978. position: absolute;
  2979. left: 50%;
  2980. top: 50%;
  2981. transform: translate(-50%, -50%);
  2982. width: 1000px;
  2983. height:1000px;
  2984. display: flex;
  2985. align-items: center;
  2986. justify-content: center;
  2987. color: #fff;
  2988. text-align: center;
  2989. background: rgba(0, 0, 0, 0);
  2990. font-weight: bolder;
  2991. padding: 15px;
  2992. z-index: 999999;
  2993. border-radius: 2vw;
  2994. overflow: auto;
  2995. overflow: hidden;
  2996. pointer-events: none;
  2997. }
  2998. .playerDot {
  2999. position: absolute;
  3000. width: 0;
  3001. height: 0;
  3002. border-left: 10px solid transparent;
  3003. border-right: 10px solid transparent;
  3004. border-bottom: 20px solid green;
  3005. color: white;
  3006. transform: translate(-50%, -50%);
  3007. z-index: 999999;
  3008. }
  3009. </style>
  3010. <div id = "minimap" class="MiniMap"></div>
  3011. <div id = "playerDot" class="playerDot">playerdot</div>
  3012. `;
  3013. const mapEl = temp.querySelector('.MiniMap');
  3014. let myPlayerDot = temp.querySelector('.playerDot');
  3015. const playerDotsMap = new Map();
  3016. window.addEventListener('DOMContentLoaded', async function () {
  3017. while (temp.children.length > 0) {
  3018. document.body.appendChild(temp.children[0]);
  3019. }
  3020. });
  3021. function updateRadar(player, myPlayer) {
  3022. const windowWidth = window.innerWidth;
  3023. const windowHeight = window.innerHeight;
  3024. // Check if a player dot with the unique ID already exists, then do flow of control
  3025. let xPosition = (player[H.x] / 100) * windowWidth; xPosition += (windowWidth + xPosition) / 2;
  3026. let yPosition = (player[H.z] / 100) * windowHeight; yPosition += (windowHeight + yPosition) / 2;
  3027. if (!player[H.playing] || !player) {
  3028. if (playerDotsMap.has(player.uniqueId)) {
  3029. const playerDotToRemove = playerDotsMap.get(player.uniqueId);
  3030. mapEl.removeChild(playerDotToRemove); // Remove the dot from the DOM
  3031. playerDotsMap.delete(player.uniqueId); // Remove the dot from the map
  3032. };
  3033. } else if (player === myPlayer) {
  3034. myPlayerDot.style.left = `${xPosition}px`;
  3035. myPlayerDot.style.top = `${yPosition}px`;
  3036. myPlayerDot.textContent = myPlayer.name;
  3037. myPlayerDot.style.transform = 'translate(-50%, -50%) rotate(' + yawToDeg(player[H.yaw]) + 'deg)';
  3038. } else if (playerDotsMap.has(player.uniqueId)) {
  3039. // If it exists, update its position
  3040. const existingPlayerDot = playerDotsMap.get(player.uniqueId);
  3041. existingPlayerDot.style.left = `${xPosition}px`;
  3042. existingPlayerDot.style.top = `${yPosition}px`;
  3043. //existingPlayerDot.style.transform = 'translate(-50%, -50%) rotate(' + yawToDeg(player[H.yaw]) + 'deg)'; // could uncomment but then names unreadable,
  3044. } else {
  3045. // If it doesn't exist, create a new player dot element
  3046. const newPlayerDot = document.createElement('div');
  3047. newPlayerDot.className = 'playerDot';
  3048. newPlayerDot.style.border = player.team === 1 ? '5px solid blue' : '5px solid red';
  3049. newPlayerDot.style.left = `${xPosition}px`;
  3050. newPlayerDot.style.top = `${yPosition}px`;
  3051. newPlayerDot.textContent = player.name;
  3052. // append to the MiniMap element, for later purposes once we can set inside the element instead
  3053. mapEl.appendChild(newPlayerDot);
  3054. // Store in the Map
  3055. playerDotsMap.set(player.uniqueId, newPlayerDot);
  3056. };
  3057. };
  3058. function yawToDeg(yaw) {
  3059. let yaw_degrees = yaw * 180.0 / Math.PI; // conversion to degrees
  3060. if (yaw_degrees < 0) yaw_degrees += 360.0; // convert negative to positive angles
  3061. return yaw_degrees;
  3062. };
  3063. const hslToRgb = function(h, s, l) {
  3064. var r, g, b;
  3065. if (s === 0) {
  3066. r = g = b = l;
  3067. } else {
  3068. function hue2rgb(p, q, t) {
  3069. if (t < 0) t += 1;
  3070. if (t > 1) t -= 1;
  3071. if (t < 1 / 6) return p + (q - p) * 6 * t;
  3072. if (t < 1 / 2) return q;
  3073. if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
  3074. return p;
  3075. };
  3076. var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
  3077. var p = 2 * l - q;
  3078. r = hue2rgb(p, q, h + 1 / 3);
  3079. g = hue2rgb(p, q, h);
  3080. b = hue2rgb(p, q, h - 1 / 3);
  3081. };
  3082. return new L.BABYLON.Color3(r, g, b);
  3083. };
  3084. /**
  3085. *
  3086. * @param {String} colorSelectName name of the color module. Will be used for extract. EG. aimbotColor
  3087. * @param {String} isRainbowName name of the rainbow checkbox mod. Will be used for extract.
  3088. */
  3089. const getColor = function (colorSelectName, isRainbowName) {
  3090. //non rainbow
  3091. if (!extract(isRainbowName)) return extract(colorSelectName);
  3092. //rainbow
  3093. const time = Date.now();
  3094. const r = (time % 1000) / 1000;
  3095. const g = (time % 2000) / 2000;
  3096. const b = (time % 3000) / 3000;
  3097. const rS = time % 2000 < 1000 ? 1 - r : r;
  3098. const gS = time % 4000 < 2000 ? 1 - g : g;
  3099. const bS = time % 6000 < 3000 ? 1 - b : b;
  3100. const rF = Math.round(rS * 255);
  3101. const gF = Math.round(gS * 255);
  3102. const bF = Math.round(bS * 255);
  3103. //hacky bc it's prob gonna get converted back to rgb but not gonna rewrite color code................................
  3104. const componentToHex = (c) => {
  3105. var hex = c.toString(16);
  3106. return hex.length == 1 ? "0" + hex : hex;
  3107. };
  3108. const rgbToHex = (r, g, b) => {
  3109. return "#" + componentToHex(r) + componentToHex(g) + componentToHex(b);
  3110. };
  3111. return rgbToHex(rF, gF, bF);
  3112. };
  3113. const applyStateFarmLogo = function () {
  3114. if (extract("replaceLogo")) {
  3115. const images = document.getElementsByTagName('img');
  3116. let imgURL = replacementLogoURL;
  3117. const month = new Date().getMonth();
  3118. if (replacementLogoHalloweenURL && replacementLogoHalloweenURL !== "" && month == 9) imgURL = replacementLogoHalloweenURL;
  3119. if (replacementLogoChristmasURL && replacementLogoChristmasURL !== "" && month == 11) imgURL = replacementLogoChristmasURL;
  3120. if (replacementLogoNewYearsURL && replacementLogoNewYearsURL !== "" && month == 0) imgURL = replacementLogoNewYearsURL;
  3121. for (let i = 0; i < images.length; i++) {
  3122. const src = images[i].getAttribute('src');
  3123. if (src && src.includes('img/logo.svg')) {
  3124. images[i].setAttribute('src', imgURL);
  3125. };
  3126. };
  3127. const logoDiv = document.getElementById('logo');
  3128. if (logoDiv) {
  3129. const logoImg = logoDiv.querySelector('img');
  3130. if (logoImg) {
  3131. logoImg.setAttribute('src', imgURL);
  3132. logoImg.setAttribute('width', 300);
  3133. logoImg.setAttribute('height', 104);
  3134. };
  3135. };
  3136. };
  3137. };
  3138. //1337 H4X
  3139. const getSearchParam = function (param) {
  3140. const queryParams = new URLSearchParams(unsafeWindow.location.search);
  3141. return queryParams.get(param);
  3142. };
  3143. const fetchTextContent = function (url) {
  3144. try {
  3145. var xhr = new XMLHttpRequest();
  3146. xhr.open('GET', url, false);
  3147. xhr.send();
  3148. if (xhr.status === 200) {
  3149. return xhr.responseText;
  3150. } else {
  3151. console.error("Error fetching " + url);
  3152. return null;
  3153. };
  3154. } catch (err) {
  3155. return null
  3156. };
  3157. };
  3158. const findKeyByValue = function (obj, value) {
  3159. for (const key in obj) {
  3160. if (obj[key] === value) {
  3161. return key;
  3162. };
  3163. };
  3164. return null; // Return null if the value is not found
  3165. };
  3166. const newProxy = function () {
  3167. unsafeWindow.location.replace(unsafeWindow.location.href.replace(unsafeWindow.location.hostname, proxyList[3]));
  3168. };
  3169. const unban = function () {
  3170. log("STATEFARM UNBANNING...");
  3171. updateAccountRecords();
  3172. unsafeWindow.extern.signOut();
  3173. accountStatus = "logged out";
  3174. setTimeout(() => {
  3175. const banPopup = document.getElementById("bannedPopup");
  3176. if (banPopup) { banPopup.style.display = 'none' }; //hide it
  3177. }, 10000);
  3178. };
  3179. const reloadPage = function () {
  3180. unsafeWindow.location.reload(true);
  3181. };
  3182. const spamReport = function () {
  3183. (async function () {
  3184. const sleep = function (ms) {
  3185. return new Promise(resolve => setTimeout(resolve, ms));
  3186. };
  3187. let playerList = document.getElementById("playerList").children;
  3188. for (let i = 0; i < playerList.length; i++) {
  3189. playerList[i].click();
  3190. await sleep(400);
  3191. document.getElementsByClassName("ss_button btn_medium btn_red bevel_red")[0].click();
  3192. await sleep(400);
  3193. document.getElementsByClassName("ss_checkbox label")[randomInt(0, 3)].click();
  3194. await sleep(400);
  3195. document.getElementsByClassName("ss_button btn_medium btn_green bevel_green")[0].click();
  3196. await sleep(400);
  3197. document.getElementById("genericPopup").children[2].children[1].click();
  3198. };
  3199. })();
  3200. };
  3201. const broadcastToBots = function (command) {
  3202. const commandTime = Date.now();
  3203. log("StateFarm: sending command to bots:", command, "| at time:", commandTime);
  3204. GM_setValue("StateFarm_Command", command);
  3205. GM_setValue("StateFarm_CommandTime", commandTime);
  3206. };
  3207. const hexToRgb = function (hex) {
  3208. hex = hex.replace(/^#/, '');
  3209. const bigint = parseInt(hex, 16);
  3210. const r = (bigint >> 16) & 255;
  3211. const g = (bigint >> 8) & 255;
  3212. const b = bigint & 255;
  3213. return [r / 255, g / 255, b / 255];
  3214. };
  3215. const fadeBetweenColors = function (color1, color2, progress) {
  3216. const rgb1 = hexToRgb(color1);
  3217. const rgb2 = hexToRgb(color2);
  3218. const resultRgb = [
  3219. rgb1[0] + (rgb2[0] - rgb1[0]) * progress,
  3220. rgb1[1] + (rgb2[1] - rgb1[1]) * progress,
  3221. rgb1[2] + (rgb2[2] - rgb1[2]) * progress
  3222. ];
  3223. return resultRgb;
  3224. };
  3225. const distancePlayers = function (player, yMultiplier) {
  3226. if (player && player[H.actor] && player[H.actor][H.mesh]) {
  3227. yMultiplier = yMultiplier || 1;
  3228. let vector = getDirectionVectorFacingTarget(player);
  3229. return Math.hypot(vector.x, vector.y * yMultiplier, vector.z); //pythagoras' theorem in 3 dimensions. no one owns maths, zert.
  3230. } else log("fuck2", player); return 0;
  3231. };
  3232. const lerp = function (start, end, alpha) {
  3233. let value = (1 - alpha) * start + alpha * end;
  3234. return value;
  3235. };
  3236. const setPrecision = function (value) { return Math.round(value * 8192) / 8192 }; //required precision
  3237. const calculateYaw = function (pos) {
  3238. return setPrecision(Math.mod(Math.atan2(pos.x, pos.z), Math.PI2));
  3239. };
  3240. const calculatePitch = function (pos) {
  3241. return setPrecision(-Math.atan2(pos.y, Math.hypot(pos.x, pos.z)) % 1.5);
  3242. };
  3243. const getAngularDifference = function (obj1, obj2) { //this is super scuffed
  3244. return Math.abs(obj1[H.yaw] - obj2.yawReal) + Math.abs(obj1[H.pitch] - obj2.pitchReal);
  3245. };
  3246. const getDirectionVectorFacingTarget = function (target, vectorPassed, offsetY) {
  3247. if (vectorPassed || (target && target[H.actor] && target[H.actor][H.mesh])) { //in case of zizzy's weird error
  3248. target = vectorPassed ? target : target[H.actor][H.mesh].position;
  3249. offsetY = offsetY || 0;
  3250. return {
  3251. x: - (target.x - ss.MYPLAYER[H.actor][H.mesh].position.x),
  3252. y: - (target.y - ss.MYPLAYER[H.actor][H.mesh].position.y + offsetY),
  3253. z: - (target.z - ss.MYPLAYER[H.actor][H.mesh].position.z),
  3254. };
  3255. } else { //we really dont want this happening tho
  3256. log("fuck");
  3257. // log(vectorPassed);
  3258. // log(target);
  3259. // console.trace();
  3260. return {
  3261. x: 0,
  3262. y: 0,
  3263. z: 0,
  3264. };
  3265. };
  3266. };
  3267. const deg2rad = function (deg) {
  3268. return deg * (Math.PI / 180);
  3269. };
  3270. const reverseString = function (str) { return str.split("").reverse().join("") };
  3271. const isPartialMatch = function (array, searchString) {
  3272. return array.some(item => item !== "" && searchString.toLowerCase().includes(item.toLowerCase()));
  3273. };
  3274. const findBadgesForUsername = function(username) {
  3275. let found = [];
  3276. if (badgeList && username) {
  3277. username = username.toLowerCase().replaceAll("_","").replaceAll(" ","");
  3278. for (const [key, userList] of Object.entries(badgeList)) {
  3279. for (const user of userList) {
  3280. if (username.includes(user.toLowerCase())) {
  3281. found.push(key);
  3282. };
  3283. };
  3284. };
  3285. };
  3286. return found;
  3287. };
  3288. const playAudio = function (name, panner, contextName) {
  3289. contextName = findStringInLists(divertContexts, name) || "OTHER"+randomInt(1,9)
  3290. let audioContext;
  3291. audioContext = audioContexts[contextName];
  3292. let source = audioContext.createBufferSource();
  3293. source.buffer = soundsSFC[name];
  3294. const newPanner = audioContext.createPanner();
  3295. audioContext.listener.setPosition(0, 0, 0);
  3296. if (panner) {
  3297. newPanner.context.listener.setPosition(panner.context.listener.positionX.value, panner.context.listener.positionY.value, panner.context.listener.positionZ.value);
  3298. newPanner.setPosition(
  3299. panner.context.listener.positionX.value - ((panner.context.listener.positionX.value - panner.positionX.value) * extract("distanceMult")),
  3300. panner.context.listener.positionY.value - ((panner.context.listener.positionY.value - panner.positionY.value) * extract("distanceMult")),
  3301. panner.context.listener.positionZ.value - ((panner.context.listener.positionZ.value - panner.positionZ.value) * extract("distanceMult")),
  3302. );
  3303. newPanner.setOrientation(panner.orientationX.value, panner.orientationY.value, panner.orientationZ.value);
  3304. newPanner.refDistance = panner.refDistance;
  3305. newPanner.maxDistance = panner.maxDistance;
  3306. newPanner.rolloffFactor = panner.rolloffFactor;
  3307. newPanner.coneInnerAngle = panner.coneInnerAngle;
  3308. newPanner.coneOuterAngle = panner.coneOuterAngle;
  3309. newPanner.coneOuterGain = panner.coneOuterGain;
  3310. };
  3311. if (audioContext.state === 'suspended') {
  3312. audioContext.resume();
  3313. };
  3314. // log(contextName);
  3315. source.connect(newPanner);
  3316. newPanner.connect(audioContext.destination);
  3317. source.start();
  3318. };
  3319. const playerMatchesList = function (array, player) {
  3320. let nameMatched = isPartialMatch(array, player.name);
  3321. let idMatched = isPartialMatch(array, player.uniqueId);
  3322. return nameMatched || idMatched;
  3323. };
  3324. const randomInt = function (min, max) {
  3325. return Math.floor(Math.random() * (max - min + 1)) + min;
  3326. };
  3327. const radianAngleDiff = function (angle1, angle2) {
  3328. const fullCircle = 2 * Math.PI;
  3329. // Normalize angles to be within [0, 2π)
  3330. angle1 = (angle1 % fullCircle + fullCircle) % fullCircle;
  3331. angle2 = (angle2 % fullCircle + fullCircle) % fullCircle;
  3332. // Find the absolute angular difference
  3333. let diff = Math.abs(angle1 - angle2);
  3334. // Ensure the difference is within [0, π)
  3335. diff = Math.min(diff, fullCircle - diff);
  3336. // Determine the sign of the difference correctly
  3337. if ((angle1 - angle2 + fullCircle) % fullCircle > Math.PI) {
  3338. return -diff;
  3339. } else {
  3340. return diff;
  3341. };
  3342. };
  3343. clientID = (getScrambled() + "noID");
  3344. const createAnonFunction = function (name, func) {
  3345. const funcName = getScrambled();
  3346. unsafeWindow[funcName] = func;
  3347. unsafeWindow[funcName] = function () {
  3348. try {
  3349. return func.apply(this, arguments);
  3350. } catch (error) {
  3351. log("Error in anonymous function:", error);
  3352. }
  3353. };
  3354. F[name] = unsafeWindow[funcName];
  3355. functionNames[name] = funcName
  3356. };
  3357. const processChatItem = function (text, playerName, playerTeam, highlightColor) {
  3358. let chatItem = document.createElement("div");
  3359. let playerNameSpan = document.createElement("span");
  3360. let playerInfoContainer = document.createElement("div");
  3361. let serverIcon = document.createElement("i");
  3362. chatItem.classList.add("chat-item");
  3363. playerInfoContainer.style.display = "inline-block";
  3364. playerNameSpan.classList.add("chat-player-name", "ss_marginright_xs");
  3365. playerNameSpan.textContent = playerName + " ";
  3366. playerInfoContainer.style.color = ss.teamColors.text[playerTeam];
  3367. playerInfoContainer.appendChild(serverIcon);
  3368. playerInfoContainer.appendChild(playerNameSpan);
  3369. let messageSpan = document.createElement("span");
  3370. messageSpan.innerHTML = text;
  3371. chatItem.style.fontStyle = "italic";
  3372. messageSpan.style.backgroundColor = highlightColor;
  3373. playerInfoContainer.style.backgroundColor = highlightColor;
  3374. chatItem.appendChild(playerInfoContainer);
  3375. chatItem.appendChild(messageSpan);
  3376. document.getElementById("chatOut").appendChild(chatItem);
  3377. if (document.querySelector(".chat-container")) {
  3378. document.querySelector(".chat-container").scrollTop = document.querySelector(".chat-container").scrollHeight;
  3379. };
  3380. };
  3381. var vertexVector1, vertexVector2, vertexVector3, vertexVector4, vertexVector5, vertexVector6, vertexVector7, vertexVector8;
  3382. const updateOrCreateLinesESP = function (object, type, color) {
  3383. let newPosition, newScene, newParent
  3384. if (type == "playerESP") {
  3385. newPosition = object[H.actor][H.mesh].position;
  3386. newScene = object[H.actor].scene;
  3387. newParent = object[H.actor][H.mesh];
  3388. } else if (type == "pPredESP") { //objects will be player.pred, object of BABYLON.TransformNode. https://doc.babylonjs.com/typedoc/classes/BABYLON.TransformNode
  3389. newPosition = object.getAbsolutePosition(); //we now use the TN's absolutePosition instead of an own var. It's just cleaner this way imo
  3390. newScene = object.getScene(); //getters, yummy
  3391. newParent = object; //will be the TransformNode stored in player.pred, so we can keep this as parent.
  3392. } else {
  3393. newPosition = object.position;
  3394. newScene = object._scene;
  3395. newParent = object;
  3396. };
  3397. if (!object.generatedESP) {
  3398. //tracers
  3399. const tracerLines = L.BABYLON.MeshBuilder.CreateLines("tracerLines", { points: [newPosition, crosshairsPosition] }, newScene);
  3400. tracerLines.color = new L.BABYLON.Color3(1, 1, 1);
  3401. tracerLines.renderingGroupId = 1;
  3402. object.tracerLines = tracerLines;
  3403. //ESP
  3404. //FUCK WIREFRAME BOXES! LIBERTYMUTUAL dictates we making our own MANUALLY bitch! to hell with those diagonal lines
  3405. const boxSize = {
  3406. playerESP: { width: 0.5, height: 0.75, depth: 0.5 },
  3407. pPredESP: { width: 0.5, height: 0.75, depth: 0.5 },
  3408. ammoESP: { width: 0.25, height: 0.35, depth: 0.25 },
  3409. };
  3410. const boxOffset = {
  3411. playerESP: 0,
  3412. pPredESP: 0,
  3413. ammoESP: -0.05,
  3414. };
  3415. vertexVector1 = vertexVector1 || new L.BABYLON.Vector3(0, 0, 0);
  3416. vertexVector1.x = -boxSize[type].width / 2; vertexVector1.y = boxOffset[type]; vertexVector1.z = -boxSize[type].depth / 2;
  3417. vertexVector2 = vertexVector2 || new L.BABYLON.Vector3(0, 0, 0);
  3418. vertexVector2.x = boxSize[type].width / 2; vertexVector2.y = boxOffset[type]; vertexVector2.z = -boxSize[type].depth / 2;
  3419. vertexVector3 = vertexVector3 || new L.BABYLON.Vector3(0, 0, 0);
  3420. vertexVector3.x = boxSize[type].width / 2; vertexVector3.y = boxOffset[type] + boxSize[type].height; vertexVector3.z = -boxSize[type].depth / 2;
  3421. vertexVector4 = vertexVector4 || new L.BABYLON.Vector3(0, 0, 0);
  3422. vertexVector4.x = -boxSize[type].width / 2; vertexVector4.y = boxOffset[type] + boxSize[type].height; vertexVector4.z = -boxSize[type].depth / 2;
  3423. vertexVector5 = vertexVector5 || new L.BABYLON.Vector3(0, 0, 0);
  3424. vertexVector5.x = -boxSize[type].width / 2; vertexVector5.y = boxOffset[type]; vertexVector5.z = boxSize[type].depth / 2;
  3425. vertexVector6 = vertexVector6 || new L.BABYLON.Vector3(0, 0, 0);
  3426. vertexVector6.x = boxSize[type].width / 2; vertexVector6.y = boxOffset[type]; vertexVector6.z = boxSize[type].depth / 2;
  3427. vertexVector7 = vertexVector7 || new L.BABYLON.Vector3(0, 0, 0);
  3428. vertexVector7.x = boxSize[type].width / 2; vertexVector7.y = boxOffset[type] + boxSize[type].height; vertexVector7.z = boxSize[type].depth / 2;
  3429. vertexVector8 = vertexVector8 || new L.BABYLON.Vector3(0, 0, 0);
  3430. vertexVector8.x = -boxSize[type].width / 2; vertexVector8.y = boxOffset[type] + boxSize[type].height; vertexVector8.z = boxSize[type].depth / 2;
  3431. const vertices = [
  3432. vertexVector1,
  3433. vertexVector2,
  3434. vertexVector3,
  3435. vertexVector4,
  3436. vertexVector5,
  3437. vertexVector6,
  3438. vertexVector7,
  3439. vertexVector8
  3440. ];
  3441. const lines = [];
  3442. for (let i = 0; i < 4; i++) {
  3443. lines.push([vertices[i], vertices[(i + 1) % 4]]);
  3444. lines.push([vertices[i + 4], vertices[(i + 1) % 4 + 4]]);
  3445. lines.push([vertices[i], vertices[i + 4]]);
  3446. };
  3447. const box = L.BABYLON.MeshBuilder.CreateLineSystem(getScrambled(), { lines }, newScene);
  3448. box.color = new L.BABYLON.Color3(1, 1, 1);
  3449. box.position.y = boxOffset[type];
  3450. box.renderingGroupId = 1;
  3451. box.parent = newParent;
  3452. object.box = box;
  3453. /*
  3454. //TARGETS
  3455. let target;
  3456. if (type == "playerESP") {
  3457. target = L.BABYLON.MeshBuilder.CreateSphere(getScrambled(), { diameter: 0.05 }, newScene);
  3458. target.material = new L.BABYLON.StandardMaterial(getScrambled(), newScene);
  3459. target.material.diffuseColor = new L.BABYLON.Color3(1, 0, 0);
  3460. target.material.alpha = 0.5;
  3461. target.position.y = 0.3;
  3462. target.renderingGroupId = 1;
  3463. target.parent = newParent;
  3464. object.target = target;
  3465. };
  3466. */
  3467. /*---fwltv2---*/
  3468. if (type == "playerESP"){
  3469. //create line. other shit later
  3470. const l = L.BABYLON.MeshBuilder.CreateLines(getScrambled(),{points: [new L.BABYLON.Vector3(0, 0, 0),new L.BABYLON.Vector3(0, 0, 0)]}, newScene); //empty lines. will be edited l8er
  3471. //l.renderingGroupId = 1;
  3472. object.lookDirLine = l;
  3473. //line will be updated every call, not just creation. I hate this but fuck you
  3474. }
  3475. /*----------------------*/
  3476. //stuff
  3477. object.generatedESP = true;
  3478. ESPArray.push([object, tracerLines, box, object.lookDirLine]); //, target
  3479. };
  3480. if (object.lookDirLine && (extract("lookTracers") || extract("aimbotTargetMode") === "aimingAt")){ //no need to update if module disabled. Raycasts aren't the best thing to run every frame without any use...
  3481. const TRACE_LENGTH_MULTIPLIER = 75; //how long is the trace max?
  3482. const playerEye = object[H.actor].eye; // BABYLON.TransformNode (https://doc.babylonjs.com/typedoc/classes/BABYLON.TransformNode). TN of the "eye", as shell calls it. Basically camera pos.
  3483. let conclusion /*:trol:*/ = playerEye.forward.clone(); // BABYLON.Vector3 (https://doc.babylonjs.com/typedoc/classes/BABYLON.Vector3). this vector is NORMALIZED
  3484. conclusion= conclusion.scale(TRACE_LENGTH_MULTIPLIER); //scale by the multiplier to extend the normalized vector. TODO: make multiplier customizable by USER
  3485. conclusion= conclusion.add(playerEye.absolutePosition); //add pos so we are relative to eye
  3486. //RAYCAST
  3487. const rayToGround = ss.RAYS[H.rayCollidesWithMap](object[H.actor].eye.absolutePosition, conclusion, ss.RAYS.grenadeCollidesWithCell); //does player look at object, if yes, where?
  3488. const g = playerEye.absolutePosition; //easier access
  3489. // console.log("RAYCAST", g, g.x, g._x)
  3490. if(rayToGround){
  3491. object.lookDirLine.setVerticesData(L.BABYLON.VertexBuffer.PositionKind, [g.x, g.y, g.z, rayToGround.pick.pickedPoint.x, rayToGround.pick.pickedPoint.y, rayToGround.pick.pickedPoint.z]);
  3492. //set line to correct points, with the map collision as endpoint
  3493. }
  3494. if(!rayToGround){
  3495. const f = conclusion;//easier acess
  3496. object.lookDirLine.setVerticesData(L.BABYLON.VertexBuffer.PositionKind, [g.x, g.y, g.z, f.x, f.y, f.z]);
  3497. //set line to correct points, with the max dist scaled dirVec3 as endpoint
  3498. }
  3499. if (object && (object !== ss.MYPLAYER) && object[H.playing] && (object[H.hp] > 0) && ((!ss.MYPLAYER.team) || (object.team !== ss.MYPLAYER.team))) {
  3500. object.lookLineData = object.lookDirLine.getVerticesData(L.BABYLON.VertexBuffer.PositionKind);//error here only works in teams, fix
  3501. };
  3502. object.lookDirLine.color = new L.BABYLON.Color3(...hexToRgb(extract("lookTracersColor"))); //updaté line colo(u)r
  3503. object.lookDirLine.renderingGroupId = extract("lookTracersRGI1")? 1 : 0; //render in front shell?
  3504. //I dont really like the implementation without parenting, but IDK how the fuck bab's parenting system works and we need to update anyway. :/
  3505. }
  3506. object.tracerLines.setVerticesData(L.BABYLON.VertexBuffer.PositionKind, [crosshairsPosition.x, crosshairsPosition.y, crosshairsPosition.z, newPosition.x, newPosition.y, newPosition.z]);
  3507. object.tracerLines.color = new L.BABYLON.Color3(...color);
  3508. object.box.color = new L.BABYLON.Color3(...color);
  3509. };
  3510. const obfuscateEmail = function(email) {
  3511. const parts = email.split('@');
  3512. const modifiedFirstPart = parts[0].substring(0, 1) +
  3513. parts[0].substring(1, parts[0].length - 1).replace(/./g, '*') +
  3514. parts[0].substring(parts[0].length - 1);
  3515. return modifiedFirstPart + '@' + parts[1];
  3516. };
  3517. const updateAccountRecords = function(key, value) {
  3518. let currentEmail = load("MostRecentEmail");
  3519. let maskedEmail = unsafeWindow.extern.account.maskedEmail;
  3520. if (currentEmail && obfuscateEmail(currentEmail) == maskedEmail) {
  3521. log("no change in email");
  3522. //do nothing i guess. its good.
  3523. } else {
  3524. log("not using obfuscated email (sadly)");
  3525. currentEmail = maskedEmail; //better than nothing, eh? :<
  3526. };
  3527. log("the email is:", currentEmail);
  3528. let accountRecords = GM_getValue("StateFarm_AccountRecords") || {};
  3529. let tierCache = GM_getValue("StateFarm_TierCache") || {};
  3530. let accountDetails = accountRecords[currentEmail] || {};
  3531. accountDetails.inventory = JSON.parse(JSON.stringify(unsafeWindow.extern.account.inventory));
  3532. accountDetails.eggCount = unsafeWindow.extern.account.currentBalance;
  3533. delete accountDetails.inventoryWorth;
  3534. accountDetails.dateCreated = unsafeWindow.extern.account.dateCreated;
  3535. accountDetails.eggsSpent = unsafeWindow.extern.account.eggsSpent;
  3536. accountDetails.totalWorth = accountDetails.eggCount + accountDetails.eggsSpent;
  3537. accountDetails.inventoryList = [];
  3538. accountDetails.inventory.forEach(item => {
  3539. let itemName = item.name;
  3540. if (tierCache[itemName] !== undefined) itemName = itemName+" [T"+tierCache[itemName]+"]";
  3541. accountDetails.inventoryList.push(itemName);
  3542. });
  3543. if (key && value) {
  3544. accountDetails[key] = value;
  3545. };
  3546. accountRecords[currentEmail] = accountDetails;
  3547. GM_setValue("StateFarm_AccountRecords", accountRecords);
  3548. };
  3549. const getRoomAsString = function () {
  3550. return findKeyByValue(unsafeWindow.extern.GameType, unsafeWindow.vueApp.game.gameType) + ", " + unsafeWindow.vueData.currentRegionId + ", " + unsafeWindow.vueApp.game.mapName + ", team" + unsafeWindow.vueApp.game.team;
  3551. };
  3552. const every15Seconds = function () {
  3553. //i forgot myself what this is for
  3554. // if (extract("debug")) log("goodness", extract("antiAFK"), extern.inGame, (document.getElementById("spectate").style.display == "none"), ss, ss.MYPLAYER, ss.MYPLAYER.ws, (!ss.MYPLAYER[H.playing]));
  3555. if (extract("antiAFK") && extern.inGame && (document.getElementById("spectate").style.display == "none") && ss && ss.MYPLAYER && ss.MYPLAYER.ws && (!ss.MYPLAYER[H.playing])) {
  3556. if (extract("debug")) log("lets'r try'r to keep alive'r");
  3557. let out = ss.commOut.getBuffer();
  3558. out.packInt8(ss.SERVERCODES.keepAlive);
  3559. out.send(ss.MYPLAYER.ws);
  3560. };
  3561. };
  3562. const everySecond = function () {
  3563. let oldMonitorObjects = JSON.parse(JSON.stringify(monitorObjects));
  3564. if (extract("debug")) {
  3565. unsafeWindow.globalSS = {};
  3566. unsafeWindow.globalSS.ss = ss;
  3567. unsafeWindow.globalSS.H = H;
  3568. unsafeWindow.globalSS.F = F;
  3569. unsafeWindow.globalSS.L = L;
  3570. unsafeWindow.globalSS.tp = tp;
  3571. unsafeWindow.globalSS.initMenu = initMenu;
  3572. unsafeWindow.globalSS.extractAsDropdownInt = extractAsDropdownInt;
  3573. unsafeWindow.globalSS.extract = extract;
  3574. unsafeWindow.globalSS.extractDropdownList = extractDropdownList;
  3575. unsafeWindow.globalSS.save = save;
  3576. unsafeWindow.globalSS.load = load;
  3577. unsafeWindow.globalSS.GM_listValues = GM_listValues;
  3578. unsafeWindow.globalSS.GM_getValue = GM_getValue;
  3579. unsafeWindow.globalSS.GM_setValue = GM_setValue;
  3580. unsafeWindow.globalSS.GM = GM;
  3581. unsafeWindow.globalSS.crackedShell = crackedShell;
  3582. unsafeWindow.globalSS.createPopup = createPopup;
  3583. unsafeWindow.globalSS.createPrompt = createPrompt;
  3584. unsafeWindow.globalSS.remove = remove;
  3585. unsafeWindow.globalSS.change = change;
  3586. unsafeWindow.globalSS.unban = unban;
  3587. if (typeof GM_info !== 'undefined') unsafeWindow.globalSS.GM_info = GM_info;
  3588. unsafeWindow.globalSS.getScrambled = getScrambled;
  3589. unsafeWindow.globalSS.soundsSFC = soundsSFC;
  3590. unsafeWindow.globalSS.accountStatus = accountStatus;
  3591. unsafeWindow.globalSS.cachedRealData = cachedRealData;
  3592. unsafeWindow.globalSS.retrievedSFX = retrievedSFX;
  3593. unsafeWindow.globalSS.findBadgesForUsername = findBadgesForUsername;
  3594. unsafeWindow.globalSS.badgeList = badgeList;
  3595. unsafeWindow.globalSS.crosshairsPosition = crosshairsPosition;
  3596. unsafeWindow.globalSS.predictGrenade = predictGrenade;
  3597. unsafeWindow.globalSS.miniCamera = miniCamera;
  3598. unsafeWindow.globalSS.configMain = configMain;
  3599. unsafeWindow.globalSS.configBots = configBots;
  3600. unsafeWindow.globalSS.predictBloom = predictBloom;
  3601. // unsafeWindow.globalSS.pathfindingInfo = {
  3602. // activePath: activePath,
  3603. // pathfindingTargetOverride: pathfindingTargetOverride,
  3604. // activePath: activePath,
  3605. // activeNodeTarget: activeNodeTarget,
  3606. // mapNodes: GLOBAL_NODE_LIST,
  3607. // };
  3608. };
  3609. save("DisableLogs", extract("consoleLogs"));
  3610. if (extract('sfChatAutoStart') && !sfChatContainer){
  3611. startStateFarmChat(true);
  3612. };
  3613. startUpComplete = (!document.getElementById("progressBar"));
  3614. let botsDict = GM_getValue("StateFarm_BotStatus");
  3615. sfChatUsernameSet();
  3616. if (!botsDict) botsDict = {};
  3617. if (AUTOMATED) {
  3618. if (clientID) {
  3619. const autoLeave = extract("autoLeave") ? " AL: " + Math.round(((timeJoinedGame + (1000 * extract("autoLeaveDelay"))) - Date.now()) / 100) / 10 : "";
  3620. const newArray = {
  3621. noConfig: ((botsDict[clientID] && configNotSet) ? (
  3622. (botsDict[clientID].noConfig > Date.now()) ? botsDict[clientID].noConfig : Date.now()
  3623. ) : 0),
  3624. username: ((ss && ss.MYPLAYER && ss.MYPLAYER.name) || (unsafeWindow.vueApp.playerName)),
  3625. uniqueId: ((ss && ss.MYPLAYER && ss.MYPLAYER.uniqueId) || "value_undefined"),
  3626. startTime: startTime,
  3627. timecode: Date.now(),
  3628. status: ((isBanned && "banned") ||
  3629. (unsafeWindow.extern.inGame && (((ss.MYPLAYER && ss.MYPLAYER[H.playing]) ? "playing " : (unsafeWindow.vueApp.game.respawnTime + "s cooldown ")) + GAMECODE + autoLeave + " (" + getRoomAsString() + ")")) ||
  3630. (errorString || "idle")),
  3631. };
  3632. delete botsDict[clientID];
  3633. clientID = (unsafeWindow.vueData.firebaseId || clientID);
  3634. botsDict[clientID] = newArray;
  3635. };
  3636. if (attemptedInjection && automatedBorder && automatedBorder.style && automatedBorder.style.borderColor == "rgb(255, 0, 0)") {
  3637. automatedBorder.style.borderColor = 'rgba(0, 255, 0, 1)';
  3638. };
  3639. } else {
  3640. let oldBlacklist = botBlacklist;
  3641. botBlacklist = "";
  3642. let oldWhitelist = botWhitelist;
  3643. botWhitelist = "";
  3644. if (extract("botNoKillMe")) {
  3645. botBlacklist += botBlacklist + ((ss && ss.MYPLAYER && ss.MYPLAYER.uniqueId) || "value_undefined") + ",";
  3646. };
  3647. if (extract("botFollowMe")) {
  3648. botWhitelist += botWhitelist + ((ss && ss.MYPLAYER && ss.MYPLAYER.uniqueId) || "value_undefined") + ",";
  3649. };
  3650. monitorObjects.botOnline = "";
  3651. amountOnline = 0;
  3652. const botsArray = Object.keys(botsDict).sort();
  3653. for (let i in botsArray) {
  3654. if (i !== "shallowClone") {
  3655. i = Number(i);
  3656. const botID = botsArray[i];
  3657. const data = botsDict[botID];
  3658. if (data.noConfig) {
  3659. updateBotParams();
  3660. botsDict[botID].noConfig = Date.now() + 5000;
  3661. };
  3662. if (extract("botNoKillBots") && data.uniqueId !== "value_undefined") {
  3663. botBlacklist += data.uniqueId + ",";
  3664. };
  3665. if (extract("botFollowBots") && data.uniqueId !== "value_undefined") {
  3666. botWhitelist += data.uniqueId + ",";
  3667. };
  3668. if ((data.timecode + 10000) < Date.now()) { //give up on this bot lmao
  3669. delete botsDict[botID];
  3670. } else if ((data.timecode + 4000) < Date.now()) { //maybe it will come back
  3671. botsDict[botID].status = "not responding " + (Date.now() - data.timecode) + "ms elapsed";
  3672. }; //bot is doing fine... hopefully
  3673. amountOnline += 1;
  3674. monitorObjects.botOnline = monitorObjects.botOnline + "\n" + data.username + " [..." + botID.slice(-4) + "]: " + data.status;
  3675. };
  3676. };
  3677. if (oldBlacklist !== botBlacklist) {
  3678. log("old:", oldBlacklist, "new:", botBlacklist);
  3679. updateBotParams();
  3680. };
  3681. if (oldWhitelist !== botWhitelist) {
  3682. log("old:", oldWhitelist, "new:", botWhitelist);
  3683. updateBotParams();
  3684. };
  3685. monitorObjects.botOnline = ((amountOnline) + " bots online.") + monitorObjects.botOnline;
  3686. };
  3687. GM_setValue("StateFarm_BotStatus", botsDict);
  3688. allFolders.forEach(function (name) {
  3689. save(name, tp[name].expanded);
  3690. });
  3691. coordElement.style.display = "none";
  3692. gameInfoElement.style.display = "none";
  3693. playerstatsElement.style.display = "none";
  3694. playerinfoElement.style.display = "none";
  3695. redCircle.style.display = "none";
  3696. performanceElement.style.display = "none";
  3697. firstUseElement.style.display = "none";
  3698. makeHudElementDragable(coordElement);
  3699. makeHudElementDragable(gameInfoElement);
  3700. makeHudElementDragable(playerstatsElement);
  3701. makeHudElementDragable(playerinfoElement);
  3702. makeHudElementDragable(performanceElement);
  3703. if (extract("gameBlacklistCodes") != "" && extract("gameBlacklistCodes") != undefined) {
  3704. let input = extract("gameBlacklistCodes");
  3705. input = input.split(",");
  3706. input.forEach(function (code) {
  3707. if (code != "" && code.length == 14) {
  3708. blacklistedGameCodes.push(code);
  3709. }
  3710. });
  3711. };
  3712. if (extract("noAnnoyances") && !annoyancesRemoved) {
  3713. const styleElement = document.createElement('style');
  3714. styleElement.textContent = `
  3715. /* remove ads because annoying stop adding spyware yarg */
  3716. .house-small,
  3717. #big-house-ad,
  3718. .house-ad-wrapper,
  3719. .display-ad-container,
  3720. .respawn-one,
  3721. .respawn-two,
  3722. #ShellShockers_LoadingScreen_HouseAds,
  3723. #display-ad-header-home,
  3724. .display-ad-header-home,
  3725. #display-ad-header-equip,
  3726. #shellshockers_respawn_banner_3_ad {
  3727. display: none;
  3728. }
  3729. `;
  3730. document.head.appendChild(styleElement);
  3731. annoyancesRemoved = true;
  3732. };
  3733. async function unzip(arrayBuffer) {
  3734. const dataView = new DataView(arrayBuffer);
  3735. let offset = 0;
  3736. const files = {};
  3737. while (offset < dataView.byteLength) {
  3738. if (dataView.getUint32(offset, true) !== 0x04034b50) {
  3739. console.log("ZIP header not found at offset (ZIP has likely ended):", offset);
  3740. break;
  3741. }
  3742. const fileNameLength = dataView.getUint16(offset + 26, true);
  3743. const fileName = new TextDecoder().decode(new Uint8Array(arrayBuffer, offset + 30, fileNameLength));
  3744. const compressedSize = dataView.getUint32(offset + 18, true);
  3745. const compressionMethod = dataView.getUint16(offset + 8, true);
  3746. offset += 30 + fileNameLength;
  3747. const compressedData = new Uint8Array(arrayBuffer, offset, compressedSize);
  3748. if (compressionMethod === 0) {
  3749. files[fileName] = compressedData;
  3750. } else if (compressionMethod === 8) {
  3751. try {
  3752. const stream = new Response(compressedData).body.pipeThrough(new DecompressionStream("deflate-raw"));
  3753. const decompressed = await new Response(stream).arrayBuffer();
  3754. files[fileName] = decompressed;
  3755. } catch (error) {
  3756. console.error("Decompression failed:", error);
  3757. }
  3758. } else {
  3759. console.warn("Unsupported compression method:", compressionMethod);
  3760. }
  3761. console.log("Extracted:", fileName);
  3762. offset += compressedSize;
  3763. }
  3764. console.log('finished unzipping :v')
  3765. return files;
  3766. }
  3767. const fetchAndProcessAudioFromZip = async function (zipURL) {
  3768. try {
  3769. const response = await fetch(zipURL);
  3770. if (!response.ok) throw new Error('Failed to fetch ZIP:', response.statusText);
  3771. const arrayBuffer = await response.arrayBuffer();
  3772. const files = await unzip(arrayBuffer);
  3773. console.log('finished files', files);
  3774. const mp3Files = Object.keys(files).filter(f => f.endsWith('.mp3'));
  3775. const jsonFiles = Object.keys(files).filter(f => f.endsWith('.json'));
  3776. let config = {};
  3777. if (jsonFiles.length > 0) {
  3778. config = JSON.parse(new TextDecoder().decode(files[jsonFiles[0]]));
  3779. }
  3780. let loadedCount = 0;
  3781. const totalRequests = mp3Files.length + jsonFiles.length;
  3782. for (const fileName of mp3Files) {
  3783. const fileData = files[fileName];
  3784. const audioBuffer = await audioContexts.SOUNDS.decodeAudioData(fileData);
  3785. const key = fileName.replace('.mp3', '');
  3786. audioBuffer.disablePanning = !!config.disablePanning;
  3787. soundsSFC[key] = audioBuffer;
  3788. log("Loaded sound for:", key);
  3789. loadedCount++;
  3790. if (loadedCount === totalRequests) {
  3791. createPopup("Loaded Custom SFX!", "success");
  3792. log("LOADED!");
  3793. }
  3794. }
  3795. } catch (error) {
  3796. console.error('Error fetching/decoding audio from ZIP:', error);
  3797. };
  3798. };
  3799. let customSFXConfig = `${extract("customSFX1")}+${extract("customSFX2")}+${extract("customSFX3")}`;
  3800. if (initialisedCustomSFX !== customSFXConfig) {
  3801. initialisedCustomSFX = customSFXConfig;
  3802. log("STARTING TO LOAD CUSTOM SFX...", initialisedCustomSFX);
  3803. soundsSFC = {};
  3804. if (extract("customSFX3") !== true && extract("customSFX3") !== "default") { //wa wa wa repeated code YOU FUNCTION IT THEN I DONT CARE!!!!! -onlypuppy7
  3805. createPopup("Loading Custom SFX...");
  3806. fetchAndProcessAudioFromZip(atob(extract("customSFX3")));
  3807. };
  3808. if (extract("customSFX2") !== true && extract("customSFX2") !== "default") {
  3809. createPopup("Loading Custom SFX...");
  3810. fetchAndProcessAudioFromZip(atob(extract("customSFX2")));
  3811. };
  3812. if (extract("customSFX1") !== true && extract("customSFX1") !== "default") {
  3813. createPopup("Loading Custom SFX...");
  3814. fetchAndProcessAudioFromZip(atob(extract("customSFX1")));
  3815. };
  3816. };
  3817. if (startUpComplete && ss && ss.MYPLAYER && unsafeWindow.extern.inGame) {
  3818. if (extract("mockMode")) {
  3819. let textAfterLastColon = document.getElementById("chatOut").children[document.getElementById("chatOut").children.length - 1].children[1].textContent;
  3820. let chatName = document.getElementById("chatOut").children[document.getElementById("chatOut").children.length - 1].children[0].textContent.slice(0, -2);
  3821. // log("Chat Name:", chatName);
  3822. if (chatName && chatName !== username && textAfterLastColon !== "joined." && textAfterLastColon !== "left." && !handleChat(textAfterLastColon) && !extract("mockModeNoRePeat")) {
  3823. sendChatMessage(textAfterLastColon);
  3824. }; //mockMode, this will copy and send the chat into message when joining, but doesn't show to other players, so it's fine. solvable with an if statement bool
  3825. };
  3826. // if (extract("antiAFK")) {
  3827. // if (Date.now() > (lastAntiAFKMessage + 270000)) {
  3828. // if (sendChatMessage(antiAFKString + filteredList[randomInt(0, filteredList.length - 1)])) {
  3829. // lastAntiAFKMessage = Date.now();
  3830. // };
  3831. // };
  3832. // };
  3833. if (extract("gameInfo")) {
  3834. let gameInfoText = GAMECODE + " | " + playersInGame + "/18 | " + (18 - playersInGame) + " slots remaining. | Server: " + unsafeWindow.vueData.currentRegionId + " | Gamemode: " + findKeyByValue(unsafeWindow.extern.GameType, unsafeWindow.vueApp.game.gameType) + " | Map: " + unsafeWindow.vueApp.game.mapName + " | Time in game: " + (Math.floor((Date.now() - timeJoinedGame) / 1000)) + "s" + (extract("autoLeave") ? " | AutoLeave: " + (Math.ceil(((timeJoinedGame + (1000 * extract("autoLeaveDelay"))) - Date.now()) / 1000)) + "s" : "");
  3835. gameInfoElement.innerText = gameInfoText;
  3836. void gameInfoElement.offsetWidth;
  3837. gameInfoElement.style.display = '';
  3838. };
  3839. if (extract("leaveEmpty")) {
  3840. if (playersInGame == 1 || playersInGame == 2) { //if literally empty or there is one person remaining
  3841. createPopup("Left empty game. [LeaveEmpty]")
  3842. change("leaveGame");
  3843. playersInGame = 0;
  3844. };
  3845. };
  3846. if (extract("autoLeave")) {
  3847. const remaining = ((timeJoinedGame + (1000 * extract("autoLeaveDelay"))) - Date.now()) / 1000;
  3848. if (remaining <= 0) {
  3849. createPopup("AutoLeave: Leaving now...");
  3850. change("leaveGame");
  3851. } else if (autoLeaveReminder > 5 && remaining <= 5) {
  3852. createPopup("AutoLeave: 5 seconds remaining!");
  3853. } else if (autoLeaveReminder > 10 && remaining <= 10) {
  3854. createPopup("AutoLeave: 10 seconds remaining");
  3855. };
  3856. // log(autoLeaveReminder, remaining);
  3857. autoLeaveReminder = remaining;
  3858. };
  3859. //credits: @2lars and @macintosh2 in the discord :)
  3860. if ((extract("autoTeam") !== "disabled") && ss.MYPLAYER.team !== 0) {
  3861. if ((extract("autoTeam") == "random") ||
  3862. (extract("autoTeam") == "red") && (ss.MYPLAYER.team == 1) ||
  3863. (extract("autoTeam") == "blue") && (ss.MYPLAYER.team == 2)) {
  3864. unsafeWindow.extern.switchTeam();
  3865. };
  3866. };
  3867. if (!ss.MYPLAYER[H.playing]) {
  3868. GAMECODE = unsafeWindow.vueApp.game.shareLinkPopup.url.slice(-14);
  3869. if (extract("autoRespawn")) {
  3870. var button = document.querySelector('.ss_button.btn_big.btn-dark-bevel.btn-respawn.ss_button.btn_green.bevel_green');
  3871. if (button) {
  3872. button.click();
  3873. };
  3874. };
  3875. };
  3876. Array.from(document.getElementById("playerList").children).forEach(playerListItem => {
  3877. const playerSlotNameElement = playerListItem.children[0];
  3878. if (playerSlotNameElement) {
  3879. let highlightSpan = playerSlotNameElement.querySelector('span');
  3880. if (!highlightSpan) {
  3881. highlightSpan = document.createElement('span');
  3882. highlightSpan.textContent = playerSlotNameElement.textContent;
  3883. playerSlotNameElement.textContent = '';
  3884. playerSlotNameElement.appendChild(highlightSpan);
  3885. };
  3886. if (extract("unfilterNames") && ss.isBadWord(playerListItem.textContent)) {
  3887. highlightSpan.style.backgroundColor = "rgba(255, 255, 255, 0.6)";
  3888. highlightSpan.style.color = 'red';
  3889. } else {
  3890. highlightSpan.style.backgroundColor = '';
  3891. highlightSpan.style.color = '';
  3892. };
  3893. };
  3894. });
  3895. // addStreamsToInGameUI(); //broken rn anyways
  3896. const pausedGameUI = document.querySelector('.paused-game-ui');
  3897. const hasZIndex1 = pausedGameUI.classList.contains('z-index-1');
  3898. const hasZIndex10000 = pausedGameUI.classList.contains('z-index-10000');
  3899. if (extract("restoreScroll") && (hasZIndex1 || !hasZIndex10000)) {
  3900. pausedGameUI.classList.remove('z-index-1', 'z-index-10000');
  3901. pausedGameUI.classList.add("z-index-10000");
  3902. } else if ((!extract("restoreScroll")) && (hasZIndex10000 || !hasZIndex1)) {
  3903. pausedGameUI.classList.remove('z-index-1', 'z-index-10000');
  3904. pausedGameUI.classList.add("z-index-1");
  3905. };
  3906. if (extract("minimap")) {
  3907. if (!miniCamera) {
  3908. var camPos = new L.BABYLON.Vector3(0, -20, 0);
  3909. miniCamera = new L.BABYLON.ArcRotateCamera("minimapCamera", -1.5707963267948966, 0, 30, camPos, ss.SCENE);
  3910. miniCamera.mode = 1; //L.BABYLON.Camera.ORTHOGRAPHIC_CAMERA
  3911. ss.SCENE.activeCameras.push(miniCamera);
  3912. miniCamera.parent = ss.MYPLAYER[H.actor][H.mesh];
  3913. };
  3914. miniCamera._skipRendering = false;
  3915. let cameraScale = extract("minimapZoom");
  3916. miniCamera.orthoLeft = -cameraScale;
  3917. miniCamera.orthoRight = cameraScale;
  3918. miniCamera.orthoBottom =- cameraScale;
  3919. miniCamera.orthoTop = cameraScale;
  3920. let mapScale = extract("minimapSize");
  3921. var relativeWidth = 200 / window.innerWidth;
  3922. var relativeHeight = 200 / window.innerHeight;
  3923. miniCamera.viewport = new L.BABYLON.Viewport(0.2, 0.2, relativeWidth * mapScale, relativeHeight * mapScale);
  3924. } else if (miniCamera) {
  3925. miniCamera._skipRendering = true;
  3926. };
  3927. if (extract("instantSpectate")) {
  3928. if (document.getElementsByClassName("pause-container centered")[0].style.display == "") {
  3929. document.getElementsByClassName("pause-screen-btn-spectate")[0].style.display = '';
  3930. document.getElementsByClassName("pause-screen-btn-spectate")[0].disabled = null;
  3931. };
  3932. };
  3933. } else {
  3934. if (!document.getElementById("progressBar")) {
  3935. if (extract("autoJoin") && (extract("autoLogin") == "disabled" || unsafeWindow.vueApp.accountCreated !== null)) {
  3936. unsafeWindow.vueApp.externPlayObject(
  3937. (extract("joinCode").length === 14) ? 2 : 0,
  3938. unsafeWindow.vueApp.currentGameType,
  3939. unsafeWindow.vueApp.playerName,
  3940. '',
  3941. (extract("joinCode").length === 14) ? extract("joinCode") : '',
  3942. );
  3943. };
  3944. };
  3945. if (extract("autoRegion") !== "disabled") {
  3946. const region = (extract("autoRegion") == "random" ? extractDropdownList("autoRegion")[randomInt(1, 7)].value : extract("autoRegion"));
  3947. unsafeWindow.vueData.currentRegionId = region;
  3948. };
  3949. if (extract("autoGamemode") !== "disabled") {
  3950. const gamemode = ((extract("autoGamemode") == "random") ? randomInt(0, 3) : (extractAsDropdownInt("autoGamemode") - 1));
  3951. unsafeWindow.vueApp.onGameTypeChanged(gamemode);
  3952. };
  3953. };
  3954. if (startUpComplete) {
  3955. // check if it is a user's first time to run the script
  3956. if (GM_getValue("StateFarm_firstRun") !== 1) {
  3957. firstExecution = true;
  3958. };
  3959. if ((extract("legacyModels") !== previousLegacyModels)) {
  3960. let models = [3000, 3100, 3400, 3600, 3800, 4000, 4200];
  3961. models.forEach(ID => {
  3962. let item = unsafeWindow.extern.catalog.findItemById(ID);
  3963. item.item_data.meshName.replaceAll("_Legacy","");
  3964. if (extract("legacyModels")) item.item_data.meshName = `${item.item_data.meshName}_Legacy`;
  3965. });
  3966. };
  3967. previousLegacyModels = extract("legacyModels");
  3968. if ((extract("setDetail") !== previousDetail) && (extract("setDetail") !== "disabled")) {
  3969. unsafeWindow.vueApp.settingsUi.togglers.misc[3].value = false;
  3970. if (extract("setDetail") == "autodetail") {
  3971. unsafeWindow.vueApp.settingsUi.togglers.misc[3].value = true;
  3972. } else if (extract("setDetail") == "nodetails") {
  3973. unsafeWindow.vueApp.settingsUi.togglers.misc[4].value = false;
  3974. unsafeWindow.vueApp.settingsUi.togglers.misc[5].value = false;
  3975. } else if (extract("setDetail") == "shadows") {
  3976. unsafeWindow.vueApp.settingsUi.togglers.misc[4].value = true;
  3977. unsafeWindow.vueApp.settingsUi.togglers.misc[5].value = false;
  3978. } else if (extract("setDetail") == "highres") {
  3979. unsafeWindow.vueApp.settingsUi.togglers.misc[4].value = false;
  3980. unsafeWindow.vueApp.settingsUi.togglers.misc[5].value = true;
  3981. } else if (extract("setDetail") == "shadowshighres") {
  3982. unsafeWindow.vueApp.settingsUi.togglers.misc[4].value = true;
  3983. unsafeWindow.vueApp.settingsUi.togglers.misc[5].value = true;
  3984. };
  3985. unsafeWindow.extern.applyUiSettings(unsafeWindow.vueApp.settingsUi);
  3986. };
  3987. previousDetail = extract("setDetail");
  3988. if (previousTitleAnimation !== extract("titleAnimation")) {
  3989. let existingFavicons = document.querySelectorAll("link[rel*='icon']");
  3990. existingFavicons.forEach(function (favicon) {
  3991. favicon.parentNode.removeChild(favicon);
  3992. });
  3993. let favicon = document.createElement('link');
  3994. favicon.type = 'image/x-icon';
  3995. favicon.rel = 'shortcut icon';
  3996. if (extract("titleAnimation")) {
  3997. favicon.href = (GM_info?.script?.icon || iconURL);
  3998. } else {
  3999. favicon.href = 'https://www.google.com/s2/favicons?domain=shellshock.io';
  4000. };
  4001. document.getElementsByTagName('head')[0].appendChild(favicon);
  4002. previousTitleAnimation = extract("titleAnimation");
  4003. };
  4004. };
  4005. const banPopup = document.getElementById("bannedPopup");
  4006. if (attemptedInjection && banPopup && unsafeWindow.vueApp?.bannedPopup?.expire && (unsafeWindow.vueApp.bannedPopup.expire !== "")) isBanned = true;
  4007. if (isBanned && extract("autoUnban") && (!attemptedAutoUnban) && unsafeWindow.vueApp?.bannedPopup) {
  4008. log("eep!");
  4009. banPopup.textContent = 'StateFarm AutoUnban:\nYou now have a new database\nID for unban. Enjoy! :)\nBan message will be automatically removed from screen in 15 seconds.';
  4010. unban();
  4011. attemptedAutoUnban = true;
  4012. createPopup("AutoUnban: Attempting to Unban...");
  4013. setTimeout(() => {
  4014. createPopup("AutoUnban: Removed ban message.");
  4015. banPopup.style.display = "none";
  4016. attemptedAutoUnban = false;
  4017. isBanned = false;
  4018. unsafeWindow.vueApp.bannedPopup.expire = "";
  4019. }, 15000);
  4020. };
  4021. if (extract("eggColor") !== "disabled" && ss?.USERDATA) {
  4022. const color = extract("eggColor") == "random" ? randomInt(0, 6) : extractAsDropdownInt("eggColor") - 1;
  4023. if (color !== ss.USERDATA.playerAccount.colorIdx) {
  4024. unsafeWindow.extern.setShellColor(color);
  4025. unsafeWindow.vueApp.onBackClick();
  4026. };
  4027. };
  4028. if (extract("autoStamp") !== "disabled" && ss?.USERDATA) {
  4029. const stampID = 2000 + (extract("autoStamp") == "random" ? randomInt(1, 6) : extractAsDropdownInt("autoStamp"));
  4030. if (ss.USERDATA && ss.USERDATA.playerAccount) {
  4031. if (stampID !== ((ss.USERDATA.playerAccount.stampItem && ss.USERDATA.playerAccount.stampItem?.id) || -1)) {
  4032. ss.USERDATA.playerAccount.stampItem = unsafeWindow.extern.catalog.findItemById(stampID);
  4033. unsafeWindow.vueApp.onBackClick();
  4034. };
  4035. };
  4036. };
  4037. if (extract("autoHat") !== "disabled" && ss?.USERDATA) {
  4038. const hatID = 1000 + (extract("autoHat") == "random" ? randomInt(1, 6) : extractAsDropdownInt("autoHat"));
  4039. if (ss.USERDATA && ss.USERDATA.playerAccount) {
  4040. if (hatID !== ((ss.USERDATA.playerAccount.hatItem && ss.USERDATA.playerAccount.hatItem?.id) || -1)) {
  4041. ss.USERDATA.playerAccount.hatItem = unsafeWindow.extern.catalog.findItemById(hatID);
  4042. unsafeWindow.vueApp.onBackClick();
  4043. };
  4044. };
  4045. };
  4046. if (extract("useCustomName")) {
  4047. unsafeWindow.vueApp?.setPlayerName(extract("usernameAutoJoin"));
  4048. };
  4049. if ((!ranEverySecond) && startUpComplete) {
  4050. if (extract("autoChickenWinner")) {
  4051. log("automatically do chw");
  4052. change("chickenWinner");
  4053. };
  4054. updateAccountRecords();
  4055. if (extract("autoMacro")) {
  4056. log("automatically do your macro");
  4057. change("executeMacro");
  4058. };
  4059. log("swapping out google analytics...");
  4060. oldGa = unsafeWindow.ga;
  4061. unsafeWindow.ga = F.interceptGa;
  4062. const vueAppisUpgraded = Object.getOwnPropertyDescriptor(vueApp, 'isUpgraded')?.get;
  4063. Object.defineProperty(vueApp, 'isUpgraded', {
  4064. get: function() {
  4065. if ((!extract("spoofVIP")) && vueAppisUpgraded) {
  4066. return vueAppisUpgraded.call(vueApp);
  4067. } else {
  4068. return true;
  4069. }
  4070. }
  4071. });
  4072. const vueAppisSubscriber = Object.getOwnPropertyDescriptor(vueApp, 'isSubscriber')?.get;
  4073. Object.defineProperty(vueApp, 'isSubscriber', {
  4074. get: function() {
  4075. if ((!extract("spoofVIP")) && vueAppisSubscriber) {
  4076. return vueAppisSubscriber.call(vueApp);
  4077. } else {
  4078. return true;
  4079. }
  4080. }
  4081. });
  4082. const vueDataisSubscriber = Object.getOwnPropertyDescriptor(vueData, 'isSubscriber')?.get;
  4083. Object.defineProperty(vueData, 'isSubscriber', {
  4084. get: function() {
  4085. if ((!extract("spoofVIP")) && vueDataisSubscriber) {
  4086. return vueDataisSubscriber.call(vueData);
  4087. } else {
  4088. return true;
  4089. }
  4090. }
  4091. });
  4092. ranEverySecond = true;
  4093. };
  4094. //block ads or something kek
  4095. localStorage.timesPlayed = 0;
  4096. for (let storeAs of Object.keys(monitorObjects)) {
  4097. let object = monitorObjects[storeAs];
  4098. if (monitorObjects[object] !== oldMonitorObjects[object]) {
  4099. log(object, monitorObjects[object]);
  4100. tp[storeAs+"Button"].refresh();
  4101. };
  4102. };
  4103. };
  4104. const everyDecisecond = function () {
  4105. // updateConfig();
  4106. deciSecondsPassed++;
  4107. if (extract("titleAnimation")) {
  4108. if (deciSecondsPassed % 3 == 0) {
  4109. unsafeWindow.document.title = titleAnimationFrames[currentFrameIndex];
  4110. currentFrameIndex = (currentFrameIndex + 1) % titleAnimationFrames.length;
  4111. };
  4112. } else if (unsafeWindow.document.title != "Shell Shockers 🍳 Multiplayer io game") {
  4113. unsafeWindow.document.title = "Shell Shockers 🍳 Multiplayer io game";
  4114. };
  4115. if (startUpComplete && (!unsafeWindow.extern.inGame) && extract("autoLogin") !== "disabled" && (extract("autoLogin") == "always" || extract("autoLogin") == "noaccount" && unsafeWindow.vueApp.accountCreated == null)) {
  4116. if ((previousLogin + 5000) < Date.now()) {
  4117. unban();
  4118. change("loginDatabaseLogin");
  4119. previousLogin = Date.now();
  4120. };
  4121. };
  4122. if (ss && ss?.MYPLAYER && unsafeWindow?.extern?.inGame) {
  4123. //innertext stuff, fairly resource intensive. disable these for performance
  4124. if (extract("playerStats")) {
  4125. let playerStates = "";
  4126. ss.PLAYERS.forEach(player => {
  4127. if (player && (player !== ss.MYPLAYER) && (player[H.hp] > 0) && ((!ss.MYPLAYER.team) || (player.team !== ss.MYPLAYER.team))) {
  4128. playerStates = playerStates + player.name + ": " + Math.round(player[H.hp]) + " HP\n";
  4129. };
  4130. });
  4131. if (playerStates == "") { playerStates = "No Enemy Players" };
  4132. playerstatsElement.innerText = playerStates;
  4133. void playerstatsElement.offsetWidth;
  4134. playerstatsElement.style.display = '';
  4135. };
  4136. if (extract("playerInfo")) {
  4137. let playerInfoString = "";
  4138. const player = currentlyTargeting || playerLookingAt || undefined
  4139. if (player && player.distance && player[H.playing]) {
  4140. playerInfoString = playerInfoString + player.name + "\n"
  4141. playerInfoString = playerInfoString + "HP: " + Math.round(player[H.hp]) + "\n"
  4142. playerInfoString = playerInfoString + "Distance: " + player.distance.toFixed(3) + "\n"
  4143. playerInfoString = playerInfoString + "AngleDiff: " + player.angleDiff.toFixed(3) + "\n"
  4144. };
  4145. if (playerInfoString == "") { playerInfoString = "Not Looking At Player" };
  4146. playerinfoElement.innerText = playerInfoString;
  4147. void playerinfoElement.offsetWidth;
  4148. playerinfoElement.style.display = '';
  4149. };
  4150. if (ss.MYPLAYER && ss.MYPLAYER[H.actor] && ss.MYPLAYER[H.actor][H.mesh] && extract("showCoordinates")) {
  4151. const fonx = Number((ss.MYPLAYER[H.actor][H.mesh].position.x).toFixed(3));
  4152. const fony = Number((ss.MYPLAYER[H.actor][H.mesh].position.y).toFixed(3));
  4153. const fonz = Number((ss.MYPLAYER[H.actor][H.mesh].position.z).toFixed(3));
  4154. const yaw = Number((ss.MYPLAYER[H.yaw]).toFixed(3)); //could i function this? yea
  4155. const pitch = Number((ss.MYPLAYER[H.pitch]).toFixed(3));
  4156. const personalCoordinate = `XYZ: ${fonx}, ${fony}, ${fonz} Rot: ${yaw}, ${pitch} Acc: ${Number(accuracyPercentage).toFixed(3)}`;
  4157. coordElement.innerText = personalCoordinate;
  4158. void coordElement.offsetWidth;
  4159. coordElement.style.display = '';
  4160. };
  4161. if (ss.MYPLAYER && ss.MYPLAYER[H.actor] && ss.MYPLAYER[H.actor][H.mesh] && extract("performanceInfo")) {
  4162. if (performance.memory) {
  4163. const memoryUsage = performance.memory;
  4164. const jsHeapSizeLimit = (memoryUsage.jsHeapSizeLimit / 1024 / 1024).toFixed(2);
  4165. const totalJSHeapSize = (memoryUsage.totalJSHeapSize / 1024 / 1024).toFixed(2);
  4166. const usedJSHeapSize = (memoryUsage.usedJSHeapSize / 1024 / 1024).toFixed(2);
  4167. performanceElement.textContent = `
  4168. Memory Usage:
  4169. ${usedJSHeapSize} MB / ${jsHeapSizeLimit} MB
  4170. `.trim();
  4171. } else {
  4172. performanceElement.textContent = "Performance.memory API is not supported in this browser.";
  4173. };
  4174. performanceElement.style.display = '';
  4175. };
  4176. // create an info box for the first execution, i have 69697935 iq
  4177. if (firstExecution == true) {
  4178. firstUseElement.innerHTML = `
  4179. <style>
  4180. @font-face {
  4181. font-family: "Bahnschrift";
  4182. src: url("https://db.onlinewebfonts.com/t/0a6ee448d1bd65c56f6cf256a7c6f20a.eot");
  4183. src: url("https://db.onlinewebfonts.com/t/0a6ee448d1bd65c56f6cf256a7c6f20a.eot?#iefix")format("embedded-opentype"),
  4184. url("https://db.onlinewebfonts.com/t/0a6ee448d1bd65c56f6cf256a7c6f20a.woff2")format("woff2"),
  4185. url("https://db.onlinewebfonts.com/t/0a6ee448d1bd65c56f6cf256a7c6f20a.woff")format("woff"),
  4186. url("https://db.onlinewebfonts.com/t/0a6ee448d1bd65c56f6cf256a7c6f20a.ttf")format("truetype"),
  4187. url("https://db.onlinewebfonts.com/t/0a6ee448d1bd65c56f6cf256a7c6f20a.svg#Bahnschrift")format("svg");
  4188. }
  4189. .overlay {
  4190. position: fixed;
  4191. top: 0;
  4192. left: 0;
  4193. width: 100%;
  4194. height: 100%;
  4195. background-color: rgba(0, 0, 0, 0.7);
  4196. z-index: 9999;
  4197. display: flex;
  4198. justify-content: center;
  4199. align-items: center;
  4200. opacity: 1;
  4201. }
  4202. .overlay-content {
  4203. text-align: center;
  4204. color: white;
  4205. }
  4206. h100 {
  4207. color: white;
  4208. font-weight: bold;
  4209. font-family: Bahnschrift;
  4210. font-size: 36px;
  4211. }
  4212. a {
  4213. text-decoration: none;
  4214. font-family: Bahnschrift;
  4215. font-size: 24px;
  4216. }
  4217. p {
  4218. text-decoration: none;
  4219. font-family: Bahnschrift;
  4220. font-size: 15px;
  4221. }
  4222. </style>
  4223. </head>
  4224. <body>
  4225. <div class="overlay">
  4226. <div class="overlay-content">
  4227. <h100>Welcome to StateFarmClient V3</h100>
  4228. <br>
  4229. <br>
  4230. <a href="https://discord.gg/EMy9swEwB6">Discord&emsp;</a>
  4231. <a href="https://github.com/Hydroflame522/StateFarmClient">Github&emsp;</a>
  4232. <a href="https://greasyfork.org/en/scripts/482982">Greasyfork&emsp;</a>
  4233. <a href="https://www.youtube.com/channel/UCGWtU3Dp3unyefuaBpwGMDw">Youtube</a>
  4234. <br>
  4235. <br>
  4236. <p>Press 'Escape' to close</p>
  4237. </div>
  4238. </div>
  4239. </body>
  4240. `
  4241. firstUseElement.style.display = '';
  4242. document.addEventListener('keydown', function (event) {
  4243. if (event.keyCode === 27) {
  4244. firstUseElement.style.opacity = '0';
  4245. firstUseElement.style.display = "none";
  4246. setTimeout(function () {
  4247. firstUseElement.parentNode.removeChild(firstUseElement);
  4248. }, 1000)
  4249. }
  4250. GM_setValue("StateFarm_firstRun", 1);
  4251. });
  4252. };
  4253. };
  4254. if (AUTOMATED) { //i know what youre saying looking at this. i am the greatest programmer to have ever lived
  4255. if (GM_getValue("StateFarm_CommandTime") > cachedCommandTime) {
  4256. // alert("New command incoming");
  4257. cachedCommand = GM_getValue("StateFarm_Command");
  4258. cachedCommandTime = GM_getValue("StateFarm_CommandTime");
  4259. log("Command received:", cachedCommand);
  4260. handleCommand(cachedCommand);
  4261. } else {
  4262. // uncommment if needed
  4263. // log("No new command, cached command:", cachedCommand, "cached time:", cachedCommandTime, "diff to now:", Date.now() - cachedCommandTime);
  4264. };
  4265. };
  4266. };
  4267. const handleCommand = function (command) {
  4268. let args = command.split(" ");
  4269. switch (args[0]) {
  4270. case "setconfig":
  4271. let receivedConfig = decodeURIComponent(unsafeWindow.escape(window.atob(args[1]))); // eslint-disable-line
  4272. if (URLParams !== "") { receivedConfig = URLParams + "<" + receivedConfig };
  4273. log("StateFarm: Change in Bot Panel detected.", receivedConfig);
  4274. applySettings(receivedConfig);
  4275. configNotSet = false;
  4276. break;
  4277. case "ping":
  4278. createPopup("Pong! " + ((Date.now() - cachedCommandTime)) + "ms", "success");
  4279. break;
  4280. case "kill":
  4281. unsafeWindow.close();
  4282. break;
  4283. case "leave":
  4284. change("leaveGame");
  4285. break;
  4286. case "unban":
  4287. unban();
  4288. break;
  4289. case "newproxy":
  4290. newProxy();
  4291. break;
  4292. case "refresh":
  4293. reloadPage();
  4294. break;
  4295. case "report":
  4296. spamReport();
  4297. break;
  4298. case "join":
  4299. if (args[1]) unsafeWindow.vueApp.externPlayObject(0, 0, unsafeWindow.vueApp.playerName, -1, args[1]);
  4300. else alert("Invalid code");
  4301. break;
  4302. case "repeat":
  4303. if (args[1]) {
  4304. sendChatMessage(args.slice(1).join(" "));
  4305. } else {
  4306. sendChatMessage("Invalid repeat message");
  4307. }
  4308. break;
  4309. /*
  4310. case "pathtarget": // pathfinding target
  4311. let option = args[1]; // eslint-disable-line
  4312. if (option) {
  4313. if (option === "set") {
  4314. let x = args[2];
  4315. let y = args[3];
  4316. let z = args[4];
  4317. if (x && y && z) {
  4318. pathfindingTargetOverride = { x: x, y: y, z: z };
  4319. isFirstFrameAttemptingToPathfind = true;
  4320. } else {
  4321. sendChatMessage("Invalid pathtarget coordinates")
  4322. };
  4323. };
  4324. };
  4325. break;
  4326. case "clearpath":
  4327. clearPath();
  4328. break;
  4329. case "clearpath_t":
  4330. clearPath_andTarget();
  4331. break;
  4332. case "setpathdespawn":
  4333. if (args[1]) {
  4334. if (args[1] === "true") {
  4335. despawnIfNoPath = true;
  4336. } else if (args[1] === "false") {
  4337. despawnIfNoPath = false;
  4338. } else if (args[1] === "toggle") {
  4339. despawnIfNoPath = !despawnIfNoPath;
  4340. } else {
  4341. sendChatMessage("Invalid setpathdespawn argument");
  4342. }
  4343. } else {
  4344. sendChatMessage("Invalid setpathdespawn message");
  4345. };
  4346. */
  4347. };
  4348. };
  4349. const onOptionChanged = function(module, value) {
  4350. if ((!configMain) || (!configBots)) {
  4351. updateConfig();
  4352. };
  4353. if (configBots[module.storeAs] !== undefined) {
  4354. configBots[module.storeAs] = value.value;
  4355. } else {
  4356. configMain[module.storeAs] = value.value;
  4357. };
  4358. };
  4359. const updateConfig = function () {
  4360. configMain = tp.mainPanel.exportPreset();
  4361. configBots = tp.botPanel.exportPreset();
  4362. };
  4363. const updateHiddenAndDisabledHelper = function (array) { //determines if all conditions are met
  4364. let conditionMet = false;
  4365. array.forEach(condition => {
  4366. if ((extract(condition[0]) ? extract(condition[0]) : false) !== condition[1]) {
  4367. conditionMet = true;
  4368. return;
  4369. };
  4370. });
  4371. return conditionMet;
  4372. };
  4373. const updateHiddenAndDisabled = function () {
  4374. //the format for hidden/disabled modules is as follows:
  4375. //hidden/disabled is an array of arrays. within each of the items, there is the condition required for the module to be shown
  4376. //eg: [["aimbot",true],...] (will only be shown if extract("aimbot")==true)
  4377. if (menuInitiated) {
  4378. allModules.forEach(module => {
  4379. const tiedModules = tp[module + "TiedModules"];
  4380. if (tiedModules) {
  4381. if (tiedModules.showConditions) {
  4382. tp[module + "Button"].hidden = updateHiddenAndDisabledHelper(tiedModules.showConditions);
  4383. };
  4384. if (tiedModules.hideConditions) {
  4385. tp[module + "Button"].hidden = !updateHiddenAndDisabledHelper(tiedModules.hideConditions);
  4386. };
  4387. if (tiedModules.enableConditions) {
  4388. tp[module + "Button"].disabled = updateHiddenAndDisabledHelper(tiedModules.enableConditions);
  4389. };
  4390. if (tiedModules.disableConditions) {
  4391. tp[module + "Button"].disabled = !updateHiddenAndDisabledHelper(tiedModules.disableConditions);
  4392. };
  4393. };
  4394. });
  4395. };
  4396. };
  4397. const loginOrCreateWithEmailPass = function (emailPass) {
  4398. let email, pass;
  4399. [email, pass] = emailPass.split(":");
  4400. log("gonna create/login an account that will send/has email to", email, "with the password", pass);
  4401. save("MostRecentEmail", email);
  4402. //try both. who cares about some stupid errors?
  4403. unsafeWindow.firebase.auth().createUserWithEmailAndPassword(email, pass)
  4404. .then(response => {
  4405. log("success?!?!?!? created account");
  4406. setTimeout(function(){
  4407. updateAccountRecords("emailPass", emailPass);
  4408. accountStatus = "created account";
  4409. }, 2000);
  4410. })
  4411. .catch(() => { });
  4412. unsafeWindow.firebase.auth().signInWithEmailAndPassword(email, pass)
  4413. .then(response => {
  4414. log("success?!?!?!? signed in");
  4415. setTimeout(function(){
  4416. updateAccountRecords("emailPass", emailPass);
  4417. accountStatus = "created account";
  4418. }, 2000);
  4419. accountStatus = "signed in";
  4420. })
  4421. .catch(() => { });
  4422. };
  4423. const saveConfig = function () {
  4424. if (menuInitiated !== "init") {
  4425. if (retrievedSFX && retrievedSFX.length > 1) {
  4426. save("StateFarmConfigSpecialItems", [
  4427. ["customSFX1", extractAsDropdownInt("customSFX1") || 0],
  4428. ["customSFX2", extractAsDropdownInt("customSFX2") || 0],
  4429. ["customSFX3", extractAsDropdownInt("customSFX3") || 0],
  4430. ["skybox", extractAsDropdownInt("skybox") || 0],
  4431. ["filter", extractAsDropdownInt("filter") || 0],
  4432. ]);
  4433. };
  4434. };
  4435. save("StateFarmConfigMainPanel", tp.mainPanel.exportPreset());
  4436. save("StateFarmConfigBotPanel", tp.botPanel.exportPreset());
  4437. };
  4438. const save = function (key, value) {
  4439. if (AUTOMATED) { return undefined };
  4440. if (JSON.parse(localStorage.getItem(key)) !== undefined) { localStorage.removeItem(key) }; //dont need that anymore lmao
  4441. GM_setValue(storageKey + key, value);
  4442. };
  4443. const load = function (key) {
  4444. if (AUTOMATED) { key = getScrambled() };
  4445. return GM_getValue(storageKey + key) || JSON.parse(localStorage.getItem(key)); //localstorage is for legacy purposes *only*
  4446. };
  4447. const remove = function (key) {
  4448. if (AUTOMATED) { return undefined };
  4449. GM_deleteValue(storageKey + key);
  4450. if (JSON.parse(localStorage.getItem(key)) !== undefined) { localStorage.removeItem(key) }; //legacy
  4451. };
  4452. const addUserPresets = function (presets) { //adds presets from dict to inbilt presets, can be called multiple times to update
  4453. if (presets != null) {
  4454. Object.entries(presets).forEach(([key, value]) => {
  4455. inbuiltPresets[key] = value;
  4456. });
  4457. };
  4458. };
  4459. const loadUserPresets = function () { //gets user presets
  4460. let result = load(presetStorageLocation);
  4461. log("Loaded StateFarmUserPresets: ", result);
  4462. return load(presetStorageLocation);
  4463. };
  4464. const saveUserPreset = function (presetName, preset) {
  4465. let currentPresets = loadUserPresets(); //gets current saved presets
  4466. if (currentPresets == null) { // if it does not exist, makes it
  4467. let presets = {};
  4468. presets[presetName] = preset;
  4469. save(presetStorageLocation, presets);
  4470. return presets;
  4471. } else { //otherwise it appends it
  4472. currentPresets[presetName] = preset;
  4473. save(presetStorageLocation, currentPresets);
  4474. return currentPresets;
  4475. };
  4476. };
  4477. //Updates inbuiltPresets to include user presets
  4478. addUserPresets(loadUserPresets());
  4479. const sendChatMessage = function (text) { //basic method (simulates legit method of sending message)
  4480. let chatThing = document.getElementById('chatIn');
  4481. if (chatThing.value.includes("unlock")) {
  4482. createPopup("Message send failed: Account too new! (try ShellPrint or LoginDB)", "error");
  4483. return false;
  4484. } else if (ss.MYPLAYER.chatLines > 2) {
  4485. createPopup("Chat Cooldown: " + (ss.MYPLAYER.chatLines - 2) + " remaining.", "error");
  4486. return false;
  4487. } else {
  4488. try {
  4489. lastSentMessage = text;
  4490. if (chatThing && unsafeWindow.extern.startChat) {
  4491. unsafeWindow.extern.startChat();
  4492. chatThing.value = text;
  4493. chatThing.dispatchEvent(new KeyboardEvent('keydown', {
  4494. key: 'Enter',
  4495. code: 'Enter',
  4496. keyCode: 13,
  4497. which: 13,
  4498. bubbles: true,
  4499. cancelable: true,
  4500. }));
  4501. return true;
  4502. } else {
  4503. return false;
  4504. };
  4505. } catch (error) {
  4506. return false;
  4507. };
  4508. };
  4509. };
  4510. const addStreamsToInGameUI = function () {
  4511. let inGameUIElement = document.getElementById("inGameUI");
  4512. let streams = document.getElementById("stream_scroll").children;
  4513. if (inGameUIElement && streams.length > 0) {
  4514. for (let i = 0; i < streams.length; i++) {
  4515. let hrefValue = streams[i].querySelector('a').href;
  4516. let nameValue = streams[i].querySelector(".stream_name").textContent;
  4517. const streamElement = inGameUIElement.querySelector('div[data-name="' + nameValue + '"]');
  4518. if (extract("showStreams") && !streamElement) {
  4519. let containerDiv = document.createElement("div");
  4520. let nameDiv = document.createElement("div");
  4521. nameDiv.textContent = nameValue;
  4522. nameDiv.setAttribute('data-href', hrefValue);
  4523. nameDiv.style.color = 'white';
  4524. nameDiv.style.cursor = 'pointer';
  4525. nameDiv.style.textDecoration = 'none';
  4526. nameDiv.addEventListener('mouseover', function () { nameDiv.style.textDecoration = 'underline'; nameDiv.style.color = 'blue' });
  4527. nameDiv.addEventListener('mouseout', function () { nameDiv.style.textDecoration = 'none'; nameDiv.style.color = 'white' });
  4528. nameDiv.addEventListener('click', () => GM_openInTab(hrefValue, { active: true }));
  4529. containerDiv.setAttribute('data-name', nameValue);
  4530. containerDiv.appendChild(nameDiv);
  4531. containerDiv.appendChild(nameDiv);
  4532. inGameUIElement.appendChild(containerDiv);
  4533. } else if (!extract("showStreams") && streamElement) {
  4534. inGameUIElement.removeChild(streamElement);
  4535. };
  4536. };
  4537. };
  4538. };
  4539. const highlightTargetOnLeaderboard = function (target, aimbot) {
  4540. let playerArray = [];
  4541. ss.PLAYERS.forEach(player => {
  4542. if (player && (target !== ss.MYPLAYER) && player[H.playing] && (player[H.hp] > 0) && ((!ss.MYPLAYER.team) || (player.team !== ss.MYPLAYER.team))) {
  4543. const uniqueId = player.uniqueId;
  4544. const name = player.name;
  4545. const hp = player[H.hp]
  4546. playerArray.push({ player, uniqueId, name, hp });
  4547. };
  4548. });
  4549. Array.from(document.getElementById("playerList").children).forEach(playerListItem => {
  4550. if (aimbot && target?.name && target[H.playing] === playerListItem.textContent.slice(0, -3)) {//need to slice otherwise won't match properly
  4551. playerListItem.style.backgroundColor = 'blue';
  4552. } else {
  4553. playerListItem.style.backgroundColor = '';
  4554. };
  4555. // log(playerArray.find(player => player.name === playerListItem.textContent.slice(0, -3))?[H.hp]);
  4556. });
  4557. };
  4558. const highlightCrossHairReticleDot = function (bool) {
  4559. let dot = document.getElementById("reticleDot");
  4560. let crosshair = document.getElementById("crosshairContainer");
  4561. let setTo = '';
  4562. if (bool === true) {
  4563. setTo = "green";
  4564. } else if (bool === false) {
  4565. setTo = "red";
  4566. };
  4567. dot.style.backgroundColor = setTo;
  4568. Array.from(crosshair.children).forEach(part => {
  4569. part.style.backgroundColor = setTo;
  4570. });
  4571. };
  4572. const handleChat = function (textAfterLastColon) {
  4573. const responses = {
  4574. "report": "report me? pffft. i'm not even human",
  4575. "aimbot": "what aimboot?",
  4576. "bot": "you're a booooT",
  4577. "stop": "u stop",
  4578. "cheater": "Ho Ho Ho! Santa's Here! And I'm gonna give you a present! A ban! <AdminSpoof enabled>",
  4579. "cheat": "oh youre gonna cheat accuse? keep yapping",
  4580. "hack": "oh youre gonna cheat accuse? keep yapping",
  4581. "hax": "oh youre gonna cheat accuse? keep yapping",
  4582. "nice": "its not that good.",
  4583. "copy": "ERROR: maximum number of loops reached",
  4584. "stupid": "as an AI, i am much smarter than you.",
  4585. "dumb": "you cant calculate the square root of 967 as fast as i can",
  4586. "moron": "lets see you perform a billion operations a second",
  4587. "idiot": "to be fair, i cant talk as much as you",
  4588. "mod": "you can't defeat me?",
  4589. "admin": "you cant block irl",
  4590. "eggfor": "imagine ur in an argument irl and u try to call the mods",
  4591. "bro": "brooooo what",
  4592. "spam": "me, spamming? im just chatting",
  4593. "mute": "you dont want to listen to me talk? how weak hahaha",
  4594. "ban": "ban me? no free speech these days",
  4595. "message": "bleep bloop. are you a robot?",
  4596. "lol": "lolzedong",
  4597. "dude": "dudeinator3000: what is your request",
  4598. "what": "dude what",
  4599. "annoy": "im not that bad",
  4600. "mock": "im not doing anything wrong",
  4601. "wtf": "watch your profanity",
  4602. "bad": "ur not just bad at that",
  4603. "suck": "pretty sure you cant say that??",
  4604. "i'm": "yes you are",
  4605. "im": "yes you are",
  4606. "i am": "yes you are",
  4607. "u r": "no im not. proof?",
  4608. "you r": "no im not. proof?",
  4609. "you are": "no im not. proof?",
  4610. "you're": "no im not. proof?",
  4611. "do you": "truthfully, no i dont.",
  4612. "do u": "honestly, yes i do.",
  4613. "imagine": "imagine who asked",
  4614. "f u": "funny uncleburger",
  4615. "gg": "good grief",
  4616. "shut up": "B͇͈͉͍͎̽̾̿̀́͂̓̈́͆͊͋͌͗ͅ͏͎͗͏͇͇̽̾̿̀́̽̿̀̀́̽̀͆̓̈́̓͋͌ͅ͏͌͏͎͉͗͗͌̓̓̓̓̓́̿",
  4617. "shush": "cant be bothered to be quiet",
  4618. "nuh": "uh huh",
  4619. "proof": "after looking at this proof, i can confidently say its 100% fake.",
  4620. "real": "pretty sure its fake. you have no proof.",
  4621. "fake": "pretty sure its real. you have enough proof.",
  4622. "true": "its false. everyone knows this. why dont you?",
  4623. "false": "its true. everyone knows this. why dont you?",
  4624. "test": "testing me? do it on rats instead.",
  4625. "gift": "\"not everything in life is free\" - me, today",
  4626. "free": "\"not everything in life is free\" - me, today",
  4627. "toxic": "thats really rude",
  4628. "level": "[Your rank is: Subpar Human]",
  4629. "rank": "[Your rank is: Subpar Human]",
  4630. "clan": "[Your clan is: The Gay Nobodies]",
  4631. "smart": "well, i mean, i am quite clever..",
  4632. "clever": "well, i mean, i am quite clever..",
  4633. "hello": "i dont need your stupid greetings.",
  4634. "bye": "wa wa wa you'll see everyone later anyway",
  4635. "thank": "why are you so thankful? grow up!!",
  4636. "please": "you: \"please, please pleeease??\", why dont you PLEASE GET THE POINT",
  4637. "sorry": "why are you sorry all the time? just live your life.",
  4638. "help": "help yourself",
  4639. "kill": "more like kill everyone with the new godmode exploit",
  4640. "kys": "more like kill everyone with the new godmode exploit",
  4641. "kek": ":trol_4k:",
  4642. "bwd": "cool company. i have coffees with wizups every day",
  4643. "wiz": "E X H A U S T P I P E",
  4644. "stroke": "im just stroking",
  4645. "flip": "please dont say that my parents are watching",
  4646. "frick": "please dont say that im streaming rn",
  4647. "harri": "yeah i beat him in a 1v1, 10:1, very easy",
  4648. "chill": "you think i can just CALM DOWN?!?",
  4649. "stfu": "just reported u for swearing",
  4650. "look": "im looking but im not seeing",
  4651. "watch": "are you quite alright up there? i dont have EYES",
  4652. "yap": "i dont yap 😭",
  4653. "yip": "i dont yip 😢",
  4654. "bark": "i dont bark 💀",
  4655. "nigg": "WHOA we cant have racism in our egg game! tone it down yo",
  4656. "fuck": "phrase that more elegantly before talking to me",
  4657. "shit": "yea i ѕhit on ur grave. and ur friends' ones too.",
  4658. "piss": "ima be pisѕing on ur grave icl",
  4659. "dick": "i refuse to comment",
  4660. "sex": "i refuse to comment",
  4661. "pussy": "i refuse to comment",
  4662. "loser": "ive been speccing u, cheater",
  4663. "code": "A1BXDQ is the code",
  4664. "rip": "rest in small pieces",
  4665. "aight": "aight has a lot of letters for one syllable. think about it.",
  4666. "alright": "alright, pack it up boys",
  4667. "omg": "oh my GAWWWD!",
  4668. "npc": "literally you rn:",
  4669. "wth": "ur an npc",
  4670. "ayo": "ur an npc",
  4671. "yes": "no, what do you mean? elaborate you npc",
  4672. "bruh": "did you just say bruh? that is a racist remark",
  4673. "noob": "1v1 me you bot",
  4674. "lmfao": "who is this LMFAO, and is he working with LMBAO?",
  4675. "zert": "we're just better",
  4676. "huh": "huh, are u bot?",
  4677. "your mom": "Yo mama's so poor, she can't even afford to pay attention",
  4678. "your mum": "Yo mama's so poor, she can't even afford to pay attention",
  4679. "shut": "you shaddup you lil' twerrrrrrp",
  4680. "dang": "ching chong bing bong wing wong",
  4681. "trash": "you good sir, are rubbish",
  4682. "damn": "damns are for the fishies",
  4683. "care": "yes you do you bot",
  4684. "go away": "no, you go away u bot",
  4685. "...": "an ellipsis wooow you're so fancy i bet youre sooo smart",
  4686. "literally": "can you literally just be quiet",
  4687. "hah": "its not that funny, take a seat",
  4688. "leave": "i'll leave if you leave",
  4689. "hey": "hey is for horses",
  4690. "mess": "you might not want to mess with me",
  4691. "statefarm": "i am not using StateFarm, definitely not on greasyfork",
  4692. "client": "i am not using ЅtateFarm, definitely not on greasyfork",
  4693. "script": "i am not using ЅtateFarm, definitely not on greasyfork",
  4694. "troll": "yea i sometimes do trolling. but its not that funny",
  4695. "well done": "thanks g",
  4696. "patch": "the patch is coming soon..! sooner..!! soonest..!!!",
  4697. "phrase": "sorry if i have a somewhat \"mechanical\" manner of speech",
  4698. "response": "sorry if i have a somewhat \"mechanical\" manner of speech",
  4699. "commu": "404. response not found.",
  4700. "that was": "was it though?",
  4701. "that is": "is it though?",
  4702. "how": "i want to know too",
  4703. "shell": "thats what we're playing",
  4704. "weird": "ur odd",
  4705. "lag": "get better internet pooron lol",
  4706. "wth": "watch your heckin profanity",
  4707. "kid": "hi im chris hansen. why dont you take a seat for me?",
  4708. "pedo": "hi im chris hansen. why dont you take a seat for me?",
  4709. "minor": "hi im chris hansen. why dont you take a seat for me?",
  4710. "boy": "OH GOD YOU SAID BOY IM REPORTING YOU FOR SEXISM",
  4711. "girl": "OH GOD YOU SAID GIRL IM REPORTING YOU FOR SEXISM",
  4712. "monkey": "get outta ur rainforest",
  4713. "trash": "nah ur father took the recycling with him when he left",
  4714. "father": "look in a mirror for a lack of father figure",
  4715. "dad": "look in a mirror for a lack of father figure",
  4716. "mad": "imagine getting mad over an egg game",
  4717. "deathlylove": "he has a deathly love for men",
  4718. "better": "that's me",
  4719. "angry": "imagine getting angry over an egg game",
  4720. "sad": "imagine getting sad over an egg game",
  4721. "happy": "imagine getting happy over an egg game",
  4722. "love": "imagine feeling love in an egg game",
  4723. "hate": "imagine feeling hatred in an egg game",
  4724. "buck": "bucks arent even rare",
  4725. "flame": "ive got so many flames, i give them away",
  4726. "albino": "albinos are way too common. i just dont know what to do with them!",
  4727. "server": "the server is down",
  4728. "perfect": "i cant say i agree",
  4729. "think": "i cant say i agree",
  4730. "4k": "sorry, maximum resolution is 360p. upgrade to ЅtateFarm Pro for 480p!",
  4731. "gen": "sorry, this requires an active ЅtateFarm Pro subscription",
  4732. "tf": "toasted fries",
  4733. "1v1": 'no ew go away',
  4734. 'doescolder': 'doescolder is a cutie',
  4735. 'puppy': 'who?',
  4736. 'seq': 'seq is a cutie',
  4737. "black": "im not programmed to be racis- oops, no im not a bot",
  4738. "esp": "you think people can see thru walls? thats absurd",
  4739. "why": "why are you asking me? are you lonely?",
  4740. "?": "ask a better question",
  4741. "oh": "ohhhhhh yeahh!!!",
  4742. "no": "ohhhhhh yeeesss",
  4743. "@": "very clever lmaoo",
  4744. "ssh": "Enter statefarm_bot@192.168.0.18's password:",
  4745. "pass": "\\*grins, leans back into chair\\* We're in.",
  4746. };
  4747. const foundKeywords = Object.keys(responses).filter(keyword =>
  4748. textAfterLastColon.toLowerCase().includes(keyword.toLowerCase())
  4749. );
  4750. if (foundKeywords.length > 0) {
  4751. const firstKeyword = foundKeywords[0];
  4752. sendChatMessage(responses[firstKeyword]);
  4753. // log(firstKeyword);
  4754. return true;
  4755. };
  4756. return false;
  4757. };
  4758. const constructChatPacket = function (str) {
  4759. if (str.length > 255) {
  4760. log('%c UH OH UR PACKET IS TOO LONG!!!!');
  4761. str.length = 255;
  4762. };
  4763. var arr = new Uint8Array(2 * str.length + 2);
  4764. arr[0] = ss.SERVERCODES.chat;
  4765. arr[1] = str.length;
  4766. for (var i = 0; i < str.length; i++) {
  4767. arr[2 * i + 2] = str[i].charCodeAt(0) & 255;
  4768. arr[2 * i + 3] = str[i].charCodeAt(0) >> 8 & 255; // ripped straight outta packInt16
  4769. };
  4770. // log(arr);
  4771. return arr;
  4772. };
  4773. const extractChatPacket = function (packet) {
  4774. var pack_arr;
  4775. if (!(packet instanceof ArrayBuffer)) pack_arr = new Uint8Array(packet);
  4776. else pack_arr = packet;
  4777. var str = "";
  4778. for (var i = 0; i < pack_arr[1]; i++) {
  4779. str += String.fromCharCode(pack_arr[2 * i + 2] + (pack_arr[2 * i + 3] << 8)); // ripped straight outta unpackInt16 (thanks github copilot)
  4780. };
  4781. return str;
  4782. };
  4783. const chatPacketHandler = function (packet) {
  4784. let string = extractChatPacket(packet);
  4785. // if (string.includes(antiAFKString)) {
  4786. // log(packet)
  4787. // log("AntiAFK replacement...", string.originalReplace(antiAFKString, ""));
  4788. // var constructed = constructChatPacket(string.originalReplace(antiAFKString, ""));
  4789. // log(constructed)
  4790. // return constructed;
  4791. // };
  4792. return packet;
  4793. };
  4794. const modifyPacket = function (data) {
  4795. if (!ss || !ss.SERVERCODES || (data instanceof String)) { // avoid server comm, ping, etc. necessary to load
  4796. return data;
  4797. };
  4798. if (data.byteLength == 0) {
  4799. return data;
  4800. };
  4801. var arr = new Uint8Array(data);
  4802. // if (arr[0]!==17) {
  4803. // log(arr)
  4804. // };
  4805. if (arr[0] == ss.SERVERCODES.throwGrenade) { // comm code 27 = client to server grenade throw
  4806. if (extract("grenadeMax")) {
  4807. arr[1] = 255 * (0 || extract("grenadePower"));
  4808. log("StateFarm: modified a grenade packet to be at full power");
  4809. return arr.buffer;
  4810. } else {
  4811. log("StateFarm: didn't modify grenade packet")
  4812. };
  4813. } else if (arr[0] == ss.SERVERCODES.chat) {
  4814. log('%c Chat packet sent, chat handler!!!');
  4815. return chatPacketHandler(data);
  4816. } else {
  4817. };
  4818. return data;
  4819. };
  4820. //dead code
  4821. /*
  4822. const is39Packet = function (packetData) { // packet only sent if we are in-game
  4823. if (packetData instanceof String) { // avoid server comm, ping, etc. necessary to load
  4824. return false;
  4825. };
  4826. if (packetData.byteLength == 0) {
  4827. return false;
  4828. };
  4829. var arr = new Uint8Array(packetData);
  4830. return arr[0] == 39;
  4831. };
  4832. const ghostSpamToggle = function () { }
  4833. ghostSpamToggle.enabled = false;
  4834. */
  4835. WebSocket.prototype._send = WebSocket.prototype.send;
  4836. WebSocket.prototype.send = function (data) {
  4837. var modified = modifyPacket(data);
  4838. this._send(modified);
  4839. /*
  4840. if (is39Packet(data) && ghostSpamToggle.enabled) {
  4841. for (var i = 0; i < 5; i++) {
  4842. this._send(constructChatPacket("spammeroonie number #" + new Date().getTime() % 1000));
  4843. };
  4844. };
  4845. */
  4846. };
  4847. // [sfc] PREDICTION CODE
  4848. const predictBloom = function (yaw, pitch, amountToGenerate = ss.MYPLAYER.weapon.constructor.standardMeshName !== "dozenGauge" ? 1 : 20) { //outputs the difference in yaw/pitch from the bloom
  4849. let seed = ss.MYPLAYER[H.randomGen].seed;
  4850. const accuracy = ss.MYPLAYER.weapon.accuracy;
  4851. const range = ss.MYPLAYER.weapon.constructor.range;
  4852. const generateSeed = () => {
  4853. let numbers = [];
  4854. for (var i = 0; i < 3; i++) { //generate from seed the values used to scatter shot
  4855. seed = (seed * 9301 + 49297) % 233280;
  4856. numbers.push(((seed / 233280) - 0.5) * accuracy);
  4857. };
  4858. const playerRotationMatrix = L.BABYLON.Matrix.RotationYawPitchRoll(yaw, pitch, 0);
  4859. const rangeMatrix = L.BABYLON.Matrix.Translation(0, 0, range);
  4860. const playerAndRangeMatrix = rangeMatrix.multiply(playerRotationMatrix);
  4861. const bloomMatrix = L.BABYLON.Matrix.RotationYawPitchRoll(numbers[0], numbers[1], numbers[2]);
  4862. const finalBulletMatrix = playerAndRangeMatrix.multiply(bloomMatrix);
  4863. const finalBulletTranslation = finalBulletMatrix.getTranslation();
  4864. const bulletYaw = calculateYaw(finalBulletTranslation);
  4865. const bulletPitch = calculatePitch(finalBulletTranslation);
  4866. const bulletYawDiff = radianAngleDiff(yaw, bulletYaw)
  4867. const bulletPitchDiff = radianAngleDiff(pitch, bulletPitch);
  4868. //log("current accuracy: ",accuracy)
  4869. //log("input yaw: ",yaw)
  4870. //log("input pitch: ",pitch)
  4871. //log("calculated bullet yaw: ",bulletYaw)
  4872. //log("calculated bullet pitch: ",bulletPitch)
  4873. //log("therefore yaw diff: ",bulletYawDiff)
  4874. //log("therefore pitch diff: ",bulletPitchDiff)
  4875. return [bulletYawDiff, bulletPitchDiff];
  4876. };
  4877. const values = [];
  4878. // log("generating bloom for ", amountToGenerate, " shots");
  4879. for (var i = 0; i < amountToGenerate; i++) {
  4880. values.push(generateSeed());
  4881. };
  4882. //create average:
  4883. let bulletYawDiff = 0;
  4884. let bulletPitchDiff = 0;
  4885. for (var i = 0; i < amountToGenerate; i++) {
  4886. bulletYawDiff += values[i][0];
  4887. bulletPitchDiff += values[i][1];
  4888. };
  4889. bulletYawDiff /= amountToGenerate;
  4890. bulletPitchDiff /= amountToGenerate;
  4891. return [bulletYawDiff, bulletPitchDiff];
  4892. };
  4893. const applyBloom = function (dir, multiplier) { //multiplier can be set to -1 to invert
  4894. const bloomValues = predictBloom(dir.yawReal, dir.pitchReal);
  4895. return {
  4896. yawReal: dir.yawReal + (bloomValues[0] * multiplier),
  4897. pitchReal: dir.pitchReal + (bloomValues[1] * multiplier),
  4898. };
  4899. };
  4900. var velocityVector, newPos, cappedVector, rayVector; //assuming that reusing doesnt leak memory
  4901. const predictPosition = function (player) { //outputs the prediction for where a player will be in the time it takes for a bullet to reach them
  4902. velocityVector = velocityVector || new L.BABYLON.Vector3(0, 0, 0);
  4903. velocityVector.x = player.dx; velocityVector.y = player.dy; velocityVector.z = player.dz;
  4904. const bulletSpeed = ss.MYPLAYER.weapon.constructor.velocity;
  4905. const timeDiff = distancePlayers(player, 1) / bulletSpeed + 1;
  4906. newPos = newPos || new L.BABYLON.Vector3(0, 0, 0)
  4907. newPos.x = player[H.x], newPos.y = player[H.y], newPos.z = player[H.z],
  4908. newPos = newPos.add(velocityVector.scale(timeDiff));
  4909. newPos.y = player[H.y];
  4910. cappedVector = cappedVector || new L.BABYLON.Vector3(0, 0, 0);
  4911. cappedVector.x = velocityVector.x, cappedVector.y = 0.29, cappedVector.z = velocityVector.z;
  4912. Math.capVector3(cappedVector);
  4913. const terminalVelocity = -cappedVector.y;
  4914. const timeAccelerating = Math.min(timeDiff, (terminalVelocity - velocityVector.y) / -0.012);
  4915. if(player.onGround==0){ //if player on ground we don't need to predict y because it's gonna stay same. the new pos y value has already been set to current y so no need to do anything when on ground.
  4916. const predictedY = velocityVector.y * timeAccelerating + timeAccelerating * (timeAccelerating) * -0.012 / 2 + newPos.y + terminalVelocity * Math.max(timeDiff - timeAccelerating, 0);
  4917. rayVector = rayVector || new L.BABYLON.Vector3(0, 0, 0);
  4918. rayVector.x = 0, rayVector.y = predictedY - newPos.y, rayVector.z = 0;
  4919. const rayToGround = ss.RAYS[H.rayCollidesWithMap](newPos, rayVector, ss.RAYS.grenadeCollidesWithCell);
  4920. newPos.y = Math.max(rayToGround ? rayToGround.pick.pickedPoint.y : 0, predictedY) - 0.072;
  4921. }
  4922. // log(velocityVector, bulletSpeed, timeDiff, cappedVector, terminalVelocity, timeAccelerating, predictedY, rayToGround, newPos);
  4923. return newPos;
  4924. };
  4925. const getLineOfSight = function (target, usePrediction) { //returns true if no wall collisions
  4926. // credit for code: de_neuublue/crackware
  4927. if (target && target[H.actor] && target[H.actor][H.bodyMesh] && target[H.actor][H.bodyMesh].renderOverlay && target[H.actor][H.bodyMesh].overlayColor.g == 1) return; //check if player is spawned in fully
  4928. let myPlayerPosition = ss.MYPLAYER[H.actor][H.mesh].position;
  4929. let targetPosition = extract("prediction") ? predictPosition(target) : target[H.actor][H.mesh].position; //set to always use prediction for now
  4930. // let targetPosition = usePrediction ? predictPosition(target) : target[H.actor][H.mesh].position;
  4931. let directionVector = getDirectionVectorFacingTarget(targetPosition, true);
  4932. //NOTE: i dont really know HOW good this is of a fix! at least it will only affect aimbot and not anything else :pensive:
  4933. directionVector.x = -directionVector.x;
  4934. directionVector.y = -directionVector.y;
  4935. directionVector.z = -directionVector.z;
  4936. let rotationMatrix = L.BABYLON.Matrix.RotationYawPitchRoll(calculateYaw(directionVector), calculatePitch(directionVector), 0);
  4937. let directionMatrix = L.BABYLON.Matrix.Translation(0, 0, ss.MYPLAYER.weapon.constructor.range).multiply(rotationMatrix);
  4938. directionVector = directionMatrix.getTranslation();
  4939. let position = L.BABYLON.Matrix.Translation(0, .1, 0).multiply(rotationMatrix).add(L.BABYLON.Matrix.Translation(myPlayerPosition.x, myPlayerPosition.y + 0.3, myPlayerPosition.z)).getTranslation();
  4940. let rayCollidesWithMap = ss.RAYS[H.rayCollidesWithMap](position, directionVector, ss.RAYS.projectileCollidesWithCell);
  4941. let distanceToMap = rayCollidesWithMap ? L.BABYLON.Vector3.DistanceSquared(position, rayCollidesWithMap.pick.pickedPoint) : Infinity;
  4942. let distanceToTarget = L.BABYLON.Vector3.DistanceSquared(position, targetPosition)
  4943. return distanceToTarget < distanceToMap
  4944. };
  4945. const getAimbot = function (target) {
  4946. let targetPosition = extract("prediction") ? predictPosition(target) : target[H.actor][H.mesh].position;
  4947. let directionVector = getDirectionVectorFacingTarget(targetPosition, true, -0.05);
  4948. let direction = {
  4949. yawReal: calculateYaw(directionVector),
  4950. pitchReal: calculatePitch(directionVector),
  4951. };
  4952. if (extract("antiBloom")) {
  4953. direction = applyBloom(direction, 1);
  4954. };
  4955. return direction;
  4956. };
  4957. var v1grenade, v2grenade, v3grenade, finalPos;
  4958. const predictGrenade = function (player = ss.MYPLAYER, grenadeThrowPower = 0) {
  4959. var rotMat = L.BABYLON.Matrix.RotationYawPitchRoll(player[H.yaw], -player[H.pitch], 0);
  4960. var vec = L.BABYLON.Matrix.Translation(0, .1, 1).multiply(rotMat).getTranslation();
  4961. var posMat = L.BABYLON.Matrix.Translation(0, -.10, -.1);
  4962. var pos = (posMat = (posMat = posMat.multiply(rotMat)).add(L.BABYLON.Matrix.Translation(player[H.x], player[H.y] + 0.3, player[H.z]))).getTranslation();
  4963. var speed = .13 * grenadeThrowPower + .08;
  4964. vec.x *= speed;
  4965. vec.y *= speed;
  4966. vec.z *= speed;
  4967. pos.x = Math.floor(256 * pos.x) / 256;
  4968. pos.y = Math.floor(256 * pos.y) / 256;
  4969. pos.z = Math.floor(256 * pos.z) / 256;
  4970. vec.x = Math.floor(256 * vec.x) / 256;
  4971. vec.y = Math.floor(256 * vec.y) / 256;
  4972. vec.z = Math.floor(256 * vec.z) / 256;
  4973. v1grenade = v1grenade || new L.BABYLON.Vector3();
  4974. v2grenade = v2grenade || new L.BABYLON.Vector3();
  4975. v3grenade = v3grenade || new L.BABYLON.Vector3();
  4976. var ttl = 75;
  4977. var resting = false;
  4978. var active = true;
  4979. var grenadeCollidesWithCell = ss.RAYS.grenadeCollidesWithCell;
  4980. var rayCollidesWithMap = ss.RAYS[H.rayCollidesWithMap];
  4981. var x = pos.x;
  4982. var y = pos.y;
  4983. var z = pos.z;
  4984. var dx = -vec.x*2;
  4985. var dy = vec.y*2;
  4986. var dz = -vec.z*2;
  4987. const update = function () {
  4988. // log("update", 1)
  4989. if (ttl <= 0) {
  4990. active = false;
  4991. return;
  4992. };
  4993. // log("update", 2)
  4994. if (!resting) {
  4995. var pdx2 = dx;
  4996. var pdy = dy;
  4997. var pdz2 = dz;
  4998. var ndx = 0.5 * (dx + pdx2);
  4999. var ndy = 0.5 * (dy + pdy);
  5000. var ndz = 0.5 * (dz + pdz2);
  5001. var vel = Math.length3(ndx, ndy, ndz);
  5002. // log("update", 3)
  5003. if (!collidesWithMap()) {
  5004. x += ndx;
  5005. y += ndy;
  5006. z += ndz;
  5007. dy -= 0.012;
  5008. // log("update", 4)
  5009. };
  5010. // log("update", 5)
  5011. dx *= 0.96;
  5012. dz *= 0.96;
  5013. };
  5014. };
  5015. const collidesWithMap = function () {
  5016. // log("collidesWithMap", 1)
  5017. v1grenade.set(x, y - 0.07, z);
  5018. v2grenade.set(dx, dy, dz);
  5019. v3grenade.set(dx, dy, dz);
  5020. // log("collidesWithMap", 2)
  5021. var res = rayCollidesWithMap(v1grenade, v2grenade, grenadeCollidesWithCell);
  5022. // log("collidesWithMap", 3)
  5023. if (res) {
  5024. // log("collidesWithMap", 3)
  5025. if (res.normal.y == 1 && v3grenade.length() < 0.05) {
  5026. // log("collidesWithMap", 4)
  5027. resting = true;
  5028. } else {
  5029. // log("collidesWithMap", 5)
  5030. v3grenade.subtractInPlace(res.normal.scale(1.6 * res.dot));
  5031. dx = v3grenade.x * 0.98;
  5032. dy = v3grenade.y;
  5033. dz = v3grenade.z * 0.98;
  5034. return res;
  5035. }
  5036. }
  5037. // log("collidesWithMap", 6)
  5038. return false;
  5039. };
  5040. // log(
  5041. // "pos", {
  5042. // x, y, z
  5043. // },
  5044. // "velocity", {
  5045. // dx, dy, dz
  5046. // },
  5047. // "speed", speed,
  5048. // "vec", vec,
  5049. // "ttl", ttl,
  5050. // "resting", resting,
  5051. // "active", active
  5052. // );
  5053. var result = {
  5054. positions: [],
  5055. finalPos: null,
  5056. };
  5057. // log("about to predict grenade");
  5058. while (active || ttl > 0) {
  5059. /*
  5060. log(
  5061. "pos", {
  5062. x, y, z
  5063. },
  5064. "velocity", {
  5065. dx, dy, dz
  5066. },
  5067. "speed", speed,
  5068. "vec", vec,
  5069. "ttl", ttl,
  5070. "resting", resting,
  5071. "active", active
  5072. );
  5073. */
  5074. // log(ttl, active, 1);
  5075. result.positions.push({x, y, z});
  5076. // log(ttl, active, 2);
  5077. update();
  5078. // log(ttl, active, 3);
  5079. ttl--;
  5080. // log(ttl, active, 4);
  5081. };
  5082. finalPos = finalPos || new L.BABYLON.Vector3();
  5083. finalPos.x = x; finalPos.y = y; finalPos.z = z;
  5084. result.finalPos = finalPos;
  5085. // log(result);
  5086. return result;
  5087. };
  5088. const setupNameSpriteNew = function (actor) {
  5089. let player = actor[H.player_];
  5090. // log("hrmmmm setupNameSpriteNew", player.name);
  5091. var tx = player.id % 4 * 512;
  5092. var ty = 2048 - Math.floor(player.id / 4) * 256;
  5093. if (actor && actor?.nameSprite && actor?.nameSprite?.color) {
  5094. ss.nameTexture.clearRect(tx, ty - 256, 512, 256);
  5095. let teamColorsNameSprite = [
  5096. "white",
  5097. "rgba(0, 191, 255, 1)",
  5098. "rgba(255, 64, 64, 1)",
  5099. ];
  5100. if (extract("nametagInfo")) {
  5101. actor.drawTextOnNameTexture(
  5102. player.name, // text
  5103. 0, 32, // x/y
  5104. 50, // size
  5105. teamColorsNameSprite[player.team], // colour
  5106. true // center
  5107. );
  5108. let health = player[H.hp] + player.hardBoiledValue;
  5109. let healthColour = (player.hardBoiledValue > 0) ? "blue" : (health > 30 ? "white" : "red");
  5110. if (player[H.hp] > 100) healthColour = "green";
  5111. //health (right side)
  5112. actor.drawTextOnNameTexture(
  5113. health.toFixed(0), // text
  5114. 85, 75, // x/y
  5115. 60, // size
  5116. healthColour, // colour
  5117. true // center
  5118. );
  5119. //current kills
  5120. actor.drawTextOnNameTexture(
  5121. player.score, // text
  5122. -95, 75, // x/y
  5123. 60, // size
  5124. "yellow", // colour
  5125. true // center
  5126. );
  5127. //streak and kdr (middle top)
  5128. actor.drawTextOnNameTexture(
  5129. `${player.bestGameStreak} | ${(Math.min(player.totalKills / (player.totalDeaths || 1), 99)).toFixed(1)}`, // text
  5130. -20, 100, // x/y
  5131. 25, // size
  5132. "yellow", // colour
  5133. true // center
  5134. );
  5135. //ammo (middle bottom)
  5136. actor.drawTextOnNameTexture(
  5137. `${player.weapon.ammo.rounds} / ${player.weapon.ammo.store}`, // text
  5138. -20, 75, // x/y
  5139. 25, // size
  5140. "yellow", // colour
  5141. true // center
  5142. );
  5143. } else {
  5144. actor.drawTextOnNameTexture(
  5145. player.name, // text
  5146. 0, 32, // x/y
  5147. 60, // size
  5148. "white", // colour
  5149. true // center
  5150. );
  5151. };
  5152. };
  5153. };
  5154. /*
  5155. const updateTeamNew = function (actor, oldUpdateTeam) {
  5156. log("aaaaaa updateTeamNew");
  5157. oldUpdateTeam();
  5158. actor.nameSprite.color = ss.teamColors.textColor[0];
  5159. };
  5160. */
  5161. const injectScript = function () {
  5162. //TODO: replace with anon functions
  5163. createAnonFunction('fixCamera', function () {
  5164. return isKeyToggled[bindsArray.zoom] && (extract("zoom") * (Math.PI / 180)) || (extract("fov") * (Math.PI / 180)) || 1.25;
  5165. });
  5166. createAnonFunction('getChatLimit', function () {
  5167. return (extract("chatExtend") && 999999) || 4;
  5168. });
  5169. createAnonFunction('getDisableChatFilter', function () {
  5170. return extract("disableChatFilter");
  5171. });
  5172. createAnonFunction('getSkinHack', function () {
  5173. try {
  5174. return extract("unlockSkins");
  5175. } catch {
  5176. return false;
  5177. };
  5178. });
  5179. createAnonFunction('getAdminSpoof', function () {
  5180. try {
  5181. return extract('adminSpoof');
  5182. } catch {
  5183. return false;
  5184. };
  5185. });
  5186. createAnonFunction('shouldNotCull', function () {
  5187. return true;
  5188. });
  5189. createAnonFunction('shouldInputSpace', function () {
  5190. return !document.activeElement.classList.contains('tp-txtv_i');
  5191. });
  5192. createAnonFunction('getPointerEscape', function () {
  5193. let verdict = (sneakyDespawning ? false : (noPointerPause || (unsafeWindow.extern.inGame && !document.getElementById("healthContainer").style.display == 'block')));
  5194. // log("verdict", verdict, sneakyDespawning, (noPointerPause || (unsafeWindow.extern.inGame && !document.getElementById("healthContainer").style.display == 'block')), noPointerPause, unsafeWindow.extern.inGame, !document.getElementById("healthContainer").style.display == 'block');
  5195. return verdict;
  5196. });
  5197. createAnonFunction('setNewGame', function () {
  5198. newGame = true; log("NEWGAME");
  5199. timeJoinedGame = Date.now();
  5200. if (ss.SCENE && ss.SCENE.skyboxTextureThing) ss.SCENE.skyboxTextureThing = false;
  5201. });
  5202. createAnonFunction('realPlayerData', function (playerData) {
  5203. cachedRealData[playerData[H.uniqueId_]] = {
  5204. name: playerData[H.name_],
  5205. uniqueId: playerData[H.uniqueId_],
  5206. };
  5207. });
  5208. createAnonFunction('interceptSignedIn', function (args) {
  5209. // try {
  5210. // if (extract("debug")) log("signedIn", args);
  5211. // } catch (error) {
  5212. // };
  5213. });
  5214. createAnonFunction('interceptGa', function () {
  5215. // log(arguments);
  5216. if (arguments['3'] == 'Reward item') {
  5217. let itemName = arguments['4'].slice(0, -4);
  5218. let tier = arguments['4'].slice(-1);
  5219. let accountRecords = GM_getValue("StateFarm_AccountRecords") || {};
  5220. let itemCount = 0;
  5221. Object.entries(accountRecords).forEach(([key, account]) => {
  5222. if (account) {
  5223. account.inventory.forEach(item=>{
  5224. if (item.name == itemName) {
  5225. itemCount++
  5226. };
  5227. });
  5228. };
  5229. });
  5230. log(`[${unsafeWindow.extern.account.inventory.length}, ${unsafeWindow.extern.account.currentBalance}] SFcw result: item: ${itemName} is tier ${tier} (${itemCount} of this item)`);
  5231. let tierCache = GM_getValue("StateFarm_TierCache") || {};
  5232. tierCache[itemName] = tier;
  5233. GM_setValue("StateFarm_TierCache", tierCache);
  5234. if (extract("chickenWinnerNotifs")) {
  5235. let isSlightlyRare = Number(tier) >= 4;
  5236. createPrompt(`Chicken Winner:\nYou won: ${itemName} [T${tier}]\n\n${isSlightlyRare ? "High value item! GG." : "Low value item."}`, [], 10e3);
  5237. if (isSlightlyRare) BAWK.play("challenge_notify");
  5238. };
  5239. };
  5240. if (arguments['3'] == 'Reward amount') {
  5241. let eggs = arguments['4'];
  5242. log(`[${unsafeWindow.extern.account.inventory.length}, ${unsafeWindow.extern.account.currentBalance}] SFcw result: eggs: ${eggs}`);
  5243. if (extract("chickenWinnerNotifs")) {
  5244. let isSlightlyRare = eggs >= 1000;
  5245. createPrompt(`Chicken Winner:\nYou won: ${eggs} eggs.\n\n${isSlightlyRare ? "High egg amount! GG." : "Low egg amount."}`, [], 10e3);
  5246. if (isSlightlyRare) BAWK.play("challenge_notify");
  5247. };
  5248. };
  5249. if (arguments['3'] == 'Reward') {
  5250. log(`[${unsafeWindow.extern.account.inventory.length}, ${unsafeWindow.extern.account.currentBalance}] SFcw reward: ${arguments['4']}`);
  5251. };
  5252. if (!extract("noTrack")) oldGa.apply(this, arguments); //does google really need to know that we cracked the egg in the middle instead of the one on the right?
  5253. });
  5254. createAnonFunction('interceptDeath', (KILLER, DEAD) => {
  5255. if (DEAD.name === KILLER.name === ss.MYPLAYER.name) return; // killed self (with grenade)
  5256. if (DEAD.name == ss.MYPLAYER.name) { // you died
  5257. if (extract("cheatAccuse")) sendChatMessage(`${KILLER.name} might be cheating, everyone report`);
  5258. } else if (KILLER.name == ss.MYPLAYER.name) { // you killed someone
  5259. unsafeWindow.BAWK.play("on_killed_enemy");
  5260. if (extract("autoEZ")) sendChatMessage(`imagine dying ${DEAD.name}, couldn't be me`);
  5261. };
  5262. });
  5263. createAnonFunction('interceptDrawTextOnNameTexture', (nameTexture, args, player) => {
  5264. // log("balls", args[0], player, nameTexture, [args]);
  5265. nameTextures[args[0]] = [nameTexture, [args]];
  5266. });
  5267. createAnonFunction('interceptAudio', function (name, panner, somethingelse) {
  5268. // log(0, name, panner, somethingelse);
  5269. let customAudio = soundsSFC[name];
  5270. if (panner && panner.positionX && extract("distanceMult") !== 1) {
  5271. panner.setPosition(
  5272. panner.context.listener.positionX.value - ((panner.context.listener.positionX.value - panner.positionX.value) * extract("distanceMult")),
  5273. panner.context.listener.positionY.value - ((panner.context.listener.positionY.value - panner.positionY.value) * extract("distanceMult")),
  5274. panner.context.listener.positionZ.value - ((panner.context.listener.positionZ.value - panner.positionZ.value) * extract("distanceMult")),
  5275. );
  5276. };
  5277. if (extract("muteGame")) {
  5278. name = "silence";
  5279. } else if (customAudio) {
  5280. if (customAudio.disablePanning) {
  5281. playAudio(name);
  5282. } else {
  5283. playAudio(name, panner);
  5284. };
  5285. name = "silence";
  5286. };
  5287. return [name, panner, somethingelse];
  5288. });
  5289. createAnonFunction('beforeFiring', function (MYPLAYER) {
  5290. if (extract("aimbot") && (extract("aimbotRightClick") ? isRightButtonDown : true) && (targetingComplete || extract("silentAimbot")) && ss.MYPLAYER[H.playing] && currentlyTargeting && currentlyTargeting[H.playing]) {
  5291. const aimbot = getAimbot(currentlyTargeting);
  5292. // credit for code: de_neuublue
  5293. let diffYaw = Math.radDifference(ss.MYPLAYER[H.yaw], aimbot.yawReal) * 180 / Math.PI;
  5294. let diffPositive = diffYaw > 0 // a turn to the left if positive
  5295. diffYaw *= diffPositive ? 1 : -1;
  5296. for (let i = 0; i < 3; i++) {
  5297. let state = ss.MYPLAYER[H.stateBuffer][Math.mod(ss.MYPLAYER.stateIdx - i, 256)];
  5298. let newControlKeys = 0;
  5299. if (diffYaw > 157.5) {
  5300. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.left ? ss.CONTROLKEYSENUM.right : 0
  5301. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.right ? ss.CONTROLKEYSENUM.left : 0
  5302. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.up ? ss.CONTROLKEYSENUM.down : 0
  5303. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.down ? ss.CONTROLKEYSENUM.up : 0
  5304. } else if (diffYaw > 112.5) {
  5305. if (diffPositive) {
  5306. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.left ? ss.CONTROLKEYSENUM.up + ss.CONTROLKEYSENUM.right : 0
  5307. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.right ? ss.CONTROLKEYSENUM.down + ss.CONTROLKEYSENUM.left : 0
  5308. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.up ? ss.CONTROLKEYSENUM.down + ss.CONTROLKEYSENUM.right : 0
  5309. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.down ? ss.CONTROLKEYSENUM.up + ss.CONTROLKEYSENUM.left : 0
  5310. } else {
  5311. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.left ? ss.CONTROLKEYSENUM.down + ss.CONTROLKEYSENUM.right : 0
  5312. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.right ? ss.CONTROLKEYSENUM.up + ss.CONTROLKEYSENUM.left : 0
  5313. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.up ? ss.CONTROLKEYSENUM.down + ss.CONTROLKEYSENUM.left : 0
  5314. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.down ? ss.CONTROLKEYSENUM.up + ss.CONTROLKEYSENUM.right : 0
  5315. }
  5316. } else if (diffYaw > 67.5) {
  5317. if (diffPositive) {
  5318. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.left ? ss.CONTROLKEYSENUM.up : 0
  5319. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.right ? ss.CONTROLKEYSENUM.down : 0
  5320. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.up ? ss.CONTROLKEYSENUM.right : 0
  5321. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.down ? ss.CONTROLKEYSENUM.left : 0
  5322. } else {
  5323. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.left ? ss.CONTROLKEYSENUM.down : 0
  5324. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.right ? ss.CONTROLKEYSENUM.up : 0
  5325. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.up ? ss.CONTROLKEYSENUM.left : 0
  5326. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.down ? ss.CONTROLKEYSENUM.right : 0
  5327. }
  5328. } else if (diffYaw > 22.5) {
  5329. if (diffPositive) {
  5330. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.left ? ss.CONTROLKEYSENUM.up + ss.CONTROLKEYSENUM.left : 0
  5331. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.right ? ss.CONTROLKEYSENUM.down + ss.CONTROLKEYSENUM.right : 0
  5332. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.up ? ss.CONTROLKEYSENUM.up + ss.CONTROLKEYSENUM.right : 0
  5333. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.down ? ss.CONTROLKEYSENUM.down + ss.CONTROLKEYSENUM.left : 0
  5334. } else {
  5335. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.left ? ss.CONTROLKEYSENUM.down + ss.CONTROLKEYSENUM.left : 0
  5336. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.right ? ss.CONTROLKEYSENUM.up + ss.CONTROLKEYSENUM.right : 0
  5337. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.up ? ss.CONTROLKEYSENUM.up + ss.CONTROLKEYSENUM.left : 0
  5338. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.down ? ss.CONTROLKEYSENUM.down + ss.CONTROLKEYSENUM.right : 0
  5339. };
  5340. };
  5341. // log(ss.CONTROLKEYS, newControlKeys);
  5342. state.controlKeys |= newControlKeys;
  5343. state[H.yaw] = setPrecision(aimbot.yawReal);
  5344. state[H.pitch] = setPrecision(aimbot.pitchReal);
  5345. ss.MYPLAYER[H.stateBuffer][Math.mod(ss.MYPLAYER.stateIdx - i, 256)] = state;
  5346. };
  5347. if(extract("aimbSemiSilent") && extract("silentAimbot")){
  5348. ss.MYPLAYER[H.yaw] = getAimbot(currentlyTargeting).yawReal;
  5349. ss.MYPLAYER[H.pitch] = getAimbot(currentlyTargeting).pitchReal;
  5350. }
  5351. log("force update?");
  5352. ss.SERVERSYNC();
  5353. };
  5354. });
  5355. createAnonFunction('onConnectFail', function (ERRORCODE, ERRORARRAY) {
  5356. const terminationMessage = findKeyByValue(ERRORARRAY, ERRORCODE); //don't want to fuck with errorString so here's a new var!
  5357. if (ERRORCODE !== ERRORARRAY.mainMenu) {
  5358. errorString = terminationMessage;
  5359. log("StateFarm has detected a connection error...", errorString, ERRORCODE, ERRORARRAY);
  5360. if (document.getElementById("genericPopup").textContent === ' Game Not Found Sorry! This game ID is either invalid, or no longer exists. OK ') {
  5361. document.getElementById("genericPopup").children[1].textContent = 'joinCode not found! check your autoJoin settings and get a new code';
  5362. document.getElementById("genericPopup").children[2].children[1].textContent = "heeheeheehaw";
  5363. document.getElementById("genericPopup").children[0].children[1].textContent = 'MAKE NEW AUTOJOIN CODE';
  5364. };
  5365. if (extract("autoUnban") && (errorString == "sessionNotFound" || errorString == "readyBeforeReady")) {
  5366. if (!attemptedAutoUnban) {
  5367. isBanned = true;
  5368. } else if (isBanned) {
  5369. log("StateFarm: Gonna refresh, could be banned but you can't play with this error anyways.");
  5370. createPopup("AutoUnban: Reloading page in 5 seconds...");
  5371. attemptedAutoUnban = true;
  5372. setTimeout(() => {
  5373. if (extract("autoUnban")) { //you get a bit of time to stop it
  5374. createPopup("AutoUnban: Reloading page now.");
  5375. reloadPage(); attemptedAutoUnban = false;
  5376. } else {
  5377. createPopup("AutoUnban: Reload page cancelled.");
  5378. };
  5379. }, 5000);
  5380. };
  5381. };
  5382. createPopup("Leaving due to connection error " + ERRORCODE + " (" + errorString + ")" + ".");
  5383. change("leaveGame");
  5384. };
  5385. //GAME HISTORY gr
  5386. if(!GAMECODE || GAMECODE==undefined) return;
  5387. const HISTORY_MAX_ENTRIES = 6;
  5388. let history = GM_getValue("StateFarm_GameHistory");
  5389. if(history) history = JSON.parse(history); //should be an ARRAY kxdnfgoisdhngfiosdhjgoisdhgfjo
  5390. if(!history) history = [];
  5391. const recent = history[0]; // first indeX
  5392. if(history.length>0 && recent.code && recent.code == GAMECODE){
  5393. ++recent.amount;
  5394. recent.time = Date.now();
  5395. recent.message = terminationMessage;
  5396. recent.closeCode = ERRORCODE;
  5397. } else {
  5398. const arrElem = {
  5399. amount: 1,
  5400. code: GAMECODE,
  5401. string: getRoomAsString(),
  5402. time: Date.now(),
  5403. message: terminationMessage,
  5404. closeCode: ERRORCODE
  5405. };
  5406. history.unshift(arrElem);
  5407. }
  5408. while(history.length > HISTORY_MAX_ENTRIES) history.pop();
  5409. GM_setValue("StateFarm_GameHistory", JSON.stringify(history));
  5410. });
  5411. createAnonFunction('modifyChat', function (msg) {
  5412. if (msg[0] === '%') { //message is a command
  5413. let command = msg.slice(1);
  5414. msg = ""; //dont send anything
  5415. if (command != "pts") {
  5416. broadcastToBots(command);
  5417. } else {
  5418. handleCommand('pathtarget set 9 1 9')
  5419. }
  5420. } else {
  5421. if (msg !== lastSentMessage) { //not spammed or afked
  5422. //NOTE: never, NEVER, never under any otherworldly circumstances use Notepad++ for editing nested stuff like this. IT WILL FUCK UP THE FORMATTING
  5423. //ITS STILL FUCKED UP IN THE GH EDITOR WTF PLEASE END ME
  5424. //TODO: FIX THIS FUCKING FORMATTING fuckfuckFUCK
  5425. if(extract("chatFilterBypass")) msg=msg.replaceAll("fuck", "ꬵսсk"); //special case bc they check f.ck; this basically just gets the f from the nonexacts.
  5426. if (extract("chatFilterBypass") && ss.isBadWord(msg)) { //apply filter bypass
  5427. //#freedomOfSpeech #againstInternetCensorship
  5428. //Bl*e W*zard D*gital will not c*nsor me!!!!!
  5429. const exactLookAlikes = {
  5430. //(almost) exact lookalikes, will make it look better if it is enough
  5431. 'a': 'а', 'c': 'с', 'e': 'е',
  5432. 'h': 'հ', 'i': 'і', 'j': 'ј',
  5433. 'n': '𝗇', 'o': 'о', 'p': 'р',
  5434. 'q': 'q', 'u': 'ս', 'w': 'ԝ',
  5435. 'y': 'у',
  5436. //uppercase
  5437. 'B': 'В', 'D': 'ꓓ', 'E': 'Е',
  5438. 'H': 'Η', 'I': 'І', 'J': 'Ј',
  5439. 'U': '𐓎',
  5440. 'V': 'ⴸ', 'W': 'Ԝ', 'X': 'Χ', 'Y': 'Υ',
  5441. 'Z': 'Ζ',
  5442. };
  5443. const lookAlikes = {
  5444. //nvm, found this complete list on reddit: https://www.reddit.com/r/Unicode/comments/gpgmb7/unique_unicode_chars_that_look_the_exact_same_as/
  5445. //should literally cover 100% of the thing now, still keeping fallback though
  5446. '0': 'O',
  5447. '1': '𝟷', '2': '𝟸', '3': 'Ꝫ', '4': '4',
  5448. '5': '𝟻', '6': '𝟨', '7': '𝟽', '8': '𝟪',
  5449. '9': '𝟫', '@': '@',
  5450. 'b': 'ᖯ',
  5451. 'd': '𝚍', 'f': 'ꬵ', 'g': '𝗀',
  5452. 'k': '𝚔',
  5453. 'l': 'ⅼ', 'm': 'm', 'r': '𝗋', 's': '𐑈',
  5454. 't': '𝚝', 'v': '∨',
  5455. 'x': 'ⅹ', 'z': '𝗓', 'A': '𐊠',
  5456. 'C': '𐊢',
  5457. 'F': '𐊇', 'G': 'Ԍ', 'K': 'Κ', 'L': 'Ⅼ', 'M': 'Μ',
  5458. 'N': 'Ν', 'O': 'Ο', 'P': 'Ρ', 'Q': '𝖰',
  5459. 'R': '𖼵', 'S': 'Ѕ', 'T': 'Τ',
  5460. };
  5461. let onlyReplace = msg;
  5462. //exact
  5463. for (let char in exactLookAlikes) {
  5464. //replace all chars with lookalikes
  5465. onlyReplace = onlyReplace.replaceAll(char, exactLookAlikes[char]);
  5466. };
  5467. //did that work?
  5468. if(ss.isBadWord(onlyReplace)){
  5469. log("chatFilterBypass: exacts were not enough, trying full...");
  5470. for (let char in lookAlikes) {
  5471. onlyReplace = onlyReplace.replaceAll(char, lookAlikes[char]);
  5472. };
  5473. };
  5474. if(!ss.isBadWord(onlyReplace)){
  5475. //did the lookalike replace do the job? Set it as the new message
  5476. log("chatFilterBypass: lookalike replace worked!");
  5477. msg = onlyReplace;
  5478. };
  5479. if(ss.isBadWord(onlyReplace)){
  5480. //if lookalike replace did NOT work, we use the old method.
  5481. log("chatFilterBypass: lookalike did NOT work, falling back to reverse...");
  5482. const UNICODE_RTL_OVERRIDE = '\u202e'
  5483. msg = ([UNICODE_RTL_OVERRIDE,].concat(reverseString(msg).split(""))).join("");
  5484. };
  5485. };
  5486. };
  5487. if (extract("tallChat") && !(msg.includes("᥊"))) {
  5488. msg = msg + "᥊";
  5489. };
  5490. };
  5491. return msg;
  5492. });
  5493. createAnonFunction('modifyControls', function (CONTROLKEYS) {
  5494. // if (AUTOMATED) { CONTROLKEYS=0 };
  5495. if (startUpComplete) {
  5496. if (forceControlKeys) {
  5497. forceControlKeysCache = true;
  5498. return forceControlKeys;
  5499. } else if (forceControlKeysCache) {
  5500. forceControlKeysCache = false;
  5501. return 0;
  5502. } else {
  5503. if (extract("autoWalk")) { CONTROLKEYS |= ss.CONTROLKEYSENUM.up };
  5504. // credit for code: de_neuublue
  5505. if (extract("bunnyhop") && isKeyToggled.Space) {
  5506. CONTROLKEYS |= ss.CONTROLKEYSENUM.jump;
  5507. };
  5508. if (extract("autoJump")) {
  5509. if (Date.now() > (lastAutoJump + extract("autoJumpDelay"))) {
  5510. CONTROLKEYS |= ss.CONTROLKEYSENUM.jump;
  5511. lastAutoJump = Date.now();
  5512. };
  5513. };
  5514. if (extract("autoStrafe")) {
  5515. if (Date.now() > (autoStrafeValue[0])) {
  5516. if (autoStrafeValue[1] == 0) { //decide new strafe delay
  5517. autoStrafeValue[0] = Date.now() + randomInt(500, 3000);
  5518. autoStrafeValue[2] = (Math.random() > 0.5) ? "left" : "right";
  5519. autoStrafeValue[1] = 1;
  5520. } else if (autoStrafeValue[1] == 1) { //time to start strafe
  5521. autoStrafeValue[3] = Date.now() + randomInt(500, 2000);
  5522. autoStrafeValue[1] = 2;
  5523. } else if (autoStrafeValue[1] == 2 && Date.now() < autoStrafeValue[3]) { //do strafe
  5524. CONTROLKEYS |= ss.CONTROLKEYSENUM[autoStrafeValue[2]];
  5525. } else if (autoStrafeValue[1] == 2) { //stop strafe
  5526. CONTROLKEYS &= ~ss.CONTROLKEYSENUM.left;
  5527. CONTROLKEYS &= ~ss.CONTROLKEYSENUM.right;
  5528. autoStrafeValue[1] = 0;
  5529. };
  5530. };
  5531. };
  5532. return CONTROLKEYS;
  5533. };
  5534. };
  5535. });
  5536. createAnonFunction('adBlocker', function (input) {
  5537. try {
  5538. if (input == 10 && sneakyDespawning) {
  5539. return 1;
  5540. } else if (extract("adBlock")) {
  5541. if (typeof (input) == 'boolean') {
  5542. return true;
  5543. } else if (input == 10) {
  5544. return 5;
  5545. } else if (input == "adsBlocked") {
  5546. return false;
  5547. };
  5548. };
  5549. return input;
  5550. } catch (error) {
  5551. return true;
  5552. };
  5553. });
  5554. createAnonFunction("quickRespawn", function (input) {
  5555. if (input == 3e3) {
  5556. return sneakyDespawning ? 0 : 3e3;
  5557. } else if (input == 5 && sneakyDespawning) {
  5558. return 1;
  5559. } else if (extract("quickRespawn")) {
  5560. if (input == 5) {
  5561. return 4;
  5562. };
  5563. };
  5564. return input;
  5565. });
  5566. createAnonFunction("getInstantSpectateEnterSpectatorModeBlocked", function (enterSpectatorModeBlocked) {
  5567. return extract("instantSpectate") ? false : enterSpectatorModeBlocked;
  5568. });
  5569. createAnonFunction("getInstantSpectateRespawnTime", function (respawnTime) {
  5570. return extract("instantSpectate") ? -1 : respawnTime;
  5571. });
  5572. createAnonFunction('gameBlacklisted', function (t) {
  5573. let result = false;
  5574. if (blacklistedGameCodes.length >= 1) {
  5575. blacklistedGameCodes.forEach(function (code) {
  5576. if (t.id == code) {
  5577. log("Blacklisted Game: ", t.id, code);
  5578. result = true;
  5579. return true;
  5580. }
  5581. });
  5582. };
  5583. return extract('gameBlacklist') == false || extract('gameBlacklist') == undefined ? false : result;
  5584. });
  5585. createAnonFunction("getParticleSpeedMultiplier", function(){
  5586. return extract("particleSpeedMultiplier");
  5587. });
  5588. const originalXHROpen = XMLHttpRequest.prototype.open; //wtf??? libertymutual collab??????
  5589. const originalXHRGetResponse = Object.getOwnPropertyDescriptor(XMLHttpRequest.prototype, 'response');
  5590. let shellshockjs;
  5591. XMLHttpRequest.prototype.open = function (...args) { //outgoing
  5592. const url = args[1];
  5593. try {
  5594. if (extract("debug")) log("====XMLHTTPREQUEST====", url, args);
  5595. } catch (error) { }; //phooey.
  5596. if (url) {
  5597. let refresh = `?${Date.now()}`;
  5598. if (url.includes("js/shellshock.js")) shellshockjs = this;
  5599. let replaceFeeds = false;
  5600. try {
  5601. replaceFeeds = extract("replaceFeeds");
  5602. } catch (error) { };
  5603. if (replaceFeeds) {
  5604. if (url.includes("data/shellYouTube.json")) args[1] = replacementFeedURL+"shellYouTube.json"+refresh;
  5605. else if (url.includes("data/shellNews.json")) args[1] = replacementFeedURL+"shellNews.json"+refresh;
  5606. };
  5607. };
  5608. originalXHROpen.apply(this, args);
  5609. };
  5610. Object.defineProperty(XMLHttpRequest.prototype, 'response', { //incoming
  5611. get: function () {
  5612. if (this === shellshockjs) {
  5613. return applyStateFarm(originalXHRGetResponse.get.call(this));
  5614. };
  5615. return originalXHRGetResponse.get.call(this);
  5616. }
  5617. });
  5618. function sha256(str) {
  5619. const utf8 = new TextEncoder().encode(str);
  5620. const k = Uint32Array.of(
  5621. 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
  5622. 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
  5623. 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
  5624. 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,
  5625. 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
  5626. 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
  5627. 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,
  5628. 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2
  5629. );
  5630. let h = Uint32Array.of(
  5631. 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a,
  5632. 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19
  5633. );
  5634. const pad = new Uint8Array(((utf8.length + 9) & ~63) + 64);
  5635. pad.set(utf8), pad[utf8.length] = 0x80;
  5636. new DataView(pad.buffer).setUint32(pad.length - 4, utf8.length << 3, false);
  5637. let w = new Uint32Array(64),
  5638. v, i, j, a, b, c, d, e, f, g, h0, S0, S1, ch, maj, temp1, temp2;
  5639. for (i = 0; i < pad.length; i += 64) {
  5640. v = new DataView(pad.buffer, i, 64);
  5641. for (j = 0; j < 16; j++) w[j] = v.getUint32(j << 2, false);
  5642. for (; j < 64; j++) w[j] = ((w[j - 16] + (w[j - 15] >>> 7 ^ w[j - 15] << 25 ^ w[j - 15] >>> 18 ^ w[j - 15] << 14 ^ w[j - 15] >>> 3) + w[j - 7] + (w[j - 2] >>> 17 ^ w[j - 2] << 15 ^ w[j - 2] >>> 19 ^ w[j - 2] << 13 ^ w[j - 2] >>> 10)) >>> 0);
  5643. [a, b, c, d, e, f, g, h0] = h;
  5644. for (j = 0; j < 64; j++) {
  5645. S1 = (e >>> 6 | e << 26) ^ (e >>> 11 | e << 21) ^ (e >>> 25 | e << 7);
  5646. ch = (e & f) ^ (~e & g);
  5647. temp1 = (h0 + S1 + ch + k[j] + w[j]) >>> 0;
  5648. S0 = (a >>> 2 | a << 30) ^ (a >>> 13 | a << 19) ^ (a >>> 22 | a << 10);
  5649. maj = (a & b) ^ (a & c) ^ (b & c);
  5650. temp2 = (S0 + maj) >>> 0;
  5651. h0 = g, g = f, f = e, e = (d + temp1) >>> 0, d = c, c = b, b = a, a = (temp1 + temp2) >>> 0;
  5652. }
  5653. h[0] += a, h[1] += b, h[2] += c, h[3] += d, h[4] += e, h[5] += f, h[6] += g, h[7] += h0;
  5654. }
  5655. return h.reduce((s, x) => s + x.toString(16).padStart(8, '0'), '');
  5656. }
  5657. const applyStateFarm = function (js) {
  5658. log('%cATTEMPTING TO START STATEFARM', 'color: magenta; font-weight: bold; font-size: 1.5em; text-decoration: underline;');
  5659. let match;
  5660. let clientKeys;
  5661. let originalJS = js;
  5662. if (crackedShell) originalJS = fetchTextContent('/js/shellshock.og.js');
  5663. const getVardata = function (hash) {
  5664. return fetchTextContent(clientKeysURL + hash + ".json?v=" + Date.now());
  5665. };
  5666. hash = sha256(originalJS);
  5667. onlineClientKeys = getVardata(hash);
  5668. const vardataCache = GM_getValue("StateFarm_VarDataCache") || {};
  5669. const previousHash = GM_getValue("StateFarm_PreviousHash") || "";
  5670. if (onlineClientKeys == "value_undefined" || onlineClientKeys == null) {
  5671. onlineClientKeys = getVardata("latest");
  5672. const vardataFallback = extract("vardataFallback");
  5673. const customVarData = extract("vardataCustom");
  5674. let vardataType = extract("vardataType");
  5675. if (vardataType == "justOnce") change("vardataType", 0);
  5676. if (vardataType == "nextHash" && hash !== previousHash) {
  5677. change("vardataType", 0);
  5678. vardataType = "never";
  5679. };
  5680. let convertedCustom;
  5681. try {
  5682. convertedCustom = JSON.parse(customVarData);
  5683. log("did convert");
  5684. } catch (e) {
  5685. log("did not convert");
  5686. convertedCustom = false;
  5687. };
  5688. const cachedForHash = vardataCache && vardataCache[hash];
  5689. const cachedRecent = vardataCache && vardataCache.latest;
  5690. log(cachedForHash, cachedRecent)
  5691. if (vardataType != "never" && convertedCustom && vardataFallback == "loadCustom" && convertedCustom.vars && convertedCustom.checksum) {
  5692. clientKeys = convertedCustom;
  5693. } else if (vardataType != "never" && onlineClientKeys && vardataFallback == "loadLatest") {
  5694. //l8er dealt with
  5695. } else if (vardataType != "never" && cachedForHash && vardataFallback == "loadCached") {
  5696. clientKeys = JSON.parse(cachedForHash);
  5697. } else if (vardataType != "never" && cachedRecent && vardataFallback == "loadRecent") {
  5698. clientKeys = JSON.parse(cachedRecent);
  5699. } else {
  5700. const vardataButtonsInfo = [
  5701. { id: 'loadLatest', enabled: !!onlineClientKeys, text: 'Load Latest\n(online)', action: () => {
  5702. change("vardataFallback", 1);
  5703. if (extract("vardataType") == "never") change("vardataType", 1);
  5704. closeVardataPopup();
  5705. }},
  5706. { id: 'loadCached', enabled: !!vardataCache[hash], text: 'Load Cached\n(this hash)', action: () => {
  5707. change("vardataFallback", 2);
  5708. if (extract("vardataType") == "never") change("vardataType", 1);
  5709. closeVardataPopup();
  5710. }},
  5711. { id: 'loadRecent', enabled: !!vardataCache.latest, text: 'Load Cached\n(most recent)', action: () => {
  5712. change("vardataFallback", 3);
  5713. if (extract("vardataType") == "never") change("vardataType", 1);
  5714. closeVardataPopup();
  5715. }}
  5716. ];
  5717. createVarDataPopup(vardataButtonsInfo);
  5718. return;
  5719. };
  5720. };
  5721. if (onlineClientKeys && !clientKeys) clientKeys = JSON.parse(onlineClientKeys);
  5722. GM_setValue("StateFarm_PreviousHash", hash);
  5723. if (vardataCache && onlineClientKeys) {
  5724. vardataCache[clientKeys.checksum] = onlineClientKeys;
  5725. vardataCache.latest = onlineClientKeys;
  5726. GM_setValue("StateFarm_VarDataCache", vardataCache);
  5727. };
  5728. // removed feature
  5729. // log("maybe they did a hash??");
  5730. // try {
  5731. // const archivedJS = fetchTextContent(`${jsArchiveURL}${userInput}.js`);
  5732. // log("did that just work??");
  5733. // js = archivedJS;
  5734. // hash = userInput.split("_")[5];
  5735. // onlineClientKeys = getVardata(hash);
  5736. // clientKeys = JSON.parse(onlineClientKeys);
  5737. // } catch {
  5738. // //at this point, fuck it. it's not happening
  5739. // };
  5740. log(hash, onlineClientKeys, clientKeys);
  5741. H = clientKeys.vars;
  5742. let injectionString = "";
  5743. try {
  5744. //SERVERSYNC
  5745. match = new RegExp(`!${H.CULL}&&(.+?\\}\\})`).exec(js);
  5746. log("SERVERSYNC:", match);
  5747. H.SERVERSYNC = match ? match[1].replace(/[a-zA-Z$_\.\[\]]+shots/, 0) : "function(){log('no serversync womp womp')}";
  5748. //PAUSE
  5749. match = new RegExp(`,setTimeout\\(\\(\\(\\)=>\\{([=A-z0-9\\(\\),\\{ \\.;!\\|\\?:\\}]+send\\([a-zA-Z$_]+\\))`).exec(js);
  5750. log("PAUSE:", match);
  5751. H.PAUSE = match ? `function(){${match[1]}}` : "function(){log('no pause womp womp')}";
  5752. const variableNameRegex = /^[a-zA-Z0-9_$\[\]"\\\.,]*$/;
  5753. for (let name in H) {
  5754. let deobf = H[name];
  5755. if (name == "SERVERSYNC" || name == "PAUSE" || variableNameRegex.test(deobf)) { //serversync should only be defined just before...
  5756. injectionString = `${injectionString}${name}: (() => { let variable = "value_undefined"; try { eval("variable = ${deobf};"); } catch (error) { return "value_undefined"; }; return variable; })(),`;
  5757. } else {
  5758. alert("Message from the StateFarm Devs: WARNING! The keys inputted contain non-variable characters! There is a possibility that this could run code unintended by the StateFarm team, although possibly there is also a mistake. Do NOT proceed with using this, and report to the StateFarm developers what is printed in the console.");
  5759. log("REPORT THIS IN THE DISCORD SERVER:", name, deobf, clientKeys);
  5760. const crashplease = "balls";
  5761. crashplease = "balls2";
  5762. };
  5763. };
  5764. log('%cSTATEFARM INJECTION STAGE 1: GATHER VARS', 'color: yellow; font-weight: bold; font-size: 1.2em; text-decoration: underline;');
  5765. const modifyJS = function (find, replace) {
  5766. let oldJS = js;
  5767. try {
  5768. js = js.originalReplaceAll(find, replace);
  5769. } catch (err) {
  5770. log("%cReplacement failed! Likely a required var was not found. Attempted to replace " + find + " with: " + replace, 'color: red; font-weight: bold; font-size: 0.6em; text-decoration: italic;');
  5771. };
  5772. if (oldJS !== js) {
  5773. log("%cReplacement successful! Injected code: replaced: " + find + " with: " + replace, 'color: green; font-weight: bold; font-size: 0.6em; text-decoration: italic;');
  5774. } else {
  5775. log("%cReplacement failed! Attempted to replace " + find + " with: " + replace, 'color: red; font-weight: bold; font-size: 0.6em; text-decoration: italic;');
  5776. };
  5777. };
  5778. const f = function (varName) { return varName.replace("$", "\\$") };
  5779. log('%cSTATEFARM INJECTION STAGE 2: INJECT VAR RETRIEVAL FUNCTION AND MAIN LOOP', 'color: yellow; font-weight: bold; font-size: 1.2em; text-decoration: underline;');
  5780. //hook for main loop function in render loop
  5781. modifyJS(f(H.SCENE) + '.' + f(H.render), `window["${functionNames.retrieveFunctions}"]({${injectionString}},true)||${f(H.SCENE)}.render`);
  5782. modifyJS('log("After Game Ready"),', `log("After Game Ready"),window["${functionNames.retrieveFunctions}"]({${injectionString}}),`);
  5783. log('%cSuccess! Variable retrieval and main loop hooked.', 'color: green; font-weight: bold;');
  5784. log('%cSTATEFARM INJECTION STAGE 3: INJECT CULL INHIBITION', 'color: yellow; font-weight: bold; font-size: 1.2em; text-decoration: underline;');
  5785. //stop removal of objects
  5786. modifyJS(`${f(H.CULL)})r`, `${functionNames.shouldNotCull}())r`);
  5787. log('%cSuccess! Cull inhibition hooked ' + f(H.CULL), 'color: green; font-weight: bold;');
  5788. log('%cSTATEFARM INJECTION STAGE 4: INJECT OTHER FUNCTIONS', 'color: yellow; font-weight: bold; font-size: 1.2em; text-decoration: underline;');
  5789. //hook for modifications just before firing
  5790. modifyJS('fire(){var', 'fire(){window.' + functionNames.beforeFiring + '(this.player);var');
  5791. //hook for fov mods
  5792. modifyJS(/\.fov\s*=\s*1\.25/g, '.fov = window.' + functionNames.fixCamera + '()');
  5793. modifyJS(/\.fov\s*\+\s*\(1\.25/g, '.fov + (window.' + functionNames.fixCamera + '()');
  5794. //chat mods: disable chat culling
  5795. const chatCull = /return\}[a-zA-Z$_]+\.length>4/.exec(js)[0];
  5796. modifyJS(chatCull, chatCull.originalReplace('4', `window.${functionNames.getChatLimit}()`));
  5797. //chat mods: disable filter (credit to A3+++ for this finding)
  5798. modifyJS(`!${f(H._filterFunction)}(${f(H._insideFilterFunction)})`, `((!${f(H._filterFunction)}(${f(H._insideFilterFunction)}))||window.${functionNames.getDisableChatFilter}())`);
  5799. //chat mods: make filtered text red
  5800. let [_, elm, str] = js.match(/\)\),([a-zA-Z$_]+)\.innerHTML=([a-zA-Z$_]+),/);
  5801. modifyJS(_, _ + `${f(H._filterFunction)}(${str})&&window.${functionNames.getDisableChatFilter}()&&!arguments[3]&&(${elm}.style.color="red"),`);
  5802. //skins
  5803. match = js.match(/inventory\[[a-zA-Z$_]+\].id===[a-zA-Z$_]+.id\)return!0;return!1/);
  5804. if (match) { modifyJS(match[0], match[0] + `||window.${functionNames.getSkinHack}()`) };
  5805. //reset join/leave msgs
  5806. modifyJS(',console.log("joinGame()', ',window.' + functionNames.setNewGame + '(),console.log("joinGame()');
  5807. //bypass chat filter
  5808. modifyJS('value.trim();', 'value.trim();' + f(H._chat) + '=window.' + functionNames.modifyChat + '(' + f(H._chat) + ');')
  5809. //hook for control interception
  5810. match = new RegExp(`\\.prototype\\.${f(H._update)}=function\\([a-zA-Z$_,]+\\)\\{`).exec(js)[0];
  5811. log("player update function:", match);
  5812. modifyJS(match, `${match}${f(H.CONTROLKEYS)}=window.${functionNames.modifyControls}(${f(H.CONTROLKEYS)});`);
  5813. //admin spoof lol
  5814. modifyJS('isGameOwner(){return ', 'isGameOwner(){return window.' + functionNames.getAdminSpoof + '()?true:')
  5815. modifyJS('adminRoles(){return ', 'adminRoles(){return window.' + functionNames.getAdminSpoof + '()?255:')
  5816. //grab reason for connect fail
  5817. const FUNCTIONPARAM = new RegExp('function ' + f(H._connectFail) + '\\(([a-zA-Z$_]+)\\)').exec(js)[1];
  5818. log("FUNCTIONPARAM:", FUNCTIONPARAM);
  5819. modifyJS('function ' + f(H._connectFail) + '(' + f(FUNCTIONPARAM) + '){', 'function ' + f(H._connectFail) + '(' + f(FUNCTIONPARAM) + '){window.' + functionNames.onConnectFail + '(' + f(FUNCTIONPARAM) + ',' + f(H.ERRORARRAY) + ');')
  5820. //get rid of tutorial popup because its a stupid piece of shit
  5821. modifyJS(',vueApp.onTutorialPopupClick()', '');
  5822. //annoying shit
  5823. modifyJS('alert', 'console.log');
  5824. //pointer escape
  5825. modifyJS('onpointerlockchange=function(){', 'onpointerlockchange=function(){if (window.' + functionNames.getPointerEscape + '(arguments)) {return};');
  5826. //death hook
  5827. const DEATHARGS = new RegExp('function ' + f(H._deathFunction) + '\\(([a-zA-Z$_]+,[a-zA-Z$_]+)\\)').exec(js)[1];
  5828. log("DEATHARGS", DEATHARGS);
  5829. modifyJS('function ' + f(H._deathFunction) + '(' + DEATHARGS + '){', 'function ' + f(H._deathFunction) + '(' + f(DEATHARGS) + '){window.' + functionNames.interceptDeath + '(' + f(DEATHARGS) + ');');
  5830. //vip spoof/no ads credit absolutely goes to OakSwingZZZ
  5831. modifyJS('adsBlocked=' + FUNCTIONPARAM, 'adsBlocked=' + functionNames.adBlocker + '("adsBlocked")');
  5832. modifyJS('"user-has-adblock"', functionNames.adBlocker + '("user-has-adblock")');
  5833. modifyJS('layed=!1', 'layed=window.' + functionNames.adBlocker + '(!1)');
  5834. modifyJS('showAdBlockerVideo', 'hideAdBlockerVideo'); //hello eggs bullshit
  5835. modifyJS(H.USERDATA + '.playerAccount.isUpgraded()', functionNames.adBlocker + '(' + f(H.USERDATA) + '.playerAccount.isUpgraded())');
  5836. //respawn time stuff
  5837. modifyJS('5:10', functionNames.quickRespawn + '(5):' + functionNames.adBlocker + '(10)');
  5838. modifyJS(',3e3),console.log', `,window["${functionNames.quickRespawn}"](3e3)),console.log`);
  5839. // modifyJS(H.respawnTime+'=Math.max',H.respawnTime+'=Math.min');
  5840. //instant spectate
  5841. modifyJS(`\{${H.enterSpectatorModeBlocked}\|\|`,`\{(window["${functionNames.getInstantSpectateEnterSpectatorModeBlocked}"](${H.enterSpectatorModeBlocked}))\|\|`);
  5842. modifyJS(`\),${H.respawnTime}<0&&`,`\),(window["${functionNames.getInstantSpectateRespawnTime}"](${H.respawnTime}))&&`);
  5843. //Modifies matchmaker JS to block gamecodes.
  5844. match = js.match(/region,([a-zA-Z$_]+)\(([a-zA-Z$_]+)/); //im so sorry i thought i was slick
  5845. if (match) {
  5846. modifyJS('region,', `region,window.${functionNames.gameBlacklisted}(${match[2]})?(${match[2]}.uuid="${getScrambled()}",${match[1]}(${match[2]}),vueApp.hideSpinner()):`);
  5847. };
  5848. //intercept and replace audio
  5849. match = js.match(/static play\(([a-zA-Z$_,]+)\){/);
  5850. log("AUDIO INTERCEPTION", match);
  5851. modifyJS(match[0], `${match[0]}[${match[1]}] = window.${functionNames.interceptAudio}(${match[1]});`);
  5852. modifyJS('"IFRAME"==document.activeElement.tagName', `("IFRAME"==document.activeElement.tagName&&document.activeElement.id!=='sfChat-iframe')`);
  5853. // skybox (yay)
  5854. modifyJS(`infiniteDistance=!0;`, `infiniteDistance=!0;window["${skyboxName}"]=${H.skybox};`);
  5855. modifyJS(`.name)}vueApp`, `.name)}window["${mapData}"]=${H.mapData};vueApp`);
  5856. //intercept player names before they are censored
  5857. modifyJS(`:{}};if(${H.playerData}.`, `:{}};window.${functionNames.realPlayerData}(${H.playerData});if(${H.playerData}.`);
  5858. //intercept player names before they are censored
  5859. modifyJS(`"transparent")},`, `"transparent");window.${functionNames.interceptDrawTextOnNameTexture}(${H.nameTexture}, arguments, this.${H.player_})},`);
  5860. //intercept signedIn function
  5861. modifyJS(`if(this.isAnonymous`, `window.${functionNames.interceptSignedIn}(arguments);if(this.isAnonymous`);
  5862. modifyJS(`="SPACE",`,`="SPACE",window.${functionNames.shouldInputSpace}()&&`)
  5863. modifyJS(/tp-/g, '');
  5864. modifyJS(`window.location.href="https://free`, `let ballsack="https://free`);
  5865. // modifyJS(`${H.Grenade}.prototype.remove=function(){`, `${H.Grenade}.prototype.remove=function(){console.log("nade explosion", this, this.x, this.y, this.z);`);
  5866. // modifyJS(`this.grenadePool.retrieve`, `window.cock=arguments;this.grenadePool.retrieve`);
  5867. match = js.match(/0===[a-zA-Z0-9$_]+\)return!1;/);
  5868. log("COLLIDER", match);
  5869. modifyJS(match[0], match[0] + "var iterations=0;");
  5870. modifyJS(">=0);){", ">=0);){iterations++;if (iterations >= 1e3) {console.log('oops lol');return false};")
  5871. //intercept updateParticles for particle speed control
  5872. //deobf is: updateParticles(manager, delta)
  5873. match = js.match(/function [a-zA-Z$_]+\([a-zA-Z$_]+,[a-zA-Z$_]+\)\{for\(var [a-zA-Z$_]+=0;[a-zA-Z$_]+<[a-zA-Z$_]+\.sprites/); //this should only give one match.
  5874. const splitted = match[0].split("{"); //split right bevor function opens to inject delta manipulator. Might not be the best way but it works fine.
  5875. const delta = splitted[0].charAt(splitted[0].length - 2); //name of the delta argument.
  5876. modifyJS(match[0], splitted[0] + "{" //add curly bracket because the split removed it. ehhhhhh
  5877. +`${delta}=${delta}*window.${functionNames.getParticleSpeedMultiplier}();` //get mutiplier value for delta.
  5878. +splitted[1]
  5879. )
  5880. log(H);
  5881. log(js);
  5882. attemptedInjection = true;
  5883. return js;
  5884. } catch (error) {
  5885. log(error);
  5886. change("vardataType", 0);
  5887. alert("Bollocks! If you're getting this message, injection probably failed. To solve this, perform CTRL+F5 - this performs a hard reload. Check your VarData too! If this does not work, contact the developers.");
  5888. createPopup("Reloading page in 5 seconds...");
  5889. setTimeout(() => {
  5890. reloadPage();
  5891. }, 5000);
  5892. };
  5893. };
  5894. };
  5895. //dead code
  5896. /*
  5897. JSON.safeStringify = (obj, indent = 2) => {
  5898. let cache = [];
  5899. const retVal = JSON.stringify(
  5900. obj,
  5901. (key, value) =>
  5902. typeof value === "object" && value !== null
  5903. ? cache.includes(value)
  5904. ? undefined // Duplicate reference found, discard key
  5905. : cache.push(value) && value // Store value in our collection
  5906. : value,
  5907. indent
  5908. );
  5909. cache = null;
  5910. return retVal;
  5911. };
  5912. */
  5913. const deployBots = async () => {
  5914. updateBotParams();
  5915. if (!load("firstTimeBots")) {
  5916. save("firstTimeBots", true);
  5917. GM_openInTab(bottingGuideURL, { active: true });
  5918. };
  5919. GM_setValue("StateFarm_BotStatus", {});
  5920. log("Deploying " + extract("numberBots") + " bots...");
  5921. let botNames = [];
  5922. for (let i = 0; i < extract("numberBots"); i++) {
  5923. let name = (extract("botUsername"));
  5924. if (extract("botCopyName")) {
  5925. name = retrieveCopiedName();
  5926. if (!name) {
  5927. alert("StateFarm: Cannot copy names if you haven't been in a game!");
  5928. return;
  5929. };
  5930. };
  5931. botNames.push(name);
  5932. };
  5933. let canMassBot = undefined;
  5934. for (let i = 0; i < extract("numberBots"); i++) {
  5935. let leftOffset = ((i % 15) * 100);
  5936. // let topOffset=((i%3)*100);
  5937. let topOffset = 0;
  5938. let proxyURL = extract("proxyBots") == "static" ? window.location.host : proxyList[proxyListIndex] ;
  5939. proxyListIndex = (proxyListIndex + 1) % proxyList.length;
  5940. let params = "?AUTOMATED=true&StateFarm=";
  5941. let name = botNames[i];
  5942. if (extract("botAntiDupe")) { name = name + String.fromCharCode(97 + Math.floor(Math.random() * 26)) };
  5943. const addParam = function (module, setTo, noEnding) { params = params + module + ">" + JSON.stringify(setTo) + (noEnding ? "" : "<") };
  5944. addParam("eggColor", extract("eggColorBots") == "random" ? randomInt(1, 7) : extractAsDropdownInt("eggColorBots"));
  5945. addParam("autoStamp", extract("autoStampBots") == "random" ? randomInt(0, 6) : extractAsDropdownInt("autoStampBots"));
  5946. addParam("autoHat", extract("autoHatBots") == "random" ? randomInt(0, 6) : extractAsDropdownInt("autoHatBots"));
  5947. addParam("usernameAutoJoin", name, true);
  5948. log("PARAMS:", params)
  5949. if (!crackedShell) {
  5950. unsafeWindow.open("https://" + proxyURL + "/" + params, '_blank', `width=${extract("botWindowWidth")}},height=${extract("botWindowHeight")},left=` + leftOffset + ',top=' + topOffset)
  5951. } else {
  5952. try {
  5953. if (canMassBot === undefined) {
  5954. let data = await fetch(`https://${getScrambled().replace([0-9], '')}.${location.host}/$/ping`);
  5955. data = await data.text();
  5956. if (data !== 'OK') {
  5957. alert('You are not on a version of CrackedShell that supports botting.');
  5958. canMassBot = false;
  5959. return;
  5960. } else canMassBot = true;
  5961. };
  5962. } catch (err) {
  5963. log(err);
  5964. canMassBot = false;
  5965. alert('You are not on a version of CrackedShell that supports botting.');
  5966. };
  5967. if (canMassBot === true)
  5968. unsafeWindow.open(`https://${getScrambled().replace([0-9], '')}.${location.host}/${params}&cs=${new URLSearchParams(new URL(location.href).searchParams).get('cs')}`, '_blank', `width=${extract("botWindowWidth")}},height=${extract("botWindowHeight")},left=` + leftOffset + ',top=' + topOffset);
  5969. };
  5970. };
  5971. };
  5972. const constructBotParams = function () {
  5973. const addParam = function (module, setTo, noEnding) { params = params + module + ">" + JSON.stringify(setTo) + (noEnding ? "" : "<") };
  5974. let params = "";
  5975. addParam("autoFireType", 1); //while visible
  5976. addParam("adBlock", true);
  5977. //blacklist stuff
  5978. addParam("blacklist", botBlacklist);
  5979. addParam("enableBlacklistAimbot", true);
  5980. //whitelist stuff
  5981. addParam("whitelist", botWhitelist);
  5982. addParam("enableWhitelistAimbot", true);
  5983. addParam("enableWhenNoneVisible", true);
  5984. //do aimbot
  5985. addParam("aimbotTargetMode", 1);
  5986. addParam("aimbotVisibilityMode", 1);
  5987. addParam("prediction", extract("botAimbot"));
  5988. addParam("aimbot", extract("botAimbot"));
  5989. addParam("antiBloom", extract("botAimbot"));
  5990. addParam("grenadeMax", extract("botAimbot"));
  5991. addParam("autoRefill", extract("botAimbot"));
  5992. addParam("autoFireAccuracy", extract("botAccuracy"));
  5993. //do shoot
  5994. addParam("antiSneak", extract("botAutoShoot") ? 1.4 : 0);
  5995. addParam("enableAutoFire", extract("botAutoShoot"));
  5996. addParam("autoGrenade", extract("botAutoShoot"));
  5997. //automove
  5998. addParam("autoWalk", extract("botAutoMove"));
  5999. addParam("autoStrafe", extract("botAutoMove"));
  6000. addParam("autoJump", extract("botAutoMove"));
  6001. addParam("autoJumpDelay", 1500);
  6002. //low res
  6003. addParam("enableTextures", !extract("botLowRes"));
  6004. addParam("setDetail", extract("botLowRes") ? 2 : 0);
  6005. //seizure
  6006. addParam("enableSeizureX", extract("botSeizure"));
  6007. addParam("enableSeizureY", extract("botSeizure"));
  6008. addParam("renderDelay", extract("renderDelayBots"));
  6009. addParam("muteGame", extract("botMuteGame"));
  6010. addParam("autoJoin", extract("botAutoJoin"));
  6011. addParam("mockMode", extract("botMock"));
  6012. addParam("autoRespawn", extract("botRespawn"));
  6013. addParam("autoEZ", extract("botAutoEZ"));
  6014. addParam("cheatAccuse", extract("botCheatAccuse"));
  6015. addParam("joinCode", extract("botJoinCode"));
  6016. addParam("autoWeapon", extractAsDropdownInt("botWeapon") + 1);
  6017. addParam("autoTeam", extractAsDropdownInt("botTeam"));
  6018. addParam("autoUnban", extract("botAutoUnban"));
  6019. addParam("autoLogin", extractAsDropdownInt("botAutoLogin"));
  6020. addParam("loginDatabaseSelection", 1);
  6021. addParam("autoRegion", extractAsDropdownInt("autoRegionBots"));
  6022. addParam("autoGamemode", extractAsDropdownInt("autoGamemodeBots"));
  6023. addParam("useCustomName", extract("useCustomNameBots"));
  6024. addParam("autoMacro", extract("useBotMacro"));
  6025. addParam("customMacro", extract("botMacro").replaceAll(">","{greater}").replaceAll("<","{less}"));
  6026. addParam("leaveEmpty", extract("leaveEmptyBots"));
  6027. addParam("autoLeave", extract("autoLeaveBots"));
  6028. addParam("autoLeaveDelay", extract("autoLeaveDelayBots"));
  6029. addParam("spamChat", extract("botSpam"));
  6030. addParam("spamChatText", extract("spamChatTextBot"));
  6031. addParam("tallChat", extract("botTallChat"), true);
  6032. return params;
  6033. };
  6034. const detectURLParams = function () {
  6035. if (getSearchParam("AUTOMATED") == "true") {
  6036. log("Automated Window!");
  6037. AUTOMATED = true;
  6038. };
  6039. let customSettings = getSearchParam("StateFarm")
  6040. if (customSettings !== null) {
  6041. customSettings = customSettings.split("|");
  6042. URLParams = customSettings[0];
  6043. log("StateFarm: Custom Settings in URL!", URLParams);
  6044. /*
  6045. let setVars=[];
  6046. let setBinds=[];
  6047. if (customSettings[0]) {setVars=customSettings[0].split("<")};
  6048. if (customSettings[1]) {setVars=customSettings[0].split("<")};
  6049. log(setVars,setBinds);
  6050. setBinds.forEach(element=>{ //not yet done
  6051. });
  6052. */
  6053. };
  6054. };
  6055. const applySettings = function (receivedConfig, reset, secondPassThru) {
  6056. log(AUTOMATED, receivedConfig);
  6057. let settings = receivedConfig.split("<");
  6058. if (reset) { initMenu(true); log("StateFarm: clearing before applying settings") };
  6059. settings.forEach(element => {
  6060. element = element.split(">");
  6061. if (element[0] == "customMacro") {element[1] = element[1].replaceAll("{less}","<").replaceAll("{greater}",">")};
  6062. try {
  6063. change(element[0], JSON.parse(element[1]));
  6064. } catch (error) {
  6065. log("fuck that was an error", element[0], error);
  6066. };
  6067. });
  6068. createPopup("Custom StateFarm Settings Applying...");
  6069. if (!secondPassThru) {
  6070. setTimeout(() => {
  6071. if (receivedConfig) {
  6072. applySettings(receivedConfig, false, true);
  6073. };
  6074. }, 150);
  6075. };
  6076. };
  6077. const updateBotParams = function () {
  6078. if (AUTOMATED) { // nuh uh.
  6079. createPopup("Automated window cannot config bots.", "error");
  6080. } else {
  6081. const botParams = constructBotParams();
  6082. broadcastToBots("setconfig " + btoa(unsafeWindow.unescape(encodeURIComponent(botParams))));
  6083. log("StateFarm: attempted to set bot params.");
  6084. };
  6085. };
  6086. const retrieveCopiedName = function () {
  6087. const playerSlots = document.querySelectorAll('.playerSlot--name');
  6088. const mapNames = Array.from(playerSlots).map(playerSlot => playerSlot.textContent.trim());
  6089. return mapNames[Math.floor(Math.random() * mapNames.length)];
  6090. };
  6091. //dead code (for now ig)
  6092. // const pathfindingCode = function () { //wrapped in a function just to stop its execution
  6093. // loggedGameMap = false;
  6094. // // begin pathfinding
  6095. // const BinaryHeap = function(scoreFunction) {
  6096. // this.content = [];
  6097. // this.scoreFunction = scoreFunction;
  6098. // };
  6099. // BinaryHeap.prototype = {
  6100. // push: function (element) {
  6101. // // Add the new element to the end of the array.
  6102. // this.content.push(element);
  6103. // // Allow it to bubble up.
  6104. // this.bubbleUp(this.content.length - 1);
  6105. // },
  6106. // rescoreElement: function (node) {
  6107. // this.sinkDown(this.content.indexOf(node));
  6108. // },
  6109. // pop: function () {
  6110. // // Store the first element so we can return it later.
  6111. // var result = this.content[0];
  6112. // // Get the element at the end of the array.
  6113. // var end = this.content.pop();
  6114. // // If there are any elements left, put the end element at the
  6115. // // start, and let it sink down.
  6116. // if (this.content.length > 0) {
  6117. // this.content[0] = end;
  6118. // this.sinkDown(0);
  6119. // }
  6120. // return result;
  6121. // },
  6122. // remove: function (node) {
  6123. // var length = this.content.length;
  6124. // // To remove a value, we must search through the array to find
  6125. // // it.
  6126. // for (var i = 0; i < length; i++) {
  6127. // if (this.content[i] != node) continue;
  6128. // // When it is found, the process seen in 'pop' is repeated
  6129. // // to fill up the hole.
  6130. // var end = this.content.pop();
  6131. // // If the element we popped was the one we needed to remove,
  6132. // // we're done.
  6133. // if (i == length - 1) break;
  6134. // // Otherwise, we replace the removed element with the popped
  6135. // // one, and allow it to float up or sink down as appropriate.
  6136. // this.content[i] = end;
  6137. // this.bubbleUp(i);
  6138. // this.sinkDown(i);
  6139. // break;
  6140. // }
  6141. // },
  6142. // size: function () {
  6143. // return this.content.length;
  6144. // },
  6145. // bubbleUp: function (n) {
  6146. // // Fetch the element that has to be moved.
  6147. // var element = this.content[n], score = this.scoreFunction(element);
  6148. // // When at 0, an element can not go up any further.
  6149. // while (n > 0) {
  6150. // // Compute the parent element's index, and fetch it.
  6151. // var parentN = Math.floor((n + 1) / 2) - 1,
  6152. // parent = this.content[parentN];
  6153. // // If the parent has a lesser score, things are in order and we
  6154. // // are done.
  6155. // if (score >= this.scoreFunction(parent)) break;
  6156. // // Otherwise, swap the parent with the current element and
  6157. // // continue.
  6158. // this.content[parentN] = element;
  6159. // this.content[n] = parent;
  6160. // n = parentN;
  6161. // }
  6162. // },
  6163. // includes: function (n) {
  6164. // return this.content.includes(n);
  6165. // },
  6166. // sinkDown: function (n) {
  6167. // // Look up the target element and its score.
  6168. // var length = this.content.length,
  6169. // element = this.content[n],
  6170. // elemScore = this.scoreFunction(element);
  6171. // while (true) {
  6172. // // Compute the indices of the child elements.
  6173. // var child2N = (n + 1) * 2, child1N = child2N - 1;
  6174. // // This is used to store the new position of the element,
  6175. // // if any.
  6176. // var swap = null;
  6177. // // If the first child exists (is inside the array)...
  6178. // if (child1N < length) {
  6179. // // Look it up and compute its score.
  6180. // var child1 = this.content[child1N],
  6181. // child1Score = this.scoreFunction(child1);
  6182. // // If the score is less than our element's, we need to swap.
  6183. // if (child1Score < elemScore) swap = child1N;
  6184. // }
  6185. // // Do the same checks for the other child.
  6186. // if (child2N < length) {
  6187. // var child2 = this.content[child2N],
  6188. // child2Score = this.scoreFunction(child2);
  6189. // if (child2Score < (swap == null ? elemScore : child1Score)) swap = child2N;
  6190. // }
  6191. // // No need to swap further, we are done.
  6192. // if (swap == null) break;
  6193. // // Otherwise, swap and continue.
  6194. // this.content[n] = this.content[swap];
  6195. // this.content[swap] = element;
  6196. // n = swap;
  6197. // };
  6198. // }
  6199. // };
  6200. // const isNodeAir = function(item) {
  6201. // return item.mesh === undefined
  6202. // };
  6203. // const canTravelThroughNode = function(item) {
  6204. // return isNodeAir(item) || item.mesh.name.includes("none")
  6205. // };
  6206. // class Position {
  6207. // constructor(x, y, z) {
  6208. // this.x = x;
  6209. // this.y = y;
  6210. // this.z = z;
  6211. // }
  6212. // }
  6213. // var GLOBAL_NODE_LIST = [];
  6214. // class MapNode {
  6215. // constructor(position, linked, map) {
  6216. // this.position = position;
  6217. // this.linked = linked;
  6218. // GLOBAL_NODE_LIST.push(this);
  6219. // this.add_children_from_map_data(map);
  6220. // this.f = undefined;
  6221. // this.g = undefined;
  6222. // this.h = undefined;
  6223. // }
  6224. // add_link(node) {
  6225. // this.linked.push(node);
  6226. // }
  6227. // remove_link(node) {
  6228. // this.linked = this.linked.filter(item => item !== node);
  6229. // }
  6230. // can_move(node) {
  6231. // return this.linked.includes(node);
  6232. // }
  6233. // add_children_from_map_data(map_data) {
  6234. // // for each thing around us in a 3x3x3 cube, add a link if it's air and it's not above us
  6235. // let found_node = 0; let found_link = 0
  6236. // for (var x = -1; x <= 1; x++) {
  6237. // for (var y = -1; y <= 0; y++) {
  6238. // for (var z = -1; z <= 1; z++) {
  6239. // if (x == 0 && y == 0 && z == 0) {
  6240. // continue;
  6241. // };
  6242. // if (Math.abs(x) + Math.abs(y) + Math.abs(z) > 1) {
  6243. // continue;
  6244. // };
  6245. // var map_data_x = this.position.x + x;
  6246. // var map_data_y = this.position.y + y;
  6247. // var map_data_z = this.position.z + z;
  6248. // if (map_data_x < 0 || map_data_y < 0 || map_data_z < 0) {
  6249. // continue;
  6250. // };
  6251. // if (map_data_x >= map_data.length || map_data_y >= map_data[0].length || map_data_z >= map_data[0][0].length) {
  6252. // continue;
  6253. // };
  6254. // var attemptedNode = map_data[map_data_x][map_data_y][map_data_z];
  6255. // if (!canTravelThroughNode(attemptedNode)) {
  6256. // ;continue;
  6257. // }
  6258. // /* for the tested node:
  6259. // continue if:
  6260. // can't travel through it
  6261. // a nonsolid is directly below it
  6262. // */
  6263. // try {
  6264. // var node_below_checked_node = map_data[map_data_x][map_data_y - 1][map_data_z];
  6265. // } catch (error) {
  6266. // log(error)
  6267. // continue;
  6268. // };
  6269. // var is_air_directly_below = isNodeAir(node_below_checked_node); // self explanatory
  6270. // var is_solid_directly_below = !is_air_directly_below ? node_below_checked_node.mesh.name.includes("full") : false;
  6271. // var is_partial_directly_below = !is_air_directly_below && !is_solid_directly_below
  6272. // var node_directly_below_node_doing_the_checking;
  6273. // try {
  6274. // node_directly_below_node_doing_the_checking = map_data[this.position.x][this.position.y - 1][this.position.z];
  6275. // } catch (error) {
  6276. // log(error);
  6277. // node_directly_below_node_doing_the_checking = {};
  6278. // };
  6279. // var is_solid_directly_below_node_doing_checking = !isNodeAir(node_directly_below_node_doing_the_checking) && node_directly_below_node_doing_the_checking.mesh.name.includes("full");
  6280. // var is_valid_candidate = (
  6281. // is_solid_directly_below ||
  6282. // y == -1 && !is_partial_directly_below ||
  6283. // (is_air_directly_below || is_solid_directly_below) && is_solid_directly_below_node_doing_checking
  6284. // // TODO: when falling long distances this can cause it to crash
  6285. // // ideally if there's a partial below it prunes back to the start of the fall
  6286. // // that's hard
  6287. // // i just want this to work
  6288. // );
  6289. // if (y == -1 && !is_partial_directly_below) {
  6290. // // log('weird case, looking downwards to x/y/z from x/y/z', map_data_x, map_data_y, map_data_z, this.position.x, this.position.y, this.position.z, 'is air directly below?', is_air_directly_below, 'is solid directly below?', is_solid_directly_below, 'is partial directly below?', is_partial_directly_below, 'is valid candidate?', is_valid_candidate)
  6291. // //shit lags, lol
  6292. // };
  6293. // // if the node is already in the list, add a link to it. Otherwise create it and then add a link to it.
  6294. // // if it's air / equivalent to air we can create it (but not necessarily link to it)
  6295. // if (GLOBAL_NODE_LIST.some(item => item.position.x == map_data_x && item.position.y == map_data_y && item.position.z == map_data_z)) { // eslint-disable-line
  6296. // // ^^ this node already exists, link to it
  6297. // if (is_valid_candidate) {
  6298. // found_link++;
  6299. // this.add_link(GLOBAL_NODE_LIST.find(item => item.position.x == map_data_x && item.position.y == map_data_y && item.position.z == map_data_z)); // eslint-disable-line
  6300. // }
  6301. // } else {
  6302. // found_node++;
  6303. // var new_node = new MapNode(new Position(map_data_x, map_data_y, map_data_z), [], map_data);
  6304. // // the new node doesn't exist yet
  6305. // // we create it
  6306. // // if it's possible to move to we add the link
  6307. // if (is_valid_candidate) {
  6308. // found_link++;
  6309. // this.add_link(new_node);
  6310. // };
  6311. // };
  6312. // };
  6313. // };
  6314. // };
  6315. // // log("done with recursive for node at x/y/z", this.position.x, this.position.y, this.position.z, "found", found_node, "new nodes and", found_link, "links, this is the nth node created", GLOBAL_NODE_LIST.length)
  6316. // //shit lags, lol
  6317. // }
  6318. // };
  6319. // const get_node_at = function(position) {
  6320. // return GLOBAL_NODE_LIST.find(item => item.position.x == position.x && item.position.y == position.y && item.position.z == position.z);
  6321. // };
  6322. // const get_player_position = function(player) {
  6323. // var x = Math.floor(player[H.actor][H.mesh].position.x);
  6324. // var y = Math.floor(player[H.actor][H.mesh].position.y);
  6325. // var z = Math.floor(player[H.actor][H.mesh].position.z);
  6326. // return new Position(x, y, z);
  6327. // }
  6328. // const get_player_linked_nodes = function(player) {
  6329. // var position = get_player_position(player);
  6330. // var node = get_node_at(position);
  6331. // if (node) {
  6332. // return node.linked;
  6333. // } else {
  6334. // return [];
  6335. // };
  6336. // };
  6337. // var map_data_created = false;
  6338. // // kazowie
  6339. // const TaxicabDist3D = function(pos1, pos2) {
  6340. // return Math.abs(pos1.x - pos2.x) + Math.abs(pos1.y - pos2.y) + Math.abs(pos1.z - pos2.z);
  6341. // };
  6342. // const pathTo = function(node) {
  6343. // var current = node;
  6344. // var path = [];
  6345. // while (current.parent) {
  6346. // path.unshift(current);
  6347. // if (current.parent === undefined) { log("parent undefined; path nodes successfully acquired:", path.length) }
  6348. // current = current.parent;
  6349. // }
  6350. // //log("done")
  6351. // return path;
  6352. // };
  6353. // const getHeap = function() {
  6354. // return new BinaryHeap(function (node) {
  6355. // return node.f;
  6356. // });
  6357. // };
  6358. // const cleanList = function(items) {
  6359. // for (var i = 0; i < items.length; i++) {
  6360. // var item = items[i];
  6361. // item.f = undefined;
  6362. // item.g = undefined;
  6363. // item.h = undefined;
  6364. // item.closed = undefined;
  6365. // item.parent = undefined;
  6366. // item.visited = undefined;
  6367. // };
  6368. // };
  6369. // const AStar = function(start, goal) {
  6370. // log("astar called")
  6371. // cleanList(GLOBAL_NODE_LIST)
  6372. // // start and goal are map nodes
  6373. // // map data is the list of all the nodes
  6374. // // each node has a .linked indicating which nodes can be traveled to from it
  6375. // // returns a list of nodes to travel through, ordered from start to goal
  6376. // // if no path is found, returns null
  6377. // var closed_set = [];
  6378. // var heuristic = TaxicabDist3D;
  6379. // var open_heap = getHeap();
  6380. // start.h = heuristic(start.position, goal.position);
  6381. // start.g = 0;
  6382. // start.f = start.g + start.h;
  6383. // open_heap.push(start);
  6384. // while (open_heap.size() != 0) {
  6385. // var current = open_heap.pop();
  6386. // if (current === goal) {
  6387. // log("done with astar - path found")
  6388. // var val = pathTo(current);
  6389. // log("path length:", val.length)
  6390. // print_node_list(val);
  6391. // return val;
  6392. // }
  6393. // closed_set.push(current);
  6394. // var neighbors = current.linked;
  6395. // for (var i = 0; i < neighbors.length; i++) {
  6396. // var neighbor = neighbors[i];
  6397. // if (closed_set.includes(neighbor)) {
  6398. // continue;
  6399. // }
  6400. // var tentative_g_score = current.g + 1;
  6401. // var visited = neighbor.visited;
  6402. // if (!visited || tentative_g_score < neighbor.g) {
  6403. // neighbor.visited = true;
  6404. // neighbor.parent = current;
  6405. // neighbor.g = tentative_g_score;
  6406. // neighbor.h = heuristic(neighbor.position, goal.position);
  6407. // neighbor.f = neighbor.g + neighbor.h;
  6408. // if (!visited) {
  6409. // open_heap.push(neighbor);
  6410. // } else {
  6411. // open_heap.rescoreElement(neighbor);
  6412. // };
  6413. // };
  6414. // };
  6415. // };
  6416. // log("done with astar - no path found")
  6417. // // return null if no path has been found
  6418. // return null
  6419. // };
  6420. // const print_node_list = function(list) {
  6421. // var output = "";
  6422. // log("printing node list, length:", list.length, "list:", list);
  6423. // for (var i = 0; i < list.length; i++) {
  6424. // output += list[i].position.x + ", " + list[i].position.y + ", " + list[i].position.z + "\n";
  6425. // };
  6426. // log(output);
  6427. // };
  6428. // const create_red_line_between_nodes = function(ss, node1, node2) {
  6429. // // const tracerLines = L.BABYLON.MeshBuilder.CreateLines("tracerLines", { points: [newPosition, crosshairsPosition] }, newScene);
  6430. // let pos1 = [node1.position.x - 0.5, node1.position.y - 0.5, node1.position.z - 0.5];
  6431. // let pos2 = [node2.position.x - 0.5, node2.position.y - 0.5, node2.position.z - 0.5];
  6432. // if (window.pathLines === undefined) {
  6433. // let node_lines = L.BABYLON.MeshBuilder.CreateLines(new Date().getTime().toString(), { points: [ss.MYPLAYER[H.actor][H.mesh].position, pos2] }, ss.MYPLAYER[H.actor].scene);
  6434. // node_lines.color = new L.BABYLON.Color3(1, 0, 0);
  6435. // node_lines.renderingGroupId = 1;
  6436. // window.pathLines = [node_lines];
  6437. // } else {
  6438. // let node_lines = L.BABYLON.MeshBuilder.CreateLines(new Date().getTime().toString(), { points: [ss.MYPLAYER[H.actor][H.mesh].position, pos2] }, ss.MYPLAYER[H.actor].scene);
  6439. // node_lines.color = new L.BABYLON.Color3(1, 0, 0);
  6440. // node_lines.renderingGroupId = 1;
  6441. // window.pathLines.push(node_lines);
  6442. // };
  6443. // };
  6444. // const create_pathfinding_lines = function(ss, path) {
  6445. // for (var i = 0; i < path.length - 1; i++) {
  6446. // create_red_line_between_nodes(ss, path[i], path[i + 1]);
  6447. // };
  6448. // };
  6449. // // end pathfinding
  6450. // const createMapData = function () {
  6451. // if (!map_data_created) {
  6452. // log("Creating map data");
  6453. // new MapNode(new Position(ss.GAMEMAP.data.length - 1, ss.GAMEMAP.data[0].length - 1, ss.GAMEMAP.data[0][0].length - 1), [], ss.GAMEMAP.data);
  6454. // map_data_created = true;
  6455. // return true;
  6456. // }
  6457. // }
  6458. // const mapStuff = function () {
  6459. // //log("node = " + get_node_at(get_player_position(ss.MYPLAYER)), "nodelist len = " + GLOBAL_NODE_LIST.length);
  6460. // if (findNewPath && !activePath && !activeNodeTarget && get_node_at(get_player_position(ss.MYPLAYER))) {
  6461. // let player_pos = get_player_position(ss.MYPLAYER);
  6462. // let player_node = get_node_at(player_pos);
  6463. // if (player_node) {
  6464. // let position = {
  6465. // x: player_pos.x + Math.floor(Math.random() * 5) - 1,
  6466. // y: player_pos.y,
  6467. // z: player_pos.z + Math.floor(Math.random() * 5) - 1
  6468. // }
  6469. // // check if node at position exists
  6470. // let random_node = get_node_at(position);
  6471. // if (!(player_node === random_node) && random_node) {
  6472. // log("location, target:")
  6473. // print_node_list([player_node, random_node])
  6474. // activePath = AStar(player_node, random_node);
  6475. // if (activePath) {
  6476. // log("setting active node target");
  6477. // print_node_list(activePath);
  6478. // activeNodeTarget = activePath[0];
  6479. // log("list printed, target set, creating pathfinding lines")
  6480. // create_pathfinding_lines(ss, activePath);
  6481. // findNewPath = false;
  6482. // log("found path to random node")
  6483. // } else {
  6484. // log("unable to find path to random node")
  6485. // }
  6486. // } else {
  6487. // log("player node / random node not air")
  6488. // }
  6489. // } else {
  6490. // log("player not on air node currently")
  6491. // }
  6492. // }
  6493. // if (pathfindingTargetOverride !== undefined) {
  6494. // createMapData();
  6495. // let player_node = get_node_at(get_player_position(ss.MYPLAYER));
  6496. // let target_node = get_node_at(pathfindingTargetOverride);
  6497. // if (player_node && target_node && !activePath) {
  6498. // let path = AStar(player_node, target_node);
  6499. // if (path) {
  6500. // if (path.length > 0) {
  6501. // activePath = path;
  6502. // activeNodeTarget = path[0];
  6503. // } else {
  6504. // log('already at target')
  6505. // activePath = null;
  6506. // activeNodeTarget = null;
  6507. // pathfindingTargetOverride = undefined;
  6508. // }
  6509. // } else {
  6510. // if (despawnIfNoPath) {
  6511. // sendChatMessage("despawnIfNoPath");
  6512. // }
  6513. // }
  6514. // } else {
  6515. // if (!activePath) {
  6516. // if (player_node) {
  6517. // log("playernode good")
  6518. // }
  6519. // if (target_node) {
  6520. // log("targetnode good")
  6521. // }
  6522. // if (!player_node) {
  6523. // log("playernode bad")
  6524. // }
  6525. // if (!target_node) {
  6526. // log("targetnode bad")
  6527. // }
  6528. // }
  6529. // }
  6530. // }
  6531. // if (activeNodeTarget && activePath) {
  6532. // //log("found target and path");
  6533. // let player_node = get_node_at(get_player_position(ss.MYPLAYER));
  6534. // if (player_node == activeNodeTarget || activePath.includes(player_node)) { // if we are at the target or have somehow skipped ahead in the list
  6535. // if (player_node == activeNodeTarget) {
  6536. // activeNodeTarget = activePath.shift();
  6537. // log("update target");
  6538. // if (activePath.length == 0) {
  6539. // log("path completed");
  6540. // activePath = null;
  6541. // activeNodeTarget = null;
  6542. // pathfindingTargetOverride = undefined;
  6543. // }
  6544. // } else {
  6545. // while (activePath.includes(player_node)) {
  6546. // activeNodeTarget = activePath.shift();
  6547. // }
  6548. // if (activePath.length == 0) {
  6549. // log("path completed");
  6550. // activePath = null;
  6551. // activeNodeTarget = null;
  6552. // pathfindingTargetOverride = undefined;
  6553. // }
  6554. // }
  6555. // } else {
  6556. // //log("not at target");
  6557. // }
  6558. // /* if (!(activePath.includes(get_node_at(get_player_position(ss.MYPLAYER))))) { // went off path somehow, need to find new path
  6559. // findNewPath = true;
  6560. // activePath = null;
  6561. // activeNodeTarget = null;
  6562. // log("went off path, finding new path")
  6563. // } */
  6564. // }
  6565. // if (activeNodeTarget) {
  6566. // // look towards the node
  6567. // if (isFirstFrameAttemptingToPathfind) {
  6568. // /* let vec = new L.BABYLON.Vector3(0, 0, 1)
  6569. // let calcYaw = calculateYaw(vec);
  6570. // let calcPitch = calculatePitch(vec);
  6571. // ss.MYPLAYER[H.yaw] = 0;
  6572. // ss.MYPLAYER[H.pitch] = 0; */
  6573. // isFirstFrameAttemptingToPathfind = false;
  6574. // } else {
  6575. // //log("looking towards node");
  6576. // let playerPosition = get_player_position(ss.MYPLAYER);
  6577. // let directionVector = new L.BABYLON.Vector3(activeNodeTarget.position.x - playerPosition.x, activeNodeTarget.position.y - playerPosition.y, activeNodeTarget.position.z - playerPosition.z);
  6578. // /* log(`
  6579. // --PATHING UPDATE--
  6580. // target: ${activeNodeTarget.position.x}, ${activeNodeTarget.position.y}, ${activeNodeTarget.position.z}
  6581. // current: ${playerPosition.x}, ${playerPosition.y}, ${playerPosition.z}
  6582. // directionVector: ${directionVector.x}, ${directionVector.y}, ${directionVector.z}
  6583. // calc yaw: ${calculateYaw(directionVector)}
  6584. // targ -> current diff:
  6585. // `) */
  6586. // //shit lags, lol
  6587. // ss.MYPLAYER[H.yaw] = calculateYaw(directionVector);
  6588. // ss.MYPLAYER[H.pitch] = 0;
  6589. // forceControlKeys = ss.CONTROLKEYSENUM.up;
  6590. // }
  6591. // };
  6592. // };
  6593. // const clearPath = function () {
  6594. // activePath = undefined;
  6595. // activeNodeTarget = undefined;
  6596. // };
  6597. // const clearPath_andTarget = function () {
  6598. // clearPath();
  6599. // pathfindingTargetOverride = undefined;
  6600. // };
  6601. // };
  6602. const findKeyWithProperty = function (obj, propertyToFind) {
  6603. for (const key in obj) {
  6604. if (obj[key] === null || obj[key] === undefined) {
  6605. continue;
  6606. };
  6607. if (!!obj[key] && (typeof (obj[key]) == 'object' || typeof (obj[key]) == 'function') && obj[key].hasOwnProperty(propertyToFind)) {
  6608. return key;
  6609. };
  6610. };
  6611. // Property not found
  6612. return null;
  6613. };
  6614. const findStringInLists = function (dictWithLists, str) {
  6615. for (const key in dictWithLists) {
  6616. if (dictWithLists.hasOwnProperty(key)) {
  6617. const list = dictWithLists[key];
  6618. if (list.includes(str)) {
  6619. return key; // Return the key where the string is found
  6620. };
  6621. };
  6622. };
  6623. return null; // Return null if the string is not found in any list
  6624. };
  6625. const mainLoop = function () {
  6626. const oneTime = function () {
  6627. //xd lmao
  6628. if (ss.MYPLAYER) {
  6629. log('%cSTATEFARM IS ATTEMPTING TO CREATE FAKE BABYLON', 'color: yellow; font-weight: bold; font-size: 1.2em; text-decoration: underline;');
  6630. const found = (babylon) => {
  6631. L.BABYLON = babylon;
  6632. H.actor = findKeyWithProperty(ss.MYPLAYER, H.mesh);
  6633. // Math.capVector3 = Math[H.capVector3];
  6634. log("StateFarm: found vars:", H);
  6635. crosshairsPosition = new L.BABYLON.Vector3();
  6636. // Object.defineProperty(ss.MYPLAYER.scene, 'forceWireframe', {
  6637. // get: () => {
  6638. // return extract("wireframe");
  6639. // }
  6640. // });
  6641. if (AUTOMATED) {
  6642. automatedBorder.style.borderColor = 'rgba(0, 0, 255, 1)';
  6643. };
  6644. };
  6645. const doFake = () => {
  6646. L.BABYLONfake = {
  6647. //can use GetBabylon
  6648. Color3: ss.GetBabylon("BABYLON.Color3"),
  6649. Vector3: ss.GetBabylon("BABYLON.Vector3"),
  6650. CubeTexture: ss.GetBabylon("BABYLON.CubeTexture"),
  6651. PointLight: ss.GetBabylon("BABYLON.PointLight"),
  6652. ArcRotateCamera: ss.GetBabylon("BABYLON.ArcRotateCamera"),
  6653. Matrix: ss.GetBabylon("BABYLON.Matrix"),
  6654. //can use ss
  6655. TransformNode: ss.TransformNode,
  6656. MeshBuilder: ss.MeshBuilder,
  6657. Viewport: ss.Viewport,
  6658. VertexBuffer: ss.VertexBuffer,
  6659. VertexData: ss.VertexData,
  6660. SceneLoader: ss.SceneLoader,
  6661. };
  6662. L.BABYLONfake.Matrix.RotationYawPitchRoll = L.BABYLONfake.Matrix[H.RotationYawPitchRoll];
  6663. L.BABYLONfake.MeshBuilder.CreateLines = ss.CreateLines; //initially i meant to just make this an attribute but this also works
  6664. createPopup("Created BabylonFake", "success");
  6665. log('%cSTATEFARM SUCCESSFULLY LOADED FAKE BABYLON!', 'color: green; font-weight: bold; font-size: 1.2em; text-decoration: underline;');
  6666. found(L.BABYLONfake);
  6667. };
  6668. const doImport = () => {
  6669. log('%c(Fallback) STATEFARM IS ATTEMPTING TO LOAD L.BABYLON', 'color: yellow; font-weight: bold; font-size: 1.2em; text-decoration: underline;');
  6670. var script = document.createElement("script");
  6671. script.src = babylonURL.format(H?.BabylonVersion || "7.21.1");
  6672. script.onload = function () {
  6673. if (unsafeWindow.BABYLON) {
  6674. L.BABYLONimported = unsafeWindow.BABYLON;
  6675. delete unsafeWindow.BABYLON;
  6676. log("Imported Babylon.js successfully");
  6677. log(L.BABYLONimported.Engine.Version);
  6678. createPopup("Imported Babylon", "success");
  6679. log('%cSTATEFARM SUCCESSFULLY IMPORTED BABYLON!', 'color: green; font-weight: bold; font-size: 1.2em; text-decoration: underline;');
  6680. found(L.BABYLONimported);
  6681. } else {
  6682. log('%cSTATEFARM COULD NOT LOAD L.BABYLON', 'color: red; font-weight: bold; font-size: 1.2em; text-decoration: underline;');
  6683. };
  6684. };
  6685. document.body.appendChild(script);
  6686. };
  6687. // chrome web store reviewers, GM_info is never declared and this will always be false in the web store environment
  6688. if (extract("forceImport") && typeof GM_info !== 'undefined') {
  6689. doImport();
  6690. } else {
  6691. try {
  6692. doFake();
  6693. } catch (error) {
  6694. log("fake babylon creation failed");
  6695. log(error);
  6696. doImport();
  6697. };
  6698. };
  6699. ranOneTime = true;
  6700. };
  6701. };
  6702. const initVars = function () {
  6703. isBanned = false; //cant be banned if in a game /shrug
  6704. errorString = undefined; //no error if ur playing
  6705. forceControlKeys = undefined; //reset every frame
  6706. if (newGame) {
  6707. onlinePlayersArray = [];
  6708. miniCamera = null;
  6709. };
  6710. if (extract("debug") && (typeof playerLogger === 'undefined')) {
  6711. playerLogger = [];
  6712. };
  6713. const weaponBox = document.getElementById("weaponBox");
  6714. const chatContainer = document.getElementById('chatOut');
  6715. const chatItems = chatContainer.getElementsByClassName('chat-item');
  6716. if ((weaponBox.style.display != lastWeaponBox) || (chatItems.length != lastChatItemLength)) {
  6717. lastWeaponBox = weaponBox.style.display;
  6718. lastChatItemLength = chatItems.length;
  6719. const maxChat = extract("maxChat");
  6720. const maxMessages = (weaponBox.style.display === "block" && maxChat) || 9999999;
  6721. const startIndex = Math.max(0, chatItems.length - maxMessages);
  6722. for (let i = chatItems.length - 1; i >= 0; i--) {
  6723. const chatIndex = i - startIndex;
  6724. const isInRange = chatIndex >= 0 && chatIndex < maxMessages;
  6725. chatItems[i].style.display = isInRange ? '' : 'none';
  6726. };
  6727. };
  6728. if (didStateFarm) {
  6729. if (!loggedGameMap) {
  6730. log(ss.GAMEMAP.width, ss.GAMEMAP.height, ss.GAMEMAP.data);
  6731. loggedGameMap = true;
  6732. };
  6733. username = ss.MYPLAYER?.name;
  6734. crosshairsPosition.copyFrom(ss.MYPLAYER[H.actor][H.mesh].position);
  6735. // //eye level
  6736. crosshairsPosition.y += 0.4;
  6737. const forwardOffset = -5;
  6738. const yaw = ss.MYPLAYER[H.yaw];
  6739. const pitch = -ss.MYPLAYER[H.pitch];
  6740. const forwardX = Math.sin(yaw) * Math.cos(pitch);
  6741. const forwardY = Math.sin(pitch);
  6742. const forwardZ = Math.cos(yaw) * Math.cos(pitch);
  6743. crosshairsPosition.x += forwardX * forwardOffset;
  6744. crosshairsPosition.y += forwardY * forwardOffset;
  6745. crosshairsPosition.z += forwardZ * forwardOffset;
  6746. ammo = ss.MYPLAYER.weapon.ammo;
  6747. whitelistPlayers = (extract("whitelist") || "").split(',');
  6748. blacklistPlayers = (extract("blacklist") || "").split(',');
  6749. ss.MYPLAYER[H.actor].scene.texturesEnabled = extract("enableTextures");
  6750. };
  6751. };
  6752. const updateLinesESP = function () {
  6753. const objExists = Date.now();
  6754. //update playerESP boxes, tracer lines, colors
  6755. ss.PLAYERS.forEach(player => {
  6756. if (player && (player !== ss.MYPLAYER) && player[H.playing] && (player[H.hp] > 0) && ((!ss.MYPLAYER.team) || (player.team !== ss.MYPLAYER.team))) {
  6757. const whitelisted = (extract("whitelistESPType") == "highlight" || !extract("enableWhitelistTracers") || playerMatchesList(whitelistPlayers, player));
  6758. const blacklisted = (extract("blacklistESPType") == "justexclude" && extract("enableBlacklistTracers") && playerMatchesList(blacklistPlayers, player));
  6759. const passedLists = whitelisted && (!blacklisted);
  6760. const tracersType = extract("tracersType");
  6761. if (player.lookLineData && player.lookLineData.length === 6) {
  6762. // player.lookLineData
  6763. const x1 = player.lookLineData[0],
  6764. y1 = player.lookLineData[1],
  6765. z1 = player.lookLineData[2],
  6766. x2 = player.lookLineData[3],
  6767. y2 = player.lookLineData[4],
  6768. z2 = player.lookLineData[5];
  6769. // ss.MYPLAYER pos
  6770. const rx = ss.MYPLAYER[H.actor][H.mesh].position.x,
  6771. ry = ss.MYPLAYER[H.actor][H.mesh].position.y,
  6772. rz = ss.MYPLAYER[H.actor][H.mesh].position.z;
  6773. // not speed
  6774. const dx = x2 - x1, dy = y2 - y1, dz = z2 - z1;
  6775. // , also not spped
  6776. const rpx = rx - x1, rpy = ry - y1, rpz = rz - z1;
  6777. // cross = (r - p) x (q - p)
  6778. const cx = rpy * dz - rpz * dy, cy = rpz * dx - rpx * dz, cz = rpx * dy - rpy * dx;
  6779. const crossLength = Math.sqrt(cx * cx + cy * cy + cz * cz);
  6780. // length of the line vector (q - p)
  6781. const lineLength = Math.sqrt(dx * dx + dy * dy + dz * dz);
  6782. // min distance point to line is crossp magnitude / line length
  6783. player.aimdistance = crossLength / lineLength;
  6784. //console.log(`Minimum distance from ${player.name}'s look line to my position:`, aimdistance);
  6785. };
  6786. //predEsp
  6787. if (extract("predictionESP")) { //important note here is that we only create/update the predESP if the module is toggled on. saves resources from predictPosition raycast
  6788. if (!player.pred) { //do we need a new TN as parent?
  6789. const pPTransformNode = new L.BABYLON.TransformNode("pPredTNode", player[H.actor].scene); //TN's are literally perfect for this wtf
  6790. pPTransformNode.parent = player[H.actor][H.mesh]; //parent to the player's mesh. Not really needed, but good practise.
  6791. player.pred = pPTransformNode; //why use object actually? All the info is stored right in the TN :)
  6792. };
  6793. if (player.pred && player.pred.getScene()) { //does pred exist and is on a valid scene? not really needed, as we literally
  6794. //create the thing above if this is not the case, but eh. Better safe than sorry
  6795. player.pred.setAbsolutePosition(predictPosition(player)); //transformNode is attached to mesh, so we need absolute pos here.
  6796. updateOrCreateLinesESP(player.pred, "pPredESP", hexToRgb(getColor("predictionESPColor", "predictionESPColorRainbow"))); //I love names. pPredESP, pPTransformNode. Truly nice
  6797. player.pred.exists = objExists; //make sure the lines don't get picked up by the ESPLines Garbage collector afterwards
  6798. player.pred.tracerLines.visibility = false; //they just don't work for this.
  6799. };
  6800. };
  6801. let color, progress;
  6802. if (extract("enableWhitelistTracers") && extract("whitelistESPType") == "highlight" && playerMatchesList(whitelistPlayers, player)) {
  6803. color = hexToRgb(extract("whitelistColor"));
  6804. } else if (extract("enableBlacklistTracers") && extract("blacklistESPType") == "highlight" && playerMatchesList(blacklistPlayers, player)) {
  6805. color = hexToRgb(extract("blacklistColor"));
  6806. } else if (tracersType == "proximity") {
  6807. const distance = distancePlayers(player);
  6808. if (distance < extract("tracersColor1to2")) { //fade between first set
  6809. progress = (distance / extract("tracersColor1to2"));
  6810. color = fadeBetweenColors(extract("tracersColor1"), extract("tracersColor2"), progress); //ye fade look dumb dumb with fade
  6811. } else if (distance < extract("tracersColor2to3")) { //fade between second set
  6812. progress = ((distance - extract("tracersColor1to2")) / (extract("tracersColor2to3") - extract("tracersColor1to2")));
  6813. color = fadeBetweenColors(extract("tracersColor2"), extract("tracersColor3"), progress);
  6814. } else {
  6815. color = hexToRgb(extract("tracersColor3"));
  6816. };
  6817. } else if (tracersType == "static") {
  6818. color = hexToRgb(getColor("tracersColor1", "tracersColor1Rainbow"));
  6819. } else if (tracersType == "visibility") {
  6820. color = getLineOfSight(player) ? hexToRgb(getColor("tracersColor2", "tracersColor2Rainbow")) : hexToRgb(getColor("tracersColor1", "tracersColor1Rainbow") )
  6821. };
  6822. updateOrCreateLinesESP(player, "playerESP", color);
  6823. player.tracerLines.visibility = player[H.playing] && extract("tracers") && passedLists;
  6824. player.lookDirLine.visibility = player[H.playing] && extract("lookTracers") && passedLists;
  6825. player.box.visibility = extract("playerESP") && passedLists;
  6826. // player.target.visibility = extract("targets") && passedLists;
  6827. // player.target.visibility = false;
  6828. if (player[H.actor]) {
  6829. let eggSize = extract("eggSize")
  6830. player[H.actor][H.bodyMesh].scaling._x = eggSize;
  6831. player[H.actor][H.bodyMesh].scaling._y = eggSize;
  6832. player[H.actor][H.bodyMesh].scaling._z = eggSize;
  6833. };
  6834. player[H.actor][H.bodyMesh].renderingGroupId = extract("chams") ? 1 : 0;
  6835. player.exists = objExists;
  6836. };
  6837. if (player) {
  6838. if (!ss.SETTINGS.safeNames) {
  6839. };
  6840. if (extract("unfilterNames")) { player.name = (cachedRealData[player.uniqueId]?.name || player.name);
  6841. } else player.name = (player?.normalName || player.name);
  6842. if (extract("nametags") && player[H.actor] && player[H.actor].nameSprite) { //taken from shellshock.js, so var names are weird
  6843. player[H.actor].nameSprite._manager.renderingGroupId = 1;
  6844. player[H.actor].nameSprite.renderingGroupId = 1;
  6845. var h = Math.length3(player[H.x] - ss.MYPLAYER[H.x], player[H.y] - ss.MYPLAYER[H.y], player[H.z] - ss.MYPLAYER[H.z]),
  6846. d = Math.pow(h, 1.25) * 2;
  6847. player[H.actor].nameSprite.width = d / 10 + .6;
  6848. player[H.actor].nameSprite.height = d / 20 + .3;
  6849. ss.MYPLAYER[H.actor].scene.activeCamera.fov = 0.75
  6850. };
  6851. if (!player.logged) {
  6852. player.logged = true;
  6853. if (extract("debug")) {
  6854. playerLogger.push(player);
  6855. log("Logged player: " + player.name, player)
  6856. }; //if youre a l33t kiddy who did a search for the term "logger", this does not in fact log any of the user's info. it just keeps track of players who joined and prints them to console.
  6857. if (extract("joinMessages") && (!newGame)) {
  6858. if (extract("publicBroadcast")) {
  6859. sendChatMessage((extract("joinLeaveBranding") ? "[SFC] " : "") + player.name + " joined.")
  6860. } else {
  6861. processChatItem("joined.", player.name, player.team, "rgba(0, 255, 0, 0.2)");
  6862. };
  6863. };
  6864. onlinePlayersArray.push([player, player.name, player.team]);
  6865. player[H.actor].setupNameSprite = (()=>{
  6866. setupNameSpriteNew(player[H.actor])
  6867. });
  6868. player[H.actor].setupNameSprite();
  6869. // let oldUpdateTeam = player[H.actor].updateTeam;
  6870. // player[H.actor].updateTeam = (()=>{
  6871. // updateTeamNew(player[H.actor], oldUpdateTeam)
  6872. // });
  6873. };
  6874. if (framesPassed % extract("nametagInfoInterval") === 0) {
  6875. //cache triggers
  6876. let playerInfo = {
  6877. score: player.score,
  6878. totalDeaths: player.totalDeaths,
  6879. bestGameStreak: player.bestGameStreak,
  6880. team: player.team,
  6881. hp: player[H.hp],
  6882. hardBoiledValue: player.hardBoiledValue,
  6883. shouldReplace: extract("nametagInfo"), //replace with the extract l8r
  6884. };
  6885. let playerInfoOld = playerInfoCache[player.uniqueId];
  6886. if ((playerInfoOld) && (
  6887. (playerInfo.shouldReplace != playerInfoOld.shouldReplace) || ((playerInfo.shouldReplace) && (
  6888. (playerInfo.score != playerInfoOld.score) ||
  6889. (playerInfo.totalDeaths != playerInfoOld.totalDeaths) ||
  6890. (playerInfo.bestGameStreak != playerInfoOld.bestGameStreak) ||
  6891. (playerInfo.team != playerInfoOld.team) ||
  6892. (playerInfo.hp != playerInfoOld.hp) ||
  6893. (playerInfo.hardBoiledValue != playerInfoOld.hardBoiledValue)
  6894. ))
  6895. )) {
  6896. player[H.actor].setupNameSprite();
  6897. };
  6898. playerInfoCache[player.uniqueId] = playerInfo;
  6899. if (player[H.actor]?.nameSprite?.color) {
  6900. playerInfo.shouldReplace ?
  6901. (player[H.actor].nameSprite.color = ss.teamColors.textColor[0]) :
  6902. (player[H.actor].nameSprite.color = ss.teamColors.textColor[player.team]);
  6903. }
  6904. };
  6905. player.isOnline = objExists;
  6906. };
  6907. });
  6908. playersInGame = onlinePlayersArray.length;
  6909. for (let i = 0; i < onlinePlayersArray.length; i++) {
  6910. if (onlinePlayersArray[i][0] && onlinePlayersArray[i][0].isOnline == objExists) { //player still online
  6911. onlinePlayersArray[i][2] = onlinePlayersArray[i][0].team;
  6912. } else {
  6913. if (extract("leaveMessages") && (!newGame)) {
  6914. if (extract("publicBroadcast")) {
  6915. sendChatMessage((extract("joinLeaveBranding") ? "[SFC] " : "") + onlinePlayersArray[i][1] + " left.")
  6916. } else {
  6917. processChatItem("left.", onlinePlayersArray[i][1], onlinePlayersArray[i][2], "rgba(255, 0, 0, 0.2)");
  6918. };
  6919. };
  6920. onlinePlayersArray.splice(i, 1);
  6921. };
  6922. };
  6923. //update ammoESP boxes, tracer lines, colors
  6924. if (extract("ammoESP") || extract("ammoTracers") || extract("grenadeESP") || extract("grenadeTracers")) {
  6925. ss.OBJECTSVAR.getShadowMap()[H.renderList].forEach(item => {
  6926. if (item.isEnabled && item.isEnabled() && item.sourceMesh && item.sourceMesh.name && (item.sourceMesh.name == "grenadeItem" || item.sourceMesh.name == "ammo")) { //this is what we want
  6927. const itemType = item.sourceMesh.name;
  6928. let color = itemType == "ammo" && extract("ammoESPColor") || extract("grenadeESPColor");
  6929. color = hexToRgb(color);
  6930. updateOrCreateLinesESP(item, "ammoESP", color)
  6931. let willBeVisible = false;
  6932. if (itemType == "ammo") { //ammo
  6933. const regime = extract("ammoESPRegime");
  6934. if (regime == "whendepleted" && ammo.store == 0) {
  6935. willBeVisible = true;
  6936. } else if (regime == "whenlow" && ammo.store <= ammo.capacity) {
  6937. willBeVisible = true;
  6938. } else if (regime == "belowmax" && ammo.store < ammo.storeMax) {
  6939. willBeVisible = true;
  6940. } else if (regime == "alwayson") {
  6941. willBeVisible = true;
  6942. };
  6943. } else { //grenades
  6944. const regime = extract("grenadeESPRegime");
  6945. if (regime == "whendepleted" && ss.MYPLAYER.grenadeCount == 0) {
  6946. willBeVisible = true;
  6947. } else if (regime == "whenlow" && ss.MYPLAYER.grenadeCount <= 1) {
  6948. willBeVisible = true;
  6949. } else if (regime == "belowmax" && ss.MYPLAYER.grenadeCount < ss.MYPLAYER.grenadeCapacity) {
  6950. willBeVisible = true;
  6951. } else if (regime == "alwayson") {
  6952. willBeVisible = true;
  6953. };
  6954. };
  6955. item.box.visibility = willBeVisible && (itemType == "ammo" && extract("ammoESP") || extract("grenadeESP"));
  6956. item.tracerLines.visibility = willBeVisible && (itemType == "ammo" && extract("ammoTracers") || extract("grenadeTracers"));
  6957. item.exists = objExists;
  6958. };
  6959. });
  6960. };
  6961. //trajectories
  6962. if (trajectory) {
  6963. trajectory.dispose();
  6964. trajectory = null;
  6965. };
  6966. if (extract("trajectories") && ss.MYPLAYER.grenadeCount >= 1 && ss.MYPLAYER[H.playing]) {
  6967. if (!trajectoryNade) {
  6968. const clone = ss.cloneMesh('grenadeItem', ss.SCENE, null);
  6969. if (clone) {
  6970. clone.setEnabled(true);
  6971. trajectoryNade = clone;
  6972. trajectoryNade.renderOverlay = true;
  6973. trajectoryNade.renderingGroupId = 1;
  6974. };
  6975. };
  6976. let power = 0;
  6977. if (document.getElementById("grenadeThrowContainer").style.visibility === "visible") {
  6978. power = ss.grenadeThrowPower;
  6979. } else if (extract("grenadeMax")) {
  6980. power = extract("grenadePower");
  6981. };
  6982. const result = predictGrenade(ss.MYPLAYER, power);
  6983. const lines = [result.positions];
  6984. trajectory = L.BABYLON.MeshBuilder.CreateLineSystem("trajectory", { lines: lines }, ss.SCENE);
  6985. trajectory.color = new L.BABYLON.Color3(1, 0, 0);
  6986. trajectory.renderingGroupId = 1;
  6987. trajectoryNade.position = result.finalPos;
  6988. } else if (trajectoryNade) {
  6989. trajectoryNade.dispose();
  6990. trajectoryNade = null;
  6991. };
  6992. // log("done updating lines")
  6993. //garbage collection
  6994. for (let i = 0; i < ESPArray.length; i++) {
  6995. if (ESPArray[i][0] && ESPArray[i][0].exists == objExists) { //obj still exists and still relevant
  6996. //do nothing, lol
  6997. } else {
  6998. if (ESPArray[i][0]) { //obj still exists but no longer relevant
  6999. log('%cRemoving tracer line due to irrelevant object', 'color: white; background: red');
  7000. ESPArray[i][0].generatedESP = false;
  7001. } else { //obj no longer exists
  7002. log('%cRemoving tracer line due to no longer exists', 'color: white; background: red');
  7003. };
  7004. ESPArray[i][1].dispose(); //tracer
  7005. ESPArray[i][2].dispose(); //esp box
  7006. if (ESPArray[i][3]) { ESPArray[i][3].dispose() }; //target
  7007. if (ESPArray[i][4]) { ESPArray[i][4].dispose() }; //look linetrace forward line
  7008. ESPArray.splice(i, 1);
  7009. };
  7010. }; newGame = false;
  7011. };
  7012. createAnonFunction("retrieveFunctions", function (vars, doStateFarm) {
  7013. ss = vars;
  7014. // unsafeWindow.vueApp._showGenericPopup = unsafeWindow.vueApp.showGenericPopup; //this just doesnt work
  7015. // unsafeWindow.vueApp.showGenericPopup = (...args) => {
  7016. // if (args[0] === 'session_expired') return;
  7017. // return unsafeWindow.vueApp._showGenericPopup(...args);
  7018. // };
  7019. if (doStateFarm) {
  7020. didStateFarm = true;
  7021. return F.STATEFARM();
  7022. } else {
  7023. log("StateFarm: creating silence audio");
  7024. unsafeWindow.BAWK.sounds.silence = Object.assign({}, unsafeWindow.BAWK.sounds.ammo);
  7025. unsafeWindow.BAWK.sounds.silence.end = 0.001;
  7026. };
  7027. });
  7028. createAnonFunction("register", async () => {
  7029. let wait = (ms) => new Promise((res) => setTimeout(res, ms));
  7030. document.body.insertAdjacentHTML('beforeend', `
  7031. <style>
  7032. .shellprintOverlay {
  7033. position: fixed;
  7034. top: 0;
  7035. left: 0;
  7036. width: 100%;
  7037. height: 100%;
  7038. background-color: rgba(0, 0, 0);
  7039. z-index: 9999999;
  7040. display: flex;
  7041. flex-direction: column;
  7042. justify-content: center;
  7043. align-items: center;
  7044. }
  7045. .shellprintText {
  7046. color: white;
  7047. font-weight: bold;
  7048. font-family: 'Nunito';
  7049. font-size: 20px;
  7050. }
  7051. .shellprintStatus {
  7052. color: white;
  7053. font-weight: bold;
  7054. font-family: 'Nunito';
  7055. font-size: 36px;
  7056. }
  7057. </style>
  7058. <div class="shellprintOverlay">
  7059. <span class="shellprintText">[ ShellPrint @ discord.gg/XAyZ6ndEd4 ]</span>
  7060. <span class="shellprintStatus"></span>
  7061. </div>
  7062. `);
  7063. const shellprint = {
  7064. write: (p) => document.querySelector('.shellprintStatus').innerText = p, // eslint-disable-line
  7065. remove: () => {
  7066. let style = (s, t) => document.querySelector('.shellprintOverlay').style[s] = t; // eslint-disable-line
  7067. style('visibility', 'hidden');
  7068. style('opacity', 0);
  7069. style('transition', 'visibility 0s 1s, opacity 1s linear');
  7070. setTimeout(() => document.querySelector('.shellprintOverlay').remove(), 1001);
  7071. }
  7072. };
  7073. shellprint.write('Fetching Account...');
  7074. let account;
  7075. try {
  7076. account = await (await fetch(shellPrintURL + extract('shellPrintKey'), {
  7077. method: 'POST'
  7078. })).json();
  7079. } catch {};
  7080. if (!account) {
  7081. shellprint.write('ShellPrint is currently broken. Try again later.');
  7082. setTimeout(() => shellprint.remove(), 2000);
  7083. return;
  7084. } else if (!account.success) {
  7085. shellprint.write(account.error || 'Unknown error.');
  7086. setTimeout(() => shellprint.remove(), 2000);
  7087. return;
  7088. };
  7089. shellprint.write('Fetched Account! 🎉 Signing in....');
  7090. let signIn = async () => {
  7091. try {
  7092. await unsafeWindow.firebase.auth().signInWithEmailAndPassword(account.email, account.password);
  7093. } catch {
  7094. await signIn();
  7095. };
  7096. };
  7097. await signIn();
  7098. shellprint.write('Fully signed in! 🎉');
  7099. await wait(1000);
  7100. shellprint.remove();
  7101. });
  7102. const applySkybox = () => {
  7103. //check if we should switch
  7104. const delta2 = Date.now() - lastRandomSkyBoxChangeTime;
  7105. const desire = extract("randomSkyBoxInterval") ? extract("randomSkyBoxInterval") * 60 * 1000 : -1; //stored in minutes, so *60 -> seconds *1000 -> milliseconds.
  7106. if (
  7107. extract("randomSkyBox") &&
  7108. delta2 != -1 &&
  7109. delta2 > desire
  7110. ) {
  7111. const newIdx = randomInt(0, loadedSkyboxes.length - 1);
  7112. log("skybox change overdue for " + (delta2 - desire) + "ms. New skybox index chosen: " + newIdx);
  7113. change("skybox", newIdx); //maybe not the best to overwrite the actual module setting, but eh, don't want to rewrite the entire thing....
  7114. lastRandomSkyBoxChangeTime = Date.now();
  7115. };
  7116. if (!unsafeWindow[skyboxName]) return;
  7117. if (!(extract('skybox') === 'default' || extract('skybox') === true || ss.SCENE.skyboxTextureThing == extract('skybox'))) {
  7118. let url = `${atob(extract("skybox"))}/skybox`;
  7119. unsafeWindow[skyboxName].material.reflectionTexture = new L.BABYLON.CubeTexture(url, ss.SCENE);
  7120. unsafeWindow[skyboxName].material.reflectionTexture.coordinatesMode = 5; //L.BABYLON.Texture.SKYBOX_MODE
  7121. ss.SCENE.skyboxTextureThing = extract('skybox');
  7122. };
  7123. };
  7124. createAnonFunction("STATEFARM", function () {
  7125. ss.PLAYERS.forEach((PLAYER) => (PLAYER.hasOwnProperty("ws")) ? (ss.MYPLAYER = PLAYER) : null);
  7126. if (!ranOneTime) {
  7127. oneTime();
  7128. } else if (typeof (L.BABYLON) !== 'undefined') {
  7129. initVars();
  7130. updateLinesESP();
  7131. // mapStuff();
  7132. applySkybox();
  7133. let isVisible;
  7134. const player = currentlyTargeting || playerLookingAt || undefined;
  7135. if (player && player[H.playing]) {
  7136. isVisible = getLineOfSight(player);
  7137. };
  7138. highlightCrossHairReticleDot(extract("showLOS") ? isVisible : null);
  7139. if (extract("radar")) {
  7140. myPlayerDot.style.display = 'block';
  7141. ss.PLAYERS.forEach(player => { updateRadar(player, ss.MYPLAYER) });
  7142. } else {
  7143. ss.PLAYERS.forEach(player => {
  7144. if (playerDotsMap.has(player.uniqueId)) {
  7145. const playerDotToRemove = playerDotsMap.get(player.uniqueId);
  7146. mapEl.removeChild(playerDotToRemove);
  7147. playerDotsMap.delete(player.uniqueId);
  7148. }
  7149. });
  7150. myPlayerDot.style.display = 'none';
  7151. };
  7152. if (extract("freecam")) {
  7153. ss.MYPLAYER[H.actor][H.mesh].position.y = ss.MYPLAYER[H.actor][H.mesh].position.y + 1;
  7154. };
  7155. //credit to helloworld for the idea (worked it out on my own tho :P)
  7156. if (ss.MYPLAYER[H.playing]) {
  7157. //camera adjustments
  7158. ss.CAMERA.position.y = extract("perspective") !== "firstPerson" ? extract("perspectiveY") || 0 : 0;
  7159. ss.CAMERA.position.z = extract("perspective") !== "firstPerson" ? extract("perspective") == "thirdPerson" ? (extract("perspectiveZ") || 0) : (-extract("perspectiveZ")) || 0 : 0;
  7160. ss.CAMERA.rotation.x = extract("perspective") == "thirdPersonAlt" ? Math.PI : 0;
  7161. //adjust for scoping
  7162. if (ss.MYPLAYER.scope) {
  7163. let finalFov = 0.4;
  7164. let ourFov = (extract("fov") * (Math.PI / 180));
  7165. let currentFov = ss.CAMERA.fov;
  7166. let percentage = (currentFov - finalFov) / ourFov;
  7167. // log(percentage, finalFov, ourFov, currentFov);
  7168. ss.CAMERA.position.y = ss.CAMERA.position.y * percentage; //i thought this would make a sick transition but it actually wasnt that cool
  7169. ss.CAMERA.position.z = ss.CAMERA.position.z * percentage;
  7170. ss.CAMERA.rotation.x = ss.CAMERA.rotation.x * percentage;
  7171. };
  7172. //rendering
  7173. ss.MYPLAYER[H.actor].gunContainer._children[0].renderingGroupId = extract("perspective") !== "firstPerson" ? 0 : 2;
  7174. ss.MYPLAYER[H.actor].gunContainer._children[2].renderingGroupId = extract("perspective") !== "firstPerson" ? 0 : 2;
  7175. if (!ss.MYPLAYER.stampApplied) ss.MYPLAYER[H.actor].applyStamp(ss.MYPLAYER.stampItem); ss.MYPLAYER.stampApplied = true;
  7176. if (!ss.MYPLAYER[H.actor].hat) {
  7177. ss.MYPLAYER[H.actor].wearHat(ss.MYPLAYER.hatItem);
  7178. } else {
  7179. ss.MYPLAYER[H.actor].hat.visibility = extract("perspective") !== "firstPerson" ? 1 : 0;
  7180. };
  7181. //alpha effect, it sucks and doesnt work the way i wanted it to
  7182. /*
  7183. ss.MYPLAYER[H.actor].hands.material.alphaMode = 5;
  7184. ss.MYPLAYER[H.actor][H.bodyMesh].material.alphaMode = 5;
  7185. ss.MYPLAYER[H.actor].hands.material.alpha = ((extract("perspective") !== "firstPerson") && extract("perspectiveAlpha")) ? .5 : 1;
  7186. ss.MYPLAYER[H.actor][H.bodyMesh].material.alpha = ((extract("perspective") !== "firstPerson") && extract("perspectiveAlpha")) ? .5 : 1;
  7187. */
  7188. };
  7189. let filter = typeof(extract("filter")) == 'number' ? extract("filter") : 2;
  7190. if (ss.SCENE && ss.SCENE.appliedFilter !== filter) {
  7191. ss.SCENE.materials.forEach(material => {
  7192. material.alphaMode = filter;
  7193. }); ss.SCENE.appliedFilter = filter;
  7194. };
  7195. if (ss.MYPLAYER && ss.MYPLAYER[H.actor] && ss.MYPLAYER[H.actor][H.mesh]) {
  7196. ss.MYPLAYER[H.actor][H.mesh].scaling._y = extract("worldFlattening"); //this used to be left side gun but for some reason it just affects the world IDK
  7197. ss.MYPLAYER[H.actor].gunContainer.scaling._x = extract("gunPosition") == "hidden" ? 0 : 1;
  7198. ss.MYPLAYER[H.actor].gunContainer.scaling._y = extract("gunPosition") == "hidden" ? 0 : 1;
  7199. ss.MYPLAYER[H.actor].gunContainer.scaling._x = extract("gunPosition") == "hidden" ? 0 : 1;
  7200. };
  7201. if (extract("spamChat")) {
  7202. if (document.getElementById("chatIn").style.visibility == 'visible') {
  7203. if (spamDelay < Date.now()) {
  7204. if (Date.now() > (lastSpamMessage[0] + extract("spamChatDelay"))) {
  7205. let possibleMessages = extract("spamChatText").split("|");
  7206. let chosenMessage = possibleMessages[spamMessageCount % possibleMessages.length];
  7207. if (chosenMessage == lastSpamMessage[1]) { chosenMessage += String.fromCharCode(97 + Math.floor(Math.random() * 26)) };
  7208. sendChatMessage(chosenMessage);
  7209. lastSpamMessage = [Date.now(), chosenMessage];
  7210. spamMessageCount += 1;
  7211. };
  7212. } else if (spamDelay < Date.now() - 250) {
  7213. spamDelay = Date.now() + 250;
  7214. };
  7215. };
  7216. };
  7217. if (extract("chatHighlight")) {
  7218. document.getElementById("chatOut").style.userSelect = "text"
  7219. };
  7220. if (extract("autoRefill")) {
  7221. //log(ss.MYPLAYER.weapon);
  7222. if (ammo.rounds == 0) {
  7223. ss.MYPLAYER.reload();
  7224. } else if (extract("smartRefill")) {
  7225. let smartRefillMinAmmo = {
  7226. eggk47: 1,
  7227. dozenGauge: 0,
  7228. csg1: 1,
  7229. rpegg: 0,
  7230. smg: 1,
  7231. m24: 0,
  7232. aug: 3,
  7233. cluck9mm: 1
  7234. };
  7235. if (ammo.rounds <= smartRefillMinAmmo[ss.MYPLAYER.weapon.constructor.standardMeshName]) {
  7236. ss.MYPLAYER.reload();
  7237. };
  7238. };
  7239. };
  7240. if (extract("autoGrenade") && isVisible && (ss.MYPLAYER.grenadeCount > 0)) {
  7241. ss.MYPLAYER.throwGrenade();
  7242. };
  7243. if ((extract("autoWeapon") !== "disabled") && (!ss.MYPLAYER[H.playing])) {
  7244. weaponArray.random = randomInt(0, 6);
  7245. document.querySelectorAll('.weapon_img')[weaponArray[extract("autoWeapon")]].parentNode.click();
  7246. };
  7247. if (extract("revealBloom") || extract("showMinAngle")) {
  7248. const distCenterToOuter = 2 * (200 / ss.CAMERA.fov);
  7249. const bloomValues = predictBloom(ss.MYPLAYER[H.yaw], ss.MYPLAYER[H.pitch]);
  7250. // Set the new position of the circle
  7251. const centerX = (unsafeWindow.innerWidth / 2);
  7252. const centerY = (unsafeWindow.innerHeight / 2);
  7253. const offsettedX = centerX - (2 * distCenterToOuter * bloomValues[0]);
  7254. const offsettedY = centerY - (2 * distCenterToOuter * bloomValues[1]);
  7255. if (extract("revealBloom")) {
  7256. redCircle.style.display = '';
  7257. redCircle.style.bottom = offsettedY + 'px';
  7258. redCircle.style.right = offsettedX + 'px';
  7259. } else {
  7260. redCircle.style.display = 'none';
  7261. };
  7262. if (extract("showMinAngle")) {
  7263. minangleCircle.style.display = '';
  7264. let idkWhatThisIs = 25 * (1.25 / ss.CAMERA.fov);
  7265. minangleCircle.style.width = extract("aimbotMinAngle") * idkWhatThisIs + 'px';
  7266. minangleCircle.style.height = extract("aimbotMinAngle") * idkWhatThisIs + 'px';
  7267. minangleCircle.style.bottom = centerY + 'px';
  7268. minangleCircle.style.right = centerX + 'px';
  7269. };
  7270. };
  7271. if (!extract("showMinAngle")) {
  7272. minangleCircle.style.display = 'none';
  7273. };
  7274. const playerSlots = document.querySelectorAll('#playerList .playerSlot');
  7275. playerSlots.forEach(slot => {
  7276. const usernameElement = slot.querySelector('.playerSlot--name');
  7277. let username = usernameElement ? usernameElement.textContent.trim() : "";
  7278. const badgeURLs = Array.from(findBadgesForUsername(username)).reverse();
  7279. const existingBadges = slot.querySelectorAll('.badge-image');
  7280. if ((!extract("customBadges")) || (badgeURLs && badgeURLs.length < 1)) {
  7281. existingBadges.forEach(badge => badge.remove());
  7282. } else if (extract("customBadges") && username && badgeURLs && badgeURLs.length > 0 && existingBadges && existingBadges.length < 1) {
  7283. existingBadges.forEach(badge => badge.remove());
  7284. const eggIcon = !!(slot.querySelector('.playerSlot--icons .fas.fa-egg:not(.hidden)') || slot.querySelector('.playerSlot--icons .fab.fa-twitch:not(.hidden)'));
  7285. log(eggIcon, username)
  7286. badgeURLs.forEach((badgeURL, index) => {
  7287. const badgeImage = document.createElement('img');
  7288. badgeImage.src = badgeListURL + badgeURL;
  7289. badgeImage.className = 'badge-image';
  7290. badgeImage.style.position = 'absolute';
  7291. badgeImage.style.height = 'auto';
  7292. badgeImage.style.width = 'auto';
  7293. badgeImage.style.maxHeight = '100%';
  7294. badgeImage.style.maxWidth = '100%';
  7295. badgeImage.style.right = `${-13 - index * 8 - (eggIcon ? 10 : 0)}%`;
  7296. badgeImage.style.top = '50%';
  7297. badgeImage.style.transform = 'translateY(-50%)';
  7298. slot.style.position = 'relative';
  7299. slot.appendChild(badgeImage);
  7300. });
  7301. };
  7302. });
  7303. let partyLightsIntensity = extract("partyLightsIntensity") || 0;
  7304. if (extract("partyLightsEnabled") && partyLightsIntensity > 0 && !ss.SCENE.lights.find(light => light.name === "light")) {
  7305. log("Lets party :joe_cool:");
  7306. partyLight = new L.BABYLON.PointLight("light", new L.BABYLON.Vector3(0, 10, 0), ss.SCENE);
  7307. partyLight.diffuse = new L.BABYLON.Color3(1, 0, 0);
  7308. partyLight.specular = new L.BABYLON.Color3(1, 1, 1);
  7309. };
  7310. if (partyLight) {
  7311. partyLight.intensity = partyLightsIntensity;
  7312. var hue = (Date.now() / 1000) % 1;
  7313. partyLight.diffuse = hslToRgb(hue, 1, 0.5);
  7314. };
  7315. try {
  7316. let minAccuracy = ss.MYPLAYER.weapon.accuracyMin + ss.MYPLAYER.weapon.accuracyLoss;
  7317. accuracyPercentage = (ss.MYPLAYER.weapon.accuracy - minAccuracy) / (ss.MYPLAYER.weapon.accuracyMax - minAccuracy);
  7318. accuracyPercentage = Math.max(0, accuracyPercentage);
  7319. } catch (error) {
  7320. accuracyPercentage = 1;
  7321. };
  7322. // playerNearest=undefined; //currently unused and not defined
  7323. // enemyLookingAt=undefined; //currently unused and not defined
  7324. let playerLookingAtMinimum = 999999;
  7325. playerLookingAt = undefined; //used for player info
  7326. let enemyMinimumDistance = 999999;
  7327. enemyNearest = undefined; //used for antisneak
  7328. let previousTarget = currentlyTargeting;
  7329. let selectNewTarget = (!extract("antiSwitch") || !currentlyTargeting);
  7330. if (selectNewTarget) currentlyTargeting = false;
  7331. let isDoingAimbot = (extract("aimbot") && (extract("aimbotRightClick") ? isRightButtonDown : true) && ss.MYPLAYER[H.playing]);
  7332. // log(targetingComplete);
  7333. const targetType = extract("aimbotTargetMode");
  7334. const visibilityMode = extract("aimbotVisibilityMode");
  7335. let enemyMinimumValue = ((targetType == "pointingat") && (extract("silentAimbot"))) ? deg2rad(extract("aimbotMinAngle")) : 10000; //used for selecting target (either pointingat or nearest)
  7336. let enemyMinimumAimDistance = 999999;
  7337. enemyAimNearest = undefined;
  7338. let didAimbot
  7339. const candidates = [];
  7340. amountVisible = 0;
  7341. ss.PLAYERS.forEach(player => { //iterate over all players to filter out players that we definitely wont target, and also calc some stats for later use
  7342. if (player && (player !== ss.MYPLAYER) && player[H.playing] && (player[H.hp] > 0)) {
  7343. const whitelisted = (extract("enableWhenNoneVisible") || !extract("enableWhitelistAimbot") || extract("enableWhitelistAimbot") && playerMatchesList(whitelistPlayers, player));
  7344. const blacklisted = (extract("enableBlacklistAimbot") && playerMatchesList(blacklistPlayers, player));
  7345. const passedLists = (whitelisted) && (!blacklisted);
  7346. player.distance = distancePlayers(player);
  7347. player.adjustedDistance = distancePlayers(player, 2);
  7348. const directionVector = getDirectionVectorFacingTarget(player);
  7349. player.angleDiff = getAngularDifference(ss.MYPLAYER, { yawReal: calculateYaw(directionVector), pitchReal: calculatePitch(directionVector) });
  7350. player.isVisible = getLineOfSight(player, extract("prediction"));
  7351. if (player.angleDiff < playerLookingAtMinimum) {
  7352. playerLookingAtMinimum = player.angleDiff;
  7353. playerLookingAt = player;
  7354. };
  7355. if (passedLists) { //is possibly an an enemy
  7356. if (isDoingAimbot) { //is doing aimbot and we care about getting a new target
  7357. if (player.adjustedDistance < enemyMinimumValue) { //for antisneak, not targeting
  7358. enemyMinimumDistance = player.adjustedDistance;
  7359. enemyNearest = player;
  7360. };
  7361. if (player.aimdistance < enemyMinimumAimDistance) {
  7362. enemyMinimumAimDistance = player.aimdistance;
  7363. enemyAimNearest = player;
  7364. };
  7365. if (selectNewTarget) {
  7366. candidates.push(player);
  7367. if ( player.isVisible ) { amountVisible += 1 };
  7368. };
  7369. };
  7370. };
  7371. };
  7372. });
  7373. candidates.forEach(player => {
  7374. const valueToUse = (
  7375. (targetType == "nearest" && (
  7376. player.adjustedDistance
  7377. )) ||
  7378. (targetType == "pointingat" && (
  7379. player.angleDiff
  7380. )) ||
  7381. (targetType == "lowestHp" && (
  7382. player[H.hp]
  7383. )) ||
  7384. (targetType == "mostKills" && (
  7385. -player.score
  7386. )) ||
  7387. (targetType == "aimingAt" && (
  7388. player.aimdistance
  7389. ))
  7390. );
  7391. let visibleValue = ((!ss.MYPLAYER.team) || (player.team !== ss.MYPLAYER.team));
  7392. if (visibilityMode == "disabled") { //we dont care about that shit
  7393. //go ahead
  7394. } else if (amountVisible < 1) { //none of candidates are visible
  7395. const whitelisted = (!extract("enableWhitelistAimbot") || extract("enableWhitelistAimbot") && playerMatchesList(whitelistPlayers, player));
  7396. //log(player.name, whitelisted, visibleValue) //grrrr no console spam
  7397. visibleValue = (whitelisted && extract("enableWhenNoneVisible")) || (visibilityMode == "onlyvisible" ? false : visibleValue); //there are no visible candidates, so either select none if "onlyvisible" or ignore this altogether
  7398. } else { //some are visible
  7399. visibleValue = visibleValue && player.isVisible; //assuming now that either "prioritise" or "onlyvisible" are enabled, as "onlyvisible"'s use case fulfilled in previous statement
  7400. };
  7401. if (visibleValue && extract("aimbotTargetMode") !== "aimingAt") {
  7402. if (valueToUse < enemyMinimumValue) {
  7403. enemyMinimumValue = valueToUse;
  7404. currentlyTargeting = player;
  7405. };
  7406. };
  7407. if(extract("aimbotTargetMode") === "aimingAt"){
  7408. currentlyTargeting = enemyAimNearest;
  7409. };
  7410. });
  7411. const deltaTime = performance.now() - nowOld;
  7412. nowOld += deltaTime;
  7413. if (isDoingAimbot) {
  7414. if (currentlyTargeting && currentlyTargeting[H.playing] && currentlyTargeting[H.actor]) { //found a target
  7415. didAimbot = true;
  7416. currentAimTime += deltaTime;
  7417. if (currentlyTargeting.generatedESP) {
  7418. if (extract("tracers")) {
  7419. currentlyTargeting.tracerLines.color = new L.BABYLON.Color3(...hexToRgb(getColor("aimbotColor", "aimbotRainbow")));
  7420. };
  7421. if (extract("playerESP")) {
  7422. currentlyTargeting.box.color = new L.BABYLON.Color3(...hexToRgb(getColor("aimbotColor", "aimbotRainbow")));
  7423. };
  7424. };
  7425. if ((!extract("silentAimbot")) && (!extract("noWallTrack") || getLineOfSight(player, true)) && (targetingComplete || (deg2rad(extract("aimbotMinAngle")) > currentlyTargeting?.angleDiff))) {
  7426. const aimbot = getAimbot(currentlyTargeting);
  7427. let antiSnap = (1 - (extract("aimbotAntiSnap") || 0));
  7428. //new method: neuublue / https://github.com/AimTuxOfficial/AimTux/blob/master/src/Hacks/aimbot.cpp
  7429. const yawDiff = Math.radDifference(aimbot.yawReal, ss.MYPLAYER[H.yaw]);
  7430. const pitchDiff = Math.radDifference(aimbot.pitchReal, ss.MYPLAYER[H.pitch]);
  7431. if (extract("aimbotAntiSnapRegime") != "slowEnd") { // not slow end
  7432. antiSnap /= ((yawDiff ** 2 + pitchDiff ** 2) ** 0.5) * 4; // constant
  7433. if (extract("aimbotAntiSnapRegime") == "fastEnd") antiSnap *= antiSnap * 10; // fast end
  7434. else if (extract("aimbotAntiSnapRegime") == "timeBased") antiSnap *= currentAimTime / extract("maxAimTime"); // time based
  7435. antiSnap = Math.min(1, antiSnap);
  7436. };
  7437. ss.MYPLAYER[H.yaw] = setPrecision(ss.MYPLAYER[H.yaw] + yawDiff * antiSnap);
  7438. ss.MYPLAYER[H.pitch] = setPrecision(ss.MYPLAYER[H.pitch] + pitchDiff * antiSnap);
  7439. if (previousTarget !== currentlyTargeting) { targetingComplete = false };
  7440. //old method for antisnap
  7441. /*
  7442. const distanceBetweenPlayers = distancePlayers(currentlyTargeting);
  7443. const lerp = function (start, end, alpha) {
  7444. let value = (1 - alpha) * start + alpha * end;
  7445. if ((Math.abs(end - start) < (0.2 / (distanceBetweenPlayers))) || (targetingComplete)) {
  7446. value = end; targetingComplete = true;
  7447. };
  7448. return value;
  7449. };
  7450. ss.MYPLAYER[H.yaw] = setPrecision(lerp(ss.MYPLAYER[H.yaw], aimbot.yawReal, antiSnap));
  7451. ss.MYPLAYER[H.pitch] = setPrecision(lerp(ss.MYPLAYER[H.pitch], aimbot.pitchReal, antiSnap));
  7452. */
  7453. };
  7454. if (enemyMinimumDistance < extract("antiSneak")) {
  7455. currentlyTargeting = enemyNearest;
  7456. if (ammo.rounds === 0) { //basically after MAGDUMP, switch to pistol, if that is empty reload and keep shootin'
  7457. if (ss.MYPLAYER.weaponIdx === 0) { ss.MYPLAYER.swapWeapon(1); }
  7458. else { ss.MYPLAYER.reload(); }
  7459. };
  7460. ss.MYPLAYER.pullTrigger();
  7461. // log("ANTISNEAK---->", enemyNearest?.name, enemyMinimumDistance);
  7462. };
  7463. } else {
  7464. currentAimTime -= deltaTime;
  7465. if (extract("oneKill")) {
  7466. currentlyTargeting = "dead";
  7467. } else {
  7468. currentlyTargeting = false;
  7469. };
  7470. };
  7471. } else {
  7472. currentAimTime -= deltaTime;
  7473. currentlyTargeting = false;
  7474. targetingComplete = false;
  7475. if (extract("enableSeizureX")) {
  7476. ss.MYPLAYER[H.yaw] += extract("amountSeizureX")
  7477. };
  7478. if (extract("enableSeizureY")) {
  7479. ss.MYPLAYER[H.pitch] += extract("amountSeizureY")
  7480. };
  7481. };
  7482. currentAimTime = Math.clamp(currentAimTime, 0, extract("maxAimTime"));
  7483. highlightTargetOnLeaderboard(currentlyTargeting, (extract("highlightLeaderboard")) ? didAimbot : false);
  7484. if (extract("upsideDown")) { //sorta useless
  7485. if (ss.MYPLAYER[H.pitch] < 1.5 && ss.MYPLAYER[H.pitch] > -1.5) {
  7486. ss.MYPLAYER[H.pitch] = Math.PI;
  7487. };
  7488. };
  7489. if (extract("silentRoll")) {
  7490. ss.MYPLAYER[H.pitch] += 2 * Math.PI;
  7491. };
  7492. if (extract("enableAutoFire")) {
  7493. let autoFireType = extract("autoFireType");
  7494. let doAutoFire = false
  7495. if (autoFireType == "always") {
  7496. doAutoFire = true;
  7497. } else if (autoFireType == "whileAimbot" && didAimbot) {
  7498. doAutoFire = true;
  7499. } else if (autoFireType == "whileVisible" && isVisible) {
  7500. doAutoFire = true;
  7501. } else if (autoFireType == "whileVisAimbot" && isVisible && didAimbot) {
  7502. doAutoFire = true;
  7503. };
  7504. if (doAutoFire) {
  7505. if ((ammo.rounds > 0) || (ammo.store > 0)) { //i fucking hate tweakpane. "errrm actually when a slider is 0 it becomes undefined" go fuck yourself.
  7506. ((accuracyPercentage >= (extract("autoFireAccuracy") || 0))) && ss.MYPLAYER.pullTrigger();
  7507. } else {
  7508. ss.MYPLAYER.melee();
  7509. };
  7510. };
  7511. };
  7512. //method by de_Neuublue
  7513. if (extract("enableAutomatic")) {
  7514. if (ss.MYPLAYER.weapon.constructor.originallySemi == null) {
  7515. ss.MYPLAYER.weapon.constructor.originallySemi = !ss.MYPLAYER.weapon.constructor.automatic;
  7516. };
  7517. ss.MYPLAYER.weapon.constructor.automatic = true;
  7518. } else if (ss.MYPLAYER.weapon.constructor.originallySemi) {
  7519. ss.MYPLAYER.weapon.constructor.originallySemi = null;
  7520. ss.MYPLAYER.weapon.constructor.automatic = false;
  7521. };
  7522. if (updateMenu) {
  7523. updateMenu = false; initMenu(false);
  7524. tp.mainPanel.hidden = extract("hideAtStartup");
  7525. };
  7526. //nobob
  7527. if (extract("bobModifierEnabled")) {
  7528. let modifier = extract("bobModifier") || 0;
  7529. if (!(extract("bobModifierWhenStill") && ss.CONTROLKEYS !== 0))
  7530. ss.MYPLAYER[H.actor].bobbleIntensity = modifier;
  7531. // log(ss.MYPLAYER[H.actor].bobbleIntensity, modifier);
  7532. };
  7533. let doRender = true;
  7534. if ((extract("renderDelay") > 10) && (Date.now() < (previousFrame + extract("renderDelay")))) { //because bots lmao
  7535. doRender = false;
  7536. } else {
  7537. previousFrame = Date.now();
  7538. };
  7539. framesPassed++;
  7540. return (!doRender);
  7541. };
  7542. });
  7543. };
  7544. //start init thingamajigs
  7545. log("StateFarm: startUp()", attemptedInjection);
  7546. startUp();
  7547. log("StateFarm: after startUp()", attemptedInjection);
  7548. if (typeof GM_info !== 'undefined' && GM_info?.scriptHandler == "Tampermonkey") {
  7549. let count = GM_getValue("StateFarm_TampermonkeyWarnings") || 0;
  7550. count++;
  7551. if (count <= 3) {
  7552. let userConfirmed = confirm("StateFarm Client: Tampermonkey detected! StateFarm Client does not support this manager, use Violentmonkey instead. Press OK to be redirected to the Violentmonkey website. You can continue to use Tampermonkey, but expect unreliable results. For more information, visit our Discord server: "+discordURL);
  7553. if (userConfirmed) {
  7554. GM_openInTab(violentmonkeyURL, { active: true });
  7555. };
  7556. alert(`This alert will show three times in total. Please install Violentmonkey before reporting issues. ${3-count} more warnings.`);
  7557. };
  7558. GM_setValue("StateFarm_TampermonkeyWarnings", count); //continue counting for the lulz
  7559. };
  7560. setTimeout(() => {
  7561. if (!attemptedInjection) {
  7562. log("Injection didn't work for whatever reason, let's try again.");
  7563. reloadPage();
  7564. };
  7565. }, 30000);
  7566. })();
  7567. // log("StateFarm: after function", attemptedInjection);