Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // © 2017. Rekt Clan. All Rights Reserved
  2. // ==UserScript==
  3. // @name         RektMacro
  4. // @namespace    http://tampermonkey.net/
  5. // @version      3.6
  6. // @description  PRO AGAR MACRO - W=FEED - SHIFT OR 4=TRICKSPLIT - TAB OR 3=TRIPLESPLIT - CTRL OR 2=DOUBLESPLIT - A OR F=FREEZE CELL - KREDIT TO KAP CLAN MEMBER: ME! (EMERIS) YT=KAP CLAN
  7. // @author       Rekt Quarpexx
  8. // @match        http://xgario.ml/*
  9. // @match        http://petridish.pw/*
  10. // @match        http://agarly.com/*
  11. // @match        http://agar.biz/*
  12. // @match        http://en.agar.bio/*
  13. // @match        http://agar.red/*
  14. // @match        http://agario.biz/*
  15. // @match        http://germs.io/*
  16. // @match        http://agar.re/*
  17. // @match        http://alis.io/*
  18. // @run-at       document-end
  19. // @grant        none
  20. // ==/UserScript==
  21.  
  22. window.addEventListener('keydown', keydown);
  23. window.addEventListener('keyup', keyup);
  24.  
  25. var EjectDown = false;
  26.  
  27. var speed = 25; //in ms
  28. document.getElementById("instructions").innerHTML += "<center><span class='text-muted'><span data-itr='instructions_a or f'> Press <b>A</b> or <b>F</b> to Freeze Cell (Stop Movement)</span></span></center>";
  29. document.getElementById("instructions").innerHTML += "<center><span class='text-muted'><span data-itr='instructions_ctrl'> Press <b>Ctrl</b> or <b>2</b> to Doublesplit (Split 2x)</span></span></center>";
  30. document.getElementById("instructions").innerHTML += "<center><span class='text-muted'><span data-itr='instructions_tab'> Press <b>Tab</b> or <b>3</b> to Triplesplit (Split 3x)</span></span></center>";
  31. document.getElementById("instructions").innerHTML += "<center><span class='text-muted'><span data-itr='instructions_shift'> Press <b>Shift</b> or <b>4</b> to Tricksplit (Split 4x)</span></span></center>";
  32. document.getElementById("instructions").innerHTML += "<center><span class='text-muted'><span data-itr='instructions_youtube channel'> If you like my Macro, please check out the official <b>Rekt</b> <b>Clan</b> Discord!</span> discord.gg/mxx8dmz</span></center>";
  33. function keydown(event) {
  34.     if (event.keyCode == 87 && EjectDown === false) { // key W
  35.         EjectDown = true;
  36.         setTimeout(eject, speed);
  37.     }
  38.     if (event.keyCode == 17) { //key Ctrl
  39.         split();
  40.         setTimeout(split, speed);
  41.     }
  42.     if (event.keyCode == 50) { //key 2
  43.         split();
  44.         setTimeout(split, speed);
  45.     }
  46.      if (event.keyCode == 9) { //key Tab
  47.         split();
  48.         setTimeout(split, speed);
  49.         setTimeout(split, speed*2);
  50.     }
  51.      if (event.keyCode == 51) { //key 3
  52.         split();
  53.         setTimeout(split, speed);
  54.         setTimeout(split, speed*2);
  55.     }
  56.      if (event.keyCode == 16) { //key Shift
  57.         split();
  58.         setTimeout(split, speed);
  59.         setTimeout(split, speed*2);
  60.         setTimeout(split, speed*3);
  61.     }
  62.      if (event.keyCode == 52) { //key 4
  63.         split();
  64.         setTimeout(split, speed);
  65.         setTimeout(split, speed*2);
  66.         setTimeout(split, speed*3);
  67.     }
  68.     if (event.keyCode == 65) { //key A
  69.         X = window.innerWidth/2;
  70.         Y = window.innerHeight/2;
  71.         $("canvas").trigger($.Event("mousemove", {clientX: X, clientY: Y}));
  72.  }
  73.     if (event.keyCode == 70) { //key F
  74.         X = window.innerWidth/2;
  75.         Y = window.innerHeight/2;
  76.         $("canvas").trigger($.Event("mousemove", {clientX: X, clientY: Y}));
  77.     }
  78. }
  79.  
  80.  
  81. function keyup(event) {
  82.     if (event.keyCode == 87) { // key W
  83.         EjectDown = false;
  84.     }
  85. }
  86.  
  87. function eject() {
  88.     if (EjectDown) {
  89.         window.onkeydown({keyCode: 87}); // key W
  90.         window.onkeyup({keyCode: 87});
  91.         setTimeout(eject, speed);
  92.     }
  93. }
  94.  
  95. function split() {
  96.     $("body").trigger($.Event("keydown", { keyCode: 32})); //key space
  97.     $("body").trigger($.Event("keyup", { keyCode: 32})); //jquery is required for split to work
  98. }
  99. //© 2017. Rekt Clan. All Rights Reserved
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement