Shell Shockers Hide FPS

Hide FPS and uncap it (FAKE)

Verze ze dne 24. 12. 2024. Zobrazit nejnovější verzi.

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         Shell Shockers Hide FPS
// @license      GPL-3.0
// @version      1.3.1
// @author       wish?
// @grant        none
// @run-at       document-start
// @require      https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.1.1/crypto-js.min.js
// @require     https://cdn.jsdelivr.net/npm/[email protected]/dist/tweakpane.min.js
// @require      https://cdn.jsdelivr.net/npm/@tweakpane/[email protected]/dist/tweakpane-plugin-essentials.min.js
// @require      https://cdnjs.cloudflare.com/ajax/libs/jszip/3.7.1/jszip.min.js
// @description  Hide FPS and uncap it (FAKE)
//
//
// @match         *://eggshooter.best/*
// @match        *://*.shellshock.io/*
// @match        *://*.algebra.best/*
// @match        *://*.algebra.vip/*
// @match        *://*.biologyclass.club/*
// @match        *://*.deadlyegg.com/*
// @match        *://*.deathegg.world/*
// @match        *://*.eggboy.club/*
// @match        *://*.eggboy.xyz/*
// @match        *://*.eggcombat.com/*
// @match        *://*.egg.dance/*
// @match        *://*.eggfacts.fun/*
// @match        *://*.egghead.institute/*
// @match        *://*.eggisthenewblack.com/*
// @match        *://*.eggsarecool.com/*
// @match        *://*.geometry.best/*
// @match        *://*.geometry.monster/*
// @match        *://*.geometry.pw/*
// @match        *://*.geometry.report/*
// @match        *://*.hardboiled.life/*
// @match        *://*.hardshell.life/*
// @match        *://*.humanorganising.org/*
// @match        *://*.mathactivity.xyz/*
// @match        *://*.mathactivity.club/*
// @match        *://*.mathdrills.info/*
// @match        *://*.mathdrills.life/*
// @match        *://*.mathfun.rocks/*
// @match        *://*.mathgames.world/*
// @match        *://*.math.international/*
// @match        *://*.mathlete.fun/*
// @match        *://*.mathlete.pro/*
// @match        *://*.overeasy.club/*
// @match        *://*.risenegg.com/*
// @match        *://*.scrambled.tech/*
// @match        *://*.scrambled.today/*
// @match        *://*.scrambled.us/*
// @match        *://*.scrambled.world/*
// @match        *://*.shellshockers.club/*
// @match        *://*.shellshockers.life/*
// @match        *://*.shellshockers.site/*
// @match        *://*.shellshockers.us/*
// @match        *://*.shellshockers.world/*
// @match        *://*.shellshockers.xyz/*
// @match        *://*.shellsocks.com/*
// @match        *://*.softboiled.club/*
// @match        *://*.urbanegger.com/*
// @match        *://*.violentegg.club/*
// @match        *://*.violentegg.fun/*
// @match        *://*.yolk.best/*
// @match        *://*.yolk.life/*
// @match        *://*.yolk.rocks/*
// @match        *://*.yolk.tech/*
// @match        *://*.yolk.quest/*
// @match        *://*.yolk.today/*
// @match        *://*.zygote.cafe/*
// @match        *://*.shellshockers.best/*
// @match        *://*.eggboy.me/*
// @namespace https://greatest.deepsurf.us/users/1361048
// ==/UserScript==
 
