Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Agario-Fast-Split
- // @namespace lol
- // @version v2
- // @description Shift is split, Q is macro
- // @author CoDinGVolTz
- // @match http://agariocity.io/
- // @match http://agarz.com/en
- // @match http://petridish.pw/en/
- // @match https://gota.io/web/
- // @match http://beta.alis.io/
- // @match http://www.agar.re/
- // @match http://agar.red/
- // @match http://gaver.io/web/
- // @match http://nbk.io/
- // @match http://alis.io/
- // @match http://agar.io/?ip=37.187.159.57:459
- // @match http://agar.io/
- // @match *://agarioforums.net/play/*
- // @match *://agario.mobi/*
- // @match *://agarioprivate.net/*
- // @match *://agarserv.com/*
- // @match *://agarly.com/*
- // @grant none
- // ==/UserScript==
- / jshint -W097 /
- 'use strict';
- var SplitInterval;
- var MacroInterval;
- var SplitDebounce = false;
- var MacroDebounce = false;
- $(document).on('keydown', function(input) {
- console.log("got keydown")
- if (input.keyCode == 16) {
- if (SplitDebounce) {
- return;
- }
- SplitDebounce = true;
- SplitInterval = setInterval(function() {
- $("body").trigger($.Event("keydown", {
- keyCode: 32
- }));
- $("body").trigger($.Event("keyup", {
- keyCode: 32
- }));
- }, 0);
- } else if (input.keyCode == 81) {
- if (MacroDebounce) {
- return;
- }
- MacroDebounce = true;
- MacroInterval = setInterval(function() {
- $("body").trigger($.Event("keydown", {
- keyCode: 87
- }));
- $("body").trigger($.Event("keyup", {
- keyCode: 87
- }));
- }, 0);
- }
- })
- $(document).on('keyup', function(input) {
- if (input.keyCode == 16) {
- SplitDebounce = false;
- clearInterval(SplitInterval);
- return;
- } else if (input.keyCode == 81) {
- MacroDebounce = false;
- clearInterval(MacroInterval);
- return;
- }
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement