Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name R-To-Split
- // @namespace R-To-Split
- // @version 1.0
- // @description R Key to Split
- // @author SYx
- // @match http://agar.io/*
- // @grant none
- // @run-at document-end
- // ==/UserScript==
- (function() {
- var amount = 1;
- var duration = 1; //ms
- var overwriting = function(evt) {
- if (evt.keyCode === 82) { // KEY_R
- for (var i = 0; i < amount; ++i) {
- setTimeout(function() {
- window.onkeydown({keyCode: 32}); // KEY_SPACE
- window.onkeyup({keyCode: 32});
- }, i * duration);
- }
- }
- };
- window.addEventListener('keydown', overwriting);
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement