// ==UserScript==
// @name MOOMOO.IO HAT MACRO + AUTO BUY!!!
// @namespace http://tampermonkey.net/
// @version 3.3
// @description With the press of a key you can auto Buy/Equip a Hat! As well as bigger store, better map and batter colors, as well as many more!!!!!
// @author Cody Webb
// @match *://moomoo.io/*
// @match *://sandbox.moomoo.io/*
// @match *://dev.moomoo.io/*
// @grant none
// ==/UserScript==
(function() {
document.getElementById("storeHolder").style = "height: 1500px; width: 450px;";
document.getElementById("gameName").style.color = "red";
document.getElementById("setupCard").style.color = "red";
document.getElementById("gameName").innerHTML = "MooMoo.io <br>HAT MOD";
document.getElementById('adCard').remove();
document.getElementById("leaderboard").append('HAT MOD');
document.getElementById("leaderboard").style.color = "#990000";
document.getElementById("allianceButton").style.color = "#990000";
document.getElementById("chatButton").style.color = "#990000";
document.getElementById("storeButton").style.color = "#990000";
$("#mapDisplay").css("background", "url('https://i.imgur.com/fgFsQJp.png')");
document.getElementById("diedText").innerHTML = "OOOF, U DIED!!!!";
$("#adCard").css({display: "none"});
$("#gameCanvas").css('cursor', 'url(http://cur.cursors-4u.net/user/use-1/use153.cur), default');
$("#moomooio_728x90_home").parent().css({display: "none"});
var hatList = [ // form NAME, ID, KEY = KEY BIND
['Unequip', 0], // shift = 16
['Winter Cap', 15], // N = 17
['Bull Helmet', 7], // R = 82
['Soldier Helmet', 6], // G = 71
['Tank Gear', 40], // Z = 90
['Turret Gear', 53], // T = 84
['Flipper Hat', 31], // Y = 89
['Booster Hat', 12], // B = 66
['Barbarian Armor', 26], // H = 72
['Emp Helmet', 22], // J = 74
['Thief Gear', 52] // K = 75,
['Samurai Armor', 20], // U = 85
['Assassin Gear', 56], // I = 73
['Bushido Armor', 16], // O = 79
['Barbarian Armor', 26], // H = 72
['Pig Head', 29], // P = 80
];
function nameToID(name) {
for (let c = 0; c < hatList.length; c++) {
let target = hatList[c][0];
if (target === name) {
return hatList[c][1];
};
};
};
function buyAndEquip(name) {
let target2= nameToID(name);
storeBuy(target2);
storeEquip(target2);
};
if (document.activeElement.id !== 'chatBox'){
document.addEventListener('keydown', function(e) {
switch (e.keyCode) {
case 16: buyAndEquip('Unequip'); break; // Shift
case 82: buyAndEquip('Bull Helmet'); break; // R
case 90: buyAndEquip('Tank Gear'); break; // Z
case 71: buyAndEquip('Soldier Helmet'); break; // G
case 66: buyAndEquip('Booster Hat'); break; // B
case 89: buyAndEquip('Flipper Hat'); break; // Y
case 78: buyAndEquip('Winter Cap'); break; // N
case 74: buyAndEquip('Emp Helmet'); break; // J
case 84: buyAndEquip('Turret Gear'); break; // T
case 88: buyAndEquip('Thief Gear'); break; // K
case 72: buyAndEquip('Barbarian Armor'); break; // H
case 85: buyAndEquip('Samurai Armor'); break; // U
case 73: buyAndEquip('Assassin Gear'); break; // I
case 79: buyAndEquip('Bushido Armor'); break; // O
case 80: buyAndEquip('Pig Head'); break; // P
}
});
if (document.activeElement.id !== 'chatBox'){
document.addEventListener('keydown', function(e) {
switch (e.keyCode) {
case 16: storeEquip(0); break; // Shift
case 82: storeEquip(7); break; // R
case 90: storeEquip(40); break; // Z
case 71: storeEquip(6); break; // G
case 66: storeEquip(12); break; // B
case 89: storeEquip(31); break; // Y
case 78: storeEquip(15); break; // N
case 74: storeEquip(15); break; // J
case 84: storeEquip(53); break; // T
case 88: storeEquip(16); break; // K
case 72: storeEquip(26); break; // H
case 85: storeEquip(20); break; // U
case 73: storeEquip(56); break; // I
case 79: storeEquip(55); break; // O
}
});
}}})();