Skip to content

Instantly share code, notes, and snippets.

Created June 6, 2015 01:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/22ccbd6a1103dce498be to your computer and use it in GitHub Desktop.
Save anonymous/22ccbd6a1103dce498be to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Agar.io Mouse
// @namespace http://redd.it/3710r5
// @version 0.1
// @description Agar.io mouse control: Left mouse splits, Right mouse feeds
// @author trabladorr
// @match http://agar.io
// @grant none
// @license WTFPL v2 (http://www.wtfpl.net/txt/copying/)
// ==/UserScript==
$(
function() {
var feeddown = $.Event("keydown", { keyCode: 87}); //w button
var feedup = $.Event("keyup", { keyCode: 87}); //w button
var splitdown = $.Event("keydown", { keyCode: 32}); //space button
var splitup = $.Event("keyup", { keyCode: 32}); //space button
$(document).bind('mousedown', function(e) {
if( (e.which == 3) ){
$("body").trigger(feeddown);
$("body").trigger(feedup);
//console.log("feed");
}
else if( (e.which == 1) ){
$("body").trigger(splitdown);
$("body").trigger(splitup);
//console.log("split");
}
}).bind('contextmenu', function(e){
e.preventDefault();
});
//alert("mouse enabled");
}
)();
@Bobartus
Copy link

Bobartus commented Apr 9, 2021

y8gyuyuuygtouyuyfyguyffggj

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment