// © 2017. Rekt Clan. All Rights Reserved
// ==UserScript==
// @name RektMacro
// @namespace http://tampermonkey.net/
// @version 3.6
// @description ReaktClanMacro
// @author Rekt Quarpexx
// @match http://agar.io/*
// @match http://petridish.pw/*
// @match http://agarly.com/*
// @match http://agar.biz/*
// @match http://en.agar.bio/*
// @match http://agar.pro/*
// @match http://agario.biz/*
// @match http://germs.io/*
// @match http://agar.re/*
// @match http://alis.io/*
// @run-at document-end
// @grant none
// @downloadURL https://update.greasyfork.icu/scripts/24787/RektMacro.user.js
// @updateURL https://update.greasyfork.icu/scripts/24787/RektMacro.meta.js
// ==/UserScript==
window.addEventListener('keydown', keydown);
window.addEventListener('keyup', keyup);
var EjectDown = false;
var speed = 25; //in ms
document.getElementById("instructions").innerHTML += "
Press A or F to Freeze Cell (Stop Movement)";
document.getElementById("instructions").innerHTML += " Press Ctrl or 2 to Doublesplit (Split 2x)";
document.getElementById("instructions").innerHTML += " Press Tab or 3 to Triplesplit (Split 3x)";
document.getElementById("instructions").innerHTML += " Press Shift or 4 to Tricksplit (Split 4x)";
document.getElementById("instructions").innerHTML += " If you like my Macro, please check out the official Rekt Clan Discord! discord.gg/mxx8dmz";
function keydown(event) {
if (event.keyCode == 87 && EjectDown === false) { // key W
EjectDown = true;
setTimeout(eject, speed);
}
if (event.keyCode == 17) { //key Ctrl
split();
setTimeout(split, speed);
}
if (event.keyCode == 50) { //key 2
split();
setTimeout(split, speed);
}
if (event.keyCode == 9) { //key Tab
split();
setTimeout(split, speed);
setTimeout(split, speed*2);
}
if (event.keyCode == 51) { //key 3
split();
setTimeout(split, speed);
setTimeout(split, speed*2);
}
if (event.keyCode == 16) { //key Shift
split();
setTimeout(split, speed);
setTimeout(split, speed*2);
setTimeout(split, speed*3);
}
if (event.keyCode == 52) { //key 4
split();
setTimeout(split, speed);
setTimeout(split, speed*2);
setTimeout(split, speed*3);
}
if (event.keyCode == 65) { //key A
X = window.innerWidth/2;
Y = window.innerHeight/2;
$("canvas").trigger($.Event("mousemove", {clientX: X, clientY: Y}));
}
if (event.keyCode == 70) { //key F
X = window.innerWidth/2;
Y = window.innerHeight/2;
$("canvas").trigger($.Event("mousemove", {clientX: X, clientY: Y}));
}
}
function keyup(event) {
if (event.keyCode == 87) { // key W
EjectDown = false;
}
}
function eject() {
if (EjectDown) {
window.onkeydown({keyCode: 87}); // key W
window.onkeyup({keyCode: 87});
setTimeout(eject, speed);
}
}