LibertyMutualV1 For Shell Shockers

UPDATED FOR 0.47.0! Fed up of a popular script injecting ads into your game? Need a simple script to modify or use? FOSS ESP, Tracers and Aimbot. Hold right mouse button to aimlock.

目前为 2024-02-13 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name LibertyMutualV1 For Shell Shockers
  3. // @namespace https://github.com/onlypuppy7/LibertyMutualShellShockers/
  4. // @license GPL-3.0
  5. // @version 1.1.2
  6. // @author onlypuppy7
  7. // @description UPDATED FOR 0.47.0! Fed up of a popular script injecting ads into your game? Need a simple script to modify or use? FOSS ESP, Tracers and Aimbot. Hold right mouse button to aimlock.
  8. // @match https://shellshock.io/*
  9. // @grant none
  10. // @run-at document-start
  11. // @icon https://github.com/onlypuppy7/LibertyMutualShellShockers/blob/main/scripticon.jpg?raw=true
  12. // @require https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.1.1/crypto-js.min.js
  13. // ==/UserScript==
  14.  
  15. //Usage: Hold right mouse button to aimlock
  16. //This script is more of a template than a functioning tool. If you're modifying this, you can add a GUI to start!
  17.  
  18. (function () {
  19. //Config: if you want to turn off esp, you can.
  20.  
  21. const enableESP=true; //turn to false for off
  22. const enableTracers=true; //turn to false for off
  23.  
  24. //Credit for script injection code: AI. ChatGPT prompt: "tampermonkey script. how can i make it grab a javascript file as it's loaded. if it detects the javascript file, make it apply modifications to it via regex? using XMLHttpRequest"
  25. //Credit for idea to use XMLHttpRequest: A3+++
  26. const originalXHROpen = XMLHttpRequest.prototype.open;
  27. const originalXHRGetResponse = Object.getOwnPropertyDescriptor(XMLHttpRequest.prototype, 'response');
  28. let shellshockjs
  29. XMLHttpRequest.prototype.open = function(...args) {
  30. const url = args[1];
  31. if (url && url.includes("js/shellshock.js")) {
  32. shellshockjs = this;
  33. };
  34. originalXHROpen.apply(this, args);
  35. };
  36. Object.defineProperty(XMLHttpRequest.prototype, 'response', {
  37. get: function() {
  38. if (this===shellshockjs) {
  39. return applyLibertyMutual(originalXHRGetResponse.get.call(this));
  40. };
  41. return originalXHRGetResponse.get.call(this);
  42. }
  43. });
  44. //VAR STUFF
  45. let F=[];
  46. let H={};
  47. let functionNames=[];
  48. let ESPArray=[];
  49. let RMB=false;
  50.  
  51. //Credit: AI. ChatGPT prompt: "make javascript tampermonkey code that sets a variable RMB to true while right mouse button is being held"
  52. document.addEventListener('mousedown', function(event) {
  53. if (event.button === 2) {
  54. RMB = true;
  55. }
  56. });
  57.  
  58. document.addEventListener('mouseup', function(event) {
  59. if (event.button === 2) {
  60. RMB = false;
  61. }
  62. });
  63.  
  64. //scrambled... geddit????
  65. const getScrambled=function(){return Array.from({length: 10}, () => String.fromCharCode(97 + Math.floor(Math.random() * 26))).join('')}
  66. const createAnonFunction=function(name,func){
  67. const funcName=getScrambled();
  68. window[funcName]=func;
  69. F[name]=window[funcName];
  70. functionNames[name]=funcName
  71. };
  72. const findKeyWithProperty = function(obj, propertyToFind) {
  73. for (const key in obj) {
  74. if (obj.hasOwnProperty(key)) {
  75. if (key === propertyToFind) {
  76. return [key];
  77. } else if (
  78. typeof obj[key] === 'object' &&
  79. obj[key] !== null &&
  80. obj[key].hasOwnProperty(propertyToFind)
  81. ) {
  82. return key;
  83. };
  84. };
  85. };
  86. // Property not found
  87. return null;
  88. };
  89. const fetchTextContent = function(url) {
  90. var xhr = new XMLHttpRequest();
  91. xhr.open('GET', url, false); // Make the request synchronous
  92. xhr.send();
  93. if (xhr.status === 200) {
  94. return xhr.responseText;
  95. } else {
  96. console.error("Error fetching text content. Status:", xhr.status);
  97. return null;
  98. };
  99. };
  100.  
  101. const applyLibertyMutual = function(js) {
  102.  
  103. let hash = CryptoJS.SHA256(js).toString(CryptoJS.enc.Hex);
  104. let clientKeys;
  105. onlineClientKeys = fetchTextContent("https://raw.githubusercontent.com/StateFarmNetwork/client-keys/main/libertymutual_"+hash+".json"); //credit: me :D
  106.  
  107. if (onlineClientKeys == "value_undefined" || onlineClientKeys == null) {
  108. let userInput = prompt('Valid keys could not be retrieved online. Enter keys if you have them. Join the StateFarm Network Discord server to generate keys! https://discord.gg/HYJG3jXVJF', '');
  109. if (userInput !== null && userInput !== '') {
  110. alert('Aight, let\'s try this. If it is invalid, it will just crash.');
  111. clientKeys = JSON.parse(userInput);
  112. } else {
  113. alert('You did not enter anything, this is gonna crash lmao.');
  114. };
  115. } else {
  116. clientKeys = JSON.parse(onlineClientKeys);
  117. };
  118.  
  119. H = clientKeys.vars;
  120.  
  121. let injectionString="";
  122. const modifyJS = function(find,replace) {
  123. let oldJS = js;
  124. js = js.replace(find,replace);
  125. if (oldJS !== js) {
  126. console.log("%cReplacement successful! Injected code: "+replace, 'color: green; font-weight: bold; font-size: 0.6em; text-decoration: italic;');
  127. } else {
  128. console.log("%cReplacement failed! Attempted to replace "+find+" with: "+replace, 'color: red; font-weight: bold; font-size: 0.6em; text-decoration: italic;');
  129. };
  130. };
  131.  
  132. console.log('%cATTEMPTING TO START LIBERTYMUTUAL', 'color: magenta; font-weight: bold; font-size: 1.5em; text-decoration: underline;');
  133. const variableNameRegex = /^[a-zA-Z_$][a-zA-Z0-9_$]*$/;
  134. for (let name in H) {
  135. deobf = H[name];
  136. if (variableNameRegex.test(deobf)) {
  137. injectionString = `${injectionString}${name}: (() => { try { return ${deobf}; } catch (error) { return "value_undefined"; } })(),`;
  138. } else {
  139. alert("Message from the LibertyMutual Devs: WARNING! The keys inputted contain non-variable characters! There is a possibility that this could run code unintended by the LibertyMutual team, although possibly there is also a mistake. Do NOT proceed with using this, and report to the LibertyMutual developers what is printed in the console.");
  140. console.log("REPORT THIS IN THE DISCORD SERVER:", clientKeys);
  141. const crashplease = "balls";
  142. crashplease = "balls2";
  143. };
  144. };
  145. console.log(injectionString);
  146. console.log('%cLIBERTYMUTUAL INJECTION: INJECT VAR RETRIEVAL FUNCTION AND MAIN LOOP', 'color: yellow; font-weight: bold; font-size: 1.2em; text-decoration: underline;');
  147. modifyJS(H.SCENE+'.render',`window["${functionNames.retrieveFunctions}"]({${injectionString}},true)||${H.SCENE}.render`);
  148. console.log('%cSuccess! Variable retrieval and main loop hooked.', 'color: green; font-weight: bold;');
  149. modifyJS(`{if(${H.CULL})`,`{if(true)`);
  150. console.log('%cSuccess! Cull inhibition hooked.', 'color: green; font-weight: bold;');
  151. modifyJS("Not playing in iframe", "LIBERTYMUTUAL ACTIVE!");
  152. // console.log(js);
  153. console.log(H);
  154. return js;
  155. };
  156.  
  157. createAnonFunction("retrieveFunctions",function(vars) { ss=vars ; F.LIBERTYMUTUAL() });
  158.  
  159. createAnonFunction("LIBERTYMUTUAL",function() {
  160. globalSS = ss;
  161.  
  162. ss.BABYLONJS.Vector3 = ss.MYPLAYER.constructor.v1.constructor;
  163. H.actor = findKeyWithProperty(ss.MYPLAYER,H.mesh);
  164.  
  165. let TARGETED;
  166. let CROSSHAIRS=new ss.BABYLONJS.Vector3();
  167. CROSSHAIRS.copyFrom(ss.MYPLAYER[H.actor][H.mesh].position);
  168. const horizontalOffset = Math.sin(ss.MYPLAYER[H.actor][H.mesh].rotation.y);
  169. const verticalOffset = Math.sin(-ss.MYPLAYER[H.pitch]);
  170. CROSSHAIRS.x+=horizontalOffset;
  171. CROSSHAIRS.y+=verticalOffset+0.4;
  172. CROSSHAIRS.z+=Math.cos(ss.MYPLAYER[H.actor][H.mesh].rotation.y);
  173.  
  174. const timecode=Date.now();
  175. let minValue=99999;
  176. ss.PLAYERS.forEach(PLAYER=>{
  177. if (PLAYER) {
  178. PLAYER.timecode=timecode;
  179. //Partial credit for enemy player filtering: PacyTense. Also just common sense.
  180. if ((PLAYER!==ss.MYPLAYER) && ((ss.MYPLAYER.team==0)||(PLAYER.team!==ss.MYPLAYER.team))) {
  181. //ESP CODE
  182. if ((!PLAYER.generatedESP)) {
  183. //Credit for box from lines code: AI. ChatGPT prompt: "how can i create a box out of lines in babylon.js?"
  184. //ESP BOXES
  185. const boxSize = {width: 0.4, height: 0.65, depth: 0.4};
  186. const vertices = [
  187. new ss.BABYLONJS.Vector3(-boxSize.width / 2, 0, -boxSize.depth / 2),
  188. new ss.BABYLONJS.Vector3(boxSize.width / 2, 0, -boxSize.depth / 2),
  189. new ss.BABYLONJS.Vector3(boxSize.width / 2, 0 + boxSize.height, -boxSize.depth / 2),
  190. new ss.BABYLONJS.Vector3(-boxSize.width / 2, 0 + boxSize.height, -boxSize.depth / 2),
  191. new ss.BABYLONJS.Vector3(-boxSize.width / 2, 0, boxSize.depth / 2),
  192. new ss.BABYLONJS.Vector3(boxSize.width / 2, 0, boxSize.depth / 2),
  193. new ss.BABYLONJS.Vector3(boxSize.width / 2, 0 + boxSize.height, boxSize.depth / 2),
  194. new ss.BABYLONJS.Vector3(-boxSize.width / 2, 0 + boxSize.height, boxSize.depth / 2),
  195. ];
  196. const lines = [];
  197. for (let i = 0; i < 4; i++) {
  198. lines.push([vertices[i], vertices[(i + 1) % 4]]);
  199. lines.push([vertices[i + 4], vertices[(i + 1) % 4 + 4]]);
  200. lines.push([vertices[i], vertices[i + 4]]);
  201. };
  202. const box = ss.BABYLONJS[H.MeshBuilder].CreateLineSystem(getScrambled(), { lines }, PLAYER[H.actor].scene);
  203. //ChatGPT prompt: "how can i make an object anchored to another object, change its color, and have it render on top of everything else? babylon.js"
  204. box.color = new ss.BABYLONJS.Color3(1, 1, 1);
  205. box.renderingGroupId = 1;
  206. box.parent=PLAYER[H.actor][H.mesh];
  207. //TRACER LINES
  208. const tracers=ss.BABYLONJS[H.MeshBuilder][H.CreateLines]('lines', { points: [PLAYER[H.actor][H.mesh].position, CROSSHAIRS] }, PLAYER[H.actor].scene);
  209. tracers.color=new ss.BABYLONJS.Color3(1, 1, 1);
  210. tracers.alwaysSelectAsActiveMesh = true;
  211. tracers.renderingGroupId=1;
  212. PLAYER.box=box;
  213. PLAYER.tracers=tracers;
  214. PLAYER.generatedESP=true;
  215. ESPArray.push([box,tracers,PLAYER]);
  216. };
  217. //update the lines
  218. PLAYER.tracers.setVerticesData(ss.BABYLONJS.VertexBuffer.PositionKind, [CROSSHAIRS.x, CROSSHAIRS.y, CROSSHAIRS.z, PLAYER[H.actor][H.mesh].position.x, PLAYER[H.actor][H.mesh].position.y, PLAYER[H.actor][H.mesh].position.z]);
  219. PLAYER.box.visibility=enableESP;
  220. PLAYER.tracers.visibility=(PLAYER[H.playing]&&enableTracers);
  221.  
  222. //AIMBOT CODE
  223. //Credit: This section is mostly common sense, and could be made by most decent programmers. It is still worth mentioning PacyTense used a functionally equivalent thing similar to this this before me 4 years ago.
  224. const distance=Math.hypot(PLAYER[H.x]-ss.MYPLAYER[H.x], PLAYER[H.y]-ss.MYPLAYER[H.y], PLAYER[H.z]-ss.MYPLAYER[H.z]);
  225.  
  226. if (distance<minValue) {
  227. TARGETED=PLAYER;
  228. minValue=distance;
  229. };
  230. };
  231. };
  232. if (RMB && TARGETED && TARGETED[H.playing]) {
  233. //3D maths
  234. const directionVector={
  235. [H.x]: TARGETED[H.x]-ss.MYPLAYER[H.x],
  236. [H.y]: TARGETED[H.y]-ss.MYPLAYER[H.y]-0.05,
  237. [H.z]: TARGETED[H.z]-ss.MYPLAYER[H.z],
  238. };
  239. ss.MYPLAYER[H.yaw]=F.calculateYaw(directionVector);
  240. ss.MYPLAYER[H.pitch]=F.calculatePitch(directionVector);
  241. };
  242. });
  243. for ( let i=0;i<ESPArray.length;i++) {
  244. if (ESPArray[i][2] && ESPArray[i][2].timecode==timecode) { //still exists
  245. } else {
  246. //Credit for info: AI. ChatGPT prompt: "how can i delete an object in babylon.js?"
  247. ESPArray[i][0].dispose();
  248. ESPArray[i][1].dispose();
  249. ESPArray.splice(i,1);
  250. };
  251. };
  252. });
  253. createAnonFunction("setPrecision",function (value) { return Math.floor(value * 8192) / 8192 }); //required precision
  254. createAnonFunction("calculateYaw",function (pos) {
  255. return F.setPrecision(Math.mod(Math.atan2(pos[H.x],pos[H.z]), Math.PI2));
  256. });
  257. createAnonFunction("calculatePitch",function (pos) {
  258. return F.setPrecision(-Math.atan2(pos[H.y],Math.hypot(pos[H.x],pos[H.z]))%1.5);
  259. });
  260. })();

QingJ © 2025

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