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

Устаревшая версия за 14.09.2022. Перейдите к последней версии.

  1. // ==UserScript==
  2. // @name Gats.io right click for spacebar
  3. // @version 2.0.2
  4. // @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).
  5. // @author Rayan223
  6. // @match https://gats.io/
  7. // @icon none
  8. // @grant none
  9. // @license MIT
  10. // @namespace https://greasyfork.org/users/825882
  11. // ==/UserScript==
  12.  
  13. $('button').click(function(event){
  14. console.log(event.which);
  15. if( event.which == 1 ){
  16. console.log('left click');
  17. } else if ( event.which == 2 ){
  18. console.log('middle click');
  19. } else if ( event.which == 3 ){
  20. consol.log('right click');
  21. }
  22. });
  23.  
  24. window.oncontextmenu = function ()
  25. {
  26. dash();
  27. setTimeout(afterdash,50);
  28. return false;
  29. }
  30.  
  31. function dash(){
  32. RF.list[0].socket.send('k,5,1');
  33. }
  34.  
  35. function afterdash(){
  36. RF.list[0].socket.send('k,5,0');
  37. }