Diep.io Multiboxing

diep.io multiboxing
// ==UserScript==
// @name DiepBox
// @description Diep.io Multibox Extension
// @version 1.2
// @author u/BE1A (reddit)
// @include http://diep.io/*
// @include https://diep.io/*
// @connect diep.io
// @grant GM_getValue
// @grant GM_setValue
// @run-at document-start
diep.io multiboxing here diep.io multiboxing
// ==/UserScript==

var isFocused = 0;
var holdingKey = {};
var holdingMouse = {};
var screenWidth = 0;
var screenHeight = 0;

var const_SC = getScreenConstant();

diep.io multiboxing read more diep.io multiboxing
document.addEventListener(‘keyup’, function(e)
{
var key = e.keyCode || e.which;
if(e.shiftKey)
{
return;
}
GM_setValue(“GM_Diep_Key”+key, 0);
holdingKey[key] = false;
});
diep.io multiboxing here diep.io multiboxing

document.addEventListener(‘keydown’, function(e)
{
var key = e.keyCode || e.which;
if(e.shiftKey)
{
return;
}
if(holdingKey[key]) { e.stopPropagation(); return; }
GM_setValue(“GM_Diep_Key”+key, 1);
diep.io multiboxing read more diep.io multiboxing
holdingKey[key] = true;
});

document.addEventListener(‘mousedown’, function(e)
{
var button = e.button;
holdingMouse[button] = true;
GM_setValue(“GM_Diep_Mouse”+button, 1);
GM_setValue(“GM_Diep_Mouse”+button, 1);
});
diep.io multiboxing more info diep.io multiboxing

document.addEventListener(‘mouseup’, function(e)
{
var button = e.button;
holdingMouse[button] = false;
GM_setValue(“GM_Diep_Mouse”+button, 0);
GM_setValue(“GM_Diep_Mouse”+button, 0);
});

document.addEventListener(‘mousemove’, function(e)
diep.io multiboxing get more info diep.io multiboxing
{
GM_setValue(“GM_Diep_MouseX”, e.clientX / window.innerWidth);
GM_setValue(“GM_Diep_MouseY”, e.clientY / window.innerHeight);
GM_setValue(“GM_Diep_MouseRelX”, e.clientX – (window.innerWidth / 2));
GM_setValue(“GM_Diep_MouseRelY”, e.clientY – (window.innerHeight / 2));
});

function GetCoordClamp(mouseX, mouseY)
{
var ret = {};
diep.io multiboxing more info diep.io multiboxing
var hsx = window.innerWidth / 2;
var hsy = window.innerHeight / 2;
var amx = mouseX – hsx;
var amy = mouseY – hsy;

var dc = 0.96;
if((amx > -hsx * dc) && (amx -hsy * dc) && (amy < hsy * dc))
{
ret[0] = mouseX;
ret[1] = mouseY;
diep.io multiboxing click here diep.io multiboxing
return ret;
}
else
{
var fA = (amx * hsy) – (amy * hsx);
var fB = (amx * hsy) + (amy * hsx);
if(fA > 0)
{
if(fB > 0)
{
diep.io multiboxing get more info diep.io multiboxing
amy = amy * (hsx * dc / amx);
amx = hsx * dc;
}
else
{
amx = amx * (-hsy * dc / amy);
amy = -hsy * dc;
}
}
else
diep.io multiboxing check here diep.io multiboxing
{
if(fB > 0)
{
amx = amx * (hsy * dc / amy);
amy = hsy * dc;
}
else
{
amy = amy * (-hsx * dc / amx);
amx = -hsx * dc;
diep.io multiboxing more info diep.io multiboxing
}
}
ret[0] = amx + hsx;
ret[1] = amy + hsy;
}
return ret;
}

function SyncMouse()
{
diep.io multiboxing read more diep.io multiboxing
var cX = GM_getValue(“GM_Diep_MouseX”) * window.innerWidth;
var cY = GM_getValue(“GM_Diep_MouseY”) * window.innerHeight;
var dX = GM_getValue(“GM_Diep_MouseRelX”);
var dY = GM_getValue(“GM_Diep_MouseRelY”);
var button0 = GM_getValue(“GM_Diep_Mouse0”);
var button1 = GM_getValue(“GM_Diep_Mouse1”);
var button2 = GM_getValue(“GM_Diep_Mouse2”);

var clamped = GetCoordClamp(dX + innerWidth / 2, dY + innerHeight / 2);
if(!(typeof canvas === ‘undefined’))
diep.io multiboxing click here diep.io multiboxing
{
canvas.dispatchEvent(new MouseEvent(‘mousemove’, { ‘clientX’: clamped[0], ‘clientY’: clamped[1] }));
}
if(holdingMouse[0] != button0)
{
holdingMouse[0] = button0;
simulateMousePress(0, cX, cY, button0);
}

if(holdingMouse[1] != button1)
diep.io multiboxing click here diep.io multiboxing
{
holdingMouse[1] = button1;
simulateMousePress(1, cX, cY, button1);
}

if(holdingMouse[2] != button2)
{
holdingMouse[2] = button2;
simulateMousePress(2, cX, cY, button2);
}
diep.io multiboxing website diep.io multiboxing
}