(function () {
	let originalReplace = String.prototype.replace;
 
	String.prototype.originalReplace = function () {
		return originalReplace.apply(this, arguments);
	};
 
	const originalXHROpen = XMLHttpRequest.prototype.open;
	const originalXHRGetResponse = Object.getOwnPropertyDescriptor(XMLHttpRequest.prototype, "response");
	let shellshockjs;
	XMLHttpRequest.prototype.open = function (...args) {
		const url = args[1];
		if (url && url.includes("js/shellshock.js")) {
			shellshockjs = this;
		}
		originalXHROpen.apply(this, args);
	};
	Object.defineProperty(XMLHttpRequest.prototype, "response", {
		get: function () {
			if (this === shellshockjs) {
				return applyLibertyMutual(originalXHRGetResponse.get.call(this));
			}
			return originalXHRGetResponse.get.call(this);
		},
	});
	//VAR STUFF
	let F = [];
	let H = {};
	let functionNames = [];
  let tp = {
    hideFPS: {
      hide: JSON.parse(localStorage.getItem('tp-hideFPS')) || false,
      min: JSON.parse(localStorage.getItem('tp-minFPS')) || 20,
      max: JSON.parse(localStorage.getItem('tp-maxFPS')) || 200,
      random: JSON.parse(localStorage.getItem('tp-randomFPS')) || false,
    }
  };
 
  function createFolders(NFolder) {
		let test = pane.addFolder({
			title: NFolder,
			expanded: false,
		});
    return test
	};
 
  function hideFPS(value) {
    let fpsCounter = document.querySelector('#FPS');
    if (value) {
    if (fpsCounter) {
      fpsCounter.style.display = 'none';
      }
    } else {
      fpsCounter.style.display = 'block';
    }
  };
 
function randomise(min, max, active) {
    if (active) {
 
        const randomFPS = Math.floor(Math.random() * (max - min + 1)) + min;
 
        let fpsCounter = document.querySelector('#FPS');
        if (fpsCounter) {
            fpsCounter.textContent = randomFPS;
        }
    }
};
 
  const makeDraggable = function (element, notMenu) {
		if (element) {
			let offsetX, offsetY;
			element.addEventListener("mousedown", function (e) {
				const dragElement = function (e) {
					const x = ((e.clientX - offsetX) / unsafeWindow.innerWidth) * 100;
					const y = ((e.clientY - offsetY) / unsafeWindow.innerHeight) * 100;
					const maxX = 100 - (element.offsetWidth / unsafeWindow.innerWidth) * 100;
					const maxY = 100 - (element.offsetHeight / unsafeWindow.innerHeight) * 100;
					element.style.left = `${Math.max(0, Math.min(x, maxX))}%`;
					element.style.top = `${Math.max(0, Math.min(y, maxY))}%`;
				};
				if (notMenu || e.target.classList.contains("tp-rotv_t")) {
					offsetX = e.clientX - element.getBoundingClientRect().left;
					offsetY = e.clientY - element.getBoundingClientRect().top;
					document.addEventListener("mousemove", dragElement);
					document.addEventListener("mouseup", function () {
						document.removeEventListener("mousemove", dragElement);
					});
					e.preventDefault(); // Prevent text selection during drag
				}
			});
		}
	};
 
	//scrambled... geddit????
	const getScrambled = function () {
		return Array.from({ length: 10 }, () => String.fromCharCode(97 + Math.floor(Math.random() * 26))).join("");
	};
	const createAnonFunction = function (name, func) {
		const funcName = getScrambled();
		window[funcName] = func;
		F[name] = window[funcName];
		functionNames[name] = funcName;
	};
 
	const findKeyWithProperty = function (obj, propertyToFind) {
		for (const key in obj) {
			if (obj.hasOwnProperty(key)) {
				if (key === propertyToFind) {
					return [key];
				} else if (typeof obj[key] === "object" && obj[key] !== null && obj[key].hasOwnProperty(propertyToFind)) {
					return key;
				}
			}
		}
		// Property not found
		return null;
	};
	const fetchTextContent = function (url) {
		var xhr = new XMLHttpRequest();
		xhr.open("GET", url, false); // Make the request synchronous
		xhr.send();
		if (xhr.status === 200) {
			return xhr.responseText;
		} else {
			console.error("Error fetching text content. Status:", xhr.status);
			return null;
		}
	};
 
 
	const applyLibertyMutual = function (js) {
		let hash = CryptoJS.SHA256(js).toString(CryptoJS.enc.Hex);
		let clientKeys;
		onlineClientKeys = fetchTextContent("https://raw.githubusercontent.com/StateFarmNetwork/client-keys/main/statefarm_" + hash + ".json"); //credit: me :D
 
		clientKeys = JSON.parse(onlineClientKeys);
 
		H = clientKeys.vars;
 
		let injectionString = "";
 
		const modifyJS = function (find, replace) {
			let oldJS = js;
			js = js.originalReplace(find, replace);
			if (oldJS !== js) {
				console.log(
					"%cReplacement successful! Injected code: " + replace,
					"color: green; font-weight: bold; font-size: 0.6em; text-decoration: italic;"
				);
			} else {
				console.log(
					"%cReplacement failed! Attempted to replace " + find + " with: " + replace,
					"color: red; font-weight: bold; font-size: 0.6em; text-decoration: italic;"
				);
			}
		};
 
		console.log("%cATTEMPTING TO START ????", "color: magenta; font-weight: bold; font-size: 1.5em; text-decoration: underline;");
		const variableNameRegex = /^[a-zA-Z_$][a-zA-Z0-9_$]*$/;
		for (let name in H) {
			deobf = H[name];
			if (variableNameRegex.test(deobf)) {
				injectionString = `${injectionString}${name}:  (() => { let variable = "value_undefined"; try { eval("variable = ${deobf};"); } catch (error) { return "value_undefined"; }; return variable; })(),`;
			} else {
 
			}
		}
		const f = function (varName) {
			return varName.replace("$", "\\$");
		};
		const FUNCTIONPARAM = new RegExp("function " + f(H._connectFail) + "\\(([a-zA-Z$_]+)\\)").exec(js)[1];
		console.log(injectionString);
		console.log(
			"%cSOUNDS INJECTION: INJECT VAR RETRIEVAL FUNCTION AND MAIN LOOP",
			"color: yellow; font-weight: bold; font-size: 1.2em; text-decoration: underline;"
		);
 
		modifyJS(H.SCENE + ".render", `window["${functionNames.retrieveFunctions}"]({${injectionString}},true)||${H.SCENE}.render`);
 
		console.log(H);
		return js;
	};
 
	createAnonFunction("retrieveFunctions", function (vars) {
		ss = vars;
		window.globalSS = ss;
 
		F.HIDEFPS();
	});
 
 
 
	createAnonFunction("HIDEFPS", function () {
		ss.PLAYERS.forEach((PLAYER) => {
			if (PLAYER.hasOwnProperty("ws")) {
				ss.MYPLAYER = PLAYER;
			};
      hideFPS(tp.hideFPS.hide);
      randomise(tp.hideFPS.min, tp.hideFPS.max, tp.hideFPS.random)
 
		});
 
		H.actor = findKeyWithProperty(ss.MYPLAYER, H.mesh);
	});
 
 
  const Tweakpane = window.Tweakpane;
	const pane = new Tweakpane.Pane({
		title: "Hide FPS",
		expanded: true,
	});
	const paneEl = document.querySelector("div.tp-dfwv");
	paneEl.style.zIndex = 1000;
	paneEl.style.width = "300px";
 
  function createInput(obj, property, options, callback) {
    pane.addInput(obj, property, options).on('change', callback)
  };
 
  makeDraggable(document.querySelector(".tp-dfwv"));
 
 
  createInput(tp.hideFPS, 'hide', {label: 'Hide FPS'}, (value) => {
    localStorage.setItem('tp-hideFPS', JSON.stringify(value.value));
  });
  createInput(tp.hideFPS, 'random', {label: 'Randomise FPS'}, (value) => {
    localStorage.setItem('tp-randomFPS', JSON.stringify(value.value))
  })
  createInput(tp.hideFPS, 'min', {label: 'Min FPS', view:'slider', min: 1, max: 999, step:1}, (value) => {
    localStorage.setItem('tp-minFPS', JSON.stringify(value.value))
  });
  createInput(tp.hideFPS, 'max', {label: 'Max FPS', view:'slider', min: 1, max: 999, step:1}, (value) => {
    localStorage.setItem('tp-maxFPS', JSON.stringify(value.value))
  });
 
 
  document.addEventListener('keydown', (e) => {
    if (e.key === 'h') {
      const element = document.querySelector('.tp-dfwv');
    element.style.display = element.style.display === 'none' ? 'block' : 'none';
    }
  })
 
 
})();