Shell Shockers | Sound Hacks

9/30/2024, 9:45:17 PM

  1. // ==UserScript==
  2. // @name Shell Shockers | Sound Hacks
  3. // @grant GM_setValue
  4. // @grant GM_getValue
  5. // @grant GM_deleteValue
  6. // @grant GM_listValues
  7. // @grant GM_info
  8. // @grant GM_setClipboard
  9. // @grant GM_openInTab
  10. //
  11. // @grant GM.setValue
  12. // @grant GM.getValue
  13. // @grant GM.deleteValue
  14. // @grant GM.listValues
  15. // @grant GM.info
  16. // @grant GM.setClipboard
  17. // @grant GM.openInTab
  18.  
  19. // @version 2.1
  20. // @author wish?
  21. // @description 9/30/2024, 9:45:17 PM
  22.  
  23. // @match *://*.shellshock.io/*
  24. // @match *://*.shell.onlypuppy7.online/*
  25. // @match *://*.algebra.best/*
  26. // @match *://*.algebra.vip/*
  27. // @match *://*.biologyclass.club/*
  28. // @match *://*.deadlyegg.com/*
  29. // @match *://*.deathegg.world/*
  30. // @match *://*.eggboy.club/*
  31. // @match *://*.eggboy.xyz/*
  32. // @match *://*.eggcombat.com/*
  33. // @match *://*.egg.dance/*
  34. // @match *://*.eggfacts.fun/*
  35. // @match *://*.egghead.institute/*
  36. // @match *://*.eggisthenewblack.com/*
  37. // @match *://*.eggsarecool.com/*
  38. // @match *://*.geometry.best/*
  39. // @match *://*.geometry.monster/*
  40. // @match *://*.geometry.pw/*
  41. // @match *://*.geometry.report/*
  42. // @match *://*.hardboiled.life/*
  43. // @match *://*.hardshell.life/*
  44. // @match *://*.humanorganising.org/*
  45. // @match *://*.mathactivity.xyz/*
  46. // @match *://*.mathactivity.club/*
  47. // @match *://*.mathdrills.info/*
  48. // @match *://*.mathdrills.life/*
  49. // @match *://*.mathfun.rocks/*
  50. // @match *://*.mathgames.world/*
  51. // @match *://*.math.international/*
  52. // @match *://*.mathlete.fun/*
  53. // @match *://*.mathlete.pro/*
  54. // @match *://*.overeasy.club/*
  55. // @match *://*.risenegg.com/*
  56. // @match *://*.scrambled.tech/*
  57. // @match *://*.scrambled.today/*
  58. // @match *://*.scrambled.us/*
  59. // @match *://*.scrambled.world/*
  60. // @match *://*.shellshockers.club/*
  61. // @match *://*.shellshockers.life/*
  62. // @match *://*.shellshockers.site/*
  63. // @match *://*.shellshockers.us/*
  64. // @match *://*.shellshockers.world/*
  65. // @match *://*.shellshockers.xyz/*
  66. // @match *://*.shellsocks.com/*
  67. // @match *://*.softboiled.club/*
  68. // @match *://*.urbanegger.com/*
  69. // @match *://*.violentegg.club/*
  70. // @match *://*.violentegg.fun/*
  71. // @match *://*.yolk.best/*
  72. // @match *://*.yolk.life/*
  73. // @match *://*.yolk.rocks/*
  74. // @match *://*.yolk.tech/*
  75. // @match *://*.yolk.quest/*
  76. // @match *://*.yolk.today/*
  77. // @match *://*.zygote.cafe/*
  78. // @match *://*.shellshockers.best/*
  79. // @match *://*.eggboy.me/*
  80. // @grant none
  81. // @run-at document-start
  82. // @require https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.1.1/crypto-js.min.js
  83. // @require https://cdn.jsdelivr.net/npm/tweakpane@3.1.10/dist/tweakpane.min.js
  84. // @require https://cdn.jsdelivr.net/npm/@tweakpane/plugin-essentials@0.1.8/dist/tweakpane-plugin-essentials.min.js
  85. // @require https://cdnjs.cloudflare.com/ajax/libs/jszip/3.7.1/jszip.min.js
  86. //
  87. // @license MIT
  88. // @namespace https://gf.qytechs.cn/users/1361048
  89. // ==/UserScript==
  90. (function () {
  91. const consoleMethods = ["log", "warn", "info", "error", "exception", "table", "trace"];
  92. const _innerConsole = console;
  93.  
  94. consoleMethods.forEach((method) => {
  95. if (unsafeWindow.console[method]) {
  96. Object.defineProperty(unsafeWindow.console, method, {
  97. configurable: false,
  98. get: (...args) => {
  99. return _innerConsole[method].bind(_innerConsole);
  100. },
  101. set: () => {},
  102. });
  103. }
  104. });
  105. })();
  106. (function () {
  107. let noPointerPause;
  108. const clientKeysURL = `https://js.getstate.farm/vardata/`;
  109. let ss;
  110. let F = [];
  111. let H = {};
  112. let functionNames = [];
  113. let keyRetrieved = false;
  114.  
  115. const tp = {
  116. soundsFolder: {
  117. crackshot: "default",
  118. "egg-k": "default",
  119. scrambler: "default",
  120. "free-ranger": "default",
  121. rpegg: "default",
  122. whipper: "default",
  123. "tri-hard": "default",
  124. pistol: "default",
  125. },
  126. meleeSounds: {
  127. melee: "default",
  128. },
  129. bindsFolder: {
  130. hidePanel: localStorage.getItem("tp-hidePanel") || "h",
  131. refreshSounds: localStorage.getItem("tp-refreshSounds") || "g",
  132. },
  133. };
  134.  
  135. function refreshSounds() {
  136. updatedNeeded = true; // this updates the weapons
  137.  
  138. keyRetrieved = false; // this will grab the key necessary
  139. }
  140.  
  141. let updatedNeeded = false;
  142.  
  143. const patterns = {
  144. sound: /"sound\/sounds\.json\?"\+(..)/,
  145. scope: /,this\.(..)\.position\.z=2/,
  146. teamColors: /([A-Za-z]+)=\{text:\["#fff100","#00ffff","#f53e40"\]/g,
  147. killsText: /(.)\=\'\<span style.*?;/,
  148. lastDmg: /\([A-Za-z$_]\.lastDmgType\=([A-Za-z$_]).*?{/,
  149. weapon: /this\.([a-zA-Z0-9_$]+)\=\"gun\_/,
  150. };
  151.  
  152. const startUp = function () {
  153. console.log("startup");
  154. injectScript();
  155. console.log("after startup");
  156. };
  157.  
  158. let originalReplace = String.prototype.replace;
  159. let originalReplaceAll = String.prototype.replaceAll;
  160.  
  161. String.prototype.originalReplace = function () {
  162. return originalReplace.apply(this, arguments);
  163. };
  164. String.prototype.originalReplaceAll = function () {
  165. return originalReplaceAll.apply(this, arguments);
  166. };
  167.  
  168. const log = function (...args) {
  169. let condition;
  170. try {
  171. condition = false;
  172. } catch (error) {
  173. condition = GM_getValue(storageKey + "DisableLogs");
  174. }
  175. if (!condition) {
  176. console.log(...args);
  177. }
  178. };
  179.  
  180. const fetchTextContent = function (url) {
  181. try {
  182. var xhr = new XMLHttpRequest();
  183. xhr.open("GET", url, false);
  184. xhr.send();
  185. if (xhr.status === 200) {
  186. return xhr.responseText;
  187. } else {
  188. console.error("Error fetching " + url);
  189. return null;
  190. }
  191. } catch (err) {
  192. return null;
  193. }
  194. };
  195. const findKeyWithProperty = function (obj, propertyToFind) {
  196. for (const key in obj) {
  197. if (obj[key] === null || obj[key] === undefined) {
  198. continue;
  199. }
  200. if (!!obj[key] && (typeof obj[key] == "object" || typeof obj[key] == "function") && obj[key].hasOwnProperty(propertyToFind)) {
  201. return key;
  202. }
  203. }
  204. // Property not found
  205. return null;
  206. };
  207. const getScrambled = () => Array.from({ length: 10 }, () => String.fromCharCode(97 + Math.floor(Math.random() * 26))).join("");
  208. const createAnonFunction = function (name, func) {
  209. const funcName = getScrambled();
  210. unsafeWindow[funcName] = func;
  211. unsafeWindow[funcName] = function () {
  212. try {
  213. return func.apply(this, arguments);
  214. } catch (error) {
  215. log("Error in anonymous function:", error);
  216. }
  217. };
  218.  
  219. F[name] = unsafeWindow[funcName];
  220. functionNames[name] = funcName;
  221. };
  222.  
  223. const injectScript = function () {
  224. createAnonFunction("retrieveFunctions", function (vars) {
  225. // console.log(vars)
  226. ss = vars;
  227. unsafeWindow.globalSS = vars;
  228. // console.log("lmao");
  229.  
  230. F.customSounds();
  231. });
  232.  
  233. createAnonFunction("customSounds", function () {
  234. unsafeWindow.globalSS.PLAYERS.forEach((PLAYER) => {
  235. let H = unsafeWindow.H;
  236. if (PLAYER.hasOwnProperty("ws")) {
  237. unsafeWindow.globalSS.MYPLAYER = PLAYER;
  238. }
  239. if (unsafeWindow.globalSS.MYPLAYER) {
  240. let myWeapon = unsafeWindow.globalSS.MYPLAYER.weapons[0][H.actor][H.extra.weapon];
  241. let changeSound = unsafeWindow.globalSS.MYPLAYER.weapons[0][H.actor];
  242.  
  243. if (updatedNeeded) {
  244. if (myWeapon === "gun_m24") {
  245. changeSound.fireSound = `gun_m24_${tp.soundsFolder["crackshot"]}`;
  246. // console.log("inside the if block", changeSound);
  247. }
  248. if (myWeapon === "gun_eggk47") {
  249. changeSound.fireSound = `gun_eggk47_${tp.soundsFolder["egg-k"]}`;
  250. }
  251. if (myWeapon === "gun_dozenGauge") {
  252. changeSound.fireSound = `gun_dozenGauge_${tp.soundsFolder["scrambler"]}`;
  253. }
  254. if (myWeapon === "gun_csg1") {
  255. changeSound.fireSound = `gun_csg1_${tp.soundsFolder["free-ranger"]}`;
  256. }
  257. if (myWeapon === "gun_rpegg") {
  258. changeSound.fireSound = `gun_rpegg_${tp.soundsFolder["rpegg"]}`;
  259. }
  260. if (myWeapon === "gun_smg") {
  261. changeSound.fireSound = `gun_smg_${tp.soundsFolder["whipper"]}`;
  262. }
  263. if (myWeapon === "gun_aug") {
  264. changeSound.fireSound = `gun_aug_${tp.soundsFolder["tri-hard"]}`;
  265. }
  266. // console.log(changeSound)
  267.  
  268. // MELEE
  269. unsafeWindow.globalSS.MYPLAYER.meleeWeapon[H.actor].swingSounds = tp.meleeSounds["melee"];
  270.  
  271. // PISTOL
  272. unsafeWindow.globalSS.MYPLAYER.weapons[1][H.actor].fireSound = `gun_cluck9mm_${tp.soundsFolder["pistol"]}`;
  273. updatedNeeded = false;
  274. }
  275. }
  276. });
  277.  
  278. H.actor = findKeyWithProperty(unsafeWindow.globalSS.MYPLAYER, H.mesh);
  279. });
  280.  
  281. const originalFunction = Function;
  282.  
  283. unsafeWindow.Function = function (...args) {
  284. console.log(args.join(""));
  285. if (args.join("").includes("(()=>{var ")) {
  286. unsafeWindow.Function = originalFunction;
  287.  
  288. // this is the right script
  289. return originalFunction(applyScript(...args));
  290. }
  291. return originalFunction(...args);
  292. };
  293.  
  294. function sha256(str) {
  295. const utf8 = new TextEncoder().encode(str);
  296. const k = Uint32Array.of(
  297. 0x428a2f98,
  298. 0x71374491,
  299. 0xb5c0fbcf,
  300. 0xe9b5dba5,
  301. 0x3956c25b,
  302. 0x59f111f1,
  303. 0x923f82a4,
  304. 0xab1c5ed5,
  305. 0xd807aa98,
  306. 0x12835b01,
  307. 0x243185be,
  308. 0x550c7dc3,
  309. 0x72be5d74,
  310. 0x80deb1fe,
  311. 0x9bdc06a7,
  312. 0xc19bf174,
  313. 0xe49b69c1,
  314. 0xefbe4786,
  315. 0x0fc19dc6,
  316. 0x240ca1cc,
  317. 0x2de92c6f,
  318. 0x4a7484aa,
  319. 0x5cb0a9dc,
  320. 0x76f988da,
  321. 0x983e5152,
  322. 0xa831c66d,
  323. 0xb00327c8,
  324. 0xbf597fc7,
  325. 0xc6e00bf3,
  326. 0xd5a79147,
  327. 0x06ca6351,
  328. 0x14292967,
  329. 0x27b70a85,
  330. 0x2e1b2138,
  331. 0x4d2c6dfc,
  332. 0x53380d13,
  333. 0x650a7354,
  334. 0x766a0abb,
  335. 0x81c2c92e,
  336. 0x92722c85,
  337. 0xa2bfe8a1,
  338. 0xa81a664b,
  339. 0xc24b8b70,
  340. 0xc76c51a3,
  341. 0xd192e819,
  342. 0xd6990624,
  343. 0xf40e3585,
  344. 0x106aa070,
  345. 0x19a4c116,
  346. 0x1e376c08,
  347. 0x2748774c,
  348. 0x34b0bcb5,
  349. 0x391c0cb3,
  350. 0x4ed8aa4a,
  351. 0x5b9cca4f,
  352. 0x682e6ff3,
  353. 0x748f82ee,
  354. 0x78a5636f,
  355. 0x84c87814,
  356. 0x8cc70208,
  357. 0x90befffa,
  358. 0xa4506ceb,
  359. 0xbef9a3f7,
  360. 0xc67178f2
  361. );
  362. let h = Uint32Array.of(0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19);
  363.  
  364. const pad = new Uint8Array(((utf8.length + 9) & ~63) + 64);
  365. pad.set(utf8), (pad[utf8.length] = 0x80);
  366. new DataView(pad.buffer).setUint32(pad.length - 4, utf8.length << 3, false);
  367.  
  368. let w = new Uint32Array(64),
  369. v,
  370. i,
  371. j,
  372. a,
  373. b,
  374. c,
  375. d,
  376. e,
  377. f,
  378. g,
  379. h0,
  380. S0,
  381. S1,
  382. ch,
  383. maj,
  384. temp1,
  385. temp2;
  386. for (i = 0; i < pad.length; i += 64) {
  387. v = new DataView(pad.buffer, i, 64);
  388. for (j = 0; j < 16; j++) w[j] = v.getUint32(j << 2, false);
  389. for (; j < 64; j++)
  390. w[j] =
  391. (w[j - 16] +
  392. ((w[j - 15] >>> 7) ^ (w[j - 15] << 25) ^ (w[j - 15] >>> 18) ^ (w[j - 15] << 14) ^ (w[j - 15] >>> 3)) +
  393. w[j - 7] +
  394. ((w[j - 2] >>> 17) ^ (w[j - 2] << 15) ^ (w[j - 2] >>> 19) ^ (w[j - 2] << 13) ^ (w[j - 2] >>> 10))) >>>
  395. 0;
  396.  
  397. [a, b, c, d, e, f, g, h0] = h;
  398. for (j = 0; j < 64; j++) {
  399. S1 = ((e >>> 6) | (e << 26)) ^ ((e >>> 11) | (e << 21)) ^ ((e >>> 25) | (e << 7));
  400. ch = (e & f) ^ (~e & g);
  401. temp1 = (h0 + S1 + ch + k[j] + w[j]) >>> 0;
  402. S0 = ((a >>> 2) | (a << 30)) ^ ((a >>> 13) | (a << 19)) ^ ((a >>> 22) | (a << 10));
  403. maj = (a & b) ^ (a & c) ^ (b & c);
  404. temp2 = (S0 + maj) >>> 0;
  405. (h0 = g), (g = f), (f = e), (e = (d + temp1) >>> 0), (d = c), (c = b), (b = a), (a = (temp1 + temp2) >>> 0);
  406. }
  407. (h[0] += a), (h[1] += b), (h[2] += c), (h[3] += d), (h[4] += e), (h[5] += f), (h[6] += g), (h[7] += h0);
  408. }
  409. // console.log(str);
  410.  
  411. return h.reduce((s, x) => s + x.toString(16).padStart(8, "0"), "");
  412. }
  413.  
  414. const applyScript = function (js) {
  415. let match;
  416. let clientKeys;
  417.  
  418. let originalJS = fetchTextContent("/js/shellshock.js");
  419.  
  420. const getVardata = function (hash) {
  421. return fetchTextContent(clientKeysURL + hash + ".json?v=" + Date.now());
  422. };
  423.  
  424. let hash = sha256(originalJS);
  425. // console.log(hash);
  426. let onlineClientKeys = getVardata(hash);
  427.  
  428. try {
  429. clientKeys = JSON.parse(onlineClientKeys);
  430. } catch (e) {
  431. console.error(e);
  432. }
  433.  
  434. let H = clientKeys.vars;
  435. let C = clientKeys.commCodes?.codes;
  436.  
  437. const soundVar = patterns.sound.exec(js)[1];
  438. const scopeVar = patterns.scope.exec(js)[1];
  439. H.extra = {
  440. sound: soundVar,
  441. scope: scopeVar,
  442. teamColors: patterns.teamColors.exec(js)[1],
  443. killsText: patterns.killsText.exec(js),
  444. lastDmg: patterns.lastDmg.exec(js),
  445. weapon: patterns.weapon.exec(js)[1],
  446. };
  447. unsafeWindow.H = H;
  448.  
  449. let injectionString = "";
  450.  
  451. try {
  452. //SERVERSYNC
  453. match = new RegExp(`function serverSync\\(\\)\\{(.*?)\\)\\}`).exec(js);
  454. log("SERVERSYNC:", match);
  455. H.SERVERSYNC = match ? match[1].replace(/[a-zA-Z$_\.\[\]]+shots/, 0) + ")" : "function(){log('no serversync womp womp')}";
  456. //PAUSE
  457. match = new RegExp(`,setTimeout\\(\\(\\(\\)=>\\{([=A-z0-9\\(\\),\\{ \\.;!\\|\\?:\\}]+send\\([a-zA-Z$_]+\\))`).exec(js);
  458. log("PAUSE:", match);
  459. H.PAUSE = match ? `function(){${match[1]}}` : "function(){log('no pause womp womp')}";
  460.  
  461. const variableNameRegex = /^[a-zA-Z0-9_$\[\]"\\\.,]*$/;
  462. console.log(H);
  463. for (let name in H) {
  464. let deobf = H[name];
  465. if (name == "SERVERSYNC" || name == "PAUSE" || variableNameRegex.test(deobf)) {
  466. //serversync should only be defined just before...
  467. injectionString = `${injectionString}${name}: (() => { let variable = "value_undefined"; try { eval("variable = ${deobf};"); } catch (error) { return "value_undefined"; }; return variable; })(),`;
  468. } else {
  469. }
  470. }
  471. console.log(injectionString);
  472.  
  473. log("%cSTATEFARM INJECTION STAGE 1: GATHER VARS", "color: yellow; font-weight: bold; font-size: 1.2em; text-decoration: underline;");
  474.  
  475. const modifyJS = function (find, replace) {
  476. let oldJS = js;
  477. try {
  478. js = js.originalReplaceAll(find, replace);
  479. } catch (err) {
  480. console.log(
  481. "%cReplacement failed! Likely a required var was not found. Attempted to replace " + find + " with: " + replace,
  482. "color: red; font-weight: bold; font-size: 0.6em; text-decoration: italic;"
  483. );
  484. }
  485. if (oldJS !== js) {
  486. console.log(
  487. "%cReplacement successful! Injected code: replaced: " + find + " with: " + replace,
  488. "color: green; font-weight: bold; font-size: 0.6em; text-decoration: italic;"
  489. );
  490. } else {
  491. console.log(
  492. "%cReplacement failed! Attempted to replace " + find + " with: " + replace,
  493. "color: red; font-weight: bold; font-size: 0.6em; text-decoration: italic;"
  494. );
  495. }
  496. };
  497.  
  498. const f = function (varName) {
  499. return varName.replace("$", "\\$");
  500. };
  501. const FUNCTIONPARAM = new RegExp("function " + f(H._connectFail) + "\\(([a-zA-Z$_]+)\\)").exec(js)[1];
  502. modifyJS(
  503. f(H.SCENE) + "." + f(H.render),
  504. `window["${functionNames.retrieveFunctions}"]({${injectionString}},true)||${f(H.SCENE)}.render`
  505. );
  506.  
  507. log(H, "last");
  508. return js;
  509. } catch (e) {
  510. console.log(e);
  511. }
  512. };
  513. };
  514. // injectScript();
  515. startUp();
  516.  
  517. function waitForElement(selector) {
  518. return new Promise((resolve) => {
  519. const intervalId = setInterval(() => {
  520. const element = document.querySelector(selector);
  521. if (element) {
  522. clearInterval(intervalId);
  523. resolve(element);
  524. }
  525. }, 100);
  526. });
  527. }
  528.  
  529.  
  530. function createFolders(NFolder) {
  531. let test = pane.addFolder({
  532. title: NFolder,
  533. expanded: false,
  534. });
  535. return test;
  536. }
  537.  
  538. function addInputWithValidation(folder, obj, property, label) {
  539. folder.addInput(obj, property, { label: label }).on("change", (value) => {
  540. if (value.value.length > 1) {
  541. value.value = "Enter toggle";
  542. value.target.controller_.binding.value.rawValue_ = "Enter toggle";
  543. unsafeWindow.alert("Please enter a single key");
  544. } else {
  545. const store = value.value.replace(/"/g, "");
  546. localStorage.setItem(`tp-${property}`, store);
  547. }
  548. });
  549. }
  550.  
  551. const makeDraggable = function (element, notMenu) {
  552. if (element) {
  553. let offsetX, offsetY;
  554. element.addEventListener("mousedown", function (e) {
  555. const dragElement = function (e) {
  556. const x = ((e.clientX - offsetX) / unsafeWindow.innerWidth) * 100;
  557. const y = ((e.clientY - offsetY) / unsafeWindow.innerHeight) * 100;
  558. const maxX = 100 - (element.offsetWidth / unsafeWindow.innerWidth) * 100;
  559. const maxY = 100 - (element.offsetHeight / unsafeWindow.innerHeight) * 100;
  560. element.style.left = `${Math.max(0, Math.min(x, maxX))}%`;
  561. element.style.top = `${Math.max(0, Math.min(y, maxY))}%`;
  562. };
  563. if (notMenu || e.target.classList.contains("tp-rotv_t")) {
  564. offsetX = e.clientX - element.getBoundingClientRect().left;
  565. offsetY = e.clientY - element.getBoundingClientRect().top;
  566. document.addEventListener("mousemove", dragElement);
  567. document.addEventListener("mouseup", function () {
  568. document.removeEventListener("mousemove", dragElement);
  569. });
  570. e.preventDefault(); // Prevent text selection during drag
  571. }
  572. });
  573. }
  574. };
  575.  
  576.  
  577. //TWEAKPANE CODE
  578. const Tweakpane = window.Tweakpane;
  579. const pane = new Tweakpane.Pane({
  580. title: "WISH",
  581. expanded: true,
  582. });
  583. const paneEl = document.querySelector("div.tp-dfwv");
  584. paneEl.style.zIndex = 100000;
  585. paneEl.style.width = "300px";
  586. makeDraggable(document.querySelector(".tp-dfwv"));
  587.  
  588. //FUNCTION TO CREATE FOLDERS
  589. function createFolders(NFolder) {
  590. let test = pane.addFolder({
  591. title: NFolder,
  592. expanded: false,
  593. });
  594. return test;
  595. }
  596.  
  597. // CREATE FOLDERS
  598. const soundsFolder = createFolders("Sounds");
  599. const addSettings = createFolders("Additional Settings");
  600. const bindsFolder = createFolders("Binds");
  601.  
  602. // ADD BLADES
  603. soundsFolder.addInput(tp.soundsFolder, "crackshot", {
  604. label: "Crackshot",
  605. options: {
  606. Default: "fire",
  607. Valkyrie: "Valkyrie_fire",
  608. Chess: "Chess_fire",
  609. Retro: "Retro_fire",
  610. BadEgg: "Badegg_fire",
  611. Cyborg: "Cyborg_fire",
  612. Fusion: "Fusion_fire",
  613. Techno: "Techno_fire",
  614. Infernal: "Infernal_fire",
  615. Quack: "Quackshot_fire",
  616. Scavenger: "Scavenger_fire",
  617. "8bit": "fire_m24_8bit",
  618. "Silenced (Fake)": "",
  619. },
  620. });
  621.  
  622. soundsFolder.addInput(tp.soundsFolder, "egg-k", {
  623. label: "Egg-k",
  624. options: {
  625. Default: "fire",
  626. Alien: "Alien_fire",
  627. Retro: "Retro_fire",
  628. Fusion: "Fusion_fire",
  629. Techno: "Techno_fire",
  630. Infernal: "Infernal_fire",
  631. Steambot: "Steambot_fire",
  632. Valkyrie: "Valkyrie_fire",
  633. Chocolate: "Chocolate_fire",
  634. "Infernal-2": "Infernal2_fire",
  635. },
  636. });
  637.  
  638. soundsFolder.addInput(tp.soundsFolder, "scrambler", {
  639. label: "Scrambler",
  640. options: {
  641. Default: "fire",
  642. Irish: "Irish_fire",
  643. Retro: "Retro_fire",
  644. Clouds: "Clouds_fire",
  645. Fusion: "Fusion_fire",
  646. Techno: "Techno_fire",
  647. Fantasy: "Fantasy_fire",
  648. Octopus: "Octopus_fire",
  649. Infernal: "Infernal_fire",
  650. Steambot: "Steambot_fire",
  651. Valkyrie: "Valkyrie_fire",
  652. Basketball: "Basketball_fire",
  653. },
  654. });
  655.  
  656. soundsFolder.addInput(tp.soundsFolder, "free-ranger", {
  657. label: "Free-Ranger",
  658. options: {
  659. Default: "fire",
  660. Retro: "Retro_fire",
  661. Fusion: "Fusion_fire",
  662. Techno: "Techno_fire",
  663. Infernal: "Infernal_fire",
  664. "Space-Egg": "spaceEgg_fire",
  665. Steambot: "Steambot_fire",
  666. Valkyrie: "Valkyrie_fire",
  667. Shellpreme: "Shellpreme_fire",
  668. RubberChicken: "RubberChicken_fire",
  669. },
  670. });
  671.  
  672. soundsFolder.addInput(tp.soundsFolder, "rpegg", {
  673. label: "Rpegg",
  674. options: {
  675. Default: "fire",
  676. Retro: "Retro_fire",
  677. Fusion: "Fusion_fire",
  678. Techno: "Techno_fire",
  679. Infernal: "Infernal_fire",
  680. Skeleton: "Skeleton_fire",
  681. Valkyrie: "Valkyrie_fire",
  682. Christmas: "Christmas_fire",
  683. },
  684. });
  685.  
  686. soundsFolder.addInput(tp.soundsFolder, "whipper", {
  687. label: "Whipper",
  688. options: {
  689. Default: "fire",
  690. Retro: "Retro_fire",
  691. Fusion: "Fusion_fire",
  692. Techno: "Techno_fire",
  693. Pumpkin: "Pumpkin_fire",
  694. Infernal: "Infernal_fire",
  695. Valkyrie: "Valkyrie_fire",
  696. "Special-Turkey": "SpecialTurkey_fire",
  697. },
  698. });
  699.  
  700. soundsFolder.addInput(tp.soundsFolder, "tri-hard", {
  701. label: "Tri-Hard",
  702. options: {
  703. Default: "fire",
  704. Cupid: "Cupid_fire",
  705. Fusion: "Fusion_fire",
  706. Retro: "Retro_fire",
  707. Infernal: "Infernal_fire",
  708. Techno: "Techno_fire_a",
  709. "Techno-B": "Techno_fire_b",
  710. Valkyrie: "Valkyrie_fire",
  711. Pumpkinpie: "Pumpkinpie_fire",
  712. },
  713. });
  714.  
  715. soundsFolder.addInput(tp.meleeSounds, "melee", {
  716. label: "Melee",
  717. options: {
  718. Default: ["melee_whisk_a"],
  719. Carver: ["melee_carver"],
  720. Cup: ["melee_cup_a", "melee_cup_b"],
  721. Eggpan: ["melee_eggpan"],
  722. Elf: ["melee_elf_a", "melee_elf_b"],
  723. Fish: ["melee_gfish_a", "melee_gfish_b"],
  724. Harrison: ["melee_harrison"],
  725. Infernal: ["melee_infernal"],
  726. Keytar: ["melee_keytar"],
  727. Mayan: ["melee_mayan"],
  728. Nutcracker: ["melee_nutcracker"],
  729. Pickleball: ["melee_pickleball"],
  730. Plunger: ["melee_plunger"],
  731. "Proper-Fish (idk)": ["melee_properfish_a", "melee_properfish_b"],
  732. Retro: ["melee_retro"],
  733. Rock: ["melee_rock"],
  734. Steambot: ["melee_steambot"],
  735. Techno: ["melee_techno"],
  736. Valkyrie: ["melee_valkyrie"],
  737. Zombie: ["melee_zombie"],
  738. },
  739. });
  740.  
  741. soundsFolder.addInput(tp.soundsFolder, "pistol", {
  742. label: "Pistol",
  743. options: {
  744. Default: "fire",
  745. Retro: "Retro_fire",
  746. Camera: "Camera_fire",
  747. Clouds: "Clouds_fire",
  748. Fusion: "Fusion_fire",
  749. Techno: "Techno_fire",
  750. Infernal: "Infernal_fire",
  751. "Space-Egg": "spaceEgg_fire",
  752. Steambot: "Steambot_fire",
  753. Valkyrie: "Valkyrie_fire",
  754. Megaphone: "Megaphone_fire",
  755. "Cubic-Castle": "CubicCastles_fire",
  756. },
  757. });
  758.  
  759. function refreshSounds() {
  760. updatedNeeded = true; // this updates the weapons
  761.  
  762. keyRetrieved = false; // this will grab the key necessary
  763. }
  764.  
  765. soundsFolder.on("change", (value) => {
  766. // console.log('Selected sound:', value);
  767. // console.log(tp.soundsFolder);
  768. refreshSounds();
  769. // Handle the sound change logic here
  770. localStorage.setItem("customSounds", JSON.stringify(tp.soundsFolder));
  771. });
  772.  
  773. addSettings
  774. .addButton({
  775. title: `Click if sounds didn\'t update`,
  776. })
  777. .on("click", () => {
  778. updatedNeeded = true;
  779. keyRetrieved = false;
  780. });
  781.  
  782. // BINDS FOLDER
  783. function addInputWithValidation(folder, obj, property, label) {
  784. folder.addInput(obj, property, { label: label }).on("change", (value) => {
  785. if (value.value.length > 1) {
  786. value.value = "Enter toggle";
  787. value.target.controller_.binding.value.rawValue_ = "Enter toggle";
  788. window.alert("Please enter a single key");
  789. } else {
  790. const store = value.value.replace(/"/g, "");
  791. localStorage.setItem(`tp-${property}`, store);
  792. }
  793. });
  794. }
  795. addInputWithValidation(bindsFolder, tp.bindsFolder, "hidePanel", "Hide Panel");
  796. addInputWithValidation(bindsFolder, tp.bindsFolder, "refreshSounds", "Refresh Sounds");
  797.  
  798. document.addEventListener("keydown", (e) => {
  799. if (e.key === tp.bindsFolder.hidePanel) {
  800. paneEl.style.display = paneEl.style.display === "block" ? "none" : "block";
  801. }
  802. if (e.key === tp.bindsFolder.refreshSounds) {
  803. refreshSounds();
  804. }
  805. });
  806. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址