function SyncKeys()
{
var left = GM_getValue(“GM_Diep_Key37”);
var up = GM_getValue(“GM_Diep_Key38”);
var right = GM_getValue(“GM_Diep_Key39”);
var down = GM_getValue(“GM_Diep_Key40”);

var num_1 = GM_getValue(“GM_Diep_Key49”);
diep.io multiboxing check here diep.io multiboxing
var num_2 = GM_getValue(“GM_Diep_Key50”);
var num_3 = GM_getValue(“GM_Diep_Key51”);
var num_4 = GM_getValue(“GM_Diep_Key52”);
var num_5 = GM_getValue(“GM_Diep_Key53”);
var num_6 = GM_getValue(“GM_Diep_Key54”);
var num_7 = GM_getValue(“GM_Diep_Key55”);
var num_8 = GM_getValue(“GM_Diep_Key56”);

for(i = 65; i <= 90; i++)
{
diep.io multiboxing website diep.io multiboxing
var keyCheck = GM_getValue(“GM_Diep_Key” + i);
if(holdingKey[i] != keyCheck)
{
holdingKey[i] = keyCheck;
simulateKeyPress(i, keyCheck);
}
}

var shift = GM_getValue(“GM_Diep_Key16”);
var enter = GM_getValue(“GM_Diep_Key13”);
diep.io multiboxing website diep.io multiboxing

if(holdingKey[37] != left)
{
holdingKey[37] = left;
simulateKeyPress(37, left);
}
if(holdingKey[38] != up)
{
holdingKey[38] = up;
simulateKeyPress(38, up);
diep.io multiboxing read more diep.io multiboxing
}
if(holdingKey[39] != right)
{
holdingKey[39] = right;
simulateKeyPress(39, right);
}
if(holdingKey[40] != down)
{
holdingKey[40] = down;
simulateKeyPress(40, down);
diep.io multiboxing read more diep.io multiboxing
}

if(holdingKey[49] != num_1)
{
holdingKey[49] = num_1;
simulateKeyPress(49, num_1);
}
if(holdingKey[50] != num_2)
{
holdingKey[50] = num_2;
diep.io multiboxing check here diep.io multiboxing
simulateKeyPress(50, num_2);
}
if(holdingKey[51] != num_3)
{
holdingKey[51] = num_3;
simulateKeyPress(51, num_3);
}
if(holdingKey[52] != num_4)
{
holdingKey[52] = num_4;
diep.io multiboxing more info diep.io multiboxing
simulateKeyPress(52, num_4);
}
if(holdingKey[53] != num_5)
{
holdingKey[53] = num_5;
simulateKeyPress(53, num_5);
}
if(holdingKey[54] != num_6)
{
holdingKey[54] = num_6;
diep.io multiboxing website diep.io multiboxing
simulateKeyPress(54, num_6);
}
if(holdingKey[55] != num_7)
{
holdingKey[55] = num_7;
simulateKeyPress(55, num_7);
}
if(holdingKey[56] != num_8)
{
holdingKey[56] = num_8;
diep.io multiboxing check here diep.io multiboxing
simulateKeyPress(56, num_8);
}

if(holdingKey[16] != shift)
{
holdingKey[16] = shift;
simulateKeyPress(16, shift);
}
if(holdingKey[13] != enter)
{
diep.io multiboxing read more diep.io multiboxing
holdingKey[13] = enter;
simulateKeyPress(13, enter);
}
}

function simulateKeyPress(key, hold)
{
var eventObj;
if(hold)
{
diep.io multiboxing get more info diep.io multiboxing
eventObj = document.createEvent(“Events”); eventObj.initEvent(“keydown”, true, true); eventObj.keyCode = key; window.dispatchEvent(eventObj);
}
else
{
eventObj = document.createEvent(“Events”); eventObj.initEvent(“keyup”, true, true); eventObj.keyCode = key; window.dispatchEvent(eventObj);
}
}

function simulateMousePress(button, clientX, clientY, press)
{
diep.io multiboxing get more info diep.io multiboxing
var eventObj;
if(press)
{
if(!(typeof canvas === ‘undefined’))
{
canvas.dispatchEvent(new MouseEvent(‘mousedown’, { ‘clientX’: clientX, ‘clientY’: clientY, ‘button’: button, ‘mozPressure’ : 1.0 }));
}
}
else
{
diep.io multiboxing here diep.io multiboxing
if(!(typeof canvas === ‘undefined’))
{
canvas.dispatchEvent(new MouseEvent(‘mouseup’, { ‘clientX’: clientX, ‘clientY’: clientY, ‘button’: button, ‘mozPressure’ : 1.0 }));
}
}
}

function getScreenConstant()
{
if(window.innerWidth > window.innerHeight * 16 / 9)
diep.io multiboxing click here diep.io multiboxing
{
return window.innerWidth;
}
return window.innerHeight * 16 / 9;
}

function calculateScreenConstant(x, y)
{
if(x > y * 16 / 9)
{
diep.io multiboxing click here diep.io multiboxing
return x;
}
return y * 16 / 9;
}

function Sync()
{
const_SC = getScreenConstant();
isFocused = document.hasFocus();

diep.io multiboxing here diep.io multiboxing
screenWidth = window.innerWidth;
screenHeight = window.innerHeight;

SyncKeys();
SyncMouse();
setTimeout(Sync, 10);
}
setTimeout(Sync, 10);
diep.io multiboxing

Tags: diep.io multiboxing, www bcfakes com

Leave a Comment