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 yet (working on it).

目前為 2022-09-14 提交的版本,檢視 最新版本

// ==UserScript==
// @name         Gats.io right click for spacebar
// @version      2.0.4.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 yet (working on it).
// @author       Rayan223
// @match        https://gats.io/
// @icon         none
// @grant        none
// @license MIT
// @namespace https://gf.qytechs.cn/users/825882
// ==/UserScript==

var rightClick = 0;

document.body.onmousedown = function(event) {
    if (event.button == 2) {
        ++rightClick;
        console.log("clic");
    }
}

document.body.onmouseup = function(event) {
    if (event.button == 2) {
        --rightClick;
        console.log("unclic");
    }
}

if(rightClick == 1){
    RF.list[0].socket.send('k,5,1');
}else{
    if (rightClick == 0){
    RF.list[0].socket.send('k,5,0');
    }
}
//window.oncontextmenu = function ()
//{
//    dash();
//    setTimeout(afterdash,50);
//    return false;
//}

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

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

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址