Fucker Menu fly rapid fire trigger bot and more!

Will you manage to take over the world?

  1. // ==UserScript==
  2. // @name Fucker Menu fly rapid fire trigger bot and more!
  3. // @namespace http://tampermonkey.net/
  4. // @version 20230909.1.1
  5. // @description Will you manage to take over the world?
  6. // @author OliwiaTheOla
  7. // @match https://craftnite.io/*
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=craftnite.io
  9. // @grant none
  10. // @license by-nd 4.0
  11. // ==/UserScript==
  12.  
  13. //VHC designed by OliwiaTheOla
  14.  
  15. //dispose of old client (if any)
  16. if(client) {
  17. client.dispose();
  18. };
  19.  
  20. var client = {
  21. Hacks: [],
  22. version: "By OliwiaTheOla",
  23. keyBinds: {},
  24. inGame: false,
  25. };
  26. client.Hack = class {
  27. constructor(enable, mainLoop, disable, name, description, key, delay, configurationDefinition){
  28. this.enable = function(){try {enable(this_);}catch(e){}; this.isEnabled = true};
  29. this.mainLoop = mainLoop;
  30. this.disable = function(){try {disable(this_);}catch(e){}; this.isEnabled = false};
  31. this.name = name;
  32. this.description = description;
  33. this.isEnabled = false;
  34. this.key = key;
  35.  
  36. this.configurationDefinition = configurationDefinition;
  37. this.config = {};
  38. setTimeout(function() {
  39. this_.configurationDefinition && Object.keys(this_.configurationDefinition).forEach(function (e) {
  40. this_.config[e] = localStorage[this_.name] && JSON.parse(localStorage[this_.name]).config[e] ? JSON.parse(localStorage[this_.name]).config[e] : this_.configurationDefinition[e].defaultValue != undefined ? this_.configurationDefinition[e].defaultValue : (this_.configurationDefinition[e].possibleValues && this_.configurationDefinition[e].possibleValues[0] != undefined) ? this_.configurationDefinition[e].possibleValues[0] : false;
  41. });
  42. }, 1);
  43.  
  44. client.keyBinds[this.key] = this.name;
  45. var this_ = this;
  46. if(!delay){
  47. delay = 10;
  48. };
  49. function loop(){
  50. if(this_.isEnabled && client){
  51. this_.mainLoop(this_);
  52. };
  53. setTimeout(loop, delay);
  54. };
  55. setTimeout(loop, 100);
  56. client.Hacks.push(this);
  57. };
  58. };
  59. client.MenuElement = class {
  60. constructor(Hacks, title, left, top){
  61. var menuElement = document.createElement("div");
  62. menuElement.style = "left:"+left+"; color: rgba(0, 0, 0, 1) !important; top:"+top+"; margin: 25px; text-align: center; background: rgba(114, 154, 232, 1) !important; font-family: inherit; width:20%; height: 60%; position: absolute; border: solid black 4px";
  63. menuElement.id = title;
  64. menuElement.innerHTML = "<div style='border-bottom: solid black 4px; /*height: 2.5%;*/ padding: 5%; background-color: rgba(149, 180, 240, 1); font-size: 200%' id="+title+"header >"+title+"</div>";
  65. client.menuElement.appendChild(menuElement);
  66. for(let i = 0; i < Hacks.length; i++) {
  67. var part = document.createElement("div");
  68. part.style = 'border-bottom: solid black 4px; font-size: 200%';
  69. part.id = Hacks[i].name;
  70. if(Hacks[i].configurationDefinition) {
  71. let random = Math.floor(Math.random()*1000000);
  72. part.innerHTML = "<null>"+Hacks[i].name+"</null><img style='width: 25px;float:right;cursor:pointer' onmouseover='this.style.filter=`brightness(0.5)`' onmouseleave='this.style.filter=`brightness(1)`' id="+random+" src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAu1JREFUeJzt2L1qFFEAhuEv0Ub8KawsBBuDVqK9pBS8g9yGhY2VVyEItl6AYqmdipb2NoJFEAOCXTDEwh+yyv7Nzu45c+Z54FS7xcfMvDuwCQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBOlR4ww6Ukd5LcSrKd5EvZOSzgdJLbSXaTXE6yn+Sw6KIGnUnyKMmPJMcnzrsk1wvuYra7ST5l8p59T3IvyVbBXU3ZTvIikxf55DlIcrPYOqbZS3KU6fftYbFljdnL9IsskjrNi+P49+c7pQa25FnmByKSeiwSx5/zoNDGpnzIYhdbJOUtE8dxkidlZq5mu/SAfxws8d2LSV5FJCXsJXma5Z6fr2vaMir3s/gvkjdJGcu+Of6c3RJjW3MuyceIpFZd43gef/X25mqSzxFJbbrG8TbJhQJ7m7YTkdREHBUSSR3EUTGRlCWOARBJGeIYEJFsljgGSCSbIY4BE8l6iaMBIlkPcTREJP0SR4NE0g9xNEwkqxHHCIikG3GMiEiW0zWONxHHYIlkMeIYMZHMJg5EMoU4+Eskk8TBf0TyiziYauyRiIO5xhqJOFjY2CIRB0sbSyTioLPWIxEHK2s1EnHQm9YiEQe9ayUScbA2Q49klTjOF9jLAA01EnGwMUOLRBxs3FAiEQfF1B6JOCiu1kjEQTVqi0QcVKeWSMRBtUpHIg6qVyoScTAYm45EHAzOpiIRB4O17kjEweCtKxJx0Iy+I+kax+uIg0r1FYk4aNaqkYiD5nWN5FvEwUh0jUQcjMa6IxEHg7euSMRBM/qORBw0p69IxEGzVo1EHDSvayTiYDSWjUQcjM6ikYiD0ZoXiTgYvStJXmYyjKMkj5OcLbiLKbZKDxipa0luJDlM8j7Jftk5AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMzwEyaMP2qlEyFaAAAAAElFTkSuQmCC'>";
  73. setTimeout(function () {
  74. document.getElementById(random).onclick = function (event,element) {
  75. client.renderConfig(Hacks[i]);
  76. }
  77. document.getElementById(random).onmouseover = function () {
  78. client.followText = Hacks[i].name+" options";
  79. }
  80. document.getElementById(random).onmouseleave = function () {
  81. client.followText = "";
  82. }
  83. }, 10);
  84. } else {
  85. part.innerHTML = "<null>"+Hacks[i].name+"</null>";
  86. }
  87. document.getElementById(title).appendChild(part);
  88. document.getElementById(Hacks[i].name).addEventListener("mousedown", function (event){
  89. if(event.target!=document.getElementById(Hacks[i].name) && event.target!=document.getElementById(Hacks[i].name).children[0]) {
  90. return;
  91. }
  92. if(!window.GAME) {client.error("You must be in a game to enable hacks!"); return};
  93. if(!Hacks[i].isEnabled){
  94. Hacks[i].enable();
  95. document.getElementById(Hacks[i].name).style.backgroundColor = "white";
  96. } else {
  97. Hacks[i].disable();
  98. document.getElementById(Hacks[i].name).style.backgroundColor = "rgba(114, 154, 232, 1)";
  99. };
  100. });
  101. document.getElementById(Hacks[i].name).addEventListener("mouseover", function (event){
  102. if(event.target!=document.getElementById(Hacks[i].name) && event.target!=document.getElementById(Hacks[i].name).children[0]) {
  103. return;
  104. }
  105. client.followText = Hacks[i].description;
  106. });
  107. document.getElementById(Hacks[i].name).addEventListener("mouseleave", function (event){
  108. if(event.target!=document.getElementById(Hacks[i].name) && event.target!=document.getElementById(Hacks[i].name).children[0]) {
  109. return;
  110. }
  111. client.followText = "";
  112. });
  113. };
  114. };
  115. };
  116.  
  117. client.menuToggled = 0;
  118. client.menuElement = document.createElement("div");
  119. document.body.appendChild(client.menuElement);
  120. client.menuElement.id = "vhc-menu";
  121. client.menuElement.style.width = "100%";
  122. client.menuElement.style.height = "100%";
  123. client.menuElement.style.background = "rgba(0, 0, 0, 0.5)";
  124. client.menuElement.style.position = "absolute";
  125. client.menuElement.style.zIndex = 1000;
  126. client.menuElement.style.top = "0";
  127.  
  128. client.hackList = document.createElement("h1");
  129. document.body.appendChild(client.hackList);
  130. client.hackList.style.color = "#fff";
  131. client.hackList.style.position = "fixed";
  132. client.hackList.style.top = "40%";
  133. client.hackList.innerHTML = "VHC version "+client.version+"<br>";
  134. client.hackList.style.zIndex = 1000;
  135. client.hackList.style.fontSize = "20px";
  136. client.hackList.style.textAlign = "left";
  137.  
  138. client.keyBindElement = document.createElement("h1");
  139. document.body.appendChild(client.keyBindElement);
  140. client.keyBindElement.style.color = "#fff";
  141. client.keyBindElement.style.position = "fixed";
  142. client.keyBindElement.style.top = "40%";
  143. client.keyBindElement.style.fontSize = "132%";
  144. client.keyBindElement.style.right = 0;
  145. client.keyBindElement.innerHTML = "Keybinds:<br>z - open menu<br><br>";
  146. client.keyBindElement.style.zIndex = 1000;
  147. client.keyBindElement.style.textAlign = "right";
  148.  
  149. client.errorElement = document.createElement("h1");
  150. document.body.appendChild(client.errorElement);
  151. client.errorElement.style.color = "#fff";
  152. client.errorElement.style.position = "absolute";
  153. client.errorElement.style.top = "10%";
  154. client.errorElement.style.width = "10%";
  155. client.errorElement.style.fontSize = "100%";
  156. client.errorElement.style.left = "40%";
  157. client.errorElement.style.border = "solid red 1px";
  158. client.errorElement.style.borderRadius = "7px";
  159. client.errorElement.style.backgroundColor = "red";
  160. client.errorElement.innerHTML = "client.errorElement";
  161. client.errorElement.style.opacity = 0;
  162. client.errorElement.style.transition = "all 0.3s";
  163. client.errorElement.style.zIndex = "1000";
  164.  
  165. client.followText = "";
  166. client.follow = document.createElement("div");
  167. client.follow.style.pointerEvents = "none";
  168. client.follow.style.position = "absolute";
  169. client.follow.style.minWidth = "10em";
  170. client.follow.style.maxWidth = "20em";
  171. client.follow.style.zIndex = "9999";
  172. client.follow.style.backgroundColor = "rgba(114, 154, 232, 1)";
  173. document.body.appendChild(client.follow);
  174. document.body.addEventListener("mousemove", function (e){
  175. client.follow.innerHTML = client.followText;
  176. client.followText ? client.follow.style.border = "solid black 1px" : client.follow.style.border = "";
  177. x = e.pageX;
  178. y = e.pageY;
  179. client.follow.style.left = (x+10)+"px";
  180. client.follow.style.top = (y+10)+"px";
  181. if(x+10 > innerWidth-client.follow.getBoundingClientRect().width) client.follow.style.left = (innerWidth-client.follow.getBoundingClientRect().width)+"px"
  182. });
  183.  
  184. client.error = function (text) {
  185. var audio = document.createElement("Audio");
  186. audio.src = "files/assets/31197478/1/Error-UI.mp3";
  187. audio.play();
  188. client.errorElement.innerHTML = text;
  189. client.errorElement.style.opacity = 1;
  190. setTimeout(function(){client.errorElement.style.opacity = 0;}, 1000)
  191. };
  192.  
  193. document.addEventListener("keydown", function(event) {
  194. if (event.key == "z") {
  195. client.menuToggled = !client.menuToggled;
  196. if(!client.menuToggled && client.inGame){if(client.menuToggled){GAME.uiManager.menuActive=false;};GAME.a865.player.controls.lock(); GAME.closea793(); GAME.inChat = false};
  197. };
  198. if (client.keyBinds[event.key]) {
  199. try {
  200. if(document.activeElement==document.getElementById("chat")) return;
  201. } catch (e) {}
  202. if(!client.inGame) {client.error("You must be in a game to enable hacks!"); return};
  203. for(let i = 0; i < client.Hacks.length; i++){
  204. if(client.Hacks[i].name == client.keyBinds[event.key]){
  205. if(client.Hacks[i].isEnabled){
  206. client.Hacks[i].disable();
  207. document.getElementById(client.Hacks[i].name).style.backgroundColor = "rgba(114, 154, 232, 1)";
  208. } else {
  209. client.Hacks[i].enable();
  210. document.getElementById(client.Hacks[i].name).style.backgroundColor = "white";
  211. };
  212. };
  213. };
  214. };
  215. });
  216.  
  217. client.MAIN = function() {
  218. /*
  219. try {
  220. client.inGame = !!pc.app.root.findByName("Game").findByName("NetworkManager").script.networkManager.ws;
  221. } catch (e) {
  222. client.inGame && stophacks.enable();
  223. client.inGame = false;
  224. }
  225. */
  226. client.hackList.innerHTML = "Fucker Menu "+client.version+"<br>";
  227. client.keyBindElement.innerHTML = "Keybinds:<br>z - open menu<br><br>";
  228. for(let i = 0; i < client.Hacks.length; i++){
  229. if(client.Hacks[i].isEnabled){
  230. client.hackList.innerHTML += client.Hacks[i].name+(client.Hacks[i].type ? " <b style='color: skyblue'>["+client.Hacks[i].type+"]</b>" : " ")+"<br>";
  231. };
  232. if(client.Hacks[i].key == "no keybind") continue;
  233. client.keyBindElement.innerHTML += client.Hacks[i].key+" - "+client.Hacks[i].name+"<br>";
  234. };
  235. if (client.menuToggled) {
  236. document.exitPointerLock();
  237. client.menuElement.style.display = "block";
  238. } else {
  239. client.menuElement.style.display = "none";
  240. }
  241. setTimeout(client.MAIN, 10);
  242. };
  243. client.dispose = function () {
  244. console.log("disposing of client version "+client.version);
  245. client.Hacks.forEach(hack => {
  246. if(hack.isEnabled) {
  247. hack.disable();
  248. };
  249. });
  250. for (element in client) {
  251. client[element].outerHTML = "";
  252. delete client[element];
  253. };
  254. client = undefined;
  255. };
  256. client.renderConfig = function (hack) {
  257. var elem = document.getElementById(hack.name);
  258. if(!elem.children[2]) {
  259. var config = document.createElement("div");
  260. config.style.background = "rgba(149, 180, 240, 1)";
  261. config.style.border = "solid black 4px";
  262. config.style.position = "fixed";
  263. config.style.width = "20%";
  264. config.style.marginLeft = "-4px";
  265. config.innerHTML = "<div style='border-bottom:4px solid black'>Settings</div><div></div>";
  266. elem.appendChild(config);
  267. var list = config.children[1];
  268. list.style.fontSize = "25px";
  269.  
  270. //render configs
  271. Object.values(hack.configurationDefinition).forEach(function(config, index){
  272. switch(config.type) {
  273. case 0:
  274. list.innerHTML += Object.keys(hack.configurationDefinition)[index]+" <input type='checkbox' id='"+Object.keys(hack.configurationDefinition)[index]+"' onchange='client.processConfigChange.call(this, client.Hacks["+client.Hacks.indexOf(hack)+"], "+index+")'></input><br>";
  275. setTimeout(function(){
  276. document.getElementById(Object.keys(hack.configurationDefinition)[index]).checked = hack.config[Object.keys(hack.configurationDefinition)[index]];
  277. }, 10);
  278. break
  279. case 1:
  280. list.innerHTML += Object.keys(hack.configurationDefinition)[index]+" <select id='"+Object.keys(hack.configurationDefinition)[index]+"' onchange='client.processConfigChange.call(this, client.Hacks["+client.Hacks.indexOf(hack)+"], "+index+")'></select><br>";
  281. config.possibleValues.forEach(function(possibleValue) {
  282. document.getElementById(Object.keys(hack.configurationDefinition)[index]).innerHTML += "<option value='"+possibleValue+"'>"+possibleValue+"</option>";
  283. });
  284. setTimeout(function(){
  285. document.getElementById(Object.keys(hack.configurationDefinition)[index]).value = hack.config[Object.keys(hack.configurationDefinition)[index]];
  286. }, 10);
  287. break
  288. case 2:
  289. list.innerHTML += Object.keys(hack.configurationDefinition)[index]+" <input id='"+Object.keys(hack.configurationDefinition)[index]+"' onchange='client.processConfigChange.call(this, client.Hacks["+client.Hacks.indexOf(hack)+"], "+index+")'></input><br>";
  290. setTimeout(function(){
  291. document.getElementById(Object.keys(hack.configurationDefinition)[index]).value = hack.config[Object.keys(hack.configurationDefinition)[index]];
  292. }, 10);
  293. break
  294. }
  295. });
  296. }
  297. if(elem.children[2].style.display == "block") {
  298. elem.children[2].style.display = "none";
  299. elem.children[1].style.transform = "rotate(0deg)";
  300. } else {
  301. elem.children[2].style.display = "block";
  302. elem.children[1].style.transform = "rotate(180deg)";
  303. }
  304. }
  305. client.processConfigChange = function (hack,index) {
  306. var value = this.type == "checkbox" ? this.checked : this.value;
  307. var configName = Object.keys(hack.config)[index];
  308. hack.config[configName]=value;
  309. localStorage[hack.name] = localStorage[hack.name] || "{\"config\":{}}";
  310. var newData = JSON.parse(localStorage[hack.name]);
  311. newData.config[configName] = value;
  312. localStorage[hack.name] = JSON.stringify(newData);
  313. }
  314. client.init = function() {
  315. console.log(client.version+" running on "+navigator.platform);
  316. //hacks
  317. var Fly = new client.Hack(function () {
  318. G.CONFIG.a143 = true;
  319. }, function () {
  320.  
  321. }, function () {
  322. G.CONFIG.a143 = false;
  323. }, "Fly", "Enable flight", "c");
  324. var WaterLevel = new client.Hack(function (this_) {
  325. this_.a = GAME.oceanHeightTo
  326. }, function () {
  327. GAME.oceanHeightTo = Number(this.config["water level"]);
  328. this.type = this.config["water level"];
  329. if(!Number(this.config["water level"])) this.config["water level"] = this.oldlev;
  330. this.oldlev = this.config["water level"];
  331. }, function (this_) {
  332. GAME.oceanHeightTo = this_.a;
  333. }, "WaterLevel", "Change the water height on your side", "no keybind", false, {"water level":{defaultValue:260,type:2}});
  334. var SpeedHack = new client.Hack(function () {
  335.  
  336. }, function () {
  337. if(G.Keybinds.moveForward.a730) GAME.a865.player.vZ=2.5;
  338. }, function () {
  339.  
  340. }, "SpeedHack", "Increase walking speed", "t");
  341. var RapidFire = new client.Hack(function (this_) {
  342. if(!Date.now.a) {
  343. window.a = Date.now;
  344. Date.now=function(){
  345. function getStackTrace(){
  346. var obj = this;
  347. Error.captureStackTrace(obj, getStackTrace);
  348. return obj.stack;
  349. }
  350. if(getStackTrace().includes("a822er.update")) {
  351. return a.call(Date);
  352. } else {
  353. return a.call(Date)*(window.multiplier||1)-(window.warp||0);
  354. }
  355. }
  356. Date.now.a=true;
  357. }
  358. }, function () {
  359. this.type = this.config.multiplier+"x";
  360. if(this.oldmult != undefined && this.config.multiplier != this.oldmult) {
  361. if(!Number(this.config.multiplier)) this.config.multiplier = this.oldmult;
  362. window.warp = a.call(Date)-Date.now();
  363. }
  364. window.multiplier = this.config.multiplier;
  365. this.oldmult = this.config.multiplier;
  366. }, function (this_) {
  367. window.warp = a.call(Date)-Date.now();
  368. window.multiplier = 1;
  369. }, "RapidFire", "Shoot and reload faster", "no keybind", false, {multiplier:{defaultValue:2,type:2}});
  370. var InfAmmo = new client.Hack(function (this_) {
  371. this_.a = GAME.a865.player.updatea809Total;
  372. GAME.a865.player.updatea809Total = new Function;
  373. }, function () {
  374.  
  375. }, function (this_) {
  376. GAME.a865.player.updatea809Total = this_.a;
  377. }, "InfAmmo", "Never run out of ammunition", "k");
  378. var TriggerBot = new client.Hack(function (this_) {
  379. this_.geometry = new THREE.BufferGeometry();
  380. this_.geometry.setFromPoints([new THREE.Vector3(0, 0, 0),new THREE.Vector3(0, 0, 1)]);
  381. this_.material = new THREE.LineBasicMaterial({
  382. depthTest: false,
  383. depthWrite: false,
  384. fog: false,
  385. });
  386. this_.hitboxes = [];
  387. }, function () {
  388. var chunks = [];
  389. GAME.scene.children.forEach(function(e) {
  390. if(e.type == "Mesh") {
  391. chunks.push(e);
  392. }
  393. });
  394. var this_ = this;
  395. G.othera822ers.forEach(function (player) {
  396. if(player && player.a240 && !player.hitbox_triggerBot) {
  397. var hitbox = new THREE.Mesh(new THREE.BoxGeometry);
  398. hitbox.scale.set(3,10,3);
  399. hitbox.renderOrder = 9999;
  400. hitbox.material.depthTest = false;
  401. hitbox.material.transparent = true;
  402. hitbox.material.opacity = 0;
  403. player.hitbox_triggerBot = hitbox;
  404. this_.hitboxes.push(hitbox);
  405. player.a240.add(hitbox);
  406. hitbox.visible = true;
  407. hitbox.player = player;
  408. }
  409. });
  410. this.raycaster = this.raycaster || new THREE.Raycaster();
  411. this.raycaster.set(GAME.a865.player.camera.position, vec=new THREE.Vector3(),GAME.a865.player.camera.getWorldDirection(vec),vec);
  412. var result = this.raycaster.intersectObjects(this.hitboxes.concat(chunks));
  413. if(result[0] && result[0].object.player && result[0].object.parent) {
  414. G.Keybinds.shoot.a730=true
  415. setTimeout(function () {
  416. G.Keybinds.shoot.a730=false;
  417. }, 10);
  418. }
  419. }, function (this_) {
  420. this_.hitboxes.forEach(function (hitbox) {
  421. hitbox.parent.remove(hitbox);
  422. delete hitbox.player.hitbox_triggerBot;
  423. });
  424. GAME.pointerLockEnabled=false;
  425. }, "TriggerBot", "Shoots your gun when automatically there is a player under your crosshair", "no keybind");
  426. var ESP = new client.Hack(function (this_) {
  427. this_.hitboxes = [];
  428. }, function () {
  429. var this_ = this;
  430. G.othera822ers.forEach(function (e) {
  431. if(e &&e.a240 && !e.hitbox) {
  432. var hitbox = new THREE.Mesh(new THREE.BoxGeometry,new THREE.MeshBasicMaterial({color:"red",fog:false,depthTest:false}));
  433. hitbox.scale.set(3,10,3);
  434. hitbox.renderOrder=Infinity
  435. hitbox.position.y++;
  436. this_.hitboxes.push(hitbox);
  437. hitbox.player=e;
  438. e.hitbox=hitbox;
  439. e.a240.add(hitbox);
  440. }
  441. });
  442. }, function (this_) {
  443. this_.hitboxes.forEach(function (e) {
  444. e.parent.remove(e);
  445. delete e.player.hitbox;
  446. });
  447. this_.hitboxes = []
  448. }, "ESP", "See players through walls!", ";");
  449. var InfoHUD = new client.Hack(function (this_){
  450. if(!this_.HUD) {
  451. this_.HUD = document.createElement("div");
  452. this_.HUD.style = "position: fixed; top: 2vh; right: 15vw; background-color:black; opacity: 0.7; width: 20vw"
  453. }
  454. document.body.appendChild(this_.HUD);
  455. this_.HUD.style.display = "block";
  456. this_.kills = this_.kills || 0;
  457. this_.old = this_.old || 0;
  458. }, function () {
  459. this.HUD.innerHTML = "Player position: X "+Math.trunc(GAME.a865.player.position.x*100)/100+" Y "+Math.trunc(GAME.a865.player.position.x*100)/100+" Z "+Math.trunc(GAME.a865.player.position.x*100)/100+"<br>Connected to: "+G.socket.url.split("/")[2]+"<br>Total kills: "+(this.kills+GAME.a865.player.a649)+"<br>"+new Date().toGMTString();
  460. if(GAME.a865.player.a649 == 0) {
  461. this.kills += this.old;
  462. }
  463. this.old = GAME.a865.player.a649;
  464. }, function (this_) {
  465. this_.HUD.style.display = "none";
  466. }, "InfoHUD", "Nice HUD for valuable info!", "m");
  467. var NoFog = new client.Hack(function (this_) {
  468. this_.a = GAME.a865.scene.fog.far;
  469. GAME.a865.scene.fog.far = Infinity;
  470. }, function () {
  471.  
  472. }, function (this_) {
  473. GAME.a865.scene.fog.far = this_.a;
  474. }, "NoFog", "Get rid of the fog", "no keybind");
  475. var ChatSpam = new client.Hack(function () {
  476.  
  477. }, function () {
  478. document.getElementById("chat").value = crypto.randomUUID();
  479. var e = new a201;
  480. e.msg = GAME.chatInput.value;
  481. G.socket.send(e.a614());
  482. }, function () {
  483.  
  484. }, "ChatSpam", "Spam the game chat", "no keybind", false);
  485. window.stophacks = new client.Hack(function () {
  486. client.Hacks.forEach(function (hack) {
  487. if(!hack.isEnabled) return
  488. hack.disable();
  489. document.getElementById(hack.name).style.backgroundColor = "rgba(114, 154, 232, 1)";
  490. });
  491. }, function () {
  492. stophacks.disable();
  493. document.getElementById(stophacks.name).style.backgroundColor = "rgba(114, 154, 232, 1)";
  494. }, function () {
  495.  
  496. }, "Disable all hacks", "Disable all hacks", "y");
  497. //menu elements
  498. new client.MenuElement([Fly, WaterLevel, SpeedHack], "Movement", "0%", "0%");
  499. new client.MenuElement([RapidFire, InfAmmo, TriggerBot], "Combat", "25%", "0%");
  500. new client.MenuElement([ESP, InfoHUD, NoFog], "Render", "50%", "0%");
  501. new client.MenuElement([ChatSpam, stophacks], "Game", "75%", "0%");
  502. //win message
  503. //pc.app.on("Game:Finish", function(){if(autoGG.isEnabled){pc.app.fire("Network:Chat", autoGG.type)}; client.inGame = false; stophacks.enable();});
  504. function tempLoop(){
  505. if(window.GAME) {
  506. client.inGame = true;
  507. GAME.disconnect=function(){if(!client.menuToggled){location.reload()}};
  508. try {
  509. var obj = JSON.parse(localStorage.config);
  510. client.Hacks.forEach(function (hack) {
  511. if(hack.name in obj) {
  512. hack.enable();
  513. document.getElementById(hack.name).style.backgroundColor = "white";
  514. }
  515. });
  516. } catch (e) {}
  517. return;
  518. }
  519. setTimeout(tempLoop, 1);
  520. }
  521. tempLoop();
  522. //config
  523. localStorage.config = localStorage.config || "{\"autoGG\":true}";
  524. client.MAIN();
  525. };
  526. client.init();
  527. cheatnite.esp = true;
  528. cheatnite.activatedCheats = ['ESP'];
  529. function initEsp() {
  530. espGeometry = new THREE.EdgesGeometry(new THREE.BoxGeometry(5, 10, 5).translate(0, -3, 0));
  531. lineMaterial = new THREE.LineBasicMaterial({ color: 0xff0000 });
  532.  
  533. red = `
  534. void main() {
  535. gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );
  536. }
  537. `;
  538. espMaterial = new THREE.RawShaderMaterial({
  539. vertexShader: `
  540. attribute vec3 position;
  541. uniform mat4 projectionMatrix;
  542. uniform mat4 modelViewMatrix;
  543. void main() {
  544. gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
  545. gl_Position.z = 1.0;
  546. }
  547. `,
  548. fragmentShader: red
  549. });
  550. textCanvas = new G.Canvas2d();
  551. textCanvas.alpha = 0;
  552. textCanvas.init();
  553. }
  554.  
  555. function animate() {
  556. window.requestAnimationFrame(animate);
  557. const players = [];
  558.  
  559. for (const p of G.othera822ers)
  560. if (p && p.id && p.id !== GAME.a865.player.id)
  561. players.push(p);
  562.  
  563. textCanvas.clear();
  564. const drawnTextPositions = [];
  565. const minSpacing = 4;
  566. const textOffset = 24;
  567.  
  568. for (let i = 0; i < players.length; i++) {
  569. const player = players[i];
  570. if (!player.a472.box) {
  571. const box = new THREE.LineSegments(espGeometry, espMaterial);
  572. box.frustumCulled = false;
  573. player.a472.add(box);
  574. player.a472.box = box;
  575. }
  576.  
  577. player.a472.box.visible = cheatnite.esp;
  578.  
  579. if (player.a472.visible && cheatnite.esp) {
  580. const worldPos = new THREE.Vector3();
  581. player.a472.box.getWorldPosition(worldPos);
  582.  
  583. let screenPos = G.worldPosToScreenCoords(worldPos, GAME.camera, window.innerWidth, window.innerHeight);
  584. if (screenPos.orientation !== 'center')
  585. continue;
  586.  
  587. let playerName = `(${player.id}) ` + (player.name.length > 20 ? player.name.substring(0, 17) + '...' : player.name);
  588. let color = "#FFFFFF";
  589. if (player.ID === GAME.myKillerId) {
  590. playerName = '(killer) '+playerName;
  591. color = "#FF8080";
  592. }
  593. const textSize = 16;
  594.  
  595. let yPos = screenPos.coords.y - 10;
  596. for (const drawnPos of drawnTextPositions) {
  597. if (Math.abs(drawnPos.x - screenPos.coords.x) < textSize && Math.abs(drawnPos.y - yPos) < textSize) {
  598. yPos = drawnPos.y - textSize - minSpacing;
  599. }
  600. }
  601. drawnTextPositions.push({ x: screenPos.coords.x, y: yPos });
  602.  
  603. textCanvas.text(
  604. [screenPos.coords.x, yPos],
  605. playerName,
  606. color,
  607. textSize,
  608. "middle",
  609. "center"
  610. );
  611. }
  612. }
  613. textCanvas.flip();
  614. }