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).

Versión del día 24/10/2021. Echa un vistazo a la versión más reciente.

// ==UserScript==
// @name         Gats.io right click for spacebar
// @version      2.2.16
// @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://greasyforks.org/users/825882
// ==/UserScript==

var shieldmode = 0;
let infinite = 9999999999999999;
var ondash;
var timer = 0

window.onmousedown = function (event){
    if (event.which == 3){
        while (event.which == 3 && timer<501){
            ++timer
        }
        dash();
        if (timer > 499){
            ondash = setTimeout(afterdash,infinite);
        }else{
            ondash = setTimeout(afterdash,250);
        }
        timer = 0
    }else{
        clearTimeout(ondash);
    }
}

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

function afterdash(){
    RF.list[0].socket.send('k,5,0');
    shieldmode = 0;
}
长期地址
遇到问题?请前往 GitHub 提 Issues。