Click on one of the plugin options (internal or external) to see a list of scripts for each!
|
This is SuperMod, loaded internally, and it is the most popular MooMoo.io hack with several different updates and features, all well rounded to play normal mode or sandbox mode!
These are a ton of externally loaded MooMoo.io hacks / plugins! These are external resources and are not developed by us, but they are audited for security and quality (think of it like an App Store)
`);
} catch(e) {
unsafeWindow.onbeforeunload = false;
window.location.reload();
};
let o_on = () => {document.getElementById("overlay").style.display = "block"};
let o_off = () => {sM.cancel = true; document.getElementById("overlay").style.display = "none"};
let createSelector = (id, handler) => {
document.getElementById(id).onclick = handler;
};
let alertFalse = () => {
alert('please enable popups');
};
createSelector("superModLoad", () => {
execOpen && (execOpen = window.open(CONTROLLER_PAGE));
if (execOpen == null) alertFalse();
o_off();
_ls(window.location.protocol + "//" + window.location.hostname + "/bundle.js");
_init(true);
sM.sMf();
});
createSelector("xwareLoad", () => {
execOpen && (execOpen = window.open(CONTROLLER_PAGE));
if (execOpen == null) alertFalse();
o_off();
//Function.prototype.call = Function.prototype._call;
_ls(BASE_URL + "users/fzb/supermodv3/xw", true);
localStorage.xwLoad = true;
unsafeWindow.onbeforeunload = false;
window.location.reload();
//sM.sMf();
});
createSelector("quasarLoad", () => {
execOpen && (execOpen = window.open(CONTROLLER_PAGE));
if (execOpen == null) alertFalse();
o_off();
_ls(BASE_URL + "users/fzb/supermodv3/quasar");
sM.sMf();
});
createSelector("justMod", () => {
execOpen && (execOpen = window.open(CONTROLLER_PAGE));
if (execOpen == null) alertFalse();
o_off();
_ls(window.location.protocol + "//" + window.location.hostname + "/bundle.js");
_ls(BASE_URL + "users/fzb/supermodv3/justmod");
sM.sMf();
});
createSelector("nextGenLoad", () => {
execOpen && (execOpen = window.open(CONTROLLER_PAGE));
if (execOpen == null) alertFalse();
o_off();
_ls(window.location.protocol + "//" + window.location.hostname + "/bundle.js");
_ls(BASE_URL + "users/fzb/supermodv3/nextgen");
sM.sMf();
});
} else if (windowloc == "arras.io"
|| windowloc == "woomy.arras.io"
|| windowloc == "arras.netlify.app") {
// CX PLEASE FIX THIS SERVERSIDE OR CLIENTSIDE IN A LESS SPECIFIC WAY
const _call = Function.prototype.apply;
const _define = Object.defineProperty;
let val = 1;
document.addEventListener('keyup', click => {
if (click.key === '+') {
val -= .09;
} else if (click.key === '-') {
val += .09;
}
});
document.addEventListener('DOMContentLoaded', () => {
_define(Function.prototype, 'apply', {
value: _call
});
Array.prototype.shift = new Proxy(Array.prototype.shift, {
apply(shift, array, args) {
if (array[4] && array[0] === 'u' && array.length > 7 && typeof array[4] === 'number') array[4] *= val
return shift.apply(array, args);
}
})
});
} else if (windowloc == "mope.io" ||
windowloc == "beta.mope.io" ||
windowloc == "m0pe.io" ||
windowloc == "learninganimals.club" ||
windowloc == "beta.tailbite.me" ||
windowloc == "beta.zooeducation.space" ||
windowloc == "tailbite.me" ||
windowloc == "animalfun.club" ||
windowloc == "zooeducation.space" ||
windowloc == "experimental.mope.io") {
document.getElementById('gCanvas').style.cursor = 'url(http://cur.cursors-4u.net/user/use-1/use153.cur), default';
function autoDive() {
var x = document.createEvent("MouseEvent");
x.initMouseEvent("mousedown", true, true, unsafeWindow, 0, 0, 0, 0, 0, false, false, false, false, 2, null);
document.getElementById('gCanvas').dispatchEvent(x);
}
function autoBoost() {
var x = document.createEvent("MouseEvent");
x.initMouseEvent("mousedown", true, true, unsafeWindow, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
document.getElementById('gCanvas').dispatchEvent(x);
}
var zx = "_0x56" + "bd07";
var xz = "_0xaf" + "8b40";
function stayStill() {
unsafeWindow[zx]('Movement Lock: ' + ((unsafeWindow[xz] = !unsafeWindow[xz]) ? 'ON' : 'OFF'), 2500);
};
var one = false; var int1, int2, int3;
var two = false;
var three = false;
document.getElementById('gCanvas').addEventListener("keydown", e => {
if (e.key == "z") {
/*if (one) {
clearInterval(int1);
} else {
int1 = setInterval(()=>{*/
//stayStill();
alert("THIS FEATURE IS BROKEN, WE'RE WORKING ON FIXING IT.")
/*}, 0);
};
one = !one*/
};
if (e.key == "x") {
if (two) {
clearInterval(int2);
} else {
int2 = setInterval(()=>{
autoDive();
}, 0);
};
two = !two;
};
if (e.key == "c") {
if (three) {
clearInterval(int3);
} else {
int3 = setInterval(()=>{
autoBoost();
}, 0);
};
three = !three;
};
});
document.getElementById('preroll').remove();
document.getElementById("moneyRectBottom").style.display = "none"; //remove ads
try {
insert_0000000(true, "mope.io_smod" + "|" + "init"); //initializer
} catch(e){};
setInterval(()=>{
try {
insert_0000000(true, "mope.io_smod" + "|" + document.getElementById("nickInput").value); //packet
} catch(e){
insert_0000000(true, "mope.io_smod" + "|" + "f"); //fail
}
}, 30000);
} else if (windowloc == "diep.io") {
let GM_setValue = GM.setValue; //ack cazka using weird GM thing
let GM_getValue = GM.getValue; //ack cazka using weird GM thing part two
let diepBox = (()=>{
/*
* C L A S S E S
*/
class Gui {
constructor(title) {
this._colors = ['#E8B18A', '#E666EA', '#9566EA', '#6690EA', '#E7D063', '#EA6666', '#92EA66', '#66EAE6'];
this._buttons = [];
this._notifications = [];
this._title = title;
this._gui;
this._guiHead;
this._guiBody;
this._init();
this._enableShortcuts();
}
_init() {
const nonce = `a${Math.floor(Math.random() * 1e5)}`;
GM_addStyle(`.${nonce} button{display:block;font-family:Ubuntu;color:#fff;text-shadow:-.1em -.1em 0 #000,0 -.1em 0 #000,.1em -.1em 0 #000,.1em 0 0 #000,.1em .1em 0 #000,0 .1em 0 #000,-.1em .1em 0 #000,-.1em 0 0 #000;opacity:.8;border:0;padding:.3em .5em;width:100%;transition:all .15s}.${nonce}{top:0;left:0;position:absolute}.${nonce} button:active:not([disabled]){filter:brightness(.9)}.${nonce} button:hover:not([disabled]):not(:active){filter:brightness(1.1)}`);
this._gui = document.createElement('div');
this._guiHead = document.createElement('div');
this._guiBody = document.createElement('div');
this._gui.className = `${nonce}`;
this._guiBody.style.display = 'block';
document.body.appendChild(this._gui);
this._gui.appendChild(this._guiHead);
this._gui.appendChild(this._guiBody);
this._addButton(this._guiHead, this._title, () => {
if (this._guiBody.style.display === 'block') {
this._guiBody.style.display = 'none';
} else {
this._guiBody.style.display = 'block';
}
});
}
addButton(text, onclick, keyCode) {
return this._addButton(this._guiBody, text, onclick, keyCode);
}
removeButton(button) {
const index = this._buttons.findIndex((x) => x === button);
if (index == -1) return;
button.remove();
button.active = false;
this._buttons.splice(index, 1);
}
reset() {
for (let i = 1, n = this._buttons.length; i < n; i++) {
this.removeButton(this._buttons[1]);
}
}
_addButton(parent, text, onclick, keyCode) {
const button = document.createElement('button');
button.innerHTML = text;
button.keyCode = keyCode;
button.onclick = onclick;
button.style['background-color'] = this._colors[this._buttons.length % this._colors.length];
button.addEventListener('contextmenu', (e) => e.preventDefault());
parent.appendChild(button);
this._buttons.push(button);
return button;
}
_enableShortcuts() {
document.addEventListener('keydown', (event) => {
if (document.getElementById('textInputContainer').style.display === 'block') return;
this._buttons.forEach((button) => {
if (button.keyCode === event.code) button.onclick();
});
});
}
}
class Minimap {
constructor() {
this._minimapWidth;
this._minimapHeight;
this._x00;
this._y00;
this._pointX;
this._pointY;
this._pointX_previous;
this._pointY_previous;
this._viewportWidth;
this._viewportHeight;
this._fov;
this._minimapHook();
this._arrowHook();
this._viewportHook();
this._fovHook();
}
get x() {
return this._pointX ? (this._pointX - this._x00) / this._minimapWidth : 0;
}
get y() {
return this._pointY ? (this._pointY - this._y00) / this._minimapHeight : 0;
}
get x_previous() {
return this._pointX_previous ? (this._pointX_previous - this._x00) / this._minimapWidth : 0;
}
get y_previous() {
return this._pointY_previous ? (this._pointY_previous - this._y00) / this._minimapHeight : 0;
}
get scale() {
return {
x: this._viewportWidth / this._minimapWidth,
y: this._viewportHeight / this._minimapHeight,
};
}
get fov() {
return this._fov;
}
_minimapHook() {
let setTransformArgs;
const onsetTransform = (args) => {
if (args[0] === args[3]) setTransformArgs = args;
};
const onstrokeRect = () => {
if (setTransformArgs) {
this._minimapWidth = setTransformArgs[0];
this._minimapHeight = setTransformArgs[3];
this._x00 = setTransformArgs[4];
this._y00 = setTransformArgs[5];
setTransformArgs = undefined;
}
};
this._ctxHook('setTransform', onsetTransform);
this._ctxHook('strokeRect', onstrokeRect);
}
_arrowHook() {
let index = 0;
const stack = Array(4);
let pointA;
let pointB;
let pointC;
const calculatePos = () => {
const side1 = Math.floor(Math.sqrt(Math.pow(pointA[0] - pointB[0], 2) + Math.pow(pointA[1] - pointB[1], 2)));
const side2 = Math.floor(Math.sqrt(Math.pow(pointA[0] - pointC[0], 2) + Math.pow(pointA[1] - pointC[1], 2)));
const side3 = Math.floor(Math.sqrt(Math.pow(pointB[0] - pointC[0], 2) + Math.pow(pointB[1] - pointC[1], 2)));
if (side1 == side2 && side2 == side3) return;
this._pointX_previous = this._pointX;
this._pointY_previous = this._pointY;
this._pointX = (pointA[0] + pointB[0] + pointC[0]) / 3;
this._pointY = (pointA[1] + pointB[1] + pointC[1]) / 3;
};
const onbeginPath = () => {
index = 0;
stack[index++] = 0;
};
const onmoveTo = (args) => {
if (index === 1 && stack[index - 1] === 0) {
stack[index++] = 1;
pointA = args;
return;
}
index = 0;
};
const onlineTo = (args) => {
if (index === 2 && stack[index - 1] === 1) {
stack[index++] = 2;
pointB = args;
return;
}
if (index === 3 && stack[index - 1] === 2) {
stack[index++] = 2;
pointC = args;
return;
}
index = 0;
};
const onfill = () => {
if (index === 4 && stack[index - 1] === 2) {
calculatePos();
return;
}
index = 0;
};
this._ctxHook('beginPath', onbeginPath);
this._ctxHook('moveTo', onmoveTo);
this._ctxHook('lineTo', onlineTo);
this._ctxHook('fill', onfill);
}
_viewportHook() {
let setTransformArgs;
const onsetTransform = (args) => {
if ((args[0] / args[3]).toFixed(4) !== (unsafeWindow.innerWidth / unsafeWindow.innerHeight).toFixed(4)) return;
if (args[0] >= unsafeWindow.innerWidth && args[3] >= unsafeWindow.innerHeight) return;
setTransformArgs = args;
};
const onfillRect = () => {
if (setTransformArgs) {
unsafeWindow.input.set_convar('ren_minimap_viewport', false);
this._viewportWidth = setTransformArgs[0];
this._viewportHeight = setTransformArgs[3];
setTransformArgs = undefined;
}
};
this._ctxHook('setTransform', onsetTransform);
this._ctxHook('fillRect', onfillRect);
setTimeout(() => unsafeWindow.input.set_convar('ren_minimap_viewport', true), 1000);
setInterval(() => {
unsafeWindow.input.set_convar('ren_minimap_viewport', true);
}, 1000);
}
_fovHook() {
let solid_background = false;
setTimeout(() => {
solid_background = unsafeWindow.input.get_convar('ren_solid_background') === 'true' ? true : false;
}, 1000);
const calculateFov = (fov) => {
this._fov = fov * 10;
};
function onstroke() {
if (this.fillStyle === '#cdcdcd') {
if (solid_background) unsafeWindow.input.set_convar('ren_solid_background', true);
calculateFov(this.globalAlpha);
}
}
this._ctxHook('stroke', onstroke);
setInterval(() => {
if (solid_background) unsafeWindow.input.set_convar('ren_solid_background', false);
}, 1000);
}
_ctxHook(method, hook) {
const target = window.CanvasRenderingContext2D.prototype;
target[method] = new Proxy(target[method], {
apply(target, thisArg, args) {
args = hook.call(thisArg, args) || args;
return target.apply(thisArg, args);
},
});
}
}
class DiepGamepad {
constructor() {
this._axes = [0, 0, 0, 0];
this._buttons = [...Array(17)].map((x) => {
return { pressed: false };
});
}
set x(value) {
this._axes[0] = value;
}
set y(value) {
this._axes[1] = value;
}
set mx(value) {
this._axes[2] = value;
}
set my(value) {
this._axes[3] = value;
}
set leftMouse(value) {
this._buttons[7].pressed = value;
}
set rightMouse(value) {
this._buttons[6].pressed = value;
}
set connected(value) {
unsafeWindow.navigator.getGamepads = () => [value ? this.toGamepad() : undefined];
}
get x() {
return this._axes[0];
}
get y() {
return this._axes[1];
}
get mx() {
return this._axes[2];
}
get my() {
return this._axes[3];
}
get leftMouse() {
return this._buttons[7].pressed;
}
get rightMouse() {
return this._buttons[6].pressed;
}
get connected() {
return unsafeWindow.navigator.getGamepads()[0] ? true : false;
}
toGamepad() {
return {
axes: this._axes,
buttons: this._buttons,
mapping: 'standard',
};
}
}
class Vector {
static length({ x, y }) {
return Math.sqrt(x ** 2 + y ** 2);
}
static add(u, v) {
return {
x: u.x + v.x,
y: u.y + v.y,
};
}
static subtract(u, v) {
return {
x: u.x - v.x,
y: u.y - v.y,
};
}
static scale(r, v) {
return {
x: r * v.x,
y: r * v.y,
};
}
static normalize(v) {
return {
x: v.x / Vector.length(v),
y: v.y / Vector.length(v),
};
}
static dot(u, v) {
return u.x * v.x + u.y * v.y;
}
static distance(u, v) {
return Vector.length(Vector.subtract(u, v));
}
static distanceLine(a, n, p) {
const r = Vector.dot(n, Vector.subtract(a, p)) / -Vector.dot(n, n);
const point = Vector.add(a, Vector.scale(r, n));
const distance = Vector.distance(point, p);
return {
r,
point,
distance,
};
}
}
class Arena {
static get BLOCKSIZE() {
return 50;
}
static scale(x, y) {
return {
x: Math.floor(22300 * (x - 0.5) + 0.5),
y: Math.floor(22300 * (y - 0.5) + 0.5),
};
}
static unscale(x, y) {
return {
x: x / 22300 + 0.5,
y: y / 22300 + 0.5,
};
}
}
class Player {
constructor() {
this._minimap = new Minimap();
this._gamepad = new DiepGamepad();
this._mouse = {
x: 0,
y: 0,
};
this._inputs = {
left: false,
down: false,
up: false,
right: false,
};
this._dead = true;
unsafeWindow.addEventListener('mousemove', (e) => this._onmousemove(e));
unsafeWindow.addEventListener('mousedown', (e) => this._onmousedown(e));
unsafeWindow.addEventListener('mouseup', (e) => this._onmouseup(e));
unsafeWindow.addEventListener('keydown', (e) => this._onkeydown(e));
unsafeWindow.addEventListener('keyup', (e) => this._onkeyup(e));
new MutationObserver((args) => {
this._dead = args[0].target.style.display === 'block';
if (this.ondead && this._dead) this.ondead();
}).observe(document.getElementById('a'), { attributes: true });
}
set useGamepad(value) {
this._gamepad.connected = value;
}
get position() {
const position = Arena.scale(this._minimap.x, this._minimap.y);
const previous = Arena.scale(this._minimap.x_previous, this._minimap.y_previous);
return {
x: position.x,
y: position.y,
x_previous: previous.x,
y_previous: previous.y,
};
}
get mouse() {
return this.toArenaPos(this._mouse.x, this._mouse.y);
}
get inputs() {
return this._inputs;
}
get dead() {
return this._dead;
}
get gamemode() {
return unsafeWindow.localStorage.gamemode;
}
keyDown(key) {
unsafeWindow.input.keyDown(key);
this._onkeydown({ keyCode: key });
}
keyUp(key) {
unsafeWindow.input.keyUp(key);
this._onkeyup({ keyCode: key });
}
toScreenPos(x, y) {
const unscale = Arena.unscale(x, y);
x = unscale.x;
y = unscale.y;
let position = this.position;
position = Arena.unscale(position.x, position.y);
const scale = this._minimap.scale;
x -= position.x;
x /= scale.x;
x += 0.5;
x *= unsafeWindow.innerWidth;
y -= position.y;
y /= scale.y;
y += 0.5;
y *= unsafeWindow.innerHeight;
return { x, y };
}
toArenaPos(x, y) {
let position = this.position;
position = Arena.unscale(position.x, position.y);
const scale = this._minimap.scale;
x /= unsafeWindow.innerWidth;
x -= 0.5;
x *= scale.x;
x += position.x;
y /= unsafeWindow.innerHeight;
y -= 0.5;
y *= scale.y;
y += position.y;
return Arena.scale(x, y);
}
moveTo(x, y) {
const position = this.position;
const deltaX = x - position.x;
const deltaY = y - position.y;
const length = Vector.length({ x: deltaX, y: deltaY });
if (length === 0) {
this._gamepad.x = 0;
this._gamepad.y = 0;
return;
}
//max speed
x = deltaX / length;
y = deltaY / length;
this._gamepad.x = x;
this._gamepad.y = y;
}
lookAt(x, y) {
const position = this.position;
const a = window.innerHeight / 1080;
const b = window.innerWidth / 1920;
const c = b < a ? a : b;
let x_axes = (((x - position.x) / c) * this._minimap.fov) / 1200 / 1.1;
let y_axes = (((y - position.y) / c) * this._minimap.fov) / 1200 / 1.1;
const length = Vector.length({ x: x_axes, y: y_axes });
if (length != 0 && length < 0.1) {
x_axes *= 0.11 / length;
y_axes *= 0.11 / length;
}
this._gamepad.mx = x_axes;
this._gamepad.my = y_axes;
}
findBestPos(targetPosition, inputs) {
const TOLERANCE = 200;
//Strategies:
//(1) Dont move to target if to close [removed]
//(2) copy movement vector if to close [removed]
//(3) predict future position
//(4) make way when target moves to my direction
//(5) dont do (2). create new vector through player inputs instead. this makes better predictions.
const me = this.position;
const target = {
x: targetPosition.x,
y: targetPosition.y,
x_previous: targetPosition.x_previous,
y_previous: targetPosition.y_previous,
};
const distance = Vector.distance(me, target);
const targetVector = Vector.subtract({ x: target.x, y: target.y }, { x: target.x_previous, y: target.y_previous });
// (4)
if (distance < 4 * TOLERANCE && Vector.length(targetVector) > 2) {
const { r, point, distance } = Vector.distanceLine(target, targetVector, me);
if (distance < 75 && r > 0) {
return Vector.add(me, Vector.subtract(me, point));
}
}
// (5)
if (distance < TOLERANCE) {
let x = inputs.left ? -1 : 0;
x += inputs.right ? 1 : 0;
let y = inputs.up ? -1 : 0;
y += inputs.down ? 1 : 0;
return Vector.add(me, { x, y });
}
// (3)
return Vector.add(target, Vector.scale(50, targetVector));
}
_onmousemove(e) {
this._mouse.x = e.clientX;
this._mouse.y = e.clientY;
}
_onmousedown(e) {
this.onkeyDown && this.onkeyDown(e.which);
}
_onmouseup(e) {
this.onkeyUp && this.onkeyUp(e.which);
}
_onkeydown(e) {
switch (e.keyCode) {
case 37:
case 65:
this._inputs.left = true;
break;
case 40:
case 83:
this._inputs.down = true;
break;
case 38:
case 87:
this._inputs.up = true;
break;
case 39:
case 68:
this._inputs.right = true;
break;
case 1:
case 32:
this._gamepad.leftMouse = true;
break;
case 3:
case 16:
this._gamepad.rightMouse = true;
break;
}
this.onkeyDown && this.onkeyDown(e.keyCode);
}
_onkeyup(e) {
switch (e.keyCode) {
case 37:
case 65:
this._inputs.left = false;
break;
case 40:
case 83:
this._inputs.down = false;
break;
case 38:
case 87:
this._inputs.up = false;
break;
case 39:
case 68:
this._inputs.right = false;
break;
case 1:
case 32:
this._gamepad.leftMouse = false;
break;
case 3:
case 16:
this._gamepad.rightMouse = false;
break;
}
this.onkeyUp && this.onkeyUp(e.keyCode);
}
}
class MultiboxStorage {
/*
* items in storage:
* position: [x, y, x_previous, y_previous]
* mouse: [x,y]
* mutex: boolean
* multibox: boolean
* keyDown: Number
* keyUp: Number
* clumpMode: String
* inputs: [left, down, up, right]
*/
constructor() {
//if the user launches this script for the first time
try {
this.position;
this.mouse;
this.multibox;
this.mutex;
this.keyDown;
this.keyUp;
this.clumpMode;
this.inputs;
} catch (err) {
console.log('DiepBox Error: MultiboxStorage needs to be initialized');
this.reset();
}
}
set position(position) {
GM_setValue('position', [position.x, position.y, position.x_previous, position.y_previous]);
}
set mouse(mouse) {
GM_setValue('mouse', [mouse.x, mouse.y]);
}
set mutex(mutex) {
GM_setValue('mutex', mutex ? 1 : 0);
}
set multibox(multibox) {
GM_setValue('multibox', multibox ? 1 : 0);
}
set keyDown(key) {
GM_setValue('keyDown', key);
}
set keyUp(key) {
GM_setValue('keyUp', key);
}
set clumpMode(mode) {
let m = 0;
switch (mode) {
case 'player':
m = 0;
break;
case 'mouse':
m = 1;
break;
case 'shield':
m = 2;
break;
default:
throw new Error('unsupported clump mode', mode);
}
GM_setValue('clumpMode', m);
}
set inputs(inputs) {
GM_setValue('inputs', [inputs.left, inputs.down, inputs.up, inputs.right]);
}
get position() {
const position = GM_getValue('position');
return {
x: position[0],
y: position[1],
x_previous: position[2],
y_previous: position[3],
};
}
get mouse() {
const mouse = GM_getValue('mouse');
return {
x: mouse[0],
y: mouse[1],
};
}
get mutex() {
const mutex = GM_getValue('mutex');
return mutex === 1 ? true : false;
}
get multibox() {
const multibox = GM_getValue('multibox');
return multibox === 1 ? true : false;
}
get keyDown() {
return GM_getValue('keyDown');
}
get keyUp() {
return GM_getValue('keyUp');
}
get clumpMode() {
const m = GM_getValue('clumpMode');
let mode = '';
switch (m) {
case 0:
mode = 'player';
break;
case 1:
mode = 'mouse';
break;
case 2:
mode = 'shield';
break;
default:
throw new Error('unsupported clump mode', m);
}
return mode;
}
get inputs() {
const inputs = GM_getValue('inputs');
return {
left: inputs[0],
down: inputs[1],
up: inputs[2],
right: inputs[3],
};
}
reset() {
this.position = { x: 0, y: 0, x_previous: 0, y_previous: 0 };
this.mouse = { x: 0, y: 0 };
this.mutex = false;
this.multibox = false;
this.keyDown = -1;
this.keyUp = -1;
this.clumpMode = 'player';
this.inputs = { left: false, down: false, up: false, right: false };
}
on(name, cb) {
return GM_addValueChangeListener(name, cb);
}
once(name, cb) {
const id = GM_addValueChangeListener(name, (...args) => {
cb(...args);
this.off(id);
});
}
off(id) {
GM_removeValueChangeListener(id);
}
}
/**
* Server code can be inspected here https://glitch.com/edit/#!/diepbox-chat
*/
class Chat {
constructor(player) {
this._player = player;
this._chatmode = false;
this._input = '';
this._socket;
this._messages = [];
this._inputBox = document.body.appendChild(document.createElement('div'));
this._inputBox.style.display = 'none';
this._hookonkeydown();
this._hookAnimationFrame();
if (this._player.ondead) throw new Error('on dead listener is already taken. implement Event interface.');
this._player.ondead = () => {
this._closechat();
};
//this._connect();
}
_connect() {
//this._socket = new WebSocket('wss://diepbox-chat.glitch.me');
//this._socket.binaryType = 'arraybuffer';
//this._socket.onmessage = (e) => this._onmessage(e);
//this._socket.onclose = () => setTimeout(() => this._connect(), 100);
}
_send(message) {
const position = this._player.position;
const packet = {
pos: {
x: position.x,
y: position.y,
},
m: message,
};
this._socket.send(new TextEncoder().encode(JSON.stringify(packet)));
}
_onmessage(e) {
const message = JSON.parse(new TextDecoder().decode(e.data));
// message = {
// pos: { x, y},
// m: string,
// ... maybe more
// }
this._messages.push({
timestamp: Date.now(),
body: document.body.appendChild(document.createElement('div')),
...message,
});
}
_openchat() {
this._chatmode = true;
this._inputBox.innerText = this._input;
this._inputBox.style.display = 'block';
}
_closechat() {
this._chatmode = false;
this._inputBox.style.display = 'none';
this._send(this._input);
this._input = '';
}
_onkeydown(e) {
let preventDefault = false;
if (player.dead || !player.isMaster) return;
//activate chat mode when user presses enter
if (!this._chatmode && e.keyCode === 13) {
//this._openchat();
return preventDefault;
}
//deactivate when user presses Enter
if (this._chatmode && e.keyCode == 13) {
this._closechat();
return preventDefault;
}
//save input
if (this._chatmode && e.keyCode >= 32 && e.keyCode <= 126) {
this._input += e.key;
}
//backspace
if (this._chatmode && e.keyCode === 8) {
this._input = this._input.slice(0, -1);
}
if (this._chatmode) {
this._inputBox.innerText = this._input;
preventDefault = true;
e.preventDefault();
}
return preventDefault;
}
_hookonkeydown() {
const _this = this;
unsafeWindow.onkeydown = new Proxy(unsafeWindow.onkeydown, {
apply(target, thisArg, args) {
if (!_this._onkeydown.apply(_this, args)) target.apply(thisArg, args);
},
});
}
_hookAnimationFrame() {
const _this = this;
unsafeWindow.requestAnimationFrame = new Proxy(unsafeWindow.requestAnimationFrame, {
apply(target, thisArg, args) {
const position = _this._player.position;
const screenPos = _this._player.toScreenPos(position.x - _this._inputBox.innerText.length * 6.5, position.y - 140);
_this._inputBox.style.position = 'absolute';
_this._inputBox.style.zIndex = '99999';
_this._inputBox.style.left = `${screenPos.x}px`;
_this._inputBox.style.top = `${screenPos.y}px`;
_this._inputBox.style['font-family'] = 'Ubuntu';
_this._inputBox.style.color = '#fff';
_this._inputBox.style['font-size'] = '1em';
_this._inputBox.style['text-shadow'] = '-.1em -.1em 0 #000,0 -.1em 0 #000,.1em -.1em 0 #000,.1em 0 0 #000,.1em 0.1em 0 #000,0 0.1em 0 #000,-.1em 0.1em 0 #000,-.1em 0 0 #000';
//remove messages that are older than 10 seconds
_this._messages = _this._messages.filter((x) => {
if (Date.now() - x.timestamp > 10000) {
x.body.parentNode.removeChild(x.body);
return false;
}
return true;
});
//place each message on screen
_this._messages.forEach((x) => {
const screenPos = _this._player.toScreenPos(x.pos.x - x.m.length * 6.5, x.pos.y - 140);
x.body.style.display = 'block';
x.body.style.position = 'absolute';
x.body.style.zIndex = '99999';
x.body.style.left = `${screenPos.x}px`;
x.body.style.top = `${screenPos.y}px`;
x.body.style['font-family'] = 'Ubuntu';
x.body.style.color = '#fff';
x.body.style['font-size'] = '1em';
x.body.style['text-shadow'] = '-.1em -.1em 0 #000,0 -.1em 0 #000,.1em -.1em 0 #000,.1em 0 0 #000,.1em 0.1em 0 #000,0 0.1em 0 #000,-.1em 0.1em 0 #000,-.1em 0 0 #000';
x.body.innerText = x.m;
});
return target.apply(thisArg, args);
},
});
}
}
/*
* D E B U G G E R
*/
const DEBUG = false;
const debugger_mouse = document.body.appendChild(document.createElement('div'));
function DEBUG_MousePosition(x, y, info = '') {
if (!DEBUG) return;
debugger_mouse.style.pointerEvents = 'none';
debugger_mouse.style.position = 'absolute';
debugger_mouse.style.zIndex = '99999';
debugger_mouse.style.left = `${x - 5}px`;
debugger_mouse.style.top = `${y - 2}px`;
debugger_mouse.innerText = '👆 ' + info;
}
const debugger_pos = document.body.appendChild(document.createElement('div'));
const debugger_pos_prediction = document.body.appendChild(document.createElement('div'));
function DEBUG_PlayerPosition(x = -100, y = -100, x_prediction = -100, y_prediction = -100, info = '') {
if (!DEBUG) return;
debugger_pos.style.pointerEvents = 'none';
debugger_pos.style.position = 'absolute';
debugger_pos.style.zIndex = '99999';
debugger_pos.style.left = `${x - 11}px`;
debugger_pos.style.top = `${y - 12}px`;
debugger_pos.innerText = '🟢 ' + info;
debugger_pos_prediction.style.pointerEvents = 'none';
debugger_pos_prediction.style.position = 'absolute';
debugger_pos_prediction.style.zIndex = '99999';
debugger_pos_prediction.style.left = `${x_prediction - 11}px`;
debugger_pos_prediction.style.top = `${y_prediction - 12}px`;
debugger_pos_prediction.innerText = '🔵';
}
/*
* H E L P E R F U N C T I O N S
*/
function onbtnMultibox() {
this.active = !this.active;
if (this.active) {
storage.multibox = true;
this.innerHTML = 'Multiboxing: ON';
} else {
storage.multibox = false;
this.innerHTML = 'Multiboxing: OFF';
}
}
function onbtnAfk() {
this.active = !this.active;
if (this.active) {
player.useGamepad = true;
this.position = player.position;
this.mouse = player.mouse;
this.innerHTML = 'AFK: ON';
} else {
player.useGamepad = false;
this.innerHTML = 'AFK: OFF';
}
}
function onbtnToggleClump() {
this.mode = this.mode || 0;
this.mode = (this.mode + 1) % 3;
switch (this.mode) {
case 0:
storage.clumpMode = 'player';
this.innerHTML = 'Clump: Player';
break;
case 1:
storage.clumpMode = 'mouse';
this.innerHTML = 'Clump: Mouse';
break;
case 2:
storage.clumpMode = 'shield';
this.innerHTML = 'Clump: Shield';
break;
}
}
function onbtnRepelNecro() {
this.active = !this.active;
if (this.active) {
let repelTime = 25 * 1000;
this.repelInterval = setInterval(() => {
player.keyDown(3);
setTimeout(() => player.keyUp(3), repelTime);
}, 2 * repelTime + 1300);
this.innerHTML = 'Repel Necro: ON';
} else {
clearInterval(this.repelInterval);
player.keyUp(3);
this.innerHTML = 'Repel Necro: OFF';
}
}
function onbtnRepelOverlord() {
this.active = !this.active;
if (this.active) {
let repelTime = 60 * 1000;
player.keyDown(3);
this.repelInterval = setInterval(() => {
player.keyUp(3);
setTimeout(() => player.keyDown(3), 3000);
}, repelTime);
this.innerHTML = 'Repel Overlord: ON';
} else {
clearInterval(this.repelInterval);
player.keyUp(3);
this.innerHTML = 'Repel Overlord: OFF';
}
}
function onbtnDiscord() {
window.open('https://discord.gg/5q2E3Sx');
}
function drawZones() {
if (player.dead) return;
ctx.save();
ctx.globalAlpha = 0.08;
if (player.gamemode === '4teams') {
let center;
let radius;
//blue
center = player.toScreenPos(-11150 + 1675, -11150 + 1675);
radius = player.toScreenPos(-11150 + 1675, -11150 + 1675 + 5250).y - center.y;
ctx.fillStyle = '#006480';
ctx.beginPath();
ctx.arc(center.x, center.y, radius, 0, 2 * Math.PI);
ctx.fill();
radius = player.toScreenPos(-11150 + 1675, -11150 + 1675 + 3800).y - center.y;
ctx.fillStyle = '#ff6480';
ctx.beginPath();
ctx.arc(center.x, center.y, radius, 0, 2 * Math.PI);
ctx.fill();
//purple
center = player.toScreenPos(11150 - 1675, -11150 + 1675);
radius = player.toScreenPos(11150 - 1675, -11150 + 1675 + 5250).y - center.y;
ctx.fillStyle = '#644280';
ctx.beginPath();
ctx.arc(center.x, center.y, radius, 0, 2 * Math.PI);
ctx.fill();
radius = player.toScreenPos(-11150 + 1675, -11150 + 1675 + 3800).y - center.y;
ctx.fillStyle = '#ff4280';
ctx.beginPath();
ctx.arc(center.x, center.y, radius, 0, 2 * Math.PI);
ctx.fill();
//green
center = player.toScreenPos(-11150 + 1675, 11150 - 1675);
radius = player.toScreenPos(-11150 + 1675, 11150 - 1675 + 5250).y - center.y;
ctx.fillStyle = '#00803e';
ctx.beginPath();
ctx.arc(center.x, center.y, radius, 0, 2 * Math.PI);
ctx.fill();
radius = player.toScreenPos(-11150 + 1675, 11150 - 1675 + 3800).y - center.y;
ctx.fillStyle = '#ff803e';
ctx.beginPath();
ctx.arc(center.x, center.y, radius, 0, 2 * Math.PI);
ctx.fill();
//red
center = player.toScreenPos(11150 - 1675, 11150 - 1675);
radius = player.toScreenPos(11150 - 1675, 11150 - 1675 + 5250).y - center.y;
ctx.fillStyle = '#963033';
ctx.beginPath();
ctx.arc(center.x, center.y, radius, 0, 2 * Math.PI);
ctx.fill();
radius = player.toScreenPos(11150 - 1675, 11150 - 1675 + 3800).y - center.y;
ctx.fillStyle = '#ff3033';
ctx.beginPath();
ctx.arc(center.x, center.y, radius, 0, 2 * Math.PI);
ctx.fill();
} else if (player.gamemode === 'teams') {
let coords1;
let coords2;
//blue
coords1 = player.toScreenPos(-11150, -11150);
coords2 = player.toScreenPos(-11150 + 5500, 11150);
ctx.fillStyle = '#006480';
ctx.fillRect(coords1.x, coords1.y, coords2.x - coords1.x, coords2.y - coords1.y);
coords2 = player.toScreenPos(-11150 + 4150, 11150);
ctx.fillStyle = '#ff6480';
ctx.fillRect(coords1.x, coords1.y, coords2.x - coords1.x, coords2.y - coords1.y);
//red
coords1 = player.toScreenPos(11150, -11150);
coords2 = player.toScreenPos(11150 - 5500, 11150);
ctx.fillStyle = '#963033';
ctx.fillRect(coords1.x, coords1.y, coords2.x - coords1.x, coords2.y - coords1.y);
coords2 = player.toScreenPos(11150 - 4150, 11150);
ctx.fillStyle = '#ff3033';
ctx.fillRect(coords1.x, coords1.y, coords2.x - coords1.x, coords2.y - coords1.y);
}
//pentagon nest
let coords1;
let coords2;
coords1 = player.toScreenPos(-1500, -1500);
coords2 = player.toScreenPos(1500, 1500);
ctx.fillStyle = '#8aff69';
ctx.fillRect(coords1.x, coords1.y, coords2.x - coords1.x, coords2.y - coords1.y);
ctx.restore();
}
function smallBoi() {
player.isMaster = false;
player.useGamepad = storage.multibox;
const multiboxListener = storage.on('multibox', (name, old_value, new_value, remote) => {
player.useGamepad = new_value;
});
const keyDownListener = storage.on('keyDown', (name, old_value, new_value, remote) => {
if ([-1, 65, 83, 87, 68, 37, 40, 38, 39].includes(new_value)) return;
if (DEBUG) console.log('master keyDown', new_value);
if (storage.multibox) {
if ([1, 32].includes(new_value)) player._gamepad.leftMouse = true;
else if ([3, 16].includes(new_value)) player._gamepad.rightMouse = true;
player.keyDown(new_value);
}
});
const keyUpListener = storage.on('keyUp', (name, old_value, new_value, remote) => {
if ([-1, 65, 83, 87, 68, 37, 40, 38, 39].includes(new_value)) return;
if (DEBUG) console.log('master keyUp', new_value);
if (storage.multibox) {
if ([1, 32].includes(new_value)) player._gamepad.leftMouse = false;
else if ([3, 16].includes(new_value)) player._gamepad.rightMouse = false;
player.keyUp(new_value);
}
});
btnForceMaster = gui.addButton('Unlock this tab', () => {
storage.reset();
storage.off(multiboxListener);
storage.off(keyDownListener);
storage.off(keyUpListener);
gui.reset();
bigBoi();
});
}
function bigBoi() {
player.isMaster = true;
storage.mutex = true;
storage.clumpMode = 'player';
storage.once('mutex', (name, old_value, new_value, remote) => {
if (!new_value) {
gui.reset();
smallBoi();
}
});
btnMultibox = gui.addButton('Multiboxing: OFF', onbtnMultibox, 'KeyF');
btnAfk = gui.addButton('AFK: OFF', onbtnAfk, 'KeyQ');
btnToggleClump = gui.addButton('Clump: Player', onbtnToggleClump);
btnRepelNecro = gui.addButton('Repel Necro: OFF', onbtnRepelNecro);
btnRepelNecro = gui.addButton('Repel Overlord: OFF', onbtnRepelOverlord);
btnDiscord = gui.addButton('Discord', onbtnDiscord);
}
function mainLoop() {
if (!unsafeWindow.input) return;
if (player.isMaster) {
storage.position = player.position;
storage.inputs = player.inputs;
if (!btnAfk.active) storage.mouse = player.mouse;
if (btnAfk.active) {
if (Vector.distance(btnAfk.position, player.position) > 50) {
player.moveTo(btnAfk.position.x, btnAfk.position.y);
} else {
player.moveTo(player.position.x, player.position.y);
}
player.lookAt(btnAfk.mouse.x, btnAfk.mouse.y);
}
} else {
const clumpMode = storage.clumpMode;
const mouse = storage.mouse;
let position;
let bestPosition;
if (clumpMode === 'player') {
position = storage.position;
bestPosition = player.findBestPos(position, storage.inputs);
} else if (clumpMode === 'mouse') {
position = mouse;
bestPosition = position;
} else if (clumpMode === 'shield') {
position = Vector.add(storage.position, Vector.scale(200, Vector.normalize(Vector.subtract(mouse, storage.position))));
bestPosition = position;
} else {
throw new Error('Unsupported clumpMode', clumpMode);
}
if (storage.multibox) {
player.moveTo(bestPosition.x, bestPosition.y);
player.lookAt(mouse.x, mouse.y);
}
//Debugging
const mouseScreen = player.toScreenPos(mouse.x, mouse.y);
DEBUG_MousePosition(mouseScreen.x, mouseScreen.y, `(${mouse.x}, ${mouse.y})`);
const playerScreen = player.toScreenPos(position.x, position.y);
const bestPositionScreen = player.toScreenPos(bestPosition.x, bestPosition.y);
DEBUG_PlayerPosition(playerScreen.x, playerScreen.y, bestPositionScreen.x, bestPositionScreen.y, `(${bestPosition.x}, ${bestPosition.y})`);
//prank
//if(!unsafeWindow.localStorage.name.startsWith('DT ')) unsafeWindow.localStorage.name = `DT ${unsafeWindow.localStorage.name}`;
}
}
/*
* M A I N
*/
const gui = new Gui('DiepBox by Cazka');
const player = new Player();
const storage = new MultiboxStorage();
const chat = new Chat(player);
let btnForceMaster;
let btnMultibox;
let btnToggleClump;
let btnAfk;
let btnRepelNecro;
let btnRepelOverlord;
let btnDiscord;
if (storage.mutex) smallBoi();
else bigBoi();
unsafeWindow.addEventListener('unload', () => {
if (player.isMaster) {
storage.reset();
}
});
player.onkeyDown = (key) => {
if (player.isMaster && !chat._chatmode) {
storage.keyDown = key;
storage.keyDown = -1;
}
};
player.onkeyUp = (key) => {
if (player.isMaster) {
storage.keyUp = key;
storage.keyUp = -1;
}
};
//setup canvas
const ctx = document.getElementById('canvas').getContext('2d');
// run main Loop
unsafeWindow.requestAnimationFrame = new Proxy(unsafeWindow.requestAnimationFrame, {
apply: function (target, thisArg, args) {
mainLoop();
drawZones();
return target.apply(thisArg, args);
},
});
});
function executePredatorStack() {
(async () => {
// BEGIN CONFIGURATION/OPTIONS
const REL = 6; // how much rel is in your build (5, 6, or 7 only rn)
const KEY_CODE = 'KeyJ'; // adjustable
// END CONFIGURATION/OPTIONS
let sleep = (t) => new Promise(r=>setTimeout(r,t))
// fire func
async function fire(t=70, z=1) {
unsafeWindow.input.keyDown(z);
await sleep(t);
unsafeWindow.input.keyUp(z);
}
async function stack(rel=5) {
if (rel === 7) {
await fire();
await sleep(700);
await fire(200);
await sleep(550);
await fire(400)
} else if (rel === 6) {
await fire(80);
await sleep(750);
await fire(300);
await sleep(550);
await fire(450)
} else { // default 5
await fire(100);
await sleep(850);
await fire(400);
await sleep(550);
await fire(500)
}
}
window.addEventListener('keyup', async (key) => {
if (key.code === KEY_CODE) {
await stack(REL);
fire(69, 69)
}
})
})();
};
function executeBanRedirect() {
void async function() {
const dataStore = (() => {
let cachedStorage = {};
const load = () => {
// Load up JSON data stored as a string in the GM Values
let storage = {};
try {
cachedStorage = storage = JSON.parse(GM_getValue('storage'));
} catch(err) {
GM_setValue('storage', '{}');
}
return storage
}
const store = (data) => {
// Store JSON data translated to a string into the GM Values
try {
cachedStorage = data;
GM_setValue('storage', JSON.stringify(data));
} catch(err) {
console.warn('Error in storing data', err);
GM_setValue('storage', '{}');
}
}
const getter = (obj, prop) => {
// Fetch a property from storage
// const storage = load(); - now using cached
return cachedStorage[prop];
}
const setter = (obj, prop, val) => {
// Set a property in storage
cachedStorage[prop] = val;
store(cachedStorage);
return val;
}
load();
return new Proxy({}, {get: getter, set: setter})
})();
const BUILD = (/(?!build_)[0-9a-f]{40}(?=\.wasm\.js)/).exec(unsafeWindow.document.body.innerHTML)
const m28SocketRegex = /^(wss:\/\/)(.{4,5})(?=\.s\.m28n\.net)/
if (BUILD !== dataStore.build) {
// new build = reset ban list
dataStore.banList = []
dataStore.build = BUILD;
}
while (!unsafeWindow.m28n) await new Promise(r=>setTimeout(r,100)); // should be loaded by now - but just incase
// clone and proxy
unsafeWindow.m28n._findServerPreference = unsafeWindow.m28n.findServerPreference
unsafeWindow.m28n.findServerPreference = function(endpoint, options, cb) {
if(typeof options == 'function') {
cb = options;
options = {};
}
this._findServerPreference(endpoint, options, (err, res) => {
if (err) return cb(err)
// exclude banned ids
cb(null, res.filter(({id}) => !dataStore.banList.includes(id)));
})
}
unsafeWindow.WebSocket = class extends unsafeWindow.WebSocket {
constructor(ip) {
super(ip)
// If its an M28 socket, check if it gets errors - if so, add to banList until next update
if(m28SocketRegex.test(ip)) {
const sid = m28SocketRegex.exec(this.url)[2] // group 1
this.addEventListener('error', () => {
if (this.readyState !== WebSocket.CLOSED) return;
dataStore.banList = dataStore.banList.concat(sid);
});
}
}
}
}();
};
function executeRandomDirection() {
const FULL_TURN = Math.PI*2;
void new class RandomMouseModule {
constructor(ABC_OP=true) {
// for storing real mouse pos
this.trueView = [0, 0];
this._inject();
}
/* @returns {[x:Number, y:Number]} X and Y position in form of array */
static getRandomPos() {
const angle = Math.random() * FULL_TURN;
return [Math.cos(angle)*100+(window.innerWidth/2)*window.devicePixelRatio, Math.sin(angle)*100+(window.innerHeight/2)*window.devicePixelRatio];
}
// hijack input.keyDown, input.mouse, and input.keyUp
async _inject() {
while (!unsafeWindow.input || !unsafeWindow.input.keyDown) await new Promise(r=>setTimeout(r,200));
unsafeWindow.input._mouse = unsafeWindow.input.mouse;
unsafeWindow.input.mouse = (x,y) => {
this.trueView = [x,y];
if (!unsafeWindow.input.should_prevent_unload()) this.autofire = this.shooting = false;
if (unsafeWindow.input.should_prevent_unload() && !this.autofire && !this.shooting) {
unsafeWindow.input._mouse(...RandomMouseModule.getRandomPos());
} else unsafeWindow.input._mouse(x,y);
}
unsafeWindow.input._keyDown = unsafeWindow.input.keyDown;
unsafeWindow.input.keyDown = (code) => {
if (!unsafeWindow.input.should_prevent_unload()) return unsafeWindow.input._keyDown(code);
if (code === 69) this.autofire = !this.autofire;
if (code === 1 || code === 32) this.shooting = true;
if (code === 1 || code === 32 || code === 69) {
unsafeWindow.input._mouse(...this.trueView);
}
return unsafeWindow.input._keyDown(code);
}
unsafeWindow.input._keyUp = unsafeWindow.input.keyUp;
unsafeWindow.input.keyUp = (code) => {
if (!unsafeWindow.input.should_prevent_unload()) return unsafeWindow.input._keyUp(code);
if (code === 1 || code === 32) this.shooting = false;
if (code === 1 || code === 32 || code === 69) {
unsafeWindow.input._mouse(...this.trueView);
}
return unsafeWindow.input._keyUp(code);
}
// just make it go auto
setInterval(() => unsafeWindow.input.mouse(...this.trueView), 100)
}
}();
};
function executeFollowMouse() {
let mouse = {
x: 0,
y: 0,
down: false,
shift: false
}
window.addEventListener('mousemove', (moose) => {
mouse.x = moose.clientX-window.innerWidth/2;
mouse.y = moose.clientY-window.innerHeight/2;
});
window.addEventListener('mousedown', (moose) => {
mouse.x = moose.clientX-window.innerWidth/2;
mouse.y = moose.clientY-window.innerHeight/2;
mouse.down = true;
});
window.addEventListener('mouseup', (moose) => {
mouse.x = moose.clientX-window.innerWidth/2;
mouse.y = moose.clientY-window.innerHeight/2;
mouse.down = false;
});
window.addEventListener('keydown', (key) => {
if (key.code === 'Shift') {
mouse.shift = true
}
});
window.addEventListener('keyup', (key) => {
if (key.code === 'Shift') {
mouse.shift = false
}
});
class ArtificialGamepad extends EventTarget /* not needed */ {
constructor() {
super();
}
get mapping() {
return "standard";
}
set mapping(v) {
throw new RangeError('No');
}
get axes() {
return [
mouse.x/(window.innerWidth/3), // move x %
mouse.y/(window.innerHeight/3), // move y %
mouse.x/(window.innerWidth), // look x %
mouse.y/(window.innerHeight), // look y %
]
}
set axes(v) {
throw new RangeError('No');
}
get buttons() {
return [
{pressed: false}, // not
{pressed: false}, // really
{pressed: false}, // useful
{pressed: false}, // we can
{pressed: false}, // just ignore these
{pressed: mouse.shift},
{pressed: false},
{pressed: mouse.down}
]
}
set buttons(v) {
throw new RangeError('No');
}
}
navigator.getGamepads = () => {
return [new ArtificialGamepad()]
}
};
function executeAntiAntiafk() {
function keyPress(key, upDown) {
var eventObj;
if (upDown == true) {
eventObj = document.createEvent("Events");
eventObj.initEvent("keydown", true, true);
eventObj.keyCode = key;
window.dispatchEvent(eventObj);
}
if(upDown == false) {
eventObj = document.createEvent("Events");
eventObj.initEvent("keyup", true, true);
eventObj.keyCode = key;
window.dispatchEvent(eventObj);
}
}
var overlay = document.createElement("div");
document.body.appendChild(overlay);
var toggler = "OFF";
setInterval( () => {
var overlayHTML = `