Modify Kills Text

Changes the boring kills text to something more interesting

Tendrás que instalar una extensión para tu navegador como Tampermonkey, Greasemonkey o Violentmonkey si quieres utilizar este script.

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

Tendrás que instalar una extensión como Tampermonkey o Violentmonkey para instalar este script.

Necesitarás instalar una extensión como Tampermonkey o Userscripts para instalar este script.

Tendrás que instalar una extensión como Tampermonkey antes de poder instalar este script.

Necesitarás instalar una extensión para administrar scripts de usuario si quieres instalar este script.

(Ya tengo un administrador de scripts de usuario, déjame instalarlo)

Tendrás que instalar una extensión como Stylus antes de poder instalar este script.

Tendrás que instalar una extensión como Stylus antes de poder instalar este script.

Tendrás que instalar una extensión como Stylus antes de poder instalar este script.

Para poder instalar esto tendrás que instalar primero una extensión de estilos de usuario.

Para poder instalar esto tendrás que instalar primero una extensión de estilos de usuario.

Para poder instalar esto tendrás que instalar primero una extensión de estilos de usuario.

(Ya tengo un administrador de estilos de usuario, déjame instalarlo)

// ==UserScript==
// @name        Modify Kills Text
// @description Changes the boring kills text to something more interesting
// @namespace   Violentmonkey Scripts
//
// @match       https://shellshock.io/*
// @match         *://eggshooter.best/*
// @match        *://*.shellshock.io/*
// @match        *://*.shell.onlypuppy7.online/*
// @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/*

// @run-at       document-start
// @grant       none
// @version     1.0
// @author      -
// @description 2/12/2025, 2:02:07 PM
//
// @license      MIT
// @require      https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.1.1/crypto-js.min.js
// ==/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 applyScript(originalXHRGetResponse.get.call(this));
			}
			return originalXHRGetResponse.get.call(this);
		},
	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
  "M 87.5 32.38 L 89.08 31.22 L 83.84 24.64 L 80.1 27.62 L 77.06 26 L 74 28.24 L 75.06 31.68 L 58 45.3 L 55.22 45.46 L 42.46 55.66 L 40.9 54.36 L 38.2 56.36 L 39.14 58.36 L 37.74 59.48 A 1.44 1.44 0 0 0 37.4 61.34 L 43.72 71.88 L 48.16 72.54 L 56.82 91.5 L 62.1 93.5 L 71.22 84.76 L 71.76 79.32 L 67.02 68.58 L 77.02 59.4 L 72.52 52.8 L 78.12 48 L 77.44 46.22 L 88.66 37.06 L 88 36.1 L 89.26 35.14 Z M 72.88 58.92 L 65.74 65.54 L 64.92 63.68 L 68.26 60.36 L 63.22 57.42 L 67.94 53.42 L 69.08 54.04 Z Z Z",
  };

  const patterns = {
		sound: /"sound\/sounds\.json\?"\+(..)/,
		scope: /,this\.(..)\.position\.z=2/,
		teamColors: /([A-Za-z]+)=\{text:\["#fff100","#00ffff","#f53e40"\]/g,
    killsText: /(.)\=\'\<span style.*?;/,
    lastDmg: /\([A-Za-z$_]\.lastDmgType\=([A-Za-z$_]).*?{/
	};

	//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 applyScript = function (js) {
		let hash = CryptoJS.SHA256(js).toString(CryptoJS.enc.Hex);
		let clientKeys;
		onlineClientKeys = fetchTextContent("https://raw.githubusercontent.com/StateFarmNetwork/client-keys/main/statefarm_latest.json"); //credit: op7 :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;"
				);
			}
		};

    H.extra = {
			teamColors: patterns.teamColors.exec(js)[1],
      killsText: patterns.killsText.exec(js),
      lastDmg: patterns.lastDmg.exec(js)
		}

		console.log("%cATTEMPTING TO START WISH-SCRIPT", "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; })(),`;
			}
		}
		const f = function (varName) {
			return varName.replace("$", "\\$");
		};
		const FUNCTIONPARAM = new RegExp("function " + H._connectFail.replace("$", "\\$") + "\\(([a-zA-Z$_]+)\\)").exec(js)[1];

		modifyJS(H.SCENE + ".render", `window["${functionNames.retrieveFunctions}"]({${injectionString}},true)||${H.SCENE}.render`);

    modifyJS(`${H.extra.killsText[0]}`,
    `${H.extra.killsText[1]}='<span style="color:' + ${H.extra.teamColors}.text[e.team] + '">' + e.name + "</span>" +
    \`<svg viewBox="0 0 100 100" width="27" height="27" style="display: inline-block; vertical-align: middle; margin-top: -3px;"><path d="\${window.weaponsURL[e.weapon["${H.actor}"].standardMeshName]}" fill="#FFFFFF"></path></svg>\` +
    '→ <span style="color:' + ${H.extra.teamColors}.text[t.team] + '">'+t.name+"</span>";`
    );

		console.log(H);
		return js;
	};

	createAnonFunction("retrieveFunctions", function (vars) {
		ss = vars;
		F.WISHSCRIPT();
	});



	createAnonFunction("WISHSCRIPT", function () {
		ss.PLAYERS.forEach((PLAYER) => {
			if (PLAYER.hasOwnProperty("ws")) {
				ss.MYPLAYER = PLAYER;
			}
		});

		H.actor = findKeyWithProperty(ss.MYPLAYER, H.mesh);
	});
})();