Void Console

Press Right Shift to close/open the menu.

此脚本不应直接安装,它是一个供其他脚本使用的外部库。如果您需要使用该库,请在脚本元属性加入:// @require https://update.gf.qytechs.cn/scripts/498780/1404849/Void%20Console.js

  1. // ==UserScript==
  2. // @name Void Console
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.2
  5. // @description Press Right Shift to close/open the menu.
  6. // @author KILLEREK1337
  7. // @match *://*.kogama.com/page/webgl-frame/*
  8. // @match *://*.kogama.com.br/page/webgl-frame/*
  9. // @match https*://*friends.kogama.com/page/webgl-frame*
  10. // @icon https://res.cloudinary.com/rglweb/image/fetch/f_auto/https://www.raygrahams.com/images/thumbs/0010592_700.jpg
  11. // @run-at document-start
  12. // @grant none
  13. // @downloadURL https://update.gf.qytechs.cn/scripts/498780/Void%20Console.user.js
  14. // @updateURL https://update.gf.qytechs.cn/scripts/498780/Void%20Console.meta.js
  15. // ==/UserScript==
  16.  
  17. const wsServers = [];
  18. const sockets = [];
  19. let gamePlayers = [];
  20.  
  21.  
  22. const speeds = new Map(Object.entries({
  23. shotgun: 500,
  24. bazooka: 500,
  25. central: 250,
  26. sword: 300,
  27. pistols: 150,
  28. pistol: 200,
  29. shuriken: 300
  30. }));
  31.  
  32. const reloads = new Map(speeds.entries());
  33.  
  34. const push = Array.prototype.push;
  35. const foreach = Array.prototype.forEach;
  36. const uint8array = Uint8Array;
  37. const uint32array = Uint32Array;
  38. const uint16array = Uint16Array;
  39. const float32array = Float32Array;
  40. const settimeout = setTimeout;
  41. const error = Error;
  42. const fromCharCode = String.fromCharCode;
  43. const messageevent = MessageEvent;
  44.  
  45. let normalizedSurface = 0;
  46. let weapon = "central";
  47. const symbol = Symbol("onmessage");
  48. let dragging = false;
  49. let position;
  50. let dX;
  51. let dY;
  52. let playerSid = 0;
  53. let startYPort = false;
  54. let actorNR = 0;
  55.  
  56. function wsServer(eventData) {
  57. const event = new messageevent("message", eventData);
  58.  
  59. for (const listener of wsServers) {
  60. listener(event);
  61. };
  62. }
  63.  
  64. function to32xConvertedByte(n) {
  65. return new uint8array(new uint32array([n]).buffer).reverse();
  66. }
  67.  
  68. function to16xConvertedByte(n) {
  69. return new uint8array(new uint16array([n]).buffer).reverse();
  70. }
  71.  
  72. function to32xConvertedFloat(n) {
  73. return new uint8array(new float32array([n]).buffer);
  74. }
  75.  
  76. function to32BitNumber(chunk) {
  77. return ((chunk[0] << 8 |
  78. chunk[1]) << 8 |
  79. chunk[2]) << 8 |
  80. chunk[3];
  81. }
  82.  
  83. function findDoubles(array) {
  84. const doubles = [];
  85. const getDouble = () => array.indexOf(102);
  86. const doublesCount = array.filter(e => e == 102).length;
  87.  
  88. for (let i = 0; i < doublesCount; i++) {
  89. const doubleIndex = getDouble();
  90. const double = new uint8array([
  91. array[doubleIndex + 4],
  92. array[doubleIndex + 3],
  93. array[doubleIndex + 2],
  94. array[doubleIndex + 1]]).buffer;
  95. doubles.push({
  96. double: new float32array(double)[0],
  97. startIndex: doubleIndex + 1
  98. });
  99. };
  100.  
  101. return doubles;
  102. };
  103.  
  104. function AOBScan(arr1, arr2) {
  105. let index = 0;
  106. let index1 = 0;
  107.  
  108. while (index < arr1.length && index1 < arr2.length) {
  109. if (arr1[index] === arr2[index1]) {
  110. index++;
  111. }
  112. index1++;
  113. }
  114.  
  115. return index === arr1.length;
  116. }
  117.  
  118. HTMLElement.prototype.requestFullscreen = new Proxy(HTMLElement.prototype.requestFullscreen, {
  119. apply(target, that, args) {
  120. return Reflect.apply(target, document.documentElement, args);
  121. }
  122. });
  123.  
  124. Object.defineProperty(Object.prototype, "setPosition", {
  125. get() {
  126. return function setPosition(x, y, z) {
  127. const dx = parseFloat(x);
  128. const dy = parseFloat(y);
  129. const dz = parseFloat(z);
  130.  
  131. if (!isFinite(dx) || !isFinite(dy) || !isFinite(dz)) return;
  132.  
  133. var p = this.panner;
  134. if (p.positionX) {
  135. if (p.positionX.value !== x) {
  136. p.positionX.value = x;
  137. }
  138. if (p.positionY.value !== y) {
  139. p.positionY.value = y;
  140. }
  141. if (p.positionZ.value !== z) {
  142. p.positionZ.value = z
  143. }
  144. } else if (p._x !== x || p._y !== y || p._z !== z) {
  145. p.setPosition(x, y, z);
  146. p._x = x;
  147. p._y = y;
  148. p._z = z
  149. }
  150.  
  151. }
  152. },
  153. set() {
  154.  
  155. }
  156. });
  157.  
  158. Object.defineProperty(Object.prototype, "setPitch", {
  159. get() {
  160. return function setPitch(value) { }
  161. }, set() { }
  162. });
  163.  
  164. Object.defineProperty(Object.prototype, "quit", {
  165. get() {
  166. return function quit() { }
  167. }, set(quitFunc) {
  168. alert(quitFunc);
  169. }
  170. });
  171.  
  172. Object.defineProperty(WebSocket.prototype, "onmessage", {
  173. get() {
  174. return this[symbol];
  175. }, set(callback) {
  176. this[symbol] = callback;
  177. this.addEventListener("message", callback);
  178. packets.notification("Hooked peer connection at " + this.url);
  179. this.addEventListener("message", function(packet) {
  180. const packet_ = new uint8array(packet.data);
  181. const arr = new uint8array(event.data);
  182. const arr_ = [...arr];
  183. top.packets.packetsReceived.push(arr_);
  184. switch (packet_[2]) {
  185. case 58:
  186. packets.central();
  187. break;
  188. case 81:
  189. onTickAction();
  190. break;
  191. case 29:
  192. packets.setPlayerWeapon(packet_);
  193. break;
  194. case 255:
  195. const ints = [];
  196. packet_.forEach((val, index, array) => {
  197. if (array[index - 4] === 105) {
  198. let args = [array[index - 3] << 8, array[index - 2] << 8, array[index - 1] << 8, array[index]].reverse();
  199. ints.push(args[0] | args[1] | args[2] | args[3]);
  200. }
  201. });
  202. actorNR = ints[0];
  203. break;
  204. case 61:
  205. const players = fromCharCode.apply(null,
  206. packet_);
  207. gamePlayers = [...new Set(players.match(/(\d+)/gm).filter(e => e.length == 6))];
  208. gamePlayers.forEach(player => {
  209. const e = document.createElement("option");
  210. e.innerHTML = player;
  211. e.value = player;
  212. document.querySelector("#select1").append(e);
  213. });
  214.  
  215. playerSid = parseInt(players.split(":")[1].replace(',"spawnRoleAvatarIds"', ""));
  216. break;
  217. case 2:
  218. const doubles = findDoubles(arr);
  219. const index = arr.indexOf(doubles[1].startIndex);
  220. const index1 = arr.indexOf(doubles[0].startIndex);
  221. const playerSidCurrent = to32BitNumber(arr_.slice(4, 11));
  222.  
  223. top.console.log(playerSidCurrent, actorNR, playerSid);
  224.  
  225. if (playerSidCurrent != playerSid && actorNR != to32BitNumber(arr_.slice(4, 11))) break;
  226.  
  227. top.console.log("Player position: " + doubles[0].double + "," + doubles[1].double + "," + doubles[2].double);
  228.  
  229. packets.motionY = ~~doubles[1].double / normalizedSurface;
  230. normalizedSurface = normalizedSurface * 0.5 + (~~doubles[1].double) * 0.5;
  231.  
  232. if (top.flightY) {
  233. const yCoord = parseInt(top.flightY);
  234. const _ = to32xConvertedFloat(yCoord || 0.1);
  235.  
  236. arr[index] = _[0];
  237. arr[index + 1] = _[1];
  238. arr[index + 2] = _[2];
  239. arr[index + 3] = _[3];
  240.  
  241. return wsServer({
  242. data: arr.buffer
  243. });
  244. } else if (top.yPort) {
  245. startYPort = true;
  246. }
  247.  
  248. if (top.impulseTool && doubles[0] && doubles[1] && doubles[2]) {
  249. packets.lookAt(doubles[0].double, doubles[1].double, doubles[2].double);
  250. }
  251.  
  252. if (top.scaffold) {
  253. packets.permetuation(doubles[0].double, doubles[1].double - 1, doubles[2].double);
  254. }
  255. break;
  256. }
  257. return false;
  258.  
  259. });
  260.  
  261. wsServers.push(callback.bind(this));
  262. sockets.push(this);
  263. }
  264. });
  265.  
  266. let delta = 0;
  267. let lastTick = Date.now();
  268. let holdingPrimary = false;
  269.  
  270. function onTickAction() {
  271. if (top.rapidFire) {
  272. packets[weapon]();
  273. };
  274.  
  275. if (top.arf) {
  276. packets.actToAll("central");
  277. packets.actToAll("none");
  278. };
  279.  
  280. if (top.sh_) {
  281. packets.actToAll("hpglitch");
  282. }
  283.  
  284. if (top.rapidMode) {
  285. packets.central();
  286. packets[weapon]();
  287. }
  288.  
  289. if (startYPort) {
  290. packets.yPort();
  291. startYPort = false;
  292.  
  293. }
  294. }
  295.  
  296. const client_menu = document.createElement("div");
  297. client_menu.style = [
  298. "position: fixed",
  299. "color: #000000",
  300. "z-index: 10",
  301. "top: 10%",
  302. "right: 10%",
  303. "font-weight: slim",
  304. "font-family: 'Roboto'",
  305. "scrollbar-color: #000000 #000000",
  306. "user-select: none"
  307. ].join(";");
  308. client_menu.innerHTML = `
  309. <!DOCTYPE html>
  310. <html lang="en">
  311. <head>
  312. <meta charset="UTF-8">
  313. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  314. <link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet'>
  315. <style>
  316. @keyframes glow {
  317. 0% {
  318. text-shadow: 0 0 5px black, 0 0 10px black, 0 0 15px black, 0 0 20px black, 0 0 25px black, 0 0 30px black, 0 0 35px black;
  319. }
  320. 50% {
  321. text-shadow: 0 0 10px black, 0 0 20px black, 0 0 30px black, 0 0 40px black, 0 0 50px black, 0 0 60px black, 0 0 70px black;
  322. }
  323. 100% {
  324. text-shadow: 0 0 5px black, 0 0 10px black, 0 0 15px black, 0 0 20px black, 0 0 25px black, 0 0 30px black, 0 0 35px black;
  325. }
  326. }
  327.  
  328. .glowing-text {
  329. animation: glow 2s infinite ease-in-out;
  330. }
  331.  
  332. :root {
  333. --accent: #00B400;
  334. }
  335.  
  336. .feature {
  337. width: 100% !important;
  338. height: 30px !important;
  339. background: rgba(0, 0, 0, 0.3);
  340. backdrop-filter: blur(5px);
  341. border-radius: 40px;
  342. text-align: center;
  343. display: inline-block;
  344. vertical-align: middle;
  345. margin: 2px;
  346. font-size: 15px;
  347. transition: all 1s;
  348. }
  349.  
  350. .feature:hover {
  351. transition: all 1s;
  352. transform: scale(105%);
  353. }
  354. </style>
  355. </head>
  356. <body>
  357. <div id="menu" style="width: 440px; height: 300px; border-top: 0px solid; background: rgba(0, 0, 0, 0.0); color: #000000; position: absolute; top: 25%; right: 25%; font-family: Arial; font-size: 35px; cursor: move;">
  358. <span class="glowing-text" style="position: absolute; top: 10px; left: 30px; color: #000000">Void Console</span>
  359. <div style="font-size: 16.7px; position: absolute; top: 45px; left: 28px">
  360. <span class="kogama__" onclick="[...document.querySelectorAll('column')].forEach(e => e.style.display='none'); [...document.querySelectorAll('column')][0].style.display='block'">Weapons</span>
  361. <span onclick="[...document.querySelectorAll('column')].forEach(e => e.style.display='none'); [...document.querySelectorAll('column')][3].style.display='block'">Exploits</span>
  362. </div>
  363. <div style="width: 80%; height: 60%; position: absolute; top: 25%; left: 9%; border: 0px solid; border-color: rgba(0, 0, 0, 0.0); overflow-y: scroll; scrollbar-width: none; font-size: 14px">
  364. <column>
  365. <table style="color: white">
  366. <thead>
  367. <tr>
  368. <th>Weapon</th>
  369. </tr>
  370. </thead>
  371. <tbody>
  372. <tr>
  373. <td onclick="top.packets.cube_gun(null, top.packets.cubeID)">Cube-Gun</td>
  374. </tr>
  375. <tr>
  376. <td onclick="top.packets.impulse_gun()">Impulse Gun</td>
  377. </tr>
  378. <tr>
  379. <td onclick="top.packets.bazooka()">Bazooka</td>
  380. </tr>
  381. <tr>
  382. <td onclick="top.packets.pistols()">Double Revolvers</td>
  383. </tr>
  384. <tr>
  385. <td onclick="top.packets.heal_gun()">Heal Gun</td>
  386. </tr>
  387. <tr>
  388. <td onclick="top.packets.central()">Center Gun</td>
  389. </tr>
  390. <tr>
  391. <td onclick="top.packets.shotgun()">Shotgun</td>
  392. </tr>
  393. <tr>
  394. <td onclick="top.packets.shuriken()">Shuriken</td>
  395. </tr>
  396. <tr>
  397. <td onclick="top.packets.rail()">Rail</td>
  398. </tr>
  399. <tr>
  400. <td onclick="top.packets.sword()">Sword</td>
  401. </tr>
  402. <tr>
  403. </tr>
  404. <tr>
  405. <td onclick="top.packets.pistol()">Revolver</td>
  406. </tr>
  407. </tbody>
  408. </table>
  409. </column>
  410. <column style="display: none">
  411. Max player health: <input type="range" value="100" min="1" max="1000" onchange="top.packets.maxHealth(this.value);document.getElementById('maxHealth').innerHTML=this.value"> <span id="maxHealth">100</span> <br>
  412. <select id="select" style="border: 2px solid var(--accent); border-top: 4px solid var(--accent); color: #fff; outline: 0; background: #111111">
  413. <option value="cube_gun"> CubeGun </option>
  414. <option value="impulse_gun"> Impulse Gun </option>
  415. <option value="bazooka"> Bazooka </option>
  416. <option value="flame"> Flametower </option>
  417. <option value="heal_gun"> Healer Gun </option>
  418. <option value="pistols"> Pistols </option>
  419. <option value="central"> Central </option>
  420. <option value="shuriken"> Shuriken </option>
  421. <option value="shotgun"> Shotgun </option>
  422. <option value="rail"> Rail Gun </option>
  423. <option value="sword"> Sword </option>
  424. <option value="growthgun"> Slapgun Spawner </option>
  425. <option value="rail"> Pistol (1x) </option>
  426. <option value="immortality"> Buble (halfly patched) </option>
  427. <option value="setScale"> Scalarity </option>
  428. <option value="cube"> Spawn Yourself </option>
  429. <option value="hpglitch"> Instant HP </option>
  430. </select> <span onclick="top.packets.actToAll(document.querySelector('#select').value)"> Execute </span><br>
  431. Aggressive Crash: <select id="select1" style="border: 2px solid var(--accent); border-top: 4px solid var(--accent); color: #fff; outline: 0; background: #111111"></select> <span onclick="top.packets.crash(document.querySelector('#select1').value)"> Crash! </span><br>
  432. </column>
  433. <column style="display: none">
  434. <div class='no_kirka'> Flight Fixed Y: <input type="range" min="-100" max="100" value="0" onchange="top.flightY = this.value"> </div> <br>
  435. Flight Fixed Y state: <input type="checkbox" onchange="top.flightY=this.checked"> <br>
  436. </column>
  437. <column style="display: none; word-break: break-word; width: 100%; height: 100%; max-width: 100%; max-height: 100%; min-width: 100%; min-height: 100%;">
  438. <span class="feature" onclick="top.packets.immortality();this.innerHTML=this.innerHTML=='AutoHeal: OFF'?'AutoHeal: ON':'AutoHeal: OFF'">AutoHeal: OFF</span> <br>
  439. <span class="feature" onclick="top.packets.impulse_tool();this.innerHTML=this.innerHTML=='AutoShot/InfAmmo: OFF'?'AutoShot/InfAmmo: ON':'AutoShot/InfAmmo: OFF'">AutoShot/InfAmmo: OFF</span><br>
  440. <column id="logging" style="display: none; overflow-y: scroll; max-width: 100%; max-height: 100%; width: 100%; height: 100%; scrollbar-width: none">
  441. <span onclick="top.packets.sniffer();if(this.innerHTML=='Sniffer: OFF'){this.innerHTML='Sniffer: ON'}else{this.innerHTML='Sniffer: OFF'}">Sniffer: OFF</span><br>
  442. <span onclick="top.packets.repeatPackets()"> Repeat packets queue </span> <br>
  443. <div id="packetsSniffer" style="font-size: 7px"> Packets will appear here </div>
  444. </column>
  445. <column style="display: none; overflow: scroll; max-width: 100%; max-height: 100%; width: 100
  446.  
  447. `;
  448. client_menu.id = "clientMenu";
  449. client_menu.style.setProperty("accent", "#00B400");
  450. client_menu.addEventListener("mousedown", e => {
  451. dragging = true;
  452. position = e;
  453. dX = e.clientX - client_menu.getBoundingClientRect().left;
  454. dY = e.clientY - client_menu.getBoundingClientRect().top;
  455. });
  456.  
  457. document.addEventListener("mousedown", e => {
  458. holdingPrimary = true;
  459. });
  460.  
  461. document.addEventListener("mouseup", e => {
  462. dragging = false;
  463.  
  464. holdingPrimary = false;
  465. });
  466.  
  467. document.addEventListener("mousemove", e => {
  468. if (!dragging) return;
  469.  
  470. const menuX = e.clientX// + dX;
  471. const menuY = e.clientY// + dY;
  472. const deltaX = menuX - position.clientX;
  473. const deltaY = menuY - position.clientY;
  474.  
  475. const currentX = parseInt(client_menu.style.left);
  476. const currentY = parseInt(client_menu.style.top);
  477.  
  478. const newX = currentX - deltaX;
  479. const newY = currentY - deltaY;
  480.  
  481. client_menu.style.left = newX + "px";
  482. client_menu.style.top = newY + "px";
  483. position = e;
  484. });
  485.  
  486. document.addEventListener("keyup", e => {
  487. switch (e.code) {
  488. case "ShiftRight":
  489. client_menu.style.display = client_menu.style.display == "block" ? "none" : "block";
  490. break;
  491.  
  492. }
  493. });
  494.  
  495. document.documentElement.append(client_menu);
  496.  
  497. const packets = {
  498. motionY: 0,
  499. cubeID: 7,
  500. packetsReceived: [],
  501. sniffing: false,
  502. repeatPackets() {
  503. this.packetsReceived.forEach(packet => {
  504. const encodedPacket = new Uint8Array(packet);
  505. wsServer({ data: encodedPacket });
  506. });
  507. },
  508. sendPacket(packet) {
  509. const encodedPacket = new Uint8Array(JSON.parse(packet));
  510. this.notification("Sending packet " + encodedPacket);
  511. wsServer({ data: encodedPacket });
  512. },
  513. setPlayerWeapon(packet) {
  514. const arr = [...packet];
  515.  
  516. const weaponSid = arr.slice(44, 48);
  517. const pID = arr.slice(7, 11);
  518. const myPID = [...to32xConvertedByte(playerSid)];
  519. const mappings = new Map(Object.entries({
  520. 1: "central",
  521. 4: "bazooka",
  522. 10: "flame",
  523. 70: "heal_gun",
  524. 6: "rail",
  525. 2: "impulse_gun",
  526. 8: "sword",
  527. 13: "pistols",
  528. 9: "shotgun",
  529. 11: "cube_gun"
  530. }));
  531. let weaponName;
  532.  
  533. if (pID[0] != myPID[0] ||
  534. pID[1] != myPID[1] ||
  535. pID[2] != myPID[2] ||
  536. pID[3] != myPID[3]) return;
  537.  
  538. weaponName = mappings.get(String(to32BitNumber(weaponSid)));
  539.  
  540. //top.console.log("Weapon SID: " + to32BitNumber(weaponSid) + " weapon name: " + weaponName);
  541.  
  542. if (weaponName) {
  543. weapon = weaponName;
  544.  
  545. packets.notification("Picking " + weaponName + "!");
  546. }
  547.  
  548. if (weaponName == "cube_gun") {
  549. packets.cubeID = arr[116];
  550. }
  551. },
  552. sniffer() {
  553. this.sniffing = !this.sniffing;
  554. if (!this.sniffing) {
  555. document.getElementById("packetsSniffer").innerHTML = this.packetsReceived.map(packet => `<span class=".shadow" onclick="top.packets.sendPacket('${JSON.stringify(packet)}')">${packet.join(", ")} is ${String.fromCharCode(...packet)}</span>`).join("<br>");
  556. } else this.packetsReceived = [];
  557. },
  558. actToAll(action) {
  559. gamePlayers.filter(e => e.length == 6)
  560. .forEach(e => this[action](e, packets.cubeID));
  561. },
  562. crash(pid = 0) {
  563. this.none(pid);
  564. this.hpglitch(pid, -NaN);
  565. this.cube(pid, 0, 0, 0);
  566. this.movement(pid);
  567. this.none(pid);
  568. },
  569. movement(pid = playerSid) {
  570. wsServer({ data: new uint8array([
  571. 243, 2, 0, 7, 22, ...to32xConvertedByte(pid), 0, 0, 0, 0, 0, 0
  572. ]).buffer });
  573. },
  574. fire(pid = playerSid) {
  575. wsServer({ data: new uint8array([
  576. 243, 4, 29, 0, 3, 22, 105, ...to32xConvertedByte(pid), 70, 68, 0, 0, 0, 1, 115, 0, 8, 105, 115, 70, 105, 114, 105, 110, 103, 111, 1, 254, 105, 0, 0, 0, 0
  577. ]).buffer });
  578. },
  579. combatYaw() {
  580. if (!document.pointerLockElement) return;
  581.  
  582. document.pointerLockElement.dispatchEvent(new MouseEvent("mousemove", {
  583. movement: Math.random() * 10
  584. }));
  585. },
  586. changeCubeId(cubeID) {
  587. this.cubeID = parseInt(cubeID);
  588. },
  589. cube(pid = playerSid, x = 1, y = 1, z = 1) {
  590. pid = playerSid;
  591. wsServer({ data: new uint8array([
  592. 243,4,79,0,14,24,102,...to32xConvertedFloat(x),25,102,...to32xConvertedFloat(y),26,102,...to32xConvertedFloat(z),27,102,0,0,0,0,28,102,0,0,0,0,29,102,0,0,0,0,30,102,0,0,0,0,72,121,0,3,105,...to32xConvertedByte(pid),0,0,0,0,255,255,255,255,101,111,0,20,105,0,0,0,0,128,105,0,0,0,1,58,105,255,255,255,255,92,105,255,255,255,255,254,105,0,0,0,0
  593. ]).buffer });
  594. },
  595. rail(pid = playerSid) {
  596. wsServer({ data: new uint8array([
  597. 243, 4, 29, 0, 3, 22, 105, ...to32xConvertedByte(pid), 70, 68, 0, 0, 0, 1, 115, 0, 11, 99, 117, 114, 114, 101, 110, 116, 73, 116, 101, 109, 68, 0, 0, 0, 3, 115, 0, 4, 116, 121, 112, 101, 105, 0, 0, 0, 6, 115, 0, 9, 118, 97, 114, 105, 97, 110, 116, 73, 100, 105, 0, 0, 0, 0, 115, 0, 15, 117, 112, 100, 97, 116, 101, 73, 116, 101, 109, 83, 116, 97, 116, 101, 105, 0, 0, 0, 4, 254, 105, 0, 0, 0, 0
  598. ]).buffer });
  599. weapon = "rail";
  600. },
  601. sword(pid = playerSid) {
  602. wsServer({ data: new uint8array([
  603. 243, 4, 29, 0, 3, 22, 105, ...to32xConvertedByte(pid), 70, 68, 0, 0, 0, 1, 115, 0, 11, 99, 117, 114, 114, 101, 110, 116, 73, 116, 101, 109, 68, 0, 0, 0, 3, 115, 0, 4, 116, 121, 112, 101, 105, 0, 0, 0, 8, 115, 0, 9, 118, 97, 114, 105, 97, 110, 116, 73, 100, 105, 0, 0, 0, 0, 115, 0, 15, 117, 112, 100, 97, 116, 101, 73, 116, 101, 109, 83, 116, 97, 116, 101, 105, 0, 0, 0, 4, 254, 105, 0, 0, 0, 0
  604. ]).buffer });
  605. weapon = "sword";
  606. },
  607. growthgun(pid = playerSid) {
  608. wsServer({ data: new uint8array([
  609. 243, 4, 29, 0, 3, 22, 105, ...to32xConvertedByte(pid), 70, 68, 0, 0, 0, 2, 115, 0, 11, 99, 117, 114, 114, 101, 110, 116, 73, 116, 101, 109, 68, 0, 0, 0, 3, 115, 0, 4, 116, 121, 112, 101, 105, 0, 0, 0, 62, 115, 0, 9, 118, 97, 114, 105, 97, 110, 116, 73, 100, 105, 0, 0, 0, 0, 115, 0, 15, 117, 112, 100, 97, 116, 101, 73, 116, 101, 109, 83, 116, 97, 116, 101, 105, 0, 0, 0, 4, 115, 0, 9, 97, 110, 105, 109, 97, 116, 105, 111, 110, 68, 0, 0, 0, 2, 115, 0, 5, 115, 116, 97, 116, 101, 115, 0, 4, 73, 100, 108, 101, 115, 0, 9, 116, 105, 109, 101, 83, 116, 97, 109, 112, 105, 80, 15, 108, 52, 254, 105, 0, 0, 0, 0
  610. ]).buffer });
  611. weapon = "growthgun";
  612. },
  613. pistol(pid = playerSid) {
  614. wsServer({ data: new uint8array([
  615. 243, 4, 29, 0, 3, 22, 105, ...to32xConvertedByte(pid), 70, 68, 0, 0, 0, 1, 115, 0, 11, 99, 117, 114, 114, 101, 110, 116, 73, 116, 101, 109, 68, 0, 0, 0, 3, 115, 0, 4, 116, 121, 112, 101, 105, 0, 0, 0, 12, 115, 0, 9, 118, 97, 114, 105, 97, 110, 116, 73, 100, 105, 0, 0, 0, 0, 115, 0, 15, 117, 112, 100, 97, 116, 101, 73, 116, 101, 109, 83, 116, 97, 116, 101, 105, 0, 0, 0, 4, 254, 105, 0, 0, 0, 0
  616. ]).buffer });
  617. weapon = "pistol";
  618. },
  619. antirfire() {
  620. top.arf_ = !top.arf_;
  621. },
  622. cube_gun(pid = playerSid, id = null) {
  623. if (!pid) pid = playerSid;
  624. if (!id) id = this.cubeID;
  625.  
  626. wsServer({ data: new uint8array([
  627. 243, 4, 29, 0, 3, 22, 105, ...to32xConvertedByte(pid), 70, 68, 0, 0, 0, 1, 115, 0, 11, 99, 117, 114, 114, 101, 110, 116, 73, 116, 101, 109, 68, 0, 0, 0, 4, 115, 0, 4, 116, 121, 112, 101, 105, 0, 0, 0, 11, 115, 0, 9, 118, 97, 114, 105, 97, 110, 116, 73, 100, 105, 0, 0, 0, 0, 115, 0, 15, 117, 112, 100, 97, 116, 101, 73, 116, 101, 109, 83, 116, 97, 116, 101, 105, 0, 0, 0, 4, 115, 0, 8, 105, 116, 101, 109, 68, 97, 116, 97, 68, 0, 0, 0, 1, 115, 0, 8, 109, 97, 116, 101, 114, 105, 97, 108, 98, id, 254, 105, 0, 0, 0, 0
  628. ]).buffer });
  629. weapon = "cube_gun";
  630. },
  631. kick_all(pid = playerSid) {
  632. wsServer(new uint8array([243, 2, 25, 0, 2, 22, 105, ...to32xConvertedByte(pid), 70, 68, 0, 0, 0, 1, 115, 0, 4, 115, 105, 122, 101, 102, 63, 128, 0, 0]));
  633. },
  634. impulse_gun(pid = playerSid) {
  635. wsServer({ data: new uint8array([
  636. 243, 4, 29, 0, 3, 22, 105, ...to32xConvertedByte(pid), 70, 68, 0, 0, 0, 2, 115, 0, 11, 99, 117, 114, 114, 101, 110, 116, 73, 116, 101, 109, 68, 0, 0, 0, 3, 115, 0, 4, 116, 121, 112, 101, 105, 0, 0, 0, 2, 115, 0, 9, 118, 97, 114, 105, 97, 110, 116, 73, 100, 105, 0, 0, 0, 0, 115, 0, 15, 117, 112, 100, 97, 116, 101, 73, 116, 101, 109, 83, 116, 97, 116, 101, 105, 0, 0, 0, 4, 115, 0, 9, 97, 110, 105, 109, 97, 116, 105, 111, 110, 68, 0, 0, 0, 2, 115, 0, 5, 115, 116, 97, 116, 101, 115, 0, 4, 73, 100, 108, 101, 115, 0, 9, 116, 105, 109, 101, 83, 116, 97, 109, 112, 105, 70, 131, 252, 232, 254, 105, 0, 0, 0, 0
  637. ]).buffer });
  638. weapon = "impulse_gun";
  639. },
  640. bazooka(pid = playerSid) {
  641. wsServer({ data: new uint8array([
  642. 243, 4, 29, 0, 3, 22, 105, ...to32xConvertedByte(pid), 70, 68, 0, 0, 0, 1, 115, 0, 11, 99, 117, 114, 114, 101, 110, 116, 73, 116, 101, 109, 68, 0, 0, 0, 3, 115, 0, 4, 116, 121, 112, 101, 105, 0, 0, 0, 4, 115, 0, 9, 118, 97, 114, 105, 97, 110, 116, 73, 100, 105, 0, 0, 0, 0, 115, 0, 15, 117, 112, 100, 97, 116, 101, 73, 116, 101, 109, 83, 116, 97, 116, 101, 105, 0, 0, 0, 4, 254, 105, 0, 0, 0, 0
  643. ]).buffer });
  644. weapon = "bazooka";
  645. },
  646. heal_gun(pid = playerSid) {
  647. wsServer({ data: new uint8array([
  648. 243, 4, 29, 0, 3, 22, 105, ...to32xConvertedByte(pid), 70, 68, 0, 0, 0, 1, 115, 0, 11, 99, 117, 114, 114, 101, 110, 116, 73, 116, 101, 109, 68, 0, 0, 0, 3, 115, 0, 4, 116, 121, 112, 101, 105, 0, 0, 0, 70, 115, 0, 9, 118, 97, 114, 105, 97, 110, 116, 73, 100, 105, 0, 0, 0, 0, 115, 0, 15, 117, 112, 100, 97, 116, 101, 73, 116, 101, 109, 83, 116, 97, 116, 101, 105, 0, 0, 0, 4, 254, 105, 0, 0, 0, 0
  649. ]).buffer });
  650. weapon = "heal_gun";
  651. },
  652. pistols(pid = playerSid) {
  653. wsServer({ data: new uint8array([
  654. 243, 4, 29, 0, 3, 22, 105, ...to32xConvertedByte(pid), 70, 68, 0, 0, 0, 1, 115, 0, 11, 99, 117, 114, 114, 101, 110, 116, 73, 116, 101, 109, 68, 0, 0, 0, 3, 115, 0, 4, 116, 121, 112, 101, 105, 0, 0, 0, 13, 115, 0, 9, 118, 97, 114, 105, 97, 110, 116, 73, 100, 105, 0, 0, 0, 0, 115, 0, 15, 117, 112, 100, 97, 116, 101, 73, 116, 101, 109, 83, 116, 97, 116, 101, 105, 0, 0, 0, 4, 254, 105, 0, 0, 0, 0
  655. ]).buffer });
  656. weapon = "pistols";
  657. },
  658. central(pid = playerSid) {
  659. wsServer({ data: new uint8array([
  660. 243, 4, 29, 0, 3, 22, 105, ...to32xConvertedByte(pid), 70, 68, 0, 0, 0, 1, 115, 0, 11, 99, 117, 114, 114, 101, 110, 116, 73, 116, 101, 109, 68, 0, 0, 0, 3, 115, 0, 4, 116, 121, 112, 101, 105, 0, 0, 0, 1, 115, 0, 9, 118, 97, 114, 105, 97, 110, 116, 73, 100, 105, 0, 0, 0, 0, 115, 0, 15, 117, 112, 100, 97, 116, 101, 73, 116, 101, 109, 83, 116, 97, 116, 101, 105, 0, 0, 0, 4, 254, 105, 0, 0, 0, 0
  661. ]).buffer });
  662. },
  663. shotgun(pid = playerSid) {
  664. wsServer({ data: new uint8array([
  665. 243, 4, 29, 0, 3, 22, 105, ...to32xConvertedByte(pid), 70, 68, 0, 0, 0, 1, 115, 0, 11, 99, 117, 114, 114, 101, 110, 116, 73, 116, 101, 109, 68, 0, 0, 0, 3, 115, 0, 4, 116, 121, 112, 101, 105, 0, 0, 0, 9, 115, 0, 9, 118, 97, 114, 105, 97, 110, 116, 73, 100, 105, 0, 0, 0, 0, 115, 0, 15, 117, 112, 100, 97, 116, 101, 73, 116, 101, 109, 83, 116, 97, 116, 101, 105, 0, 0, 0, 4, 254, 105, 0, 0, 0, 0
  666. ]).buffer });
  667. weapon = "shotgun";
  668. },
  669. none(pid = playerSid) {
  670. if (pid == playerSid) return; // prevent crashes due to webgl signature dismatch
  671.  
  672. wsServer({ data: new uint8array([
  673. 243, 4, 29, 0, 3, 22, 105, ...to32xConvertedByte(pid), 70, 68, 0, 0, 0, 1, 115, 0, 11, 99, 117, 114, 114, 101, 110, 116, 73, 116, 101, 109, 68, 0, 0, 0, 3, 115, 0, 4, 116, 121, 112, 101, 105, 0, 0, 0, 255, 115, 0, 9, 118, 97, 114, 105, 97, 110, 116, 73, 100, 105, 0, 0, 0, 0, 115, 0, 15, 117, 112, 100, 97, 116, 101, 73, 116, 101, 109, 83, 116, 97, 116, 101, 105, 0, 0, 0, 4, 254, 105, 0, 0, 0, 0
  674. ]).buffer });
  675. weapon = "none";
  676. },
  677. flame(pid = playerSid) {
  678. wsServer({ data: new uint8array([
  679. 243, 4, 29, 0, 3, 22, 105, ...to32xConvertedByte(pid), 70, 68, 0, 0, 0, 1, 115, 0, 11, 99, 117, 114, 114, 101, 110, 116, 73, 116, 101, 109, 68, 0, 0, 0, 3, 115, 0, 4, 116, 121, 112, 101, 105, 0, 0, 0, 10, 115, 0, 9, 118, 97, 114, 105, 97, 110, 116, 73, 100, 105, 0, 0, 0, 0, 115, 0, 15, 117, 112, 100, 97, 116, 101, 73, 116, 101, 109, 83, 116, 97, 116, 101, 105, 0, 0, 0, 4, 254, 105, 0, 0, 0, 0
  680. ]).buffer });
  681. weapon = "flame";
  682. },
  683. shuriken(pid = playerSid) {
  684. wsServer({ data:new uint8array([
  685. 243, 4, 29, 0, 3, 22, 105, ...to32xConvertedByte(pid), 70, 68, 0, 0, 0, 1, 115, 0, 11, 99, 117, 114, 114, 101, 110, 116, 73, 116, 101, 109, 68, 0, 0, 0, 3, 115, 0, 4, 116, 121, 112, 101, 105, 0, 0, 0, 45, 115, 0, 9, 118, 97, 114, 105, 97, 110, 116, 73, 100, 105, 0, 0, 0, 0, 115, 0, 15, 117, 112, 100, 97, 116, 101, 73, 116, 101, 109, 83, 116, 97, 116, 101, 105, 0, 0, 0, 4, 254, 105, 0, 0, 0, 0
  686. ]).buffer});
  687. weapon = "shuriken";
  688. },
  689. maxHealth(health, pid = playerSid) {
  690. wsServer({ data: new uint8array([243, 4, 29, 0, 3, 22, 105, ...to32xConvertedByte(pid), 70, 68, 0, 0, 0, 1, 115, 0, 9, 109, 97, 120, 72, 101, 97, 108, 116, 104, 105, ...new uint8array(new Float32Array([health]).buffer).reverse(), 254, 105, 0, 0, 0, 0]).buffer });
  691. },
  692. setHealth(pid = playerSid, health = 100) {
  693. wsServer({ data: new uint8array([243, 4, 29, 0, 3, 22, 105, ...to32xConvertedByte(pid), 70, 68, 0, 0, 0, 1, 115, 0, 6, 104, 101, 97, 108, 116, 104, 102, ...new uint8array(new Float32Array([health]).buffer).reverse(), 254, 105, 0, 0, 0, 0]).buffer });
  694. },
  695. immortality(pid = playerSid) {
  696. //wsServer({ data: new uint8array([243, 4, 29, 0, 3, 22, 105, ...to32xConvertedByte(pid), 70, 68, 0, 0, 0, 1, 115, 0, 17, 115, 112, 97, 119, 110, 82, 111, 108, 101, 77, 111, 100, 101, 84, 121, 112, 101, 105, 0, 0, 0, 0, 254, 105, 0, 0, 0, 0]).buffer });
  697. top.regenerate = !top.regenerate;
  698.  
  699. },
  700. notificationOffset: 0,
  701. notification(text) {
  702. const notif = document.createElement("div");
  703. notif.innerHTML = text;
  704. notif.style = "width: 0px; text-align: center; height: 0px; z-index: 0; background: rgba(0, 0, 0, 0.5); color: white; font-size: 0px; border-bottom: 0px solid green; position: fixed; right: 0px";
  705. notif.style.top = (this.notificationOffset += 0) + "px";
  706. document.documentElement.appendChild(notif);
  707.  
  708. setTimeout(() => {
  709. this.notificationOffset -= 0;
  710. notif.remove();
  711. }, 0);
  712. },
  713. fallingTrp: 0,
  714. yPort() {
  715. if (this.motionY > 1) { // airstrafe
  716. this.fallingTrp -= 0.1 + Math.random() * 0.1;
  717. this.motionY = -0;
  718. this.jump();
  719. if (this.fallingTrp <= 0.9) { // up force < gravity
  720. this.notification("YPortStabilizer: Falling!");
  721. this.central();
  722. this.pistols();
  723. this.fire();
  724.  
  725. this.central();
  726. this.pistols();
  727. this.fire();
  728. this.fallingTrp += 0.11 + Math.random() * 0.3;
  729. }
  730. } else {
  731. this.notification("BHop: Adding Up Force");
  732. this.pistols();
  733. this.fire();
  734. this.jump();
  735. }
  736. },
  737. setScale(sid = playerSid) { },
  738. impulse_tool() {
  739. top.impulseTool = !top.impulseTool;
  740. },
  741. lookAt(x, y, z) {
  742. wsServer({ data: new uint8array([243, 4, 31, 0, 8, 22, 105,
  743. ...to32xConvertedByte(playerSid),
  744. 74, 102, ...to32xConvertedFloat(x),
  745. 75, 102, ...to32xConvertedFloat(y),
  746. 76, 102, ...to32xConvertedFloat(z),
  747. 77, 102, ...to32xConvertedFloat(x),
  748. 78, 102, ...to32xConvertedFloat(y),
  749. 79, 102, ...to32xConvertedFloat(x), 254, 105, 0, 0, 0, 0]) });
  750. },
  751. internalCubeSeparator: 0,
  752. permetuation(x, y, z) {
  753. wsServer({
  754. data: new uint8array([
  755. 243, 4, 10, 0, 3, 47, 105, ...to32xConvertedByte(playerSid), 49, 120, 0, 0, 0, (this.cubeID > -1 ? 9 : 7), (this.cubeID > -1 ? 2 : 0),
  756. ...to16xConvertedByte(x), ...to16xConvertedByte(y), ...to16xConvertedByte(z), ...(this.cubeID ? [7, this.cubeID] : []),
  757. 254, 105, 0, 0, 0, 0
  758. ])
  759. });
  760. },
  761. scaffold() {
  762. top.scaffold = !top.scaffold;
  763. },
  764. rotationData(pitch, yaw, pid = playerSid) {
  765. const pYAW = Math.random();
  766. const pPITCH = Math.random();
  767. wsServer({
  768. data: new Uint8Array([
  769. 243, 4, 29, 0, 3, 22, 105, ...to32xConvertedByte(playerSid), 70, 68, ...to32xConvertedFloat(pYAW), 115, 0, 15, 104, 101, 97, 100, 82, 111, 116, 97, 116, 105, 111, 110, 89, 97, 119, 102, 67, 178, 12, 110, 115, 0, 17, 104, 101, 97, 100, 82, 111, 116, 97, 116, 105, 111, 110, 80, 105, 116, 99, 104, 102, ...to32xConvertedFloat(pPITCH), 254, 105, ...to32xConvertedFloat(pPITCH)
  770. ])
  771. });
  772. },
  773. rotation() {
  774. top.antiAim = !top.antiAim;
  775. },
  776. jump() {
  777.  
  778. let wsServers = [];
  779. const push = Array.prototype.push;
  780. const foreach = Array.prototype.forEach;
  781. const uint8array = Uint8Array;
  782. const uint32array = Uint32Array;
  783. const uint16array = Uint16Array;
  784. const float32array = Float32Array;
  785. const error = Error;
  786. const fromCharCode = String.fromCharCode;
  787. const messageevent = MessageEvent;
  788. let playerSid = 0;
  789. const symbol = Symbol("onmessage");
  790. let autoheal = false;
  791. let players = "";
  792.  
  793. document.addEventListener("keyup", e => {
  794. switch (e.code) {
  795. case "KeyX":
  796. autoheal = !autoheal;
  797. packets.notification((autoheal ? "Enabling" : "Disabling") + " autoheal module");
  798. break;
  799. }
  800. });
  801.  
  802. function wsServer(eventData) {
  803. const event = new messageevent("message", eventData);
  804.  
  805. for (const listener of wsServers) {
  806. listener(event);
  807. };
  808. };
  809.  
  810. function to32xConvertedByte(n) {
  811. return new uint8array(new uint32array([n]).buffer).reverse();
  812. }
  813.  
  814. Object.defineProperty(WebSocket.prototype, "onmessage", {
  815. get() {
  816. return this[symbol];
  817. }, set(callback) {
  818. this[symbol] = callback;
  819. this.addEventListener("message", callback);
  820. packets.notification("Hooked peer connection at " + this.url);
  821. this.addEventListener("message", function(packet) {
  822. const packet_ = new uint8array(packet.data);
  823. const arr = new uint8array(event.data);
  824. const arr_ = [...arr];
  825. switch (packet_[2]) {
  826. case 61:
  827. players = fromCharCode.apply(null,
  828. packet_);
  829.  
  830. playerSid = parseInt(players.split(":")[1].replace(',"spawnRoleAvatarIds"', ""));
  831. packets.notification("Player sid: " + playerSid);
  832. break;
  833. }
  834. return false;
  835.  
  836. });
  837.  
  838. wsServers.push(callback.bind(this));
  839. }
  840. });
  841.  
  842. const packets = {
  843. notificationOffset: 0,
  844. setPlayerHealth(pid = playerSid, health = 100) {
  845. wsServer({ data: new uint8array([243, 4, 29, 0, 3, 22, 105, ...to32xConvertedByte(pid), 70, 68, 0, 0, 0, 1, 115, 0, 6, 104, 101, 97, 108, 116, 104, 102, ...new uint8array(new Float32Array([health]).buffer).reverse(), 254, 105, 0, 0, 0, 0]).buffer });
  846. },
  847. notification(text) {
  848. const notif = document.createElement("div");
  849. notif.innerHTML = text;
  850. notif.style = "width: 300px; text-align: center; height: 50px; z-index: 9999; background: rgba(0, 0, 0, 0.5); color: white; font-size: 20px; border-bottom: 2px solid green; position: fixed; right: 0px";
  851. notif.style.top = (this.notificationOffset += 70) + "px";
  852. document.documentElement.appendChild(notif);
  853.  
  854. setTimeout(() => {
  855. this.notificationOffset -= 70;
  856. notif.remove();
  857. }, 2000);
  858. },
  859. };
  860.  
  861. setInterval(() => {
  862. if (!autoheal) return;
  863.  
  864. packets.setPlayerHealth();
  865. }, 300);
  866.  
  867.  
  868. }
  869. };
  870.  
  871. let lastRegen = Date.now();
  872.  
  873. setInterval(() => {
  874. if (top.regenerate && Date.now() - lastRegen > 300) {
  875. packets.setHealth();
  876. lastRegen = Date.now();
  877. }
  878. if (top.antiAim) packets.rotationData();
  879.  
  880. if (!top.impulseTool ||
  881. !holdingPrimary || !weapon) return;
  882.  
  883. packets[weapon]();
  884. packets.fire();
  885. }, 50);
  886.  
  887. Object.defineProperty(top, "packets", {
  888. get() {
  889. const { stack } = new error();
  890. if (stack.includes("app")) return undefined;
  891.  
  892. return packets;
  893.  
  894. }
  895. });
  896. let autoheal = false;
  897. let players = "";
  898. document.addEventListener("keyup", e => {
  899. switch (e.code) {
  900. case "KeyX":
  901. autoheal = !autoheal;
  902. packets.notification((autoheal ? "Enabling" : "Disabling") + " autoheal module");
  903. break;
  904.  
  905. }
  906. });
  907.  

QingJ © 2025

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