Advertisement
Guest User

Untitled

a guest
Nov 16th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.13 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Agario-Fast-Split
  3. // @namespace lol
  4. // @version v2
  5. // @description Shift is split, Q is macro
  6. // @author CoDinGVolTz
  7. // @match http://agariocity.io/
  8. // @match http://agarz.com/en
  9. // @match http://petridish.pw/en/
  10. // @match https://gota.io/web/
  11. // @match http://beta.alis.io/
  12. // @match http://www.agar.re/
  13. // @match http://agar.red/
  14. // @match http://gaver.io/web/
  15. // @match http://nbk.io/
  16. // @match http://alis.io/
  17. // @match http://agar.io/?ip=37.187.159.57:459
  18. // @match http://agar.io/
  19. // @match *://agarioforums.net/play/*
  20. // @match *://agario.mobi/*
  21. // @match *://agarioprivate.net/*
  22. // @match *://agarserv.com/*
  23. // @match *://agarly.com/*
  24. // @grant none
  25. // ==/UserScript==
  26. / jshint -W097 /
  27. 'use strict';
  28.  
  29. var SplitInterval;
  30. var MacroInterval;
  31. var SplitDebounce = false;
  32. var MacroDebounce = false;
  33. $(document).on('keydown', function(input) {
  34. console.log("got keydown")
  35. if (input.keyCode == 16) {
  36. if (SplitDebounce) {
  37. return;
  38. }
  39. SplitDebounce = true;
  40. SplitInterval = setInterval(function() {
  41. $("body").trigger($.Event("keydown", {
  42. keyCode: 32
  43. }));
  44. $("body").trigger($.Event("keyup", {
  45. keyCode: 32
  46. }));
  47. }, 0);
  48. } else if (input.keyCode == 81) {
  49. if (MacroDebounce) {
  50. return;
  51. }
  52. MacroDebounce = true;
  53. MacroInterval = setInterval(function() {
  54. $("body").trigger($.Event("keydown", {
  55. keyCode: 87
  56. }));
  57. $("body").trigger($.Event("keyup", {
  58. keyCode: 87
  59. }));
  60. }, 0);
  61. }
  62. })
  63.  
  64. $(document).on('keyup', function(input) {
  65. if (input.keyCode == 16) {
  66. SplitDebounce = false;
  67. clearInterval(SplitInterval);
  68. return;
  69. } else if (input.keyCode == 81) {
  70. MacroDebounce = false;
  71. clearInterval(MacroInterval);
  72. return;
  73. }
  74. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement