Line script

Linesplit script for ball games 😩

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Line script
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Linesplit script for ball games 😩
// @author       Zaddy Danger
// @match        http://abs0rb.me/*
// @match        https://gota.io/*
// @grant        none
// @run-at       document-end
// ==/UserScript==

window.addEventListener('keydown', keydown);

var Speed = 25;
function split() {
    $("body").trigger($.Event("keydown", {
        keyCode: 32
    }));
    $("body").trigger($.Event("keyup", {
        keyCode: 32
    }));
}
function keydown(event) {
    if (event.keyCode == 83) { //key S
        split();
        setTimeout(split, Speed);
        setTimeout(split, Speed*2);
    }
    if (event.keyCode == 50) { //key 2
        X = window.innerWidth/0.5;
        Y = window.innerHeight/2;
        $("canvas").trigger($.Event("mousemove", {clientX: X, clientY: Y}));
    }
    if (event.keyCode == 49) { //key 1
        X2 = window.innerWidth/3.5;
        Y2 = window.innerHeight/2;
        $("canvas").trigger($.Event("mousemove", {clientX: X2, clientY: Y2}));
    }
    if (event.keyCode == 51) { //key 3
        X3 = window.innerWidth/2;
        Y3 = window.innerHeight/3.5;
        $("canvas").trigger($.Event("mousemove", {clientX: X3, clientY: Y3}));
    }
    if (event.keyCode == 52) { //key 4
        X4 = window.innerWidth/2;
        Y4 = window.innerHeight/0.5;
        $("canvas").trigger($.Event("mousemove", {clientX: X4, clientY: Y4}));
    }
    if (event.keyCode == 70) { //key F
        X5 = window.innerWidth/2;
        Y5 = window.innerHeight/2;
        $("canvas").trigger($.Event("mousemove", {clientX: X5, clientY: Y5}));
    }
}