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-14 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name LibertyMutualV1 For Shell Shockers
  3. // @namespace https://github.com/onlypuppy7/LibertyMutualShellShockers/
  4. // @license GPL-3.0
  5. // @version 1.2.0
  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. ss.PLAYERS.forEach(PLAYER=>{
  162. if (PLAYER.hasOwnProperty("ws")) {
  163. ss.MYPLAYER = PLAYER
  164. };
  165. });
  166.  
  167. H.actor = findKeyWithProperty(ss.MYPLAYER,H.mesh);
  168.  
  169. let TARGETED;
  170. let CROSSHAIRS=new BABYLON.Vector3();
  171. CROSSHAIRS.copyFrom(ss.MYPLAYER[H.actor][H.mesh].position);
  172. const horizontalOffset = Math.sin(ss.MYPLAYER[H.actor][H.mesh].rotation.y);
  173. const verticalOffset = Math.sin(-ss.MYPLAYER[H.pitch]);
  174. CROSSHAIRS.x+=horizontalOffset;
  175. CROSSHAIRS.y+=verticalOffset+0.4;
  176. CROSSHAIRS.z+=Math.cos(ss.MYPLAYER[H.actor][H.mesh].rotation.y);
  177.  
  178. const timecode=Date.now();
  179. let minValue=99999;
  180. ss.PLAYERS.forEach(PLAYER=>{
  181. if (PLAYER) {
  182. PLAYER.timecode=timecode;
  183. //Partial credit for enemy player filtering: PacyTense. Also just common sense.
  184. if ((PLAYER!==ss.MYPLAYER) && ((ss.MYPLAYER.team==0)||(PLAYER.team!==ss.MYPLAYER.team))) {
  185. //ESP CODE
  186. if ((!PLAYER.generatedESP)) {
  187. //Credit for box from lines code: AI. ChatGPT prompt: "how can i create a box out of lines in babylon.js?"
  188. //ESP BOXES
  189. const boxSize = {width: 0.4, height: 0.65, depth: 0.4};
  190. const vertices = [
  191. new BABYLON.Vector3(-boxSize.width / 2, 0, -boxSize.depth / 2),
  192. new BABYLON.Vector3(boxSize.width / 2, 0, -boxSize.depth / 2),
  193. new BABYLON.Vector3(boxSize.width / 2, 0 + boxSize.height, -boxSize.depth / 2),
  194. new BABYLON.Vector3(-boxSize.width / 2, 0 + boxSize.height, -boxSize.depth / 2),
  195. new BABYLON.Vector3(-boxSize.width / 2, 0, boxSize.depth / 2),
  196. new BABYLON.Vector3(boxSize.width / 2, 0, boxSize.depth / 2),
  197. new BABYLON.Vector3(boxSize.width / 2, 0 + boxSize.height, boxSize.depth / 2),
  198. new BABYLON.Vector3(-boxSize.width / 2, 0 + boxSize.height, boxSize.depth / 2),
  199. ];
  200. const lines = [];
  201. for (let i = 0; i < 4; i++) {
  202. lines.push([vertices[i], vertices[(i + 1) % 4]]);
  203. lines.push([vertices[i + 4], vertices[(i + 1) % 4 + 4]]);
  204. lines.push([vertices[i], vertices[i + 4]]);
  205. };
  206. const box = BABYLON.MeshBuilder.CreateLineSystem(getScrambled(), { lines }, PLAYER[H.actor].scene);
  207. //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"
  208. box.color = new BABYLON.Color3(1, 1, 1);
  209. box.renderingGroupId = 1;
  210. box.parent=PLAYER[H.actor][H.mesh];
  211. //TRACER LINES
  212. const tracers=BABYLON.MeshBuilder.CreateLines('lines', { points: [PLAYER[H.actor][H.mesh].position, CROSSHAIRS] }, PLAYER[H.actor].scene);
  213. tracers.color=new BABYLON.Color3(1, 1, 1);
  214. tracers.alwaysSelectAsActiveMesh = true;
  215. tracers.renderingGroupId=1;
  216. PLAYER.box=box;
  217. PLAYER.tracers=tracers;
  218. PLAYER.generatedESP=true;
  219. ESPArray.push([box,tracers,PLAYER]);
  220. };
  221. //update the lines
  222. PLAYER.tracers.setVerticesData(BABYLON.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]);
  223. PLAYER.box.visibility=enableESP;
  224. PLAYER.tracers.visibility=(PLAYER[H.playing]&&enableTracers);
  225.  
  226. //AIMBOT CODE
  227. //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.
  228. 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]);
  229.  
  230. if (distance<minValue) {
  231. TARGETED=PLAYER;
  232. minValue=distance;
  233. };
  234. };
  235. };
  236. if (RMB && TARGETED && TARGETED[H.playing]) {
  237. //3D maths
  238. const directionVector={
  239. [H.x]: TARGETED[H.x]-ss.MYPLAYER[H.x],
  240. [H.y]: TARGETED[H.y]-ss.MYPLAYER[H.y]-0.05,
  241. [H.z]: TARGETED[H.z]-ss.MYPLAYER[H.z],
  242. };
  243. ss.MYPLAYER[H.yaw]=F.calculateYaw(directionVector);
  244. ss.MYPLAYER[H.pitch]=F.calculatePitch(directionVector);
  245. };
  246. });
  247. for ( let i=0;i<ESPArray.length;i++) {
  248. if (ESPArray[i][2] && ESPArray[i][2].timecode==timecode) { //still exists
  249. } else {
  250. //Credit for info: AI. ChatGPT prompt: "how can i delete an object in babylon.js?"
  251. ESPArray[i][0].dispose();
  252. ESPArray[i][1].dispose();
  253. ESPArray.splice(i,1);
  254. };
  255. };
  256. });
  257. createAnonFunction("setPrecision",function (value) { return Math.floor(value * 8192) / 8192 }); //required precision
  258. createAnonFunction("calculateYaw",function (pos) {
  259. return F.setPrecision(Math.mod(Math.atan2(pos[H.x],pos[H.z]), Math.PI2));
  260. });
  261. createAnonFunction("calculatePitch",function (pos) {
  262. return F.setPrecision(-Math.atan2(pos[H.y],Math.hypot(pos[H.x],pos[H.z]))%1.5);
  263. });
  264. })();

QingJ © 2025

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