您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
multibox after 2023 patch
当前为
- // ==UserScript==
- // @name Multibox script UPDATED
- // @namespace http://tampermonkey.net/
- // @version 4
- // @description multibox after 2023 patch
- // @author Mi300#4401
- // @match https://diep.io/*
- // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
- // @license MIT
- // @grant GM_getValue
- // @grant GM_setValue
- // ==/UserScript==
- let WTF = setInterval (function() {
- if (!document.querySelector('d-base').shadowRoot.children[0].shadowRoot.getElementById('username-input')) {
- return;
- }
- clearInterval (WTF)
- (function() {
- var delay = 1000;
- (function loop() {
- setTimeout(() => {
- localStorage.removeItem("rivet:token")
- loop();
- }, delay);
- })();
- })();
- const p = CanvasRenderingContext2D.prototype
- const _fill = p.fill,
- _beginPath = p.beginPath,
- _lineTo = p.lineTo,
- _moveTo = p.moveTo,
- _getGamepads = window.navigator.getGamepads,
- _strokeRect = p.strokeRect,
- _toString = Function.prototype.toString;
- let fill,
- beginPath,
- lineTo,
- moveTo,
- getGamepads,
- strokeRect;
- let canRespawn = false;
- let worldPosition = [0, 0];
- let overlay;
- let mouseOffset = [0, 0];
- let gui = true;
- let test = 1;
- let gamepadConnected = false;
- let gamepadAxes = [0, 0, 0, 0]
- let gamepadButtons = [
- ...Array(17)].map((x) => {
- return { pressed: false };
- });
- const fetchGamepad = () => {
- return {
- axes: gamepadAxes,
- buttons: gamepadButtons,
- mapping: 'standard',
- }
- }
- getGamepads = function(...args) {
- if (gamepadConnected) {
- return [fetchGamepad()]
- }
- return false;
- }
- let cameraZoom = 0.5;
- const canvas = document.getElementById ('canvas');
- let dgg = 'i';
- function hookMinimapArrow () {
- let drawInstructions = 0;
- let minimapArrowVertex = [];
- beginPath = function(...args) {
- drawInstructions = 1;
- minimapArrowVertex = [];
- _beginPath.call(this, ...args);
- }
- moveTo = function(...args) {
- drawInstructions = 2;
- minimapArrowVertex.push (args);
- _moveTo.call(this, ...args)
- }
- lineTo = function(...args) {
- if (drawInstructions >= 2 && drawInstructions <= 5) {
- drawInstructions ++;
- minimapArrowVertex.push (args);
- } else {
- drawInstructions = 0;
- }
- _lineTo.call(this, ...args)
- }
- fill = function(...args) {
- if (this.globalAlpha != 1) {
- _fill.call(this, ...args)
- return;
- }
- if (this.fillStyle != '#000000') {
- _fill.call(this, ...args)
- return;
- }
- if (drawInstructions === 4) {
- const pos = getAverage (minimapArrowVertex);
- worldPosition = getWorldPosition (pos);
- }
- _fill.call(this, ...args)
- }
- }
- let minimapPosition = [0, 0];
- let minimapDim = [0, 0];
- function hookMinimap () {
- strokeRect = function(...args) {
- const transform = this.getTransform ();
- minimapPosition = [transform.e, transform.f];
- minimapDim = [transform.a, transform.d];
- _strokeRect.call(this, ...args)
- }
- }
- function getWorldPosition (position) {
- const ret = [
- parseFloat((((position[0] - minimapPosition[0] - minimapDim[0] / 2) / minimapDim[0] * 100) * 460).toFixed (3)),
- parseFloat((((position[1] - minimapPosition[1] - minimapDim[1] / 2) / minimapDim[1] * 100) * 460).toFixed (3)),
- ]
- return ret;
- }
- const Mi = '';
- function getAverage (points) {
- let ret = [0, 0];
- points.forEach (point => {
- ret[0] += point[0];
- ret[1] += point[1];
- });
- ret[0] /= points.length;
- ret[1] /= points.length;
- return ret;
- }
- let dgh = 'M';
- const getDist = (t1, t2) => {
- const distX = t1[0] - t2[0];
- const distY = t1[1] - t2[1];
- return [Math.hypot(distX, distY), distX, distY];
- };
- function moveBot () {
- input.execute('game_stats_build 565656565656567878787878784478422')
- const dangerRadius = Boolean(parseInt(localStorage.followCursor)) ? 750 : 250
- gamepadButtons[7].pressed = Boolean(parseInt(localStorage.autoShoot))
- if (Boolean(parseInt(localStorage.autoRespawn))) {
- if (canRespawn) {
- input.try_spawn (localStorage.name)
- }
- }
- if (input.should_prevent_unload()) {
- canRespawn = true;
- }
- let masterMouse = GM_getValue('multiboxMouse');
- let masterMove = GM_getValue ('multiboxWorld');
- if (Boolean(parseInt(localStorage.followCursor))) {
- masterMove = masterMouse;
- }
- const distanceMouse = getDist (masterMouse, worldPosition);
- const distanceMove = getDist (masterMove, worldPosition);
- if (!masterMouse[0] || !masterMouse[1] || !masterMove[0] || !masterMove[1]) {
- return;
- }
- if (Boolean(parseInt(localStorage.copyMovement))) {
- gamepadAxes[0] = masterMove[0] + distanceMove[1] * 100;
- gamepadAxes[1] = masterMove[1] + distanceMove[2] * 100;
- } else {
- gamepadAxes[0] = worldPosition[0];
- gamepadAxes[1] = worldPosition[1];
- }
- gamepadAxes[2] = masterMouse[0] + distanceMouse[1] * 100;
- gamepadAxes[3] = masterMouse[1] + distanceMouse[2] * 100;
- gamepadConnected = true;
- }
- function frame () {
- overlay.innerHTML = `
- <h1>MULTIBOX</h1>
- <br> <br>
- World position: <br> ${Math.round(worldPosition[0]) + ', ' + Math.round(worldPosition[1])}
- <br> <br>
- Master Tab: ${Boolean (document.hasFocus ())}
- <br> <br>
- [F] Multibox Enabled: ${Boolean (parseInt (localStorage.multiboxEnabled))}
- <br> <br>
- [G] Copy Movement: ${Boolean (parseInt (localStorage.copyMovement))}
- <br> <br>
- [R] Follow Cursor: ${Boolean (parseInt (localStorage.followCursor))}
- <br> <br>
- [Q] Toggle Gui: true
- <br> <br>
- [Z] Auto Respawn: ${Boolean (parseInt (localStorage.autoRespawn))}
- <br> <br>
- [,] Always Shoot: ${Boolean (parseInt (localStorage.autoShoot))}
- <br> <br>
- `
- if (Boolean (document.hasFocus ())) {
- gamepadConnected = false;
- const pos1 = mouseOffset[0] / Math.abs(mouseOffset[0])
- const pos2 = mouseOffset[1] / Math.abs(mouseOffset[1])
- GM_setValue('multiboxWorld', worldPosition);
- GM_setValue('multiboxMouse', [
- worldPosition[0] + ( (mouseOffset[0] * (4 - (mouseOffset[0] / Math.abs(mouseOffset[0])))) * (1 - (cameraZoom)) * 1.35 ) * 1.6,
- worldPosition[1] + ( (mouseOffset[1] * 4) * (1 - cameraZoom) * 1.35 ) * 1.6,
- ]);
- //0.46699 1 2.14137
- //0.38238 1.15
- //
- } else if (localStorage.multiboxEnabled === '1') {
- moveBot ();
- } else {
- gamepadConnected = false;
- }
- window.requestAnimationFrame (frame);
- }
- document.addEventListener ('keydown', e => {
- if (e.key === 'f') {
- localStorage.multiboxEnabled = Number (!Boolean (parseInt (localStorage.multiboxEnabled)))
- }
- if (e.key === 'g') {
- localStorage.copyMovement = Number (!Boolean (parseInt (localStorage.copyMovement)))
- }
- if (e.key === 'r') {
- localStorage.followCursor = Number (!Boolean (parseInt (localStorage.followCursor)))
- }
- if (e.key === 'q') {
- gui = !gui;
- overlay.style.display = gui ? 'block' : 'none'
- }
- if (e.key === ',') {
- localStorage.autoShoot = Number (!Boolean (parseInt (localStorage.autoShoot)))
- }
- if (e.key === 'z') {
- localStorage.autoRespawn = Number (!Boolean (parseInt (localStorage.autoRespawn)))
- }
- if (e.key === '[') {
- test += 0.25;
- }
- })
- document.addEventListener ('mousemove', e => {
- const aimRatioX = 1 - (e.x / canvas.width);
- const aimRatioY = 1 - (e.y / canvas.height);
- if (Boolean (document.hasFocus ())) {
- localStorage.aimRatioX = aimRatioX;
- localStorage.aimRatioY = aimRatioY;
- }
- mouseOffset = [
- e.x - canvas.width / 2,
- e.y - canvas.height / 2,
- ]
- });
- function terminate () {
- if (!localStorage.multiboxEnabled) {
- localStorage.multiboxEnabled = 0;
- }
- if (!localStorage.copyMovement) {
- localStorage.copyMovement = 1;
- }
- if (!localStorage.followCursor) {
- localStorage.followCursor = 0;
- }
- if (!localStorage.autoRespawn) {
- localStorage.autoRespawn = 0;
- }
- if (!localStorage.autoShoot) {
- localStorage.autoShoot = 0;
- }
- overlay = document.createElement('div');
- overlay.style.position = 'fixed';
- overlay.style.top = '1px';
- overlay.style.left = '1px';
- overlay.style.fontFamily = 'Lucida Console, Courier, monospace';
- overlay.style.fontSize = '12px';
- overlay.style.color = '#ffffff';
- overlay.style.pointerEvents = 'none';
- overlay.style.userSelect = 'none';
- overlay.style.fontSize = '14px';
- overlay.style.backgroundColor = 'gray';
- overlay.style.height = '450px';
- overlay.style.width = '250px';
- overlay.style.borderRadius = '1px'
- overlay.style.borderStyle = 'solid'
- overlay.style.borderColor = '#404040'
- overlay.style.borderWidth = '5px'
- overlay.style.textAlign = 'center';
- document.body.appendChild(overlay);
- frame ();
- hookMinimapArrow ();
- hookMinimap ();
- }
- terminate ();
- const toString = function() {
- switch(this) {
- case fill: return _toString.call(_fill);
- case moveTo: return _toString.call(_moveTo);
- case beginPath: return _toString.call(_beginPath);
- case lineTo: return _toString.call(_lineTo);
- case getGamepads: return _toString.call(_getGamepads);
- case strokeRect: return _toString.call(_strokeRect);
- case toString: return _toString.call(_toString);
- }
- return _toString.call(this);
- };
- p.fill = fill;
- p.beginPath = beginPath;
- p.moveTo = moveTo;
- p.lineTo = lineTo;
- window.navigator.getGamepads = getGamepads;
- p.strokeRect = strokeRect;
- Function.prototype.toString = toString;
- },400);
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址