Ultra Fast Macros For Gaver.io

Macros For Gaver.io made by HarmZ

当前为 2017-10-18 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Ultra Fast Macros For Gaver.io
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.1
  5. // @description Macros For Gaver.io made by HarmZ
  6. // @author HarmZ
  7. // @match http://gaver.io/*
  8. // @match http://bubla.io/*
  9. // @run-at document-end
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. window.addEventListener('keydown', keydown);
  14. window.addEventListener('keyup', keyup);
  15.  
  16. var EjectDown = false;
  17.  
  18. var speed = 9999999999999999999999999999999999999999999999999999999999999;
  19.  
  20. function keydown(event) {
  21. if (event.keyCode == 87 && EjectDown === false) { // here we put key (W)
  22. EjectDown = true;
  23. setTimeout(eject, speed);
  24. }
  25. }
  26. function keyup(event) {
  27. if (event.keyCode == 87) { // here put W (*2)
  28. EjectDown = false;
  29. }
  30. }
  31.  
  32. function eject() {
  33. if (EjectDown) {
  34. window.onkeydown({keyCode: 87}); //here put W (*3)
  35. window.onkeyup({keyCode: 87});
  36. setTimeout(eject, speed);
  37. }
  38. }
  39. var welcome="Hey Bro,check out my YT Channel for new scripts, http://bit.ly/HarmZ";
  40. alert(welcome);
  41. //Made by HarmZ