Gats.io right click for spacebar

This script allows you to use your right click for the abilities you usually use with spacebar. However it wont work for shield (working on it).

Per 23-10-2021. Zie de nieuwste versie.

// ==UserScript==
// @name         Gats.io right click for spacebar
// @version      2.1
// @description  This script allows you to use your right click for the abilities you usually use with spacebar. However it wont work for shield (working on it).
// @author       Rayan223
// @match        https://gats.io/
// @icon         none
// @grant        none
// @namespace https://greasyfork.org/users/825882
// ==/UserScript==

var numberdash = 0
var shieldmode = 0

window.oncontextmenu = function ()
{
    dash();
    ++numberdash
    while (numberdash>1){
        shieldmode = 1
    }
    shieldmode = 0
    setTimeout(afterdash,100);
    return false;
}

window.onclick = function(){
    numberdash = 0
}

function dash(){
    RF.list[0].socket.send('k,5,1');
}

function afterdash(){
    RF.list[0].socket.send('k,5,0');
}