Macro Fast agar games

Sets show mass and dark theme to true, provides a tricksplit with E or 4, triplesplit with 3, doublesplit with D or 2, faster feeding with Q, and split with 1

// ==UserScript==
// @name         Macro Fast agar games
// @namespace    http://tampermonkey.net/
// @version      0.5
// @description  Sets show mass and dark theme to true, provides a tricksplit with E or 4, triplesplit with 3, doublesplit with D or 2, faster feeding with Q, and split with 1
// @author       Jack Burch + Tom Burris
// @match        http*://agar.io
// @include      http://*agario.fun/
// @include      http://agario.fun/play/?ip=127.0.0.1:443
// @include      http://agario.fun/play/?ip=25.102.68.231:443
// @include      http://*agar.io/agarplus.io/
// @include      http://*agar.io/ogario
// @grant        none
// @run-at       document-end
// ==/UserScript==



window.addEventListener('keydown', keydown);
window.addEventListener('keyup', keyup);
var Feed = false;
var Dingus = false;
var imlost = 25;
var instructions = document.getElementById("instructions");
instructions.style.lineHeight = "1.15";
instructions.style.fontSize = "12.5px";
instructions.style.marginTop = "-30px";
instructions.innerHTML +=
	"<center><span class='text-muted'><span data-itr='instructions_3'> Press <b>A</b> para double split </span></span></center>" +
	"<center><span class='text-muted'><span data-itr='instructions_d'> Press <b>D</b> para split 16</span></span></center>" +
	"<center><span class='text-muted'><span data-itr='instructions_q'> Press  <b>S</b> para parar</span></span></center>";
var EjectDown = false;

var speed = 25; //in ms

function keydown(event) {
    if (event.keyCode == 87 && EjectDown === false) { // key W
        EjectDown = true;
        setTimeout(eject, speed);
    }
    if (event.keyCode == 65) { //key A
        split();
        setTimeout(split, speed);
    }
    if (event.keyCode == 68) { //key D
        split();
        setTimeout(split, speed);
        setTimeout(split, speed*2);
        setTimeout(split, speed*3);
    }
    if (event.keyCode == 83) { //key S
        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);
    }
}

function split() {
    $("body").trigger($.Event("keydown", { keyCode: 32})); //key space
    $("body").trigger($.Event("keyup", { keyCode: 32})); //jquery is required for split to work
}