Greasy Fork is available in English.

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

Fixed for 0.48.3! Advanced, Open Source, No Ads. Best cheats menu for shellshock.io in 2024. Many modules such as Aimbot, PlayerESP, AmmoESP, Chams, Nametags, Join/Leave messages, Chat Filter Disabling, AntiAFK, FOV Slider, Zooming, Co-ords, Player Stats, Auto Refill and many more whilst having unsurpassed customisation options such as binding to any key, easily editable color scheme and themes - all on the fly!

Versión del día 01/01/2025. Echa un vistazo a la versión más reciente.

  1. // ==UserScript==
  2. // @name Shell Shockers Aimbot & ESP: StateFarm Client V3 - Bloom, Chat, Botting, Unban & More, shellshock.io
  3. // @description Fixed for 0.48.3! Advanced, Open Source, No Ads. Best cheats menu for shellshock.io in 2024. Many modules such as Aimbot, PlayerESP, AmmoESP, Chams, Nametags, Join/Leave messages, Chat Filter Disabling, AntiAFK, FOV Slider, Zooming, Co-ords, Player Stats, Auto Refill and many more whilst having unsurpassed customisation options such as binding to any key, 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.  
  10. // @grant GM_setValue
  11. // @grant GM_getValue
  12. // @grant GM_deleteValue
  13. // @grant GM_listValues
  14. // @grant GM_info
  15. // @grant GM_setClipboard
  16. // @grant GM_openInTab
  17.  
  18. // @grant GM.setValue
  19. // @grant GM.getValue
  20. // @grant GM.deleteValue
  21. // @grant GM.listValues
  22. // @grant GM.info
  23. // @grant GM.setClipboard
  24. // @grant GM.openInTab
  25.  
  26. // @icon https://raw.githubusercontent.com/Hydroflame522/StateFarmClient/main/icons/StateFarmClientLogo384px.png?v=1
  27.  
  28. // @require https://cdn.jsdelivr.net/npm/tweakpane@3.1.10/dist/tweakpane.min.js
  29. // @require https://cdn.jsdelivr.net/npm/@tweakpane/plugin-essentials@0.1.8/dist/tweakpane-plugin-essentials.min.js
  30. // @require https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.1.1/crypto-js.min.js
  31. // @require https://cdnjs.cloudflare.com/ajax/libs/jszip/3.7.1/jszip.min.js
  32.  
  33. // version naming:
  34. //3.#.#-pre[number] for development versions, increment for every commit (not full release) note: please increment it
  35. //3.#.#-release for release (in the unlikely event that happens)
  36. // this ensures that each version of the script is counted as different
  37.  
  38. // @version 3.4.1-pre150
  39.  
  40. // @match *://*.shellshock.io/*
  41. // @match *://*.shell.onlypuppy7.online/*
  42. // @match *://*.algebra.best/*
  43. // @match *://*.algebra.vip/*
  44. // @match *://*.biologyclass.club/*
  45. // @match *://*.combateggs.com/*
  46. // @match *://*.deadlyegg.com/*
  47. // @match *://*.deathegg.life/*
  48. // @match *://*.deathegg.world/*
  49. // @match *://*.eggbattle.com/*
  50. // @match *://*.eggboy.club/*
  51. // @match *://*.eggboy.me/*
  52. // @match *://*.eggboy.xyz/*
  53. // @match *://*.eggcombat.com/*
  54. // @match *://*.egg.dance/*
  55. // @match *://*.eggfacts.fun/*
  56. // @match *://*.egghead.institute/*
  57. // @match *://*.eggisthenewblack.com/*
  58. // @match *://*.eggsarecool.com/*
  59. // @match *://*.eggshock.com/*
  60. // @match *://*.eggshooter.best/*
  61. // @match *://*.eggshooter.com/*
  62. // @match *://*.eggwarfare.com/*
  63. // @match *://*.geometry.best/*
  64. // @match *://*.geometry.monster/*
  65. // @match *://*.geometry.pw/*
  66. // @match *://*.geometry.report/*
  67. // @match *://*.hardboiled.life/*
  68. // @match *://*.hardshell.life/*
  69. // @match *://*.humanorganising.org/*
  70. // @match *://*.mathactivity.club/*
  71. // @match *://*.mathactivity.xyz/*
  72. // @match *://*.mathdrills.info/*
  73. // @match *://*.mathdrills.life/*
  74. // @match *://*.mathfun.rocks/*
  75. // @match *://*.mathgames.world/*
  76. // @match *://*.math.international/*
  77. // @match *://*.mathlete.fun/*
  78. // @match *://*.mathlete.pro/*
  79. // @match *://*.overeasy.club/*
  80. // @match *://*.risenegg.com/*
  81. // @match *://*.scrambled.tech/*
  82. // @match *://*.scrambled.today/*
  83. // @match *://*.scrambled.us/*
  84. // @match *://*.scrambled.world/*
  85. // @match *://*.shellshockers.best/*
  86. // @match *://*.shellshockers.club/*
  87. // @match *://*.shellshockers.life/*
  88. // @match *://*.shellshockers.site/*
  89. // @match *://*.shellshockers.today/*
  90. // @match *://*.shellshockers.us/*
  91. // @match *://*.shellshockers.wiki/*
  92. // @match *://*.shellshockers.world/*
  93. // @match *://*.shellshockers.xyz/*
  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.rocks/*
  102. // @match *://*.yolk.tech/*
  103. // @match *://*.yolk.quest/*
  104. // @match *://*.yolk.today/*
  105. // @match *://*.zygote.cafe/*
  106. // ==/UserScript==
  107.  
  108. let attemptedInjection = false;
  109. // log("StateFarm: running (before function)");
  110.  
  111. (function () {
  112. if (typeof isCrackedShell !== 'undefined') alert('CrackedShell v1 is no longer supported. Upgrade to v2.');
  113.  
  114. let crackedShell = typeof $WEBSOCKET !== 'undefined';
  115.  
  116. if (crackedShell) {
  117. GM_getValue = (name) => {
  118. try {
  119. return JSON.parse(localStorage.getItem(name));
  120. } catch {
  121. return localStorage.getItem(name);
  122. };
  123. };
  124. GM_setValue = (name, value) => {
  125. if (typeof value === 'object') localStorage.setItem(name, JSON.stringify(value));
  126. else localStorage.setItem(name, value);
  127. };
  128. GM_listValues = () => localStorage;
  129. GM_deleteValue = (...a) => localStorage.removeItem(...a);
  130. GM_openInTab = (link) => window.open(link, '_blank');
  131. GM_setClipboard = (text, _, callback) => navigator.clipboard.writeText(text).then(() => callback());
  132. unsafeWindow = window;
  133. };
  134.  
  135. const storageKey = "StateFarm_" + (unsafeWindow.document.location.host.replaceAll(".", "")) + "_";
  136. const log = function(...args) {
  137. let condition;
  138. try {
  139. condition = extract("consoleLogs");
  140. } catch (error) {
  141. condition = GM_getValue(storageKey + "DisableLogs");
  142. };
  143. if (!condition) {
  144. console.log(...args);
  145. };
  146. };
  147.  
  148. let originalReplace = String.prototype.replace;
  149. let originalReplaceAll = String.prototype.replaceAll;
  150.  
  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.  
  158. log("StateFarm: running (after function)");
  159. //script info
  160. const name = "ЅtateFarm Client";
  161. const version = typeof (GM_info) !== 'undefined' ? GM_info.script.version : "3";
  162. const menuTitle = name + " v" + version;
  163.  
  164. //INIT WEBSITE LINKS: store them here so they are easy to maintain and update!
  165. const discordURL = "https://dsc.gg/sfnetwork";
  166. const githubURL = "https://github.com/Hydroflame522/StateFarmClient";
  167. 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";
  168. 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";
  169. const scriptInfoURL = "https://greasyfork.org/scripts/482982.json";
  170. const featuresGuideURL = "https://github.com/Hydroflame522/StateFarmClient/tree/main?tab=readme-ov-file#-features";
  171. const bottingGuideURL = "https://github.com/Hydroflame522/StateFarmClient/tree/main?tab=readme-ov-file#-botting";
  172. const violentmonkeyURL = "https://violentmonkey.github.io/get-it/";
  173.  
  174. const babylonURL = "https://cdn.jsdelivr.net/npm/babylonjs@7.15.0/babylon.min.js";
  175.  
  176. const replacementLogoURL = "https://cdn.jsdelivr.net/gh/Hydroflame522/StateFarmClient@main/icons/shell-logo-replacement.png";
  177. const replacementLogoHalloweenURL = "https://cdn.jsdelivr.net/gh/Hydroflame522/StateFarmClient@main/icons/shell-logo-replacement-halloween.png";
  178. const replacementLogoChristmasURL = "https://cdn.jsdelivr.net/gh/Hydroflame522/StateFarmClient@main/icons/shell-logo-replacement-christmas.png";
  179. const replacementLogoNewYearsURL = "https://cdn.jsdelivr.net/gh/Hydroflame522/StateFarmClient@main/icons/shell-logo-replacement-new-years.png";
  180.  
  181. const replacementFeedURL = "https://raw.githubusercontent.com/Hydroflame522/StateFarmClient/main/ingamefeeds/";
  182. const commitFeedURL = "https://api.github.com/repos/Hydroflame522/StateFarmClient/commits?path=StateFarmClient.js";
  183. const badgeListURL = "https://cdn.jsdelivr.net/gh/Hydroflame522/StateFarmClient@main/ingamebadges/";
  184. const iconURL = "https://cdn.jsdelivr.net/gh/Hydroflame522/StateFarmClient@main/icons/StateFarmClientLogo384px.png";
  185. const itsOverURL = "https://cdn.jsdelivr.net/gh/Hydroflame522/StateFarmClient@main/assets/its%20over/ItsOver4Smaller.png";
  186. const sfxURL = "https://api.github.com/repos/Hydroflame522/StateFarmClient/contents/soundpacks/sfx";
  187. const skyboxListURL = "https://api.github.com/repos/Hydroflame522/StateFarmClient/contents/skyboxes/";
  188.  
  189. const shellPrintURL = 'https://shellprint.villainsrule.xyz/v3/account?key=';
  190. const jsArchiveURL = "https://cdn.jsdelivr.net/gh/onlypuppy7/ShellShockJSArchives@main/js_archive/";
  191. const clientKeysURL = "https://raw.githubusercontent.com/StateFarmNetwork/client-keys/main/statefarm_";
  192. const sfChatURL = "https://raw.githack.com/OakSwingZZZ/StateFarmChatFiles/main/index.html";
  193.  
  194. //startup sequence
  195. const startUp = function () {
  196. log("StateFarm: detectURLParams()");
  197. detectURLParams();
  198. log("StateFarm: mainLoop()");
  199. mainLoop();
  200. log("StateFarm: injectScript()");
  201. injectScript();
  202. document.addEventListener("DOMContentLoaded", function () {
  203. onContentLoaded();
  204. log("StateFarm: DOMContentLoaded, ran onContentLoaded, fetching sfx");
  205. try {
  206. log("fetching badge list...", badgeListURL + "badges.json");
  207. badgeList = fetchTextContent(badgeListURL + "badges.json");
  208. badgeList = JSON.parse(badgeList);
  209. log(badgeList);
  210. } catch (error) {
  211. log("couldnt fetch badge list :(");
  212. };
  213. try {
  214. log("fetching greasyfork info...", scriptInfoURL);
  215. scriptInfo = fetchTextContent(scriptInfoURL);
  216. scriptInfo = JSON.parse(scriptInfo);
  217. log(scriptInfo);
  218. } catch (error) {
  219. log("couldnt fetch greasyfork info :(");
  220. };
  221. let oldVersion = load("version");
  222. save("version", version);
  223.  
  224. if (extract("statefarmUpdates")) {
  225. const maxAttempts = 30;
  226. const interval = 500;
  227. let attempts = 0;
  228. const checkForElement = function() {
  229. const existingContainer = document.querySelector('.secondary-aside-wrap');
  230. if (existingContainer) {
  231. log('Element found:', existingContainer);
  232. createAndAppendCommitHistoryBox(existingContainer);
  233. } else if (attempts < maxAttempts) {
  234. attempts++;
  235. // log(`Attempt ${attempts}/${maxAttempts} failed. Retrying...`);
  236. setTimeout(checkForElement, interval); //retry after interval
  237. } else {
  238. log('Element not found after maximum attempts');
  239. }
  240. };
  241. const createAndAppendCommitHistoryBox = function(existingContainer) {
  242. let commitHistoryBox = document.createElement('div');
  243. commitHistoryBox.className = 'media-tabs-wrapper box_relative border-blue5 roundme_sm bg_blue6 common-box-shadow ss_margintop_sm';
  244. let commitHistoryContent = `
  245. <div class="media-tab-container display-grid align-items-center gap-sm bg_blue3">
  246. <h4 class="common-box-shadow text-shadow-black-40 text_white dynamic-text" style="display: flex; align-items: center;">
  247. <div class="dynamic-text" style="width: 10em; font-size: 1em;">
  248. <div class="dynamic-text" style="font-size: 1em;">StateFarm Updates</div>
  249. </div>
  250. <a href="${discordURL}" target="_blank" style="text-decoration: none; margin-left: auto;">
  251. <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;">
  252. <i class="fab fa-discord" style="font-size: 1.2em; margin-right: 0.5em;"></i>
  253. <span>Join Discord</span>
  254. </button>
  255. </a>
  256. </h4>
  257. </div>
  258. <div class="media-tabs-content f_col">
  259. <div class="tab-content ss_paddingright ss_paddingleft">
  260. <div class="news-container f_col v_scroll" style="height: 20em; overflow-y: auto;">
  261. `;
  262. fetch(commitFeedURL).then(response => {
  263. if (response.ok) return response.json();
  264. else throw new Error('Failed to fetch commit history contents');
  265. }).then(commitHistory => {
  266. log("retrieved: commit history", commitHistory);
  267. if (oldVersion !== version) {
  268. commitHistoryContent += `
  269. <a href="${githubURL}" target="_blank" style="text-decoration: none;">
  270. <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;">
  271. <p style="margin: 0; font-size: 0.95em;">🎉 StateFarm has been updated (v${version})! Check out the latest updates below.</p>
  272. </div>
  273. </a>
  274. `;
  275. }
  276. if (scriptInfo && scriptInfo.version && scriptInfo.version !== version) {
  277. commitHistoryContent += `
  278. <a href="${downloadURL}" target="_blank" style="text-decoration: none;">
  279. <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;">
  280. <p style="margin: 0; font-size: 0.95em;">🚨 A new update for StateFarm is available (v${scriptInfo.version})! Click to install it.</p>
  281. </div>
  282. </a>
  283. `;
  284. }
  285. commitHistory.forEach(commit => {
  286. const commitDate = new Date(commit.commit.author.date).toLocaleString();
  287. const authorProfileURL = `https://github.com/${commit.author.login}`; //replace with actual url if available
  288. const messageParts = commit.commit.message.split('\n\n', 2); //split by the first occurrence of '\n\n'
  289. const title = messageParts[0]; //title part of the message
  290. const description = messageParts[1] || ''; //description part of the message, defaults to empty string if not present
  291. commitHistoryContent += `
  292. <div class="commit-item" style="padding: 0.2em 0.3em; background-color: #95e2fe; border-bottom: 2px solid #0B93BD;">
  293. <div style="display: flex; align-items: flex-start;">
  294. <a href="${authorProfileURL}" target="_blank" style="margin-right: 0.3em; display: flex; align-items: flex-start;">
  295. <img src="${commit.author.avatar_url}" alt="${commit.author.login}" style="width: 24px; height: 24px; border-radius: 50%;">
  296. </a>
  297. <div style="display: flex; flex-direction: column; justify-content: flex-start;">
  298. <a href="${commit.html_url}" target="_blank" style="color: #0E7697; text-decoration: none; font-size: 0.75em; font-weight: bold; line-height: 1.2;">
  299. ${title}
  300. </a>
  301. ${description ? `<p style="color: #0B93BD; font-size: 0.65em; margin: 0; line-height: 1.2;">${description}</p>` : ''}
  302. <span style="color: white; font-size: 0.75em; font-weight: bold;">
  303. by <a href="${authorProfileURL}" target="_blank" style="color: #0E7697; text-decoration: none; font-size: 0.75em;">${commit.author.login}</a> on ${commitDate}
  304. </span>
  305. </div>
  306. </div>
  307. </div>
  308. `;
  309. });
  310. commitHistoryContent += `
  311. </div>
  312. </div>
  313. </div>
  314. `;
  315. commitHistoryBox.innerHTML = commitHistoryContent;
  316. existingContainer.appendChild(commitHistoryBox);
  317. }).catch(error => {
  318. log('Error:', error);
  319. });
  320. };
  321. checkForElement();
  322. };
  323. (async () => {
  324. try {
  325. var response = await fetch(sfxURL);
  326. if (!response.ok) throw new Error('Failed to fetch folder contents (custom sfx)');
  327. var data = await response.json();
  328. data.forEach((file) => {
  329. retrievedSFX.push({ text: file.name.replace(".zip", ""), value: btoa(file.download_url) });
  330. });
  331. //1ust i hated your implementation and this is me showing that i reached my breaking point.
  332. var response = await fetch(skyboxListURL); //when the nice guy loses his temper
  333. if (!response.ok) throw new Error('Failed to fetch folder contents (custom skyboxes)');
  334. var data = await response.json();
  335. data.forEach((folder) => {
  336. if (folder.type === "dir") {
  337. let url = folder.url;
  338. //make it into a download url
  339. url = url.replace("//api.github.com/repos/", "//raw.githubusercontent.com/");
  340. url = url.replace("/contents/", "/master/");
  341. url = `${url.split("?")[0]}/`;
  342. log(folder.name, url, folder);
  343. loadedSkyboxes.push({
  344. text: folder.name,
  345. value: btoa(url)
  346. });
  347. };
  348. });
  349. initMenu(false);
  350. tp.mainPanel.hidden = extract("hideAtStartup");
  351. } catch (error) {
  352. console.error('Error:', error);
  353. initMenu(false);
  354. tp.mainPanel.hidden = extract("hideAtStartup");
  355. };
  356. })();
  357. });
  358.  
  359. };
  360. //INIT VARS
  361. const inbuiltPresets = { //Don't delete onlypuppy7's Config
  362. "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>true<oneKill>true<aimbotMinAngle>174<aimbotAntiSnap>0.75<antiSneak>1.8<aimbotColor>"#0000ff"<autoRefill>true<smartRefill>true<enableAutoFire>true<autoFireType>3<autoFireAccuracy>0<grenadeMax>true<grenadePower>1<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<fakeMessageID>12<fakeMessageText>"dsc.gg/s𝖿network: ЅtateFarm Client v3.4.1-pre94 On Top! "<fakeMessageBold>false<spamChat>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>false<autoLeave>false<autoLeaveDelay>300<autoGamemode>0<autoRegion>0<eggColor>0<autoStamp>0<autoHat>0<skybox>9<randomSkyBox>false<randomSkyBoxInterval>3<legacyModels>true<filter>0<gunPosition>0<muteGame>false<distanceMult>1.5<customSFX1>3<customSFX2>4<customSFX3>1<replaceLogo>true<titleAnimation>true<themeType>5<partyLightsEnabled>true<partyLightsIntensity>3.6999999999999997<loginEmailPass>"ssss"<loginDatabaseSelection>1<autoLogin>0<accountGmail>"example (NO @gmail.com)"<accountPass>"password69"<accountRecordsLogging>false<shellPrintKey>""<adBlock>true<spoofVIP>false<noAnnoyances>true<noTrack>true<antiAFK>false<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<vardataFallback>0<vardataType>0<vardataCustom>"{}"<hideAtStartup>false<consoleLogs>false<popups>true<tooltips>true<enablePanic>false<panicURL>"https://classroom.google.com/"<selectedPreset>0<debug>false`,
  363. "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`,
  364. "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`,
  365. "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>true<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`,
  366. // ^^ no idea how to fix blue filter being on, its whatever
  367. // "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`,
  368. "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`,
  369. // "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`,
  370. // "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`,
  371. };
  372. const presetStorageLocation = "StateFarmUserPresets";
  373. let hudElementPositions = {};
  374. let cachedRealData = {};
  375. let blacklistedGameCodes = [];
  376. let sfChatIframe;
  377. let sfChatContainer;
  378. let sfChatUsername;
  379. let presetIgnore = ['sfChatUsername', 'otherSettingYouMightWantNotToBeExported'];
  380. log("Save key:", storageKey);
  381. let binding = false;
  382. let previousFrame = 0;
  383. let framesPassed = 0;
  384. let previousLogin = 0;
  385. let lastSpamMessage = [0, ""];
  386. let startTime = Date.now();
  387. let lastAutoJump = 0;
  388. let lastAntiAFKMessage = 0;
  389. let miniCamera;
  390. let spamMessageCount = 0;
  391. let currentFrameIndex = 0;
  392. let deciSecondsPassed = 0;
  393. let timeJoinedGame = 0;
  394. let lastSentMessage = "";
  395. let spamDelay = 0;
  396. let URLParams = "";
  397. let playerInfoCache = {};
  398. let retrievedSFX = [{ text: "Default", value: "default" }];
  399. let soundsSFC = {};
  400. let targetingComplete = false;
  401. let firstExecution = false;
  402. let username = "";
  403. let autoStrafeValue = [0, 0, "left"];
  404. let TEAMCOLORS = ["#fed838", "#40e0ff", "#ffc0a0"];
  405. let autoLeaveReminder = 9999;
  406. let lastRandomSkyBoxChangeTime = Date.now(); //in milliseconds
  407. const allModules = [];
  408. const allFolders = [];
  409. const F = [];
  410. const createAudioContext = function () { return new (window.AudioContext || window.webkitAudioContext)() };
  411. const audioContexts = {
  412. "BGM": createAudioContext(),
  413. "KOTC": createAudioContext(),
  414. "OTHER1": createAudioContext(),
  415. "OTHER2": createAudioContext(),
  416. "OTHER3": createAudioContext(),
  417. "OTHER4": createAudioContext(),
  418. "OTHER5": createAudioContext(),
  419. "OTHER6": createAudioContext(),
  420. "OTHER7": createAudioContext(),
  421. "OTHER8": createAudioContext(),
  422. "OTHER9": createAudioContext(),
  423. "SOUNDS": createAudioContext(),
  424. };
  425. const loadedSkyboxes = [
  426. { text: 'Default', value: 'default' }
  427. ];
  428. const divertContexts = {
  429. "KOTC": ["kotc_capture", "kotc_capturing_opponents", "kotc_capturing_player", "kotc_contested", "kotc_pointscore", "kotc_roundend", "kotc_zonespawn"],
  430. };
  431. const L = {};
  432. L.CryptoJS = CryptoJS;
  433. delete CryptoJS;
  434. const functionNames = [];
  435. const isKeyToggled = {};
  436. let ESPArray = [];
  437. var trajectory = null;
  438. var trajectoryNade = null;
  439. let onlinePlayersArray = [];
  440. let bindsArray = {};
  441. let currentAimTime = 0;
  442. let nowOld = 0;
  443. // blank variables
  444. let ss = {};
  445. let H = {}; // obfuscated shit lol
  446. const tp = {}; // <-- tp = tweakpane
  447. 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, gameInfoElement, playerinfoElement, playerstatsElement, firstUseElement, minangleCircle, redCircle, crosshairsPosition, currentlyTargeting, ammo, ranOneTime, lastWeaponBox, lastChatItemLength, configMain, configBots, playerLogger;
  448. let whitelistPlayers, scrambledMsgEl, accountStatus, updateMenu, badgeList, scriptInfo, annoyancesRemoved, oldGa, newGame, previousDetail, previousLegacyModels, previousTitleAnimation, blacklistPlayers, playerLookingAt, forceControlKeys, forceControlKeysCache, playerNearest, enemyLookingAt, enemyNearest, AUTOMATED, ranEverySecond
  449. let cachedCommand = "", cachedCommandTime = Date.now();
  450. let activePath, findNewPath, activeNodeTarget;
  451. let pathfindingTargetOverride = undefined;
  452. let isFirstFrameAttemptingToPathfind = true;
  453. let despawnIfNoPath = false;
  454. let isLeftButtonDown = false;
  455. let isRightButtonDown = false;
  456. let configNotSet = true;
  457. let nameTextures = {};
  458. let tooltips = {};
  459. let amountVisible = 0;
  460. const weaponArray = { //this could be done differently but i cba
  461. eggk47: 0,
  462. scrambler: 1,
  463. freeranger: 2,
  464. rpegg: 3,
  465. whipper: 4,
  466. crackshot: 5,
  467. trihard: 6,
  468. random: 3, // :trol_fancy:
  469. };
  470. // const antiAFKString = "AntiAFK Message. This message is not visible to others. || ";
  471. 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"
  472. 'date', 'dick', 'fuck', 'fuk', 'suck', 'piss', 'hate', 'nude', 'fux', 'hate', 'pussy',
  473. ]; //filteredList[randomInt(0,filteredList.length-1)]
  474. let proxyList = [
  475. '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',
  476. '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',
  477. 'hardshell.life', 'humanorganising.org', 'mathactivity.club', 'mathactivity.xyz', 'mathdrills.info', 'mathdrills.life', 'mathfun.rocks', 'mathgames.world', 'math.international',
  478. 'mathlete.fun', 'mathlete.pro', 'overeasy.club', 'risenegg.com', 'scrambled.tech', 'scrambled.today', 'scrambled.us', 'scrambled.world', 'shellshockers.best', 'shellshockers.club', 'shellshockers.life', 'shellshockers.site',
  479. 'shellshockers.today', 'shellshockers.us', 'shellshockers.wiki', 'shellshockers.world', 'shellshockers.xyz', 'shellsocks.com', 'softboiled.club', 'urbanegger.com', 'violentegg.club', 'violentegg.fun', 'yolk.best', 'yolk.life',
  480. 'yolk.rocks', 'yolk.tech', 'yolk.quest', 'yolk.today', 'zygote.cafe'
  481. ];
  482. proxyList = proxyList.filter(item => item !== unsafeWindow.location.hostname);
  483. proxyList = [...proxyList].sort(() => Math.random() - 0.5);
  484. let proxyListIndex = 0;
  485. const monitorObjects = {};
  486. //title animation
  487. const titleAnimationFrames = [
  488. '︻デ═一',
  489. '︻デ═一',
  490. 'デ═一 -',
  491. '═一   -',
  492. '一    -',
  493. '.     -',
  494. '.    -',
  495. '.   -',
  496. '.    -  0',
  497. '.     -0',
  498. '.    \\/',
  499. '.   _-_',
  500. '. ___',
  501. '__',
  502. '.',
  503. 'STATEFARMCLIEN',
  504. 'TATEFARMCLIENT',
  505. 'ATEFARMCLIENTV',
  506. 'TEFARMCLIENTV3',
  507. 'EFARMCLIENTV3 ',
  508. 'FARMCLIENTV3 S',
  509. 'ARMCLIENTV3 ST',
  510. 'RMCLIENTV3 STA',
  511. 'MCLIENTV3 STAT',
  512. 'CLIENTV3 STATE',
  513. 'LIENTV3 STATEF',
  514. 'IENTV3 STATEFA',
  515. 'ENTV3 STATEFAR',
  516. 'NTV3 STATEFARM',
  517. 'TV3 STATEFARMC',
  518. 'V3 STATEFARMCL',
  519. '3 STATEFARMCLI',
  520. 'STATEFARMCLIEN',
  521. 'TATEFARMCLIENT',
  522. 'STATEFARM',
  523. 'CLIENT V3',
  524. 'STATEFARM',
  525. 'CLIENT V3',
  526. 'STATEFARM',
  527. 'CLIENT V3',
  528. 'STATEFARM',
  529. 'CLIENT V3',
  530. ':)',
  531. ';)',
  532. ':)',
  533. '⠝⠓⠗⠅ ஃ ⠟⠑⠙⠟',
  534. '⠑⠑⠟⠟ ஃ ⠙⠛⠟⠕',
  535. '⠛⠟⠍⠑ ஃ ⠅⠑⠍⠃',
  536. '⠅⠟⠇⠝ ஃ ⠟⠕⠗⠕',
  537. '⠝⠓⠗⠅ ஃ ⠟⠑⠙⠟',
  538. '⠑⠑⠟⠟ ஃ ⠙⠛⠟⠕',
  539. '⠛⠟⠍⠑ ஃ ⠅⠑⠍⠃',
  540. '⠅⠟⠇⠝ ஃ ⠟⠕⠗⠕',
  541. '( ͡° ͜ʖ ͡°)',
  542. '( ͠° ͟ʖ ͡°)',
  543. '( ͡° ͟ʖ ͡°)',
  544. '( ͡° ͟ʖ ͠°)一',
  545. '( ͡° ͟ʖ ͠°)═一',
  546. '( ͡° ͟ʖ ͠°)デ═一',
  547. '( ͡° ͟ʖ ͠°)︻デ═一',
  548. ' ͡° ͟ʖ ͠°)︻デ═一',
  549. ' ͟ʖ ͠°)︻デ═一',
  550. ' ͠°)︻デ═一',
  551. ')︻デ═一',
  552. ];
  553.  
  554. const getScrambled = () => Array.from({ length: 10 }, () => String.fromCharCode(97 + Math.floor(Math.random() * 26))).join('');
  555. let skyboxName = getScrambled();
  556. let mapData = getScrambled();
  557.  
  558. //menu interaction functions
  559. //menu extraction
  560. const extract = function (variable, shouldUpdate) {
  561. if (shouldUpdate) { updateConfig() };
  562. return configMain[variable] || configBots[variable];
  563. };
  564. const extractDropdownList = function (variable) {
  565. return tp[variable + "Button"].controller_.binding.value.constraint_.constraints[0].options;
  566. };
  567. const extractAsDropdownInt = function (variable) {
  568. const options = extractDropdownList(variable);
  569. const state = extract(variable);
  570. for (let i = 0; i < options.length; i++) {
  571. if (options[i].value === state) {
  572. return i;
  573. };
  574. };
  575. };
  576.  
  577. const beginBinding = function (value) {
  578. if (binding == false) {
  579. binding = value;
  580. tp[binding + "BindButton"].title = "PRESS KEY";
  581. };
  582. };
  583. //one day i should make this unshit. dom is not the correct way to go about this.
  584. //unfortunately tweakpane is a pain in the ass and has barely anything for actually extracting/changing vars
  585. //a way it could be done is export preset => change value => import preset
  586. //but doesnt account for it being a button... and dropdowns wouldnt switch properly too. laziness. the problem is that this works fine.
  587. //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.
  588. 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)
  589. const labels = document.querySelectorAll('.tp-lblv_l');
  590. const moduleButton = module + "Button";
  591. const moduleLabel = tp[moduleButton].label;
  592. for (const label of labels) {
  593. if (label.textContent == moduleLabel) {
  594. const inputContainer = label.nextElementSibling;
  595. const currentValue = extract(module);
  596. // check for checkbox
  597. const checkbox = inputContainer.querySelector('.tp-ckbv_i');
  598. if (checkbox) {
  599. if (newValue == undefined) {
  600. newValue = (!currentValue);
  601. };
  602. if (newValue !== (!!currentValue)) {
  603. checkbox.click(); // Toggle checkbox
  604. };
  605. log(module, "checkbox", currentValue, newValue);
  606. return extract(module, true);
  607. };
  608. // check for button
  609. const button = inputContainer.querySelector('.tp-btnv_b');
  610. if (button) {
  611. button.click(); // Trigger button click
  612. log(module, "button", currentValue, newValue);
  613. return ("NOMSG"); //no change of state, dont show pop up message
  614. };
  615. // check for dropdown
  616. const dropdown = inputContainer.querySelector('.tp-lstv_s');
  617. if (dropdown) {
  618. if (newValue == undefined) { //if youre going to set a list to a certain value, use the int value of the list item
  619. newValue = (dropdown.selectedIndex + 1) % dropdown.options.length;
  620. };
  621. dropdown.selectedIndex = newValue;
  622. dropdown.dispatchEvent(new Event('change')); // trigger change event for dropdown
  623. log(module, "dropdown", currentValue, newValue);
  624. return extract(module, true);
  625. };
  626. // check for text input
  627. const textInput = inputContainer.querySelector('.tp-txtv_i');
  628. if (textInput) {
  629. textInput.value = newValue;
  630. textInput.dispatchEvent(new Event('change')); // trigger change event for dropdown
  631. return extract(module, true);
  632. };
  633. };
  634. };
  635. };
  636. document.addEventListener('mousedown', function (event) {
  637. if (event.button === 2) {
  638. isRightButtonDown = true;
  639. } else if (event.button === 0) {
  640. isLeftButtonDown = true;
  641. };
  642. }, true);
  643. document.addEventListener('mouseup', function (event) {
  644. if (event.button === 2) {
  645. isRightButtonDown = false;
  646. } else if (event.button === 0) {
  647. isLeftButtonDown = false;
  648. };
  649. }, true);
  650. //menu
  651. document.addEventListener("keydown", function (event) {
  652. event = (event.code.originalReplace("Key", ""));
  653. isKeyToggled[event] = true;
  654. if (event == "Escape") {
  655. noPointerPause = false; unsafeWindow.document.onpointerlockchange();
  656. };
  657. });
  658. document.addEventListener("keyup", function (event) {
  659. event = (event.code.originalReplace("Key", ""));
  660. isKeyToggled[event] = false;
  661. if (document.activeElement && document.activeElement.tagName === 'INPUT') {
  662. return;
  663. } else if (binding != false) {
  664. if (event == "Delete") { event = "Set Bind" };
  665. tp[binding + "BindButton"].title = event;
  666. bindsArray[binding] = event;
  667. save(binding + "Bind", event);
  668. createPopup("Bound " + tp[binding + "Button"].label + " to key: " + event);
  669. binding = false;
  670. } else {
  671. Object.keys(bindsArray).forEach(function (module) {
  672. if ((bindsArray[module] == event) && module != "zoom") {
  673. let state = change(module);
  674. let popupText = state;
  675. if (state != "NOMSG") {
  676. if (state === true || state === false || state === undefined) { state = (state ? "ON" : "OFF") };
  677. popupText = "Set " + module + " to: " + state;
  678. if (extract("announcer")) {
  679. sendChatMessage("I just set " + module + " to " + state + "!");
  680. };
  681. } else {
  682. switch (module) {
  683. case ("hide"):
  684. popupText = "Toggled StateFarm Panel"; break;
  685. case ("showBotPanel"):
  686. popupText = "Toggled Bot Panel"; break;
  687. case ("sfChatShowHide"):
  688. popupText = "Toggled SFC Chat"; break;
  689. case ("panic"):
  690. popupText = "Exiting to set URL..."; break;
  691. default:
  692. popupText = module; break;
  693. };
  694. };
  695. createPopup(popupText);
  696. };
  697. });
  698. };
  699. });
  700. const initTabs = function (tab, guideData) {
  701. tp[tab.storeAs] = tab.location.addTab({
  702. pages: [
  703. { title: 'Modules' },
  704. { title: 'Binds' },
  705. { title: 'Guide' },
  706. ],
  707. });
  708. if (guideData) {
  709. const thePages = [];
  710. guideData.forEach(aPage => {
  711. thePages.push({ title: aPage.title });
  712. });
  713. tp[tab.storeAs + "Guide"] = tp[tab.storeAs].pages[2].addTab({ pages: thePages }); //is there a one liner for this? uhhh probabyl
  714. //tp[tab.storeAs + "Guide"] = tab.location.addTab({ thePages: guideData.map(page => ({ title: page.title })) });
  715. for (let i = 0; i < guideData.length; i++) {
  716. const storeAs = tab.storeAs + "Guide" + i;
  717. const text = (guideData[i].content || "Not set up correctly lmao");
  718. initModule({ location: tp[tab.storeAs + "Guide"].pages[i], storeAs: storeAs, monitor: (text.split('\n').length + 0.25), });
  719. monitorObjects[storeAs] = text;
  720. const infoElement = tp[storeAs + "Button"].controller_.view.element.children[1].children[0];
  721. infoElement.style.width = "270px";
  722. infoElement.style.setProperty("margin-left", "-110px", "important");
  723. };
  724. };
  725. };
  726. const initFolder = function (folder) {
  727. tp[folder.storeAs] = folder.location.addFolder({
  728. title: folder.title,
  729. expanded: load(folder.storeAs) !== null ? load(folder.storeAs) : false
  730. });
  731. allFolders.push(folder.storeAs);
  732. };
  733. const initModule = function (module) {
  734. if (module.requirements) {
  735.  
  736. };
  737.  
  738. const value = {};
  739. value[module.storeAs] = (module.defaultValue !== undefined ? module.defaultValue : false);
  740.  
  741. if (module.tooltip) tooltips[module.title] = module.tooltip;
  742.  
  743. tp[module.storeAs + "TiedModules"] = {
  744. showConditions: (module.showConditions || false),
  745. hideConditions: (module.hideConditions || false),
  746. enableConditions: (module.enableConditions || false),
  747. disableConditions: (module.disableConditions || false), //why have disable when there is already enable? enable acts like an AND operator, whereas having conditions for the opposite allows for an OR operation. it is messy, but hey it works lmao?
  748. };
  749.  
  750. if (!(module.slider && module.slider.step)) { module.slider = {} };
  751. const config = {
  752. label: module.title,
  753. options: module.dropdown,
  754. min: module.slider.min,
  755. max: module.slider.max,
  756. step: module.slider.step,
  757. title: module.button,
  758. };
  759. if (module.button) {
  760. tp[(module.storeAs + "Button")] = module.location.addButton({
  761. label: module.title,
  762. title: module.button,
  763. }).on("click", (value) => {
  764. if (module.clickFunction !== undefined) { module.clickFunction(value) };
  765. if (module.botParam !== undefined) { updateBotParams(module.botParam) };
  766. });
  767. } else if (module.monitor) {
  768. monitorObjects[module.storeAs] = "Text Goes Here";
  769. tp[(module.storeAs + "Button")] = module.location.addMonitor(monitorObjects, module.storeAs, {
  770. label: '',
  771. expanded: true,
  772. multiline: true,
  773. lineCount: module.monitor,
  774. });
  775. setInterval(() => {
  776. tp[(module.storeAs + "Button")].refresh();
  777. }, 1000);
  778. } else {
  779. tp[module.storeAs + "Button"] = module.location.addInput(value, module.storeAs, config
  780. ).on("change", (value) => {
  781. if (module.changeFunction !== undefined) { module.changeFunction(value) };
  782. setTimeout(() => {
  783. if (startUpComplete) {
  784. if ((module.botParam !== undefined)) {
  785. updateBotParams(module.botParam);
  786. };
  787. };
  788. updateHiddenAndDisabled();
  789. saveConfig();
  790. }, 150);
  791. });
  792. };
  793. allModules.push(module.storeAs);
  794. if (module.bindLocation) { initBind(module) };
  795. };
  796. const initBind = function (module) {
  797. if (resetModules) { remove(module.storeAs + "Bind") };
  798. const theBind = (load(module.storeAs + "Bind") || module.defaultBind || "Set Bind");
  799. tp[(module.storeAs + "BindButton")] = module.bindLocation.addButton({
  800. label: module.title,
  801. title: theBind,
  802. }).on("click", (value) => {
  803. beginBinding(module.storeAs);
  804. });
  805. bindsArray[module.storeAs] = theBind;
  806. };
  807. const initMenu = function (reset) {
  808. //INIT MENU
  809. //init tp.mainPanel
  810.  
  811. resetModules = reset === true;
  812. menuInitiated = false;
  813.  
  814. if (tp.mainPanel) { tp.mainPanel.dispose() };
  815. if (tp.botPanel) { tp.botPanel.dispose() };
  816.  
  817. tp.mainPanel = new Tweakpane.Pane(); // eslint-disable-line
  818. tp.mainPanel.hidden = true;
  819. tp.mainPanel.title = menuTitle;
  820. //SFC CHAT
  821. initFolder({ location: tp.mainPanel, title: "StateFarm Chat", storeAs: "sfChatFolder", });
  822. initTabs({ location: tp.sfChatFolder, storeAs: "sfChatTab" }, [
  823. {
  824. title: "WIP", content:
  825. `Sorry! No guide yet!`},
  826. ]);
  827. initModule({ location: tp.sfChatTab.pages[0], title: "Username", storeAs: "sfChatUsername", tooltip: "Your username in the chatroom", defaultValue: ("Guest" + (Math.floor(Math.random() * 8999) + 1000)), });
  828. // initModule({ location: tp.sfChatTab.pages[0], title: "Join Chat", storeAs: "sfChatJoin", button: "Join", bindLocation: tp.sfChatTab.pages[1], clickFunction: function(){
  829. // if (sfChatIframe != undefined){
  830. // createPopup("Already Started. Try Showing it.");
  831. // } else {
  832. // startStateFarmChat();
  833. // };
  834. // },});
  835. tp.sfChatTab.pages[0].addSeparator();
  836. initModule({
  837. 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 () {
  838. if (sfChatContainer != undefined) {
  839. if (sfChatContainer.style.display == "none") {
  840. sfChatContainer.style.display = "block";
  841. } else {
  842. sfChatContainer.style.display = "none";
  843. };
  844. } else {
  845. startStateFarmChat(); //its just easier this way imo
  846. };
  847. },
  848. });
  849. tp.sfChatTab.pages[0].addSeparator();
  850. 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], });
  851. initModule({ location: tp.sfChatTab.pages[0], title: "Notification Sound", storeAs: "sfChatNotificationSound", tooltip: "Play a sound for every new message", bindLocation: tp.sfChatTab.pages[1], });
  852. tp.sfChatTab.pages[0].addSeparator();
  853. 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], });
  854. tp.sfChatTab.pages[0].addSeparator();
  855. 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, });
  856. //COMBAT MODULES
  857. initFolder({ location: tp.mainPanel, title: "Combat", storeAs: "combatFolder", });
  858. initTabs({ location: tp.combatFolder, storeAs: "combatTab" }, [
  859. {
  860. title: "Basics", content:
  861. `This is the combat tab. Here you will find
  862. options relating to aimbotting, and other
  863. useful macros. Aimbot is made active by
  864. turning it on. Using ToggleRM will give you
  865. more control by allowing you to switch by
  866. pressing the right mouse button.
  867. TargetMode also allows a more intuitive
  868. means of selecting who you will target.
  869. The most powerful features you can use
  870. are Predictions and Antibloom. These
  871. improve the accuracy of the tracking.
  872. AntiSwitch will make you lock on to a
  873. target until they die, and if you don't want
  874. to target anyone else after they die then
  875. choose 1Kill too. Auto Refill helps you
  876. stay topped up and choosing the Smart
  877. mode allows you to refill at the moment
  878. when you will not have a long
  879. reload time. GrenadeMAX makes all
  880. grenades get thrown at max strength.`},
  881. {
  882. title: "Visibility", content:
  883. `There are a couple of options related to
  884. visibility (Line-of-Sight). First is
  885. TargetVisible. This tunes the aimbot to
  886. be more strategic with where it aims.
  887. NoWallTrack makes it such that if a
  888. targeted player goes behind a wall, you
  889. stop aimlocking them. There is also an
  890. AutoFire mode with this sort of
  891. functionality.`},
  892. {
  893. title: "Advanced", content:
  894. `If you want to increase stealthiness,
  895. make use of MinAngle and AntiSnap. The
  896. first will make it so that you have to
  897. manually move your reticle within your
  898. specified radius to lock on. The latter
  899. smooths snapping, which evades
  900. detection on botter spotter scripts.
  901. If you want to be more powerful, opt for
  902. SilentAim. This modifies your direction
  903. packets instead of making you lock on.
  904. However, this can lead to slightly glitchy
  905. movement. When this is on, MinAngle
  906. changes to instead narrow down the
  907. selection of targets rather than acting
  908. as a guide.
  909. AntiSneak is a module which, while not
  910. always showing use, can help you in a
  911. difficult situation. It automatically
  912. switches targets to a player that enters
  913. your specified range, and begins
  914. shooting with your primary gun, and then
  915. the pistol. Ideal use case is when you are
  916. sniping and someone sneaks up on you
  917. (...hence it is called... AntiSneak).`},
  918. ]);
  919. initModule({ location: tp.combatTab.pages[0], title: "Aimbot", storeAs: "aimbot", tooltip: "Locks onto targeted player", bindLocation: tp.combatTab.pages[1], defaultBind: "V", });
  920. initFolder({ location: tp.combatTab.pages[0], title: "Aimbot Options", storeAs: "aimbotFolder", });
  921. 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" }], defaultValue: "pointingat", enableConditions: [["aimbot", true]], });
  922. 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]] });
  923. tp.aimbotFolder.addSeparator();
  924. 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]], });
  925. 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]], });
  926. 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]], });
  927. 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]], });
  928. tp.aimbotFolder.addSeparator();
  929. 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, });
  930. 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, });
  931. tp.aimbotFolder.addSeparator();
  932. 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]], });
  933. 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]], });
  934. tp.aimbotFolder.addSeparator();
  935. 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]], });
  936. 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]], });
  937. tp.aimbotFolder.addSeparator();
  938. 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]], });
  939. initFolder({ location: tp.aimbotFolder, title: "AntiSnap Options", storeAs: "antisnapFolder", });
  940. 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]], });
  941. 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"]], });
  942.  
  943. tp.combatTab.pages[0].addSeparator();
  944. 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], });
  945. 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]], });
  946. tp.combatTab.pages[0].addSeparator();
  947. 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], });
  948. initModule({ location: tp.combatTab.pages[0], title: "Triggerbot", storeAs: "enableAutoFire", tooltip: "Automatically shoot the gun", bindLocation: tp.combatTab.pages[1], });
  949. 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]] });
  950. 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]], });
  951. tp.combatTab.pages[0].addSeparator();
  952. 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], });
  953. 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, });
  954. //RENDER MODULES
  955. initFolder({ location: tp.mainPanel, title: "Render", storeAs: "renderFolder", });
  956. initTabs({ location: tp.renderFolder, storeAs: "renderTab" }, [
  957. {
  958. title: "WIP", content:
  959. `Sorry! No guide yet!`},
  960. ]);
  961. initModule({ location: tp.renderTab.pages[0], title: "PlayerESP", storeAs: "playerESP", tooltip: "Creates boxes around enemy players", bindLocation: tp.renderTab.pages[1], });
  962. 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], });
  963. initModule({ location: tp.renderTab.pages[0], title: "Chams", storeAs: "chams", tooltip: "Renders players through walls", bindLocation: tp.renderTab.pages[1], });
  964. 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], });
  965. //initModule({ location: tp.renderTab.pages[0], title: "Targets", storeAs: "targets", tooltip: "It's borked rn", bindLocation: tp.renderTab.pages[1], });
  966. 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], });
  967. tp.renderTab.pages[0].addSeparator();
  968. initModule({ location: tp.renderTab.pages[0], title: "NametagESP", storeAs: "nametags", tooltip: "Enlarges nametags and makes them appear through walls", bindLocation: tp.renderTab.pages[1], });
  969. initModule({ location: tp.renderTab.pages[0], title: "NametagInfo", storeAs: "nametagInfo", tooltip: "Adds extra info to nametags such as HP and score stats", bindLocation: tp.renderTab.pages[1], });
  970. 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: 20, showConditions: [["nametagInfo", true]], });
  971. tp.renderTab.pages[0].addSeparator();
  972. initFolder({ location: tp.renderTab.pages[0], title: "Player ESP/Tracers Options", storeAs: "tracersFolder", });
  973. 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]] });
  974. initModule({ location: tp.tracersFolder, title: "Targeted RGB", storeAs: "aimbotRainbow", tooltip: "Adds RGB to the ESP, for fun", defaultValue: true, bindLocation: tp.renderTab.pages[1] });
  975. tp.aimbotFolder.addSeparator();
  976. 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]], });
  977. initModule({ location: tp.tracersFolder, title: "RGB Color 1", storeAs: "tracersColor1Rainbow", tooltip: "rainbow. 🌈", defaultValue: false, disableConditions: [["tracers", false], ["playerESP", false]], });
  978. 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]], });
  979. //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
  980. //also speed customisation and shit, people love customization.
  981. //--------
  982. 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"]], });
  983. //initModule({ location: tp.tracersFolder, title: "C2 rainbow", storeAs: "tracersColor2Rainbow", tooltip: "🌈", defaultValue: true, disableConditions: [["tracers", false], ["playerESP", false]], hideConditions: [["tracersType", "static"]], });
  984. //--------
  985. 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"]], });
  986. //initModule({ location: tp.tracersFolder, title: "C3 rainbow", storeAs: "tracersColor3Rainbow", tooltip: "🌈", defaultValue: false, disableConditions: [["tracers", false], ["playerESP", false]], showConditions: [["tracersType", "proximity"]], });
  987. //-------ä
  988. 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]], });
  989. 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]], });
  990. tp.tracersFolder.addSeparator();
  991. initModule({ location: tp.tracersFolder, title: "PredictionESPColor", storeAs: "predictionESPColor", tooltip: "Colour to use for the PredictionESP box", defaultValue: "#ff0000", disableConditions: [ ["predictionESP", false]], });
  992. initModule({ location: tp.tracersFolder, title: "PredictionESPColorRainbow", storeAs: "predictionESPColorRainbow", tooltip: "Color to use for the PredictionESP box rainbow?", defaultValue: false, disableConditions: [ ["predictionESP", false]], });
  993.  
  994. tp.renderTab.pages[0].addSeparator();
  995. initFolder({ location: tp.renderTab.pages[0], title: "Ammo ESP/Tracers Options", storeAs: "tracersAmmoFolder", });
  996. initFolder({ location: tp.tracersAmmoFolder, title: "Ammo", storeAs: "ammoFolder", });
  997. initModule({ location: tp.ammoFolder, title: "AESP", storeAs: "ammoESP", tooltip: "Displays where ammo is on the map", bindLocation: tp.renderTab.pages[1], });
  998. initModule({ location: tp.ammoFolder, title: "ATracers", storeAs: "ammoTracers", tooltip: "No tooltip available", bindLocation: tp.renderTab.pages[1], });
  999. tp.ammoFolder.addSeparator();
  1000. 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]], });
  1001. initModule({ location: tp.ammoFolder, title: "AColor", storeAs: "ammoESPColor", tooltip: "No tooltip available", defaultValue: "#ffff00", disableConditions: [["ammoESP", false], ["ammoTracers", false]], });
  1002. initFolder({ location: tp.tracersAmmoFolder, title: "Grenades", storeAs: "grenadesFolder", });
  1003. initModule({ location: tp.grenadesFolder, title: "GESP", storeAs: "grenadeESP", tooltip: "Displays where grenade pickupables is on the map", bindLocation: tp.renderTab.pages[1], });
  1004. initModule({ location: tp.grenadesFolder, title: "GTracers", storeAs: "grenadeTracers", tooltip: "No tooltip available", bindLocation: tp.renderTab.pages[1], });
  1005. tp.grenadesFolder.addSeparator();
  1006. 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]], });
  1007. initModule({ location: tp.grenadesFolder, title: "GColor", storeAs: "grenadeESPColor", tooltip: "No tooltip available", defaultValue: "#00ffff", disableConditions: [["grenadeESP", false], ["grenadeTracers", false]], });
  1008. tp.renderTab.pages[0].addSeparator();
  1009. 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], });
  1010. initFolder({ location: tp.renderTab.pages[0], title: "Look Direction Options", storeAs: "lookTracersFolder", });
  1011. initModule({ location: tp.lookTracersFolder, title: "Render Above", storeAs: "lookTracersRGI1", tooltip: "Renders LookTracers above obstacles", bindLocation: tp.renderTab.pages[1], });
  1012. //initModule({ location: tp.lookTracersFolder, title: "length", storeAs: "lookTracersLength", slider: { min: 0, max: 100, step: 0.25 }, defaultValue: 75, });
  1013. initModule({ location: tp.lookTracersFolder, title: "LookTracerColor", storeAs: "lookTracersColor", tooltip: "Color of the LookTracers", defaultValue: "#00ffff", });
  1014. tp.renderTab.pages[0].addSeparator();
  1015. 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, });
  1016. 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", });
  1017. tp.renderTab.pages[0].addSeparator();
  1018. 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", });
  1019. initFolder({ location: tp.renderTab.pages[0], title: "Perspective Options", storeAs: "perspectiveFolder", });
  1020. // initModule({ location: tp.perspectiveFolder, title: "Alpha Effect", storeAs: "perspectiveAlpha", tooltip: "Makes players a bit transparent when in third person", bindLocation: tp.renderTab.pages[1], });
  1021. // tp.perspectiveFolder.addSeparator();
  1022. 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});
  1023. 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});
  1024. initModule({ location: tp.renderTab.pages[0], title: "CamWIP", storeAs: "freecam", tooltip: "Still a WIP (lazy devs lmaooooooooooo)", bindLocation: tp.renderTab.pages[1], });
  1025. 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], });
  1026. 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, });
  1027. 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, });
  1028. tp.renderTab.pages[0].addSeparator();
  1029. 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" });
  1030. initModule({ location: tp.renderTab.pages[0], title: "Textures", storeAs: "enableTextures", tooltip: "Disables some textures. primarily, the sky", bindLocation: tp.renderTab.pages[1], defaultValue: true, });
  1031. 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, });
  1032. //HUD MODULES
  1033. initFolder({ location: tp.mainPanel, title: "HUD", storeAs: "hudFolder", });
  1034. initTabs({ location: tp.hudFolder, storeAs: "hudTab" }, [
  1035. {
  1036. title: "WIP", content:
  1037. `Sorry! No guide yet!`},
  1038. ]);
  1039. 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], });
  1040. 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], });
  1041. 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], });
  1042. 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]], });
  1043. tp.hudTab.pages[0].addSeparator();
  1044. initModule({ location: tp.hudTab.pages[0], title: "Co-ords", storeAs: "showCoordinates", tooltip: "Displays current position on the map", bindLocation: tp.hudTab.pages[1], });
  1045. 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], });
  1046. initModule({ location: tp.hudTab.pages[0], title: "HP Display", storeAs: "playerStats", tooltip: "Displays the health of your opponents", bindLocation: tp.hudTab.pages[1], });
  1047. 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], });
  1048. initModule({ location: tp.hudTab.pages[0], title: "GameInfo", storeAs: "gameInfo", tooltip: "Displays extra game information", bindLocation: tp.hudTab.pages[1], });
  1049. initModule({ location: tp.hudTab.pages[0], title: "ShowStream", storeAs: "showStreams", tooltip: "Detects & displays ongoing twitch streamers", bindLocation: tp.hudTab.pages[1], });
  1050. tp.hudTab.pages[0].addSeparator();
  1051. initModule({ location: tp.hudTab.pages[0], title: "MiniMap", storeAs: "minimap", tooltip: "Displays a top down view of your game", bindLocation: tp.hudTab.pages[1], });
  1052. 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]], });
  1053. 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]], });
  1054. //CHAT MODULES
  1055. initFolder({ location: tp.mainPanel, title: "Chat", storeAs: "chatFolder", });
  1056. initTabs({ location: tp.chatFolder, storeAs: "chatTab" }, [
  1057. {
  1058. title: "WIP", content:
  1059. `Sorry! No guide yet!`},
  1060. ]);
  1061. initModule({ location: tp.chatTab.pages[0], title: "InfiniHistory", storeAs: "chatExtend", tooltip: "Disables the default limiting of message history", bindLocation: tp.chatTab.pages[1], });
  1062. 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], });
  1063. // 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], });
  1064. 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, });
  1065. 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], });
  1066. 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], });
  1067. tp.chatTab.pages[0].addSeparator();
  1068. initModule({ location: tp.chatTab.pages[0], title: "BypassFilter", storeAs: "chatFilterBypass", tooltip: "Bypass naughty word game message filter!!!!1111 :D", bindLocation: tp.chatTab.pages[1], });
  1069. 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], });
  1070. tp.chatTab.pages[0].addSeparator();
  1071. initFolder({ location: tp.chatTab.pages[0], title: "FakeMessage", storeAs: "fakeMessageFolder", });
  1072. let listOfIDs = [];
  1073. if (unsafeWindow.extern && unsafeWindow.extern.inGame && ss && ss.PLAYERS) {
  1074. ss.PLAYERS.forEach((player) => {
  1075. listOfIDs.push({ text: player.name, value: String(player.id) });
  1076. log({ text: player.name, value: player.id })
  1077. });
  1078. };
  1079. 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" });
  1080. initModule({ location: tp.fakeMessageFolder, title: '(Refresh List)', storeAs: 'fakeMessageRefresh', button: 'REFRESH', tooltip: "Refreshes list", bindLocation: tp.chatTab.pages[1], clickFunction: function () {
  1081. updateMenu = true;
  1082. } });
  1083. initModule({ location: tp.fakeMessageFolder, title: "Content", storeAs: "fakeMessageText", tooltip: "The content of the fake message", defaultValue: "ЅtateFarm Client On Top! ", });
  1084. initModule({ location: tp.fakeMessageFolder, title: "Bold Text", storeAs: "fakeMessageBold", tooltip: "Bold text", bindLocation: tp.chatTab.pages[1], });
  1085. 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 () {
  1086. if (ss.addChat && unsafeWindow.extern.inGame) {
  1087. try {
  1088. if (ss.isBadWord(extract("fakeMessageText"))) createPopup("Message would be filtered.", "error");
  1089. ss.addChat(extract("fakeMessageText"), !!extract("fakeMessageBold"), Number(extract("fakeMessageID")));
  1090. } catch (error) {
  1091. log("shit, sending a fake message failed. damn lmao.", error)
  1092. };
  1093. }
  1094. } });
  1095. tp.chatTab.pages[0].addSeparator();
  1096. initModule({ location: tp.chatTab.pages[0], title: "Spammer", storeAs: "spamChat", tooltip: "Automatically send messages", bindLocation: tp.chatTab.pages[1], });
  1097. initFolder({ location: tp.chatTab.pages[0], title: "Spammer Options", storeAs: "spammerFolder", });
  1098. 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]], });
  1099. initModule({ location: tp.spammerFolder, title: "Spam Text", storeAs: "spamChatText", tooltip: "The message to spam", defaultValue: "ЅtateFarm Client On Top! ", });
  1100. tp.chatTab.pages[0].addSeparator();
  1101. initFolder({ location: tp.chatTab.pages[0], title: "Trolling", storeAs: "trollingFolder", });
  1102. initModule({ location: tp.trollingFolder, title: "Mock", storeAs: "mockMode", tooltip: "Rudely mocks people talking in chat", bindLocation: tp.chatTab.pages[1], });
  1103. initModule({ location: tp.trollingFolder, title: "Announcer", storeAs: "announcer", tooltip: "Announces when you change GUI config", bindLocation: tp.chatTab.pages[1], });
  1104. tp.trollingFolder.addSeparator();
  1105. initModule({ location: tp.trollingFolder, title: "AutoEZ", storeAs: "autoEZ", tooltip: "Gloats on people when you kill them", bindLocation: tp.chatTab.pages[1], });
  1106. initModule({ location: tp.trollingFolder, title: "CheatAccuse", storeAs: "cheatAccuse", tooltip: "Accuses your killer of cheating", bindLocation: tp.chatTab.pages[1], });
  1107. tp.chatTab.pages[0].addSeparator();
  1108. initFolder({ location: tp.chatTab.pages[0], title: "Join/Leave Msgs Options", storeAs: "joinLeaveFolder", });
  1109. initModule({ location: tp.joinLeaveFolder, title: "Join Msgs", storeAs: "joinMessages", tooltip: " Notify you when players join", bindLocation: tp.chatTab.pages[1], });
  1110. initModule({ location: tp.joinLeaveFolder, title: "Leave Msgs", storeAs: "leaveMessages", tooltip: "Notify you when players leave", bindLocation: tp.chatTab.pages[1], });
  1111. tp.joinLeaveFolder.addSeparator();
  1112. 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]], });
  1113. 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]], });
  1114. //LISTS MODULES
  1115. initFolder({ location: tp.mainPanel, title: "Lists", storeAs: "listsFolder", });
  1116. initTabs({ location: tp.listsFolder, storeAs: "listsTab" }, [
  1117. {
  1118. title: "WIP", content:
  1119. `Sorry! No guide yet!`},
  1120. ]);
  1121. 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", });
  1122. initFolder({ location: tp.listsTab.pages[0], title: "Whitelist (Target Only) Options", storeAs: "whitelistFolder", });
  1123. 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], });
  1124. 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], });
  1125. 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]], });
  1126. 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]], });
  1127. 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"]], });
  1128. tp.listsTab.pages[0].addSeparator();
  1129. 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", });
  1130. initFolder({ location: tp.listsTab.pages[0], title: "Blacklist (Exclude) Options", storeAs: "blacklistFolder", });
  1131. initModule({ location: tp.blacklistFolder, title: "BAimbot", storeAs: "enableBlacklistAimbot", tooltip: "Never will aimbot on the specified whitelist player(s)", bindLocation: tp.listsTab.pages[1], });
  1132. 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]], });
  1133. 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]], });
  1134. 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"]], });
  1135. //AUTOMATION MODULES
  1136. initFolder({ location: tp.mainPanel, title: "Automation", storeAs: "automationFolder", });
  1137. initTabs({ location: tp.automationFolder, storeAs: "automationTab" }, [
  1138. {
  1139. title: "WIP", content:
  1140. `Sorry! No guide yet!`},
  1141. ]);
  1142. initModule({
  1143. 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 () {
  1144. createPopup("Thank you for your efforts comrade! o7");
  1145. spamReport();
  1146. },
  1147. });
  1148. tp.automationTab.pages[0].addSeparator();
  1149. 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], });
  1150. initModule({ location: tp.automationTab.pages[0], title: "Auto Walk", storeAs: "autoWalk", tooltip: "Walks forward automatically", bindLocation: tp.automationTab.pages[1], });
  1151. initModule({ location: tp.automationTab.pages[0], title: "Auto Strafe", storeAs: "autoStrafe", tooltip: "Strafes automatically", bindLocation: tp.automationTab.pages[1], });
  1152. initModule({ location: tp.automationTab.pages[0], title: "Auto Jump", storeAs: "autoJump", tooltip: "Jumps on the specified interval", bindLocation: tp.automationTab.pages[1], });
  1153. 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]], });
  1154. tp.automationTab.pages[0].addSeparator();
  1155. 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" });
  1156. initModule({ location: tp.automationTab.pages[0], title: "AutoGrenade", storeAs: "autoGrenade", tooltip: "Automatically grenades w/ a delay", bindLocation: tp.automationTab.pages[1], });
  1157. tp.automationTab.pages[0].addSeparator();
  1158. initFolder({ location: tp.automationTab.pages[0], title: "Auto Join Options", storeAs: "autoJoinFolder", });
  1159. initModule({ location: tp.autoJoinFolder, title: "Auto Join", storeAs: "autoJoin", tooltip: "Automatically joins a game", bindLocation: tp.automationTab.pages[1], });
  1160. initModule({ location: tp.autoJoinFolder, title: "Join Code", storeAs: "joinCode", tooltip: "The gamecode used by AutoJoin", defaultValue: "CODE", enableConditions: [["autoJoin", true]], });
  1161. 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]], });
  1162. initFolder({ location: tp.automationTab.pages[0], title: "Auto Name Options", storeAs: "autoNamesFolder", });
  1163. initModule({ location: tp.autoNamesFolder, title: "Use Name", storeAs: "useCustomName", tooltip: "Automaticaly names yourself", bindLocation: tp.automationTab.pages[1], });
  1164. initModule({ location: tp.autoNamesFolder, title: "New Name", storeAs: "usernameAutoJoin", tooltip: "The name used by useCustomName", defaultValue: "ЅtateFarmer", enableConditions: [["useCustomName", true]], });
  1165. //the name usernameAutoJoin is only kept for compatability
  1166. 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(){
  1167. const copiedName = retrieveCopiedName();
  1168. log("Retrieved copied name:",copiedName);
  1169. change("usernameAutoJoin",(copiedName||"ЅtateFarmer"));
  1170. },});
  1171. 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(){
  1172. const randomisedName = unsafeWindow.extern.generateRandomName();
  1173. change("usernameAutoJoin",(randomisedName||"ЅtateFarmer"));
  1174. },});
  1175. tp.automationTab.pages[0].addSeparator();
  1176. initModule({ location: tp.automationTab.pages[0], title: "AutoRespawn", storeAs: "autoRespawn", tooltip: "Automatically respawn", bindLocation: tp.automationTab.pages[1], });
  1177. 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" });
  1178. tp.automationTab.pages[0].addSeparator();
  1179. initFolder({ location: tp.automationTab.pages[0], title: "Game Blacklist Settings", storeAs: "gameBlacklistFolder", });//Game Blacklist Folder
  1180. initModule({ location: tp.gameBlacklistFolder, title: "Blacklist On", storeAs: "gameBlacklist", tooltip: "Prevents you from joining specific games", bindLocation: tp.automationTab.pages[1], });
  1181. initModule({ location: tp.gameBlacklistFolder, title: "Codes:", storeAs: "gameBlacklistCodes", tooltip: "The game list used by GameBlacklist, seperated with commas", defaultValue: "", });
  1182. 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(){
  1183. if (GAMECODE != undefined && GAMECODE != null){
  1184. if (extract("gameBlacklistCodes") != "" && extract("gameBlacklistCodes") != undefined) { //does the list exist yet?
  1185. let cds = extract("gameBlacklistCodes").split(","); //get the codes as an array
  1186. if(cds.includes(GAMECODE)){ //the code is already in the list!
  1187. createPopup("Gamecode already in list!"); //notify user that we aren't adding the code'
  1188. return; //no need to add code to list, so gtfo
  1189. }
  1190. }
  1191. extract("gameBlacklistCodes") != undefined ? change("gameBlacklistCodes", extract("gameBlacklistCodes")+GAMECODE+",") : change("gameBlacklistCodes", GAMECODE+",");
  1192. } else {
  1193. createPopup("Join a game first");
  1194. };
  1195. },});
  1196. 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
  1197. //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)
  1198. if(extract("gameBlacklistCodes") != undefined) //do we have codes yet? Otherwise the log is either gonna be pointless or error...
  1199. 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?
  1200. change("gameBlacklistCodes", ""); //just set the blacklist to an empty String
  1201. },});
  1202. tp.automationTab.pages[0].addSeparator();
  1203. 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() }, });
  1204. initModule({ location: tp.automationTab.pages[0], title: "LeaveEmpty", storeAs: "leaveEmpty", tooltip: "Leaves empty games", bindLocation: tp.automationTab.pages[1], });
  1205. initModule({ location: tp.automationTab.pages[0], title: "Auto Leave", storeAs: "autoLeave", tooltip: "Automatically leaves after a specified interval", bindLocation: tp.automationTab.pages[1], });
  1206. 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]] });
  1207. tp.automationTab.pages[0].addSeparator();
  1208. 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" });
  1209. 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" });
  1210. tp.automationTab.pages[0].addSeparator();
  1211. 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" });
  1212. 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" });
  1213. 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" });
  1214. //BOTTING MODULES
  1215. initFolder({ location: tp.mainPanel, title: "Botting", storeAs: "bottingFolder", });
  1216. initTabs({ location: tp.bottingFolder, storeAs: "bottingTab" }, [
  1217. {
  1218. title: "WIP", content:
  1219. `Sorry! No guide yet!
  1220. But check out the GitHub guide.`},
  1221. ]);
  1222. 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: () => {
  1223. tp.botPanel.hidden = !tp.botPanel.hidden;
  1224. }});
  1225. tp.bottingTab.pages[0].addSeparator();
  1226. 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 }) }, });
  1227. //THEMING MODULES
  1228. initFolder({ location: tp.mainPanel, title: "Theming", storeAs: "themingFolder", });
  1229. initTabs({ location: tp.themingFolder, storeAs: "themingTab" }, [
  1230. {
  1231. title: "WIP", content:
  1232. `Sorry! No guide yet!`},
  1233. ]);
  1234. 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) => {
  1235. if (!unsafeWindow[skyboxName]) return;
  1236. unsafeWindow[skyboxName].material.reflectionTexture.coordinatesMode = L.BABYLON.Texture.SKYBOX_MODE;
  1237. }});
  1238. initModule({ location: tp.themingTab.pages[0], title: "Randomize Skybox", storeAs: "randomSkyBox", tooltip: "Switches the skybox to a random one", bindLocation: tp.themingTab.pages[1], });
  1239. 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, });
  1240. tp.themingTab.pages[0].addSeparator();
  1241. initModule({ location: tp.themingTab.pages[0], title: "Legacy Models", storeAs: "legacyModels", tooltip: "Switches to the old models", bindLocation: tp.themingTab.pages[1], });
  1242. 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: [
  1243. {text: "Default", value: 2},
  1244. {text: "Blue", value: 3},
  1245. {text: "Mexico", value: 4},
  1246. ],});
  1247. 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: [
  1248. {text: "Right", value: "right"},
  1249. {text: "Left", value: "left"},
  1250. {text: "Hidden", value: "hidden"},
  1251. ],});
  1252. tp.themingTab.pages[0].addSeparator();
  1253. initFolder({ location: tp.themingTab.pages[0], title: "Audio Settings", storeAs: "audioFolder", });
  1254. initModule({ location: tp.audioFolder, title: "Mute Game", storeAs: "muteGame", tooltip: "Mute the game?", bindLocation: tp.themingTab.pages[1], });
  1255. 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, });
  1256. tp.audioFolder.addSeparator();
  1257. 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)), });
  1258. 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)), });
  1259. 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)), });
  1260. tp.themingTab.pages[0].addSeparator();
  1261. 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], });
  1262. initModule({ location: tp.themingTab.pages[0], title: "Animate Title", storeAs: "titleAnimation", tooltip: "Makes the page title look cool", bindLocation: tp.themingTab.pages[1], });
  1263. initModule({ location: tp.themingTab.pages[0], title: "Client Theme", storeAs: "themeType", tooltip: "Controls the client's UI theme", bindLocation: tp.themingTab.pages[1], dropdown: [
  1264. {text: "Default", value: "defaultTheme"},
  1265. {text: "Iceberg", value: "icebergTheme"},
  1266. {text: "Jet Black", value: "jetblackTheme"},
  1267. {text: "Light", value: "lightTheme"},
  1268. {text: "Retro", value: "retroTheme"},
  1269. {text: "Translucent", value: "translucentTheme"},
  1270. {text: "StateFarmer", value: "statefarmerTheme"},
  1271. {text: "Blurple", value: "blurpleTheme"},
  1272. {text: "ShellFarm", value: "shellFarmTheme"},
  1273. ], defaultValue: "defaultTheme", changeFunction: function(value) {
  1274. applyTheme(value.value);
  1275. }});
  1276. tp.themingTab.pages[0].addSeparator();
  1277. initModule({ location: tp.themingTab.pages[0], title: "Enable Party Lights", storeAs: "partyLightsEnabled", tooltip: "🥳🥳 Let the party begin 🎉🎉", bindLocation: tp.themingTab.pages[1], });
  1278. 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, });
  1279. tp.themingTab.pages[0].addSeparator();
  1280. 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, });
  1281. //ACCOUNT MODULES
  1282. initFolder({ location: tp.mainPanel, title: "Accounts", storeAs: "accountsFolder", });
  1283. initTabs({ location: tp.accountsFolder, storeAs: "accountsTab" }, [
  1284. {
  1285. title: "Basics", content:
  1286. `This is the accounts tab. Here you will find
  1287. options relating to managing your thousands of
  1288. shell accounts and options that will enable you
  1289. to alt like a pro.
  1290.  
  1291. NOTE: ShellPrint is currently unsupported on
  1292. this version of StateFarm Client.`},
  1293. {
  1294. title: "Login DB", content:
  1295. `The Login DB allows you to alt with ease. Put
  1296. simply, it is just a list of EmailPass combos.
  1297. It is simpler than AccountRecords, but one does
  1298. not replace the other. Login DB is stored
  1299. universally across all Shell proxies, and
  1300. has a queue system. Each time an account
  1301. from this list is logged into, it moves it
  1302. to the back of the list, allowing you to
  1303. have a steady stream of fresh accounts.
  1304.  
  1305. PRIVACY NOTE: This database will contain some
  1306. important information. All data is stored locally
  1307. and will never be requested by the StateFarm
  1308. development team, but can theoretically be stolen
  1309. via the use of other userscripts not authorised
  1310. by the StateFarm developers. This DB is not
  1311. exposed to the Shell Shockers game (unless you
  1312. have enabled debug mode).`},
  1313. {
  1314. title: "AccRecord", content:
  1315. `The AccountRecords database is similar, but
  1316. different to the Login DB. Whilst the Login DB
  1317. serves to allow you to quickly switch to a new
  1318. account, AccountRecords saves information
  1319. related to accounts you've logged into. It saves
  1320. info such as your egg count, items in your
  1321. inventory and the value of your inventory.
  1322. This feature is even more advanced than the
  1323. Login DB, and is only recommended for use by
  1324. people who really know what they're doing. If
  1325. you just like aimbotting, you really don't need
  1326. to worry about this.
  1327.  
  1328. FYI: This will attempt to save info about any
  1329. account, but will only perform best when you
  1330. are using an account that you logged into using
  1331. StateFarm's login or account creation modules.
  1332. Other accounts will have limited info, such as
  1333. masked emails and no EmailPass combos.
  1334.  
  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. initModule({ location: tp.miscTab.pages[0], 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], });
  1529. initModule({ location: tp.miscTab.pages[0], title: "VIP Spoof", storeAs: "spoofVIP", tooltip: "Makes the VIP badge visible locally (other players won't see)", bindLocation: tp.miscTab.pages[1], });
  1530. initModule({ location: tp.miscTab.pages[0], title: "NoAnnoyances", storeAs: "noAnnoyances", tooltip: "Removes ads", bindLocation: tp.miscTab.pages[1], });
  1531. initModule({ location: tp.miscTab.pages[0], title: "NoTrack", storeAs: "noTrack", tooltip: "Removes some user data tracking code", bindLocation: tp.miscTab.pages[1], });
  1532. tp.miscTab.pages[0].addSeparator();
  1533. initModule({ location: tp.chatTab.pages[0], title: "AntiAFK", storeAs: "antiAFK", tooltip: "Bypasses AFK kicks", bindLocation: tp.chatTab.pages[1], });
  1534. initModule({ location: tp.miscTab.pages[0], title: "Quick Respawn", storeAs: "quickRespawn", tooltip: "Respawns quicker than usual", bindLocation: tp.miscTab.pages[1], });
  1535. 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(){
  1536. if (!(unsafeWindow.extern.gamePaused || sneakyDespawning)) {
  1537. sneakyDespawning = true;
  1538. ss.PAUSE(); createPopup("SneakyDespawn: 3 seconds.");
  1539. setTimeout(() => { createPopup("SneakyDespawn: 2 seconds.");
  1540. }, 1e3);
  1541. setTimeout(() => { createPopup("SneakyDespawn: 1 second.");
  1542. }, 2e3);
  1543. setTimeout(() => { createPopup("SneakyDespawn: Now despawning!");
  1544. document.exitPointerLock(); document.onpointerlockchange();
  1545. setTimeout(() => {
  1546. sneakyDespawning = false;
  1547. }, 200);
  1548. }, 3e3);
  1549. };
  1550. },});
  1551. tp.miscTab.pages[0].addSeparator();
  1552. initModule({ location: tp.miscTab.pages[0], 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, });
  1553. initModule({ location: tp.miscTab.pages[0], 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, });
  1554. initModule({ location: tp.miscTab.pages[0], title: "Custom Badges", storeAs: "customBadges", tooltip: "Enables custom StateFarm badges", bindLocation: tp.miscTab.pages[1], defaultValue: true, });
  1555. tp.miscTab.pages[0].addSeparator();
  1556. initModule({ location: tp.miscTab.pages[0], title: "Unlock Skins", storeAs: "unlockSkins", tooltip: "Unlocks all skins in locally (other players will not see these)", bindLocation: tp.miscTab.pages[1], });
  1557. 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(){
  1558. extern.giveBasketBrosReward();
  1559. },});
  1560. 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], });
  1561. tp.miscTab.pages[0].addSeparator();
  1562. initModule({ location: tp.miscTab.pages[0], 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(){
  1563. if (GM_getValue('StateFarm_Unbanned')) unban();
  1564. 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') {
  1565. GM_setValue('StateFarm_Unbanned', 'true');
  1566. unban();
  1567. } else {
  1568. alert('You did not entire "ok", so the unban was cancelled.');
  1569. };
  1570. },});
  1571. initModule({ location: tp.miscTab.pages[0], title: "Auto Unban", storeAs: "autoUnban", tooltip: "Automatically detects bans & unbans in above fashion", bindLocation: tp.miscTab.pages[1],});
  1572. initModule({ location: tp.miscTab.pages[0], 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(){
  1573. 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.");
  1574. if (userConfirmed) {
  1575. newProxy();
  1576. };
  1577. },});
  1578. initModule({ location: tp.miscTab.pages[0], title: "Reload Page", storeAs: "reload", tooltip: "Reloads the page", bindLocation: tp.miscTab.pages[1], button: "RELOAD NOW", clickFunction: function(){
  1579. reloadPage();
  1580. },});
  1581. tp.miscTab.pages[0].addSeparator();
  1582. 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(){
  1583. if (document.pointerLockElement !== null) { //currently locked
  1584. noPointerPause=true; unsafeWindow.document.exitPointerLock();
  1585. } else if (noPointerPause) { //already unlocked?
  1586. noPointerPause=false;
  1587. unsafeWindow.canvas.requestPointerLock();
  1588. };
  1589. },});
  1590. tp.miscTab.pages[0].addSeparator();
  1591. initModule({ location: tp.miscTab.pages[0], title: "FastChickenWinner", storeAs: "chickenWinner", tooltip: "Instantly plays the chick'n winner minigame", bindLocation: tp.miscTab.pages[1], button: "Force Play", clickFunction: function(){
  1592. unsafeWindow.extern.chwTryPlay();
  1593. const eggElement = document.getElementById("eggOne");
  1594. eggElement.click();eggElement.click();eggElement.click();eggElement.click();eggElement.click();eggElement.click();eggElement.click();eggElement.click();eggElement.click();
  1595. let chicknWinnerElementLoaded = false;
  1596. const checkInterval = setInterval(() => {
  1597. const chicknWinnerElement = document.getElementById('chicknWinner');
  1598. chicknWinnerElementLoaded = (chicknWinnerElement?.style?.display == ''); //idk, this is kind of shit? but who actually cares that much...
  1599. if (chicknWinnerElementLoaded) {
  1600. const gotWinnerOkElement = document.getElementById('gotWinnerOk');
  1601. if (gotWinnerOkElement) {
  1602. gotWinnerOkElement.click();
  1603. };
  1604. if (chicknWinnerElement.style.display == 'none') {
  1605. log("ermm, found");
  1606. clearInterval(checkInterval);
  1607. updateAccountRecords();
  1608. accountStatus = "chwDone";
  1609. };
  1610. };
  1611. }, 100);
  1612. },});
  1613. initModule({ location: tp.miscTab.pages[0], title: "AutoChickenWinner", storeAs: "autoChickenWinner", tooltip: "Automatically plays the chick'n winner minigame when cooldowns are over", bindLocation: tp.miscTab.pages[1],});
  1614. tp.miscTab.pages[0].addSeparator();
  1615. //GM_getValue("StateFarm_GameHistory");
  1616. 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(){
  1617. let games = GM_getValue("StateFarm_GameHistory");
  1618. //alert(GM_getValue("StateFarm_GameHistory"));
  1619. if(!games) {
  1620. alert("no history!");
  1621. return;
  1622. }
  1623. games = JSON.parse(games);
  1624. let gString = "";
  1625. games.forEach(g => {
  1626. gString+= g.code;
  1627. if(g.amount>1) gString += ` (${g.amount})`;
  1628. gString+= ": ";
  1629. gString+= g.string; //omggggg
  1630.  
  1631. gString+= ` (left at ${new Date(g.time).toLocaleString()} via ${g.closeCode} ${g.message})`
  1632.  
  1633. gString += "\n";
  1634. });
  1635. console.log(gString); //debated using log(), but this is a direct user input so yhhhhhhhh
  1636. gString+="\na copy of this list has been dumped into the console, if you wish to copy a code.";
  1637. alert(gString);
  1638. },});
  1639. 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(){
  1640. if(!GM_getValue("StateFarm_GameHistory")) return;
  1641. log("deleting game history: " + GM_getValue("StateFarm_GameHistory"));
  1642. GM_deleteValue("StateFarm_GameHistory");
  1643. createPopup("game history deleted!");
  1644. },});
  1645. initModule({ location: tp.miscTab.pages[0], title: "Custom Macro", storeAs: "customMacro", tooltip: "The JavaScript macro executed via executeMacro", defaultValue: "log('cool');" });
  1646. 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(){
  1647. //use at your own risk, i guess. but is this really any more dangerous than pasting something into console? not really.
  1648. (async () => {
  1649. try {
  1650. log(extract("customMacro"));
  1651. // stay safe out there. this runs in the **userscript** environment. make sure to use unsafeWindow for whatever reason you may need the window object.
  1652. await eval(extract("customMacro")); // eslint-disable-line
  1653. } catch (error) {
  1654. console.error("Error executing code:", error);
  1655. }
  1656. })();
  1657. },}); //but yes, as you can see "macros" are just scripts you can execute for whatever purposes you need. reminds me of userscripts...
  1658. 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],});
  1659. tp.miscTab.pages[0].addSeparator();
  1660. 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(){
  1661. findNewPath = true;
  1662. },});
  1663. findNewPath = false;
  1664. tp.miscTab.pages[0].addSeparator();
  1665. initModule({ location: tp.miscTab.pages[0], title: "SilentRoll", storeAs: "silentRoll", tooltip: "Rolls around without showing it client sided", bindLocation: tp.miscTab.pages[1], });
  1666. initFolder({ location: tp.miscTab.pages[0], title: "Seizure Options", storeAs: "seizureFolder", });
  1667. 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], });
  1668. 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, });
  1669. 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], });
  1670. 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, });
  1671. //CLIENT MODULES
  1672. initFolder({ location: tp.mainPanel, title: "Client & About", storeAs: "clientFolder", });
  1673. initTabs({ location: tp.clientFolder, storeAs: "clientTab" }, [
  1674. {
  1675. title: "WIP", content:
  1676. `Sorry! No guide yet!`},
  1677. ]);
  1678. 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", });
  1679. 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", });
  1680. initModule({ location: tp.clientTab.pages[0], title: "Custom VarData", storeAs: "vardataCustom", tooltip: "Uses the entered varData", defaultValue: "{}", enableConditions: [["vardataFallback", "loadCustom"]] });
  1681. tp.clientTab.pages[0].addSeparator();
  1682. 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", });
  1683. 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,});
  1684. 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,});
  1685. 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, });
  1686. 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, });
  1687. tp.clientTab.pages[0].addSeparator();
  1688. 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]], });
  1689. initFolder({ location: tp.clientTab.pages[0], title: "Panic Options", storeAs: "panicFolder", });
  1690. initModule({ location: tp.panicFolder, title: "Enable", storeAs: "enablePanic", tooltip: "Enable evacuation", bindLocation: tp.clientTab.pages[1], defaultValue: false, });
  1691. initModule({ location: tp.panicFolder, title: "Set URL", storeAs: "panicURL", tooltip: "What url to evacuate to", defaultValue: "https://classroom.google.com/", enableConditions: [["enablePanic", true]], });
  1692. tp.clientTab.pages[0].addSeparator();
  1693. let presetList = [];
  1694. Object.entries(inbuiltPresets).forEach(([key, value]) => {//Get all presets from inbuilt presets var
  1695. let options = {};
  1696. options.text = key;//not the best way to add things to a dictionary, but the only way i could get to work
  1697. options.value = key; // idiot could've not violated eslint smfh
  1698. presetList.push(options);
  1699. });
  1700. //PRESETS: OakSwingZZZ 😎
  1701. initFolder({ location: tp.clientTab.pages[0], title: "Presets", storeAs: "presetFolder",});
  1702. 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, });
  1703. initModule({ location: tp.presetFolder, title: "Apply", storeAs: "applyPreset", tooltip: "Apply the preset selected in the comboBox above", button: "Apply Preset", clickFunction: function () {
  1704. const userConfirmed = confirm( "Are you sure you want to continue? This will replace most of your current config." );
  1705. if (userConfirmed) { applySettings(inbuiltPresets[extract("selectedPreset")], true); };
  1706. },
  1707. });
  1708. tp.presetFolder.addSeparator();
  1709. initModule({ location: tp.presetFolder, title: "Save", storeAs: "savePreset", tooltip: "Saves your current settings as a preset", button: "Save As Preset", clickFunction: function () {
  1710. // log("Config Main: ", configMain);
  1711. let saveString = '';
  1712. const addParam = function(module,setTo) {saveString=saveString+module+">"+JSON.stringify(setTo)+"<"};
  1713. Object.entries(configMain).forEach(([key, value]) => {
  1714. log(key, value);
  1715. if (typeof(value) == 'string') {
  1716. try {
  1717. let dropdown = extractAsDropdownInt(key)
  1718. value = dropdown;
  1719. } catch (error) {
  1720. //dont care lmaoooo
  1721. };
  1722. };
  1723. if (!presetIgnore.includes(key)){
  1724. addParam(key, value);
  1725. }
  1726. });
  1727. saveString = saveString.substring(0, saveString.length - 1);
  1728. let presetName = prompt("Name of preset:"); // asks user for name of preset
  1729. if (presetName == "" || presetName == null) {
  1730. log("User cancelled save");
  1731. } else {
  1732. let result = saveUserPreset(presetName, saveString);//saves user preset
  1733. addUserPresets(loadUserPresets()); //updates inbuiltPresets to include
  1734. log("Saved Preset: ", saveString);
  1735. log("User Preset Result: ", result);
  1736. };
  1737. log("InbuiltPrests:");
  1738. log(inbuiltPresets);
  1739. initMenu(false); //Reloads menu to add to dropdown list
  1740. },});
  1741. 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
  1742. let currUserPresets = loadUserPresets(); //gets current presets from storage
  1743. delete currUserPresets[extract("selectedPreset")];//deletes
  1744. delete inbuiltPresets[extract("selectedPreset")];//deletes
  1745. save(presetStorageLocation, currUserPresets); // saves cnages to file.
  1746. log("Current User Presets: ",currUserPresets);
  1747. initMenu(false); //reloads menu
  1748. },});
  1749. tp.presetFolder.addSeparator();
  1750. initModule({ location: tp.presetFolder, title: "Import", storeAs: "importPreset", tooltip: "Imports a custom preset", button: "Import Preset", clickFunction: function () {
  1751. let preset = prompt("Paste preset here:"); // asks user to paste preset
  1752. if (preset == "" || preset == null) {
  1753. log("User cancelled save");
  1754. } else {
  1755. const pattern = /([a-zA-Z]*>[^<]*<)+[a-zA-Z]*>[^<]*/;
  1756. if (pattern.test(preset)){
  1757. let presetName = prompt("Name of preset:"); // asks user for name of preset
  1758. if (presetName == "" || presetName == null) {
  1759. log("User cancelled save");
  1760. } else {
  1761. let result = saveUserPreset(presetName, preset);//saves user preset
  1762. addUserPresets(loadUserPresets()); //updates inbuiltPresets to include
  1763. log("Saved Preset: ", preset);
  1764. log("User Preset Result: ", result);
  1765. }
  1766. } else {
  1767. alert("Not A Valid Preset!");
  1768. log("Preset Not Valid");
  1769. };
  1770. initMenu(false);
  1771. };
  1772. },});
  1773. initModule({ location: tp.presetFolder, title: "Export", storeAs: "exportPreset", tooltip: "Copies your current preset to the clipboard", button: "Copy To Clipboard", clickFunction: function () {
  1774. let saveString = '';
  1775. const addParam = function(module,setTo) {saveString=saveString+module+">"+JSON.stringify(setTo)+"<"};
  1776. Object.entries(configMain).forEach(([key, value]) => {
  1777. log(key, value);
  1778. if (typeof(value) == 'string') {
  1779. try {
  1780. let dropdown = extractAsDropdownInt(key)
  1781. value = dropdown;
  1782. } catch (error) {
  1783. //dont care lmaoooo
  1784. };
  1785. };
  1786. if (!presetIgnore.includes(key)){
  1787. addParam(key, value);
  1788. }
  1789. });
  1790. saveString = saveString.substring(0, saveString.length - 1);
  1791. GM_setClipboard(saveString, "text", () => log("Clipboard set!"));
  1792. createPopup("Preset copied to clipboard...");
  1793. },});
  1794. tp.clientTab.pages[0].addSeparator();
  1795. initFolder({ location: tp.clientTab.pages[0], title: "Creator's Links", storeAs: "linksFolder",});
  1796. initModule({ location: tp.linksFolder, title: "Discord", storeAs: "discord", tooltip: "The official StateFarm Client Discord server", button: "Link", clickFunction: () => GM_openInTab(discordURL, { active: true }) });
  1797. 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 }) });
  1798. tp.clientTab.pages[0].addSeparator();
  1799. initModule({ location: tp.clientTab.pages[0], title: "Reset", storeAs: "clear", tooltip: "Powerwashes StateFarm completely", button: "DELETE", clickFunction: function(){
  1800. const userConfirmed=confirm("Are you sure you want to continue? This will clear all stored module states and keybinds.");
  1801. if (userConfirmed) {
  1802. initMenu(true);
  1803. alert("Reset to defaults.");
  1804. };
  1805. },});
  1806. initModule({ location: tp.clientTab.pages[0], 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], });
  1807. tp.mainPanel.addSeparator();
  1808. initModule({ location: tp.mainPanel, title: "Update", storeAs: "update", tooltip: "Go to the client's update page", button: "Link", clickFunction: () => GM_openInTab(downloadURL, { active: true }) });
  1809. 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 }) });
  1810.  
  1811.  
  1812. tp.botPanel = new Tweakpane.Pane(); // eslint-disable-line
  1813. tp.botPanel.title = "StateFarm Bot Control Panel";
  1814. tp.botPanel.containerElem_.style.left = "15%";
  1815. tp.botPanel.containerElem_.style.top = "25%";
  1816. tp.botPanel.hidden = true;
  1817.  
  1818. tp.botTabs = tp.botPanel.addTab({
  1819. pages: [
  1820. { title: 'Deploy' },
  1821. { title: 'Manage' },
  1822. { title: 'Params' },
  1823. { title: 'Info' },
  1824. ],
  1825. });
  1826.  
  1827. //DEPLOY STUFF
  1828. 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, });
  1829. 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() }, });
  1830. 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) }, });
  1831. tp.botTabs.pages[0].addSeparator();
  1832. 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, });
  1833. 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, });
  1834. tp.botTabs.pages[0].addSeparator();
  1835. initModule({ location: tp.botTabs.pages[0], title: "Use Names", storeAs: "useCustomNameBots", tooltip: "Use special customized names", defaultValue: true, botParam: true, });
  1836. initModule({ location: tp.botTabs.pages[0], title: "Bot Name", storeAs: "botUsername", tooltip: "The names used by the bots", defaultValue: "ЅtateFarmer", enableConditions: [["useCustomNameBots", true]], });
  1837. 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]], });
  1838. initModule({ location: tp.botTabs.pages[0], title: "CopyNames", storeAs: "botCopyName", tooltip: "Copies names from other players in the lobby", enableConditions: [["useCustomNameBots", true]], });
  1839. tp.botTabs.pages[0].addSeparator();
  1840. initModule({ location: tp.botTabs.pages[0], title: "Use Macro", storeAs: "useBotMacro", tooltip: "Execute a macro at bot startup", defaultValue: true, botParam: true, });
  1841. 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, });
  1842. tp.botTabs.pages[0].addSeparator();
  1843. 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", });
  1844. tp.botTabs.pages[0].addSeparator();
  1845. 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", });
  1846. 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", });
  1847. 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", });
  1848. //MANAGE STUFF
  1849. 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") }, });
  1850. initModule({ location: tp.botTabs.pages[1], title: "Refresh Pages", storeAs: "refreshBots", tooltip: "Reloads all bot tabs", button: "REFRESH", clickFunction: function () { broadcastToBots("refresh") }, });
  1851. tp.botTabs.pages[1].addSeparator();
  1852. initModule({ location: tp.botTabs.pages[1], title: "New Proxies", storeAs: "newProxyBots", tooltip: "Moves bots to new proxies", button: "NEW PROXIES", clickFunction: function () { broadcastToBots("newproxy") }, });
  1853. initModule({ location: tp.botTabs.pages[1], title: "Unban All", storeAs: "unbanBots", tooltip: "Unbans all bots", button: "UNBAN BOTS", clickFunction: function () { broadcastToBots("unban") }, });
  1854. initModule({ location: tp.botTabs.pages[1], title: "AutoUnbanBot", storeAs: "botAutoUnban", tooltip: "Automatically unbans all bots when they're banned", botParam: true, });
  1855. 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, });
  1856. tp.botTabs.pages[1].addSeparator();
  1857. initModule({ location: tp.botTabs.pages[1], title: "Don'tKillMe", storeAs: "botNoKillMe", tooltip: "Forces bots to ignore you", botParam: true, });
  1858. initModule({ location: tp.botTabs.pages[1], title: "Don'tKillBot", storeAs: "botNoKillBots", tooltip: "Forces bots to ignore other bots", botParam: true, });
  1859. initModule({ location: tp.botTabs.pages[1], title: "FollowMe", storeAs: "botFollowMe", tooltip: "semibroken", botParam: true, });
  1860. initModule({ location: tp.botTabs.pages[1], title: "FollowBots", storeAs: "botFollowBots", tooltip: "semibroken", botParam: true, });
  1861. tp.botTabs.pages[1].addSeparator();
  1862. initModule({ location: tp.botTabs.pages[1], title: "Leave Games", storeAs: "leaveBots", tooltip: "Makes all bots leave their games", button: "LEAVE", clickFunction: function () { broadcastToBots("leave") }, });
  1863. initModule({ location: tp.botTabs.pages[1], title: "Leave Empty", storeAs: "leaveEmptyBots", tooltip: "Makes bots leave empty games", botParam: true, });
  1864. initModule({ location: tp.botTabs.pages[1], title: "AutoLeave", storeAs: "autoLeaveBots", tooltip: "Makes bots leave after the specified interval", botParam: true, });
  1865. 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, });
  1866. tp.botTabs.pages[1].addSeparator();
  1867. 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") }, });
  1868. tp.botTabs.pages[1].addSeparator();
  1869. initModule({ location: tp.botTabs.pages[1], title: "Join Game", storeAs: "botAutoJoin", tooltip: "Forces bots to join a game", botParam: true, });
  1870. 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, });
  1871. initModule({ location: tp.botTabs.pages[1], title: "Get Code", storeAs: "getCodeBots", tooltip: "Get your current gameÄs ID", button: "Retrieve", clickFunction: function () { change("botJoinCode", GAMECODE) }, botParam: true, });
  1872. tp.botTabs.pages[1].addSeparator();
  1873. 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, });
  1874. 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, });
  1875. tp.botTabs.pages[1].addSeparator();
  1876. 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", });
  1877. //PARAMS STUFF
  1878. initModule({ location: tp.botTabs.pages[2], title: "DoPlay", storeAs: "botRespawn", tooltip: "Make the bots spawn", botParam: true, });
  1879. initModule({ location: tp.botTabs.pages[2], title: "LowRes", storeAs: "botLowRes", tooltip: "Keeps resolution of the game low, reduces resources needed", botParam: true, })
  1880. 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, });
  1881. initModule({ location: tp.botTabs.pages[2], title: "MuteGame", storeAs: "botMuteGame", tooltip: "Shuts the game up", botParam: true, })
  1882. tp.botTabs.pages[2].addSeparator();
  1883. initModule({ location: tp.botTabs.pages[2], title: "DoSeizure", storeAs: "botSeizure", tooltip: "Will the bots enable seizure mode?", botParam: true, enableConditions: [["botRespawn", true]], });
  1884. tp.botTabs.pages[2].addSeparator();
  1885. initModule({ location: tp.botTabs.pages[2], title: "DoTallChat", storeAs: "botTallChat", tooltip: "Enables the Tall Chat module for bots", botParam: true, });
  1886. initModule({ location: tp.botTabs.pages[2], title: "DoMock", storeAs: "botMock", tooltip: "Makes the bots mock chatting players", botParam: true, });
  1887. initModule({ location: tp.botTabs.pages[2], title: "DoAutoEZ", storeAs: "botAutoEZ", tooltip: "Makes the bots gloat about their kills", botParam: true, });
  1888. initModule({ location: tp.botTabs.pages[2], title: "DoChAccuse", storeAs: "botCheatAccuse", tooltip: "Makes the bots accuse their killers when dying", botParam: true, });
  1889. tp.botTabs.pages[2].addSeparator();
  1890. initModule({ location: tp.botTabs.pages[2], title: "DoSpam", storeAs: "botSpam", tooltip: "Makes the bots spam", botParam: true, });
  1891. initModule({ location: tp.botTabs.pages[2], title: "SpamText", storeAs: "spamChatTextBot", tooltip: "The message spammed by the bots", defaultValue: "ЅtateFarm Client On Top! ", botParam: true, });
  1892. tp.botTabs.pages[2].addSeparator();
  1893. 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]], });
  1894. initModule({ location: tp.botTabs.pages[2], title: "DoMove", storeAs: "botAutoMove", tooltip: "Makes the bots move around", botParam: true, enableConditions: [["botRespawn", true]], });
  1895. 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]], });
  1896. initModule({ location: tp.botTabs.pages[2], title: "DoAimbot", storeAs: "botAimbot", tooltip: "Makes the bots have aimbot", botParam: true, enableConditions: [["botRespawn", true]], });;
  1897. 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]], });
  1898. //INFO STUFF
  1899. initModule({ location: tp.botTabs.pages[3], storeAs: "botOnline", tooltip: "Sex", monitor: 17.5, botParam: true, });
  1900.  
  1901. if (!AUTOMATED) {
  1902. if (!load("StateFarmConfigMainPanel") || reset===true) {
  1903. saveConfig();
  1904. } else {
  1905. log("##############################################")
  1906. tp.mainPanel.importPreset(load("StateFarmConfigMainPanel"));
  1907. tp.botPanel.importPreset(load("StateFarmConfigBotPanel"));
  1908. try {
  1909. let specialItems = load("StateFarmConfigSpecialItems"); //this is for the fucking shit that doesnt apply for NO reason!!
  1910. if (specialItems) {
  1911. specialItems.forEach(item => {
  1912. change(item[0], item[1]);
  1913. log(item[0], item[1]);
  1914. });
  1915. };
  1916. } catch (error) {
  1917.  
  1918. }
  1919. };
  1920. };
  1921.  
  1922. updateConfig();
  1923.  
  1924. setTimeout(() => {
  1925. if (AUTOMATED) { //why after 500ms? perhaps we'll never know. maybe because it gives a visual indication that statefarm is statefarming.
  1926. tp.mainPanel.hidden = true;
  1927. };
  1928. updateHiddenAndDisabled();
  1929. let specialItems = load("StateFarmConfigSpecialItems"); //this is for the fucking shit that doesnt apply for NO reason!!
  1930. if (specialItems) {
  1931. specialItems.forEach(item => {
  1932. change(item[0], item[1]);
  1933. log(item[0], item[1]);
  1934. });
  1935. };
  1936. //tooltip events
  1937. unsafeWindow.document.querySelectorAll('.tp-lblv_l').forEach(label => {
  1938. if (extract("debug") && !tooltips[label.innerText]) log("Warning: no tooltip assigned for module:", label.innerText);
  1939.  
  1940. label.addEventListener('mouseenter', () => {
  1941. if (extract("tooltips")) {
  1942. tooltipElement.innerText = tooltips[label.innerText] || 'Tooltip parameter not found';
  1943. tooltipElement.style.opacity = '1';
  1944. const rect = label.getBoundingClientRect();
  1945. tooltipElement.style.top = `${rect.top + window.scrollY - 12}px`;
  1946. tooltipElement.style.left = `${rect.left + window.scrollX - tooltipElement.offsetWidth - 10}px`;
  1947. }
  1948. });
  1949. label.addEventListener('mouseleave', () => {
  1950. tooltipElement.style.opacity = '0';
  1951. });
  1952. });
  1953. }, 500);
  1954.  
  1955. menuInitiated = reset == "init" ? "init" : true;
  1956. const defaultSpamText = ("dsc.gg/s𝖿network: " + menuTitle + " On Top! ");
  1957.  
  1958. if (extract("spamChatText").includes("On Top!")) { change("spamChatText", defaultSpamText) };
  1959. if (extract("spamChatTextBot").includes("On Top!")) { change("spamChatTextBot", defaultSpamText) };
  1960. if (extract("fakeMessageText").includes("On Top!")) { change("fakeMessageText", defaultSpamText) };
  1961.  
  1962. makeDraggable(tp.mainPanel.containerElem_);
  1963. makeDraggable(tp.botPanel.containerElem_);
  1964. };
  1965. const onContentLoaded = function () {
  1966. log("StateFarm: initMenu()");
  1967. initMenu("init");
  1968. log("StateFarm: applyStylesAddElements()");
  1969. applyStylesAddElements(); //set font and change menu cass, and other stuff to do with the page
  1970. const intervalId1 = setInterval(every15Seconds, 15000);
  1971. const intervalId2 = setInterval(everySecond, 1000);
  1972. const intervalId3 = setInterval(everyDecisecond, 100);
  1973. applyStateFarmLogo();
  1974. const observer = new MutationObserver(applyStateFarmLogo);
  1975. observer.observe(document.body, { subtree: true, childList: true });
  1976. };
  1977. //visual functions
  1978. const createPopup = function (text, type) {
  1979. log("Creating Popup Type:", type, "With Text:", text);
  1980. try {
  1981. if (extract("popups")) {
  1982. const messageContainer = document.getElementById('message-container');
  1983. const messages = messageContainer.getElementsByClassName(scrambledMsgEl);
  1984. if (messages.length > 5) {
  1985. messageContainer.removeChild(messages[0]);
  1986. };
  1987. const clonedMsgElement = msgElement.cloneNode(true);
  1988. clonedMsgElement.innerText = text;
  1989. switch (type) {
  1990. case ("success"):
  1991. clonedMsgElement.style.border = '2px solid rgba(0, 255, 0, 0.5)'; break;
  1992. case ("error"):
  1993. clonedMsgElement.style.border = '2px solid rgba(255, 0, 0, 0.5)'; break;
  1994. };
  1995. clonedMsgElement.style.display = 'none';
  1996. const messageOffset = (messages.length + 1) * 50;
  1997. clonedMsgElement.style.bottom = messageOffset + "px";
  1998. void clonedMsgElement.offsetWidth;
  1999. clonedMsgElement.style.display = '';
  2000. messageContainer.appendChild(clonedMsgElement);
  2001. //reorder such that newest is lowest
  2002. for (let i = messages.length - 1; i >= 0; i--) {
  2003. messages[i].style.bottom = (((messages.length - i) * 50) - 40) + "px";
  2004. };
  2005. };
  2006. } catch (error) {
  2007. // Handle the error and display an error message onscreen
  2008. console.error("An error occurred:", error);
  2009. 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.");
  2010. };
  2011. };
  2012. const createPrompt = function(text, buttons, duration) {
  2013. unsafeWindow.BAWK.play("kotc_zonespawn"); log(arguments);
  2014. duration = duration || 5000;
  2015. const promptElement = document.createElement('div');
  2016. promptElement.innerText = text;
  2017. promptElement.setAttribute('style', `
  2018. position: absolute;
  2019. left: 10px;
  2020. top: 50%;
  2021. transform: translateY(-50%);
  2022. color: #fff;
  2023. background: rgba(0, 0, 0, 0.7);
  2024. font-weight: normal;
  2025. padding: 10px;
  2026. border-radius: 5px;
  2027. box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  2028. border: 2px solid rgba(255, 255, 255, 0.5);
  2029. animation: msg 0.5s forwards, msg 0.5s reverse forwards ${duration/1000}s;
  2030. pointer-events: none;
  2031. opacity: 0;
  2032. transition: opacity 0.3s ease-in-out;
  2033. font-family: 'Bahnschrift', sans-serif !important;
  2034. font-size: 16px;
  2035. z-index: 9999 !important;
  2036. white-space: pre-wrap;
  2037. width: 300px;
  2038. `);
  2039. const buttonContainer = document.createElement('div');
  2040. buttonContainer.setAttribute('style', 'margin-top: 10px; pointer-events: auto; text-align: center;');
  2041.  
  2042. const deleteButton = function(){
  2043. document.body.removeChild(promptElement);
  2044. };
  2045.  
  2046. buttons = [...buttons,
  2047. [`Dismiss (${Math.ceil(duration/1000)}s)`, () => deleteButton()]
  2048. ];
  2049.  
  2050. buttons.forEach(([buttonText, buttonFunction]) => {
  2051. const button = document.createElement('button');
  2052. button.innerText = buttonText;
  2053. button.setAttribute('style', `
  2054. background: #6c757d;
  2055. color: #fff;
  2056. border: none;
  2057. padding: 5px 10px;
  2058. margin-right: 5px;
  2059. border-radius: 3px;
  2060. cursor: pointer;
  2061. font-family: 'Bahnschrift', sans-serif !important;
  2062. `);
  2063. button.onclick = buttonFunction;
  2064. buttonContainer.appendChild(button);
  2065. });
  2066. promptElement.appendChild(buttonContainer);
  2067. document.body.appendChild(promptElement);
  2068. setTimeout(() => {
  2069. promptElement.style.opacity = '1';
  2070. }, 100);
  2071. setTimeout(() => {
  2072. promptElement.style.opacity = '0';
  2073. setTimeout(() => {
  2074. deleteButton();
  2075. }, 800);
  2076. }, duration);
  2077. };
  2078. const createVarDataPopup = function (vardataButtonsInfo) {
  2079. closeVardataPopup = () => {
  2080. vardataPopup.style.opacity = '0';
  2081. vardataOverlay.style.opacity = '0';
  2082. setTimeout(() => {
  2083. document.body.removeChild(vardataPopup);
  2084. document.body.removeChild(vardataOverlay);
  2085. reloadPage();
  2086. }, 400);
  2087. };
  2088. //create vardataOverlay
  2089. vardataOverlay = document.createElement('div');
  2090. vardataOverlay.style.position = 'fixed';
  2091. vardataOverlay.style.top = '0';
  2092. vardataOverlay.style.left = '0';
  2093. vardataOverlay.style.width = '100%';
  2094. vardataOverlay.style.height = '100%';
  2095. vardataOverlay.style.backgroundColor = 'rgba(0, 0, 0, 0.75)';
  2096. vardataOverlay.style.zIndex = '9998';
  2097. vardataOverlay.style.opacity = '0';
  2098. vardataOverlay.style.transition = 'opacity 0.4s ease-in-out';
  2099. //create vardataPopup
  2100. vardataPopup = document.createElement('div');
  2101. vardataPopup.style.position = 'fixed';
  2102. vardataPopup.style.left = '50%';
  2103. vardataPopup.style.top = '50%';
  2104. vardataPopup.style.width = '40em';
  2105. vardataPopup.style.transform = 'translate(-50%, -50%)';
  2106. vardataPopup.style.color = '#fff';
  2107. vardataPopup.style.backgroundColor = 'rgba(0, 0, 0, 0.7)';
  2108. vardataPopup.style.padding = '15px';
  2109. vardataPopup.style.borderRadius = '5px';
  2110. vardataPopup.style.boxShadow = '0 2px 10px rgba(0, 0, 0, 0.2)';
  2111. vardataPopup.style.border = '2px solid rgba(255, 255, 255, 0.5)';
  2112. vardataPopup.style.pointerEvents = 'auto';
  2113. vardataPopup.style.opacity = '0'; // Start invisible for fade-in effect
  2114. vardataPopup.style.transition = 'opacity 0.4s ease-in-out'; // Fade-in transition
  2115. vardataPopup.style.fontFamily = 'Bahnschrift, sans-serif';
  2116. vardataPopup.style.fontSize = '16px';
  2117. vardataPopup.style.zIndex = '9999';
  2118. vardataPopup.style.whiteSpace = 'pre-wrap';
  2119. //set vardataPopup content
  2120. const title = "Valid VarData for this hash could not be retrieved.";
  2121. const message = `This could be due to a conflicting script or StateFarm Client is out of date.<br>
  2122. <strong>Why am I seeing this?</strong>
  2123. StateFarm Client was unable to retrieve matching VarData from GitHub. Here are some common reasons for this happening:<br>
  2124. 1. Multiple scripts are running. This is usually the most common reason.
  2125. 2. There are multiple userscript managers. If you're using ViolentMonkey, check if Tampermonkey is installed and also affecting the site.<br>
  2126. <strong>What is VarData?</strong>
  2127. 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>
  2128. <strong>How do I generate VarData?</strong>
  2129. You can generate VarData by using the command "sf.vardata" in the StateFarm Network Discord bot channel.
  2130. <a href="${discordURL}" target="_blank" style="color: #1944ff; text-decoration: underline; font-size: inherit;">Join the StateFarm Network Discord server</a> to generate VarData!`;
  2131. const message2 = `<br>Alternatively, if you know what you're doing you can enable one of these options:`;
  2132. const image = `<img src='${itsOverURL}' style='width: 20%; height: 20%; margin-right: 15px; vertical-align: middle;'>`;
  2133. 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>
  2134. <label for="vardataInput">Enter VarData:</label>
  2135. <div style="display: flex; align-items: center;">
  2136. <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;">
  2137. <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>
  2138. </div>${message2}`;
  2139. //create buttons
  2140. const vardataButtonContainer = document.createElement('div');
  2141. vardataButtonContainer.style.display = 'flex';
  2142. vardataButtonContainer.style.justifyContent = 'space-between';
  2143. vardataButtonContainer.style.marginTop = '10px';
  2144. vardataButtonsInfo.forEach(({ id, text, action }) => {
  2145. const button = document.createElement('button');
  2146. button.id = id;
  2147. button.innerHTML = text;
  2148. button.style.padding = '5px 10px';
  2149. button.style.backgroundColor = 'rgba(255, 255, 255, 0.1)';
  2150. button.style.color = '#fff';
  2151. button.style.border = '1px solid rgba(255, 255, 255, 0.5)';
  2152. button.style.borderRadius = '5px';
  2153. button.style.cursor = 'pointer';
  2154. button.style.transition = 'background-color 0.2s';
  2155. button.style.flex = '1';
  2156. button.style.marginRight = '10px';
  2157. button.style.fontSize = '12px';
  2158. button.style.whiteSpace = 'pre-wrap';
  2159. button.addEventListener('click', action);
  2160. button.addEventListener('mouseenter', () => button.style.backgroundColor = 'rgba(255, 255, 255, 0.3)');
  2161. button.addEventListener('mouseleave', () => button.style.backgroundColor = 'rgba(255, 255, 255, 0.1)');
  2162. vardataButtonContainer.appendChild(button);
  2163. });
  2164. vardataPopup.appendChild(vardataButtonContainer);
  2165.  
  2166. const setButtonState = function (buttonId, isEnabled) {
  2167. const button = unsafeWindow.document.getElementById(buttonId);
  2168. if (button) {
  2169. button.disabled = !isEnabled;
  2170. button.style.opacity = isEnabled ? '1' : '0.5';
  2171. button.style.pointerEvents = isEnabled ? 'auto' : 'none';
  2172. }
  2173. };
  2174. (setTimeout(() => {
  2175. vardataButtonsInfo.forEach(({ id, enabled }) => {
  2176. setButtonState(id, enabled);
  2177. });
  2178. }, 200));
  2179.  
  2180. //create checkbox
  2181. const vardataCheckboxContainer = document.createElement('div');
  2182. vardataCheckboxContainer.style.display = 'flex';
  2183. vardataCheckboxContainer.style.justifyContent = 'center';
  2184. vardataCheckboxContainer.style.alignItems = 'center';
  2185. vardataCheckboxContainer.style.marginTop = '15px';
  2186. vardataCheckboxContainer.style.fontSize = '16px';
  2187. const checkbox = document.createElement('input');
  2188. checkbox.type = 'checkbox';
  2189. checkbox.id = 'rememberCheckbox';
  2190. checkbox.style.display = 'none';
  2191. const customCheckbox = document.createElement('span');
  2192. customCheckbox.style.width = '20px';
  2193. customCheckbox.style.height = '20px';
  2194. customCheckbox.style.display = 'inline-block';
  2195. customCheckbox.style.backgroundColor = 'rgba(255, 255, 255, 0.1)';
  2196. customCheckbox.style.border = '1px solid rgba(255, 255, 255, 0.5)';
  2197. customCheckbox.style.borderRadius = '5px';
  2198. customCheckbox.style.marginRight = '8px';
  2199. customCheckbox.style.cursor = 'pointer';
  2200. customCheckbox.addEventListener('click', () => {
  2201. checkbox.checked = !checkbox.checked;
  2202. change("vardataType", checkbox.checked ? 2 : 1);
  2203. customCheckbox.style.backgroundColor = checkbox.checked ? 'rgba(255, 255, 255, 0.8)' : 'rgba(255, 255, 255, 0.1)';
  2204. });
  2205. vardataCheckboxContainer.appendChild(customCheckbox);
  2206. vardataCheckboxContainer.appendChild(checkbox);
  2207. vardataCheckboxContainer.appendChild(document.createTextNode('Remember until next hash'));
  2208. vardataPopup.appendChild(vardataCheckboxContainer);
  2209. document.body.appendChild(vardataOverlay);
  2210. document.body.appendChild(vardataPopup);
  2211.  
  2212. //add inputs stuff
  2213. const input = document.getElementById('vardataInput');
  2214. const submitButton = document.getElementById('submitVarData');
  2215.  
  2216. submitButton.addEventListener('click', () => {
  2217. const inputValue = input.value;
  2218.  
  2219. const error = function () {
  2220. createPopup("Inputted VarData isn't valid.", "error");
  2221. };
  2222. try {
  2223. let converted = JSON.parse(inputValue);
  2224. if (converted.vars && converted.checksum) {
  2225. change("vardataCustom", inputValue);
  2226. change("vardataFallback", 4);
  2227. change("vardataType", 1); //custom isnt consistent enough
  2228. closeVardataPopup();
  2229. } else {
  2230. error();
  2231. };
  2232. } catch (e) {
  2233. error();
  2234. }
  2235. });
  2236.  
  2237. input.addEventListener('keypress', (event) => {
  2238. if (event.key === 'Enter') {
  2239. submitButton.click();
  2240. }
  2241. });
  2242. //fade anims
  2243. setTimeout(() => {
  2244. vardataOverlay.style.opacity = '1';
  2245. vardataPopup.style.opacity = '1';
  2246. }, 10);
  2247. };
  2248.  
  2249. //StateFarmChat functions
  2250. const sfChatUsernameSet = function () {
  2251. let tagAdded = `[Shell] ${extract("sfChatUsername")}`;
  2252. if (sfChatUsername != tagAdded && sfChatIframe != undefined) {
  2253. sfChatUsername = tagAdded; log(sfChatUsername);
  2254. sfChatIframe.contentWindow.postMessage("SFCHAT-UPDATE" + JSON.stringify({ name: sfChatUsername }), "*");
  2255. };
  2256. };
  2257. const startStateFarmChat = function (startHidden) {
  2258. //UnsafewindowVars
  2259. const makeChatDragable = function (element) {
  2260. if (element.getAttribute("drag-true") != "true") {
  2261. element.addEventListener("mousedown", function (e) {
  2262. let offsetX = e.clientX - parseInt(window.getComputedStyle(this).left);
  2263. let offsetY = e.clientY - parseInt(window.getComputedStyle(this).top);
  2264. function mouseMoveHandler(e) {
  2265. let newX = e.clientX - offsetX;
  2266. let newY = e.clientY - offsetY;
  2267. if (newX >= 0 && newX + element.getBoundingClientRect().width <= window.innerWidth) {
  2268. element.style.left = newX + "px";
  2269. }
  2270. if (newY >= 0 && newY + element.getBoundingClientRect().height <= window.innerHeight) {
  2271. element.style.top = newY + "px";
  2272. }
  2273. }
  2274.  
  2275. function reset() {
  2276. window.removeEventListener("mousemove", mouseMoveHandler);
  2277. window.removeEventListener("mouseup", reset);
  2278. }
  2279.  
  2280. window.addEventListener("mousemove", mouseMoveHandler);
  2281. window.addEventListener("mouseup", reset);
  2282. });
  2283.  
  2284. element.setAttribute("drag-true", "true");
  2285. };
  2286. };
  2287.  
  2288. sfChatContainer = document.createElement("div");
  2289. sfChatContainer.style.padding = "1px";
  2290. let title = document.createElement("p");
  2291. title.style.fontSize = "medium";
  2292. title.style.color = "#D6D6D6";
  2293. title.innerHTML = "StateFarm Chat";
  2294. sfChatContainer.appendChild(title);
  2295. sfChatContainer.style.backgroundColor = "#555";
  2296. sfChatContainer.style.position = "absolute";
  2297. sfChatContainer.style.borderRadius = "10px";
  2298. sfChatContainer.style.textAlign = "center";
  2299. sfChatContainer.style.top = "20px";
  2300. sfChatContainer.style.left = "20px";
  2301. sfChatContainer.style.zIndex = 100000000;
  2302. if (startHidden){
  2303. sfChatContainer.style.display = 'none';
  2304. }
  2305.  
  2306. const sendSettings = function () {
  2307. let settings = GM_getValue("SFCHAT-SETTINGS");
  2308. if (settings) {
  2309. sfChatIframe.contentWindow.postMessage("SFCHAT-SETTINGS" + settings, "*");
  2310. } else {
  2311. sfChatIframe.contentWindow.postMessage("SFCHAT-SETTINGS", "*");
  2312. };
  2313. };
  2314.  
  2315. makeChatDragable(sfChatContainer);
  2316. sfChatIframe = document.createElement("iframe");
  2317. sfChatIframe.setAttribute(
  2318. "src", sfChatURL
  2319. );
  2320. sfChatIframe.id = "sfChat-iframe";
  2321. sfChatIframe.setAttribute("style", "width: 600px; height:700px; z-index: 10000;");
  2322. sfChatContainer.appendChild(sfChatIframe);
  2323. document.getElementsByTagName("body")[0].appendChild(sfChatContainer);
  2324.  
  2325. const startTimeout = setTimeout(function () {
  2326. log("settings");
  2327. sendSettings();
  2328. let nameChange = setTimeout(function () {
  2329. sfChatUsername = `[Shell] ${extract("sfChatUsername")}`;
  2330. sfChatIframe.contentWindow.postMessage("SFCHAT-UPDATE" + JSON.stringify({ name: sfChatUsername }), "*");
  2331. }, 500);
  2332. }, 1000);
  2333.  
  2334. unsafeWindow.addEventListener("message", (e) => {
  2335. if (typeof e.data == "string"){
  2336. if (e.data.startsWith("SFCHAT-UPDATE")) {
  2337. GM_setValue("SFCHAT-SETTINGS", e.data.replace(/SFCHAT-UPDATE/gm, ""));
  2338. }
  2339. if (e.data.startsWith("SFCHAT-REQUEST")) {
  2340. sendSettings();
  2341. };
  2342. if (e.data.startsWith("SFCHAT-MESSAGE")) {
  2343. let stringMessage = e.data.replace(/SFCHAT-MESSAGE/gm, "");
  2344. let message = JSON.parse(stringMessage);
  2345. if (extract("sfChatNotifications") && message.user && message.message && (sfChatContainer.style.display == "none")){
  2346. if (message.message.length <= 50){
  2347. createPopup(message.user.name + ": " + message.message);
  2348. } else {
  2349. createPopup(message.user.name + ": " + message.message.substring(0, 50) + "...");
  2350. }
  2351. if (extract("sfChatNotificationSound")){
  2352. unsafeWindow.BAWK.play("grenade_cellphone");
  2353. };
  2354. };
  2355.  
  2356. if (extract("sfChatInvitations")) {
  2357. let uppercaseMsg = message.message.toUpperCase();
  2358. const findCode = (input) => {
  2359. const allMatches = input.match(/(?:[A-Z0-9]{7})/g);
  2360. if (allMatches) {
  2361. for (const match of allMatches) {
  2362. if (/[A-Z]/.test(match) && /\d/.test(match)) {
  2363. return match;
  2364. }
  2365. }
  2366. }
  2367. return null;
  2368. };
  2369. let foundCode = findCode(uppercaseMsg);
  2370. if (foundCode) {
  2371. createPrompt(`INVITE! User "${message.user.name}" has invited you to join game "${foundCode}"! (via SFChat)`, [
  2372. ['JOIN', () => {
  2373. change("leaveGame");
  2374. setTimeout(() => {
  2375. vueApp.externPlayObject(
  2376. 2,
  2377. vueApp.currentGameType,
  2378. vueApp.playerName,
  2379. '',
  2380. foundCode,
  2381. );
  2382. }, 500);
  2383. }]
  2384. ], 10000);
  2385. };
  2386. };
  2387. };
  2388. };
  2389. });
  2390. };
  2391.  
  2392. const applyStylesAddElements = function (themeToApply = "null") {
  2393. const head = document.head || document.getElementsByTagName('head').pages[0];
  2394.  
  2395. if (AUTOMATED) {
  2396. automatedBorder = document.createElement('div');
  2397. automatedBorder.setAttribute('id', 'automated-border');
  2398. document.body.appendChild(automatedBorder);
  2399.  
  2400. const automatedBorderStyle = `
  2401. position: fixed;
  2402. top: 0;
  2403. left: 0;
  2404. width: 100%;
  2405. height: 100%;
  2406. border: 5px solid rgba(255, 0, 0, 1);
  2407. pointer-events: none;
  2408. z-index: 999999999;
  2409. `;
  2410. automatedBorder.style.cssText = automatedBorderStyle;
  2411. };
  2412.  
  2413. //menu customisation (apply font, button widths, adjust checkbox right slightly, make menu appear on top, add anim to message)
  2414. const styleElement = document.createElement('style');
  2415. styleElement.textContent = `
  2416. @font-face {
  2417. font-family: "Bahnschrift";
  2418. src: url("https://db.onlinewebfonts.com/t/0a6ee448d1bd65c56f6cf256a7c6f20a.eot");
  2419. src: url("https://db.onlinewebfonts.com/t/0a6ee448d1bd65c56f6cf256a7c6f20a.eot?#iefix")format("embedded-opentype"),
  2420. url("https://db.onlinewebfonts.com/t/0a6ee448d1bd65c56f6cf256a7c6f20a.woff2")format("woff2"),
  2421. url("https://db.onlinewebfonts.com/t/0a6ee448d1bd65c56f6cf256a7c6f20a.woff")format("woff"),
  2422. url("https://db.onlinewebfonts.com/t/0a6ee448d1bd65c56f6cf256a7c6f20a.ttf")format("truetype"),
  2423. url("https://db.onlinewebfonts.com/t/0a6ee448d1bd65c56f6cf256a7c6f20a.svg#Bahnschrift")format("svg");
  2424. }
  2425. .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, .automated {
  2426. font-family: 'Bahnschrift', sans-serif !important;
  2427. font-size: 16px;
  2428. z-index: 9999 !important;
  2429. }
  2430. .tp-rotv_m, .tp-fldv_m {
  2431. display: none;
  2432. }
  2433. .tp-dfwv {
  2434. min-width: 300px;
  2435. }
  2436. .tp-rotv_t {
  2437. cursor: move;
  2438. user-select: none;
  2439. }
  2440. .tp-tbiv_t {
  2441. font-family: 'Bahnschrift';
  2442. font-size: 13px;
  2443. }
  2444. .tp-lblv_v, .tp-lstv, .tp-btnv_b, .tp-btnv_t {
  2445. font-family: 'Bahnschrift';
  2446. font-size: 12px;
  2447. }
  2448. .tp-mllv {
  2449. font-family: 'Bahnschrift';
  2450. font-size: 12px;
  2451. letter-spacing: -1px;
  2452. width: 290px;
  2453. margin-left: -130px !important;
  2454. }
  2455. .tp-mllv_i::-webkit-scrollbar-thumb {
  2456. background-color: #888; /* Adjust the color as needed */
  2457. border: 2px solid #555; /* Change the color of the border and adjust the width as needed */
  2458. }
  2459. .tp-mllv_i::-webkit-scrollbar-track {
  2460. background-color: #000; /* Change the color as needed */
  2461. }
  2462. .tp-lblv_l {
  2463. font-size: 14px;
  2464. letter-spacing: -1px;
  2465. }
  2466. .tp-btnv {
  2467. width: 100px;
  2468. margin-left: 60px !important;
  2469. }
  2470. .tp-ckbv_w {
  2471. margin-left: 4px !important;
  2472. }
  2473. .tp-dfwv, .tp-rotv, .tp-rotv_c, .tp-fldv, .tp-fldv_c, .tp-lblv, .tp-lstv, .tp-btnv, .tp-sldv {
  2474. z-index: 99999 !important;
  2475. white-space: nowrap !important;
  2476. }
  2477. @keyframes msg {
  2478. from {
  2479. transform: translate(-120%, 0);
  2480. opacity: 0;
  2481. }
  2482. to {
  2483. transform: none;
  2484. opacity: 1;
  2485. }
  2486. }
  2487. `;
  2488.  
  2489. document.head.appendChild(styleElement);
  2490. applyTheme();
  2491.  
  2492. //initiate message div and css and shit
  2493. msgElement = document.createElement('div'); // create the element directly
  2494. scrambledMsgEl = getScrambled();
  2495. msgElement.classList.add(scrambledMsgEl);
  2496. msgElement.setAttribute('style', `
  2497. position: absolute;
  2498. left: 10px;
  2499. color: #fff;
  2500. background: rgba(0, 0, 0, 0.7);
  2501. font-weight: normal;
  2502. padding: 10px;
  2503. border-radius: 5px;
  2504. box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  2505. border: 2px solid rgba(255, 255, 255, 0.5);
  2506. animation: msg 0.5s forwards, msg 0.5s reverse forwards 3s;
  2507. pointer-events: none;
  2508. opacity: 0;
  2509. transition: opacity 0.3s ease-in-out;
  2510. font-family: 'Bahnschrift', sans-serif !important;
  2511. font-size: 16px;
  2512. z-index: 9999 !important;
  2513. `);
  2514. document.body.appendChild(msgElement);
  2515. msgElement.style.display = 'none';
  2516. const messageContainer = document.createElement('div'); //so it can be cloned. i think.
  2517. messageContainer.id = 'message-container';
  2518. document.body.appendChild(messageContainer);
  2519. //initiate tooltip div and css and shit
  2520. tooltipElement = document.createElement('div');
  2521. tooltipElement.style.cssText = `
  2522. position: absolute;
  2523. color: #fff;
  2524. background: rgba(0, 0, 0, 0.7);
  2525. font-weight: normal;
  2526. padding: 10px;
  2527. border-radius: 5px;
  2528. box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  2529. border: 2px solid rgba(255, 255, 255, 0.5);
  2530. animation: fadeIn 0.5s forwards, fadeOut 0.5s reverse forwards 3s;
  2531. pointer-events: none;
  2532. opacity: 0;
  2533. transition: opacity 0.3s ease-in-out;
  2534. font-family: 'Bahnschrift', sans-serif !important;
  2535. font-size: 16px;
  2536. z-index: 9999999 !important;
  2537. max-width: 300px;
  2538. word-wrap: break-word;
  2539. `;
  2540. document.body.appendChild(tooltipElement);
  2541. //initiate coord div and css and shit
  2542. coordElement = document.createElement('div'); // create the element directly
  2543. coordElement.classList.add('coords');
  2544. coordElement.setAttribute('style', `
  2545. position: fixed;
  2546. top: 0px;
  2547. left: 0px;
  2548. height: auto;
  2549. max-height: 30px;
  2550. min-height: 30px;
  2551. text-wrap: nowrap;
  2552. color: #fff;
  2553. background: rgba(0, 0, 0, 0.6);
  2554. font-weight: bolder;
  2555. padding: 2px;
  2556. border-radius: 5px;
  2557. box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  2558. border: 2px solid rgba(255, 255, 255, 0.5);
  2559. z-index: 999999;
  2560. `);
  2561. document.body.appendChild(coordElement);
  2562. coordElement.style.display = 'none';
  2563. //initiate game info div and css and shit
  2564. gameInfoElement = document.createElement('div'); // create the element directly
  2565. gameInfoElement.classList.add('gameinfo');
  2566. gameInfoElement.setAttribute('style', `
  2567. position: fixed;
  2568. bottom: 0px;
  2569. left: 0px;
  2570. height: auto;
  2571. max-height: 30px;
  2572. min-height: 30px;
  2573. text-wrap: nowrap;
  2574. color: #fff;
  2575. background: rgba(0, 0, 0, 0.6);
  2576. font-weight: bolder;
  2577. padding: 2px;
  2578. border-radius: 5px;
  2579. box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  2580. border: 2px solid rgba(255, 255, 255, 0.5);
  2581. z-index: 999999;
  2582. `);
  2583. document.body.appendChild(gameInfoElement);
  2584. gameInfoElement.style.display = 'none';
  2585. //initiate hp div and css and shit
  2586. playerstatsElement = document.createElement('div'); // create the element directly
  2587. playerstatsElement.classList.add('playerstats');
  2588. playerstatsElement.setAttribute('style', `
  2589. position: absolute;
  2590. top: 20px;
  2591. left: 280px;
  2592. height: auto;
  2593. min-height: 30px;
  2594. text-wrap: nowrap;
  2595. color: #fff;
  2596. background: rgba(0, 0, 0, 0.6);
  2597. font-weight: bolder;
  2598. padding: 10px;
  2599. border-radius: 5px;
  2600. box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  2601. border: 2px solid rgba(255, 255, 255, 0.5);
  2602. z-index: 999999;
  2603. `);
  2604. document.body.appendChild(playerstatsElement);
  2605. playerstatsElement.style.display = 'none';
  2606. //initiate player info div and css and shit
  2607. playerinfoElement = document.createElement('div'); // create the element directly
  2608. playerinfoElement.classList.add('playerinfo');
  2609. playerinfoElement.setAttribute('style', `
  2610. position: absolute;
  2611. top: 80%;
  2612. left: 90%;
  2613. height: auto;
  2614. max-height: 102;
  2615. text-wrap: nowrap;
  2616. color: #fff;
  2617. background: rgba(0, 0, 0, 0.6);
  2618. font-weight: bolder;
  2619. padding: 10px;
  2620. border-radius: 5px;
  2621. box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  2622. border: 2px solid rgba(255, 255, 255, 0.5);
  2623. z-index: 999999;
  2624. `);
  2625. document.body.appendChild(playerinfoElement);
  2626. playerinfoElement.style.display = 'none';
  2627. //initiate first use div and css and shit
  2628. firstUseElement = document.createElement('div'); // create the element directly
  2629. firstUseElement.classList.add('firstuse');
  2630. firstUseElement.setAttribute('style', `
  2631. position: fixed;
  2632. top: 0;
  2633. left: 0;
  2634. width: 100%;
  2635. height: 100%;
  2636. background-color: rgba(0, 0, 0, 0.8);
  2637. z-index: 99999999;
  2638. display: flex;
  2639. justify-content: center;
  2640. align-items: center;
  2641. `);
  2642. document.body.appendChild(firstUseElement);
  2643. firstUseElement.style.display = 'none';
  2644. //initiate bloom indicator div and css and shit
  2645. redCircle = document.createElement('div');
  2646. redCircle.style.position = 'fixed';
  2647. redCircle.style.width = '5px';
  2648. redCircle.style.height = '5px';
  2649. redCircle.style.borderRadius = '50%';
  2650. redCircle.style.backgroundColor = 'red';
  2651. redCircle.style.transform = 'translate(-50%, -50%)';
  2652. document.body.appendChild(redCircle);
  2653. //initiate minangle indicator div and css and shit
  2654. minangleCircle = document.createElement('div');
  2655. minangleCircle.style.position = 'fixed';
  2656. minangleCircle.style.borderRadius = '100%';
  2657. minangleCircle.style.border = 'thin solid red'
  2658. minangleCircle.style.transform = 'translate(50%, 50%)';
  2659. minangleCircle.style.pointerEvents = 'none';
  2660. document.body.appendChild(minangleCircle);
  2661.  
  2662. if (load("HUD-Positions") == null) {
  2663. hudElementPositions.coordElement = { top: coordElement.getBoundingClientRect().top, left: coordElement.getBoundingClientRect().left };
  2664. hudElementPositions.gameInfoElement = { top: gameInfoElement.getBoundingClientRect().top, left: gameInfoElement.getBoundingClientRect().left };
  2665. hudElementPositions.playerstatsElement = { top: playerstatsElement.getBoundingClientRect().top, left: playerstatsElement.getBoundingClientRect().left };
  2666. hudElementPositions.playerinfoElement = { top: playerinfoElement.getBoundingClientRect().top, left: playerinfoElement.getBoundingClientRect().left };
  2667. save("HUD-Positions", hudElementPositions);
  2668. } else {
  2669. hudElementPositions = load("HUD-Positions");
  2670.  
  2671. coordElement.style.top = hudElementPositions.coordElement.top + "px";
  2672. gameInfoElement.style.top = hudElementPositions.gameInfoElement.top + "px";
  2673. playerstatsElement.style.top = hudElementPositions.playerstatsElement.top + "px";
  2674. playerinfoElement.style.top = hudElementPositions.playerinfoElement.top + "px";
  2675.  
  2676. coordElement.style.left = hudElementPositions.coordElement.left + "px";
  2677. gameInfoElement.style.left = hudElementPositions.gameInfoElement.left + "px";
  2678. playerstatsElement.style.left = hudElementPositions.playerstatsElement.left + "px";
  2679. playerinfoElement.style.left = hudElementPositions.playerinfoElement.left + "px";
  2680. };
  2681. };
  2682.  
  2683. const makeDraggable = function (element, notMenu) {
  2684. if (element) {
  2685. let offsetX, offsetY;
  2686. element.addEventListener('mousedown', function (e) {
  2687. const dragElement = function (e) {
  2688. const x = (e.clientX - offsetX) / unsafeWindow.innerWidth * 100;
  2689. const y = (e.clientY - offsetY) / unsafeWindow.innerHeight * 100;
  2690. const maxX = 100 - (element.offsetWidth / unsafeWindow.innerWidth * 100);
  2691. const maxY = 100 - (element.offsetHeight / unsafeWindow.innerHeight * 100);
  2692. element.style.left = `${Math.max(0, Math.min(x, maxX))}%`;
  2693. element.style.top = `${Math.max(0, Math.min(y, maxY))}%`;
  2694. };
  2695. if (notMenu || e.target.classList.contains('tp-rotv_t')) {
  2696. offsetX = e.clientX - element.getBoundingClientRect().left;
  2697. offsetY = e.clientY - element.getBoundingClientRect().top;
  2698. document.addEventListener('mousemove', dragElement);
  2699. document.addEventListener('mouseup', function () {
  2700. document.removeEventListener('mousemove', dragElement);
  2701. });
  2702. e.preventDefault(); // Prevent text selection during drag
  2703. };
  2704. });
  2705. };
  2706. };
  2707.  
  2708. const makeHudElementDragable = function (element) {
  2709. if (element.getAttribute("drag-true") != "true") {
  2710. element.addEventListener("mousedown", function (e) {
  2711. let offsetX = e.clientX - parseInt(window.getComputedStyle(this).left);
  2712. let offsetY = e.clientY - parseInt(window.getComputedStyle(this).top);
  2713.  
  2714. function mouseMoveHandler(e) {
  2715. let newX = e.clientX - offsetX;
  2716. let newY = e.clientY - offsetY;
  2717. if (newX >= 0 && newX + element.getBoundingClientRect().width <= window.innerWidth) {
  2718. element.style.left = newX + "px";
  2719. };
  2720. if (newY >= 0 && newY + element.getBoundingClientRect().height <= window.innerHeight) {
  2721. element.style.top = newY + "px";
  2722. };
  2723. };
  2724.  
  2725. function reset() {
  2726. window.removeEventListener("mousemove", mouseMoveHandler);
  2727. window.removeEventListener("mouseup", reset);
  2728.  
  2729. //saves new positions
  2730. hudElementPositions.coordElement = { "top": coordElement.getBoundingClientRect().top, "left": coordElement.getBoundingClientRect().left };
  2731. hudElementPositions.gameInfoElement = { "top": gameInfoElement.getBoundingClientRect().top, "left": gameInfoElement.getBoundingClientRect().left };
  2732. hudElementPositions.playerstatsElement = { "top": playerstatsElement.getBoundingClientRect().top, "left": playerstatsElement.getBoundingClientRect().left };
  2733. hudElementPositions.playerinfoElement = { "top": playerinfoElement.getBoundingClientRect().top, "left": playerinfoElement.getBoundingClientRect().left };
  2734. save("HUD-Positions", hudElementPositions);
  2735. };
  2736.  
  2737. window.addEventListener("mousemove", mouseMoveHandler);
  2738. window.addEventListener("mouseup", reset);
  2739. });
  2740.  
  2741. element.setAttribute("drag-true", "true");
  2742. };
  2743. };
  2744.  
  2745. const applyTheme = function (setTheme) {
  2746. setTheme = (setTheme || extract("themeType") || "defaultTheme");
  2747. let rootTheme
  2748. switch (setTheme) {
  2749. case ("defaultTheme"):
  2750. rootTheme = `
  2751. --tp-base-background-color: hsla(230, 7%, 17%, 1.00);
  2752. --tp-base-shadow-color: hsla(0, 0%, 0%, 0.2);
  2753. --tp-button-background-color: hsla(230, 7%, 70%, 1.00);
  2754. --tp-button-background-color-active: hsla(230, 7%, 85%, 1.00);
  2755. --tp-button-background-color-focus: hsla(230, 7%, 80%, 1.00);
  2756. --tp-button-background-color-hover: hsla(230, 7%, 75%, 1.00);
  2757. --tp-button-foreground-color: hsla(230, 7%, 17%, 1.00);
  2758. --tp-container-background-color: hsla(230, 7%, 75%, 0.10);
  2759. --tp-container-background-color-active: hsla(230, 7%, 75%, 0.25);
  2760. --tp-container-background-color-focus: hsla(230, 7%, 75%, 0.20);
  2761. --tp-container-background-color-hover: hsla(230, 7%, 75%, 0.15);
  2762. --tp-container-foreground-color: hsla(230, 7%, 75%, 1.00);
  2763. --tp-groove-foreground-color: hsla(230, 7%, 75%, 0.10);
  2764. --tp-input-background-color: hsla(230, 7%, 75%, 0.10);
  2765. --tp-input-background-color-active: hsla(230, 7%, 75%, 0.25);
  2766. --tp-input-background-color-focus: hsla(230, 7%, 75%, 0.20);
  2767. --tp-input-background-color-hover: hsla(230, 7%, 75%, 0.15);
  2768. --tp-input-foreground-color: hsla(230, 7%, 75%, 1.00);
  2769. --tp-label-foreground-color: hsla(230, 7%, 75%, 0.70);
  2770. --tp-monitor-background-color: hsla(230, 7%, 0%, 0.20);
  2771. --tp-monitor-foreground-color: hsla(230, 7%, 75%, 0.70);`; break;
  2772. case ("icebergTheme"):
  2773. rootTheme = `
  2774. --tp-base-background-color: hsla(230, 20%, 11%, 1.00);
  2775. --tp-base-shadow-color: hsla(0, 0%, 0%, 0.2);
  2776. --tp-button-background-color: hsla(230, 10%, 80%, 1.00);
  2777. --tp-button-background-color-active: hsla(230, 10%, 95%, 1.00);
  2778. --tp-button-background-color-focus: hsla(230, 10%, 90%, 1.00);
  2779. --tp-button-background-color-hover: hsla(230, 10%, 85%, 1.00);
  2780. --tp-button-foreground-color: hsla(230, 20%, 11%, 1);
  2781. --tp-container-background-color: hsla(230, 25%, 16%, 1.00);
  2782. --tp-container-background-color-active: hsla(230, 25%, 31%, 1.00);
  2783. --tp-container-background-color-focus: hsla(230, 25%, 26%, 1.00);
  2784. --tp-container-background-color-hover: hsla(230, 25%, 21%, 1.00);
  2785. --tp-container-foreground-color: hsla(230, 10%, 80%, 1.00);
  2786. --tp-groove-foreground-color: hsla(230, 20%, 8%, 1.00);
  2787. --tp-input-background-color: hsla(230, 20%, 8%, 1.00);
  2788. --tp-input-background-color-active: hsla(230, 28%, 23%, 1.00);
  2789. --tp-input-background-color-focus: hsla(230, 28%, 18%, 1.00);
  2790. --tp-input-background-color-hover: hsla(230, 20%, 13%, 1.00);
  2791. --tp-input-foreground-color: hsla(230, 10%, 80%, 1.00);
  2792. --tp-label-foreground-color: hsla(230, 12%, 48%, 1.00);
  2793. --tp-monitor-background-color: hsla(230, 20%, 8%, 1.00);
  2794. --tp-monitor-foreground-color: hsla(230, 12%, 48%, 1.00);`; break;
  2795. case ("jetblackTheme"):
  2796. rootTheme = `
  2797. --tp-base-background-color: hsla(0, 0%, 0%, 1.00);
  2798. --tp-base-shadow-color: hsla(0, 0%, 0%, 0.2);
  2799. --tp-button-background-color: hsla(0, 0%, 70%, 1.00);
  2800. --tp-button-background-color-active: hsla(0, 0%, 85%, 1);
  2801. --tp-button-background-color-focus: hsla(0, 0%, 80%, 1.00);
  2802. --tp-button-background-color-hover: hsla(0, 0%, 75%, 1.00);
  2803. --tp-button-foreground-color: hsla(0, 0%, 0%, 1.00);
  2804. --tp-container-background-color: hsla(0, 0%, 10%, 1.00);
  2805. --tp-container-background-color-active: hsla(0, 0%, 25%, 1.00);
  2806. --tp-container-background-color-focus: hsla(0, 0%, 20%, 1.00);
  2807. --tp-container-background-color-hover: hsla(0, 0%, 15%, 1.00);
  2808. --tp-container-foreground-color: hsla(0, 0%, 50%, 1.00);
  2809. --tp-groove-foreground-color: hsla(0, 0%, 10%, 1.00);
  2810. --tp-input-background-color: hsla(0, 0%, 10%, 1.00);
  2811. --tp-input-background-color-active: hsla(0, 0%, 25%, 1.00);
  2812. --tp-input-background-color-focus: hsla(0, 0%, 20%, 1.00);
  2813. --tp-input-background-color-hover: hsla(0, 0%, 15%, 1.00);
  2814. --tp-input-foreground-color: hsla(0, 0%, 70%, 1.00);
  2815. --tp-label-foreground-color: hsla(0, 0%, 50%, 1.00);
  2816. --tp-monitor-background-color: hsla(0, 0%, 8%, 1.00);
  2817. --tp-monitor-foreground-color: hsla(0, 0%, 48%, 1.00);`; break;
  2818. case ("lightTheme"):
  2819. rootTheme = `
  2820. --tp-base-background-color: hsla(230, 5%, 90%, 1.00);
  2821. --tp-base-shadow-color: hsla(0, 0%, 0%, 0.10);
  2822. --tp-button-background-color: hsla(230, 7%, 75%, 1.00);
  2823. --tp-button-background-color-active: hsla(230, 7%, 60%, 1.00);
  2824. --tp-button-background-color-focus: hsla(230, 7%, 65%, 1.00);
  2825. --tp-button-background-color-hover: hsla(230, 7%, 70%, 1.00);
  2826. --tp-button-foreground-color: hsla(230, 10%, 30%, 1.00);
  2827. --tp-container-background-color: hsla(230, 15%, 30%, 0.20);
  2828. --tp-container-background-color-active: hsla(230, 15%, 30%, 0.32);
  2829. --tp-container-background-color-focus: hsla(230, 15%, 30%, 0.28);
  2830. --tp-container-background-color-hover: hsla(230, 15%, 30%, 0.24);
  2831. --tp-container-foreground-color: hsla(230, 10%, 30%, 1.00);
  2832. --tp-groove-foreground-color: hsla(230, 15%, 30%, 0.10);
  2833. --tp-input-background-color: hsla(230, 15%, 30%, 0.10);
  2834. --tp-input-background-color-active: hsla(230, 15%, 30%, 0.22);
  2835. --tp-input-background-color-focus: hsla(230, 15%, 30%, 0.18);
  2836. --tp-input-background-color-hover: hsla(230, 15%, 30%, 0.14);
  2837. --tp-input-foreground-color: hsla(230, 10%, 30%, 1.00);
  2838. --tp-label-foreground-color: hsla(230, 10%, 30%, 0.70);
  2839. --tp-monitor-background-color: hsla(230, 15%, 30%, 0.10);
  2840. --tp-monitor-foreground-color: hsla(230, 10%, 30%, 0.50);`; break;
  2841. case ("retroTheme"):
  2842. rootTheme = `
  2843. --tp-base-background-color: hsla(40, 3%, 90%, 1.00);
  2844. --tp-base-shadow-color: hsla(0, 0%, 0%, 0.30);
  2845. --tp-button-background-color: hsla(40, 3%, 70%, 1.00);
  2846. --tp-button-background-color-active: hsla(40, 3%, 55%, 1.00);
  2847. --tp-button-background-color-focus: hsla(40, 3%, 60%, 1.00);
  2848. --tp-button-background-color-hover: hsla(40, 3%, 65%, 1.00);
  2849. --tp-button-foreground-color: hsla(40, 3%, 20%, 1.00);
  2850. --tp-container-background-color: hsla(40, 3%, 70%, 1.00);
  2851. --tp-container-background-color-active: hsla(40, 3%, 55%, 1.00);
  2852. --tp-container-background-color-focus: hsla(40, 3%, 60%, 1.00);
  2853. --tp-container-background-color-hover: hsla(40, 3%, 65%, 1.00);
  2854. --tp-container-foreground-color: hsla(40, 3%, 20%, 1.00);
  2855. --tp-groove-foreground-color: hsla(40, 3%, 40%, 1.00);
  2856. --tp-input-background-color: hsla(120, 3%, 20%, 1.00);
  2857. --tp-input-background-color-active: hsla(120, 3%, 35%, 1.00);
  2858. --tp-input-background-color-focus: hsla(120, 3%, 30%, 1.00);
  2859. --tp-input-background-color-hover: hsla(120, 3%, 25%, 1.00);
  2860. --tp-input-foreground-color: hsla(120, 40%, 60%, 1.00);
  2861. --tp-label-foreground-color: hsla(40, 3%, 50%, 1.00);
  2862. --tp-monitor-background-color: hsla(120, 3%, 20%, 1.00);
  2863. --tp-monitor-foreground-color: hsla(120, 40%, 60%, 0.80);`; break;
  2864. case ("translucentTheme"):
  2865. rootTheme = `
  2866. --tp-base-background-color: hsla(0, 0%, 10%, 0.80);
  2867. --tp-base-shadow-color: hsla(0, 0%, 0%, 0.20);
  2868. --tp-button-background-color: hsla(0, 0%, 80%, 1.00);
  2869. --tp-button-background-color-active: hsla(0, 0%, 100%, 1.00);
  2870. --tp-button-background-color-focus: hsla(0, 0%, 95%, 1.00);
  2871. --tp-button-background-color-hover: hsla(0, 0%, 85%, 1.00);
  2872. --tp-button-foreground-color: hsla(0, 0%, 0%, 0.80);
  2873. --tp-container-background-color: hsla(0, 0%, 0%, 0.30);
  2874. --tp-container-background-color-active: hsla(0, 0%, 0%, 0.60);
  2875. --tp-container-background-color-focus: hsla(0, 0%, 0%, 0.50);
  2876. --tp-container-background-color-hover: hsla(0, 0%, 0%, 0.40);
  2877. --tp-container-foreground-color: hsla(0, 0%, 100%, 0.50);
  2878. --tp-groove-foreground-color: hsla(0, 0%, 0%, 0.20);
  2879. --tp-input-background-color: hsla(0, 0%, 0%, 0.30);
  2880. --tp-input-background-color-active: hsla(0, 0%, 0%, 0.60);
  2881. --tp-input-background-color-focus: hsla(0, 0%, 0%, 0.50);
  2882. --tp-input-background-color-hover: hsla(0, 0%, 0%, 0.40);
  2883. --tp-input-foreground-color: hsla(0, 0%, 100%, 0.50);
  2884. --tp-label-foreground-color: hsla(0, 0%, 100%, 0.50);
  2885. --tp-monitor-background-color: hsla(0, 0%, 0%, 0.30);
  2886. --tp-monitor-foreground-color: hsla(0, 0%, 100%, 0.30);`; break;
  2887. case ("statefarmerTheme"):
  2888. rootTheme = `
  2889. --tp-base-background-color: hsla(0, 80%, 40%, 1.00);
  2890. --tp-base-shadow-color: hsla(0, 0%, 0%, 0.2);
  2891. --tp-button-background-color: hsla(0, 0%, 100%, 1.00);
  2892. --tp-button-background-color-active: hsla(0, 0%, 85%, 1.00);
  2893. --tp-button-background-color-focus: hsla(0, 0%, 90%, 1.00);
  2894. --tp-button-background-color-hover: hsla(0, 0%, 95%, 1.00);
  2895. --tp-button-foreground-color: hsla(230, 20%, 11%, 1.00);
  2896. --tp-container-background-color: hsla(0, 0%, 0%, 0.20);
  2897. --tp-container-background-color-active: hsla(0, 0%, 0%, 0.35);
  2898. --tp-container-background-color-focus: hsla(0, 0%, 0%, 0.30);
  2899. --tp-container-background-color-hover: hsla(0, 0%, 0%, 0.25);
  2900. --tp-container-foreground-color: hsla(0, 0%, 100%, 0.90);
  2901. --tp-groove-foreground-color: hsla(0, 0%, 0%, 0.50);
  2902. --tp-input-background-color: hsla(0, 0%, 0%, 0.50);
  2903. --tp-input-background-color-active: hsla(0, 0%, 0%, 0.65);
  2904. --tp-input-background-color-focus: hsla(0, 0%, 0%, 0.60);
  2905. --tp-input-background-color-hover: hsla(0, 0%, 0%, 0.55);
  2906. --tp-input-foreground-color: hsla(0, 0%, 100%, 0.90);
  2907. --tp-label-foreground-color: hsla(0, 0%, 100%, 0.90);
  2908. --tp-monitor-background-color: hsla(0, 0%, 0%, 0.50);
  2909. --tp-monitor-foreground-color: hsla(0, 0%, 100%, 0.50);`; break;
  2910. case ("blurpleTheme"):
  2911. rootTheme = `
  2912. --tp-base-background-color: hsla(255, 68%, 39%, 1.00);
  2913. --tp-base-shadow-color: hsla(0, 0%, 0%, 0.2);
  2914. --tp-button-background-color: hsla(0, 0%, 100%, 1.00);
  2915. --tp-button-background-color-active: hsla(0, 0%, 85%, 1.00);
  2916. --tp-button-background-color-focus: hsla(0, 0%, 90%, 1.00);
  2917. --tp-button-background-color-hover: hsla(0, 0%, 95%, 1.00);
  2918. --tp-button-foreground-color: hsla(230, 20%, 11%, 1.00);
  2919. --tp-container-background-color: hsla(0, 0%, 0%, 0.20);
  2920. --tp-container-background-color-active: hsla(0, 0%, 0%, 0.35);
  2921. --tp-container-background-color-focus: hsla(0, 0%, 0%, 0.30);
  2922. --tp-container-background-color-hover: hsla(0, 0%, 0%, 0.25);
  2923. --tp-container-foreground-color: hsla(0, 0%, 100%, 0.90);
  2924. --tp-groove-foreground-color: hsla(0, 0%, 0%, 0.50);
  2925. --tp-input-background-color: hsla(0, 0%, 0%, 0.50);
  2926. --tp-input-background-color-active: hsla(0, 0%, 0%, 0.65);
  2927. --tp-input-background-color-focus: hsla(0, 0%, 0%, 0.60);
  2928. --tp-input-background-color-hover: hsla(0, 0%, 0%, 0.55);
  2929. --tp-input-foreground-color: hsla(0, 0%, 100%, 0.90);
  2930. --tp-label-foreground-color: hsla(0, 0%, 100%, 0.90);
  2931. --tp-monitor-background-color: hsla(0, 0%, 0%, 0.50);
  2932. --tp-monitor-foreground-color: hsla(0, 0%, 100%, 0.50);`; break;
  2933. case ("shellFarmTheme"):
  2934. rootTheme = `
  2935. --tp-base-background-color: hsla(198, 100%, 50%, 1.00);
  2936. --tp-base-shadow-color: hsla(0, 0%, 0%, 0.2);
  2937. --tp-button-background-color: hsla(0, 0%, 100%, 1.00);
  2938. --tp-button-background-color-active: hsla(0, 0%, 85%, 1.00);
  2939. --tp-button-background-color-focus: hsla(0, 0%, 90%, 1.00);
  2940. --tp-button-background-color-hover: hsla(0, 0%, 95%, 1.00);
  2941. --tp-button-foreground-color: hsla(230, 20%, 11%, 1.00);
  2942. --tp-container-background-color: hsla(0, 0%, 0%, 0.20);
  2943. --tp-container-background-color-active: hsla(0, 0%, 0%, 0.35);
  2944. --tp-container-background-color-focus: hsla(0, 0%, 0%, 0.30);
  2945. --tp-container-background-color-hover: hsla(0, 0%, 0%, 0.25);
  2946. --tp-container-foreground-color: hsla(0, 0%, 100%, 0.90);
  2947. --tp-groove-foreground-color: hsla(0, 0%, 0%, 0.50);
  2948. --tp-input-background-color: hsla(0, 0%, 0%, 0.50);
  2949. --tp-input-background-color-active: hsla(0, 0%, 0%, 0.65);
  2950. --tp-input-background-color-focus: hsla(0, 0%, 0%, 0.60);
  2951. --tp-input-background-color-hover: hsla(0, 0%, 0%, 0.55);
  2952. --tp-input-foreground-color: hsla(0, 0%, 100%, 0.90);
  2953. --tp-label-foreground-color: hsla(0, 0%, 100%, 0.90);
  2954. --tp-monitor-background-color: hsla(0, 0%, 0%, 0.50);
  2955. --tp-monitor-foreground-color: hsla(0, 0%, 100%, 0.50);`; break;
  2956. };
  2957.  
  2958. //menu customisation (apply font, button widths, adjust checkbox right slightly, make menu appear on top, add anim to message)
  2959. const styleElement = document.createElement('style');
  2960. styleElement.textContent = `
  2961. :root { ${rootTheme} }
  2962. `;
  2963. document.head.appendChild(styleElement);
  2964. };
  2965. const temp = document.createElement('div');
  2966. temp.innerHTML = `
  2967. <style>
  2968. .notif {
  2969. position: absolute;
  2970. border: 5px solid lightblue;
  2971. left: 70%;
  2972. top: 85%;
  2973. transform: translate(-50%, -50%);
  2974. display: flex;
  2975. align-items: center;
  2976. justify-content: center;
  2977. color: #fff;
  2978. text-align: center;
  2979. background: rgba(0, 0, 0, 0.6);
  2980. font-weight: bolder;
  2981. padding: 15px;
  2982. z-index: 999999;
  2983. border-radius: 2vw;
  2984. overflow: auto;
  2985. resize: both;
  2986. backdrop-filter: blur(4px);
  2987. overflow: hidden;
  2988. min-width: 10vw;
  2989. min-height: 4vh;
  2990. pointer-events: none;
  2991. }
  2992. .MiniMap {
  2993. position: absolute;
  2994. left: 50%;
  2995. top: 50%;
  2996. transform: translate(-50%, -50%);
  2997. width: 1000px;
  2998. height:1000px;
  2999. display: flex;
  3000. align-items: center;
  3001. justify-content: center;
  3002. color: #fff;
  3003. text-align: center;
  3004. background: rgba(0, 0, 0, 0);
  3005. font-weight: bolder;
  3006. padding: 15px;
  3007. z-index: 999999;
  3008. border-radius: 2vw;
  3009. overflow: auto;
  3010. overflow: hidden;
  3011. pointer-events: none;
  3012. }
  3013. .playerDot {
  3014. position: absolute;
  3015. width: 0;
  3016. height: 0;
  3017. border-left: 10px solid transparent;
  3018. border-right: 10px solid transparent;
  3019. border-bottom: 20px solid green;
  3020. color: white;
  3021. transform: translate(-50%, -50%);
  3022. z-index: 999999;
  3023. }
  3024. </style>
  3025. <div id = "minimap" class="MiniMap"></div>
  3026. <div id = "playerDot" class="playerDot">playerdot</div>
  3027. `;
  3028. const mapEl = temp.querySelector('.MiniMap');
  3029. let myPlayerDot = temp.querySelector('.playerDot');
  3030. const playerDotsMap = new Map();
  3031. window.addEventListener('DOMContentLoaded', async function () {
  3032. while (temp.children.length > 0) {
  3033. document.body.appendChild(temp.children[0]);
  3034. }
  3035. });
  3036. function updateRadar(player, myPlayer) {
  3037. const windowWidth = window.innerWidth;
  3038. const windowHeight = window.innerHeight;
  3039. // Check if a player dot with the unique ID already exists, then do flow of control
  3040. let xPosition = (player[H.x] / 100) * windowWidth; xPosition += (windowWidth + xPosition) / 2;
  3041. let yPosition = (player[H.z] / 100) * windowHeight; yPosition += (windowHeight + yPosition) / 2;
  3042. if (!player[H.playing] || !player) {
  3043. if (playerDotsMap.has(player.uniqueId)) {
  3044. const playerDotToRemove = playerDotsMap.get(player.uniqueId);
  3045. mapEl.removeChild(playerDotToRemove); // Remove the dot from the DOM
  3046. playerDotsMap.delete(player.uniqueId); // Remove the dot from the map
  3047. };
  3048. } else if (player === myPlayer) {
  3049. myPlayerDot.style.left = `${xPosition}px`;
  3050. myPlayerDot.style.top = `${yPosition}px`;
  3051. myPlayerDot.textContent = myPlayer.name;
  3052. myPlayerDot.style.transform = 'translate(-50%, -50%) rotate(' + yawToDeg(player[H.yaw]) + 'deg)';
  3053. } else if (playerDotsMap.has(player.uniqueId)) {
  3054. // If it exists, update its position
  3055. const existingPlayerDot = playerDotsMap.get(player.uniqueId);
  3056. existingPlayerDot.style.left = `${xPosition}px`;
  3057. existingPlayerDot.style.top = `${yPosition}px`;
  3058. //existingPlayerDot.style.transform = 'translate(-50%, -50%) rotate(' + yawToDeg(player[H.yaw]) + 'deg)'; // could uncomment but then names unreadable,
  3059. } else {
  3060. // If it doesn't exist, create a new player dot element
  3061. const newPlayerDot = document.createElement('div');
  3062. newPlayerDot.className = 'playerDot';
  3063. newPlayerDot.style.border = player.team === 1 ? '5px solid blue' : '5px solid red';
  3064.  
  3065. newPlayerDot.style.left = `${xPosition}px`;
  3066. newPlayerDot.style.top = `${yPosition}px`;
  3067. newPlayerDot.textContent = player.name;
  3068. // append to the MiniMap element, for later purposes once we can set inside the element instead
  3069. mapEl.appendChild(newPlayerDot);
  3070.  
  3071. // Store in the Map
  3072. playerDotsMap.set(player.uniqueId, newPlayerDot);
  3073. };
  3074. };
  3075. function yawToDeg(yaw) {
  3076. let yaw_degrees = yaw * 180.0 / Math.PI; // conversion to degrees
  3077. if (yaw_degrees < 0) yaw_degrees += 360.0; // convert negative to positive angles
  3078. return yaw_degrees;
  3079. };
  3080. const hslToRgb = function(h, s, l) {
  3081. var r, g, b;
  3082. if (s === 0) {
  3083. r = g = b = l;
  3084. } else {
  3085. function hue2rgb(p, q, t) {
  3086. if (t < 0) t += 1;
  3087. if (t > 1) t -= 1;
  3088. if (t < 1 / 6) return p + (q - p) * 6 * t;
  3089. if (t < 1 / 2) return q;
  3090. if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
  3091. return p;
  3092. };
  3093. var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
  3094. var p = 2 * l - q;
  3095. r = hue2rgb(p, q, h + 1 / 3);
  3096. g = hue2rgb(p, q, h);
  3097. b = hue2rgb(p, q, h - 1 / 3);
  3098. };
  3099. return new L.BABYLON.Color3(r, g, b);
  3100. };
  3101. /**
  3102. *
  3103. * @param {String} colorSelectName name of the color module. Will be used for extract. EG. aimbotColor
  3104. * @param {String} isRainbowName name of the rainbow checkbox mod. Will be used for extract.
  3105. */
  3106. const getColor = function (colorSelectName, isRainbowName) {
  3107. //non rainbow
  3108. if (!extract(isRainbowName)) return extract(colorSelectName);
  3109. //rainbow
  3110. const time = Date.now();
  3111. const r = (time % 1000) / 1000;
  3112. const g = (time % 2000) / 2000;
  3113. const b = (time % 3000) / 3000;
  3114. const rS = time % 2000 < 1000 ? 1 - r : r;
  3115. const gS = time % 4000 < 2000 ? 1 - g : g;
  3116. const bS = time % 6000 < 3000 ? 1 - b : b;
  3117. const rF = Math.round(rS * 255);
  3118. const gF = Math.round(gS * 255);
  3119. const bF = Math.round(bS * 255);
  3120. //hacky bc it's prob gonna get converted back to rgb but not gonna rewrite color code................................
  3121. const componentToHex = (c) => {
  3122. var hex = c.toString(16);
  3123. return hex.length == 1 ? "0" + hex : hex;
  3124. };
  3125. const rgbToHex = (r, g, b) => {
  3126. return "#" + componentToHex(r) + componentToHex(g) + componentToHex(b);
  3127. };
  3128. return rgbToHex(rF, gF, bF);
  3129. };
  3130. const applyStateFarmLogo = function () {
  3131. if (extract("replaceLogo")) {
  3132. const images = document.getElementsByTagName('img');
  3133. let imgURL = replacementLogoURL;
  3134. const month = new Date().getMonth();
  3135. if (replacementLogoHalloweenURL && replacementLogoHalloweenURL !== "" && month == 9) imgURL = replacementLogoHalloweenURL;
  3136. if (replacementLogoChristmasURL && replacementLogoChristmasURL !== "" && month == 11) imgURL = replacementLogoChristmasURL;
  3137. if (replacementLogoNewYearsURL && replacementLogoNewYearsURL !== "" && month == 0) imgURL = replacementLogoNewYearsURL;
  3138. for (let i = 0; i < images.length; i++) {
  3139. const src = images[i].getAttribute('src');
  3140. if (src && src.includes('img/logo.svg')) {
  3141. images[i].setAttribute('src', imgURL);
  3142. };
  3143. };
  3144. const logoDiv = document.getElementById('logo');
  3145. if (logoDiv) {
  3146. const logoImg = logoDiv.querySelector('img');
  3147. if (logoImg) {
  3148. logoImg.setAttribute('src', imgURL);
  3149. logoImg.setAttribute('width', 300);
  3150. logoImg.setAttribute('height', 104);
  3151. };
  3152. };
  3153. };
  3154. };
  3155. //1337 H4X
  3156. const getSearchParam = function (param) {
  3157. const queryParams = new URLSearchParams(unsafeWindow.location.search);
  3158. return queryParams.get(param);
  3159. };
  3160. const fetchTextContent = function (url) {
  3161. try {
  3162. var xhr = new XMLHttpRequest();
  3163. xhr.open('GET', url, false);
  3164. xhr.send();
  3165. if (xhr.status === 200) {
  3166. return xhr.responseText;
  3167. } else {
  3168. console.error("Error fetching " + url);
  3169. return null;
  3170. };
  3171. } catch (err) {
  3172. return null
  3173. };
  3174. };
  3175. const findKeyByValue = function (obj, value) {
  3176. for (const key in obj) {
  3177. if (obj[key] === value) {
  3178. return key;
  3179. };
  3180. };
  3181. return null; // Return null if the value is not found
  3182. };
  3183. const newProxy = function () {
  3184. unsafeWindow.location.replace(unsafeWindow.location.href.replace(unsafeWindow.location.hostname, proxyList[3]));
  3185. };
  3186. const unban = function () {
  3187. log("STATEFARM UNBANNING...");
  3188. updateAccountRecords();
  3189. unsafeWindow.extern.signOut();
  3190. accountStatus = "logged out";
  3191. setTimeout(() => {
  3192. const banPopup = document.getElementById("bannedPopup");
  3193. if (banPopup) { banPopup.style.display = 'none' }; //hide it
  3194. }, 10000);
  3195. };
  3196. const reloadPage = function () {
  3197. unsafeWindow.location.reload(true);
  3198. };
  3199. const spamReport = function () {
  3200. (async function () {
  3201. const sleep = function (ms) {
  3202. return new Promise(resolve => setTimeout(resolve, ms));
  3203. };
  3204. let playerList = document.getElementById("playerList").children;
  3205. for (let i = 0; i < playerList.length; i++) {
  3206. playerList[i].click();
  3207. await sleep(400);
  3208. document.getElementsByClassName("ss_button btn_medium btn_red bevel_red")[0].click();
  3209. await sleep(400);
  3210. document.getElementsByClassName("ss_checkbox label")[randomInt(0, 3)].click();
  3211. await sleep(400);
  3212. document.getElementsByClassName("ss_button btn_medium btn_green bevel_green")[0].click();
  3213. await sleep(400);
  3214. document.getElementById("genericPopup").children[2].children[1].click();
  3215. };
  3216. })();
  3217. };
  3218.  
  3219. const broadcastToBots = function (command) {
  3220. const commandTime = Date.now();
  3221. log("StateFarm: sending command to bots:", command, "| at time:", commandTime);
  3222. GM_setValue("StateFarm_Command", command);
  3223. GM_setValue("StateFarm_CommandTime", commandTime);
  3224. };
  3225.  
  3226. const hexToRgb = function (hex) {
  3227. hex = hex.replace(/^#/, '');
  3228. const bigint = parseInt(hex, 16);
  3229. const r = (bigint >> 16) & 255;
  3230. const g = (bigint >> 8) & 255;
  3231. const b = bigint & 255;
  3232. return [r / 255, g / 255, b / 255];
  3233. };
  3234. const fadeBetweenColors = function (color1, color2, progress) {
  3235. const rgb1 = hexToRgb(color1);
  3236. const rgb2 = hexToRgb(color2);
  3237. const resultRgb = [
  3238. rgb1[0] + (rgb2[0] - rgb1[0]) * progress,
  3239. rgb1[1] + (rgb2[1] - rgb1[1]) * progress,
  3240. rgb1[2] + (rgb2[2] - rgb1[2]) * progress
  3241. ];
  3242. return resultRgb;
  3243. };
  3244. const distancePlayers = function (player, yMultiplier) {
  3245. if (player && player[H.actor] && player[H.actor][H.mesh]) {
  3246. yMultiplier = yMultiplier || 1;
  3247. let vector = getDirectionVectorFacingTarget(player);
  3248. return Math.hypot(vector.x, vector.y * yMultiplier, vector.z); //pythagoras' theorem in 3 dimensions. no one owns maths, zert.
  3249. } else log("fuck2", player); return 0;
  3250. };
  3251. const setPrecision = function (value) { return Math.round(value * 8192) / 8192 }; //required precision
  3252. const calculateYaw = function (pos) {
  3253. return setPrecision(Math.mod(Math.atan2(pos.x, pos.z), Math.PI2));
  3254. };
  3255. const calculatePitch = function (pos) {
  3256. return setPrecision(-Math.atan2(pos.y, Math.hypot(pos.x, pos.z)) % 1.5);
  3257. };
  3258. const getAngularDifference = function (obj1, obj2) { //this is super scuffed
  3259. return Math.abs(obj1[H.yaw] - obj2.yawReal) + Math.abs(obj1[H.pitch] - obj2.pitchReal);
  3260. };
  3261. const getDirectionVectorFacingTarget = function (target, vectorPassed, offsetY) {
  3262. if (vectorPassed || (target && target[H.actor] && target[H.actor][H.mesh])) { //in case of zizzy's weird error
  3263. target = vectorPassed ? target : target[H.actor][H.mesh].position;
  3264. offsetY = offsetY || 0;
  3265. return {
  3266. x: - (target.x - ss.MYPLAYER[H.actor][H.mesh].position.x),
  3267. y: - (target.y - ss.MYPLAYER[H.actor][H.mesh].position.y + offsetY),
  3268. z: - (target.z - ss.MYPLAYER[H.actor][H.mesh].position.z),
  3269. };
  3270. } else { //we really dont want this happening tho
  3271. log("fuck");
  3272. // log(vectorPassed);
  3273. // log(target);
  3274. // console.trace();
  3275. return {
  3276. x: 0,
  3277. y: 0,
  3278. z: 0,
  3279. };
  3280. };
  3281. };
  3282. const deg2rad = function (deg) {
  3283. return deg * (Math.PI / 180);
  3284. };
  3285. const reverseString = function (str) { return str.split("").reverse().join("") };
  3286. const isPartialMatch = function (array, searchString) {
  3287. return array.some(item => item !== "" && searchString.toLowerCase().includes(item.toLowerCase()));
  3288. };
  3289. const findBadgesForUsername = function(username) {
  3290. let found = [];
  3291. if (badgeList && username) {
  3292. username = username.toLowerCase().replaceAll("_","").replaceAll(" ","");
  3293. for (const [key, userList] of Object.entries(badgeList)) {
  3294. for (const user of userList) {
  3295. if (username.includes(user.toLowerCase())) {
  3296. found.push(key);
  3297. };
  3298. };
  3299. };
  3300. };
  3301. return found;
  3302. };
  3303.  
  3304. const playAudio = function (name, panner, contextName) {
  3305. contextName = findStringInLists(divertContexts, name) || "OTHER"+randomInt(1,9)
  3306. let audioContext;
  3307. audioContext = audioContexts[contextName];
  3308. let source = audioContext.createBufferSource();
  3309. source.buffer = soundsSFC[name];
  3310.  
  3311. const newPanner = audioContext.createPanner();
  3312. audioContext.listener.setPosition(0, 0, 0);
  3313.  
  3314. if (panner) {
  3315. newPanner.context.listener.setPosition(panner.context.listener.positionX.value, panner.context.listener.positionY.value, panner.context.listener.positionZ.value);
  3316. newPanner.setPosition(
  3317. panner.context.listener.positionX.value - ((panner.context.listener.positionX.value - panner.positionX.value) * extract("distanceMult")),
  3318. panner.context.listener.positionY.value - ((panner.context.listener.positionY.value - panner.positionY.value) * extract("distanceMult")),
  3319. panner.context.listener.positionZ.value - ((panner.context.listener.positionZ.value - panner.positionZ.value) * extract("distanceMult")),
  3320. );
  3321. newPanner.setOrientation(panner.orientationX.value, panner.orientationY.value, panner.orientationZ.value);
  3322. newPanner.refDistance = panner.refDistance;
  3323. newPanner.maxDistance = panner.maxDistance;
  3324. newPanner.rolloffFactor = panner.rolloffFactor;
  3325. newPanner.coneInnerAngle = panner.coneInnerAngle;
  3326. newPanner.coneOuterAngle = panner.coneOuterAngle;
  3327. newPanner.coneOuterGain = panner.coneOuterGain;
  3328. };
  3329. if (audioContext.state === 'suspended') {
  3330. audioContext.resume();
  3331. };
  3332. // log(contextName);
  3333. source.connect(newPanner);
  3334. newPanner.connect(audioContext.destination);
  3335. source.start();
  3336. };
  3337. const playerMatchesList = function (array, player) {
  3338. let nameMatched = isPartialMatch(array, player.name);
  3339. let idMatched = isPartialMatch(array, player.uniqueId);
  3340. return nameMatched || idMatched;
  3341. };
  3342. const randomInt = function (min, max) {
  3343. return Math.floor(Math.random() * (max - min + 1)) + min;
  3344. };
  3345. const radianAngleDiff = function (angle1, angle2) {
  3346. const fullCircle = 2 * Math.PI;
  3347. // Normalize angles to be within [0, 2π)
  3348. angle1 = (angle1 % fullCircle + fullCircle) % fullCircle;
  3349. angle2 = (angle2 % fullCircle + fullCircle) % fullCircle;
  3350. // Find the absolute angular difference
  3351. let diff = Math.abs(angle1 - angle2);
  3352. // Ensure the difference is within [0, π)
  3353. diff = Math.min(diff, fullCircle - diff);
  3354. // Determine the sign of the difference correctly
  3355. if ((angle1 - angle2 + fullCircle) % fullCircle > Math.PI) {
  3356. return -diff;
  3357. } else {
  3358. return diff;
  3359. };
  3360. };
  3361. clientID = (getScrambled() + "noID");
  3362. const createAnonFunction = function (name, func) {
  3363. const funcName = getScrambled();
  3364. unsafeWindow[funcName] = func;
  3365. unsafeWindow[funcName] = function () {
  3366. try {
  3367. return func.apply(this, arguments);
  3368. } catch (error) {
  3369. log("Error in anonymous function:", error);
  3370. }
  3371. };
  3372. F[name] = unsafeWindow[funcName];
  3373. functionNames[name] = funcName
  3374. };
  3375. const processChatItem = function (text, playerName, playerTeam, highlightColor) {
  3376. let chatItem = document.createElement("div");
  3377. let playerNameSpan = document.createElement("span");
  3378. let playerInfoContainer = document.createElement("div");
  3379. let serverIcon = document.createElement("i");
  3380.  
  3381. chatItem.classList.add("chat-item");
  3382. playerInfoContainer.style.display = "inline-block";
  3383.  
  3384. playerNameSpan.classList.add("chat-player-name", "ss_marginright_xs");
  3385. playerNameSpan.textContent = playerName + " ";
  3386.  
  3387. playerInfoContainer.style.color = ss.teamColors.text[playerTeam];
  3388. playerInfoContainer.appendChild(serverIcon);
  3389. playerInfoContainer.appendChild(playerNameSpan);
  3390.  
  3391. let messageSpan = document.createElement("span");
  3392. messageSpan.innerHTML = text;
  3393. chatItem.style.fontStyle = "italic";
  3394. messageSpan.style.backgroundColor = highlightColor;
  3395. playerInfoContainer.style.backgroundColor = highlightColor;
  3396.  
  3397. chatItem.appendChild(playerInfoContainer);
  3398. chatItem.appendChild(messageSpan);
  3399.  
  3400. document.getElementById("chatOut").appendChild(chatItem);
  3401.  
  3402. if (document.querySelector(".chat-container")) {
  3403. document.querySelector(".chat-container").scrollTop = document.querySelector(".chat-container").scrollHeight;
  3404. };
  3405. };
  3406.  
  3407. var vertexVector1, vertexVector2, vertexVector3, vertexVector4, vertexVector5, vertexVector6, vertexVector7, vertexVector8;
  3408. const updateOrCreateLinesESP = function (object, type, color) {
  3409. let newPosition, newScene, newParent
  3410. if (type == "playerESP") {
  3411. newPosition = object[H.actor][H.mesh].position;
  3412. newScene = object[H.actor].scene;
  3413. newParent = object[H.actor][H.mesh];
  3414. } else if (type == "pPredESP") { //objects will be player.pred, object of BABYLON.TransformNode. https://doc.babylonjs.com/typedoc/classes/BABYLON.TransformNode
  3415. newPosition = object.getAbsolutePosition(); //we now use the TN's absolutePosition instead of an own var. It's just cleaner this way imo
  3416. newScene = object.getScene(); //getters, yummy
  3417. newParent = object; //will be the TransformNode stored in player.pred, so we can keep this as parent.
  3418. } else {
  3419. newPosition = object.position;
  3420. newScene = object._scene;
  3421. newParent = object;
  3422. };
  3423. if (!object.generatedESP) {
  3424. //tracers
  3425. const tracerLines = L.BABYLON.MeshBuilder.CreateLines("tracerLines", { points: [newPosition, crosshairsPosition] }, newScene);
  3426. tracerLines.color = new L.BABYLON.Color3(1, 1, 1);
  3427. tracerLines.renderingGroupId = 1;
  3428. object.tracerLines = tracerLines;
  3429. //ESP
  3430. //FUCK WIREFRAME BOXES! LIBERTYMUTUAL dictates we making our own MANUALLY bitch! to hell with those diagonal lines
  3431. const boxSize = {
  3432. playerESP: { width: 0.5, height: 0.75, depth: 0.5 },
  3433. pPredESP: { width: 0.5, height: 0.75, depth: 0.5 },
  3434. ammoESP: { width: 0.25, height: 0.35, depth: 0.25 },
  3435. };
  3436. const boxOffset = {
  3437. playerESP: 0,
  3438. pPredESP: 0,
  3439. ammoESP: -0.05,
  3440. };
  3441. vertexVector1 = vertexVector1 || new L.BABYLON.Vector3(0, 0, 0);
  3442. vertexVector1.x = -boxSize[type].width / 2; vertexVector1.y = boxOffset[type]; vertexVector1.z = -boxSize[type].depth / 2;
  3443.  
  3444. vertexVector2 = vertexVector2 || new L.BABYLON.Vector3(0, 0, 0);
  3445. vertexVector2.x = boxSize[type].width / 2; vertexVector2.y = boxOffset[type]; vertexVector2.z = -boxSize[type].depth / 2;
  3446.  
  3447. vertexVector3 = vertexVector3 || new L.BABYLON.Vector3(0, 0, 0);
  3448. vertexVector3.x = boxSize[type].width / 2; vertexVector3.y = boxOffset[type] + boxSize[type].height; vertexVector3.z = -boxSize[type].depth / 2;
  3449.  
  3450. vertexVector4 = vertexVector4 || new L.BABYLON.Vector3(0, 0, 0);
  3451. vertexVector4.x = -boxSize[type].width / 2; vertexVector4.y = boxOffset[type] + boxSize[type].height; vertexVector4.z = -boxSize[type].depth / 2;
  3452.  
  3453. vertexVector5 = vertexVector5 || new L.BABYLON.Vector3(0, 0, 0);
  3454. vertexVector5.x = -boxSize[type].width / 2; vertexVector5.y = boxOffset[type]; vertexVector5.z = boxSize[type].depth / 2;
  3455.  
  3456. vertexVector6 = vertexVector6 || new L.BABYLON.Vector3(0, 0, 0);
  3457. vertexVector6.x = boxSize[type].width / 2; vertexVector6.y = boxOffset[type]; vertexVector6.z = boxSize[type].depth / 2;
  3458.  
  3459. vertexVector7 = vertexVector7 || new L.BABYLON.Vector3(0, 0, 0);
  3460. vertexVector7.x = boxSize[type].width / 2; vertexVector7.y = boxOffset[type] + boxSize[type].height; vertexVector7.z = boxSize[type].depth / 2;
  3461.  
  3462. vertexVector8 = vertexVector8 || new L.BABYLON.Vector3(0, 0, 0);
  3463. vertexVector8.x = -boxSize[type].width / 2; vertexVector8.y = boxOffset[type] + boxSize[type].height; vertexVector8.z = boxSize[type].depth / 2;
  3464.  
  3465. const vertices = [
  3466. vertexVector1,
  3467. vertexVector2,
  3468. vertexVector3,
  3469. vertexVector4,
  3470. vertexVector5,
  3471. vertexVector6,
  3472. vertexVector7,
  3473. vertexVector8
  3474. ];
  3475. const lines = [];
  3476. for (let i = 0; i < 4; i++) {
  3477. lines.push([vertices[i], vertices[(i + 1) % 4]]);
  3478. lines.push([vertices[i + 4], vertices[(i + 1) % 4 + 4]]);
  3479. lines.push([vertices[i], vertices[i + 4]]);
  3480. };
  3481. const box = L.BABYLON.MeshBuilder.CreateLineSystem(getScrambled(), { lines }, newScene);
  3482. box.color = new L.BABYLON.Color3(1, 1, 1);
  3483. box.position.y = boxOffset[type];
  3484. box.renderingGroupId = 1;
  3485. box.parent = newParent;
  3486. object.box = box;
  3487. //TARGETS
  3488. let target;
  3489. if (type == "playerESP") {
  3490. target = L.BABYLON.MeshBuilder.CreateSphere(getScrambled(), { diameter: 0.05 }, newScene);
  3491. target.material = new L.BABYLON.StandardMaterial(getScrambled(), newScene);
  3492. target.material.diffuseColor = new L.BABYLON.Color3(1, 0, 0);
  3493. target.material.alpha = 0.5;
  3494. target.position.y = 0.3;
  3495. target.renderingGroupId = 1;
  3496. target.parent = newParent;
  3497. object.target = target;
  3498. };
  3499. /*---fwltv2---*/
  3500. if (type == "playerESP"){
  3501. //create line. other shit later
  3502. 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
  3503. //l.renderingGroupId = 1;
  3504.  
  3505. object.lookDirLine = l;
  3506. //line will be updated every call, not just creation. I hate this but fuck you
  3507. }
  3508. /*----------------------*/
  3509. //stuff
  3510. object.generatedESP = true;
  3511. ESPArray.push([object, tracerLines, box, target, object.lookDirLine]);
  3512. };
  3513. if (object.lookDirLine && extract("lookTracers")){ //no need to update if module disabled. Raycasts aren't the best thing to run every frame without any use...
  3514. const TRACE_LENGTH_MULTIPLIER = 75; //how long is the trace max?
  3515. 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.
  3516.  
  3517. let conclusion /*:trol:*/ = playerEye.forward.clone(); // BABYLON.Vector3 (https://doc.babylonjs.com/typedoc/classes/BABYLON.Vector3). this vector is NORMALIZED
  3518. conclusion= conclusion.scale(TRACE_LENGTH_MULTIPLIER); //scale by the multiplier to extend the normalized vector. TODO: make multiplier customizable by USER
  3519. conclusion= conclusion.add(playerEye.absolutePosition); //add pos so we are relative to eye
  3520.  
  3521. //RAYCAST
  3522. const rayToGround = ss.RAYS[H.rayCollidesWithMap](object[H.actor].eye.absolutePosition, conclusion, ss.RAYS.grenadeCollidesWithCell); //does player look at object, if yes, where?
  3523. const g = playerEye.absolutePosition; //easier access
  3524. // console.log("RAYCAST", g, g.x, g._x)
  3525. if(rayToGround){
  3526. 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]);
  3527. //set line to correct points, with the map collision as endpoint
  3528. }
  3529. if(!rayToGround){
  3530. const f = conclusion;//easier acess
  3531. object.lookDirLine.setVerticesData(L.BABYLON.VertexBuffer.PositionKind, [g.x, g.y, g.z, f.x, f.y, f.z]);
  3532. //set line to correct points, with the max dist scaled dirVec3 as endpoint
  3533. }
  3534.  
  3535. object.lookDirLine.color = new L.BABYLON.Color3(...hexToRgb(extract("lookTracersColor"))); //updaté line colo(u)r
  3536. object.lookDirLine.renderingGroupId = extract("lookTracersRGI1")? 1 : 0; //render in front shell?
  3537. //I dont really like the implementation without parenting, but IDK how the fuck bab's parenting system works and we need to update anyway. :/
  3538. }
  3539. object.tracerLines.setVerticesData(L.BABYLON.VertexBuffer.PositionKind, [crosshairsPosition.x, crosshairsPosition.y, crosshairsPosition.z, newPosition.x, newPosition.y, newPosition.z]);
  3540. object.tracerLines.color = new L.BABYLON.Color3(...color);
  3541. object.box.color = new L.BABYLON.Color3(...color);
  3542. };
  3543.  
  3544. const obfuscateEmail = function(email) {
  3545. const parts = email.split('@');
  3546. const modifiedFirstPart = parts[0].substring(0, 1) +
  3547. parts[0].substring(1, parts[0].length - 1).replace(/./g, '*') +
  3548. parts[0].substring(parts[0].length - 1);
  3549. return modifiedFirstPart + '@' + parts[1];
  3550. };
  3551. const updateAccountRecords = function(key, value) {
  3552. let currentEmail = load("MostRecentEmail");
  3553. let maskedEmail = unsafeWindow.extern.account.maskedEmail;
  3554. if (currentEmail && obfuscateEmail(currentEmail) == maskedEmail) {
  3555. log("no change in email");
  3556. //do nothing i guess. its good.
  3557. } else {
  3558. log("not using obfuscated email (sadly)");
  3559. currentEmail = maskedEmail; //better than nothing, eh? :<
  3560. };
  3561. log("the email is:", currentEmail);
  3562.  
  3563. let accountRecords = GM_getValue("StateFarm_AccountRecords") || {};
  3564. let tierCache = GM_getValue("StateFarm_TierCache") || {};
  3565.  
  3566. let accountDetails = accountRecords[currentEmail] || {};
  3567. accountDetails.inventory = JSON.parse(JSON.stringify(unsafeWindow.extern.account.inventory));
  3568. accountDetails.eggCount = unsafeWindow.extern.account.currentBalance;
  3569. delete accountDetails.inventoryWorth;
  3570. accountDetails.dateCreated = unsafeWindow.extern.account.dateCreated;
  3571. accountDetails.eggsSpent = unsafeWindow.extern.account.eggsSpent;
  3572. accountDetails.totalWorth = accountDetails.eggCount + accountDetails.eggsSpent;
  3573. accountDetails.inventoryList = [];
  3574. accountDetails.inventory.forEach(item => {
  3575. let itemName = item.name;
  3576. if (tierCache[itemName] !== undefined) itemName = itemName+" [T"+tierCache[itemName]+"]";
  3577. accountDetails.inventoryList.push(itemName);
  3578. });
  3579. if (key && value) {
  3580. accountDetails[key] = value;
  3581. };
  3582.  
  3583. accountRecords[currentEmail] = accountDetails;
  3584. GM_setValue("StateFarm_AccountRecords", accountRecords);
  3585. };
  3586.  
  3587. const getRoomAsString = function () {
  3588. return findKeyByValue(unsafeWindow.extern.GameType, unsafeWindow.vueApp.game.gameType) + ", " + unsafeWindow.vueData.currentRegionId + ", " + unsafeWindow.vueApp.game.mapName + ", team" + unsafeWindow.vueApp.game.team;
  3589. };
  3590.  
  3591. const every15Seconds = function () {
  3592. //i forgot myself what this is for
  3593. // 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]));
  3594. if (extract("antiAFK") && extern.inGame && (document.getElementById("spectate").style.display == "none") && ss && ss.MYPLAYER && ss.MYPLAYER.ws && (!ss.MYPLAYER[H.playing])) {
  3595. if (extract("debug")) log("lets'r try'r to keep alive'r");
  3596. let out = ss.commOut.getBuffer();
  3597. out.packInt8(ss.SERVERCODES.keepAlive);
  3598. out.send(ss.MYPLAYER.ws);
  3599. };
  3600. };
  3601. const everySecond = function () {
  3602. if (extract("debug")) {
  3603. unsafeWindow.globalSS = {};
  3604. unsafeWindow.globalSS.ss = ss;
  3605. unsafeWindow.globalSS.H = H;
  3606. unsafeWindow.globalSS.F = F;
  3607. unsafeWindow.globalSS.L = L;
  3608. unsafeWindow.globalSS.tp = tp;
  3609. unsafeWindow.globalSS.initMenu = initMenu;
  3610. unsafeWindow.globalSS.extractAsDropdownInt = extractAsDropdownInt;
  3611. unsafeWindow.globalSS.extract = extract;
  3612. unsafeWindow.globalSS.extractDropdownList = extractDropdownList;
  3613. unsafeWindow.globalSS.save = save;
  3614. unsafeWindow.globalSS.load = load;
  3615. unsafeWindow.globalSS.GM_listValues = GM_listValues;
  3616. unsafeWindow.globalSS.GM_getValue = GM_getValue;
  3617. unsafeWindow.globalSS.GM_setValue = GM_setValue;
  3618. unsafeWindow.globalSS.GM = GM;
  3619. unsafeWindow.globalSS.crackedShell = crackedShell;
  3620. unsafeWindow.globalSS.createPopup = createPopup;
  3621. unsafeWindow.globalSS.remove = remove;
  3622. unsafeWindow.globalSS.change = change;
  3623. unsafeWindow.globalSS.unban = unban;
  3624. if (typeof GM_info !== 'undefined') unsafeWindow.globalSS.GM_info = GM_info;
  3625. unsafeWindow.globalSS.getScrambled = getScrambled;
  3626. unsafeWindow.globalSS.soundsSFC = soundsSFC;
  3627. unsafeWindow.globalSS.accountStatus = accountStatus;
  3628. unsafeWindow.globalSS.cachedRealData = cachedRealData;
  3629. unsafeWindow.globalSS.retrievedSFX = retrievedSFX;
  3630. unsafeWindow.globalSS.findBadgesForUsername = findBadgesForUsername;
  3631. unsafeWindow.globalSS.badgeList = badgeList;
  3632. unsafeWindow.globalSS.crosshairsPosition = crosshairsPosition;
  3633. unsafeWindow.globalSS.predictGrenade = predictGrenade;
  3634. unsafeWindow.globalSS.miniCamera = miniCamera;
  3635. // unsafeWindow.globalSS.pathfindingInfo = {
  3636. // activePath: activePath,
  3637. // pathfindingTargetOverride: pathfindingTargetOverride,
  3638. // activePath: activePath,
  3639. // activeNodeTarget: activeNodeTarget,
  3640. // mapNodes: GLOBAL_NODE_LIST,
  3641. // };
  3642. };
  3643. save("DisableLogs", extract("consoleLogs"));
  3644. if (extract('sfChatAutoStart') && !sfChatContainer){
  3645. startStateFarmChat(true);
  3646. };
  3647. startUpComplete = (!document.getElementById("progressBar"));
  3648. let botsDict = GM_getValue("StateFarm_BotStatus");
  3649. sfChatUsernameSet();
  3650. if (!botsDict) botsDict = {};
  3651. if (AUTOMATED) {
  3652. if (clientID) {
  3653. const autoLeave = extract("autoLeave") ? " AL: " + Math.round(((timeJoinedGame + (1000 * extract("autoLeaveDelay"))) - Date.now()) / 100) / 10 : "";
  3654. const newArray = {
  3655. noConfig: ((botsDict[clientID] && configNotSet) ? (
  3656. (botsDict[clientID].noConfig > Date.now()) ? botsDict[clientID].noConfig : Date.now()
  3657. ) : 0),
  3658. username: ((ss && ss.MYPLAYER && ss.MYPLAYER.name) || (unsafeWindow.vueApp.playerName)),
  3659. uniqueId: ((ss && ss.MYPLAYER && ss.MYPLAYER.uniqueId) || "value_undefined"),
  3660. startTime: startTime,
  3661. timecode: Date.now(),
  3662. status: ((isBanned && "banned") ||
  3663. (unsafeWindow.extern.inGame && (((ss.MYPLAYER && ss.MYPLAYER[H.playing]) ? "playing " : (unsafeWindow.vueApp.game.respawnTime + "s cooldown ")) + GAMECODE + autoLeave + " (" + getRoomAsString() + ")")) ||
  3664. (errorString || "idle")),
  3665. };
  3666.  
  3667. delete botsDict[clientID];
  3668.  
  3669. clientID = (unsafeWindow.vueData.firebaseId || clientID);
  3670.  
  3671. botsDict[clientID] = newArray;
  3672. };
  3673. if (attemptedInjection && automatedBorder && automatedBorder.style && automatedBorder.style.borderColor == "rgb(255, 0, 0)") {
  3674. automatedBorder.style.borderColor = 'rgba(0, 255, 0, 1)';
  3675. };
  3676. } else {
  3677. let oldBlacklist = botBlacklist;
  3678. botBlacklist = "";
  3679. let oldWhitelist = botWhitelist;
  3680. botWhitelist = "";
  3681. if (extract("botNoKillMe")) {
  3682. botBlacklist += botBlacklist + ((ss && ss.MYPLAYER && ss.MYPLAYER.uniqueId) || "value_undefined") + ",";
  3683. };
  3684. if (extract("botFollowMe")) {
  3685. botWhitelist += botWhitelist + ((ss && ss.MYPLAYER && ss.MYPLAYER.uniqueId) || "value_undefined") + ",";
  3686. };
  3687. monitorObjects.botOnline = "";
  3688. amountOnline = 0;
  3689. const botsArray = Object.keys(botsDict).sort();
  3690. for (let i in botsArray) {
  3691. if (i !== "shallowClone") {
  3692. i = Number(i);
  3693. const botID = botsArray[i];
  3694. const data = botsDict[botID];
  3695. if (data.noConfig) {
  3696. updateBotParams();
  3697. botsDict[botID].noConfig = Date.now() + 5000;
  3698. };
  3699. if (extract("botNoKillBots") && data.uniqueId !== "value_undefined") {
  3700. botBlacklist += data.uniqueId + ",";
  3701. };
  3702. if (extract("botFollowBots") && data.uniqueId !== "value_undefined") {
  3703. botWhitelist += data.uniqueId + ",";
  3704. };
  3705. if ((data.timecode + 10000) < Date.now()) { //give up on this bot lmao
  3706. delete botsDict[botID];
  3707. } else if ((data.timecode + 4000) < Date.now()) { //maybe it will come back
  3708. botsDict[botID].status = "not responding " + (Date.now() - data.timecode) + "ms elapsed";
  3709. }; //bot is doing fine... hopefully
  3710. amountOnline += 1;
  3711. monitorObjects.botOnline = monitorObjects.botOnline + "\n" + data.username + " [..." + botID.slice(-4) + "]: " + data.status;
  3712. };
  3713. };
  3714. if (oldBlacklist !== botBlacklist) {
  3715. log("old:", oldBlacklist, "new:", botBlacklist);
  3716. updateBotParams();
  3717. };
  3718. if (oldWhitelist !== botWhitelist) {
  3719. log("old:", oldWhitelist, "new:", botWhitelist);
  3720. updateBotParams();
  3721. };
  3722. monitorObjects.botOnline = ((amountOnline) + " bots online.") + monitorObjects.botOnline;
  3723. };
  3724. GM_setValue("StateFarm_BotStatus", botsDict);
  3725.  
  3726. allFolders.forEach(function (name) {
  3727. save(name, tp[name].expanded);
  3728. });
  3729.  
  3730. coordElement.style.display = "none";
  3731. gameInfoElement.style.display = "none";
  3732. playerstatsElement.style.display = "none";
  3733. playerinfoElement.style.display = "none";
  3734. redCircle.style.display = "none";
  3735. firstUseElement.style.display = "none";
  3736.  
  3737. makeHudElementDragable(coordElement);
  3738. makeHudElementDragable(gameInfoElement);
  3739. makeHudElementDragable(playerstatsElement);
  3740. makeHudElementDragable(playerinfoElement);
  3741.  
  3742. if (extract("gameBlacklistCodes") != "" && extract("gameBlacklistCodes") != undefined) {
  3743. let input = extract("gameBlacklistCodes");
  3744. input = input.split(",");
  3745. input.forEach(function (code) {
  3746. if (code != "" && code.length == 7) {
  3747. blacklistedGameCodes.push(code);
  3748. }
  3749. });
  3750. };
  3751.  
  3752. if (extract("noAnnoyances") && !annoyancesRemoved) {
  3753. const styleElement = document.createElement('style');
  3754. styleElement.textContent = `
  3755. /* remove ads because annoying stop adding spyware yarg */
  3756. .house-small,
  3757. #big-house-ad,
  3758. .house-ad-wrapper,
  3759. .display-ad-container,
  3760. .respawn-one,
  3761. .respawn-two,
  3762. #ShellShockers_LoadingScreen_HouseAds,
  3763. #display-ad-header-home,
  3764. .display-ad-header-home,
  3765. #display-ad-header-equip,
  3766. #shellshockers_respawn_banner_3_ad {
  3767. display: none;
  3768. }
  3769. `;
  3770. document.head.appendChild(styleElement);
  3771. annoyancesRemoved = true;
  3772. };
  3773.  
  3774. const fetchAndProcessAudioFromZip = async function (zipURL) {
  3775. try {
  3776. const response = await fetch(zipURL);
  3777. if (!response.ok) {
  3778. throw new Error('Failed to fetch ZIP:', response.statusText);
  3779. };
  3780. const arrayBuffer = await response.arrayBuffer();
  3781. const zip = await JSZip.loadAsync(arrayBuffer); // eslint-disable-line
  3782. const mp3Files = Object.keys(zip.files).filter(fileName => fileName.endsWith('.mp3'));
  3783. const jsonFiles = Object.keys(zip.files).filter(fileName => fileName.endsWith('.json'));
  3784. const totalRequests = mp3Files.length + jsonFiles.length;
  3785. let config = {};
  3786.  
  3787. if (jsonFiles.length > 0) {
  3788. const jsonFileData = await zip.file(jsonFiles[0]).async('string');
  3789. config = { ...config, ...JSON.parse(jsonFileData) };
  3790. };
  3791.  
  3792. let loadedCount = 0;
  3793.  
  3794. mp3Files.forEach(async (fileName, index) => {
  3795. const fileData = await zip.file(fileName).async('arraybuffer');
  3796. const audioBuffer = await audioContexts.SOUNDS.decodeAudioData(fileData);
  3797. const key = fileName.replace('.mp3', '');
  3798. audioBuffer.disablePanning = !!config.disablePanning;
  3799. soundsSFC[key] = audioBuffer;
  3800. log("Loaded sound for:", key);
  3801. loadedCount++;
  3802.  
  3803. if (loadedCount === totalRequests) {
  3804. createPopup("Loaded Custom SFX!", "success");
  3805. log("LOADED!");
  3806. };
  3807. });
  3808. } catch (error) {
  3809. console.error('Error fetching/decoding audio from ZIP:', error);
  3810. };
  3811. };
  3812.  
  3813. let customSFXConfig = `${extract("customSFX1")}+${extract("customSFX2")}+${extract("customSFX3")}`;
  3814. if (initialisedCustomSFX !== customSFXConfig) {
  3815. initialisedCustomSFX = customSFXConfig;
  3816. log("STARTING TO LOAD CUSTOM SFX...", initialisedCustomSFX);
  3817. soundsSFC = {};
  3818. if (extract("customSFX3") !== true && extract("customSFX3") !== "default") { //wa wa wa repeated code YOU FUNCTION IT THEN I DONT CARE!!!!! -onlypuppy7
  3819. createPopup("Loading Custom SFX...");
  3820. fetchAndProcessAudioFromZip(atob(extract("customSFX3")));
  3821. };
  3822. if (extract("customSFX2") !== true && extract("customSFX2") !== "default") {
  3823. createPopup("Loading Custom SFX...");
  3824. fetchAndProcessAudioFromZip(atob(extract("customSFX2")));
  3825. };
  3826. if (extract("customSFX1") !== true && extract("customSFX1") !== "default") {
  3827. createPopup("Loading Custom SFX...");
  3828. fetchAndProcessAudioFromZip(atob(extract("customSFX1")));
  3829. };
  3830. };
  3831.  
  3832. if (startUpComplete && ss && ss.MYPLAYER && unsafeWindow.extern.inGame) {
  3833. if (extract("mockMode")) {
  3834. let textAfterLastColon = document.getElementById("chatOut").children[document.getElementById("chatOut").children.length - 1].children[1].textContent;
  3835. let chatName = document.getElementById("chatOut").children[document.getElementById("chatOut").children.length - 1].children[0].textContent.slice(0, -2);
  3836. // log("Chat Name:", chatName);
  3837. if (chatName && chatName !== username && textAfterLastColon !== "joined." && textAfterLastColon !== "left." && !handleChat(textAfterLastColon)) {
  3838. sendChatMessage(textAfterLastColon);
  3839. }; //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
  3840. };
  3841. // if (extract("antiAFK")) {
  3842. // if (Date.now() > (lastAntiAFKMessage + 270000)) {
  3843. // if (sendChatMessage(antiAFKString + filteredList[randomInt(0, filteredList.length - 1)])) {
  3844. // lastAntiAFKMessage = Date.now();
  3845. // };
  3846. // };
  3847. // };
  3848. if (extract("gameInfo")) {
  3849. 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" : "");
  3850. gameInfoElement.innerText = gameInfoText;
  3851. void gameInfoElement.offsetWidth;
  3852. gameInfoElement.style.display = '';
  3853. };
  3854. if (extract("leaveEmpty")) {
  3855. if (playersInGame == 1 || playersInGame == 2) { //if literally empty or there is one person remaining
  3856. createPopup("Left empty game. [LeaveEmpty]")
  3857. change("leaveGame");
  3858. playersInGame = 0;
  3859. };
  3860. };
  3861. if (extract("autoLeave")) {
  3862. const remaining = ((timeJoinedGame + (1000 * extract("autoLeaveDelay"))) - Date.now()) / 1000;
  3863. if (remaining <= 0) {
  3864. createPopup("AutoLeave: Leaving now...");
  3865. change("leaveGame");
  3866. } else if (autoLeaveReminder > 5 && remaining <= 5) {
  3867. createPopup("AutoLeave: 5 seconds remaining!");
  3868. } else if (autoLeaveReminder > 10 && remaining <= 10) {
  3869. createPopup("AutoLeave: 10 seconds remaining");
  3870. };
  3871. // log(autoLeaveReminder, remaining);
  3872. autoLeaveReminder = remaining;
  3873. };
  3874.  
  3875. //credits: @2lars and @macintosh2 in the discord :)
  3876. if ((extract("autoTeam") !== "disabled") && ss.MYPLAYER.team !== 0) {
  3877. if ((extract("autoTeam") == "random") ||
  3878. (extract("autoTeam") == "red") && (ss.MYPLAYER.team == 1) ||
  3879. (extract("autoTeam") == "blue") && (ss.MYPLAYER.team == 2)) {
  3880. unsafeWindow.extern.switchTeam();
  3881. };
  3882. };
  3883. if (!ss.MYPLAYER[H.playing]) {
  3884. GAMECODE = unsafeWindow.vueApp.game.shareLinkPopup.url.slice(-7);
  3885. if (extract("autoRespawn")) {
  3886. var button = document.querySelector('.ss_button.btn_big.btn-dark-bevel.btn-respawn.ss_button.btn_green.bevel_green');
  3887. if (button) {
  3888. button.click();
  3889. };
  3890. };
  3891. };
  3892.  
  3893. Array.from(document.getElementById("playerList").children).forEach(playerListItem => {
  3894. const playerSlotNameElement = playerListItem.children[0];
  3895. if (playerSlotNameElement) {
  3896. let highlightSpan = playerSlotNameElement.querySelector('span');
  3897. if (!highlightSpan) {
  3898. highlightSpan = document.createElement('span');
  3899. highlightSpan.textContent = playerSlotNameElement.textContent;
  3900. playerSlotNameElement.textContent = '';
  3901. playerSlotNameElement.appendChild(highlightSpan);
  3902. };
  3903. if (extract("unfilterNames") && ss.isBadWord(playerListItem.textContent)) {
  3904. highlightSpan.style.backgroundColor = "rgba(255, 255, 255, 0.6)";
  3905. highlightSpan.style.color = 'red';
  3906. } else {
  3907. highlightSpan.style.backgroundColor = '';
  3908. highlightSpan.style.color = '';
  3909. };
  3910. };
  3911. });
  3912.  
  3913. // addStreamsToInGameUI(); //broken rn anyways
  3914.  
  3915. const pausedGameUI = document.querySelector('.paused-game-ui');
  3916. const hasZIndex1 = pausedGameUI.classList.contains('z-index-1');
  3917. const hasZIndex10000 = pausedGameUI.classList.contains('z-index-10000');
  3918. if (extract("restoreScroll") && (hasZIndex1 || !hasZIndex10000)) {
  3919. pausedGameUI.classList.remove('z-index-1', 'z-index-10000');
  3920. pausedGameUI.classList.add("z-index-10000");
  3921. } else if ((!extract("restoreScroll")) && (hasZIndex10000 || !hasZIndex1)) {
  3922. pausedGameUI.classList.remove('z-index-1', 'z-index-10000');
  3923. pausedGameUI.classList.add("z-index-1");
  3924. };
  3925.  
  3926. if (extract("minimap")) {
  3927. if (!miniCamera) {
  3928. var camPos = new L.BABYLON.Vector3(0, -20, 0);
  3929. miniCamera = new L.BABYLON.ArcRotateCamera("minimapCamera", L.BABYLON.Tools.ToRadians(-90), L.BABYLON.Tools.ToRadians(0), 30, camPos, ss.SCENE);
  3930. miniCamera.mode = L.BABYLON.Camera.ORTHOGRAPHIC_CAMERA;
  3931. ss.SCENE.activeCameras.push(miniCamera);
  3932. miniCamera.parent = ss.MYPLAYER[H.actor][H.mesh];
  3933. };
  3934. miniCamera._skipRendering = false;
  3935. let cameraScale = extract("minimapZoom");
  3936.  
  3937. miniCamera.orthoLeft = -cameraScale;
  3938. miniCamera.orthoRight = cameraScale;
  3939. miniCamera.orthoBottom =- cameraScale;
  3940. miniCamera.orthoTop = cameraScale;
  3941.  
  3942. let mapScale = extract("minimapSize");
  3943.  
  3944. var relativeWidth = 200 / window.innerWidth;
  3945. var relativeHeight = 200 / window.innerHeight;
  3946.  
  3947. miniCamera.viewport = new L.BABYLON.Viewport(0.2, 0.2, relativeWidth * mapScale, relativeHeight * mapScale);
  3948. } else if (miniCamera) {
  3949. miniCamera._skipRendering = true;
  3950. };
  3951. } else {
  3952. if (!document.getElementById("progressBar")) {
  3953. if (extract("autoJoin") && (extract("autoLogin") == "disabled" || unsafeWindow.vueApp.accountCreated !== null)) {
  3954. unsafeWindow.vueApp.externPlayObject(
  3955. (extract("joinCode").length === 7) ? 2 : 0,
  3956. unsafeWindow.vueApp.currentGameType,
  3957. unsafeWindow.vueApp.playerName,
  3958. '',
  3959. (extract("joinCode").length === 7) ? extract("joinCode") : '',
  3960. );
  3961. };
  3962. };
  3963. if (extract("autoRegion") !== "disabled") {
  3964. const region = (extract("autoRegion") == "random" ? extractDropdownList("autoRegion")[randomInt(1, 7)].value : extract("autoRegion"));
  3965. unsafeWindow.vueData.currentRegionId = region;
  3966. };
  3967. if (extract("autoGamemode") !== "disabled") {
  3968. const gamemode = ((extract("autoGamemode") == "random") ? randomInt(0, 3) : (extractAsDropdownInt("autoGamemode") - 1));
  3969. unsafeWindow.vueApp.onGameTypeChanged(gamemode);
  3970. };
  3971. };
  3972.  
  3973. if (startUpComplete) {
  3974. // check if it is a user's first time to run the script
  3975. if (GM_getValue("StateFarm_firstRun") !== 1) {
  3976. firstExecution = true;
  3977. };
  3978.  
  3979. if ((extract("legacyModels") !== previousLegacyModels)) {
  3980. let models = [3000, 3100, 3400, 3600, 3800, 4000, 4200];
  3981. models.forEach(ID => {
  3982. let item = unsafeWindow.extern.catalog.findItemById(ID);
  3983. item.item_data.meshName.replaceAll("_Legacy","");
  3984. if (extract("legacyModels")) item.item_data.meshName = `${item.item_data.meshName}_Legacy`;
  3985. });
  3986. };
  3987. previousLegacyModels = extract("legacyModels");
  3988.  
  3989. if ((extract("setDetail") !== previousDetail) && (extract("setDetail") !== "disabled")) {
  3990. unsafeWindow.vueApp.settingsUi.togglers.misc[3].value = false;
  3991. if (extract("setDetail") == "autodetail") {
  3992. unsafeWindow.vueApp.settingsUi.togglers.misc[3].value = true;
  3993. } else if (extract("setDetail") == "nodetails") {
  3994. unsafeWindow.vueApp.settingsUi.togglers.misc[4].value = false;
  3995. unsafeWindow.vueApp.settingsUi.togglers.misc[5].value = false;
  3996. } else if (extract("setDetail") == "shadows") {
  3997. unsafeWindow.vueApp.settingsUi.togglers.misc[4].value = true;
  3998. unsafeWindow.vueApp.settingsUi.togglers.misc[5].value = false;
  3999. } else if (extract("setDetail") == "highres") {
  4000. unsafeWindow.vueApp.settingsUi.togglers.misc[4].value = false;
  4001. unsafeWindow.vueApp.settingsUi.togglers.misc[5].value = true;
  4002. } else if (extract("setDetail") == "shadowshighres") {
  4003. unsafeWindow.vueApp.settingsUi.togglers.misc[4].value = true;
  4004. unsafeWindow.vueApp.settingsUi.togglers.misc[5].value = true;
  4005. };
  4006. unsafeWindow.extern.applyUiSettings(unsafeWindow.vueApp.settingsUi);
  4007. };
  4008. previousDetail = extract("setDetail");
  4009.  
  4010. if (previousTitleAnimation !== extract("titleAnimation")) {
  4011. let existingFavicons = document.querySelectorAll("link[rel*='icon']");
  4012. existingFavicons.forEach(function (favicon) {
  4013. favicon.parentNode.removeChild(favicon);
  4014. });
  4015. let favicon = document.createElement('link');
  4016. favicon.type = 'image/x-icon';
  4017. favicon.rel = 'shortcut icon';
  4018. if (extract("titleAnimation")) {
  4019. favicon.href = (GM_info?.script?.icon || iconURL);
  4020. } else {
  4021. favicon.href = 'https://www.google.com/s2/favicons?domain=shellshock.io';
  4022. };
  4023. document.getElementsByTagName('head')[0].appendChild(favicon);
  4024. previousTitleAnimation = extract("titleAnimation");
  4025. };
  4026. };
  4027.  
  4028. const banPopup = document.getElementById("bannedPopup");
  4029. if (attemptedInjection && banPopup && unsafeWindow.vueApp?.bannedPopup?.expire && (unsafeWindow.vueApp.bannedPopup.expire !== "")) isBanned = true;
  4030. if (isBanned && extract("autoUnban") && (!attemptedAutoUnban) && unsafeWindow.vueApp?.bannedPopup) {
  4031. log("eep!");
  4032. 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.';
  4033. unban();
  4034. attemptedAutoUnban = true;
  4035. createPopup("AutoUnban: Attempting to Unban...");
  4036. setTimeout(() => {
  4037. createPopup("AutoUnban: Removed ban message.");
  4038. banPopup.style.display = "none";
  4039. attemptedAutoUnban = false;
  4040. isBanned = false;
  4041. unsafeWindow.vueApp.bannedPopup.expire = "";
  4042. }, 15000);
  4043. };
  4044.  
  4045. if (extract("eggColor") !== "disabled" && ss?.USERDATA) {
  4046. const color = extract("eggColor") == "random" ? randomInt(0, 6) : extractAsDropdownInt("eggColor") - 1;
  4047. if (color !== ss.USERDATA.playerAccount.colorIdx) {
  4048. unsafeWindow.extern.setShellColor(color);
  4049. unsafeWindow.vueApp.onBackClick();
  4050. };
  4051. };
  4052. if (extract("autoStamp") !== "disabled" && ss?.USERDATA) {
  4053. const stampID = 2000 + (extract("autoStamp") == "random" ? randomInt(1, 6) : extractAsDropdownInt("autoStamp"));
  4054. if (ss.USERDATA && ss.USERDATA.playerAccount) {
  4055. if (stampID !== ((ss.USERDATA.playerAccount.stampItem && ss.USERDATA.playerAccount.stampItem?.id) || -1)) {
  4056. ss.USERDATA.playerAccount.stampItem = unsafeWindow.extern.catalog.findItemById(stampID);
  4057. unsafeWindow.vueApp.onBackClick();
  4058. };
  4059. };
  4060. };
  4061. if (extract("autoHat") !== "disabled" && ss?.USERDATA) {
  4062. const hatID = 1000 + (extract("autoHat") == "random" ? randomInt(1, 6) : extractAsDropdownInt("autoHat"));
  4063. if (ss.USERDATA && ss.USERDATA.playerAccount) {
  4064. if (hatID !== ((ss.USERDATA.playerAccount.hatItem && ss.USERDATA.playerAccount.hatItem?.id) || -1)) {
  4065. ss.USERDATA.playerAccount.hatItem = unsafeWindow.extern.catalog.findItemById(hatID);
  4066. unsafeWindow.vueApp.onBackClick();
  4067. };
  4068. };
  4069. };
  4070. if (extract("useCustomName")) {
  4071. unsafeWindow.vueApp?.setPlayerName(extract("usernameAutoJoin"));
  4072. };
  4073. if ((!ranEverySecond) && startUpComplete) {
  4074. if (extract("autoChickenWinner")) {
  4075. log("automatically do chw");
  4076. change("chickenWinner");
  4077. };
  4078. updateAccountRecords();
  4079. if (extract("autoMacro")) {
  4080. log("automatically do your macro");
  4081. change("executeMacro");
  4082. };
  4083.  
  4084. log("swapping out google analytics...");
  4085. oldGa = unsafeWindow.ga;
  4086. unsafeWindow.ga = F.interceptGa;
  4087.  
  4088. const vueAppisUpgraded = Object.getOwnPropertyDescriptor(vueApp, 'isUpgraded')?.get;
  4089. Object.defineProperty(vueApp, 'isUpgraded', {
  4090. get: function() {
  4091. if ((!extract("spoofVIP")) && vueAppisUpgraded) {
  4092. return vueAppisUpgraded.call(vueApp);
  4093. } else {
  4094. return true;
  4095. }
  4096. }
  4097. });
  4098.  
  4099. const vueAppisSubscriber = Object.getOwnPropertyDescriptor(vueApp, 'isSubscriber')?.get;
  4100. Object.defineProperty(vueApp, 'isSubscriber', {
  4101. get: function() {
  4102. if ((!extract("spoofVIP")) && vueAppisSubscriber) {
  4103. return vueAppisSubscriber.call(vueApp);
  4104. } else {
  4105. return true;
  4106. }
  4107. }
  4108. });
  4109.  
  4110. const vueDataisSubscriber = Object.getOwnPropertyDescriptor(vueData, 'isSubscriber')?.get;
  4111. Object.defineProperty(vueData, 'isSubscriber', {
  4112. get: function() {
  4113. if ((!extract("spoofVIP")) && vueDataisSubscriber) {
  4114. return vueDataisSubscriber.call(vueData);
  4115. } else {
  4116. return true;
  4117. }
  4118. }
  4119. });
  4120.  
  4121. ranEverySecond = true;
  4122. };
  4123.  
  4124. //block ads or something kek
  4125. localStorage.timesPlayed = 0;
  4126. };
  4127. const everyDecisecond = function () {
  4128. updateConfig(); deciSecondsPassed++;
  4129.  
  4130. if (extract("titleAnimation")) {
  4131. if (deciSecondsPassed % 3 == 0) {
  4132. unsafeWindow.document.title = titleAnimationFrames[currentFrameIndex];
  4133. currentFrameIndex = (currentFrameIndex + 1) % titleAnimationFrames.length;
  4134. };
  4135. } else if (unsafeWindow.document.title != "Shell Shockers 🍳 Multiplayer io game") {
  4136. unsafeWindow.document.title = "Shell Shockers 🍳 Multiplayer io game";
  4137. };
  4138.  
  4139. if (startUpComplete && (!unsafeWindow.extern.inGame) && extract("autoLogin") !== "disabled" && (extract("autoLogin") == "always" || extract("autoLogin") == "noaccount" && unsafeWindow.vueApp.accountCreated == null)) {
  4140. if ((previousLogin + 5000) < Date.now()) {
  4141. unban();
  4142. change("loginDatabaseLogin");
  4143. previousLogin = Date.now();
  4144. };
  4145. };
  4146.  
  4147. if (ss && ss?.MYPLAYER && unsafeWindow?.extern?.inGame) {
  4148. //innertext stuff, fairly resource intensive. disable these for performance
  4149. if (extract("playerStats")) {
  4150. let playerStates = "";
  4151. ss.PLAYERS.forEach(player => {
  4152. if (player && (player !== ss.MYPLAYER) && (player[H.hp] > 0) && ((!ss.MYPLAYER.team) || (player.team !== ss.MYPLAYER.team))) {
  4153. playerStates = playerStates + player.name + ": " + Math.round(player[H.hp]) + " HP\n";
  4154. };
  4155. });
  4156. if (playerStates == "") { playerStates = "No Enemy Players" };
  4157. playerstatsElement.innerText = playerStates;
  4158. void playerstatsElement.offsetWidth;
  4159. playerstatsElement.style.display = '';
  4160. };
  4161. if (extract("playerInfo")) {
  4162. let playerInfoString = "";
  4163. const player = currentlyTargeting || playerLookingAt || undefined
  4164. if (player && player.distance && player[H.playing]) {
  4165. playerInfoString = playerInfoString + player.name + "\n"
  4166. playerInfoString = playerInfoString + "HP: " + Math.round(player[H.hp]) + "\n"
  4167. playerInfoString = playerInfoString + "Distance: " + player.distance.toFixed(3) + "\n"
  4168. playerInfoString = playerInfoString + "AngleDiff: " + player.angleDiff.toFixed(3) + "\n"
  4169. };
  4170. if (playerInfoString == "") { playerInfoString = "Not Looking At Player" };
  4171. playerinfoElement.innerText = playerInfoString;
  4172. void playerinfoElement.offsetWidth;
  4173. playerinfoElement.style.display = '';
  4174. };
  4175. if (ss.MYPLAYER && ss.MYPLAYER[H.actor] && ss.MYPLAYER[H.actor][H.mesh] && extract("showCoordinates")) {
  4176. const fonx = Number((ss.MYPLAYER[H.actor][H.mesh].position.x).toFixed(3));
  4177. const fony = Number((ss.MYPLAYER[H.actor][H.mesh].position.y).toFixed(3));
  4178. const fonz = Number((ss.MYPLAYER[H.actor][H.mesh].position.z).toFixed(3));
  4179. const yaw = Number((ss.MYPLAYER[H.yaw]).toFixed(3)); //could i function this? yea
  4180. const pitch = Number((ss.MYPLAYER[H.pitch]).toFixed(3));
  4181. const personalCoordinate = `XYZ: ${fonx}, ${fony}, ${fonz} Rot: ${yaw}, ${pitch} Acc: ${Number(accuracyPercentage).toFixed(3)}`;
  4182. coordElement.innerText = personalCoordinate;
  4183. void coordElement.offsetWidth;
  4184. coordElement.style.display = '';
  4185. };
  4186. // create an info box for the first execution, i have 69697935 iq
  4187. if (firstExecution == true) {
  4188. firstUseElement.innerHTML = `
  4189. <style>
  4190. @font-face {
  4191. font-family: "Bahnschrift";
  4192. src: url("https://db.onlinewebfonts.com/t/0a6ee448d1bd65c56f6cf256a7c6f20a.eot");
  4193. src: url("https://db.onlinewebfonts.com/t/0a6ee448d1bd65c56f6cf256a7c6f20a.eot?#iefix")format("embedded-opentype"),
  4194. url("https://db.onlinewebfonts.com/t/0a6ee448d1bd65c56f6cf256a7c6f20a.woff2")format("woff2"),
  4195. url("https://db.onlinewebfonts.com/t/0a6ee448d1bd65c56f6cf256a7c6f20a.woff")format("woff"),
  4196. url("https://db.onlinewebfonts.com/t/0a6ee448d1bd65c56f6cf256a7c6f20a.ttf")format("truetype"),
  4197. url("https://db.onlinewebfonts.com/t/0a6ee448d1bd65c56f6cf256a7c6f20a.svg#Bahnschrift")format("svg");
  4198. }
  4199. .overlay {
  4200. position: fixed;
  4201. top: 0;
  4202. left: 0;
  4203. width: 100%;
  4204. height: 100%;
  4205. background-color: rgba(0, 0, 0, 0.7);
  4206. z-index: 9999;
  4207. display: flex;
  4208. justify-content: center;
  4209. align-items: center;
  4210. opacity: 1;
  4211. }
  4212. .overlay-content {
  4213. text-align: center;
  4214. color: white;
  4215. }
  4216. h100 {
  4217. color: white;
  4218. font-weight: bold;
  4219. font-family: Bahnschrift;
  4220. font-size: 36px;
  4221. }
  4222. a {
  4223. text-decoration: none;
  4224. font-family: Bahnschrift;
  4225. font-size: 24px;
  4226. }
  4227. p {
  4228. text-decoration: none;
  4229. font-family: Bahnschrift;
  4230. font-size: 15px;
  4231. }
  4232. </style>
  4233. </head>
  4234. <body>
  4235.  
  4236. <div class="overlay">
  4237. <div class="overlay-content">
  4238. <h100>Welcome to StateFarmClient V3</h100>
  4239. <br>
  4240. <br>
  4241. <a href="https://discord.gg/EMy9swEwB6">Discord&emsp;</a>
  4242. <a href="https://github.com/Hydroflame522/StateFarmClient">Github&emsp;</a>
  4243. <a href="https://greasyfork.org/en/scripts/482982">Greasyfork&emsp;</a>
  4244. <a href="https://www.youtube.com/channel/UCGWtU3Dp3unyefuaBpwGMDw">Youtube</a>
  4245. <br>
  4246. <br>
  4247. <p>Press 'Escape' to close</p>
  4248. </div>
  4249. </div>
  4250. </body>
  4251. `
  4252. firstUseElement.style.display = '';
  4253. document.addEventListener('keydown', function (event) {
  4254. if (event.keyCode === 27) {
  4255. firstUseElement.style.opacity = '0';
  4256. firstUseElement.style.display = "none";
  4257. setTimeout(function () {
  4258. firstUseElement.parentNode.removeChild(firstUseElement);
  4259. }, 1000)
  4260. }
  4261. GM_setValue("StateFarm_firstRun", 1);
  4262. });
  4263. };
  4264. };
  4265. if (AUTOMATED) { //i know what youre saying looking at this. i am the greatest programmer to have ever lived
  4266. if (GM_getValue("StateFarm_CommandTime") > cachedCommandTime) {
  4267. // alert("New command incoming");
  4268. cachedCommand = GM_getValue("StateFarm_Command");
  4269. cachedCommandTime = GM_getValue("StateFarm_CommandTime");
  4270. log("Command received:", cachedCommand);
  4271. handleCommand(cachedCommand);
  4272. } else {
  4273. // uncommment if needed
  4274. // log("No new command, cached command:", cachedCommand, "cached time:", cachedCommandTime, "diff to now:", Date.now() - cachedCommandTime);
  4275. };
  4276. };
  4277. };
  4278.  
  4279. const handleCommand = function (command) {
  4280. let args = command.split(" ");
  4281.  
  4282. switch (args[0]) {
  4283. case "setconfig":
  4284. let receivedConfig = decodeURIComponent(unsafeWindow.escape(window.atob(args[1]))); // eslint-disable-line
  4285. if (URLParams !== "") { receivedConfig = URLParams + "<" + receivedConfig };
  4286. log("StateFarm: Change in Bot Panel detected.", receivedConfig);
  4287. applySettings(receivedConfig);
  4288. configNotSet = false;
  4289. break;
  4290. case "ping":
  4291. createPopup("Pong! " + ((Date.now() - cachedCommandTime)) + "ms", "success");
  4292. break;
  4293. case "kill":
  4294. unsafeWindow.close();
  4295. break;
  4296. case "leave":
  4297. change("leaveGame");
  4298. break;
  4299. case "unban":
  4300. unban();
  4301. break;
  4302. case "newproxy":
  4303. newProxy();
  4304. break;
  4305. case "refresh":
  4306. reloadPage();
  4307. break;
  4308. case "report":
  4309. spamReport();
  4310. break;
  4311. case "join":
  4312. if (args[1]) unsafeWindow.vueApp.externPlayObject(0, 0, unsafeWindow.vueApp.playerName, -1, args[1]);
  4313. else alert("Invalid code");
  4314. break;
  4315. case "repeat":
  4316. if (args[1]) {
  4317. sendChatMessage(args.slice(1).join(" "));
  4318. } else {
  4319. sendChatMessage("Invalid repeat message");
  4320. }
  4321. break;
  4322. /*
  4323. case "pathtarget": // pathfinding target
  4324. let option = args[1]; // eslint-disable-line
  4325. if (option) {
  4326. if (option === "set") {
  4327. let x = args[2];
  4328. let y = args[3];
  4329. let z = args[4];
  4330. if (x && y && z) {
  4331. pathfindingTargetOverride = { x: x, y: y, z: z };
  4332. isFirstFrameAttemptingToPathfind = true;
  4333. } else {
  4334. sendChatMessage("Invalid pathtarget coordinates")
  4335. };
  4336. };
  4337. };
  4338. break;
  4339. case "clearpath":
  4340. clearPath();
  4341. break;
  4342. case "clearpath_t":
  4343. clearPath_andTarget();
  4344. break;
  4345. case "setpathdespawn":
  4346. if (args[1]) {
  4347. if (args[1] === "true") {
  4348. despawnIfNoPath = true;
  4349. } else if (args[1] === "false") {
  4350. despawnIfNoPath = false;
  4351. } else if (args[1] === "toggle") {
  4352. despawnIfNoPath = !despawnIfNoPath;
  4353. } else {
  4354. sendChatMessage("Invalid setpathdespawn argument");
  4355. }
  4356. } else {
  4357. sendChatMessage("Invalid setpathdespawn message");
  4358. };
  4359. */
  4360. };
  4361. };
  4362.  
  4363. const updateConfig = function () {
  4364. configMain = tp.mainPanel.exportPreset();
  4365. configBots = tp.botPanel.exportPreset();
  4366. };
  4367.  
  4368. const updateHiddenAndDisabledHelper = function (array) { //determines if all conditions are met
  4369. let conditionMet = false;
  4370. array.forEach(condition => {
  4371. if ((extract(condition[0]) ? extract(condition[0]) : false) !== condition[1]) {
  4372. conditionMet = true;
  4373. return;
  4374. };
  4375. });
  4376. return conditionMet;
  4377. };
  4378. const updateHiddenAndDisabled = function () {
  4379. //the format for hidden/disabled modules is as follows:
  4380. //hidden/disabled is an array of arrays. within each of the items, there is the condition required for the module to be shown
  4381. //eg: [["aimbot",true],...] (will only be shown if extract("aimbot")==true)
  4382. if (menuInitiated) {
  4383. allModules.forEach(module => {
  4384. const tiedModules = tp[module + "TiedModules"];
  4385. if (tiedModules) {
  4386. if (tiedModules.showConditions) {
  4387. tp[module + "Button"].hidden = updateHiddenAndDisabledHelper(tiedModules.showConditions);
  4388. };
  4389. if (tiedModules.hideConditions) {
  4390. tp[module + "Button"].hidden = !updateHiddenAndDisabledHelper(tiedModules.hideConditions);
  4391. };
  4392. if (tiedModules.enableConditions) {
  4393. tp[module + "Button"].disabled = updateHiddenAndDisabledHelper(tiedModules.enableConditions);
  4394. };
  4395. if (tiedModules.disableConditions) {
  4396. tp[module + "Button"].disabled = !updateHiddenAndDisabledHelper(tiedModules.disableConditions);
  4397. };
  4398. };
  4399. });
  4400. };
  4401. };
  4402. const loginOrCreateWithEmailPass = function (emailPass) {
  4403. let email, pass;
  4404. [email, pass] = emailPass.split(":");
  4405. log("gonna create/login an account that will send/has email to", email, "with the password", pass);
  4406. save("MostRecentEmail", email);
  4407. //try both. who cares about some stupid errors?
  4408. unsafeWindow.firebase.auth().createUserWithEmailAndPassword(email, pass)
  4409. .then(response => {
  4410. log("success?!?!?!? created account");
  4411. setTimeout(function(){
  4412. updateAccountRecords("emailPass", emailPass);
  4413. accountStatus = "created account";
  4414. }, 2000);
  4415. })
  4416. .catch(() => { });
  4417. unsafeWindow.firebase.auth().signInWithEmailAndPassword(email, pass)
  4418. .then(response => {
  4419. log("success?!?!?!? signed in");
  4420. setTimeout(function(){
  4421. updateAccountRecords("emailPass", emailPass);
  4422. accountStatus = "created account";
  4423. }, 2000);
  4424. accountStatus = "signed in";
  4425. })
  4426. .catch(() => { });
  4427. };
  4428. const saveConfig = function () {
  4429. if (menuInitiated !== "init") {
  4430. if (retrievedSFX && retrievedSFX.length > 1) {
  4431. save("StateFarmConfigSpecialItems", [
  4432. ["customSFX1", extractAsDropdownInt("customSFX1") || 0],
  4433. ["customSFX2", extractAsDropdownInt("customSFX2") || 0],
  4434. ["customSFX3", extractAsDropdownInt("customSFX3") || 0],
  4435. ["skybox", extractAsDropdownInt("skybox") || 0],
  4436. ["filter", extractAsDropdownInt("filter") || 0],
  4437. ]);
  4438. };
  4439. };
  4440. save("StateFarmConfigMainPanel", tp.mainPanel.exportPreset());
  4441. save("StateFarmConfigBotPanel", tp.botPanel.exportPreset());
  4442. };
  4443. const save = function (key, value) {
  4444. if (AUTOMATED) { return undefined };
  4445. if (JSON.parse(localStorage.getItem(key)) !== undefined) { localStorage.removeItem(key) }; //dont need that anymore lmao
  4446. GM_setValue(storageKey + key, value);
  4447. };
  4448. const load = function (key) {
  4449. if (AUTOMATED) { key = getScrambled() };
  4450. return GM_getValue(storageKey + key) || JSON.parse(localStorage.getItem(key)); //localstorage is for legacy purposes *only*
  4451. };
  4452. const remove = function (key) {
  4453. if (AUTOMATED) { return undefined };
  4454. GM_deleteValue(storageKey + key);
  4455. if (JSON.parse(localStorage.getItem(key)) !== undefined) { localStorage.removeItem(key) }; //legacy
  4456. };
  4457. const addUserPresets = function (presets) { //adds presets from dict to inbilt presets, can be called multiple times to update
  4458. if (presets != null) {
  4459. Object.entries(presets).forEach(([key, value]) => {
  4460. inbuiltPresets[key] = value;
  4461. });
  4462. };
  4463. };
  4464. const loadUserPresets = function () { //gets user presets
  4465. let result = load(presetStorageLocation);
  4466. log("Loaded StateFarmUserPresets: ", result);
  4467. return load(presetStorageLocation);
  4468. };
  4469. const saveUserPreset = function (presetName, preset) {
  4470. let currentPresets = loadUserPresets(); //gets current saved presets
  4471. if (currentPresets == null) { // if it does not exist, makes it
  4472. let presets = {};
  4473. presets[presetName] = preset;
  4474. save(presetStorageLocation, presets);
  4475. return presets;
  4476. } else { //otherwise it appends it
  4477. currentPresets[presetName] = preset;
  4478. save(presetStorageLocation, currentPresets);
  4479. return currentPresets;
  4480. };
  4481. };
  4482. //Updates inbuiltPresets to include user presets
  4483. addUserPresets(loadUserPresets());
  4484. const sendChatMessage = function (text) { //basic method (simulates legit method of sending message)
  4485. let chatThing = document.getElementById('chatIn');
  4486. if (chatThing.value.includes("unlock")) {
  4487. createPopup("Message send failed: Account too new! (try ShellPrint or LoginDB)", "error");
  4488. return false;
  4489. } else if (ss.MYPLAYER.chatLines > 2) {
  4490. createPopup("Chat Cooldown: " + (ss.MYPLAYER.chatLines - 2) + " remaining.", "error");
  4491. return false;
  4492. } else {
  4493. try {
  4494. lastSentMessage = text;
  4495. if (chatThing && unsafeWindow.extern.startChat) {
  4496. unsafeWindow.extern.startChat();
  4497. chatThing.value = text;
  4498. chatThing.dispatchEvent(new KeyboardEvent('keydown', {
  4499. key: 'Enter',
  4500. code: 'Enter',
  4501. keyCode: 13,
  4502. which: 13,
  4503. bubbles: true,
  4504. cancelable: true,
  4505. }));
  4506. return true;
  4507. } else {
  4508. return false;
  4509. };
  4510. } catch (error) {
  4511. return false;
  4512. };
  4513. };
  4514. };
  4515. const addStreamsToInGameUI = function () {
  4516. let inGameUIElement = document.getElementById("inGameUI");
  4517. let streams = document.getElementById("stream_scroll").children;
  4518. if (inGameUIElement && streams.length > 0) {
  4519. for (let i = 0; i < streams.length; i++) {
  4520. let hrefValue = streams[i].querySelector('a').href;
  4521. let nameValue = streams[i].querySelector(".stream_name").textContent;
  4522. const streamElement = inGameUIElement.querySelector('div[data-name="' + nameValue + '"]');
  4523. if (extract("showStreams") && !streamElement) {
  4524. let containerDiv = document.createElement("div");
  4525. let nameDiv = document.createElement("div");
  4526. nameDiv.textContent = nameValue;
  4527. nameDiv.setAttribute('data-href', hrefValue);
  4528. nameDiv.style.color = 'white';
  4529. nameDiv.style.cursor = 'pointer';
  4530. nameDiv.style.textDecoration = 'none';
  4531. nameDiv.addEventListener('mouseover', function () { nameDiv.style.textDecoration = 'underline'; nameDiv.style.color = 'blue' });
  4532. nameDiv.addEventListener('mouseout', function () { nameDiv.style.textDecoration = 'none'; nameDiv.style.color = 'white' });
  4533. nameDiv.addEventListener('click', () => GM_openInTab(hrefValue, { active: true }));
  4534. containerDiv.setAttribute('data-name', nameValue);
  4535. containerDiv.appendChild(nameDiv);
  4536. containerDiv.appendChild(nameDiv);
  4537. inGameUIElement.appendChild(containerDiv);
  4538. } else if (!extract("showStreams") && streamElement) {
  4539. inGameUIElement.removeChild(streamElement);
  4540. };
  4541. };
  4542. };
  4543. };
  4544. const highlightTargetOnLeaderboard = function (target, aimbot) {
  4545. let playerArray = [];
  4546. ss.PLAYERS.forEach(player => {
  4547. if (player && (target !== ss.MYPLAYER) && player[H.playing] && (player[H.hp] > 0) && ((!ss.MYPLAYER.team) || (player.team !== ss.MYPLAYER.team))) {
  4548. const uniqueId = player.uniqueId;
  4549. const name = player.name;
  4550. const hp = player[H.hp]
  4551. playerArray.push({ player, uniqueId, name, hp });
  4552. };
  4553. });
  4554. Array.from(document.getElementById("playerList").children).forEach(playerListItem => {
  4555. if (aimbot && target?.name && target[H.playing] === playerListItem.textContent.slice(0, -3)) {//need to slice otherwise won't match properly
  4556. playerListItem.style.backgroundColor = 'blue';
  4557. } else {
  4558. playerListItem.style.backgroundColor = '';
  4559. };
  4560. // log(playerArray.find(player => player.name === playerListItem.textContent.slice(0, -3))?[H.hp]);
  4561. });
  4562. };
  4563. const highlightCrossHairReticleDot = function (bool) {
  4564. let dot = document.getElementById("reticleDot");
  4565. let crosshair = document.getElementById("crosshairContainer");
  4566. let setTo = '';
  4567. if (bool === true) {
  4568. setTo = "green";
  4569. } else if (bool === false) {
  4570. setTo = "red";
  4571. };
  4572. dot.style.backgroundColor = setTo;
  4573. Array.from(crosshair.children).forEach(part => {
  4574. part.style.backgroundColor = setTo;
  4575. });
  4576. };
  4577. const handleChat = function (textAfterLastColon) {
  4578. const responses = {
  4579. "report": "report me? pffft. i'm not even human",
  4580. "aimbot": "what aimboot?",
  4581. "bot": "you're a booooT",
  4582. "stop": "u stop",
  4583. "cheater": "Ho Ho Ho! Santa's Here! And I'm gonna give you a present! A ban! <AdminSpoof enabled>",
  4584. "cheat": "oh youre gonna cheat accuse? keep yapping",
  4585. "hack": "oh youre gonna cheat accuse? keep yapping",
  4586. "hax": "oh youre gonna cheat accuse? keep yapping",
  4587. "nice": "its not that good.",
  4588. "copy": "ERROR: maximum number of loops reached",
  4589. "stupid": "as an AI, i am much smarter than you.",
  4590. "dumb": "you cant calculate the square root of 967 as fast as i can",
  4591. "moron": "lets see you perform a billion operations a second",
  4592. "idiot": "to be fair, i cant talk as much as you",
  4593. "mod": "you can't defeat me?",
  4594. "admin": "you cant block irl",
  4595. "eggfor": "imagine ur in an argument irl and u try to call the mods",
  4596. "bro": "brooooo what",
  4597. "spam": "me, spamming? im just chatting",
  4598. "mute": "you dont want to listen to me talk? how weak hahaha",
  4599. "ban": "ban me? no free speech these days",
  4600. "message": "bleep bloop. are you a robot?",
  4601. "lol": "lolzedong",
  4602. "dude": "dudeinator3000: what is your request",
  4603. "what": "dude what",
  4604. "annoy": "im not that bad",
  4605. "mock": "im not doing anything wrong",
  4606. "wtf": "watch your profanity",
  4607. "bad": "ur not just bad at that",
  4608. "suck": "pretty sure you cant say that??",
  4609. "i'm": "yes you are",
  4610. "im": "yes you are",
  4611. "i am": "yes you are",
  4612. "u r": "no im not. proof?",
  4613. "you r": "no im not. proof?",
  4614. "you are": "no im not. proof?",
  4615. "you're": "no im not. proof?",
  4616. "do you": "truthfully, no i dont.",
  4617. "do u": "honestly, yes i do.",
  4618. "imagine": "imagine who asked",
  4619. "f u": "funny uncleburger",
  4620. "gg": "good grief",
  4621. "shut up": "B͇͈͉͍͎̽̾̿̀́͂̓̈́͆͊͋͌͗ͅ͏͎͗͏͇͇̽̾̿̀́̽̿̀̀́̽̀͆̓̈́̓͋͌ͅ͏͌͏͎͉͗͗͌̓̓̓̓̓́̿",
  4622. "shush": "cant be bothered to be quiet",
  4623. "nuh": "uh huh",
  4624. "proof": "after looking at this proof, i can confidently say its 100% fake.",
  4625. "real": "pretty sure its fake. you have no proof.",
  4626. "fake": "pretty sure its real. you have enough proof.",
  4627. "true": "its false. everyone knows this. why dont you?",
  4628. "false": "its true. everyone knows this. why dont you?",
  4629. "test": "testing me? do it on rats instead.",
  4630. "gift": "\"not everything in life is free\" - me, today",
  4631. "free": "\"not everything in life is free\" - me, today",
  4632. "toxic": "thats really rude",
  4633. "level": "[Your rank is: Subpar Human]",
  4634. "rank": "[Your rank is: Subpar Human]",
  4635. "clan": "[Your clan is: The Gay Nobodies]",
  4636. "smart": "well, i mean, i am quite clever..",
  4637. "clever": "well, i mean, i am quite clever..",
  4638. "hello": "i dont need your stupid greetings.",
  4639. "bye": "wa wa wa you'll see everyone later anyway",
  4640. "thank": "why are you so thankful? grow up!!",
  4641. "please": "you: \"please, please pleeease??\", why dont you PLEASE GET THE POINT",
  4642. "sorry": "why are you sorry all the time? just live your life.",
  4643. "help": "help yourself",
  4644. "kill": "more like kill everyone with the new godmode exploit",
  4645. "kys": "more like kill everyone with the new godmode exploit",
  4646. "kek": ":trol_4k:",
  4647. "bwd": "cool company. i have coffees with wizups every day",
  4648. "wiz": "E X H A U S T P I P E",
  4649. "stroke": "im just stroking",
  4650. "flip": "please dont say that my parents are watching",
  4651. "frick": "please dont say that im streaming rn",
  4652. "harri": "yeah i beat him in a 1v1, 10:1, very easy",
  4653. "chill": "you think i can just CALM DOWN?!?",
  4654. "stfu": "just reported u for swearing",
  4655. "look": "im looking but im not seeing",
  4656. "watch": "are you quite alright up there? i dont have EYES",
  4657. "yap": "i dont yap 😭",
  4658. "yip": "i dont yip 😢",
  4659. "bark": "i dont bark 💀",
  4660. "nigg": "WHOA we cant have racism in our egg game! tone it down yo",
  4661. "fuck": "phrase that more elegantly before talking to me",
  4662. "shit": "yea i ѕhit on ur grave. and ur friends' ones too.",
  4663. "piss": "ima be pisѕing on ur grave icl",
  4664. "dick": "i refuse to comment",
  4665. "sex": "i refuse to comment",
  4666. "pussy": "i refuse to comment",
  4667. "loser": "ive been speccing u, cheater",
  4668. "code": "A1BXDQ is the code",
  4669. "rip": "rest in small pieces",
  4670. "aight": "aight has a lot of letters for one syllable. think about it.",
  4671. "alright": "alright, pack it up boys",
  4672. "omg": "oh my GAWWWD!",
  4673. "npc": "literally you rn:",
  4674. "wth": "ur an npc",
  4675. "ayo": "ur an npc",
  4676. "yes": "no, what do you mean? elaborate you npc",
  4677. "bruh": "did you just say bruh? that is a racist remark",
  4678. "noob": "1v1 me you bot",
  4679. "lmfao": "who is this LMFAO, and is he working with LMBAO?",
  4680. "zert": "we're just better",
  4681. "huh": "huh, are u bot?",
  4682. "your mom": "Yo mama's so poor, she can't even afford to pay attention",
  4683. "your mum": "Yo mama's so poor, she can't even afford to pay attention",
  4684. "shut": "you shaddup you lil' twerrrrrrp",
  4685. "dang": "ching chong bing bong wing wong",
  4686. "trash": "you good sir, are rubbish",
  4687. "damn": "damns are for the fishies",
  4688. "care": "yes you do you bot",
  4689. "go away": "no, you go away u bot",
  4690. "...": "an ellipsis wooow you're so fancy i bet youre sooo smart",
  4691. "literally": "can you literally just be quiet",
  4692. "hah": "its not that funny, take a seat",
  4693. "leave": "i'll leave if you leave",
  4694. "hey": "hey is for horses",
  4695. "mess": "you might not want to mess with me",
  4696. "statefarm": "i am not using StateFarm, definitely not on greasyfork",
  4697. "client": "i am not using ЅtateFarm, definitely not on greasyfork",
  4698. "script": "i am not using ЅtateFarm, definitely not on greasyfork",
  4699. "troll": "yea i sometimes do trolling. but its not that funny",
  4700. "well done": "thanks g",
  4701. "patch": "the patch is coming soon..! sooner..!! soonest..!!!",
  4702. "phrase": "sorry if i have a somewhat \"mechanical\" manner of speech",
  4703. "response": "sorry if i have a somewhat \"mechanical\" manner of speech",
  4704. "commu": "404. response not found.",
  4705. "that was": "was it though?",
  4706. "that is": "is it though?",
  4707. "how": "i want to know too",
  4708. "shell": "thats what we're playing",
  4709. "weird": "ur odd",
  4710. "lag": "get better internet pooron lol",
  4711. "wth": "watch your heckin profanity",
  4712. "kid": "hi im chris hansen. why dont you take a seat for me?",
  4713. "pedo": "hi im chris hansen. why dont you take a seat for me?",
  4714. "minor": "hi im chris hansen. why dont you take a seat for me?",
  4715. "boy": "OH GOD YOU SAID BOY IM REPORTING YOU FOR SEXISM",
  4716. "girl": "OH GOD YOU SAID GIRL IM REPORTING YOU FOR SEXISM",
  4717. "monkey": "get outta ur rainforest",
  4718. "trash": "nah ur father took the recycling with him when he left",
  4719. "father": "look in a mirror for a lack of father figure",
  4720. "dad": "look in a mirror for a lack of father figure",
  4721. "mad": "imagine getting mad over an egg game",
  4722. "deathlylove": "he has a deathly love for men",
  4723. "better": "that's me",
  4724. "angry": "imagine getting angry over an egg game",
  4725. "sad": "imagine getting sad over an egg game",
  4726. "happy": "imagine getting happy over an egg game",
  4727. "love": "imagine feeling love in an egg game",
  4728. "hate": "imagine feeling hatred in an egg game",
  4729. "buck": "bucks arent even rare",
  4730. "flame": "ive got so many flames, i give them away",
  4731. "albino": "albinos are way too common. i just dont know what to do with them!",
  4732. "server": "the server is down",
  4733. "perfect": "i cant say i agree",
  4734. "think": "i cant say i agree",
  4735. "4k": "sorry, maximum resolution is 360p. upgrade to ЅtateFarm Pro for 480p!",
  4736. "gen": "sorry, this requires an active ЅtateFarm Pro subscription",
  4737. "tf": "toasted fries",
  4738. "1v1": 'no ew go away',
  4739. 'doescolder': 'doescolder is a cutie',
  4740. 'puppy': 'who?',
  4741. 'seq': 'seq is a cutie',
  4742. "black": "im not programmed to be racis- oops, no im not a bot",
  4743. "esp": "you think people can see thru walls? thats absurd",
  4744. "why": "why are you asking me? are you lonely?",
  4745. "?": "ask a better question",
  4746. "oh": "ohhhhhh yeahh!!!",
  4747. "no": "ohhhhhh yeeesss",
  4748. "@": "very clever lmaoo",
  4749. "ssh": "Enter statefarm_bot@192.168.0.18's password:",
  4750. "pass": "\\*grins, leans back into chair\\* We're in.",
  4751. };
  4752.  
  4753. const foundKeywords = Object.keys(responses).filter(keyword =>
  4754. textAfterLastColon.toLowerCase().includes(keyword.toLowerCase())
  4755. );
  4756.  
  4757. if (foundKeywords.length > 0) {
  4758. const firstKeyword = foundKeywords[0];
  4759. sendChatMessage(responses[firstKeyword]);
  4760. // log(firstKeyword);
  4761. return true;
  4762. };
  4763. return false;
  4764. };
  4765. const constructChatPacket = function (str) {
  4766. if (str.length > 255) {
  4767. log('%c UH OH UR PACKET IS TOO LONG!!!!', css);
  4768. str.length = 255;
  4769. };
  4770.  
  4771. var arr = new Uint8Array(2 * str.length + 2);
  4772. arr[0] = ss.SERVERCODES.chat;
  4773. arr[1] = str.length;
  4774.  
  4775. for (var i = 0; i < str.length; i++) {
  4776. arr[2 * i + 2] = str[i].charCodeAt(0) & 255;
  4777. arr[2 * i + 3] = str[i].charCodeAt(0) >> 8 & 255; // ripped straight outta packInt16
  4778. };
  4779. // log(arr);
  4780. return arr;
  4781. };
  4782. const extractChatPacket = function (packet) {
  4783. var pack_arr;
  4784. if (!(packet instanceof ArrayBuffer)) pack_arr = new Uint8Array(packet);
  4785. else pack_arr = packet;
  4786. var str = "";
  4787. for (var i = 0; i < pack_arr[1]; i++) {
  4788. str += String.fromCharCode(pack_arr[2 * i + 2] + (pack_arr[2 * i + 3] << 8)); // ripped straight outta unpackInt16 (thanks github copilot)
  4789. };
  4790. return str;
  4791. };
  4792. const chatPacketHandler = function (packet) {
  4793. let string = extractChatPacket(packet);
  4794. // if (string.includes(antiAFKString)) {
  4795. // log(packet)
  4796. // log("AntiAFK replacement...", string.originalReplace(antiAFKString, ""));
  4797. // var constructed = constructChatPacket(string.originalReplace(antiAFKString, ""));
  4798. // log(constructed)
  4799. // return constructed;
  4800. // };
  4801. return packet;
  4802. };
  4803. const modifyPacket = function (data) {
  4804. if (!ss || !ss.SERVERCODES || (data instanceof String)) { // avoid server comm, ping, etc. necessary to load
  4805. return data;
  4806. };
  4807.  
  4808.  
  4809. if (data.byteLength == 0) {
  4810. return data;
  4811. };
  4812.  
  4813. var arr = new Uint8Array(data);
  4814.  
  4815. // if (arr[0]!==17) {
  4816. // log(arr)
  4817. // };
  4818.  
  4819. if (arr[0] == ss.SERVERCODES.throwGrenade) { // comm code 27 = client to server grenade throw
  4820. if (extract("grenadeMax")) {
  4821. arr[1] = 255 * (0 || extract("grenadePower"));
  4822. log("StateFarm: modified a grenade packet to be at full power");
  4823. return arr.buffer;
  4824. } else {
  4825. log("StateFarm: didn't modify grenade packet")
  4826. };
  4827. } else if (arr[0] == ss.SERVERCODES.chat) {
  4828. log('%c Chat packet sent, chat handler!!!', css);
  4829. return chatPacketHandler(data);
  4830. } else {
  4831.  
  4832. };
  4833.  
  4834. return data;
  4835. };
  4836. //dead code
  4837. /*
  4838. const is39Packet = function (packetData) { // packet only sent if we are in-game
  4839. if (packetData instanceof String) { // avoid server comm, ping, etc. necessary to load
  4840. return false;
  4841. };
  4842.  
  4843. if (packetData.byteLength == 0) {
  4844. return false;
  4845. };
  4846.  
  4847. var arr = new Uint8Array(packetData);
  4848. return arr[0] == 39;
  4849. };
  4850. const ghostSpamToggle = function () { }
  4851. ghostSpamToggle.enabled = false;
  4852. */
  4853. WebSocket.prototype._send = WebSocket.prototype.send;
  4854. WebSocket.prototype.send = function (data) {
  4855. var modified = modifyPacket(data);
  4856. this._send(modified);
  4857.  
  4858. /*
  4859. if (is39Packet(data) && ghostSpamToggle.enabled) {
  4860. for (var i = 0; i < 5; i++) {
  4861. this._send(constructChatPacket("spammeroonie number #" + new Date().getTime() % 1000));
  4862. };
  4863. };
  4864. */
  4865. };
  4866.  
  4867. // [sfc] PREDICTION CODE
  4868.  
  4869. const predictBloom = function (yaw, pitch) { //outputs the difference in yaw/pitch from the bloom
  4870. let seed = ss.MYPLAYER[H.randomGen].seed;
  4871. let numbers = [];
  4872. const accuracy = ss.MYPLAYER.weapon.accuracy;
  4873. for (var i = 0; i < 3; i++) { //generate from seed the values used to scatter shot
  4874. seed = (seed * 9301 + 49297) % 233280;
  4875. numbers.push(((seed / 233280) - 0.5) * accuracy);
  4876. };
  4877. const range = ss.MYPLAYER.weapon.constructor.range;
  4878. const playerRotationMatrix = L.BABYLON.Matrix.RotationYawPitchRoll(yaw, pitch, 0);
  4879. const rangeMatrix = L.BABYLON.Matrix.Translation(0, 0, range);
  4880. const playerAndRangeMatrix = rangeMatrix.multiply(playerRotationMatrix);
  4881. const bloomMatrix = L.BABYLON.Matrix.RotationYawPitchRoll(numbers[0], numbers[1], numbers[2]);
  4882. const finalBulletMatrix = playerAndRangeMatrix.multiply(bloomMatrix);
  4883. const finalBulletTranslation = finalBulletMatrix.getTranslation();
  4884. const bulletYaw = calculateYaw(finalBulletTranslation);
  4885. const bulletPitch = calculatePitch(finalBulletTranslation);
  4886. const bulletYawDiff = radianAngleDiff(yaw, bulletYaw)
  4887. const bulletPitchDiff = radianAngleDiff(pitch, bulletPitch);
  4888.  
  4889. //log("current accuracy: ",accuracy)
  4890. //log("input yaw: ",yaw)
  4891. //log("input pitch: ",pitch)
  4892. //log("calculated bullet yaw: ",bulletYaw)
  4893. //log("calculated bullet pitch: ",bulletPitch)
  4894. //log("therefore yaw diff: ",bulletYawDiff)
  4895. //log("therefore pitch diff: ",bulletPitchDiff)
  4896.  
  4897. return [bulletYawDiff, bulletPitchDiff];
  4898. };
  4899. const applyBloom = function (dir, multiplier) { //multiplier can be set to -1 to invert
  4900. const bloomValues = predictBloom(dir.yawReal, dir.pitchReal);
  4901. return {
  4902. yawReal: dir.yawReal + (bloomValues[0] * multiplier),
  4903. pitchReal: dir.pitchReal + (bloomValues[1] * multiplier),
  4904. };
  4905. };
  4906. var velocityVector, newPos, cappedVector, rayVector; //assuming that reusing doesnt leak memory
  4907. const predictPosition = function (player) { //outputs the prediction for where a player will be in the time it takes for a bullet to reach them
  4908. velocityVector = velocityVector || new L.BABYLON.Vector3(0, 0, 0);
  4909. velocityVector.x = player.dx; velocityVector.y = player.dy; velocityVector.z = player.dz;
  4910. const bulletSpeed = ss.MYPLAYER.weapon.constructor.velocity;
  4911. const timeDiff = distancePlayers(player, 1) / bulletSpeed + 1;
  4912. newPos = newPos || new L.BABYLON.Vector3(0, 0, 0)
  4913. newPos.x = player[H.x], newPos.y = player[H.y], newPos.z = player[H.z],
  4914. newPos = newPos.add(velocityVector.scale(timeDiff));
  4915. newPos.y = player[H.y];
  4916. cappedVector = cappedVector || new L.BABYLON.Vector3(0, 0, 0);
  4917. cappedVector.x = velocityVector.x, cappedVector.y = 0.29, cappedVector.z = velocityVector.z;
  4918. Math.capVector3(cappedVector);
  4919. const terminalVelocity = -cappedVector.y;
  4920. const timeAccelerating = Math.min(timeDiff, (terminalVelocity - velocityVector.y) / -0.012);
  4921. 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.
  4922. const predictedY = velocityVector.y * timeAccelerating + timeAccelerating * (timeAccelerating) * -0.012 / 2 + newPos.y + terminalVelocity * Math.max(timeDiff - timeAccelerating, 0);
  4923. rayVector = rayVector || new L.BABYLON.Vector3(0, 0, 0);
  4924. rayVector.x = 0, rayVector.y = predictedY - newPos.y, rayVector.z = 0;
  4925. const rayToGround = ss.RAYS[H.rayCollidesWithMap](newPos, rayVector, ss.RAYS.grenadeCollidesWithCell);
  4926. newPos.y = Math.max(rayToGround ? rayToGround.pick.pickedPoint.y : 0, predictedY) - 0.072;
  4927. }
  4928. // log(velocityVector, bulletSpeed, timeDiff, cappedVector, terminalVelocity, timeAccelerating, predictedY, rayToGround, newPos);
  4929. return newPos;
  4930. };
  4931. const getLineOfSight = function (target, usePrediction) { //returns true if no wall collisions
  4932. // credit for code: de_neuublue/crackware
  4933. 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
  4934.  
  4935. let myPlayerPosition = ss.MYPLAYER[H.actor][H.mesh].position;
  4936. let targetPosition = extract("prediction") ? predictPosition(target) : target[H.actor][H.mesh].position; //set to always use prediction for now
  4937. // let targetPosition = usePrediction ? predictPosition(target) : target[H.actor][H.mesh].position;
  4938.  
  4939. let directionVector = getDirectionVectorFacingTarget(targetPosition, true);
  4940. //NOTE: i dont really know HOW good this is of a fix! at least it will only affect aimbot and not anything else :pensive:
  4941. directionVector.x = -directionVector.x;
  4942. directionVector.y = -directionVector.y;
  4943. directionVector.z = -directionVector.z;
  4944.  
  4945. let rotationMatrix = L.BABYLON.Matrix.RotationYawPitchRoll(calculateYaw(directionVector), calculatePitch(directionVector), 0);
  4946. let directionMatrix = L.BABYLON.Matrix.Translation(0, 0, ss.MYPLAYER.weapon.constructor.range).multiply(rotationMatrix);
  4947. directionVector = directionMatrix.getTranslation();
  4948. 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();
  4949.  
  4950. let rayCollidesWithMap = ss.RAYS[H.rayCollidesWithMap](position, directionVector, ss.RAYS.projectileCollidesWithCell);
  4951. let distanceToMap = rayCollidesWithMap ? L.BABYLON.Vector3.DistanceSquared(position, rayCollidesWithMap.pick.pickedPoint) : Infinity;
  4952. let distanceToTarget = L.BABYLON.Vector3.DistanceSquared(position, targetPosition)
  4953. return distanceToTarget < distanceToMap
  4954. };
  4955. const getAimbot = function (target) {
  4956. let targetPosition = extract("prediction") ? predictPosition(target) : target[H.actor][H.mesh].position;
  4957. let directionVector = getDirectionVectorFacingTarget(targetPosition, true, -0.05);
  4958.  
  4959. let direction = {
  4960. yawReal: calculateYaw(directionVector),
  4961. pitchReal: calculatePitch(directionVector),
  4962. };
  4963.  
  4964. if (extract("antiBloom") && ss.MYPLAYER.weapon.constructor.standardMeshName !== "dozenGauge") {
  4965. direction = applyBloom(direction, 1);
  4966. };
  4967.  
  4968. return direction;
  4969. };
  4970. var v1grenade, v2grenade, v3grenade, finalPos;
  4971. const predictGrenade = function (player = ss.MYPLAYER, grenadeThrowPower = 0) {
  4972. var rotMat = L.BABYLON.Matrix.RotationYawPitchRoll(player[H.yaw], -player[H.pitch], 0);
  4973. var vec = L.BABYLON.Matrix.Translation(0, .1, 1).multiply(rotMat).getTranslation();
  4974. var posMat = L.BABYLON.Matrix.Translation(0, -.10, -.1);
  4975. var pos = (posMat = (posMat = posMat.multiply(rotMat)).add(L.BABYLON.Matrix.Translation(player[H.x], player[H.y] + 0.3, player[H.z]))).getTranslation();
  4976. var speed = .13 * grenadeThrowPower + .08;
  4977.  
  4978. vec.x *= speed;
  4979. vec.y *= speed;
  4980. vec.z *= speed;
  4981. pos.x = Math.floor(256 * pos.x) / 256;
  4982. pos.y = Math.floor(256 * pos.y) / 256;
  4983. pos.z = Math.floor(256 * pos.z) / 256;
  4984. vec.x = Math.floor(256 * vec.x) / 256;
  4985. vec.y = Math.floor(256 * vec.y) / 256;
  4986. vec.z = Math.floor(256 * vec.z) / 256;
  4987.  
  4988. v1grenade = v1grenade || new L.BABYLON.Vector3();
  4989. v2grenade = v2grenade || new L.BABYLON.Vector3();
  4990. v3grenade = v3grenade || new L.BABYLON.Vector3();
  4991.  
  4992. var ttl = 75;
  4993. var resting = false;
  4994. var active = true;
  4995.  
  4996. var grenadeCollidesWithCell = ss.RAYS.grenadeCollidesWithCell;
  4997. var rayCollidesWithMap = ss.RAYS[H.rayCollidesWithMap];
  4998.  
  4999. var x = pos.x;
  5000. var y = pos.y;
  5001. var z = pos.z;
  5002. var dx = -vec.x*2;
  5003. var dy = vec.y*2;
  5004. var dz = -vec.z*2;
  5005.  
  5006. const update = function () {
  5007. // log("update", 1)
  5008. if (ttl <= 0) {
  5009. active = false;
  5010. return;
  5011. };
  5012. // log("update", 2)
  5013. if (!resting) {
  5014. var pdx2 = dx;
  5015. var pdy = dy;
  5016. var pdz2 = dz;
  5017. var ndx = 0.5 * (dx + pdx2);
  5018. var ndy = 0.5 * (dy + pdy);
  5019. var ndz = 0.5 * (dz + pdz2);
  5020. var vel = Math.length3(ndx, ndy, ndz);
  5021. // log("update", 3)
  5022. if (!collidesWithMap()) {
  5023. x += ndx;
  5024. y += ndy;
  5025. z += ndz;
  5026. dy -= 0.012;
  5027. // log("update", 4)
  5028. };
  5029. // log("update", 5)
  5030. dx *= 0.96;
  5031. dz *= 0.96;
  5032. };
  5033. };
  5034.  
  5035. const collidesWithMap = function () {
  5036. // log("collidesWithMap", 1)
  5037. v1grenade.set(x, y - 0.07, z);
  5038. v2grenade.set(dx, dy, dz);
  5039. v3grenade.set(dx, dy, dz);
  5040. // log("collidesWithMap", 2)
  5041. var res = rayCollidesWithMap(v1grenade, v2grenade, grenadeCollidesWithCell);
  5042. // log("collidesWithMap", 3)
  5043. if (res) {
  5044. // log("collidesWithMap", 3)
  5045. if (res.normal.y == 1 && v3grenade.length() < 0.05) {
  5046. // log("collidesWithMap", 4)
  5047. resting = true;
  5048. } else {
  5049. // log("collidesWithMap", 5)
  5050. v3grenade.subtractInPlace(res.normal.scale(1.6 * res.dot));
  5051. dx = v3grenade.x * 0.98;
  5052. dy = v3grenade.y;
  5053. dz = v3grenade.z * 0.98;
  5054. return res;
  5055. }
  5056. }
  5057. // log("collidesWithMap", 6)
  5058. return false;
  5059. };
  5060.  
  5061. // log(
  5062. // "pos", {
  5063. // x, y, z
  5064. // },
  5065. // "velocity", {
  5066. // dx, dy, dz
  5067. // },
  5068. // "speed", speed,
  5069. // "vec", vec,
  5070. // "ttl", ttl,
  5071. // "resting", resting,
  5072. // "active", active
  5073. // );
  5074.  
  5075. var result = {
  5076. positions: [],
  5077. finalPos: null,
  5078. };
  5079.  
  5080. // log("about to predict grenade");
  5081.  
  5082. while (active || ttl > 0) {
  5083. /*
  5084. log(
  5085. "pos", {
  5086. x, y, z
  5087. },
  5088. "velocity", {
  5089. dx, dy, dz
  5090. },
  5091. "speed", speed,
  5092. "vec", vec,
  5093. "ttl", ttl,
  5094. "resting", resting,
  5095. "active", active
  5096. );
  5097. */
  5098. // log(ttl, active, 1);
  5099. result.positions.push({x, y, z});
  5100. // log(ttl, active, 2);
  5101. update();
  5102. // log(ttl, active, 3);
  5103. ttl--;
  5104. // log(ttl, active, 4);
  5105. };
  5106.  
  5107. finalPos = finalPos || new L.BABYLON.Vector3();
  5108. finalPos.x = x; finalPos.y = y; finalPos.z = z;
  5109.  
  5110. result.finalPos = finalPos;
  5111.  
  5112. // log(result);
  5113.  
  5114. return result;
  5115. };
  5116.  
  5117. const setupNameSpriteNew = function (actor) {
  5118. let player = actor[H.player_];
  5119.  
  5120. // log("hrmmmm setupNameSpriteNew", player.name);
  5121.  
  5122. var tx = player.id % 4 * 512;
  5123. var ty = 2048 - Math.floor(player.id / 4) * 256;
  5124.  
  5125. if (actor && actor?.nameSprite && actor?.nameSprite?.color) {
  5126. ss.nameTexture.clearRect(tx, ty - 256, 512, 256);
  5127.  
  5128. let teamColorsNameSprite = [
  5129. "white",
  5130. "rgba(0, 191, 255, 1)",
  5131. "rgba(255, 64, 64, 1)",
  5132. ];
  5133.  
  5134. if (extract("nametagInfo")) {
  5135. actor.drawTextOnNameTexture(
  5136. player.name, // text
  5137. 0, 32, // x/y
  5138. 50, // size
  5139. teamColorsNameSprite[player.team], // colour
  5140. true // center
  5141. );
  5142.  
  5143. let health = player[H.hp] + player.hardBoiledValue;
  5144. let healthColour = (player.hardBoiledValue > 0) ? "blue" : (health > 30 ? "white" : "red");
  5145. if (player[H.hp] > 100) healthColour = "green";
  5146.  
  5147. //health (right side)
  5148. actor.drawTextOnNameTexture(
  5149. health.toFixed(0), // text
  5150. 85, 75, // x/y
  5151. 60, // size
  5152. healthColour, // colour
  5153. true // center
  5154. );
  5155.  
  5156. //current kills
  5157. actor.drawTextOnNameTexture(
  5158. player.score, // text
  5159. -95, 75, // x/y
  5160. 60, // size
  5161. "yellow", // colour
  5162. true // center
  5163. );
  5164.  
  5165. //streak and kdr (middle top)
  5166. actor.drawTextOnNameTexture(
  5167. `${player.bestGameStreak} | ${(Math.min(player.totalKills / (player.totalDeaths || 1), 99)).toFixed(1)}`, // text
  5168. -20, 100, // x/y
  5169. 25, // size
  5170. "yellow", // colour
  5171. true // center
  5172. );
  5173.  
  5174. //ammo (middle bottom)
  5175. actor.drawTextOnNameTexture(
  5176. `${player.weapon.ammo.rounds} / ${player.weapon.ammo.store}`, // text
  5177. -20, 75, // x/y
  5178. 25, // size
  5179. "yellow", // colour
  5180. true // center
  5181. );
  5182. } else {
  5183. actor.drawTextOnNameTexture(
  5184. player.name, // text
  5185. 0, 32, // x/y
  5186. 60, // size
  5187. "white", // colour
  5188. true // center
  5189. );
  5190. };
  5191. };
  5192. };
  5193. /*
  5194. const updateTeamNew = function (actor, oldUpdateTeam) {
  5195. log("aaaaaa updateTeamNew");
  5196. oldUpdateTeam();
  5197. actor.nameSprite.color = ss.teamColors.textColor[0];
  5198. };
  5199. */
  5200.  
  5201. const injectScript = function () {
  5202. //TODO: replace with anon functions
  5203. createAnonFunction('fixCamera', function () {
  5204. return isKeyToggled[bindsArray.zoom] && (extract("zoom") * (Math.PI / 180)) || (extract("fov") * (Math.PI / 180)) || 1.25;
  5205. });
  5206. createAnonFunction('getChatLimit', function () {
  5207. return (extract("chatExtend") && 999999) || 4;
  5208. });
  5209. createAnonFunction('getDisableChatFilter', function () {
  5210. return extract("disableChatFilter");
  5211. });
  5212. createAnonFunction('getSkinHack', function () {
  5213. try {
  5214. return extract("unlockSkins");
  5215. } catch {
  5216. return false;
  5217. };
  5218. });
  5219. createAnonFunction('getAdminSpoof', function () {
  5220. try {
  5221. return extract('adminSpoof');
  5222. } catch {
  5223. return false;
  5224. };
  5225. });
  5226. createAnonFunction('shouldNotCull', function () {
  5227. return true;
  5228. });
  5229. createAnonFunction('shouldInputSpace', function () {
  5230. return !document.activeElement.classList.contains('tp-txtv_i');
  5231. });
  5232. createAnonFunction('getPointerEscape', function () {
  5233. let verdict = (sneakyDespawning ? false : (noPointerPause || (unsafeWindow.extern.inGame && !document.getElementById("healthContainer").style.display == 'block')));
  5234. // log("verdict", verdict, sneakyDespawning, (noPointerPause || (unsafeWindow.extern.inGame && !document.getElementById("healthContainer").style.display == 'block')), noPointerPause, unsafeWindow.extern.inGame, !document.getElementById("healthContainer").style.display == 'block');
  5235. return verdict;
  5236. });
  5237. createAnonFunction('setNewGame', function () {
  5238. newGame = true; log("NEWGAME");
  5239. timeJoinedGame = Date.now();
  5240. if (ss.SCENE && ss.SCENE.skyboxTextureThing) ss.SCENE.skyboxTextureThing = false;
  5241. });
  5242. createAnonFunction('realPlayerData', function (playerData) {
  5243. cachedRealData[playerData[H.uniqueId_]] = {
  5244. name: playerData[H.name_],
  5245. uniqueId: playerData[H.uniqueId_],
  5246. };
  5247. });
  5248. createAnonFunction('interceptSignedIn', function (args) {
  5249. if (extract("debug")) log("signedIn", args);
  5250. });
  5251. createAnonFunction('interceptGa', function () {
  5252. if (arguments['3'] == 'Reward item') {
  5253. let itemName = arguments['4'].slice(0, -4);
  5254. let tier = arguments['4'].slice(-1);
  5255.  
  5256. let accountRecords = GM_getValue("StateFarm_AccountRecords") || {};
  5257. let itemCount = 0;
  5258. Object.entries(accountRecords).forEach(([key, account]) => {
  5259. if (account) {
  5260. account.inventory.forEach(item=>{
  5261. if (item.name == itemName) {
  5262. itemCount++
  5263. };
  5264. });
  5265. };
  5266. });
  5267.  
  5268. log(`[${unsafeWindow.extern.account.inventory.length}, ${unsafeWindow.extern.account.currentBalance}] SFcw result: item: ${itemName} is tier ${tier} (${itemCount} of this item)`);
  5269. let tierCache = GM_getValue("StateFarm_TierCache") || {};
  5270. tierCache[itemName] = tier;
  5271. GM_setValue("StateFarm_TierCache", tierCache);
  5272. };
  5273. if (arguments['3'] == 'Reward amount') {
  5274. log(`[${unsafeWindow.extern.account.inventory.length}, ${unsafeWindow.extern.account.currentBalance}] SFcw result: eggs: ${arguments['4']}`);
  5275. };
  5276. if (arguments['3'] == 'Reward') {
  5277. log(`[${unsafeWindow.extern.account.inventory.length}, ${unsafeWindow.extern.account.currentBalance}] SFcw reward: ${arguments['4']}`);
  5278. };
  5279. 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?
  5280. });
  5281. createAnonFunction('interceptDeath', (KILLER, DEAD) => {
  5282. if (DEAD.name === KILLER.name === ss.MYPLAYER.name) return; // killed self (with grenade)
  5283.  
  5284. if (DEAD.name == ss.MYPLAYER.name) { // you died
  5285. if (extract("cheatAccuse")) sendChatMessage(`${KILLER.name} might be cheating, everyone report`);
  5286. } else if (KILLER.name == ss.MYPLAYER.name) { // you killed someone
  5287. unsafeWindow.BAWK.play("on_killed_enemy");
  5288. if (extract("autoEZ")) sendChatMessage(`imagine dying ${DEAD.name}, couldn't be me`);
  5289. };
  5290. });
  5291. createAnonFunction('interceptDrawTextOnNameTexture', (nameTexture, args, player) => {
  5292. // log("balls", args[0], player, nameTexture, [args]);
  5293. nameTextures[args[0]] = [nameTexture, [args]];
  5294. });
  5295. createAnonFunction('interceptAudio', function (name, panner, somethingelse) {
  5296. // log(0, name, panner, somethingelse);
  5297. let customAudio = soundsSFC[name];
  5298. if (panner && panner.positionX && extract("distanceMult") !== 1) {
  5299. panner.setPosition(
  5300. panner.context.listener.positionX.value - ((panner.context.listener.positionX.value - panner.positionX.value) * extract("distanceMult")),
  5301. panner.context.listener.positionY.value - ((panner.context.listener.positionY.value - panner.positionY.value) * extract("distanceMult")),
  5302. panner.context.listener.positionZ.value - ((panner.context.listener.positionZ.value - panner.positionZ.value) * extract("distanceMult")),
  5303. );
  5304. };
  5305. if (extract("muteGame")) {
  5306. name = "silence";
  5307. } else if (customAudio) {
  5308. if (customAudio.disablePanning) {
  5309. playAudio(name);
  5310. } else {
  5311. playAudio(name, panner);
  5312. };
  5313. name = "silence";
  5314. };
  5315. return [name, panner, somethingelse];
  5316. });
  5317. createAnonFunction('beforeFiring', function (MYPLAYER) {
  5318. if (extract("aimbot") && (extract("aimbotRightClick") ? isRightButtonDown : true) && (targetingComplete || extract("silentAimbot")) && ss.MYPLAYER[H.playing] && currentlyTargeting && currentlyTargeting[H.playing]) {
  5319. const aimbot = getAimbot(currentlyTargeting);
  5320. // credit for code: de_neuublue
  5321. let diffYaw = Math.radDifference(ss.MYPLAYER[H.yaw], aimbot.yawReal) * 180 / Math.PI;
  5322. let diffPositive = diffYaw > 0 // a turn to the left if positive
  5323. diffYaw *= diffPositive ? 1 : -1;
  5324. for (let i = 0; i < 3; i++) {
  5325. let state = ss.MYPLAYER[H.stateBuffer][Math.mod(ss.MYPLAYER.stateIdx - i, 256)];
  5326. let newControlKeys = 0;
  5327. if (diffYaw > 157.5) {
  5328. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.left ? ss.CONTROLKEYSENUM.right : 0
  5329. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.right ? ss.CONTROLKEYSENUM.left : 0
  5330. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.up ? ss.CONTROLKEYSENUM.down : 0
  5331. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.down ? ss.CONTROLKEYSENUM.up : 0
  5332. } else if (diffYaw > 112.5) {
  5333. if (diffPositive) {
  5334. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.left ? ss.CONTROLKEYSENUM.up + ss.CONTROLKEYSENUM.right : 0
  5335. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.right ? ss.CONTROLKEYSENUM.down + ss.CONTROLKEYSENUM.left : 0
  5336. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.up ? ss.CONTROLKEYSENUM.down + ss.CONTROLKEYSENUM.right : 0
  5337. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.down ? ss.CONTROLKEYSENUM.up + ss.CONTROLKEYSENUM.left : 0
  5338. } else {
  5339. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.left ? ss.CONTROLKEYSENUM.down + ss.CONTROLKEYSENUM.right : 0
  5340. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.right ? ss.CONTROLKEYSENUM.up + ss.CONTROLKEYSENUM.left : 0
  5341. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.up ? ss.CONTROLKEYSENUM.down + ss.CONTROLKEYSENUM.left : 0
  5342. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.down ? ss.CONTROLKEYSENUM.up + ss.CONTROLKEYSENUM.right : 0
  5343. }
  5344. } else if (diffYaw > 67.5) {
  5345. if (diffPositive) {
  5346. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.left ? ss.CONTROLKEYSENUM.up : 0
  5347. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.right ? ss.CONTROLKEYSENUM.down : 0
  5348. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.up ? ss.CONTROLKEYSENUM.right : 0
  5349. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.down ? ss.CONTROLKEYSENUM.left : 0
  5350. } else {
  5351. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.left ? ss.CONTROLKEYSENUM.down : 0
  5352. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.right ? ss.CONTROLKEYSENUM.up : 0
  5353. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.up ? ss.CONTROLKEYSENUM.left : 0
  5354. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.down ? ss.CONTROLKEYSENUM.right : 0
  5355. }
  5356. } else if (diffYaw > 22.5) {
  5357. if (diffPositive) {
  5358. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.left ? ss.CONTROLKEYSENUM.up + ss.CONTROLKEYSENUM.left : 0
  5359. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.right ? ss.CONTROLKEYSENUM.down + ss.CONTROLKEYSENUM.right : 0
  5360. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.up ? ss.CONTROLKEYSENUM.up + ss.CONTROLKEYSENUM.right : 0
  5361. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.down ? ss.CONTROLKEYSENUM.down + ss.CONTROLKEYSENUM.left : 0
  5362. } else {
  5363. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.left ? ss.CONTROLKEYSENUM.down + ss.CONTROLKEYSENUM.left : 0
  5364. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.right ? ss.CONTROLKEYSENUM.up + ss.CONTROLKEYSENUM.right : 0
  5365. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.up ? ss.CONTROLKEYSENUM.up + ss.CONTROLKEYSENUM.left : 0
  5366. newControlKeys |= ss.CONTROLKEYS & ss.CONTROLKEYSENUM.down ? ss.CONTROLKEYSENUM.down + ss.CONTROLKEYSENUM.right : 0
  5367. };
  5368. };
  5369. // log(ss.CONTROLKEYS, newControlKeys);
  5370. state.controlKeys |= newControlKeys;
  5371. state[H.yaw] = setPrecision(aimbot.yawReal);
  5372. state[H.pitch] = setPrecision(aimbot.pitchReal);
  5373. ss.MYPLAYER[H.stateBuffer][Math.mod(ss.MYPLAYER.stateIdx - i, 256)] = state;
  5374. };
  5375. if(extract("aimbSemiSilent") && extract("silentAimbot")){
  5376. ss.MYPLAYER[H.yaw] = getAimbot(currentlyTargeting).yawReal;
  5377. ss.MYPLAYER[H.pitch] = getAimbot(currentlyTargeting).pitchReal;
  5378. }
  5379. log("force update?");
  5380. ss.SERVERSYNC();
  5381. };
  5382. });
  5383. createAnonFunction('onConnectFail', function (ERRORCODE, ERRORARRAY) {
  5384. const terminationMessage = findKeyByValue(ERRORARRAY, ERRORCODE); //don't want to fuck with errorString so here's a new var!
  5385. if (ERRORCODE !== ERRORARRAY.mainMenu) {
  5386. errorString = terminationMessage;
  5387. log("StateFarm has detected a connection error...", errorString, ERRORCODE, ERRORARRAY);
  5388. if (document.getElementById("genericPopup").textContent === ' Game Not Found Sorry! This game ID is either invalid, or no longer exists. OK ') {
  5389. document.getElementById("genericPopup").children[1].textContent = 'joinCode not found! check your autoJoin settings and get a new code';
  5390. document.getElementById("genericPopup").children[2].children[1].textContent = "heeheeheehaw";
  5391. document.getElementById("genericPopup").children[0].children[1].textContent = 'MAKE NEW AUTOJOIN CODE';
  5392. };
  5393. if (extract("autoUnban") && (errorString == "sessionNotFound" || errorString == "readyBeforeReady")) {
  5394. if (!attemptedAutoUnban) {
  5395. isBanned = true;
  5396. } else if (isBanned) {
  5397. log("StateFarm: Gonna refresh, could be banned but you can't play with this error anyways.");
  5398. createPopup("AutoUnban: Reloading page in 5 seconds...");
  5399. attemptedAutoUnban = true;
  5400. setTimeout(() => {
  5401. if (extract("autoUnban")) { //you get a bit of time to stop it
  5402. createPopup("AutoUnban: Reloading page now.");
  5403. reloadPage(); attemptedAutoUnban = false;
  5404. } else {
  5405. createPopup("AutoUnban: Reload page cancelled.");
  5406. };
  5407. }, 5000);
  5408. };
  5409. };
  5410. createPopup("Leaving due to connection error " + ERRORCODE + " (" + errorString + ")" + ".");
  5411. change("leaveGame");
  5412. };
  5413. //GAME HISTORY gr
  5414. if(!GAMECODE || GAMECODE==undefined) return;
  5415. const HISTORY_MAX_ENTRIES = 6;
  5416. let history = GM_getValue("StateFarm_GameHistory");
  5417. if(history) history = JSON.parse(history); //should be an ARRAY kxdnfgoisdhngfiosdhjgoisdhgfjo
  5418. if(!history) history = [];
  5419. const recent = history[0]; // first indeX
  5420. if(history.length>0 && recent.code && recent.code == GAMECODE){
  5421. ++recent.amount;
  5422. recent.time = Date.now();
  5423. recent.message = terminationMessage;
  5424. recent.closeCode = ERRORCODE;
  5425. } else {
  5426. const arrElem = {
  5427. amount: 1,
  5428. code: GAMECODE,
  5429. string: getRoomAsString(),
  5430. time: Date.now(),
  5431. message: terminationMessage,
  5432. closeCode: ERRORCODE
  5433. };
  5434. history.unshift(arrElem);
  5435. }
  5436. while(history.length > HISTORY_MAX_ENTRIES) history.pop();
  5437. GM_setValue("StateFarm_GameHistory", JSON.stringify(history));
  5438. });
  5439. createAnonFunction('modifyChat', function (msg) {
  5440. if (msg[0] === '%') { //message is a command
  5441. let command = msg.slice(1);
  5442. msg = ""; //dont send anything
  5443. if (command != "pts") {
  5444. broadcastToBots(command);
  5445. } else {
  5446. handleCommand('pathtarget set 9 1 9')
  5447. }
  5448. } else {
  5449. if (msg !== lastSentMessage) { //not spammed or afked
  5450. //NOTE: never, NEVER, never under any otherworldly circumstances use Notepad++ for editing nested stuff like this. IT WILL FUCK UP THE FORMATTING
  5451. //ITS STILL FUCKED UP IN THE GH EDITOR WTF PLEASE END ME
  5452. //TODO: FIX THIS FUCKING FORMATTING fuckfuckFUCK
  5453. if(extract("chatFilterBypass")) msg=msg.replaceAll("fuck", "ꬵսсk"); //special case bc they check f.ck; this basically just gets the f from the nonexacts.
  5454. if (extract("chatFilterBypass") && ss.isBadWord(msg)) { //apply filter bypass
  5455. //#freedomOfSpeech #againstInternetCensorship
  5456. //Bl*e W*zard D*gital will not c*nsor me!!!!!
  5457. const exactLookAlikes = {
  5458. //(almost) exact lookalikes, will make it look better if it is enough
  5459. 'a': 'а', 'c': 'с', 'e': 'е',
  5460. 'h': 'հ', 'i': 'і', 'j': 'ј',
  5461. 'n': '𝗇', 'o': 'о', 'p': 'р',
  5462. 'q': 'q', 'u': 'ս', 'w': 'ԝ',
  5463. 'y': 'у',
  5464. //uppercase
  5465. 'B': 'В', 'D': 'ꓓ', 'E': 'Е',
  5466. 'H': 'Η', 'I': 'І', 'J': 'Ј',
  5467. 'U': '𐓎',
  5468. 'V': 'ⴸ', 'W': 'Ԝ', 'X': 'Χ', 'Y': 'Υ',
  5469. 'Z': 'Ζ',
  5470. };
  5471. const lookAlikes = {
  5472. //nvm, found this complete list on reddit: https://www.reddit.com/r/Unicode/comments/gpgmb7/unique_unicode_chars_that_look_the_exact_same_as/
  5473. //should literally cover 100% of the thing now, still keeping fallback though
  5474. '0': 'O',
  5475. '1': '𝟷', '2': '𝟸', '3': 'Ꝫ', '4': '4',
  5476. '5': '𝟻', '6': '𝟨', '7': '𝟽', '8': '𝟪',
  5477. '9': '𝟫', '@': '@',
  5478. 'b': 'ᖯ',
  5479. 'd': '𝚍', 'f': 'ꬵ', 'g': '𝗀',
  5480. 'k': '𝚔',
  5481. 'l': 'ⅼ', 'm': 'm', 'r': '𝗋', 's': '𐑈',
  5482. 't': '𝚝', 'v': '∨',
  5483. 'x': 'ⅹ', 'z': '𝗓', 'A': '𐊠',
  5484. 'C': '𐊢',
  5485. 'F': '𐊇', 'G': 'Ԍ', 'K': 'Κ', 'L': 'Ⅼ', 'M': 'Μ',
  5486. 'N': 'Ν', 'O': 'Ο', 'P': 'Ρ', 'Q': '𝖰',
  5487. 'R': '𖼵', 'S': 'Ѕ', 'T': 'Τ',
  5488. };
  5489. let onlyReplace = msg;
  5490. //exact
  5491. for (let char in exactLookAlikes) {
  5492. //replace all chars with lookalikes
  5493. onlyReplace = onlyReplace.replaceAll(char, exactLookAlikes[char]);
  5494. };
  5495. //did that work?
  5496. if(ss.isBadWord(onlyReplace)){
  5497. log("chatFilterBypass: exacts were not enough, trying full...");
  5498. for (let char in lookAlikes) {
  5499. onlyReplace = onlyReplace.replaceAll(char, lookAlikes[char]);
  5500. };
  5501. };
  5502. if(!ss.isBadWord(onlyReplace)){
  5503. //did the lookalike replace do the job? Set it as the new message
  5504. log("chatFilterBypass: lookalike replace worked!");
  5505. msg = onlyReplace;
  5506. };
  5507. if(ss.isBadWord(onlyReplace)){
  5508. //if lookalike replace did NOT work, we use the old method.
  5509. log("chatFilterBypass: lookalike did NOT work, falling back to reverse...");
  5510. const UNICODE_RTL_OVERRIDE = '\u202e'
  5511. msg = ([UNICODE_RTL_OVERRIDE,].concat(reverseString(msg).split(""))).join("");
  5512. };
  5513. };
  5514. };
  5515. if (extract("tallChat") && !(msg.includes("᥊"))) {
  5516. msg = msg + "᥊";
  5517. };
  5518. };
  5519. return msg;
  5520. });
  5521. createAnonFunction('modifyControls', function (CONTROLKEYS) {
  5522. // if (AUTOMATED) { CONTROLKEYS=0 };
  5523. if (startUpComplete) {
  5524. if (forceControlKeys) {
  5525. forceControlKeysCache = true;
  5526. return forceControlKeys;
  5527. } else if (forceControlKeysCache) {
  5528. forceControlKeysCache = false;
  5529. return 0;
  5530. } else {
  5531. if (extract("autoWalk")) { CONTROLKEYS |= ss.CONTROLKEYSENUM.up };
  5532. // credit for code: de_neuublue
  5533. if (extract("bunnyhop") && isKeyToggled.Space) {
  5534. CONTROLKEYS |= ss.CONTROLKEYSENUM.jump;
  5535. };
  5536. if (extract("autoJump")) {
  5537. if (Date.now() > (lastAutoJump + extract("autoJumpDelay"))) {
  5538. CONTROLKEYS |= ss.CONTROLKEYSENUM.jump;
  5539. lastAutoJump = Date.now();
  5540. };
  5541. };
  5542. if (extract("autoStrafe")) {
  5543. if (Date.now() > (autoStrafeValue[0])) {
  5544. if (autoStrafeValue[1] == 0) { //decide new strafe delay
  5545. autoStrafeValue[0] = Date.now() + randomInt(500, 3000);
  5546. autoStrafeValue[2] = (Math.random() > 0.5) ? "left" : "right";
  5547. autoStrafeValue[1] = 1;
  5548. } else if (autoStrafeValue[1] == 1) { //time to start strafe
  5549. autoStrafeValue[3] = Date.now() + randomInt(500, 2000);
  5550. autoStrafeValue[1] = 2;
  5551. } else if (autoStrafeValue[1] == 2 && Date.now() < autoStrafeValue[3]) { //do strafe
  5552. CONTROLKEYS |= ss.CONTROLKEYSENUM[autoStrafeValue[2]];
  5553. } else if (autoStrafeValue[1] == 2) { //stop strafe
  5554. CONTROLKEYS &= ~ss.CONTROLKEYSENUM.left;
  5555. CONTROLKEYS &= ~ss.CONTROLKEYSENUM.right;
  5556. autoStrafeValue[1] = 0;
  5557. };
  5558. };
  5559. };
  5560. return CONTROLKEYS;
  5561. };
  5562. };
  5563. });
  5564. createAnonFunction('adBlocker', function (input) {
  5565. if (input == 10 && sneakyDespawning) {
  5566. return 1;
  5567. } else if (extract("adBlock")) {
  5568. if (typeof (input) == 'boolean') {
  5569. return true;
  5570. } else if (input == 10) {
  5571. return 5;
  5572. } else if (input == "adsBlocked") {
  5573. return false;
  5574. };
  5575. };
  5576. return input;
  5577. });
  5578. createAnonFunction("quickRespawn", function (input) {
  5579. if (input == 3e3) {
  5580. return sneakyDespawning ? 0 : 3e3;
  5581. } else if (input == 5 && sneakyDespawning) {
  5582. return 1;
  5583. } else if (extract("quickRespawn")) {
  5584. if (input == 5) {
  5585. return 4;
  5586. };
  5587. };
  5588. return input;
  5589. });
  5590. createAnonFunction('gameBlacklisted', function (t) {
  5591. let result = false;
  5592. if (blacklistedGameCodes.length >= 1) {
  5593. blacklistedGameCodes.forEach(function (code) {
  5594. if (t.id == code) {
  5595. log("Blacklisted Game: ", t.id, code);
  5596. result = true;
  5597. return true;
  5598. }
  5599. });
  5600. };
  5601.  
  5602. return extract('gameBlacklist') == false || extract('gameBlacklist') == undefined ? false : result;
  5603. });
  5604. createAnonFunction("getParticleSpeedMultiplier", function(){
  5605. return extract("particleSpeedMultiplier");
  5606. });
  5607.  
  5608.  
  5609. const originalXHROpen = XMLHttpRequest.prototype.open; //wtf??? libertymutual collab??????
  5610. const originalXHRGetResponse = Object.getOwnPropertyDescriptor(XMLHttpRequest.prototype, 'response');
  5611. let shellshockjs;
  5612. XMLHttpRequest.prototype.open = function (...args) { //outgoing
  5613. const url = args[1];
  5614. try {
  5615. if (extract("debug")) log("====XMLHTTPREQUEST====", url, args);
  5616. } catch (error) { }; //phooey.
  5617. if (url) {
  5618. let refresh = `?${Date.now()}`;
  5619.  
  5620. if (url.includes("js/shellshock.js")) shellshockjs = this;
  5621.  
  5622. let replaceFeeds = false;
  5623. try {
  5624. replaceFeeds = extract("replaceFeeds");
  5625. } catch (error) { };
  5626. if (replaceFeeds) {
  5627. if (url.includes("data/shellYouTube.json")) args[1] = replacementFeedURL+"shellYouTube.json"+refresh;
  5628. else if (url.includes("data/shellNews.json")) args[1] = replacementFeedURL+"shellNews.json"+refresh;
  5629. };
  5630. };
  5631. originalXHROpen.apply(this, args);
  5632. };
  5633. Object.defineProperty(XMLHttpRequest.prototype, 'response', { //incoming
  5634. get: function () {
  5635. if (this === shellshockjs) {
  5636. return applyStateFarm(originalXHRGetResponse.get.call(this));
  5637. };
  5638. return originalXHRGetResponse.get.call(this);
  5639. }
  5640. });
  5641. const applyStateFarm = function (js) {
  5642. log('%cATTEMPTING TO START STATEFARM', 'color: magenta; font-weight: bold; font-size: 1.5em; text-decoration: underline;');
  5643. let match;
  5644. let clientKeys;
  5645.  
  5646. let originalJS = js;
  5647. if (typeof isCrackedShell !== 'undefined') originalJS = fetchTextContent('/js/shellshock.og.js');
  5648.  
  5649. const getVardata = function (hash) {
  5650. return fetchTextContent(clientKeysURL + hash + ".json?v=" + Date.now());
  5651. };
  5652.  
  5653. hash = L.CryptoJS.SHA256(originalJS).toString(L.CryptoJS.enc.Hex); // eslint-disable-line
  5654. onlineClientKeys = getVardata(hash);
  5655.  
  5656. const vardataCache = GM_getValue("StateFarm_VarDataCache") || {};
  5657. const previousHash = GM_getValue("StateFarm_PreviousHash") || "";
  5658.  
  5659. if (onlineClientKeys == "value_undefined" || onlineClientKeys == null) {
  5660. onlineClientKeys = getVardata("latest");
  5661.  
  5662. const vardataFallback = extract("vardataFallback");
  5663. const customVarData = extract("vardataCustom");
  5664. let vardataType = extract("vardataType");
  5665.  
  5666. if (vardataType == "justOnce") change("vardataType", 0);
  5667. if (vardataType == "nextHash" && hash !== previousHash) {
  5668. change("vardataType", 0);
  5669. vardataType = "never";
  5670. };
  5671.  
  5672. let convertedCustom;
  5673.  
  5674. try {
  5675. convertedCustom = JSON.parse(customVarData);
  5676. log("did convert");
  5677. } catch (e) {
  5678. log("did not convert");
  5679. convertedCustom = false;
  5680. };
  5681.  
  5682. const cachedForHash = vardataCache && vardataCache[hash];
  5683. const cachedRecent = vardataCache && vardataCache.latest;
  5684.  
  5685. log(cachedForHash, cachedRecent)
  5686.  
  5687. if (vardataType != "never" && convertedCustom && vardataFallback == "loadCustom" && convertedCustom.vars && convertedCustom.checksum) {
  5688. clientKeys = convertedCustom;
  5689. } else if (vardataType != "never" && onlineClientKeys && vardataFallback == "loadLatest") {
  5690. //l8er dealt with
  5691. } else if (vardataType != "never" && cachedForHash && vardataFallback == "loadCached") {
  5692. clientKeys = JSON.parse(cachedForHash);
  5693. } else if (vardataType != "never" && cachedRecent && vardataFallback == "loadRecent") {
  5694. clientKeys = JSON.parse(cachedRecent);
  5695. } else {
  5696. const vardataButtonsInfo = [
  5697. { id: 'loadLatest', enabled: !!onlineClientKeys, text: 'Load Latest\n(online)', action: () => {
  5698. change("vardataFallback", 1);
  5699. if (extract("vardataType") == "never") change("vardataType", 1);
  5700. closeVardataPopup();
  5701. }},
  5702. { id: 'loadCached', enabled: !!vardataCache[hash], text: 'Load Cached\n(this hash)', action: () => {
  5703. change("vardataFallback", 2);
  5704. if (extract("vardataType") == "never") change("vardataType", 1);
  5705. closeVardataPopup();
  5706. }},
  5707. { id: 'loadRecent', enabled: !!vardataCache.latest, text: 'Load Cached\n(most recent)', action: () => {
  5708. change("vardataFallback", 3);
  5709. if (extract("vardataType") == "never") change("vardataType", 1);
  5710. closeVardataPopup();
  5711. }}
  5712. ];
  5713.  
  5714. createVarDataPopup(vardataButtonsInfo);
  5715. return;
  5716. };
  5717. };
  5718.  
  5719. if (onlineClientKeys && !clientKeys) clientKeys = JSON.parse(onlineClientKeys);
  5720.  
  5721. GM_setValue("StateFarm_PreviousHash", hash);
  5722.  
  5723. if (vardataCache && onlineClientKeys) {
  5724. vardataCache[clientKeys.checksum] = onlineClientKeys;
  5725. vardataCache.latest = onlineClientKeys;
  5726. GM_setValue("StateFarm_VarDataCache", vardataCache);
  5727. };
  5728.  
  5729. // removed feature
  5730. // log("maybe they did a hash??");
  5731. // try {
  5732. // const archivedJS = fetchTextContent(`${jsArchiveURL}${userInput}.js`);
  5733. // log("did that just work??");
  5734. // js = archivedJS;
  5735. // hash = userInput.split("_")[5];
  5736. // onlineClientKeys = getVardata(hash);
  5737. // clientKeys = JSON.parse(onlineClientKeys);
  5738. // } catch {
  5739. // //at this point, fuck it. it's not happening
  5740. // };
  5741.  
  5742. log(hash, onlineClientKeys, clientKeys);
  5743.  
  5744. H = clientKeys.vars;
  5745.  
  5746. let injectionString = "";
  5747.  
  5748. try {
  5749. //SERVERSYNC
  5750. match = new RegExp(`!${H.CULL}&&(.+?\\}\\})`).exec(js);
  5751. log("SERVERSYNC:", match);
  5752. H.SERVERSYNC = match ? match[1].replace(/[a-zA-Z$_\.\[\]]+shots/, 0) : "function(){log('no serversync womp womp')}";
  5753. //PAUSE
  5754. match = new RegExp(`,setTimeout\\(\\(\\(\\)=>\\{([=A-z0-9\\(\\),\\{ \\.;!\\|\\?:\\}]+send\\([a-zA-Z$_]+\\))`).exec(js);
  5755. log("PAUSE:", match);
  5756. H.PAUSE = match ? `function(){${match[1]}}` : "function(){log('no pause womp womp')}";
  5757. const variableNameRegex = /^[a-zA-Z0-9_$\[\]"\\]*$/;
  5758. for (let name in H) {
  5759. let deobf = H[name];
  5760. if (name == "SERVERSYNC" || name == "PAUSE" || variableNameRegex.test(deobf)) { //serversync should only be defined just before...
  5761. injectionString = `${injectionString}${name}: (() => { let variable = "value_undefined"; try { eval("variable = ${deobf};"); } catch (error) { return "value_undefined"; }; return variable; })(),`;
  5762. } else {
  5763. 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.");
  5764. log("REPORT THIS IN THE DISCORD SERVER:", name, deobf, clientKeys);
  5765. const crashplease = "balls";
  5766. crashplease = "balls2";
  5767. };
  5768. };
  5769. log('%cSTATEFARM INJECTION STAGE 1: GATHER VARS', 'color: yellow; font-weight: bold; font-size: 1.2em; text-decoration: underline;');
  5770. const modifyJS = function (find, replace) {
  5771. let oldJS = js;
  5772. try {
  5773. js = js.originalReplaceAll(find, replace);
  5774. } catch (err) {
  5775. 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;');
  5776. };
  5777. if (oldJS !== js) {
  5778. log("%cReplacement successful! Injected code: replaced: " + find + " with: " + replace, 'color: green; font-weight: bold; font-size: 0.6em; text-decoration: italic;');
  5779. } else {
  5780. log("%cReplacement failed! Attempted to replace " + find + " with: " + replace, 'color: red; font-weight: bold; font-size: 0.6em; text-decoration: italic;');
  5781. };
  5782. };
  5783. const f = function (varName) { return varName.replace("$", "\\$") };
  5784. log('%cSTATEFARM INJECTION STAGE 2: INJECT VAR RETRIEVAL FUNCTION AND MAIN LOOP', 'color: yellow; font-weight: bold; font-size: 1.2em; text-decoration: underline;');
  5785. //hook for main loop function in render loop
  5786. modifyJS(f(H.SCENE) + '.' + f(H.render), `window["${functionNames.retrieveFunctions}"]({${injectionString}},true)||${f(H.SCENE)}.render`);
  5787. modifyJS('log("After Game Ready"),', `log("After Game Ready"),window["${functionNames.retrieveFunctions}"]({${injectionString}}),`);
  5788. log('%cSuccess! Variable retrieval and main loop hooked.', 'color: green; font-weight: bold;');
  5789. log('%cSTATEFARM INJECTION STAGE 3: INJECT CULL INHIBITION', 'color: yellow; font-weight: bold; font-size: 1.2em; text-decoration: underline;');
  5790. //stop removal of objects
  5791. modifyJS(`${f(H.CULL)})r`, `${functionNames.shouldNotCull}())r`);
  5792. log('%cSuccess! Cull inhibition hooked ' + f(H.CULL), 'color: green; font-weight: bold;');
  5793. log('%cSTATEFARM INJECTION STAGE 4: INJECT OTHER FUNCTIONS', 'color: yellow; font-weight: bold; font-size: 1.2em; text-decoration: underline;');
  5794. //hook for modifications just before firing
  5795. modifyJS('fire(){var', 'fire(){window.' + functionNames.beforeFiring + '(this.player);var');
  5796. //hook for fov mods
  5797. modifyJS(/\.fov\s*=\s*1\.25/g, '.fov = window.' + functionNames.fixCamera + '()');
  5798. modifyJS(/\.fov\s*\+\s*\(1\.25/g, '.fov + (window.' + functionNames.fixCamera + '()');
  5799. //chat mods: disable chat culling
  5800. const chatCull = /return\}[a-zA-Z$_]+\.length>4/.exec(js)[0];
  5801. modifyJS(chatCull, chatCull.originalReplace('4', `window.${functionNames.getChatLimit}()`));
  5802. //chat mods: disable filter (credit to A3+++ for this finding)
  5803. modifyJS(`!${f(H._filterFunction)}(${f(H._insideFilterFunction)})`, `((!${f(H._filterFunction)}(${f(H._insideFilterFunction)}))||window.${functionNames.getDisableChatFilter}())`);
  5804. //chat mods: make filtered text red
  5805. let [_, elm, str] = js.match(/\)\),([a-zA-Z$_]+)\.innerHTML=([a-zA-Z$_]+),/);
  5806. modifyJS(_, _ + `${f(H._filterFunction)}(${str})&&window.${functionNames.getDisableChatFilter}()&&!arguments[3]&&(${elm}.style.color="red"),`);
  5807. //skins
  5808. match = js.match(/inventory\[[a-zA-Z$_]+\].id===[a-zA-Z$_]+.id\)return!0;return!1/);
  5809. if (match) { modifyJS(match[0], match[0] + `||window.${functionNames.getSkinHack}()`) };
  5810. //reset join/leave msgs
  5811. modifyJS(',console.log("joinGame()', ',window.' + functionNames.setNewGame + '(),console.log("value changed, also joinGame()');
  5812. //bypass chat filter
  5813. modifyJS('value.trim();', 'value.trim();' + f(H._chat) + '=window.' + functionNames.modifyChat + '(' + f(H._chat) + ');')
  5814. //hook for control interception
  5815. match = new RegExp(`\\.prototype\\.${f(H._update)}=function\\([a-zA-Z$_,]+\\)\\{`).exec(js)[0];
  5816. log("player update function:", match);
  5817. modifyJS(match, `${match}${f(H.CONTROLKEYS)}=window.${functionNames.modifyControls}(${f(H.CONTROLKEYS)});`);
  5818. //admin spoof lol
  5819. modifyJS('isGameOwner(){return ', 'isGameOwner(){return window.' + functionNames.getAdminSpoof + '()?true:')
  5820. modifyJS('adminRoles(){return ', 'adminRoles(){return window.' + functionNames.getAdminSpoof + '()?255:')
  5821. //grab reason for connect fail
  5822. const FUNCTIONPARAM = new RegExp('function ' + f(H._connectFail) + '\\(([a-zA-Z$_]+)\\)').exec(js)[1];
  5823. log("FUNCTIONPARAM:", FUNCTIONPARAM);
  5824. modifyJS('function ' + f(H._connectFail) + '(' + f(FUNCTIONPARAM) + '){', 'function ' + f(H._connectFail) + '(' + f(FUNCTIONPARAM) + '){window.' + functionNames.onConnectFail + '(' + f(FUNCTIONPARAM) + ',' + f(H.ERRORARRAY) + ');')
  5825. //get rid of tutorial popup because its a stupid piece of shit
  5826. modifyJS(',vueApp.onTutorialPopupClick()', '');
  5827. //annoying shit
  5828. modifyJS('alert', 'console.log');
  5829. //pointer escape
  5830. modifyJS('onpointerlockchange=function(){', 'onpointerlockchange=function(){if (window.' + functionNames.getPointerEscape + '(arguments)) {return};');
  5831. //death hook
  5832. const DEATHARGS = new RegExp('function ' + f(H._deathFunction) + '\\(([a-zA-Z$_]+,[a-zA-Z$_]+)\\)').exec(js)[1];
  5833. log("DEATHARGS", DEATHARGS);
  5834. modifyJS('function ' + f(H._deathFunction) + '(' + DEATHARGS + '){', 'function ' + f(H._deathFunction) + '(' + f(DEATHARGS) + '){window.' + functionNames.interceptDeath + '(' + f(DEATHARGS) + ');');
  5835. //vip spoof/no ads credit absolutely goes to OakSwingZZZ
  5836. modifyJS('adsBlocked=' + FUNCTIONPARAM, 'adsBlocked=' + functionNames.adBlocker + '("adsBlocked")');
  5837. modifyJS('"user-has-adblock"', functionNames.adBlocker + '("user-has-adblock")');
  5838. modifyJS('layed=!1', 'layed=window.' + functionNames.adBlocker + '(!1)');
  5839. modifyJS('showAdBlockerVideo', 'hideAdBlockerVideo'); //hello eggs bullshit
  5840. modifyJS(H.USERDATA + '.playerAccount.isUpgraded()', functionNames.adBlocker + '(' + f(H.USERDATA) + '.playerAccount.isUpgraded())');
  5841. //respawn time stuff
  5842. modifyJS('5:10', functionNames.quickRespawn + '(5):' + functionNames.adBlocker + '(10)');
  5843. modifyJS(',3e3),console.log', `,window.${functionNames.quickRespawn}(3e3)),console.log`);
  5844. // modifyJS(H.respawnTime+'=Math.max',H.respawnTime+'=Math.min');
  5845. //Modifies matchmaker JS to block gamecodes.
  5846. match = js.match(/region,([a-zA-Z$_]+)\(([a-zA-Z$_]+)/); //im so sorry i thought i was slick
  5847. if (match) {
  5848. modifyJS('region,', `region,window.${functionNames.gameBlacklisted}(${match[2]})?(${match[2]}.uuid="${getScrambled()}",${match[1]}(${match[2]}),vueApp.hideSpinner()):`);
  5849. };
  5850. //intercept and replace audio
  5851. match = js.match(/static play\(([a-zA-Z$_,]+)\){/);
  5852. log("AUDIO INTERCEPTION", match);
  5853. modifyJS(match[0], `${match[0]}[${match[1]}] = window.${functionNames.interceptAudio}(${match[1]});`);
  5854. modifyJS('"IFRAME"==document.activeElement.tagName', `("IFRAME"==document.activeElement.tagName&&document.activeElement.id!=='sfChat-iframe')`);
  5855. // skybox (yay)
  5856. modifyJS(`infiniteDistance=!0;`, `infiniteDistance=!0;window["${skyboxName}"]=${H.skybox};`);
  5857. modifyJS(`.name)}vueApp`, `.name)}window["${mapData}"]=${H.mapData};vueApp`);
  5858. //intercept player names before they are censored
  5859. modifyJS(`:{}};if(${H.playerData}.`, `:{}};window.${functionNames.realPlayerData}(${H.playerData});if(${H.playerData}.`);
  5860. //intercept player names before they are censored
  5861. modifyJS(`"transparent")},`, `"transparent");window.${functionNames.interceptDrawTextOnNameTexture}(${H.nameTexture}, arguments, this.${H.player_})},`);
  5862. //intercept signedIn function
  5863. modifyJS(`if(this.isAnonymous`, `window.${functionNames.interceptSignedIn}(arguments);if(this.isAnonymous`);
  5864. modifyJS(`="SPACE",`,`="SPACE",window.${functionNames.shouldInputSpace}()&&`)
  5865. modifyJS(/tp-/g, '');
  5866. modifyJS(`window.location.href="https://free`, `let ballsack="https://free`);
  5867.  
  5868. // modifyJS(`${H.Grenade}.prototype.remove=function(){`, `${H.Grenade}.prototype.remove=function(){console.log("nade explosion", this, this.x, this.y, this.z);`);
  5869. // modifyJS(`this.grenadePool.retrieve`, `window.cock=arguments;this.grenadePool.retrieve`);
  5870.  
  5871. match = js.match(/0===[a-zA-Z0-9$_]+\)return!1;/);
  5872. log("COLLIDER", match);
  5873. modifyJS(match[0], match[0] + "var iterations=0;");
  5874. modifyJS(">=0);){", ">=0);){iterations++;if (iterations >= 1e3) {console.log('oops lol');return false};")
  5875. //intercept updateParticles for particle speed control
  5876. //deobf is: updateParticles(manager, delta)
  5877. 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.
  5878. const splitted = match[0].split("{"); //split right bevor function opens to inject delta manipulator. Might not be the best way but it works fine.
  5879. const delta = splitted[0].charAt(splitted[0].length - 2); //name of the delta argument.
  5880. modifyJS(match[0], splitted[0] + "{" //add curly bracket because the split removed it. ehhhhhh
  5881. +`${delta}=${delta}*window.${functionNames.getParticleSpeedMultiplier}();` //get mutiplier value for delta.
  5882. +splitted[1]
  5883. )
  5884. log(H);
  5885. log(js);
  5886. attemptedInjection = true;
  5887. return js;
  5888. } catch (error) {
  5889. log(error);
  5890. change("vardataType", 0);
  5891. 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.");
  5892. createPopup("Reloading page in 5 seconds...");
  5893. setTimeout(() => {
  5894. reloadPage();
  5895. }, 5000);
  5896. };
  5897. };
  5898. };
  5899.  
  5900. //dead code
  5901. /*
  5902. JSON.safeStringify = (obj, indent = 2) => {
  5903. let cache = [];
  5904. const retVal = JSON.stringify(
  5905. obj,
  5906. (key, value) =>
  5907. typeof value === "object" && value !== null
  5908. ? cache.includes(value)
  5909. ? undefined // Duplicate reference found, discard key
  5910. : cache.push(value) && value // Store value in our collection
  5911. : value,
  5912. indent
  5913. );
  5914. cache = null;
  5915. return retVal;
  5916. };
  5917. */
  5918.  
  5919. const deployBots = async () => {
  5920. updateBotParams();
  5921. if (!load("firstTimeBots")) {
  5922. save("firstTimeBots", true);
  5923. GM_openInTab(bottingGuideURL, { active: true });
  5924. };
  5925.  
  5926. GM_setValue("StateFarm_BotStatus", {});
  5927.  
  5928. log("Deploying " + extract("numberBots") + " bots...");
  5929.  
  5930. let botNames = [];
  5931. for (let i = 0; i < extract("numberBots"); i++) {
  5932. let name = (extract("botUsername"));
  5933. if (extract("botCopyName")) {
  5934. name = retrieveCopiedName();
  5935. if (!name) {
  5936. alert("StateFarm: Cannot copy names if you haven't been in a game!");
  5937. return;
  5938. };
  5939. };
  5940. botNames.push(name);
  5941. };
  5942.  
  5943. let canMassBot = undefined;
  5944.  
  5945. for (let i = 0; i < extract("numberBots"); i++) {
  5946. let leftOffset = ((i % 15) * 100);
  5947. // let topOffset=((i%3)*100);
  5948. let topOffset = 0;
  5949. let proxyURL = extract("proxyBots") == "static" ? window.location.host : proxyList[proxyListIndex] ;
  5950. proxyListIndex = (proxyListIndex + 1) % proxyList.length;
  5951. let params = "?AUTOMATED=true&StateFarm=";
  5952. let name = botNames[i];
  5953. if (extract("botAntiDupe")) { name = name + String.fromCharCode(97 + Math.floor(Math.random() * 26)) };
  5954.  
  5955. const addParam = function (module, setTo, noEnding) { params = params + module + ">" + JSON.stringify(setTo) + (noEnding ? "" : "<") };
  5956.  
  5957. addParam("eggColor", extract("eggColorBots") == "random" ? randomInt(1, 7) : extractAsDropdownInt("eggColorBots"));
  5958. addParam("autoStamp", extract("autoStampBots") == "random" ? randomInt(0, 6) : extractAsDropdownInt("autoStampBots"));
  5959. addParam("autoHat", extract("autoHatBots") == "random" ? randomInt(0, 6) : extractAsDropdownInt("autoHatBots"));
  5960.  
  5961. addParam("usernameAutoJoin", name, true);
  5962.  
  5963. log("PARAMS:", params)
  5964. if (typeof isCrackedShell === 'undefined') {
  5965. unsafeWindow.open("https://" + proxyURL + "/" + params, '_blank', `width=${extract("botWindowWidth")}},height=${extract("botWindowHeight")},left=` + leftOffset + ',top=' + topOffset)
  5966. } else {
  5967. try {
  5968. if (canMassBot === undefined) {
  5969. let data = await fetch(`https://${getScrambled().replace([0-9], '')}.${location.host}/mod/data`);
  5970. data = await data.json();
  5971. if (!data.success) {
  5972. alert('You are not on a version of CrackedShell that supports botting.');
  5973. canMassBot = false;
  5974. return;
  5975. } else canMassBot = true;
  5976. };
  5977. } catch (err) {
  5978. log(err);
  5979. canMassBot = false;
  5980. alert('You are not on a version of CrackedShell that supports botting.');
  5981. };
  5982.  
  5983. if (canMassBot === true)
  5984. 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);
  5985. };
  5986. };
  5987. };
  5988.  
  5989. const constructBotParams = function () {
  5990. const addParam = function (module, setTo, noEnding) { params = params + module + ">" + JSON.stringify(setTo) + (noEnding ? "" : "<") };
  5991. let params = "";
  5992.  
  5993. addParam("autoFireType", 1); //while visible
  5994. addParam("adBlock", true);
  5995.  
  5996. //blacklist stuff
  5997. addParam("blacklist", botBlacklist);
  5998. addParam("enableBlacklistAimbot", true);
  5999. //whitelist stuff
  6000. addParam("whitelist", botWhitelist);
  6001. addParam("enableWhitelistAimbot", true);
  6002. addParam("enableWhenNoneVisible", true);
  6003. //do aimbot
  6004. addParam("aimbotTargetMode", 1);
  6005. addParam("aimbotVisibilityMode", 1);
  6006. addParam("prediction", extract("botAimbot"));
  6007. addParam("aimbot", extract("botAimbot"));
  6008. addParam("antiBloom", extract("botAimbot"));
  6009. addParam("grenadeMax", extract("botAimbot"));
  6010. addParam("autoRefill", extract("botAimbot"));
  6011. addParam("autoFireAccuracy", extract("botAccuracy"));
  6012. //do shoot
  6013. addParam("antiSneak", extract("botAutoShoot") ? 1.4 : 0);
  6014. addParam("enableAutoFire", extract("botAutoShoot"));
  6015. addParam("autoGrenade", extract("botAutoShoot"));
  6016. //automove
  6017. addParam("autoWalk", extract("botAutoMove"));
  6018. addParam("autoStrafe", extract("botAutoMove"));
  6019. addParam("autoJump", extract("botAutoMove"));
  6020. addParam("autoJumpDelay", 1500);
  6021. //low res
  6022. addParam("enableTextures", !extract("botLowRes"));
  6023. addParam("setDetail", extract("botLowRes") ? 2 : 0);
  6024. //seizure
  6025. addParam("enableSeizureX", extract("botSeizure"));
  6026. addParam("enableSeizureY", extract("botSeizure"));
  6027.  
  6028. addParam("renderDelay", extract("renderDelayBots"));
  6029. addParam("muteGame", extract("botMuteGame"));
  6030. addParam("autoJoin", extract("botAutoJoin"));
  6031. addParam("mockMode", extract("botMock"));
  6032. addParam("autoRespawn", extract("botRespawn"));
  6033. addParam("autoEZ", extract("botAutoEZ"));
  6034. addParam("cheatAccuse", extract("botCheatAccuse"));
  6035. addParam("joinCode", extract("botJoinCode"));
  6036. addParam("autoWeapon", extractAsDropdownInt("botWeapon") + 1);
  6037. addParam("autoTeam", extractAsDropdownInt("botTeam"));
  6038. addParam("autoUnban", extract("botAutoUnban"));
  6039. addParam("autoLogin", extractAsDropdownInt("botAutoLogin"));
  6040. addParam("loginDatabaseSelection", 1);
  6041. addParam("autoRegion", extractAsDropdownInt("autoRegionBots"));
  6042. addParam("autoGamemode", extractAsDropdownInt("autoGamemodeBots"));
  6043. addParam("useCustomName", extract("useCustomNameBots"));
  6044. addParam("autoMacro", extract("useBotMacro"));
  6045. addParam("customMacro", extract("botMacro").replaceAll(">","{greater}").replaceAll("<","{less}"));
  6046. addParam("leaveEmpty", extract("leaveEmptyBots"));
  6047. addParam("autoLeave", extract("autoLeaveBots"));
  6048. addParam("autoLeaveDelay", extract("autoLeaveDelayBots"));
  6049. addParam("spamChat", extract("botSpam"));
  6050. addParam("spamChatText", extract("spamChatTextBot"));
  6051. addParam("tallChat", extract("botTallChat"), true);
  6052.  
  6053. return params;
  6054. };
  6055.  
  6056. const detectURLParams = function () {
  6057. if (getSearchParam("AUTOMATED") == "true") {
  6058. log("Automated Window!");
  6059. AUTOMATED = true;
  6060. };
  6061. let customSettings = getSearchParam("StateFarm")
  6062. if (customSettings !== null) {
  6063. customSettings = customSettings.split("|");
  6064. URLParams = customSettings[0];
  6065. log("StateFarm: Custom Settings in URL!", URLParams);
  6066. /*
  6067. let setVars=[];
  6068. let setBinds=[];
  6069. if (customSettings[0]) {setVars=customSettings[0].split("<")};
  6070. if (customSettings[1]) {setVars=customSettings[0].split("<")};
  6071. log(setVars,setBinds);
  6072. setBinds.forEach(element=>{ //not yet done
  6073. });
  6074. */
  6075. };
  6076. };
  6077.  
  6078. const applySettings = function (receivedConfig, reset, secondPassThru) {
  6079. log(AUTOMATED, receivedConfig);
  6080. let settings = receivedConfig.split("<");
  6081. if (reset) { initMenu(true); log("StateFarm: clearing before applying settings") };
  6082. settings.forEach(element => {
  6083. element = element.split(">");
  6084. if (element[0] == "customMacro") {element[1] = element[1].replaceAll("{less}","<").replaceAll("{greater}",">")};
  6085. try {
  6086. change(element[0], JSON.parse(element[1]));
  6087. } catch (error) {
  6088. log("fuck that was an error", element[0], error);
  6089. };
  6090. });
  6091. createPopup("Custom StateFarm Settings Applying...");
  6092. if (!secondPassThru) {
  6093. setTimeout(() => {
  6094. if (receivedConfig) {
  6095. applySettings(receivedConfig, false, true);
  6096. };
  6097. }, 150);
  6098. };
  6099. };
  6100.  
  6101. const updateBotParams = function () {
  6102. if (AUTOMATED) { // nuh uh.
  6103. createPopup("Automated window cannot config bots.", "error");
  6104. } else {
  6105. const botParams = constructBotParams();
  6106. broadcastToBots("setconfig " + btoa(unsafeWindow.unescape(encodeURIComponent(botParams))));
  6107. log("StateFarm: attempted to set bot params.");
  6108. };
  6109. };
  6110.  
  6111. const retrieveCopiedName = function () {
  6112. const playerSlots = document.querySelectorAll('.playerSlot--name');
  6113. const mapNames = Array.from(playerSlots).map(playerSlot => playerSlot.textContent.trim());
  6114. return mapNames[Math.floor(Math.random() * mapNames.length)];
  6115. };
  6116.  
  6117. //dead code (for now ig)
  6118.  
  6119. // const pathfindingCode = function () { //wrapped in a function just to stop its execution
  6120. // loggedGameMap = false;
  6121. // // begin pathfinding
  6122. // const BinaryHeap = function(scoreFunction) {
  6123. // this.content = [];
  6124. // this.scoreFunction = scoreFunction;
  6125. // };
  6126. // BinaryHeap.prototype = {
  6127. // push: function (element) {
  6128. // // Add the new element to the end of the array.
  6129. // this.content.push(element);
  6130. // // Allow it to bubble up.
  6131. // this.bubbleUp(this.content.length - 1);
  6132. // },
  6133. // rescoreElement: function (node) {
  6134. // this.sinkDown(this.content.indexOf(node));
  6135. // },
  6136. // pop: function () {
  6137. // // Store the first element so we can return it later.
  6138. // var result = this.content[0];
  6139. // // Get the element at the end of the array.
  6140. // var end = this.content.pop();
  6141. // // If there are any elements left, put the end element at the
  6142. // // start, and let it sink down.
  6143. // if (this.content.length > 0) {
  6144. // this.content[0] = end;
  6145. // this.sinkDown(0);
  6146. // }
  6147. // return result;
  6148. // },
  6149. // remove: function (node) {
  6150. // var length = this.content.length;
  6151. // // To remove a value, we must search through the array to find
  6152. // // it.
  6153. // for (var i = 0; i < length; i++) {
  6154. // if (this.content[i] != node) continue;
  6155. // // When it is found, the process seen in 'pop' is repeated
  6156. // // to fill up the hole.
  6157. // var end = this.content.pop();
  6158. // // If the element we popped was the one we needed to remove,
  6159. // // we're done.
  6160. // if (i == length - 1) break;
  6161. // // Otherwise, we replace the removed element with the popped
  6162. // // one, and allow it to float up or sink down as appropriate.
  6163. // this.content[i] = end;
  6164. // this.bubbleUp(i);
  6165. // this.sinkDown(i);
  6166. // break;
  6167. // }
  6168. // },
  6169. // size: function () {
  6170. // return this.content.length;
  6171. // },
  6172. // bubbleUp: function (n) {
  6173. // // Fetch the element that has to be moved.
  6174. // var element = this.content[n], score = this.scoreFunction(element);
  6175. // // When at 0, an element can not go up any further.
  6176. // while (n > 0) {
  6177. // // Compute the parent element's index, and fetch it.
  6178. // var parentN = Math.floor((n + 1) / 2) - 1,
  6179. // parent = this.content[parentN];
  6180. // // If the parent has a lesser score, things are in order and we
  6181. // // are done.
  6182. // if (score >= this.scoreFunction(parent)) break;
  6183. // // Otherwise, swap the parent with the current element and
  6184. // // continue.
  6185. // this.content[parentN] = element;
  6186. // this.content[n] = parent;
  6187. // n = parentN;
  6188. // }
  6189. // },
  6190. // includes: function (n) {
  6191. // return this.content.includes(n);
  6192. // },
  6193. // sinkDown: function (n) {
  6194. // // Look up the target element and its score.
  6195. // var length = this.content.length,
  6196. // element = this.content[n],
  6197. // elemScore = this.scoreFunction(element);
  6198. // while (true) {
  6199. // // Compute the indices of the child elements.
  6200. // var child2N = (n + 1) * 2, child1N = child2N - 1;
  6201. // // This is used to store the new position of the element,
  6202. // // if any.
  6203. // var swap = null;
  6204. // // If the first child exists (is inside the array)...
  6205. // if (child1N < length) {
  6206. // // Look it up and compute its score.
  6207. // var child1 = this.content[child1N],
  6208. // child1Score = this.scoreFunction(child1);
  6209. // // If the score is less than our element's, we need to swap.
  6210. // if (child1Score < elemScore) swap = child1N;
  6211. // }
  6212. // // Do the same checks for the other child.
  6213. // if (child2N < length) {
  6214. // var child2 = this.content[child2N],
  6215. // child2Score = this.scoreFunction(child2);
  6216. // if (child2Score < (swap == null ? elemScore : child1Score)) swap = child2N;
  6217. // }
  6218. // // No need to swap further, we are done.
  6219. // if (swap == null) break;
  6220. // // Otherwise, swap and continue.
  6221. // this.content[n] = this.content[swap];
  6222. // this.content[swap] = element;
  6223. // n = swap;
  6224. // };
  6225. // }
  6226. // };
  6227. // const isNodeAir = function(item) {
  6228. // return item.mesh === undefined
  6229. // };
  6230. // const canTravelThroughNode = function(item) {
  6231. // return isNodeAir(item) || item.mesh.name.includes("none")
  6232. // };
  6233. // class Position {
  6234. // constructor(x, y, z) {
  6235. // this.x = x;
  6236. // this.y = y;
  6237. // this.z = z;
  6238. // }
  6239. // }
  6240. // var GLOBAL_NODE_LIST = [];
  6241. // class MapNode {
  6242. // constructor(position, linked, map) {
  6243. // this.position = position;
  6244. // this.linked = linked;
  6245. // GLOBAL_NODE_LIST.push(this);
  6246. // this.add_children_from_map_data(map);
  6247. // this.f = undefined;
  6248. // this.g = undefined;
  6249. // this.h = undefined;
  6250. // }
  6251. // add_link(node) {
  6252. // this.linked.push(node);
  6253. // }
  6254. // remove_link(node) {
  6255. // this.linked = this.linked.filter(item => item !== node);
  6256. // }
  6257. // can_move(node) {
  6258. // return this.linked.includes(node);
  6259. // }
  6260. // add_children_from_map_data(map_data) {
  6261. // // for each thing around us in a 3x3x3 cube, add a link if it's air and it's not above us
  6262. // let found_node = 0; let found_link = 0
  6263. // for (var x = -1; x <= 1; x++) {
  6264. // for (var y = -1; y <= 0; y++) {
  6265. // for (var z = -1; z <= 1; z++) {
  6266. // if (x == 0 && y == 0 && z == 0) {
  6267. // continue;
  6268. // };
  6269. // if (Math.abs(x) + Math.abs(y) + Math.abs(z) > 1) {
  6270. // continue;
  6271. // };
  6272. // var map_data_x = this.position.x + x;
  6273. // var map_data_y = this.position.y + y;
  6274. // var map_data_z = this.position.z + z;
  6275. // if (map_data_x < 0 || map_data_y < 0 || map_data_z < 0) {
  6276. // continue;
  6277. // };
  6278. // if (map_data_x >= map_data.length || map_data_y >= map_data[0].length || map_data_z >= map_data[0][0].length) {
  6279. // continue;
  6280. // };
  6281. // var attemptedNode = map_data[map_data_x][map_data_y][map_data_z];
  6282. // if (!canTravelThroughNode(attemptedNode)) {
  6283. // ;continue;
  6284. // }
  6285. // /* for the tested node:
  6286. // continue if:
  6287. // can't travel through it
  6288. // a nonsolid is directly below it
  6289. // */
  6290. // try {
  6291. // var node_below_checked_node = map_data[map_data_x][map_data_y - 1][map_data_z];
  6292. // } catch (error) {
  6293. // log(error)
  6294. // continue;
  6295. // };
  6296. // var is_air_directly_below = isNodeAir(node_below_checked_node); // self explanatory
  6297. // var is_solid_directly_below = !is_air_directly_below ? node_below_checked_node.mesh.name.includes("full") : false;
  6298. // var is_partial_directly_below = !is_air_directly_below && !is_solid_directly_below
  6299. // var node_directly_below_node_doing_the_checking;
  6300. // try {
  6301. // node_directly_below_node_doing_the_checking = map_data[this.position.x][this.position.y - 1][this.position.z];
  6302. // } catch (error) {
  6303. // log(error);
  6304. // node_directly_below_node_doing_the_checking = {};
  6305. // };
  6306. // 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");
  6307. // var is_valid_candidate = (
  6308. // is_solid_directly_below ||
  6309. // y == -1 && !is_partial_directly_below ||
  6310. // (is_air_directly_below || is_solid_directly_below) && is_solid_directly_below_node_doing_checking
  6311. // // TODO: when falling long distances this can cause it to crash
  6312. // // ideally if there's a partial below it prunes back to the start of the fall
  6313. // // that's hard
  6314. // // i just want this to work
  6315. // );
  6316. // if (y == -1 && !is_partial_directly_below) {
  6317. // // 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)
  6318. // //shit lags, lol
  6319. // };
  6320. // // if the node is already in the list, add a link to it. Otherwise create it and then add a link to it.
  6321. // // if it's air / equivalent to air we can create it (but not necessarily link to it)
  6322. // 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
  6323. // // ^^ this node already exists, link to it
  6324. // if (is_valid_candidate) {
  6325. // found_link++;
  6326. // 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
  6327. // }
  6328. // } else {
  6329. // found_node++;
  6330. // var new_node = new MapNode(new Position(map_data_x, map_data_y, map_data_z), [], map_data);
  6331. // // the new node doesn't exist yet
  6332. // // we create it
  6333. // // if it's possible to move to we add the link
  6334. // if (is_valid_candidate) {
  6335. // found_link++;
  6336. // this.add_link(new_node);
  6337. // };
  6338. // };
  6339. // };
  6340. // };
  6341. // };
  6342. // // 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)
  6343. // //shit lags, lol
  6344. // }
  6345. // };
  6346. // const get_node_at = function(position) {
  6347. // return GLOBAL_NODE_LIST.find(item => item.position.x == position.x && item.position.y == position.y && item.position.z == position.z);
  6348. // };
  6349. // const get_player_position = function(player) {
  6350. // var x = Math.floor(player[H.actor][H.mesh].position.x);
  6351. // var y = Math.floor(player[H.actor][H.mesh].position.y);
  6352. // var z = Math.floor(player[H.actor][H.mesh].position.z);
  6353. // return new Position(x, y, z);
  6354. // }
  6355. // const get_player_linked_nodes = function(player) {
  6356. // var position = get_player_position(player);
  6357. // var node = get_node_at(position);
  6358. // if (node) {
  6359. // return node.linked;
  6360. // } else {
  6361. // return [];
  6362. // };
  6363. // };
  6364. // var map_data_created = false;
  6365. // // kazowie
  6366. // const TaxicabDist3D = function(pos1, pos2) {
  6367. // return Math.abs(pos1.x - pos2.x) + Math.abs(pos1.y - pos2.y) + Math.abs(pos1.z - pos2.z);
  6368. // };
  6369. // const pathTo = function(node) {
  6370. // var current = node;
  6371. // var path = [];
  6372. // while (current.parent) {
  6373. // path.unshift(current);
  6374. // if (current.parent === undefined) { log("parent undefined; path nodes successfully acquired:", path.length) }
  6375. // current = current.parent;
  6376. // }
  6377. // //log("done")
  6378. // return path;
  6379. // };
  6380. // const getHeap = function() {
  6381. // return new BinaryHeap(function (node) {
  6382. // return node.f;
  6383. // });
  6384. // };
  6385. // const cleanList = function(items) {
  6386. // for (var i = 0; i < items.length; i++) {
  6387. // var item = items[i];
  6388. // item.f = undefined;
  6389. // item.g = undefined;
  6390. // item.h = undefined;
  6391. // item.closed = undefined;
  6392. // item.parent = undefined;
  6393. // item.visited = undefined;
  6394. // };
  6395. // };
  6396. // const AStar = function(start, goal) {
  6397. // log("astar called")
  6398. // cleanList(GLOBAL_NODE_LIST)
  6399. // // start and goal are map nodes
  6400. // // map data is the list of all the nodes
  6401. // // each node has a .linked indicating which nodes can be traveled to from it
  6402. // // returns a list of nodes to travel through, ordered from start to goal
  6403. // // if no path is found, returns null
  6404. // var closed_set = [];
  6405. // var heuristic = TaxicabDist3D;
  6406. // var open_heap = getHeap();
  6407. // start.h = heuristic(start.position, goal.position);
  6408. // start.g = 0;
  6409. // start.f = start.g + start.h;
  6410. // open_heap.push(start);
  6411. // while (open_heap.size() != 0) {
  6412. // var current = open_heap.pop();
  6413. // if (current === goal) {
  6414. // log("done with astar - path found")
  6415. // var val = pathTo(current);
  6416. // log("path length:", val.length)
  6417. // print_node_list(val);
  6418. // return val;
  6419. // }
  6420. // closed_set.push(current);
  6421. // var neighbors = current.linked;
  6422. // for (var i = 0; i < neighbors.length; i++) {
  6423. // var neighbor = neighbors[i];
  6424. // if (closed_set.includes(neighbor)) {
  6425. // continue;
  6426. // }
  6427. // var tentative_g_score = current.g + 1;
  6428. // var visited = neighbor.visited;
  6429. // if (!visited || tentative_g_score < neighbor.g) {
  6430. // neighbor.visited = true;
  6431. // neighbor.parent = current;
  6432. // neighbor.g = tentative_g_score;
  6433. // neighbor.h = heuristic(neighbor.position, goal.position);
  6434. // neighbor.f = neighbor.g + neighbor.h;
  6435. // if (!visited) {
  6436. // open_heap.push(neighbor);
  6437. // } else {
  6438. // open_heap.rescoreElement(neighbor);
  6439. // };
  6440. // };
  6441. // };
  6442. // };
  6443. // log("done with astar - no path found")
  6444. // // return null if no path has been found
  6445. // return null
  6446. // };
  6447. // const print_node_list = function(list) {
  6448. // var output = "";
  6449. // log("printing node list, length:", list.length, "list:", list);
  6450. // for (var i = 0; i < list.length; i++) {
  6451. // output += list[i].position.x + ", " + list[i].position.y + ", " + list[i].position.z + "\n";
  6452. // };
  6453. // log(output);
  6454. // };
  6455. // const create_red_line_between_nodes = function(ss, node1, node2) {
  6456. // // const tracerLines = L.BABYLON.MeshBuilder.CreateLines("tracerLines", { points: [newPosition, crosshairsPosition] }, newScene);
  6457. // let pos1 = [node1.position.x - 0.5, node1.position.y - 0.5, node1.position.z - 0.5];
  6458. // let pos2 = [node2.position.x - 0.5, node2.position.y - 0.5, node2.position.z - 0.5];
  6459. // if (window.pathLines === undefined) {
  6460. // 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);
  6461. // node_lines.color = new L.BABYLON.Color3(1, 0, 0);
  6462. // node_lines.renderingGroupId = 1;
  6463. // window.pathLines = [node_lines];
  6464. // } else {
  6465. // 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);
  6466. // node_lines.color = new L.BABYLON.Color3(1, 0, 0);
  6467. // node_lines.renderingGroupId = 1;
  6468. // window.pathLines.push(node_lines);
  6469. // };
  6470. // };
  6471. // const create_pathfinding_lines = function(ss, path) {
  6472. // for (var i = 0; i < path.length - 1; i++) {
  6473. // create_red_line_between_nodes(ss, path[i], path[i + 1]);
  6474. // };
  6475. // };
  6476. // // end pathfinding
  6477.  
  6478. // const createMapData = function () {
  6479. // if (!map_data_created) {
  6480. // log("Creating map data");
  6481. // 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);
  6482. // map_data_created = true;
  6483. // return true;
  6484. // }
  6485. // }
  6486.  
  6487. // const mapStuff = function () {
  6488.  
  6489. // //log("node = " + get_node_at(get_player_position(ss.MYPLAYER)), "nodelist len = " + GLOBAL_NODE_LIST.length);
  6490.  
  6491. // if (findNewPath && !activePath && !activeNodeTarget && get_node_at(get_player_position(ss.MYPLAYER))) {
  6492.  
  6493. // let player_pos = get_player_position(ss.MYPLAYER);
  6494. // let player_node = get_node_at(player_pos);
  6495. // if (player_node) {
  6496. // let position = {
  6497. // x: player_pos.x + Math.floor(Math.random() * 5) - 1,
  6498. // y: player_pos.y,
  6499. // z: player_pos.z + Math.floor(Math.random() * 5) - 1
  6500. // }
  6501. // // check if node at position exists
  6502. // let random_node = get_node_at(position);
  6503.  
  6504. // if (!(player_node === random_node) && random_node) {
  6505. // log("location, target:")
  6506. // print_node_list([player_node, random_node])
  6507. // activePath = AStar(player_node, random_node);
  6508. // if (activePath) {
  6509. // log("setting active node target");
  6510. // print_node_list(activePath);
  6511. // activeNodeTarget = activePath[0];
  6512. // log("list printed, target set, creating pathfinding lines")
  6513. // create_pathfinding_lines(ss, activePath);
  6514. // findNewPath = false;
  6515. // log("found path to random node")
  6516. // } else {
  6517. // log("unable to find path to random node")
  6518. // }
  6519. // } else {
  6520. // log("player node / random node not air")
  6521. // }
  6522. // } else {
  6523. // log("player not on air node currently")
  6524. // }
  6525. // }
  6526.  
  6527.  
  6528. // if (pathfindingTargetOverride !== undefined) {
  6529. // createMapData();
  6530. // let player_node = get_node_at(get_player_position(ss.MYPLAYER));
  6531. // let target_node = get_node_at(pathfindingTargetOverride);
  6532. // if (player_node && target_node && !activePath) {
  6533. // let path = AStar(player_node, target_node);
  6534.  
  6535. // if (path) {
  6536. // if (path.length > 0) {
  6537. // activePath = path;
  6538. // activeNodeTarget = path[0];
  6539. // } else {
  6540. // log('already at target')
  6541. // activePath = null;
  6542. // activeNodeTarget = null;
  6543. // pathfindingTargetOverride = undefined;
  6544. // }
  6545. // } else {
  6546. // if (despawnIfNoPath) {
  6547. // sendChatMessage("despawnIfNoPath");
  6548. // }
  6549. // }
  6550. // } else {
  6551. // if (!activePath) {
  6552. // if (player_node) {
  6553. // log("playernode good")
  6554. // }
  6555. // if (target_node) {
  6556. // log("targetnode good")
  6557. // }
  6558. // if (!player_node) {
  6559. // log("playernode bad")
  6560. // }
  6561. // if (!target_node) {
  6562. // log("targetnode bad")
  6563. // }
  6564. // }
  6565. // }
  6566. // }
  6567.  
  6568. // if (activeNodeTarget && activePath) {
  6569. // //log("found target and path");
  6570. // let player_node = get_node_at(get_player_position(ss.MYPLAYER));
  6571. // if (player_node == activeNodeTarget || activePath.includes(player_node)) { // if we are at the target or have somehow skipped ahead in the list
  6572. // if (player_node == activeNodeTarget) {
  6573. // activeNodeTarget = activePath.shift();
  6574. // log("update target");
  6575. // if (activePath.length == 0) {
  6576. // log("path completed");
  6577. // activePath = null;
  6578. // activeNodeTarget = null;
  6579. // pathfindingTargetOverride = undefined;
  6580. // }
  6581. // } else {
  6582. // while (activePath.includes(player_node)) {
  6583. // activeNodeTarget = activePath.shift();
  6584. // }
  6585. // if (activePath.length == 0) {
  6586. // log("path completed");
  6587. // activePath = null;
  6588. // activeNodeTarget = null;
  6589. // pathfindingTargetOverride = undefined;
  6590. // }
  6591.  
  6592. // }
  6593. // } else {
  6594. // //log("not at target");
  6595. // }
  6596. // /* if (!(activePath.includes(get_node_at(get_player_position(ss.MYPLAYER))))) { // went off path somehow, need to find new path
  6597. // findNewPath = true;
  6598. // activePath = null;
  6599. // activeNodeTarget = null;
  6600. // log("went off path, finding new path")
  6601. // } */
  6602. // }
  6603.  
  6604. // if (activeNodeTarget) {
  6605. // // look towards the node
  6606. // if (isFirstFrameAttemptingToPathfind) {
  6607. // /* let vec = new L.BABYLON.Vector3(0, 0, 1)
  6608. // let calcYaw = calculateYaw(vec);
  6609. // let calcPitch = calculatePitch(vec);
  6610. // ss.MYPLAYER[H.yaw] = 0;
  6611. // ss.MYPLAYER[H.pitch] = 0; */
  6612. // isFirstFrameAttemptingToPathfind = false;
  6613.  
  6614. // } else {
  6615. // //log("looking towards node");
  6616.  
  6617. // let playerPosition = get_player_position(ss.MYPLAYER);
  6618. // let directionVector = new L.BABYLON.Vector3(activeNodeTarget.position.x - playerPosition.x, activeNodeTarget.position.y - playerPosition.y, activeNodeTarget.position.z - playerPosition.z);
  6619. // /* log(`
  6620. // --PATHING UPDATE--
  6621. // target: ${activeNodeTarget.position.x}, ${activeNodeTarget.position.y}, ${activeNodeTarget.position.z}
  6622. // current: ${playerPosition.x}, ${playerPosition.y}, ${playerPosition.z}
  6623. // directionVector: ${directionVector.x}, ${directionVector.y}, ${directionVector.z}
  6624. // calc yaw: ${calculateYaw(directionVector)}
  6625. // targ -> current diff:
  6626. // `) */
  6627. // //shit lags, lol
  6628. // ss.MYPLAYER[H.yaw] = calculateYaw(directionVector);
  6629. // ss.MYPLAYER[H.pitch] = 0;
  6630. // forceControlKeys = ss.CONTROLKEYSENUM.up;
  6631. // }
  6632. // };
  6633. // };
  6634. // const clearPath = function () {
  6635. // activePath = undefined;
  6636. // activeNodeTarget = undefined;
  6637. // };
  6638. // const clearPath_andTarget = function () {
  6639. // clearPath();
  6640. // pathfindingTargetOverride = undefined;
  6641. // };
  6642. // };
  6643.  
  6644.  
  6645. const findKeyWithProperty = function (obj, propertyToFind) {
  6646. for (const key in obj) {
  6647. if (obj[key] === null || obj[key] === undefined) {
  6648. continue;
  6649. };
  6650. if (!!obj[key] && (typeof (obj[key]) == 'object' || typeof (obj[key]) == 'function') && obj[key].hasOwnProperty(propertyToFind)) {
  6651. return key;
  6652. };
  6653. };
  6654. // Property not found
  6655. return null;
  6656. };
  6657.  
  6658. const findStringInLists = function (dictWithLists, str) {
  6659. for (const key in dictWithLists) {
  6660. if (dictWithLists.hasOwnProperty(key)) {
  6661. const list = dictWithLists[key];
  6662. if (list.includes(str)) {
  6663. return key; // Return the key where the string is found
  6664. };
  6665. };
  6666. };
  6667. return null; // Return null if the string is not found in any list
  6668. };
  6669.  
  6670. const mainLoop = function () {
  6671. const oneTime = function () {
  6672. //xd lmao
  6673. if (ss.MYPLAYER) {
  6674. log('%cSTATEFARM IS ATTEMPTING TO LOAD L.BABYLON', 'color: yellow; font-weight: bold; font-size: 1.2em; text-decoration: underline;');
  6675. var script = document.createElement("script");
  6676. script.src = babylonURL;
  6677. script.onload = function () {
  6678. if (unsafeWindow.BABYLON) {
  6679. L.BABYLON = unsafeWindow.BABYLON;
  6680. delete unsafeWindow.BABYLON;
  6681.  
  6682. log("Babylon.js loaded successfully");
  6683. log(L.BABYLON.Engine.Version);
  6684.  
  6685. log('%cSTATEFARM SUCCESSFULLY LOADED BABYLON!', 'color: green; font-weight: bold; font-size: 1.2em; text-decoration: underline;');
  6686.  
  6687. H.actor = findKeyWithProperty(ss.MYPLAYER, H.mesh);
  6688. // Math.capVector3 = Math[H.capVector3];
  6689.  
  6690. log("StateFarm: found vars:", H);
  6691.  
  6692. crosshairsPosition = new L.BABYLON.Vector3();
  6693. Object.defineProperty(ss.MYPLAYER.scene, 'forceWireframe', {
  6694. get: () => {
  6695. return extract("wireframe");
  6696. }
  6697. });
  6698.  
  6699. if (AUTOMATED) {
  6700. automatedBorder.style.borderColor = 'rgba(0, 0, 255, 1)';
  6701. };
  6702.  
  6703. } else {
  6704. log('%cSTATEFARM COULD NOT LOAD L.BABYLON', 'color: red; font-weight: bold; font-size: 1.2em; text-decoration: underline;');
  6705. };
  6706. };
  6707. document.body.appendChild(script);
  6708. ranOneTime = true;
  6709. };
  6710. };
  6711.  
  6712.  
  6713. const initVars = function () {
  6714.  
  6715. isBanned = false; //cant be banned if in a game /shrug
  6716. errorString = undefined; //no error if ur playing
  6717. forceControlKeys = undefined; //reset every frame
  6718.  
  6719. if (newGame) {
  6720. onlinePlayersArray = [];
  6721. miniCamera = null;
  6722. };
  6723. if (extract("debug") && (typeof playerLogger === 'undefined')) {
  6724. playerLogger = [];
  6725. };
  6726. const weaponBox = document.getElementById("weaponBox");
  6727. const chatContainer = document.getElementById('chatOut');
  6728. const chatItems = chatContainer.getElementsByClassName('chat-item');
  6729. if ((weaponBox.style.display != lastWeaponBox) || (chatItems.length != lastChatItemLength)) {
  6730. lastWeaponBox = weaponBox.style.display;
  6731. lastChatItemLength = chatItems.length;
  6732.  
  6733. const maxChat = extract("maxChat");
  6734. const maxMessages = (weaponBox.style.display === "block" && maxChat) || 9999999;
  6735.  
  6736. const startIndex = Math.max(0, chatItems.length - maxMessages);
  6737.  
  6738. for (let i = chatItems.length - 1; i >= 0; i--) {
  6739. const chatIndex = i - startIndex;
  6740. const isInRange = chatIndex >= 0 && chatIndex < maxMessages;
  6741. chatItems[i].style.display = isInRange ? '' : 'none';
  6742. };
  6743. };
  6744.  
  6745. if (didStateFarm) {
  6746. if (!loggedGameMap) {
  6747. log(ss.GAMEMAP.width, ss.GAMEMAP.height, ss.GAMEMAP.data);
  6748. loggedGameMap = true;
  6749. };
  6750. username = ss.MYPLAYER?.name;
  6751.  
  6752. crosshairsPosition.copyFrom(ss.MYPLAYER[H.actor][H.mesh].position);
  6753.  
  6754. // //eye level
  6755. crosshairsPosition.y += 0.4;
  6756. const forwardOffset = -5;
  6757. const yaw = ss.MYPLAYER[H.yaw];
  6758. const pitch = -ss.MYPLAYER[H.pitch];
  6759. const forwardX = Math.sin(yaw) * Math.cos(pitch);
  6760. const forwardY = Math.sin(pitch);
  6761. const forwardZ = Math.cos(yaw) * Math.cos(pitch);
  6762. crosshairsPosition.x += forwardX * forwardOffset;
  6763. crosshairsPosition.y += forwardY * forwardOffset;
  6764. crosshairsPosition.z += forwardZ * forwardOffset;
  6765.  
  6766. ammo = ss.MYPLAYER.weapon.ammo;
  6767.  
  6768. whitelistPlayers = (extract("whitelist") || "").split(',');
  6769. blacklistPlayers = (extract("blacklist") || "").split(',');
  6770.  
  6771. ss.MYPLAYER[H.actor].scene.texturesEnabled = extract("enableTextures");
  6772. };
  6773. };
  6774. const updateLinesESP = function () {
  6775. const objExists = Date.now();
  6776.  
  6777. //update playerESP boxes, tracer lines, colors
  6778. ss.PLAYERS.forEach(player => {
  6779. if (player && (player !== ss.MYPLAYER) && player[H.playing] && (player[H.hp] > 0) && ((!ss.MYPLAYER.team) || (player.team !== ss.MYPLAYER.team))) {
  6780. const whitelisted = (extract("whitelistESPType") == "highlight" || !extract("enableWhitelistTracers") || playerMatchesList(whitelistPlayers, player));
  6781. const blacklisted = (extract("blacklistESPType") == "justexclude" && extract("enableBlacklistTracers") && playerMatchesList(blacklistPlayers, player));
  6782. const passedLists = whitelisted && (!blacklisted);
  6783. const tracersType = extract("tracersType");
  6784.  
  6785. //predEsp
  6786. 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
  6787. if (!player.pred) { //do we need a new TN as parent?
  6788. const pPTransformNode = new L.BABYLON.TransformNode("pPredTNode", player[H.actor].scene); //TN's are literally perfect for this wtf
  6789. pPTransformNode.parent = player[H.actor][H.mesh]; //parent to the player's mesh. Not really needed, but good practise.
  6790. player.pred = pPTransformNode; //why use object actually? All the info is stored right in the TN :)
  6791. };
  6792. if (player.pred && player.pred.getScene()) { //does pred exist and is on a valid scene? not really needed, as we literally
  6793. //create the thing above if this is not the case, but eh. Better safe than sorry
  6794. player.pred.setAbsolutePosition(predictPosition(player)); //transformNode is attached to mesh, so we need absolute pos here.
  6795. updateOrCreateLinesESP(player.pred, "pPredESP", hexToRgb(getColor("predictionESPColor", "predictionESPColorRainbow"))); //I love names. pPredESP, pPTransformNode. Truly nice
  6796. player.pred.exists = objExists; //make sure the lines don't get picked up by the ESPLines Garbage collector afterwards
  6797. player.pred.tracerLines.visibility = false; //they just don't work for this.
  6798. };
  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.  
  6824. player.tracerLines.visibility = player[H.playing] && extract("tracers") && passedLists;
  6825. player.lookDirLine.visibility = player[H.playing] && extract("lookTracers") && passedLists;
  6826. player.box.visibility = extract("playerESP") && passedLists;
  6827. // player.target.visibility = extract("targets") && passedLists;
  6828. player.target.visibility = false;
  6829.  
  6830. if (player[H.actor]) {
  6831. let eggSize = extract("eggSize")
  6832. player[H.actor][H.bodyMesh].scaling._x = eggSize;
  6833. player[H.actor][H.bodyMesh].scaling._y = eggSize;
  6834. player[H.actor][H.bodyMesh].scaling._z = eggSize;
  6835. };
  6836.  
  6837. player[H.actor][H.bodyMesh].renderingGroupId = extract("chams") ? 1 : 0;
  6838.  
  6839. player.exists = objExists;
  6840. };
  6841. if (player) {
  6842. if (!ss.SETTINGS.safeNames) {
  6843. };
  6844. if (extract("unfilterNames")) { player.name = (cachedRealData[player.uniqueId]?.name || player.name);
  6845. } else player.name = (player?.normalName || player.name);
  6846. if (extract("nametags") && player[H.actor] && player[H.actor].nameSprite) { //taken from shellshock.js, so var names are weird
  6847. player[H.actor].nameSprite._manager.renderingGroupId = 1;
  6848. player[H.actor].nameSprite.renderingGroupId = 1;
  6849. 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]),
  6850. d = Math.pow(h, 1.25) * 2;
  6851. player[H.actor].nameSprite.width = d / 10 + .6;
  6852. player[H.actor].nameSprite.height = d / 20 + .3;
  6853. ss.MYPLAYER[H.actor].scene.activeCamera.fov = 0.75
  6854. };
  6855. if (!player.logged) {
  6856. player.logged = true;
  6857. if (extract("debug")) {
  6858. playerLogger.push(player);
  6859. log("Logged player: " + player.name, player)
  6860. }; //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.
  6861. if (extract("joinMessages") && (!newGame)) {
  6862. if (extract("publicBroadcast")) {
  6863. sendChatMessage((extract("joinLeaveBranding") ? "[SFC] " : "") + player.name + " joined.")
  6864. } else {
  6865. processChatItem("joined.", player.name, player.team, "rgba(0, 255, 0, 0.2)");
  6866. };
  6867. };
  6868. onlinePlayersArray.push([player, player.name, player.team]);
  6869. player[H.actor].setupNameSprite = (()=>{
  6870. setupNameSpriteNew(player[H.actor])
  6871. });
  6872. player[H.actor].setupNameSprite();
  6873. // let oldUpdateTeam = player[H.actor].updateTeam;
  6874. // player[H.actor].updateTeam = (()=>{
  6875. // updateTeamNew(player[H.actor], oldUpdateTeam)
  6876. // });
  6877. };
  6878.  
  6879. if (framesPassed % extract("nametagInfoInterval") === 0) {
  6880. //cache triggers
  6881. let playerInfo = {
  6882. score: player.score,
  6883. totalDeaths: player.totalDeaths,
  6884. bestGameStreak: player.bestGameStreak,
  6885. team: player.team,
  6886. hp: player[H.hp],
  6887. hardBoiledValue: player.hardBoiledValue,
  6888.  
  6889. shouldReplace: extract("nametagInfo"), //replace with the extract l8r
  6890. };
  6891. let playerInfoOld = playerInfoCache[player.uniqueId];
  6892. if ((playerInfoOld) && (
  6893. (playerInfo.shouldReplace != playerInfoOld.shouldReplace) || ((playerInfo.shouldReplace) && (
  6894. (playerInfo.score != playerInfoOld.score) ||
  6895. (playerInfo.totalDeaths != playerInfoOld.totalDeaths) ||
  6896. (playerInfo.bestGameStreak != playerInfoOld.bestGameStreak) ||
  6897. (playerInfo.team != playerInfoOld.team) ||
  6898. (playerInfo.hp != playerInfoOld.hp) ||
  6899. (playerInfo.hardBoiledValue != playerInfoOld.hardBoiledValue)
  6900. ))
  6901. )) {
  6902. player[H.actor].setupNameSprite();
  6903. };
  6904. playerInfoCache[player.uniqueId] = playerInfo;
  6905.  
  6906. if (player[H.actor]?.nameSprite?.color) {
  6907. playerInfo.shouldReplace ?
  6908. (player[H.actor].nameSprite.color = ss.teamColors.textColor[0]) :
  6909. (player[H.actor].nameSprite.color = ss.teamColors.textColor[player.team]);
  6910. }
  6911. };
  6912.  
  6913. player.isOnline = objExists;
  6914. };
  6915. });
  6916. playersInGame = onlinePlayersArray.length;
  6917. for (let i = 0; i < onlinePlayersArray.length; i++) {
  6918. if (onlinePlayersArray[i][0] && onlinePlayersArray[i][0].isOnline == objExists) { //player still online
  6919. onlinePlayersArray[i][2] = onlinePlayersArray[i][0].team;
  6920. } else {
  6921. if (extract("leaveMessages") && (!newGame)) {
  6922. if (extract("publicBroadcast")) {
  6923. sendChatMessage((extract("joinLeaveBranding") ? "[SFC] " : "") + onlinePlayersArray[i][1] + " left.")
  6924. } else {
  6925. processChatItem("left.", onlinePlayersArray[i][1], onlinePlayersArray[i][2], "rgba(255, 0, 0, 0.2)");
  6926. };
  6927. };
  6928. onlinePlayersArray.splice(i, 1);
  6929. };
  6930. };
  6931. //update ammoESP boxes, tracer lines, colors
  6932. if (extract("ammoESP") || extract("ammoTracers") || extract("grenadeESP") || extract("grenadeTracers")) {
  6933. ss.OBJECTSVAR.getShadowMap()[H.renderList].forEach(item => {
  6934. if (item.isEnabled && item.isEnabled() && item.sourceMesh && item.sourceMesh.name && (item.sourceMesh.name == "grenadeItem" || item.sourceMesh.name == "ammo")) { //this is what we want
  6935. const itemType = item.sourceMesh.name;
  6936. let color = itemType == "ammo" && extract("ammoESPColor") || extract("grenadeESPColor");
  6937. color = hexToRgb(color);
  6938.  
  6939. updateOrCreateLinesESP(item, "ammoESP", color)
  6940.  
  6941. let willBeVisible = false;
  6942.  
  6943. if (itemType == "ammo") { //ammo
  6944. const regime = extract("ammoESPRegime");
  6945. if (regime == "whendepleted" && ammo.store == 0) {
  6946. willBeVisible = true;
  6947. } else if (regime == "whenlow" && ammo.store <= ammo.capacity) {
  6948. willBeVisible = true;
  6949. } else if (regime == "belowmax" && ammo.store < ammo.storeMax) {
  6950. willBeVisible = true;
  6951. } else if (regime == "alwayson") {
  6952. willBeVisible = true;
  6953. };
  6954. } else { //grenades
  6955. const regime = extract("grenadeESPRegime");
  6956. if (regime == "whendepleted" && ss.MYPLAYER.grenadeCount == 0) {
  6957. willBeVisible = true;
  6958. } else if (regime == "whenlow" && ss.MYPLAYER.grenadeCount <= 1) {
  6959. willBeVisible = true;
  6960. } else if (regime == "belowmax" && ss.MYPLAYER.grenadeCount < ss.MYPLAYER.grenadeCapacity) {
  6961. willBeVisible = true;
  6962. } else if (regime == "alwayson") {
  6963. willBeVisible = true;
  6964. };
  6965. };
  6966.  
  6967. item.box.visibility = willBeVisible && (itemType == "ammo" && extract("ammoESP") || extract("grenadeESP"));
  6968. item.tracerLines.visibility = willBeVisible && (itemType == "ammo" && extract("ammoTracers") || extract("grenadeTracers"));
  6969.  
  6970. item.exists = objExists;
  6971. };
  6972. });
  6973. };
  6974. //trajectories
  6975. if (trajectory) {
  6976. trajectory.dispose();
  6977. trajectory = null;
  6978. };
  6979. if (extract("trajectories") && ss.MYPLAYER.grenadeCount >= 1 && ss.MYPLAYER[H.playing]) {
  6980. if (!trajectoryNade) {
  6981. const clone = ss.cloneMesh('grenadeItem', ss.SCENE, null);
  6982. if (clone) {
  6983. clone.setEnabled(true);
  6984. trajectoryNade = clone;
  6985. trajectoryNade.renderOverlay = true;
  6986. trajectoryNade.renderingGroupId = 1;
  6987. };
  6988. };
  6989.  
  6990. let power = 0;
  6991.  
  6992. if (document.getElementById("grenadeThrowContainer").style.visibility === "visible") {
  6993. power = ss.grenadeThrowPower;
  6994. } else if (extract("grenadeMax")) {
  6995. power = extract("grenadePower");
  6996. };
  6997.  
  6998. const result = predictGrenade(ss.MYPLAYER, power);
  6999. const lines = [result.positions];
  7000. trajectory = L.BABYLON.MeshBuilder.CreateLineSystem("trajectory", { lines: lines }, ss.SCENE);
  7001. trajectory.color = new L.BABYLON.Color3(1, 0, 0);
  7002. trajectory.renderingGroupId = 1;
  7003.  
  7004. trajectoryNade.position = result.finalPos;
  7005. } else if (trajectoryNade) {
  7006. trajectoryNade.dispose();
  7007. trajectoryNade = null;
  7008. };
  7009. // log("done updating lines")
  7010. //garbage collection
  7011. for (let i = 0; i < ESPArray.length; i++) {
  7012. if (ESPArray[i][0] && ESPArray[i][0].exists == objExists) { //obj still exists and still relevant
  7013. //do nothing, lol
  7014. } else {
  7015. if (ESPArray[i][0]) { //obj still exists but no longer relevant
  7016. log('%cRemoving tracer line due to irrelevant object', 'color: white; background: red');
  7017. ESPArray[i][0].generatedESP = false;
  7018. } else { //obj no longer exists
  7019. log('%cRemoving tracer line due to no longer exists', 'color: white; background: red');
  7020. };
  7021. ESPArray[i][1].dispose(); //tracer
  7022. ESPArray[i][2].dispose(); //esp box
  7023. if (ESPArray[i][3]) { ESPArray[i][3].dispose() }; //target
  7024. if (ESPArray[i][4]) { ESPArray[i][4].dispose() }; //look linetrace forward line
  7025. ESPArray.splice(i, 1);
  7026. };
  7027. }; newGame = false;
  7028. };
  7029. createAnonFunction("retrieveFunctions", function (vars, doStateFarm) {
  7030. ss = vars;
  7031.  
  7032. // unsafeWindow.vueApp._showGenericPopup = unsafeWindow.vueApp.showGenericPopup; //this just doesnt work
  7033.  
  7034. // unsafeWindow.vueApp.showGenericPopup = (...args) => {
  7035. // if (args[0] === 'session_expired') return;
  7036. // return unsafeWindow.vueApp._showGenericPopup(...args);
  7037. // };
  7038.  
  7039. if (doStateFarm) {
  7040. didStateFarm = true;
  7041. return F.STATEFARM();
  7042. } else {
  7043. log("StateFarm: creating silence audio");
  7044. unsafeWindow.BAWK.sounds.silence = Object.assign({}, unsafeWindow.BAWK.sounds.ammo);
  7045. unsafeWindow.BAWK.sounds.silence.end = 0.001;
  7046. };
  7047. });
  7048.  
  7049. createAnonFunction("register", async () => {
  7050. let wait = (ms) => new Promise((res) => setTimeout(res, ms));
  7051.  
  7052. document.body.insertAdjacentHTML('beforeend', `
  7053. <style>
  7054. .shellprintOverlay {
  7055. position: fixed;
  7056. top: 0;
  7057. left: 0;
  7058. width: 100%;
  7059. height: 100%;
  7060. background-color: rgba(0, 0, 0);
  7061. z-index: 9999999;
  7062. display: flex;
  7063. flex-direction: column;
  7064. justify-content: center;
  7065. align-items: center;
  7066. }
  7067.  
  7068. .shellprintText {
  7069. color: white;
  7070. font-weight: bold;
  7071. font-family: 'Nunito';
  7072. font-size: 20px;
  7073. }
  7074.  
  7075. .shellprintStatus {
  7076. color: white;
  7077. font-weight: bold;
  7078. font-family: 'Nunito';
  7079. font-size: 36px;
  7080. }
  7081. </style>
  7082.  
  7083. <div class="shellprintOverlay">
  7084. <span class="shellprintText">[ ShellPrint @ discord.gg/XAyZ6ndEd4 ]</span>
  7085. <span class="shellprintStatus"></span>
  7086. </div>
  7087. `);
  7088.  
  7089. const shellprint = {
  7090. write: (p) => document.querySelector('.shellprintStatus').innerText = p, // eslint-disable-line
  7091.  
  7092. remove: () => {
  7093. let style = (s, t) => document.querySelector('.shellprintOverlay').style[s] = t; // eslint-disable-line
  7094. style('visibility', 'hidden');
  7095. style('opacity', 0);
  7096. style('transition', 'visibility 0s 1s, opacity 1s linear');
  7097. setTimeout(() => document.querySelector('.shellprintOverlay').remove(), 1001);
  7098. }
  7099. };
  7100.  
  7101. shellprint.write('Fetching Account...');
  7102.  
  7103. let account;
  7104.  
  7105. try {
  7106. account = await (await fetch(shellPrintURL + extract('shellPrintKey'), {
  7107. method: 'POST'
  7108. })).json();
  7109. } catch {};
  7110.  
  7111. if (!account) {
  7112. shellprint.write('ShellPrint is currently broken. Try again later.');
  7113. setTimeout(() => shellprint.remove(), 2000);
  7114. return;
  7115. } else if (!account.success) {
  7116. shellprint.write(account.error || 'Unknown error.');
  7117. setTimeout(() => shellprint.remove(), 2000);
  7118. return;
  7119. };
  7120.  
  7121. shellprint.write('Fetched Account! 🎉 Signing in....');
  7122.  
  7123. let signIn = async () => {
  7124. try {
  7125. await unsafeWindow.firebase.auth().signInWithEmailAndPassword(account.email, account.password);
  7126. } catch {
  7127. await signIn();
  7128. };
  7129. };
  7130.  
  7131. await signIn();
  7132.  
  7133. shellprint.write('Fully signed in! 🎉');
  7134. await wait(1000);
  7135. shellprint.remove();
  7136. });
  7137.  
  7138. const applySkybox = () => {
  7139. //check if we should switch
  7140. const delta2 = Date.now() - lastRandomSkyBoxChangeTime;
  7141. const desire = extract("randomSkyBoxInterval") ? extract("randomSkyBoxInterval") * 60 * 1000 : -1; //stored in minutes, so *60 -> seconds *1000 -> milliseconds.
  7142. if (
  7143. extract("randomSkyBox") &&
  7144. delta2 != -1 &&
  7145. delta2 > desire
  7146. ) {
  7147. const newIdx = randomInt(0, loadedSkyboxes.length - 1);
  7148. log("skybox change overdue for " + (delta2 - desire) + "ms. New skybox index chosen: " + newIdx);
  7149. change("skybox", newIdx); //maybe not the best to overwrite the actual module setting, but eh, don't want to rewrite the entire thing....
  7150. lastRandomSkyBoxChangeTime = Date.now();
  7151. };
  7152. if (!unsafeWindow[skyboxName]) return;
  7153. if (!(extract('skybox') === 'default' || extract('skybox') === true || ss.SCENE.skyboxTextureThing == extract('skybox'))) {
  7154. let url = `${atob(extract("skybox"))}/skybox`;
  7155. unsafeWindow[skyboxName].material.reflectionTexture = new L.BABYLON.CubeTexture(url, ss.SCENE);
  7156. unsafeWindow[skyboxName].material.reflectionTexture.coordinatesMode = L.BABYLON.Texture.SKYBOX_MODE;
  7157. ss.SCENE.skyboxTextureThing = extract('skybox');
  7158. };
  7159. };
  7160.  
  7161. createAnonFunction("STATEFARM", function () {
  7162. ss.PLAYERS.forEach((PLAYER) => (PLAYER.hasOwnProperty("ws")) ? (ss.MYPLAYER = PLAYER) : null);
  7163.  
  7164. if (!ranOneTime) {
  7165. oneTime();
  7166. } else if (typeof (L.BABYLON) !== 'undefined') {
  7167. initVars();
  7168. updateLinesESP();
  7169. // mapStuff();
  7170. applySkybox();
  7171.  
  7172. let isVisible;
  7173. const player = currentlyTargeting || playerLookingAt || undefined;
  7174. if (player && player[H.playing]) {
  7175. isVisible = getLineOfSight(player);
  7176. };
  7177. highlightCrossHairReticleDot(extract("showLOS") ? isVisible : null);
  7178.  
  7179. if (extract("radar")) {
  7180. myPlayerDot.style.display = 'block';
  7181. ss.PLAYERS.forEach(player => { updateRadar(player, ss.MYPLAYER) });
  7182. } else {
  7183. ss.PLAYERS.forEach(player => {
  7184. if (playerDotsMap.has(player.uniqueId)) {
  7185. const playerDotToRemove = playerDotsMap.get(player.uniqueId);
  7186. mapEl.removeChild(playerDotToRemove);
  7187. playerDotsMap.delete(player.uniqueId);
  7188. }
  7189. });
  7190. myPlayerDot.style.display = 'none';
  7191. };
  7192.  
  7193. if (extract("freecam")) {
  7194. ss.MYPLAYER[H.actor][H.mesh].position.y = ss.MYPLAYER[H.actor][H.mesh].position.y + 1;
  7195. };
  7196.  
  7197. //credit to helloworld for the idea (worked it out on my own tho :P)
  7198. if (ss.MYPLAYER[H.playing]) {
  7199. //camera adjustments
  7200. ss.CAMERA.position.y = extract("perspective") !== "firstPerson" ? extract("perspectiveY") || 0 : 0;
  7201. ss.CAMERA.position.z = extract("perspective") !== "firstPerson" ? extract("perspective") == "thirdPerson" ? (extract("perspectiveZ") || 0) : (-extract("perspectiveZ")) || 0 : 0;
  7202. ss.CAMERA.rotation.x = extract("perspective") == "thirdPersonAlt" ? Math.PI : 0;
  7203.  
  7204. //adjust for scoping
  7205. if (ss.MYPLAYER.scope) {
  7206. let finalFov = 0.4;
  7207. let ourFov = (extract("fov") * (Math.PI / 180));
  7208. let currentFov = ss.CAMERA.fov;
  7209. let percentage = (currentFov - finalFov) / ourFov;
  7210.  
  7211. // log(percentage, finalFov, ourFov, currentFov);
  7212.  
  7213. ss.CAMERA.position.y = ss.CAMERA.position.y * percentage; //i thought this would make a sick transition but it actually wasnt that cool
  7214. ss.CAMERA.position.z = ss.CAMERA.position.z * percentage;
  7215. ss.CAMERA.rotation.x = ss.CAMERA.rotation.x * percentage;
  7216. };
  7217.  
  7218. //rendering
  7219. ss.MYPLAYER[H.actor].gunContainer._children[0].renderingGroupId = extract("perspective") !== "firstPerson" ? 0 : 2;
  7220. ss.MYPLAYER[H.actor].gunContainer._children[2].renderingGroupId = extract("perspective") !== "firstPerson" ? 0 : 2;
  7221. if (!ss.MYPLAYER.stampApplied) ss.MYPLAYER[H.actor].applyStamp(ss.MYPLAYER.stampItem); ss.MYPLAYER.stampApplied = true;
  7222. if (!ss.MYPLAYER[H.actor].hat) {
  7223. ss.MYPLAYER[H.actor].wearHat(ss.MYPLAYER.hatItem);
  7224. } else {
  7225. ss.MYPLAYER[H.actor].hat.visibility = extract("perspective") !== "firstPerson" ? 1 : 0;
  7226. };
  7227. //alpha effect, it sucks and doesnt work the way i wanted it to
  7228. /*
  7229. ss.MYPLAYER[H.actor].hands.material.alphaMode = 5;
  7230. ss.MYPLAYER[H.actor][H.bodyMesh].material.alphaMode = 5;
  7231. ss.MYPLAYER[H.actor].hands.material.alpha = ((extract("perspective") !== "firstPerson") && extract("perspectiveAlpha")) ? .5 : 1;
  7232. ss.MYPLAYER[H.actor][H.bodyMesh].material.alpha = ((extract("perspective") !== "firstPerson") && extract("perspectiveAlpha")) ? .5 : 1;
  7233. */
  7234. };
  7235.  
  7236. let filter = typeof(extract("filter")) == 'number' ? extract("filter") : 2;
  7237. if (ss.SCENE && ss.SCENE.appliedFilter !== filter) {
  7238. ss.SCENE.materials.forEach(material => {
  7239. material.alphaMode = filter;
  7240. }); ss.SCENE.appliedFilter = filter;
  7241. };
  7242.  
  7243. if (ss.MYPLAYER && ss.MYPLAYER[H.actor] && ss.MYPLAYER[H.actor][H.mesh]) {
  7244. 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
  7245.  
  7246. ss.MYPLAYER[H.actor].gunContainer.scaling._x = extract("gunPosition") == "hidden" ? 0 : 1;
  7247. ss.MYPLAYER[H.actor].gunContainer.scaling._y = extract("gunPosition") == "hidden" ? 0 : 1;
  7248. ss.MYPLAYER[H.actor].gunContainer.scaling._x = extract("gunPosition") == "hidden" ? 0 : 1;
  7249. };
  7250.  
  7251. if (extract("spamChat")) {
  7252. if (document.getElementById("chatIn").style.visibility == 'visible') {
  7253. if (spamDelay < Date.now()) {
  7254. if (Date.now() > (lastSpamMessage[0] + extract("spamChatDelay"))) {
  7255. let possibleMessages = extract("spamChatText").split("|");
  7256. let chosenMessage = possibleMessages[spamMessageCount % possibleMessages.length];
  7257. if (chosenMessage == lastSpamMessage[1]) { chosenMessage += String.fromCharCode(97 + Math.floor(Math.random() * 26)) };
  7258. sendChatMessage(chosenMessage);
  7259. lastSpamMessage = [Date.now(), chosenMessage];
  7260. spamMessageCount += 1;
  7261. };
  7262. } else if (spamDelay < Date.now() - 250) {
  7263. spamDelay = Date.now() + 250;
  7264. };
  7265. };
  7266. };
  7267. if (extract("chatHighlight")) {
  7268. document.getElementById("chatOut").style.userSelect = "text"
  7269. };
  7270. if (extract("autoRefill")) {
  7271. //log(ss.MYPLAYER.weapon);
  7272. if (ammo.rounds == 0) {
  7273. ss.MYPLAYER.reload();
  7274. } else if (extract("smartRefill")) {
  7275. let smartRefillMinAmmo = {
  7276. eggk47: 1,
  7277. dozenGauge: 0,
  7278. csg1: 1,
  7279. rpegg: 0,
  7280. smg: 1,
  7281. m24: 0,
  7282. aug: 3,
  7283. cluck9mm: 1
  7284. };
  7285. if (ammo.rounds <= smartRefillMinAmmo[ss.MYPLAYER.weapon.constructor.standardMeshName]) {
  7286. ss.MYPLAYER.reload();
  7287. };
  7288. };
  7289. };
  7290. if (extract("autoGrenade") && isVisible && (ss.MYPLAYER.grenadeCount > 0)) {
  7291. ss.MYPLAYER.throwGrenade();
  7292. };
  7293. if ((extract("autoWeapon") !== "disabled") && (!ss.MYPLAYER[H.playing])) {
  7294. weaponArray.random = randomInt(0, 6);
  7295. document.querySelectorAll('.weapon_img')[weaponArray[extract("autoWeapon")]].parentNode.click();
  7296. };
  7297. if (extract("revealBloom") || extract("showMinAngle")) {
  7298. const distCenterToOuter = 2 * (200 / ss.CAMERA.fov);
  7299. const bloomValues = predictBloom(ss.MYPLAYER[H.yaw], ss.MYPLAYER[H.pitch]);
  7300. // Set the new position of the circle
  7301. const centerX = (unsafeWindow.innerWidth / 2);
  7302. const centerY = (unsafeWindow.innerHeight / 2);
  7303. const offsettedX = centerX - (2 * distCenterToOuter * bloomValues[0]);
  7304. const offsettedY = centerY - (2 * distCenterToOuter * bloomValues[1]);
  7305. if (extract("revealBloom")) {
  7306. redCircle.style.display = '';
  7307. redCircle.style.bottom = offsettedY + 'px';
  7308. redCircle.style.right = offsettedX + 'px';
  7309. } else {
  7310. redCircle.style.display = 'none';
  7311. };
  7312. if (extract("showMinAngle")) {
  7313. minangleCircle.style.display = '';
  7314. let idkWhatThisIs = 25 * (1.25 / ss.CAMERA.fov);
  7315. minangleCircle.style.width = extract("aimbotMinAngle") * idkWhatThisIs + 'px';
  7316. minangleCircle.style.height = extract("aimbotMinAngle") * idkWhatThisIs + 'px';
  7317. minangleCircle.style.bottom = centerY + 'px';
  7318. minangleCircle.style.right = centerX + 'px';
  7319. };
  7320. };
  7321. if (!extract("showMinAngle")) {
  7322. minangleCircle.style.display = 'none';
  7323. };
  7324. const playerSlots = document.querySelectorAll('#playerList .playerSlot');
  7325. playerSlots.forEach(slot => {
  7326. const usernameElement = slot.querySelector('.playerSlot--name');
  7327. let username = usernameElement ? usernameElement.textContent.trim() : "";
  7328. const badgeURLs = Array.from(findBadgesForUsername(username)).reverse();
  7329. const existingBadges = slot.querySelectorAll('.badge-image');
  7330.  
  7331. if ((!extract("customBadges")) || (badgeURLs && badgeURLs.length < 1)) {
  7332. existingBadges.forEach(badge => badge.remove());
  7333. } else if (extract("customBadges") && username && badgeURLs && badgeURLs.length > 0 && existingBadges && existingBadges.length < 1) {
  7334. existingBadges.forEach(badge => badge.remove());
  7335. const eggIcon = !!(slot.querySelector('.playerSlot--icons .fas.fa-egg:not(.hidden)') || slot.querySelector('.playerSlot--icons .fab.fa-twitch:not(.hidden)'));
  7336. log(eggIcon, username)
  7337. badgeURLs.forEach((badgeURL, index) => {
  7338. const badgeImage = document.createElement('img');
  7339. badgeImage.src = badgeListURL + badgeURL;
  7340. badgeImage.className = 'badge-image';
  7341. badgeImage.style.position = 'absolute';
  7342. badgeImage.style.height = 'auto';
  7343. badgeImage.style.width = 'auto';
  7344. badgeImage.style.maxHeight = '100%';
  7345. badgeImage.style.maxWidth = '100%';
  7346. badgeImage.style.right = `${-13 - index * 8 - (eggIcon ? 10 : 0)}%`;
  7347. badgeImage.style.top = '50%';
  7348. badgeImage.style.transform = 'translateY(-50%)';
  7349. slot.style.position = 'relative';
  7350. slot.appendChild(badgeImage);
  7351. });
  7352. };
  7353. });
  7354.  
  7355. let partyLightsIntensity = extract("partyLightsIntensity") || 0;
  7356.  
  7357. if (extract("partyLightsEnabled") && partyLightsIntensity > 0 && !ss.SCENE.lights.find(light => light.name === "light")) {
  7358. log("Lets party :joe_cool:");
  7359. partyLight = new L.BABYLON.PointLight("light", new L.BABYLON.Vector3(0, 10, 0), ss.SCENE);
  7360. partyLight.diffuse = new L.BABYLON.Color3(1, 0, 0);
  7361. partyLight.specular = new L.BABYLON.Color3(1, 1, 1);
  7362. };
  7363. if (partyLight) {
  7364. partyLight.intensity = partyLightsIntensity;
  7365. var hue = (Date.now() / 1000) % 1;
  7366. partyLight.diffuse = hslToRgb(hue, 1, 0.5);
  7367. };
  7368.  
  7369. try {
  7370. let minAccuracy = ss.MYPLAYER.weapon.accuracyMin + ss.MYPLAYER.weapon.accuracyLoss;
  7371. accuracyPercentage = (ss.MYPLAYER.weapon.accuracy - minAccuracy) / (ss.MYPLAYER.weapon.accuracyMax - minAccuracy);
  7372. accuracyPercentage = Math.max(0, accuracyPercentage);
  7373. } catch (error) {
  7374. accuracyPercentage = 1;
  7375. };
  7376.  
  7377. // playerNearest=undefined; //currently unused and not defined
  7378. // enemyLookingAt=undefined; //currently unused and not defined
  7379.  
  7380. let playerLookingAtMinimum = 999999;
  7381. playerLookingAt = undefined; //used for player info
  7382.  
  7383. let enemyMinimumDistance = 999999;
  7384. enemyNearest = undefined; //used for antisneak
  7385.  
  7386. let previousTarget = currentlyTargeting;
  7387.  
  7388. let selectNewTarget = (!extract("antiSwitch") || !currentlyTargeting);
  7389. if (selectNewTarget) currentlyTargeting = false;
  7390. let isDoingAimbot = (extract("aimbot") && (extract("aimbotRightClick") ? isRightButtonDown : true) && ss.MYPLAYER[H.playing]);
  7391. // log(targetingComplete);
  7392.  
  7393. const targetType = extract("aimbotTargetMode");
  7394. const visibilityMode = extract("aimbotVisibilityMode");
  7395.  
  7396. let enemyMinimumValue = ((targetType == "pointingat") && (extract("silentAimbot"))) ? deg2rad(extract("aimbotMinAngle")) : 10000; //used for selecting target (either pointingat or nearest)
  7397.  
  7398. let didAimbot
  7399. const candidates = [];
  7400. amountVisible = 0;
  7401.  
  7402. 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
  7403. if (player && (player !== ss.MYPLAYER) && player[H.playing] && (player[H.hp] > 0)) {
  7404. const whitelisted = (extract("enableWhenNoneVisible") || !extract("enableWhitelistAimbot") || extract("enableWhitelistAimbot") && playerMatchesList(whitelistPlayers, player));
  7405. const blacklisted = (extract("enableBlacklistAimbot") && playerMatchesList(blacklistPlayers, player));
  7406. const passedLists = (whitelisted) && (!blacklisted);
  7407. player.distance = distancePlayers(player);
  7408. player.adjustedDistance = distancePlayers(player, 2);
  7409. const directionVector = getDirectionVectorFacingTarget(player);
  7410.  
  7411. player.angleDiff = getAngularDifference(ss.MYPLAYER, { yawReal: calculateYaw(directionVector), pitchReal: calculatePitch(directionVector) });
  7412. player.isVisible = getLineOfSight(player, extract("prediction"));
  7413.  
  7414. if (player.angleDiff < playerLookingAtMinimum) {
  7415. playerLookingAtMinimum = player.angleDiff;
  7416. playerLookingAt = player;
  7417. };
  7418.  
  7419. if (passedLists) { //is possibly an an enemy
  7420. if (isDoingAimbot) { //is doing aimbot and we care about getting a new target
  7421. if (player.adjustedDistance < enemyMinimumValue) { //for antisneak, not targeting
  7422. enemyMinimumDistance = player.adjustedDistance;
  7423. enemyNearest = player;
  7424. };
  7425. if (selectNewTarget) {
  7426. candidates.push(player);
  7427. if ( player.isVisible ) { amountVisible += 1 };
  7428. };
  7429. };
  7430. };
  7431. };
  7432. });
  7433.  
  7434. candidates.forEach(player => {
  7435. const valueToUse = (
  7436. (targetType == "nearest" && (
  7437. player.adjustedDistance
  7438. )) ||
  7439. (targetType == "pointingat" && (
  7440. player.angleDiff
  7441. )) ||
  7442. (targetType == "lowestHp" && (
  7443. player[H.hp]
  7444. )) ||
  7445. (targetType == "mostKills" && (
  7446. -player.score
  7447. ))
  7448. );
  7449. let visibleValue = ((!ss.MYPLAYER.team) || (player.team !== ss.MYPLAYER.team));
  7450. if (visibilityMode == "disabled") { //we dont care about that shit
  7451. //go ahead
  7452. } else if (amountVisible < 1) { //none of candidates are visible
  7453. const whitelisted = (!extract("enableWhitelistAimbot") || extract("enableWhitelistAimbot") && playerMatchesList(whitelistPlayers, player));
  7454. //log(player.name, whitelisted, visibleValue) //grrrr no console spam
  7455. visibleValue = (whitelisted && extract("enableWhenNoneVisible")) || (visibilityMode == "onlyvisible" ? false : visibleValue); //there are no visible candidates, so either select none if "onlyvisible" or ignore this altogether
  7456. } else { //some are visible
  7457. visibleValue = visibleValue && player.isVisible; //assuming now that either "prioritise" or "onlyvisible" are enabled, as "onlyvisible"'s use case fulfilled in previous statement
  7458. };
  7459. if (visibleValue) {
  7460. if (valueToUse < enemyMinimumValue) {
  7461. enemyMinimumValue = valueToUse;
  7462. currentlyTargeting = player;
  7463. };
  7464. };
  7465. });
  7466.  
  7467. const deltaTime = performance.now() - nowOld;
  7468. nowOld += deltaTime;
  7469.  
  7470. if (isDoingAimbot) {
  7471. if (currentlyTargeting && currentlyTargeting[H.playing] && currentlyTargeting[H.actor]) { //found a target
  7472. didAimbot = true;
  7473. currentAimTime += deltaTime;
  7474. if (currentlyTargeting.generatedESP) {
  7475. if (extract("tracers")) {
  7476. currentlyTargeting.tracerLines.color = new L.BABYLON.Color3(...hexToRgb(getColor("aimbotColor", "aimbotRainbow")));
  7477. };
  7478. if (extract("playerESP")) {
  7479. currentlyTargeting.box.color = new L.BABYLON.Color3(...hexToRgb(getColor("aimbotColor", "aimbotRainbow")));
  7480. };
  7481. };
  7482. if ((!extract("silentAimbot")) && (!extract("noWallTrack") || getLineOfSight(player, true)) && (targetingComplete || (deg2rad(extract("aimbotMinAngle")) > currentlyTargeting?.angleDiff))) {
  7483. const aimbot = getAimbot(currentlyTargeting);
  7484.  
  7485. let antiSnap = (1 - (extract("aimbotAntiSnap") || 0));
  7486. //new method: neuublue / https://github.com/AimTuxOfficial/AimTux/blob/master/src/Hacks/aimbot.cpp
  7487. const yawDiff = Math.radDifference(aimbot.yawReal, ss.MYPLAYER[H.yaw]);
  7488. const pitchDiff = Math.radDifference(aimbot.pitchReal, ss.MYPLAYER[H.pitch]);
  7489.  
  7490. if (extract("aimbotAntiSnapRegime") != "slowEnd") { // not slow end
  7491. antiSnap /= ((yawDiff ** 2 + pitchDiff ** 2) ** 0.5) * 4; // constant
  7492. if (extract("aimbotAntiSnapRegime") == "fastEnd") antiSnap *= antiSnap * 10; // fast end
  7493. else if (extract("aimbotAntiSnapRegime") == "timeBased") antiSnap *= currentAimTime / extract("maxAimTime"); // time based
  7494. antiSnap = Math.min(1, antiSnap);
  7495. };
  7496. ss.MYPLAYER[H.yaw] = setPrecision(ss.MYPLAYER[H.yaw] + yawDiff * antiSnap);
  7497. ss.MYPLAYER[H.pitch] = setPrecision(ss.MYPLAYER[H.pitch] + pitchDiff * antiSnap);
  7498.  
  7499. if (previousTarget !== currentlyTargeting) { targetingComplete = false };
  7500.  
  7501. //old method for antisnap
  7502. /*
  7503. const distanceBetweenPlayers = distancePlayers(currentlyTargeting);
  7504. const lerp = function (start, end, alpha) {
  7505. let value = (1 - alpha) * start + alpha * end;
  7506. if ((Math.abs(end - start) < (0.2 / (distanceBetweenPlayers))) || (targetingComplete)) {
  7507. value = end; targetingComplete = true;
  7508. };
  7509. return value;
  7510. };
  7511.  
  7512. ss.MYPLAYER[H.yaw] = setPrecision(lerp(ss.MYPLAYER[H.yaw], aimbot.yawReal, antiSnap));
  7513. ss.MYPLAYER[H.pitch] = setPrecision(lerp(ss.MYPLAYER[H.pitch], aimbot.pitchReal, antiSnap));
  7514. */
  7515. };
  7516. if (enemyMinimumDistance < extract("antiSneak")) {
  7517. currentlyTargeting = enemyNearest;
  7518. if (ammo.rounds === 0) { //basically after MAGDUMP, switch to pistol, if that is empty reload and keep shootin'
  7519. if (ss.MYPLAYER.weaponIdx === 0) { ss.MYPLAYER.swapWeapon(1); }
  7520. else { ss.MYPLAYER.reload(); }
  7521. };
  7522. ss.MYPLAYER.pullTrigger();
  7523. // log("ANTISNEAK---->", enemyNearest?.name, enemyMinimumDistance);
  7524. };
  7525. } else {
  7526. currentAimTime -= deltaTime;
  7527. if (extract("oneKill")) {
  7528. currentlyTargeting = "dead";
  7529. } else {
  7530. currentlyTargeting = false;
  7531. };
  7532. };
  7533. } else {
  7534. currentAimTime -= deltaTime;
  7535. currentlyTargeting = false;
  7536. targetingComplete = false;
  7537. if (extract("enableSeizureX")) {
  7538. ss.MYPLAYER[H.yaw] += extract("amountSeizureX")
  7539. };
  7540. if (extract("enableSeizureY")) {
  7541. ss.MYPLAYER[H.pitch] += extract("amountSeizureY")
  7542. };
  7543. };
  7544. currentAimTime = Math.clamp(currentAimTime, 0, extract("maxAimTime"));
  7545. highlightTargetOnLeaderboard(currentlyTargeting, (extract("highlightLeaderboard")) ? didAimbot : false);
  7546. if (extract("upsideDown")) { //sorta useless
  7547. if (ss.MYPLAYER[H.pitch] < 1.5 && ss.MYPLAYER[H.pitch] > -1.5) {
  7548. ss.MYPLAYER[H.pitch] = Math.PI;
  7549. };
  7550. };
  7551. if (extract("silentRoll")) {
  7552. ss.MYPLAYER[H.pitch] += 2 * Math.PI;
  7553. };
  7554. if (extract("enableAutoFire")) {
  7555. let autoFireType = extract("autoFireType");
  7556. let doAutoFire = false
  7557. if (autoFireType == "always") {
  7558. doAutoFire = true;
  7559. } else if (autoFireType == "whileAimbot" && didAimbot) {
  7560. doAutoFire = true;
  7561. } else if (autoFireType == "whileVisible" && isVisible) {
  7562. doAutoFire = true;
  7563. } else if (autoFireType == "whileVisAimbot" && isVisible && didAimbot) {
  7564. doAutoFire = true;
  7565. };
  7566. if (doAutoFire) {
  7567. if ((ammo.rounds > 0) || (ammo.store > 0)) { //i fucking hate tweakpane. "errrm actually when a slider is 0 it becomes undefined" go fuck yourself.
  7568. ((accuracyPercentage >= (extract("autoFireAccuracy") || 0))) && ss.MYPLAYER.pullTrigger();
  7569. } else {
  7570. ss.MYPLAYER.melee();
  7571. };
  7572. };
  7573. };
  7574. //method by de_Neuublue
  7575. if (extract("enableAutomatic")) {
  7576. if (ss.MYPLAYER.weapon.constructor.originallySemi == null) {
  7577. ss.MYPLAYER.weapon.constructor.originallySemi = !ss.MYPLAYER.weapon.constructor.automatic;
  7578. };
  7579. ss.MYPLAYER.weapon.constructor.automatic = true;
  7580. } else if (ss.MYPLAYER.weapon.constructor.originallySemi) {
  7581. ss.MYPLAYER.weapon.constructor.originallySemi = null;
  7582. ss.MYPLAYER.weapon.constructor.automatic = false;
  7583. };
  7584.  
  7585. if (updateMenu) {
  7586. updateMenu = false; initMenu(false);
  7587. tp.mainPanel.hidden = extract("hideAtStartup");
  7588. };
  7589.  
  7590. let doRender = true;
  7591.  
  7592. if ((extract("renderDelay") > 10) && (Date.now() < (previousFrame + extract("renderDelay")))) { //because bots lmao
  7593. doRender = false;
  7594. } else {
  7595. previousFrame = Date.now();
  7596. };
  7597.  
  7598. framesPassed++;
  7599.  
  7600. return (!doRender);
  7601. };
  7602. });
  7603. };
  7604.  
  7605. var css = "text-shadow: -1px -1px hsl(0,100%,50%), 1px 1px hsl(5.4, 100%, 50%), 3px 2px hsl(10.8, 100%, 50%), 5px 3px hsl(16.2, 100%, 50%), 7px 4px hsl(21.6, 100%, 50%), 9px 5px hsl(27, 100%, 50%), 11px 6px hsl(32.4, 100%, 50%), 13px 7px hsl(37.8, 100%, 50%), 14px 8px hsl(43.2, 100%, 50%), 16px 9px hsl(48.6, 100%, 50%), 18px 10px hsl(54, 100%, 50%), 20px 11px hsl(59.4, 100%, 50%), 22px 12px hsl(64.8, 100%, 50%), 23px 13px hsl(70.2, 100%, 50%), 25px 14px hsl(75.6, 100%, 50%), 27px 15px hsl(81, 100%, 50%), 28px 16px hsl(86.4, 100%, 50%), 30px 17px hsl(91.8, 100%, 50%), 32px 18px hsl(97.2, 100%, 50%), 33px 19px hsl(102.6, 100%, 50%), 35px 20px hsl(108, 100%, 50%), 36px 21px hsl(113.4, 100%, 50%), 38px 22px hsl(118.8, 100%, 50%), 39px 23px hsl(124.2, 100%, 50%), 41px 24px hsl(129.6, 100%, 50%), 42px 25px hsl(135, 100%, 50%), 43px 26px hsl(140.4, 100%, 50%), 45px 27px hsl(145.8, 100%, 50%), 46px 28px hsl(151.2, 100%, 50%), 47px 29px hsl(156.6, 100%, 50%), 48px 30px hsl(162, 100%, 50%), 49px 31px hsl(167.4, 100%, 50%), 50px 32px hsl(172.8, 100%, 50%), 51px 33px hsl(178.2, 100%, 50%), 52px 34px hsl(183.6, 100%, 50%), 53px 35px hsl(189, 100%, 50%), 54px 36px hsl(194.4, 100%, 50%), 55px 37px hsl(199.8, 100%, 50%), 55px 38px hsl(205.2, 100%, 50%), 56px 39px hsl(210.6, 100%, 50%), 57px 40px hsl(216, 100%, 50%), 57px 41px hsl(221.4, 100%, 50%), 58px 42px hsl(226.8, 100%, 50%), 58px 43px hsl(232.2, 100%, 50%), 58px 44px hsl(237.6, 100%, 50%), 59px 45px hsl(243, 100%, 50%), 59px 46px hsl(248.4, 100%, 50%), 59px 47px hsl(253.8, 100%, 50%), 59px 48px hsl(259.2, 100%, 50%), 59px 49px hsl(264.6, 100%, 50%), 60px 50px hsl(270, 100%, 50%), 59px 51px hsl(275.4, 100%, 50%), 59px 52px hsl(280.8, 100%, 50%), 59px 53px hsl(286.2, 100%, 50%), 59px 54px hsl(291.6, 100%, 50%), 59px 55px hsl(297, 100%, 50%), 58px 56px hsl(302.4, 100%, 50%), 58px 57px hsl(307.8, 100%, 50%), 58px 58px hsl(313.2, 100%, 50%), 57px 59px hsl(318.6, 100%, 50%), 57px 60px hsl(324, 100%, 50%), 56px 61px hsl(329.4, 100%, 50%), 55px 62px hsl(334.8, 100%, 50%), 55px 63px hsl(340.2, 100%, 50%), 54px 64px hsl(345.6, 100%, 50%), 53px 65px hsl(351, 100%, 50%), 52px 66px hsl(356.4, 100%, 50%), 51px 67px hsl(361.8, 100%, 50%), 50px 68px hsl(367.2, 100%, 50%), 49px 69px hsl(372.6, 100%, 50%), 48px 70px hsl(378, 100%, 50%), 47px 71px hsl(383.4, 100%, 50%), 46px 72px hsl(388.8, 100%, 50%), 45px 73px hsl(394.2, 100%, 50%), 43px 74px hsl(399.6, 100%, 50%), 42px 75px hsl(405, 100%, 50%), 41px 76px hsl(410.4, 100%, 50%), 39px 77px hsl(415.8, 100%, 50%), 38px 78px hsl(421.2, 100%, 50%), 36px 79px hsl(426.6, 100%, 50%), 35px 80px hsl(432, 100%, 50%), 33px 81px hsl(437.4, 100%, 50%), 32px 82px hsl(442.8, 100%, 50%), 30px 83px hsl(448.2, 100%, 50%), 28px 84px hsl(453.6, 100%, 50%), 27px 85px hsl(459, 100%, 50%), 25px 86px hsl(464.4, 100%, 50%), 23px 87px hsl(469.8, 100%, 50%), 22px 88px hsl(475.2, 100%, 50%), 20px 89px hsl(480.6, 100%, 50%), 18px 90px hsl(486, 100%, 50%), 16px 91px hsl(491.4, 100%, 50%), 14px 92px hsl(496.8, 100%, 50%), 13px 93px hsl(502.2, 100%, 50%), 11px 94px hsl(507.6, 100%, 50%), 9px 95px hsl(513, 100%, 50%), 7px 96px hsl(518.4, 100%, 50%), 5px 97px hsl(523.8, 100%, 50%), 3px 98px hsl(529.2, 100%, 50%), 1px 99px hsl(534.6, 100%, 50%), 7px 100px hsl(540, 100%, 50%), -1px 101px hsl(545.4, 100%, 50%), -3px 102px hsl(550.8, 100%, 50%), -5px 103px hsl(556.2, 100%, 50%), -7px 104px hsl(561.6, 100%, 50%), -9px 105px hsl(567, 100%, 50%), -11px 106px hsl(572.4, 100%, 50%), -13px 107px hsl(577.8, 100%, 50%), -14px 108px hsl(583.2, 100%, 50%), -16px 109px hsl(588.6, 100%, 50%), -18px 110px hsl(594, 100%, 50%), -20px 111px hsl(599.4, 100%, 50%), -22px 112px hsl(604.8, 100%, 50%), -23px 113px hsl(610.2, 100%, 50%), -25px 114px hsl(615.6, 100%, 50%), -27px 115px hsl(621, 100%, 50%), -28px 116px hsl(626.4, 100%, 50%), -30px 117px hsl(631.8, 100%, 50%), -32px 118px hsl(637.2, 100%, 50%), -33px 119px hsl(642.6, 100%, 50%), -35px 120px hsl(648, 100%, 50%), -36px 121px hsl(653.4, 100%, 50%), -38px 122px hsl(658.8, 100%, 50%), -39px 123px hsl(664.2, 100%, 50%), -41px 124px hsl(669.6, 100%, 50%), -42px 125px hsl(675, 100%, 50%), -43px 126px hsl(680.4, 100%, 50%), -45px 127px hsl(685.8, 100%, 50%), -46px 128px hsl(691.2, 100%, 50%), -47px 129px hsl(696.6, 100%, 50%), -48px 130px hsl(702, 100%, 50%), -49px 131px hsl(707.4, 100%, 50%), -50px 132px hsl(712.8, 100%, 50%), -51px 133px hsl(718.2, 100%, 50%), -52px 134px hsl(723.6, 100%, 50%), -53px 135px hsl(729, 100%, 50%), -54px 136px hsl(734.4, 100%, 50%), -55px 137px hsl(739.8, 100%, 50%), -55px 138px hsl(745.2, 100%, 50%), -56px 139px hsl(750.6, 100%, 50%), -57px 140px hsl(756, 100%, 50%), -57px 141px hsl(761.4, 100%, 50%), -58px 142px hsl(766.8, 100%, 50%), -58px 143px hsl(772.2, 100%, 50%), -58px 144px hsl(777.6, 100%, 50%), -59px 145px hsl(783, 100%, 50%), -59px 146px hsl(788.4, 100%, 50%), -59px 147px hsl(793.8, 100%, 50%), -59px 148px hsl(799.2, 100%, 50%), -59px 149px hsl(804.6, 100%, 50%), -60px 150px hsl(810, 100%, 50%), -59px 151px hsl(815.4, 100%, 50%), -59px 152px hsl(820.8, 100%, 50%), -59px 153px hsl(826.2, 100%, 50%), -59px 154px hsl(831.6, 100%, 50%), -59px 155px hsl(837, 100%, 50%), -58px 156px hsl(842.4, 100%, 50%), -58px 157px hsl(847.8, 100%, 50%), -58px 158px hsl(853.2, 100%, 50%), -57px 159px hsl(858.6, 100%, 50%), -57px 160px hsl(864, 100%, 50%), -56px 161px hsl(869.4, 100%, 50%), -55px 162px hsl(874.8, 100%, 50%), -55px 163px hsl(880.2, 100%, 50%), -54px 164px hsl(885.6, 100%, 50%), -53px 165px hsl(891, 100%, 50%), -52px 166px hsl(896.4, 100%, 50%), -51px 167px hsl(901.8, 100%, 50%), -50px 168px hsl(907.2, 100%, 50%), -49px 169px hsl(912.6, 100%, 50%), -48px 170px hsl(918, 100%, 50%), -47px 171px hsl(923.4, 100%, 50%), -46px 172px hsl(928.8, 100%, 50%), -45px 173px hsl(934.2, 100%, 50%), -43px 174px hsl(939.6, 100%, 50%), -42px 175px hsl(945, 100%, 50%), -41px 176px hsl(950.4, 100%, 50%), -39px 177px hsl(955.8, 100%, 50%), -38px 178px hsl(961.2, 100%, 50%), -36px 179px hsl(966.6, 100%, 50%), -35px 180px hsl(972, 100%, 50%), -33px 181px hsl(977.4, 100%, 50%), -32px 182px hsl(982.8, 100%, 50%), -30px 183px hsl(988.2, 100%, 50%), -28px 184px hsl(993.6, 100%, 50%), -27px 185px hsl(999, 100%, 50%), -25px 186px hsl(1004.4, 100%, 50%), -23px 187px hsl(1009.8, 100%, 50%), -22px 188px hsl(1015.2, 100%, 50%), -20px 189px hsl(1020.6, 100%, 50%), -18px 190px hsl(1026, 100%, 50%), -16px 191px hsl(1031.4, 100%, 50%), -14px 192px hsl(1036.8, 100%, 50%), -13px 193px hsl(1042.2, 100%, 50%), -11px 194px hsl(1047.6, 100%, 50%), -9px 195px hsl(1053, 100%, 50%), -7px 196px hsl(1058.4, 100%, 50%), -5px 197px hsl(1063.8, 100%, 50%), -3px 198px hsl(1069.2, 100%, 50%), -1px 199px hsl(1074.6, 100%, 50%), -1px 200px hsl(1080, 100%, 50%), 1px 201px hsl(1085.4, 100%, 50%), 3px 202px hsl(1090.8, 100%, 50%), 5px 203px hsl(1096.2, 100%, 50%), 7px 204px hsl(1101.6, 100%, 50%), 9px 205px hsl(1107, 100%, 50%), 11px 206px hsl(1112.4, 100%, 50%), 13px 207px hsl(1117.8, 100%, 50%), 14px 208px hsl(1123.2, 100%, 50%), 16px 209px hsl(1128.6, 100%, 50%), 18px 210px hsl(1134, 100%, 50%), 20px 211px hsl(1139.4, 100%, 50%), 22px 212px hsl(1144.8, 100%, 50%), 23px 213px hsl(1150.2, 100%, 50%), 25px 214px hsl(1155.6, 100%, 50%), 27px 215px hsl(1161, 100%, 50%), 28px 216px hsl(1166.4, 100%, 50%), 30px 217px hsl(1171.8, 100%, 50%), 32px 218px hsl(1177.2, 100%, 50%), 33px 219px hsl(1182.6, 100%, 50%), 35px 220px hsl(1188, 100%, 50%), 36px 221px hsl(1193.4, 100%, 50%), 38px 222px hsl(1198.8, 100%, 50%), 39px 223px hsl(1204.2, 100%, 50%), 41px 224px hsl(1209.6, 100%, 50%), 42px 225px hsl(1215, 100%, 50%), 43px 226px hsl(1220.4, 100%, 50%), 45px 227px hsl(1225.8, 100%, 50%), 46px 228px hsl(1231.2, 100%, 50%), 47px 229px hsl(1236.6, 100%, 50%), 48px 230px hsl(1242, 100%, 50%), 49px 231px hsl(1247.4, 100%, 50%), 50px 232px hsl(1252.8, 100%, 50%), 51px 233px hsl(1258.2, 100%, 50%), 52px 234px hsl(1263.6, 100%, 50%), 53px 235px hsl(1269, 100%, 50%), 54px 236px hsl(1274.4, 100%, 50%), 55px 237px hsl(1279.8, 100%, 50%), 55px 238px hsl(1285.2, 100%, 50%), 56px 239px hsl(1290.6, 100%, 50%), 57px 240px hsl(1296, 100%, 50%), 57px 241px hsl(1301.4, 100%, 50%), 58px 242px hsl(1306.8, 100%, 50%), 58px 243px hsl(1312.2, 100%, 50%), 58px 244px hsl(1317.6, 100%, 50%), 59px 245px hsl(1323, 100%, 50%), 59px 246px hsl(1328.4, 100%, 50%), 59px 247px hsl(1333.8, 100%, 50%), 59px 248px hsl(1339.2, 100%, 50%), 59px 249px hsl(1344.6, 100%, 50%), 60px 250px hsl(1350, 100%, 50%), 59px 251px hsl(1355.4, 100%, 50%), 59px 252px hsl(1360.8, 100%, 50%), 59px 253px hsl(1366.2, 100%, 50%), 59px 254px hsl(1371.6, 100%, 50%), 59px 255px hsl(1377, 100%, 50%), 58px 256px hsl(1382.4, 100%, 50%), 58px 257px hsl(1387.8, 100%, 50%), 58px 258px hsl(1393.2, 100%, 50%), 57px 259px hsl(1398.6, 100%, 50%), 57px 260px hsl(1404, 100%, 50%), 56px 261px hsl(1409.4, 100%, 50%), 55px 262px hsl(1414.8, 100%, 50%), 55px 263px hsl(1420.2, 100%, 50%), 54px 264px hsl(1425.6, 100%, 50%), 53px 265px hsl(1431, 100%, 50%), 52px 266px hsl(1436.4, 100%, 50%), 51px 267px hsl(1441.8, 100%, 50%), 50px 268px hsl(1447.2, 100%, 50%), 49px 269px hsl(1452.6, 100%, 50%), 48px 270px hsl(1458, 100%, 50%), 47px 271px hsl(1463.4, 100%, 50%), 46px 272px hsl(1468.8, 100%, 50%), 45px 273px hsl(1474.2, 100%, 50%), 43px 274px hsl(1479.6, 100%, 50%), 42px 275px hsl(1485, 100%, 50%), 41px 276px hsl(1490.4, 100%, 50%), 39px 277px hsl(1495.8, 100%, 50%), 38px 278px hsl(1501.2, 100%, 50%), 36px 279px hsl(1506.6, 100%, 50%), 35px 280px hsl(1512, 100%, 50%), 33px 281px hsl(1517.4, 100%, 50%), 32px 282px hsl(1522.8, 100%, 50%), 30px 283px hsl(1528.2, 100%, 50%), 28px 284px hsl(1533.6, 100%, 50%), 27px 285px hsl(1539, 100%, 50%), 25px 286px hsl(1544.4, 100%, 50%), 23px 287px hsl(1549.8, 100%, 50%), 22px 288px hsl(1555.2, 100%, 50%), 20px 289px hsl(1560.6, 100%, 50%), 18px 290px hsl(1566, 100%, 50%), 16px 291px hsl(1571.4, 100%, 50%), 14px 292px hsl(1576.8, 100%, 50%), 13px 293px hsl(1582.2, 100%, 50%), 11px 294px hsl(1587.6, 100%, 50%), 9px 295px hsl(1593, 100%, 50%), 7px 296px hsl(1598.4, 100%, 50%), 5px 297px hsl(1603.8, 100%, 50%), 3px 298px hsl(1609.2, 100%, 50%), 1px 299px hsl(1614.6, 100%, 50%), 2px 300px hsl(1620, 100%, 50%), -1px 301px hsl(1625.4, 100%, 50%), -3px 302px hsl(1630.8, 100%, 50%), -5px 303px hsl(1636.2, 100%, 50%), -7px 304px hsl(1641.6, 100%, 50%), -9px 305px hsl(1647, 100%, 50%), -11px 306px hsl(1652.4, 100%, 50%), -13px 307px hsl(1657.8, 100%, 50%), -14px 308px hsl(1663.2, 100%, 50%), -16px 309px hsl(1668.6, 100%, 50%), -18px 310px hsl(1674, 100%, 50%), -20px 311px hsl(1679.4, 100%, 50%), -22px 312px hsl(1684.8, 100%, 50%), -23px 313px hsl(1690.2, 100%, 50%), -25px 314px hsl(1695.6, 100%, 50%), -27px 315px hsl(1701, 100%, 50%), -28px 316px hsl(1706.4, 100%, 50%), -30px 317px hsl(1711.8, 100%, 50%), -32px 318px hsl(1717.2, 100%, 50%), -33px 319px hsl(1722.6, 100%, 50%), -35px 320px hsl(1728, 100%, 50%), -36px 321px hsl(1733.4, 100%, 50%), -38px 322px hsl(1738.8, 100%, 50%), -39px 323px hsl(1744.2, 100%, 50%), -41px 324px hsl(1749.6, 100%, 50%), -42px 325px hsl(1755, 100%, 50%), -43px 326px hsl(1760.4, 100%, 50%), -45px 327px hsl(1765.8, 100%, 50%), -46px 328px hsl(1771.2, 100%, 50%), -47px 329px hsl(1776.6, 100%, 50%), -48px 330px hsl(1782, 100%, 50%), -49px 331px hsl(1787.4, 100%, 50%), -50px 332px hsl(1792.8, 100%, 50%), -51px 333px hsl(1798.2, 100%, 50%), -52px 334px hsl(1803.6, 100%, 50%), -53px 335px hsl(1809, 100%, 50%), -54px 336px hsl(1814.4, 100%, 50%), -55px 337px hsl(1819.8, 100%, 50%), -55px 338px hsl(1825.2, 100%, 50%), -56px 339px hsl(1830.6, 100%, 50%), -57px 340px hsl(1836, 100%, 50%), -57px 341px hsl(1841.4, 100%, 50%), -58px 342px hsl(1846.8, 100%, 50%), -58px 343px hsl(1852.2, 100%, 50%), -58px 344px hsl(1857.6, 100%, 50%), -59px 345px hsl(1863, 100%, 50%), -59px 346px hsl(1868.4, 100%, 50%), -59px 347px hsl(1873.8, 100%, 50%), -59px 348px hsl(1879.2, 100%, 50%), -59px 349px hsl(1884.6, 100%, 50%), -60px 350px hsl(1890, 100%, 50%), -59px 351px hsl(1895.4, 100%, 50%), -59px 352px hsl(1900.8, 100%, 50%), -59px 353px hsl(1906.2, 100%, 50%), -59px 354px hsl(1911.6, 100%, 50%), -59px 355px hsl(1917, 100%, 50%), -58px 356px hsl(1922.4, 100%, 50%), -58px 357px hsl(1927.8, 100%, 50%), -58px 358px hsl(1933.2, 100%, 50%), -57px 359px hsl(1938.6, 100%, 50%), -57px 360px hsl(1944, 100%, 50%), -56px 361px hsl(1949.4, 100%, 50%), -55px 362px hsl(1954.8, 100%, 50%), -55px 363px hsl(1960.2, 100%, 50%), -54px 364px hsl(1965.6, 100%, 50%), -53px 365px hsl(1971, 100%, 50%), -52px 366px hsl(1976.4, 100%, 50%), -51px 367px hsl(1981.8, 100%, 50%), -50px 368px hsl(1987.2, 100%, 50%), -49px 369px hsl(1992.6, 100%, 50%), -48px 370px hsl(1998, 100%, 50%), -47px 371px hsl(2003.4, 100%, 50%), -46px 372px hsl(2008.8, 100%, 50%), -45px 373px hsl(2014.2, 100%, 50%), -43px 374px hsl(2019.6, 100%, 50%), -42px 375px hsl(2025, 100%, 50%), -41px 376px hsl(2030.4, 100%, 50%), -39px 377px hsl(2035.8, 100%, 50%), -38px 378px hsl(2041.2, 100%, 50%), -36px 379px hsl(2046.6, 100%, 50%), -35px 380px hsl(2052, 100%, 50%), -33px 381px hsl(2057.4, 100%, 50%), -32px 382px hsl(2062.8, 100%, 50%), -30px 383px hsl(2068.2, 100%, 50%), -28px 384px hsl(2073.6, 100%, 50%), -27px 385px hsl(2079, 100%, 50%), -25px 386px hsl(2084.4, 100%, 50%), -23px 387px hsl(2089.8, 100%, 50%), -22px 388px hsl(2095.2, 100%, 50%), -20px 389px hsl(2100.6, 100%, 50%), -18px 390px hsl(2106, 100%, 50%), -16px 391px hsl(2111.4, 100%, 50%), -14px 392px hsl(2116.8, 100%, 50%), -13px 393px hsl(2122.2, 100%, 50%), -11px 394px hsl(2127.6, 100%, 50%), -9px 395px hsl(2133, 100%, 50%), -7px 396px hsl(2138.4, 100%, 50%), -5px 397px hsl(2143.8, 100%, 50%), -3px 398px hsl(2149.2, 100%, 50%), -1px 399px hsl(2154.6, 100%, 50%); font-size: 40px;";
  7606.  
  7607. //start init thingamajigs
  7608. log("StateFarm: startUp()", attemptedInjection);
  7609. startUp();
  7610. log("StateFarm: after startUp()", attemptedInjection);
  7611.  
  7612. if (typeof GM_info !== 'undefined' && GM_info?.scriptHandler == "Tampermonkey") {
  7613. let count = GM_getValue("StateFarm_TampermonkeyWarnings") || 0;
  7614. count++;
  7615. if (count <= 3) {
  7616. 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);
  7617. if (userConfirmed) {
  7618. GM_openInTab(violentmonkeyURL, { active: true });
  7619. };
  7620. alert(`This alert will show three times in total. Please install Violentmonkey before reporting issues. ${3-count} more warnings.`);
  7621. };
  7622. GM_setValue("StateFarm_TampermonkeyWarnings", count); //continue counting for the lulz
  7623. };
  7624.  
  7625. setTimeout(() => {
  7626. if (!attemptedInjection) {
  7627. log("Injection didn't work for whatever reason, let's try again.");
  7628. reloadPage();
  7629. };
  7630. }, 30000);
  7631. })();
  7632. // log("StateFarm: after function", attemptedInjection);