alsda7 Hotkeys : mouse control spilt 16 and feed

E is 'W' Macro, T and Q and shift is spilt 16, G and Q is Doublesplit, Left Click is Space 16, Right Click is Feed/Macro,

  1. // ==UserScript==
  2. // @name alsda7 Hotkeys : mouse control spilt 16 and feed
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.70
  5. // @description E is 'W' Macro, T and Q and shift is spilt 16, G and Q is Doublesplit, Left Click is Space 16, Right Click is Feed/Macro,
  6. // @author alsda7
  7. // @match http://agar.io/*
  8. // @match https://agar.io/*
  9. // @match http://3rb.io/*
  10. // @grant none
  11. // @run-at document-end
  12. // ==/UserScript==
  13. window.addEventListener('keydown', keydown);
  14. window.addEventListener('keyup', keyup);
  15. var Feed = 26;
  16. var Speed = 25;
  17.  
  18. //Funtions
  19. function split() {
  20. $("body").trigger($.Event("keydown", { keyCode: 32}));
  21. $("body").trigger($.Event("keyup", { keyCode: 32}));
  22. }
  23. function mass() {
  24. if (Feed) {
  25. window.onkeydown({keyCode: 87});
  26. window.onkeyup({keyCode: 87});
  27. setTimeout(mass, Speed);
  28. }
  29. }
  30.  
  31. function keydown(event) {
  32. // Feed Macro
  33. if (event.keyCode == 69 ) // E
  34. {
  35. Feed = true;
  36. setTimeout(mass, Speed);
  37. }// Center
  38. if (event.keyCode == 83) { // S
  39. X = window.innerWidth/2;
  40. Y = window.innerHeight/2;
  41. $("canvas").trigger($.Event("mousemove", {clientX: X, clientY: Y}));
  42. }
  43. // spilt 16
  44. if (event.keyCode == 84 || event.keyCode == 119 || event.keyCode == 16) { // T and F8 and shift
  45. split();
  46. setTimeout(split, Speed);
  47. setTimeout(split, Speed*2);
  48. setTimeout(split, Speed*3);
  49. } // Doublesplit
  50. if (event.keyCode == 71 || event.keyCode == 81) { // G and Q
  51. split();
  52. setTimeout(split, Speed);
  53. }// Split
  54. if (event.keyCode == 'yourkey' || event.keyCode == 'yourkey2') { // Put in Your Key
  55. split();
  56. }
  57.  
  58. } // When Player Lets Go Of E, It Stops Feeding
  59. function keyup(event) {
  60. if (event.keyCode == 69) {
  61. Feed = false;
  62. }
  63. }
  64.  
  65. //Mouse Clicks
  66. (function() {
  67. document.getElementById("canvas").addEventListener("mousedown", function(event) {
  68. if (event.which == 1) {
  69. split();
  70. setTimeout(split, Speed);
  71. setTimeout(split, Speed*2);
  72. setTimeout(split, Speed*3);
  73. }
  74. else if (event.which == 3) {
  75. Feed = true;
  76. setTimeout(mass, Speed);
  77. }
  78. });
  79.  
  80. document.getElementById("canvas").addEventListener("mouseup", function(event) {
  81. if (event.which == 3) {
  82. Feed = false;
  83. }
  84. });
  85. $('#canvas').bind('contextmenu', function(e) {
  86. e.preventDefault();
  87. });
  88. }());