You are on page 1of 43

// ==UserScript==

// @name Corrupt X Mod


// @namespace -
// @version Last_Version
// @description By Radar
// @author Radar
// @match *://moomoo.io/*
// @match *://sandbox.moomoo.io/*
// @match *://dev.moomoo.io/*
// @grant none
// @require https://greasyfork.org/scripts/368273-msgpack/code/msgpack.js?
version=598723
// @require http://code.jquery.com/jquery-3.3.1.min.js
// @require https://code.jquery.com/ui/1.12.0/jquery-ui.min.js
// @require https://cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.3.0/jquery-
confirm.min.js
// @icon
https://vignette.wikia.nocookie.net/moom/images/4/4a/Skull.png/revision/latest?
cb=20171004215540
// ==/UserScript==

$("#consentBlock").css({display: "none"});
//$("#youtuberOf").css({display: "none"});

const pingDisplay = $("#pingDisplay");


pingDisplay.css("top", "3px");
pingDisplay.css("display", "block");
$("body").append(pingDisplay);

document.getElementById("moomooio_728x90_home").style.display = "none";
$("#moomooio_728x90_home").parent().css({display: "none"});

window.onbeforeunload = null;

let mouseX;
let mouseY;

let width;
let height;

setInterval(() => {
if(clanTroll == 1) {
doNewSend(["9", [null]]);
doNewSend(["8", [troll(false, 5)]])
}
doNewSend(["testing", [6]]);
}, 0);

setInterval(() => {
if(clanToggle == 1) {
doNewSend(["9", [null]]);
doNewSend(["8", [animate(false, 5)]])
doNewSend(["9", [null]]);
}
doNewSend(["testing", [6]]);
}, 0);

setInterval(() => {
if(clanfake == 1) {
doNewSend(["9", [null]]);
doNewSend(["8", [fake(false, 5)]])
}
doNewSend(["testing", [6]]);
}, 0);

setInterval(() => {
if(messageToggle == 1) {
doNewSend(["ch", [animate(true, 5)]])
}
}, 0);

setInterval(() => {
if(messageTroll == 1) {
doNewSend(["ch", [troll(true, 5)]])
}
}, 0);

setInterval(() => {
if(messagefake == 1) {
doNewSend(["ch", [fake(true, 5)]])
}
}, 0);

setInterval(() => {
if(autoaim == true) {
doNewSend(["2", [nearestEnemyAngle]]);
}
}, 0);

setInterval(() => {
if(hatToggle == 1) {
if(oldHat != normalHat) {
hat(normalHat);
console.log("Tried. - Hat")
}
if(oldAcc != normalAcc) {
acc(normalAcc);
console.log("Tried. - Acc")
}
oldHat = normalHat;
oldAcc = normalAcc
}
}, 25);
function normal() {
hat(normalHat);
acc(normalAcc);
}

function aim(x, y){


var cvs = document.getElementById("gameCanvas");
cvs.dispatchEvent(new MouseEvent("mousemove", {
clientX: x,
clientY: y

}));
}

let coreURL = new URL(window.location.href);


window.sessionStorage.force = coreURL.searchParams.get("fc");

var nearestEnemy;
var nearestEnemyAngle;
var isEnemyNear;
var instaSpeed = 210;
var primary;
var secondary;
var foodType;
var wallType;
var spikeType;
var millType;
var mineType;
var boostType;
var turretType;
var spawnpadType;
var autoaim = false;
var tick = 1;
var oldHat;
var oldAcc;
var enemiesNear;
var normalHat;
var normalAcc;
var ws;
var msgpack5 = msgpack;
var boostDir;
let myPlayer = {
id: null,
x: null,
y: null,
dir: null,
object: null,
weapon: null,
clan: null,
isLeader: null,
hat: null,
accessory: null,
isSkull: null
};
let healSpeed = 35;
var messageToggle = 0;
var messageTroll = 0;
var messagefake = 0;
var clanToggle = 0;
var clanTroll = 0;
var clanfake = 0;
let healToggle = 1;
let hatToggle = 1;

document.msgpack = msgpack;
function n(){
this.buffer = new Uint8Array([0]);
this.buffer.__proto__ = new Uint8Array;
this.type = 0;
}

WebSocket.prototype.oldSend = WebSocket.prototype.send;
WebSocket.prototype.send = function(m){
if (!ws){
document.ws = this;

ws = this;
socketFound(this);
}
this.oldSend(m);
};

function socketFound(socket){
socket.addEventListener('message', function(message){
handleMessage(message);
});
}

function handleMessage(m){
let temp = msgpack5.decode(new Uint8Array(m.data));
let data;
if(temp.length > 1) {
data = [temp[0], ...temp[1]];
if (data[1] instanceof Array){
data = data;
}
} else {
data = temp;
}
let item = data[0];
if(!data) {return};

if(item === "io-init") {


let cvs = document.getElementById("gameCanvas");
width = cvs.clientWidth;
height = cvs.clientHeight;
$(window).resize(function() {
width = cvs.clientWidth;
height = cvs.clientHeight;
});
cvs.addEventListener("mousemove", e => {
mouseX = e.clientX;
mouseY = e.clientY;
});
}

if (item == "1" && myPlayer.id == null){


myPlayer.id = data[1];
}

if (item == "33") {
enemiesNear = [];
for(let i = 0; i < data[1].length / 13; i++) {
let playerInfo = data[1].slice(13*i, 13*i+13);
if(playerInfo[0] == myPlayer.id) {
myPlayer.x = playerInfo[1];
myPlayer.y = playerInfo[2];
myPlayer.dir = playerInfo[3];
myPlayer.object = playerInfo[4];
myPlayer.weapon = playerInfo[5];
myPlayer.clan = playerInfo[7];
myPlayer.isLeader = playerInfo[8];
myPlayer.hat = playerInfo[9];
myPlayer.accessory = playerInfo[10];
myPlayer.isSkull = playerInfo[11];
} else if(playerInfo[7] != myPlayer.clan || playerInfo[7] === null) {
enemiesNear.push(playerInfo);
}
}
}

isEnemyNear = false;
if(enemiesNear) {
nearestEnemy = enemiesNear.sort((a,b) => dist(a, myPlayer) - dist(b,
myPlayer))[0];
}

if(nearestEnemy) {
nearestEnemyAngle = Math.atan2(nearestEnemy[2]-myPlayer.y, nearestEnemy[1]-
myPlayer.x);
if(Math.sqrt(Math.pow((myPlayer.y-nearestEnemy[2]), 2) +
Math.pow((myPlayer.x-nearestEnemy[1]), 2)) < 300) {
isEnemyNear = true;
if(autoaim == false && myPlayer.hat != 7 && myPlayer.hat != 53) {
normalHat = 6;
if(primary != 8) {
normalAcc = 21
}
};
}
}
if(isEnemyNear == false && autoaim == false) {
normalAcc = 19;
if (myPlayer.y < 2400){
normalHat = 15;
} else if (myPlayer.y > 6850 && myPlayer.y < 7550){
normalHat = 31;
} else {
normalHat = 12;
}
}
if (!nearestEnemy) {
nearestEnemyAngle = myPlayer.dir;
}
if(item == "h" && data[1] == myPlayer.id) {
if(data[2] < 100 && data[2] > 0 && healToggle == 1) {
setTimeout( () => {
place(foodType, null);
}, healSpeed);

}
}
update();
}

function doNewSend(sender){
ws.send(new Uint8Array(Array.from(msgpack5.encode(sender))));
}

function acc(id) {
doNewSend(["13c", [0, 0, 1]]);
doNewSend(["13c", [0, id, 1]]);
}

function hat(id) {
doNewSend(["13c", [0, id, 0]]);
}

function place(id, angle = Math.atan2(mouseY - height / 2, mouseX - width / 2)) {


doNewSend(["5", [id, null]]);
doNewSend(["c", [1, angle]]);
doNewSend(["c", [0, angle]]);
doNewSend(["5", [myPlayer.weapon, true]]);
}

function boostSpike() {
if(boostDir == null) {
boostDir = nearestEnemyAngle;
}
place(spikeType, boostDir + toRad(90));
place(spikeType, boostDir - toRad(90));
place(boostType, boostDir);
doNewSend(["33", [boostDir]]);
}
function boostWall() {
if(boostDir == null) {
boostDir = nearestEnemyAngle;
}
place(wallType, boostDir + toRad(90));
place(wallType, boostDir - toRad(90));
place(boostType, boostDir);
doNewSend(["33", [boostDir]]);
}

var repeater = function(key, action, interval) {


let _isKeyDown = false;
let _intervalId = undefined;

return {
start(keycode) {
if(keycode == key && document.activeElement.id.toLowerCase() !==
'chatbox') {
_isKeyDown = true;
if(_intervalId === undefined) {
_intervalId = setInterval(() => {
action();
if(!_isKeyDown){
clearInterval(_intervalId);
_intervalId = undefined;
console.log("claered");
}
}, interval);
}
}
},

stop(keycode) {
if(keycode == key && document.activeElement.id.toLowerCase() !==
'chatbox') {
_isKeyDown = false;
}
}
};

const spawnPlacer = repeater(0, () => {place(spawnpadType)}, 0);


const healer = repeater(81, () => {place(foodType)}, 0);
const healer1 = repeater(81, () => {place(foodType)}, 0);
const healer2 = repeater(81, () => {place(foodType)}, 0);
const healer3 = repeater(81, () => {place(foodType)}, 0);
const healer4 = repeater(81, () => {place(foodType)}, 0);
const healer5 = repeater(81, () => {place(foodType)}, 0);
const healer6 = repeater(81, () => {place(foodType)}, 0);
const healer7 = repeater(81, () => {place(foodType)}, 0);
const healer8 = repeater(81, () => {place(foodType)}, 0);
const healer9 = repeater(81, () => {place(foodType)}, 0);
const boostPlacer = repeater(70, () => {place(boostType)}, 0);
const spikePlacer = repeater(32, () => {place(spikeType)}, 0);
const spikePlacer1 = repeater(32, () => {place(spikeType)}, 0);
const spikePlacer2 = repeater(32, () => {place(spikeType)}, 0);
const spikePlacer3 = repeater(32, () => {place(spikeType)}, 0);
const spikePlacer4 = repeater(32, () => {place(spikeType)}, 0);
const millPlacer = repeater(78, () => {place(millType)}, 0);
const millPlacer1 = repeater(78, () => {place(millType)}, 0);
const millPlacer2 = repeater(78, () => {place(millType)}, 0);
const millPlacer3 = repeater(78, () => {place(millType)}, 0);
const millPlacer4 = repeater(78, () => {place(millType)}, 0);
const turretPlacer = repeater(72, () => {place(turretType)}, 0);
const turretPlacer1 = repeater(72, () => {place(turretType)}, 0);
const turretPlacer2 = repeater(72, () => {place(turretType)}, 0);
const turretPlacer3 = repeater(72, () => {place(turretType)}, 0);
const turretPlacer4 = repeater(72, () => {place(turretType)}, 0);
const boostSpiker = repeater(71, boostSpike, 0);
const boostWaller = repeater(191, boostWall, 0);

document.addEventListener('keydown', (e)=>{
healer.start(e.keyCode);
healer1.start(e.keyCode);
healer2.start(e.keyCode);
healer3.start(e.keyCode);
healer4.start(e.keyCode);
healer5.start(e.keyCode);
healer6.start(e.keyCode);
healer7.start(e.keyCode);
healer8.start(e.keyCode);
healer9.start(e.keyCode);
boostPlacer.start(e.keyCode);
spikePlacer.start(e.keyCode);
spikePlacer1.start(e.keyCode);
spawnPlacer.start(e.keyCode);
spikePlacer2.start(e.keyCode);
spikePlacer3.start(e.keyCode);
spikePlacer4.start(e.keyCode);
boostWaller.start(e.keyCode);
boostSpiker.start(e.keyCode);
millPlacer.start(e.keyCode);
millPlacer1.start(e.keyCode);
millPlacer2.start(e.keyCode);
millPlacer3.start(e.keyCode);
millPlacer4.start(e.keyCode);
turretPlacer.start(e.keyCode);
turretPlacer1.start(e.keyCode);
turretPlacer2.start(e.keyCode);
turretPlacer3.start(e.keyCode);
turretPlacer4.start(e.keyCode);

if (e.keyCode == 79 && document.activeElement.id.toLowerCase() !== 'chatbox') {


for (let i=0;i<5;i++){
let angle = myPlayer.dir + toRad(i * 72);
place(millType, angle)
}
}
if (e.keyCode == 72 && document.activeElement.id.toLowerCase() !== 'chatbox')
{
place(turretType, myPlayer.dir + toRad(45));
place(turretType, myPlayer.dir - toRad(45));
}

if (e.keyCode == 77 && document.activeElement.id.toLowerCase() !== 'chatbox') {


if (myPlayer.y < 2400){
hat(15);
} else if (myPlayer.y > 6850 && myPlayer.y < 7550){
hat(31);
} else {
hat(12);
}
acc(11);
}
if (e.keyCode == 90 && document.activeElement.id.toLowerCase() !== 'chatbox') {
if (myPlayer.y < 2400){
hat(0);
}
acc(19);
}
if (e.keyCode == 84 && document.activeElement.id.toLowerCase() !== 'chatbox') {
if (myPlayer.y < 2400){
hat(0);
}
acc(19);
}
if (e.keyCode == 75 && document.activeElement.id.toLowerCase() !== 'chatbox') {
if (myPlayer.y < 2400){
hat(0);
}
acc(13)
}
if (e.keyCode == 74 && document.activeElement.id.toLowerCase() !== 'chatbox')
{
if (myPlayer.y < 2400){
hat(0);
}
acc(21)
}
if (e.keyCode == 112 && document.activeElement.id.toLowerCase() !== 'chatbox')
{
if (myPlayer.y < 2400){
hat(0);
}
}
if (e.keyCode == 66 && document.activeElement.id.toLowerCase() !== 'chatbox') {
if (myPlayer.y < 2400){
hat(0);
}
acc(18);
}
if(e.keyCode == 82 && document.activeElement.id.toLowerCase() !== 'chatbox') {
autoaim = true;
healToggle = false;
doNewSend(["5", [primary, true]]);
doNewSend(["13c", [0, 7, 0]]);
doNewSend(["13c", [0, 0, 1]]);
doNewSend(["ch", [' #NoobKiller69 ']]);
doNewSend(["13c", [0, 18, 1]]);
doNewSend(["c", [1]]);
setTimeout( () => {
doNewSend(["13c", [0, 53, 0]]);
doNewSend(["13c", [0, 0, 1]]);
doNewSend(["13c", [0, 21, 1]]);
doNewSend(["5", [secondary, true]]);
}, instaSpeed - 100);

setTimeout( () => {
doNewSend(["5", [primary, true]]);
doNewSend(["c", [0, null]]);
doNewSend(["13c", [0, 6, 0]]);
doNewSend(["13c", [0, 21, 1]]);
autoaim = false;
healToggle = true;
}, instaSpeed);
}

if(e.keyCode == 89 && document.activeElement.id.toLowerCase() !== 'chatbox') {


autoaim = true;
doNewSend(["5", [primary, true]]);
doNewSend(["13c", [0, 7, 0]]);
doNewSend(["13c", [0, 0, 1]]);
doNewSend(["13c", [0, 18, 1]]);
doNewSend(["c", [1]]);
setTimeout( () => {
doNewSend(["13c", [0, 53, 0]]);
}, instaSpeed - 100);

setTimeout( () => {
doNewSend(["5", [primary, true]]);
doNewSend(["c", [0, null]]);
doNewSend(["13c", [0, 6, 0]]);
doNewSend(["13c", [0, 21, 1]]);
autoaim = false;
}, instaSpeed);
}

if(e.keyCode == 85 && document.activeElement.id.toLowerCase() !== 'chatbox') {


autoaim = true;
doNewSend(["5", [primary, true]]);
doNewSend(["13c", [0, 7, 0]]);
doNewSend(["13c", [0, 0, 1]]);
doNewSend(["13c", [0, 18, 1]]);
doNewSend(["ch", [' IMSOOP ']]);
doNewSend(["c", [1]]);

setTimeout( () => {
doNewSend(["6", [5]]);
}, 100);

setTimeout( () => {
doNewSend(["13c", [0, 53, 0]]);;
place(spikeType, myPlayer.dir + toRad(0));
}, 200);

setTimeout( () => {
doNewSend(["5", [primary, true]]);
doNewSend(["c", [0, null]]);
doNewSend(["13c", [0, 0, 0]]);
doNewSend(["13c", [0, 6, 0]]);
doNewSend(["13c", [0, 21, 1]]);
autoaim = false;
}, 300);
}

if(e.keyCode == 67 && document.activeElement.id.toLowerCase() !== 'chatbox') {


autoaim = true;
doNewSend(["5", [primary, true]]);
doNewSend(["13c", [0, 7, 0]]);
doNewSend(["13c", [0, 0, 1]]);
doNewSend(["13c", [0, 19, 1]]);
place(spikeType, myPlayer.dir + toRad(45));
place(spikeType, myPlayer.dir - toRad(45));
doNewSend(["c", [1]]);

setTimeout( () => {
doNewSend(["13c", [0, 53, 0]]);
}, 100);

setTimeout( () => {
doNewSend(["c", [0, null]]);
doNewSend(["13c", [0, 6, 0]]);
autoaim = false;
}, 200);
}

if(e.keyCode == 17 && document.activeElement.id.toLowerCase() !==


'chatbox') {
autoaim = true;
doNewSend(["5", [primary, true]]);
doNewSend(["13c", [0, 7, 0]]);
doNewSend(["13c", [0, 0, 1]]);
doNewSend(["13c", [0, 18, 1]]);
doNewSend(["c", [1]]);
setTimeout( () => {
doNewSend(["13c", [0, 53, 0]]);
}, 100);

setTimeout( () => {
doNewSend(["c", [0, null]]);
doNewSend(["13c", [0, 11, 0]]);
doNewSend(["13c", [0, 21, 1]]);
autoaim = false;
}, 200);
}
if (e.keyCode == 120 && document.activeElement.id.toLowerCase() !==
'chatbox') {
place(millType, myPlayer.dir + toRad(90));
place(millType, myPlayer.dir + toRad(270));
place(boostType, myPlayer.dir + toRad(0));
place(millType, myPlayer.dir + toRad(90));
place(millType, myPlayer.dir + toRad(270));
place(boostType, myPlayer.dir + toRad(0));
place(millType, myPlayer.dir + toRad(90));
place(millType, myPlayer.dir + toRad(270));
place(boostType, myPlayer.dir + toRad(0));
}
if (e.keyCode == 188 && document.activeElement.id.toLowerCase() !==
'chatbox') {
place(millType, myPlayer.dir + toRad(90));
place(millType, myPlayer.dir + toRad(270));
place(millType, myPlayer.dir + toRad(0));
}
if (e.keyCode == 190 && document.activeElement.id.toLowerCase() !==
'chatbox') {
place(turretType, myPlayer.dir + toRad(90));
place(turretType, myPlayer.dir + toRad(270));
place(turretType, myPlayer.dir + toRad(0));
}

if(e.keyCode == 38 && document.activeElement.id.toLowerCase() !== 'chatbox') {


messageToggle = (messageToggle + 1) % 2;
}

if(e.keyCode == 45 && document.activeElement.id.toLowerCase() !== 'chatbox') {


messageTroll = (messageTroll + 1) % 2;
}

if(e.keyCode == 37 && document.activeElement.id.toLowerCase() !== 'chatbox') {


messagefake = (messagefake + 1) % 2;
}

if(e.keyCode == 40 && document.activeElement.id.toLowerCase() !== 'chatbox') {


clanToggle = (clanToggle + 1) % 2;
}
if(e.keyCode == 46 && document.activeElement.id.toLowerCase() !== 'chatbox') {
clanTroll = (clanTroll + 1) % 2;
}

if(e.keyCode == 39 && document.activeElement.id.toLowerCase() !== 'chatbox') {


clanfake = (clanfake + 1) % 2;
}

if(e.keyCode == 111 && document.activeElement.id.toLowerCase() !== 'chatbox') {


healToggle = (healToggle + 1) % 2;
if(healToggle == 0) {
if(hatToggle == 0) {
document.title = "Heal: OFF | Hat: OFF"
} else {
document.title = "Heal: OFF | Hat: ON"
}
} else {
if(hatToggle == 0) {
document.title = "Heal: ON | Hat: OFF"
} else {
document.title = "Heal: ON | Hat: ON"
}
}
}

if(e.keyCode == 96 && document.activeElement.id.toLowerCase() !==


'chatbox') {
if (autoaim == false) {
autoaim = true;
document.title = "Corrupt X Mod / Aim : On";
} else {
document.title = "Corrupt X Mod / Aim : Off";
autoaim = false;
}
}

if(e.keyCode == 97 && document.activeElement.id.toLowerCase() !== 'chatbox') {


autoaim = true;
doNewSend(["ch", ['Polearm Musket']]);
doNewSend(["6", [5]]);
doNewSend(["6", [17]]);
doNewSend(["6", [31]]);
doNewSend(["6", [23]]);
doNewSend(["6", [10]]);
doNewSend(["6", [38]]);
doNewSend(["6", [28]]);
doNewSend(["6", [15]]);

doNewSend(["5", [primary, true]]);


doNewSend(["13c", [0, 7, 0]]);
doNewSend(["13c", [0, 0, 1]]);
doNewSend(["13c", [0, 18, 1]]);
doNewSend(["c", [1]]);
setTimeout( () => {
doNewSend(["13c", [0, 53, 0]]);
doNewSend(["13c", [0, 0, 1]]);
doNewSend(["13c", [0, 21, 1]]);
doNewSend(["5", [secondary, true]]);
}, instaSpeed - 100);

setTimeout( () => {
doNewSend(["5", [primary, true]]);
doNewSend(["c", [0, null]]);
doNewSend(["13c", [0, 6, 0]]);
doNewSend(["13c", [0, 21, 1]]);
autoaim = false;
}, instaSpeed);
}

if(e.keyCode == 98 && document.activeElement.id.toLowerCase() !== 'chatbox') {


autoaim = true;
doNewSend(["ch", ['Katana Musket']]);
doNewSend(["6", [8]]);
doNewSend(["6", [17]]);
doNewSend(["6", [31]]);
doNewSend(["6", [23]]);
doNewSend(["6", [10]]);
doNewSend(["6", [38]]);
doNewSend(["6", [4]]);
doNewSend(["6", [15]]);

doNewSend(["5", [primary, true]]);


doNewSend(["13c", [0, 7, 0]]);
doNewSend(["13c", [0, 0, 1]]);
doNewSend(["13c", [0, 18, 1]]);
doNewSend(["c", [1]]);
setTimeout( () => {
doNewSend(["13c", [0, 53, 0]]);
doNewSend(["13c", [0, 0, 1]]);
doNewSend(["13c", [0, 21, 1]]);
doNewSend(["5", [secondary, true]]);
}, instaSpeed - 100);

setTimeout( () => {
doNewSend(["5", [primary, true]]);
doNewSend(["c", [0, null]]);
doNewSend(["13c", [0, 6, 0]]);
doNewSend(["13c", [0, 21, 1]]);
autoaim = false;
}, instaSpeed);
}

if(e.keyCode == 99 && document.activeElement.id.toLowerCase() !== 'chatbox') {


autoaim = true;
doNewSend(["ch", ['Stick, Spin Spike Trap']]);
doNewSend(["6", [8]]);
doNewSend(["6", [17]]);
doNewSend(["6", [31]]);
doNewSend(["6", [23]]);
doNewSend(["6", [10]]);
doNewSend(["6", [38]]);
doNewSend(["6", [28]]);
doNewSend(["6", [25]]);
}

if(e.keyCode == 100 && document.activeElement.id.toLowerCase() !== 'chatbox') {


autoaim = true;
doNewSend(["ch", ['Stick, Spin Spike Boost']]);
doNewSend(["6", [8]]);
doNewSend(["6", [17]]);
doNewSend(["6", [32]]);
doNewSend(["6", [23]]);
doNewSend(["6", [10]]);
doNewSend(["6", [38]]);
doNewSend(["6", [28]]);
doNewSend(["6", [25]]);
}

if(e.keyCode == 112 && document.activeElement.id.toLowerCase() !== 'chatbox') {


///f1 katana [age 8]
doNewSend(["6", [4]]);
}
if(e.keyCode == 113 && document.activeElement.id.toLowerCase() !== 'chatbox') {
///f2 musket [age 9]
doNewSend(["6", [15]]);
}
if(e.keyCode == 114 && document.activeElement.id.toLowerCase() !== 'chatbox') {
///f3 crossbow [age 8]
doNewSend(["6", [12]]);
}
if(e.keyCode == 115 && document.activeElement.id.toLowerCase() !== 'chatbox') {
///f4 max mill [age 8]
doNewSend(["6", [28]]);
}
if(e.keyCode == 117 && document.activeElement.id.toLowerCase() !== 'chatbox') {
///f6 max wall [age 7]
doNewSend(["6", [21]]);
}
if(e.keyCode == 118 && document.activeElement.id.toLowerCase() !== 'chatbox') {
///f7 spin spike [age 9]
doNewSend(["6", [25]]);
}
if(e.keyCode == 119 && document.activeElement.id.toLowerCase() !== 'chatbox') {
///f8 fast crossbow [age 9]
doNewSend(["6", [13]]);
}
if(e.keyCode == 120 && document.activeElement.id.toLowerCase() !== 'chatbox') {
///f9 great axe [age 8]
doNewSend(["6", [2]]);
}
if(e.keyCode == 106 && document.activeElement.id.toLowerCase() !== 'chatbox') {
hatToggle = (hatToggle + 1) % 2;
if(healToggle == 0) {
if(hatToggle == 0) {
document.title = "Heal: OFF | Hat: OFF"
} else {
document.title = "Heal: OFF | Hat: ON"
}
} else {
if(hatToggle == 0) {
document.title = "Heal: ON | Hat: OFF"
} else {
document.title = "Heal: ON | Hat: ON"
}
}
}
})

document.addEventListener('keyup', (e)=>{
spikePlacer.stop(e.keyCode);
spawnPlacer.stop(e.keyCode);
spikePlacer1.stop(e.keyCode);
spikePlacer2.stop(e.keyCode);
spikePlacer3.stop(e.keyCode);
spikePlacer4.stop(e.keyCode);
boostPlacer.stop(e.keyCode);
boostSpiker.stop(e.keyCode);
boostWaller.stop(e.keyCode);
millPlacer.stop(e.keyCode);
millPlacer1.stop(e.keyCode);
millPlacer2.stop(e.keyCode);
millPlacer3.stop(e.keyCode);
millPlacer4.stop(e.keyCode);
turretPlacer.stop(e.keyCode);
turretPlacer1.stop(e.keyCode);
turretPlacer2.stop(e.keyCode);
turretPlacer3.stop(e.keyCode);
turretPlacer4.stop(e.keyCode);
healer.stop(e.keyCode);
healer1.stop(e.keyCode);
healer2.stop(e.keyCode);
healer3.stop(e.keyCode);
healer4.stop(e.keyCode);
healer5.stop(e.keyCode);
healer6.stop(e.keyCode);
healer7.stop(e.keyCode);
healer8.stop(e.keyCode);
healer9.stop(e.keyCode);

if(e.keyCode == 71 && document.activeElement.id.toLowerCase() !== 'chatbox') {


setTimeout( () => {
doNewSend(["33", [null]]);
boostDir = null;
}, 10);
}
if(e.keyCode == 191 && document.activeElement.id.toLowerCase() !== 'chatbox') {
setTimeout( () => {
doNewSend(["33", [null]]);
boostDir = null;
}, 10);
}
})

function isElementVisible(e) {
return (e.offsetParent !== null);
}

function toRad(angle) {
return angle * 0.01745329251;
}

function dist(a, b){


return Math.sqrt( Math.pow((b.y-a[2]), 2) + Math.pow((b.x-a[1]), 2) );
}

function animate(space, chance) {


let result = '';
let characters;
if(space) {
characters = {};
} else {
characters = {};
}
if(space) {
characters = characters.padStart((30 - characters.length) / 2 +
characters.length)
characters = characters.padEnd(30);
}
let count = 0;
for (let i = 0; i < characters.length; i++ ) {
if(Math.floor(Math.random() * chance) == 1 && characters.charAt(i) != "-" &&
count < 2 && characters.charAt(i) != " ") {
result += "";
count++
} else {
result += characters.charAt(i);
}
}
return result;
}

function troll(space, chance) {


let result = '';
let characters;
if(space) {
characters = '';
} else {
characters = '';
}
if(space) {
characters = characters.padStart((30 - characters.length) / 2 +
characters.length)
characters = characters.padEnd(30);
}
let count = 0;
for (let i = 0; i < characters.length; i++ ) {
if(Math.floor(Math.random() * chance) == 1 && characters.charAt(i) != "-" &&
count < 2 && characters.charAt(i) != " ") {
result += "";
count++
} else {
result += characters.charAt(i);
}
}
return result;
}

function fake(space, chance) {


let result = '';
let characters;
if(space) {
characters = '';
} else {
characters = '';
}
if(space) {
characters = characters.padStart((30 - characters.length) / 2 +
characters.length)
characters = characters.padEnd(30);
}
let count = 0;
for (let i = 0; i < characters.length; i++ ) {
if(Math.floor(Math.random() * chance) == 1 && characters.charAt(i) != "-" &&
count < 2 && characters.charAt(i) != " ") {
result += "";
count++
} else {
result += characters.charAt(i);
}
}
return result;
}

document.title = ""

function update() {
for (let i=0;i<9;i++){
if (isElementVisible(document.getElementById("actionBarItem" +
i.toString()))){
primary = i;
}
}

for (let i=9;i<16;i++){


if (isElementVisible(document.getElementById("actionBarItem" +
i.toString()))){
secondary = i;
}
}

for (let i=16;i<19;i++){


if (isElementVisible(document.getElementById("actionBarItem" +
i.toString()))){
foodType = i - 16;
}
}

for (let i=19;i<22;i++){


if (isElementVisible(document.getElementById("actionBarItem" +
i.toString()))){
wallType = i - 16;
}
}

for (let i=22;i<26;i++){


if (isElementVisible(document.getElementById("actionBarItem" +
i.toString()))){
spikeType = i - 16;
}
}

for (let i=26;i<29;i++){


if (isElementVisible(document.getElementById("actionBarItem" +
i.toString()))){
millType = i - 16;
}
}

for (let i=29;i<31;i++){


if (isElementVisible(document.getElementById("actionBarItem" +
i.toString()))){
mineType = i - 16;
}
}

for (let i=31;i<33;i++){


if (isElementVisible(document.getElementById("actionBarItem" +
i.toString()))){
boostType = i - 16;
}
}
for (let i=33;i<39;i++){
if (isElementVisible(document.getElementById("actionBarItem" +
i.toString())) && i != 36){
turretType = i - 16;
}
}

spawnpadType = 36;
}

function createTribe(name) {
leaveTribe();
doNewSend(["8", [name]]);
}

function leaveTribe() {
doNewSend(["9", [null]]);
}

var _msgs = ["H", "H", "H", "H", "H"];


var msgs = _msgs;
var msgCycleSwitch = false;
var shift = false;
var minus = false;
var home = false;
var chat;
var msgNum = 0;

var socket = null;

var scriptSetup = false;

WebSocket = class extends WebSocket {


constructor(...arg) {
super(...arg);
if (!scriptSetup){
scriptSetup = true;
styleInit();
ren_overlay();
window.onbeforeunload = function (){
return 'Are you sure you want to leave?';
};
}
socket = this;
}
};

if (storageAvailable('localStorage')){
if (!localStorage.getItem("msgs")){
localStorage.setItem("msgs", JSON.stringify(msgs));
}else{
let temp;
try{
temp = JSON.parse(localStorage.getItem("msgs"));
}
catch (e){
alert("Invalid Array! Setting default...");
saveData();
temp = "";
}
if (temp !== ""){
msgs = temp;
}
}
}

const overlay = {};


overlay.keyCode = 36;
overlay.toggle = false;
overlay.inputString = msgs.join("\n");
overlay.tempMsgs = _msgs;

function styleInit() {
addGlobalStyle(`#chatCyclerUI{padding: 0.2em; margin:0.2em; position:
absolute;top: 0;left: 0;width: 30%;
background-color: RGB(255, 4, 4);display:none;}`);
addGlobalStyle(".table{ display: table; text-align: center; width: 100%;
height: 80%;}");
addGlobalStyle(".row{ display: table-row; }");
addGlobalStyle(`.cell{ display: table-cell; padding: 0px 0.3em;border: 1px
solid black;}`);
addGlobalStyle(`.backRed{background-color:#FFFF00}`);
function addGlobalStyle(css) {
var head, style;
head = document.getElementsByTagName('head')[0];
if (!head) {
return;
}
style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = css;
head.appendChild(style);
}
}

function toggleOverlay(tf){
if (tf){
document.querySelector('#chatCyclerUI').style.display = "block";
}else{
document.querySelector('#chatCyclerUI').style.display = "none";
}
};

function ren_overlay(){
const title = `<div style="font-size:32px">Chat Cycle Menu</div>`;
const descr = `<div>Press HOME to toggle this menu.</div>`;
const body = `
<div class="table">
<div class="row">Message Cycle Settings
</div>
<div class="row">
<div class="cell" style="vertical-align:middle">Messages</div>
<div class="cell" style="vertical-align:middle"><textarea
name="overlay_messages" rows=4 cols=32 style="resize:none"></textarea></div>
</div>
<div class="row">
<div class="cell" style="vertical-align:middle">Update Message
Cycle</div>
<div class="cell" style="vertical-align:middle"><input
type="button" name="overlay_update_cycle" value="Update"></div>
</div>
<br>
<div class="row">Message Cycle Toggle
</div>
<div class="row">
<div class="cell" style="vertical-align:middle">Toggle<br><span
class="overlay_cycle_toggle_value"><span style="font-
size:24px;color:#FF0000";>off</span></span></div>
<div class="cell" style="vertical-align:middle"><input
type="button" name="overlay_cycle_toggle" value="Toggle"></div>
</div>
</div>`;
const footer = `<div style="font-size:24px;color:red">Made by
Mega_Mewthree</div>`;
const temp = `${title} ${body} ${descr} ${footer}`;
const d = document.createElement("div");
d.id = "chatCyclerUI";
d.innerHTML = temp;
d.style.zIndex = 999999;
document.body.appendChild(d);
const val = document.querySelector('textarea[name="overlay_messages"]');
val.value = overlay.inputString;
val.addEventListener('input', function(e) {
overlay.inputString = e.target.value;
});

document.querySelector('input[name="overlay_update_cycle"]').addEventListener('clic
k', function() {
if (!overlay.inputString){
overlay.tempMsgs = _msgs;
}else{
overlay.tempMsgs = overlay.inputString.split(/\r?\n/);
}
msgNum = 1;
msgs = overlay.tempMsgs;
saveData();
});

document.querySelector('input[name="overlay_cycle_toggle"]').addEventListener('clic
k', function(e) {
msgCycleSwitch = !msgCycleSwitch;
if (msgCycleSwitch){
chat = setInterval(autoChat, 1);
document.querySelector('.overlay_cycle_toggle_value').innerHTML =
`<span style="font-size:24px;color:#00FF00";>on</span>`;
}else{
document.querySelector('.overlay_cycle_toggle_value').innerHTML =
`<span style="font-size:24px;color:#FF0000";>off</span>`;
clearInterval(chat);
msgNum = 0;
}
});
}

function concatBuffers(buffer1, buffer2){


var tmp = new Uint8Array(buffer1.byteLength + buffer2.byteLength);
tmp.set(new Uint8Array(buffer1), 0);
tmp.set(new Uint8Array(buffer2), buffer1.byteLength);
return tmp.buffer;
}

const four = Uint8Array.from([4]).buffer;

function autoChat(){
socket && socket.send(msgpack.encode(["ch", [msgs[msgNum]]]));
msgNum++;
if (msgNum >= msgs.length) msgNum = 0;
}

function storageAvailable(type){
try{
var storage = window[type],
x = '__storage_test__';
storage.setItem(x, x);
storage.removeItem(x);
return true;
}
catch(e){
return false;
}
}

function saveData(){
if (storageAvailable('localStorage')){
localStorage.setItem("msgs", JSON.stringify(msgs));
}
}

window.addEventListener('keydown', function (event){


if (overlay.toggle) event.stopImmediatePropagation();
if (!minus && event.keyCode === 27){ //L
msgCycleSwitch = !msgCycleSwitch;
if (msgCycleSwitch){
chat = setInterval(autoChat, 1);
}else{
clearInterval(chat);
msgNum =0;
}
minus = true;
}
if (!home && event.keyCode === overlay.keyCode){ //HOME
overlay.toggle = !overlay.toggle;
toggleOverlay(overlay.toggle);
home = true;
}
});

window.addEventListener('keypress', function (event){


if (overlay.toggle) event.stopImmediatePropagation();
});

window.addEventListener('keyup', function (event){


if (overlay.toggle) event.stopImmediatePropagation();
if (event.keyCode == 27){
minus = false;
}else if (event.keyCode == 36){
home = false;
}
});

// <3 Jesus

// Specific Colors toggle -- 0 = off, 1 = on


var sANC = 1;
// Global animation color -- [0] red, [1] green, [2] blue -- (RGB)
var aNC = [255,255,0];
// Rainbow animation color -- [0] 0 = off and 1 = on, [1] cycle speed (300 is 30
seconds for an entire cycle)
var rANC = [1,100];

var mk = document.getElementById("gameCanvas").getContext("2d");
var Laa = 0;
var Lab = 0;
var aVZ = 0;
var fBX = "<3 KatieW.";
var resForRANC = 1;

// 1920-1080

function rainbowColor(){
if(resForRANC === 1){
aNC = [255,0,0];
resForRANC = 0;
}
if(aNC[0] === 255 && aNC[1] !== 255 && aNC[2] === 0){aNC[1] += 255/rANC[1];}
if(aNC[0] !== 0 && aNC[1] === 255 && aNC[2] === 0){aNC[0] += 255/rANC[1]*-1;}
if(aNC[0] === 0 && aNC[1] === 255 && aNC[2] !== 255){aNC[2] += 255/rANC[1];}
if(aNC[0] === 0 && aNC[1] !== 0 && aNC[2] === 255){aNC[1] += 255/rANC[1]*-1;}
if(aNC[0] !== 255 && aNC[1] === 0 && aNC[2] === 255){aNC[0] += 255/rANC[1];}
if(aNC[0] === 255 && aNC[1] === 0 && aNC[2] !== 0){aNC[2] += 255/rANC[1]*-1;}
if(aNC[0] < 0){aNC[0] = 0;} if(255 < aNC[0]){aNC[0] = 255;}
if(aNC[1] < 0){aNC[1] = 0;} if(255 < aNC[1]){aNC[1] = 255;}
if(aNC[2] < 0){aNC[2] = 0;} if(255 < aNC[2]){aNC[2] = 255;}
}

function katie(){
if(document.getElementById("actionBarItem0")){
if(document.getElementById("actionBarItem3").style.display === "inline-block"){
if(fBX !== 3){
aVZ = [[0,480],[0,360],[0,255]];
if(sANC === 1){aNC = [0, 255, 0];}
fBX = 3;
}

aVZ[0][0] += 1;
if(aVZ[0][1] <= aVZ[0][0]){
aVZ[0][0] = 0;
}
aVZ[1][0] += 1;
if(aVZ[1][1] <= aVZ[1][0]){
aVZ[1][0] = 0;
}
aVZ[2][0] += 1;
if(aVZ[2][1] <= aVZ[2][0]){
aVZ[2][0] = 0;
}

mk.beginPath();
mk.lineWidth = 24;
mk.strokeStyle = "rgb("+Math.round(aNC[0])+","+Math.round(aNC[1])
+","+Math.round(aNC[2])+",0.625)";
mk.arc(960,540,212,0+Math.PI/(aVZ[0][1]/2)*aVZ[0][0],7/8*Math.PI+Math.PI/
(aVZ[0][1]/2)*aVZ[0][0]);
mk.stroke();
mk.beginPath();
mk.lineWidth = 30;
mk.strokeStyle =
"rgb("+Math.round(aNC[0]/255*220)+","+Math.round(aNC[1]/255*220)+","+Math.round(aNC
[2]/255*220)+",0.625)";
mk.arc(960,540,185,0+Math.PI/(aVZ[1][1]/2)*aVZ[1][0],2/3*Math.PI+Math.PI/
(aVZ[1][1]/2)*aVZ[1][0]);
mk.stroke();
mk.beginPath();
mk.lineWidth = 45;
mk.strokeStyle = "rgb("+Math.round(aNC[0])+","+Math.round(aNC[1])
+","+Math.round(aNC[2])+",0.5)";
mk.arc(960,540,85,0+Math.PI/(aVZ[2][1]/2)*aVZ[2][0],1/3*Math.PI+Math.PI/
(aVZ[2][1]/2)*aVZ[2][0]);
mk.stroke();
}
if(document.getElementById("actionBarItem4").style.display === "inline-block"){
if(fBX !== 4){
aVZ = [[0,360],[0,250],[0,225],[0,250]];
if(sANC === 1){aNC = [255, 255, 0];}
fBX = 4;
}

aVZ[0][0] += -1;
if(aVZ[0][1] <= aVZ[0][0]){
aVZ[0][0] = 0;
}
aVZ[1][0] += 1;
if(aVZ[1][1] <= aVZ[1][0]){
aVZ[1][0] = 0;
}
aVZ[2][0] += -1;
if(aVZ[2][1] <= aVZ[2][0]){
aVZ[2][0] = 0;
}
aVZ[3][0] += 1;
if(aVZ[3][1] <= aVZ[3][0]){
aVZ[3][0] = 0;
}

mk.beginPath();
mk.lineWidth = 36;
mk.strokeStyle = "rgb("+Math.round(aNC[0])+","+Math.round(aNC[1])
+","+Math.round(aNC[2])+",0.45)";
mk.arc(960,540,251,0+Math.PI/(aVZ[0][1]/2)*aVZ[0][0],15/16*Math.PI+Math.PI/
(aVZ[0][1]/2)*aVZ[0][0]);
mk.stroke();
mk.beginPath();
mk.lineWidth = 46;
mk.strokeStyle =
"rgb("+Math.round(aNC[0]/255*220)+","+Math.round(aNC[1]/255*220)+","+Math.round(aNC
[2]/255*220)+",0.45)";
mk.arc(960,540,210,0+Math.PI/(aVZ[1][1]/2)*aVZ[1][0],7/9*Math.PI+Math.PI/
(aVZ[1][1]/2)*aVZ[1][0]);
mk.stroke();
mk.beginPath();
mk.lineWidth = 32;
mk.strokeStyle = "rgb("+Math.round(aNC[0])+","+Math.round(aNC[1])
+","+Math.round(aNC[2])+",0.383)";
mk.arc(960,540,109,0+Math.PI/(aVZ[2][1]/2)*aVZ[2][0],2/3*Math.PI+Math.PI/
(aVZ[2][1]/2)*aVZ[2][0]);
mk.stroke();
mk.beginPath();
mk.lineWidth = 26;
mk.strokeStyle =
"rgb("+Math.round(aNC[0]/255*235)+","+Math.round(aNC[1]/255*235)+","+Math.round(aNC
[2]/255*235)+",0.383)";
mk.arc(960,540,80,0+Math.PI/(aVZ[3][1]/2)*aVZ[3][0],7/8*Math.PI+Math.PI/
(aVZ[3][1]/2)*aVZ[3][0]);
mk.stroke();
}
if(document.getElementById("actionBarItem5").style.display === "inline-block"){
if(fBX !== 5){
aVZ = [[0,250,2.5,10,1.2]];
if(sANC === 1){aNC = [255, 0, 0];}
fBX = 5;
}
aVZ[0][0] += 1;
if(aVZ[0][1] <= aVZ[0][0]){
aVZ[0][0] = 0;
}

for(Laa = 0; Laa < Math.round(aVZ[0][1]/5*2); Laa++){


mk.beginPath();
mk.lineWidth = 26;
mk.strokeStyle =
"rgb("+Math.round(aNC[0]/255*235)+","+Math.round(aNC[1]/255*235)+","+Math.round(aNC
[2]/255*235)+",0.5)";
mk.arc(960,540,200+Math.sin(aVZ[0][3]*Math.PI/(aVZ[0][1]/aVZ[0][2])*(Laa-
aVZ[0][0]))*aVZ[0][3]*aVZ[0][4],0-2*Math.PI/aVZ[0][1]*Laa+2*Math.PI/aVZ[0]
[1]*aVZ[0][0],2*Math.PI/aVZ[0][1]-2*Math.PI/aVZ[0][1]*Laa+2*Math.PI/aVZ[0]
[1]*aVZ[0][0]);
mk.stroke();
}
}
}
}

function letThereBeLight(){
if(rANC[0] === 1){
rainbowColor();
}
katie();
window.requestAnimationFrame(letThereBeLight);
}

window.requestAnimationFrame(letThereBeLight);

// http://keycode.info/
// https://www.cambiaresearch.com/articles/15/javascript-char-codes-key-codes

var ID_WinterCap = 15;


var ID_AssassinGear = 56;
var ID_Bloodthirster = 55;
var ID_FlipperHat = 31;
var ID_MarksmanCap = 1;
var ID_BushGear = 10;
var ID_SoldierHelmet = 6;
var ID_AntiVenomGear = 23;
var ID_MusketeerHat = 32;
var ID_MedicGear = 13;
var ID_BullHelmet = 7;
var ID_EmpHelmet = 22;
var ID_BoosterHat = 12;
var ID_BarbarianArmor = 26;
var ID_BullMask = 46;
var ID_WindmillHat = 14;
var ID_SpikeGear = 11;
var ID_BushidoArmor = 16;
var ID_SamuraiArmor = 20;
var ID_ScavengerGear = 27;
var ID_TankGear = 40;
//Turret Gear. "Use if you want to"
var ID_TurretGear = 53;

// Keys

var TankGearKey = 90;


var AssassinGearKey = 0;
var BullHelmetKey = 66;
var SoldierHelmetKey = 74;
var TurretKey = 0;
var uneqiup = 16;
var SpikeGearKey = 0;
var BushGearKey = 0;
var EmpHelmetKey = 84;
var SamuraiArmorKey = 75;
var ScavengerGearKey = 0;

// Remove all of the ads on the page.

try {
document.getElementById("moomooio_728x90_home").style.display = "none";
$("moomooio728x90_home").parent().css({display: "none"});
} catch (e) {
console.log("There was an error removing the ads.");
}

var menuChange = document.createElement("div");


menuChange.className = "menuCard";
menuChange.id = "mainSettings";
menuChange.innerHTML = `
<div id="simpleModal" class="modal">
<div class="modal-content">
<div class="modal-header">
<span class="closeBtn">&times;</span>
<h2 style="font-size: 17px;">Hat Settings</h2>
</div>
<div class="modal-body" style="font-size: 17px;">
<div class="flexControl">
<h3 style="color: red; font-size: 17px;"></h3>
<h3 class="menuPrompt">Tank: </h3> <input value="$
{String.fromCharCode(TankGearKey)}" id="tankGear" class="keyPressLow"
onkeyup="this.value = this.value.toUpperCase();" maxlength="1" type="text"/>
<h3 class="menuPrompt">Bull: </h3> <input value="$
{String.fromCharCode(BullHelmetKey)}" id="bullHelm" class="keyPressLow"
onkeyup="this.value = this.value.toUpperCase();" maxlength="1" type="text"/>
<h3 class="menuPrompt">Soldier: </h3> <input value="$
{String.fromCharCode(SoldierHelmetKey)}" id="soldier"
class="keyPressLow"onkeyup="this.value = this.value.toUpperCase();" maxlength="1"
type="text"/>
<h3 class="menuPrompt">Turret: </h3> <input value="$
{String.fromCharCode(TurretKey)}" id="turret" class="keyPressLow" maxlength="1"
onkeyup="this.value = this.value.toUpperCase();" type="text"/>
<h3 class="menuPrompt">Spike: </h3> <input value="$
{String.fromCharCode(SpikeGearKey)}" id="spikeg" class="keyPressLow" maxlength="1"
onkeyup="this.value = this.value.toUpperCase();" type="text"/>
<h3 class="menuPrompt">Samurai: </h3> <input value="$
{String.fromCharCode(SamuraiArmorKey)}" id="samuraiArmor" class="keyPressLow"
onkeyup="this.value = this.value.toUpperCase();" type="text"/>
<h3 class="menuPrompt">Emp: </h3> <input value="$
{String.fromCharCode(EmpHelmetKey)}" id="empHelmet" class="keyPressLow"
onkeyup="this.value = this.value.toUpperCase();" type="text"/>
<h3 class="menuPrompt">Bush: </h3> <input value="$
{String.fromCharCode(BushGearKey)}" id="bushGear" class="keyPressLow"
onkeyup="this.value = this.value.toUpperCase();" type="text"/>
<h3 class="menuPrompt">Assassin: </h3> <input value="$
{String.fromCharCode(AssassinGearKey)}" id="assassinGear" class="keyPressLow"
onkeyup="this.value = this.value.toUpperCase();" type="text"/>
<h3 class="menuPrompt">Scavenger: </h3> <input value="$
{String.fromCharCode(ScavengerGearKey)}" id="scavengerGear" class="keyPressLow"
onkeyup="this.value = this.value.toUpperCase();" type="text"/>
<hr>
<h3 style="font-size: 17px;"> Map Settings </h3>

<label class="container"> Biomes


<input type="checkbox" id="myCheck">
<span class="checkmark"></span>
</label>
</div>
</div>
<div class="modal-footer">
<h3 style="font-size: 17px;">Share this hack with other users!</h3>
<p>Greasy Fork</p>
</div>
</div>
</div>
`
document.body.appendChild(menuChange)

$("#tankGear").on("input", () => {
var cval = $("#tankGear").val();
if (cval){
TankGearKey = cval.toUpperCase();
TankGearKey = TankGearKey.charCodeAt(0);
console.log(TankGearKey);
}
});

$("#scavengerGear").on("input", () => {
var cval = $("#scavengerGear").val();
if (cval){
ScavengerGearKey = cval.toUpperCase();
ScavengerGearKey = ScavengerGearKey.charCodeAt(0);
console.log(ScavengerGearKey);
}
});

$("#assassinGear").on("input", () => {
var cval = $("#assassinGear").val();
if (cval){
AssassinGearKey = cval.toUpperCase();
AssassinGearKey = AssassinGearKey.charCodeAt(0);
console.log(AssassinGearKey);
}
});

$("#empHelmet").on("input", () => {
var cval = $("#empHelmet").val();
if (cval){
EmpHelmetKey = cval.toUpperCase();
EmpHelmetKey = EmpHelmetKey.charCodeAt(0);
console.log(EmpHelmetKey);
}
});

$("#bullHelm").on("input", () => {
var cval = $("#bullHelm").val();
if (cval){
BullHelmetKey = cval.toUpperCase();
BullHelmetKey = BullHelmetKey.charCodeAt(0);
console.log(BullHelmetKey);
}
});

$("#bushGear").on("input", () => {
var cval = $("#bushGear").val();
if (cval){
BushGearKey = cval.toUpperCase();
BushGearKey = BushGearKey.charCodeAt(0);
console.log(BushGearKey);
}
});

$("#samuraiArmor").on("input", () => {
var cval = $("#samuraiArmor").val();
if (cval){
SamuraiArmorKey = cval.toUpperCase();
SamuraiArmorKey = SamuraiArmorKey.charCodeAt(0);
console.log(SamuraiArmorKey);
}
});

$("#soldier").on("input", () => {
var cval = $("#soldier").val();
if (cval){
SoldierHelmetKey = cval.toUpperCase();
SoldierHelmetKey = SoldierHelmetKey.charCodeAt(0);
console.log(SoldierHelmetKey);
}
});

$("#turret").on("input", () => {
var cval = $("#turret").val();
if (cval){
TurretKey = cval.toUpperCase();
TurretKey = TurretKey.charCodeAt(0);
console.log(TurretKey);
}
});

var styleItem = document.createElement("style");


styleItem.type = "text/css";
styleItem.appendChild(document.createTextNode(`
.keyPressLow {
margin-left: 8px;
font-size: 16px;
margin-right: 8px;
height: 25px;
width: 50px;
background-color: #fcfcfc;
border-radius: 3.5px;
border: none;
text-align: center;
color: #4a4a4a;
border: 0.5px solid #f2f2f2;
}

.menuPrompt {
font-size: 17px;
font-family: 'Hammersmith One';
color: #4A4A4A;
flex: 0.2;
text-align: center;
margin-top: 10px;
display: inline-block;
}

.modal {
display: none;
position: fixed;
z-index: 1;
left: 0;
top: 0;
overflow: auto;
height: 100%;
width: 100%;
}

.modal-content {
margin: 10% auto;
width: 40%;
box-shadow: 0 5px 8px 0 rgba(0, 0, 0, 0.2), 0 7px 20px 0 rgba(0, 0, 0, 0.17);
font-size: 14px;
line-height: 1.6;
}

.modal-header h2,
.modal-footer h3 {
margin: 0;
}

.modal-header {
background: #00FF00;
padding: 15px;
color: #fff;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
}

.modal-body {
padding: 10px 20px;
background: #fff;
}

.modal-footer {
background: #00FF00;
padding: 10px;
color: #fff;
text-align: center;
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
}

.closeBtn {
color: #ccc;
float: right;
font-size: 30px;
color: #fff;
}

.closeBtn:hover,
.closeBtn:focus {
color: #000;
text-decoration: none;
cursor: pointer;
}

/* Customize the label (the container) */


.container {
display: block;
position: relative;
padding-left: 35px;
margin-bottom: 12px;
cursor: pointer;
font-size: 16px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}

/* Hide the browser's default checkbox */


.container input {
position: absolute;
opacity: 0;
cursor: pointer;
height: 0;
width: 0;
}

/* Create a custom checkbox */


.checkmark {
position: absolute;
top: 0;
left: 0;
height: 25px;
width: 25px;
background-color: #eee;
}

/* On mouse-over, add a grey background color */


.container:hover input ~ .checkmark {
background-color: #ccc;
}

/* When the checkbox is checked, add a blue background */


.container input:checked ~ .checkmark {
background-color: #2196F3;
}ddd

/* Create the checkmark/indicator (hidden when not checked) */


.checkmark:after {
content: "";
position: absolute;
display: none;
}

/* Show the checkmark when checked */


.container input:checked ~ .checkmark:after {
display: block;
}

/* Style the checkmark/indicator */


.container .checkmark:after {
left: 9px;
top: 5px;
width: 5px;
height: 10px;
border: solid white;
border-width: 0 3px 3px 0;
-webkit-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
}

`))
document.head.appendChild(styleItem);

$("#adCard").css({display: "none"});

document.addEventListener('keydown', function(e) {
if (e.keyCode == uneqiup && document.activeElement.id.toLowerCase() !==
'chatbox'){
console.log("done")
storeEquip(0);
} else if (e.keyCode == 113){
if (modal.style.display = "none") {
modal.style.display = "block";
} else {
modal.style.display = "none";
}
} else if (e.keyCode == ScavengerGearKey &&
document.activeElement.id.toLowerCase() !== 'chatbox'){
storeEquip(ID_ScavengerGearGear);
} else if (e.keyCode == AssassinGearKey &&
document.activeElement.id.toLowerCase() !== 'chatbox'){
storeEquip(ID_AssassinGear);
} else if (e.keyCode == BushGearKey &&
document.activeElement.id.toLowerCase() !== 'chatbox'){
storeEquip(ID_BushGear);
} else if (e.keyCode == EmpHelmetKey && document.activeElement.id.toLowerCase()
!== 'chatbox'){
storeEquip(ID_EmpHelmet);
} else if (e.keyCode == TankGearKey &&
document.activeElement.id.toLowerCase() !== 'chatbox'){
storeEquip(ID_TankGear);
} else if (e.keyCode == SamuraiArmorKey &&
document.activeElement.id.toLowerCase() !== 'chatbox'){
storeEquip(ID_SamuraiArmor);
} else if (e.keyCode == SoldierHelmetKey &&
document.activeElement.id.toLowerCase() !== 'chatbox'){
storeEquip(ID_SoldierHelmet);
} else if (e.keyCode == BullHelmetKey &&
document.activeElement.id.toLowerCase() !== 'chatbox'){
storeEquip(ID_BullHelmet);
} else if (e.keyCode == BoosterHatKey &&
document.activeElement.id.toLowerCase() !== 'chatbox'){
storeEquip(ID_BoosterHat);
} else if (e.keyCode == SpikeGearKey &&
document.activeElement.id.toLowerCase() !== 'chatbox'){
storeEquip(ID_SpikeGear);
} else if (e.keyCode == TurretKey && document.activeElement.id.toLowerCase() !
== 'chatbox'){
storeEquip(ID_TurretGear);
}
})

// Get modal element


var modal = document.getElementById("simpleModal");
// Get close button
var closeBtn = document.getElementsByClassName('closeBtn')[0];

// Events
closeBtn.addEventListener('click', closeModal);
window.addEventListener('click', outsideClick);

// Close
function closeModal() {
modal.style.display = 'none';
}

// Close If Outside Click


function outsideClick(e) {
if (e.target == modal) {
modal.style.display = 'none';
}
}

function Parse() {
document.addEventListener('keydown', function (CustomKey1) {
if (CustomKey1.keyCode == 223) {
storeBuy(6)
console.info('Attempted to buy soldier')
}
});
};

document.addEventListener('keydown', function (CustomKey1) {


if (CustomKey1.keyCode == 223) {
storeBuy(7)
console.info('Attempted to buy bull')
}
}
);
;

document.addEventListener('keydown', function (CustomKey1) {


if (CustomKey1.keyCode == 223) {
storeBuy(40)
console.info('Attempted to buy tank')
}
}
);
;
document.addEventListener('keydown', function (CustomKey1) {
if (CustomKey1.keyCode == 223) {
storeBuy(12)
console.info('Attempted to buy booster')
}
}
);
;
document.addEventListener('keydown', function (CustomKey1) {
if (CustomKey1.keyCode == 223) {
storeBuy(53)
console.info('Attempted to buy turret')
}
}
);
;
document.addEventListener('keydown', function (CustomKey1) {
if (CustomKey1.keyCode == 223) {
storeBuy(20)
console.info('Attempted to buy samurai')
}
}
);
;
document.addEventListener('keydown', function (CustomKey1) {
if (CustomKey1.keyCode == 223) {
storeBuy(20)
console.info('Attempted to buy emp')
}
}
);
;
document.addEventListener('keydown', function (CustomKey1) {
if (CustomKey1.keyCode == 223) {
storeBuy(31)
console.info('Attempted to buy flipper')
}
}
);
;
document.addEventListener('keydown', function (CustomKey1) {
if (CustomKey1.keyCode == 223) {
storeBuy(56)
console.info('Attempted to buy assassin')
}
}
);
;
document.addEventListener('keydown', function (CustomKey1) {
if (CustomKey1.keyCode == 223) {
storeBuy(10)
console.info('Attempted to buy bush')
}
}
);
;
document.addEventListener('keydown', function (CustomKey1) {
if (CustomKey1.keyCode == 223) {
storeBuy(27)
console.info('Attempted to buy scavenger')
}
}
);
;
Parse();
// ==UserScript==
// @name This is a basic script, just visual moomoo.io changes.
// @namespace This is a basic script, just visual moomoo.io changes.
// @version 2.2.1
// @match *://*moomoo.io/*
// @match *://*sandbox.moomoo.io/*
// @match *://*dev.moomoo.io/*
// @description A few changes.
// @author Alone? Al
// @grant none
// ==/UserScript==
document.getElementById("gameName").style.color = "grey";
document.getElementById("setupCard").style.color = "blue";
document.getElementById('gameName').innerHTML = 'CXMOD';

$('#gameName').css({'color': '#000000',
'text-shadow': '0 1px 0 rgba(231, 76, 60), 0 2px 0 rgba(231,
76, 60), 0 3px 0 rgba(231, 76, 60), 0 4px 0 rgba(231, 76, 60), 0 5px 0 rgba(231,
76, 60), 0 6px 0 rgba(231, 76, 60), 0 7px 0 rgba(231, 76, 60), 0 8px 0 rgba(231,
76, 60), 0 9px 0 rgba(255, 0, 0)',
'text-align': 'center',
'font-size': '156px',
'margin-bottom': '-30px'});

$('#gameName').css({'color': '#000000',
'text-shadow': '0 1px 0 rgba(231, 76, 60), 0 2px 0 rgba(231,
76, 60), 0 3px 0 rgba(231, 76, 60), 0 4px 0 rgba(231, 76, 60), 0 5px 0 rgba(231,
76, 60), 0 6px 0 rgba(231, 76, 60), 0 7px 0 rgba(231, 76, 60), 0 8px 0 rgba(231,
76, 60), 0 9px 0 rgba(255, 0, 0)',
'text-align': 'center',
'font-size': '156px',
'margin-bottom': '-30px'});

document.getElementById('enterGame').innerHTML = 'KILL NOOBS';


document.getElementById("gameName").style.color = "grey";
document.getElementById('loadingText').innerHTML = '...Loading CXMoD...';
document.getElementById('nameInput').placeholder = "NoobKiller69";
document.getElementById('chatBox').placeholder = "Message...";
document.getElementById("pingDisplay").style.color = "red";
document.getElementById('diedText').innerHTML = 'DON"T GIVE UP';
document.getElementById('diedText').style.color = "red";
$('#leaderboard').append('CXMOD');

document.getElementById("storeHolder").style = "height: 1500px; width: 450px;"

document.getElementById('adCard').remove();
document.getElementById('errorNotification').remove();

document.getElementById("leaderboard").style.color = "black";
document.getElementById("gameName").style.color = "blue";
document.getElementById("setupCard").style.color = "blue";
document.getElementById("promoImg").remove();
document.getElementById("scoreDisplay").style.color = "red";
document.getElementById("woodDisplay").style.color = "light blue";
document.getElementById("stoneDisplay").style.color = "black";
document.getElementById("killCounter").style.color = "blue";
document.getElementById("foodDisplay").style.color = "red";
document.getElementById("ageText").style.color = "black";
document.getElementById("allianceButton").style.color = "black";
document.getElementById("chatButton").style.color = "black";
document.getElementById("storeButton").style.color = "black";
$("#mapDisplay").css({background: `url('https://yt3.ggpht.com/a/AATXAJyH-
SPlIzKnLf7yxVI-aBjXSMy7sC5ynS3F=s144-c-k-c0xffffffff-no-rj-mo')`});

$("#mapDisplay").css({
'border-radious':'350px',
'border':'3px solid #ff0202'
});

$("#ageBarContainer").append('</br><div id="hacktext"></div><div style="width:


100%;position: absolute;bottom: 94px;text-align: center;color:blue;font-size:
24px;" id="freetext"></div><div style="width: 100%;position: absolute;bottom:
144px;text-align: center;color: #ed3f00;font-size: 24px;" id="ptext"></div><div
style="width: 100%;position: absolute;bottom: 224px;text-align: center;color:
#9a008b;font-size: 24px;" id="ctext"></div><div style="width: 100%;position:
absolute;top: 100px;text-align: center;color: white;font-size: 12px;"
id="bilgitext">F1 = Katana, F2 = Musket, F3 = Crossbow, F4 = Max Mill, F6 = Max
Wall, F7= Spin Spike, F8 = Fast Crossbow, F9 = Great Axe</div><div style="width:
100%;position: absolute;bottom: 170px;text-align: center;color: darkgreen;font-
size: 24px;" id="atext"></div><div style="width: 100%;position: absolute;bottom:
196px;text-align: center;color: black;font-size: 24px;" id="mtext"></div>');

$('.menuCard').css({'white-space': 'normal',
'text-align': 'center',
'background-color': 'rgba(0, 0, 0, 0)',
'-moz-box-shadow': '0px 0px rgba(255, 255, 255, 0)',
'-webkit-box-shadow': '0px 0px rgba(255, 255, 255, 0)',
'box-shadow': '0px 0px rgba(255, 255, 255, 0)',
'-webkit-border-radius': '0px',
'-moz-border-radius': '0px',
'border-radius': '0px',
'margin': '15px',
'margin-top': '15px'});

$('#menuContainer').css({'white-space': 'normal'});

$('#nativeResolution').css({'cursor': 'pointer'});

$('#playMusic').css({'cursor': 'pointer'});

$('#guideCard').css({'overflow-y': 'hidden',
'margin-top': 'auto',
'margin-bottom': '30px'});

$('#gameName').css({'color': '#000000',
'text-shadow': '0 1px 0 rgba(231, 76, 60), 0 2px 0 rgba(231,
76, 60), 0 3px 0 rgba(231, 76, 60), 0 4px 0 rgba(231, 76, 60), 0 5px 0 rgba(231,
76, 60), 0 6px 0 rgba(231, 76, 60), 0 7px 0 rgba(231, 76, 60), 0 8px 0 rgba(231,
76, 60), 0 9px 0 rgba(255, 0, 0)',
'text-align': 'center',
'font-size': '156px',
'margin-bottom': '-30px'});

$('#skinColorHolder').css({'margin-bottom': '30.75px'});

$('.settingRadio').css({'margin-bottom': '30.75px'});

$('#linksContainer2').css({'-webkit-border-radius': '0px 0 0 0',


'-moz-border-radius': '0px 0 0 0',
'border-radius': '0px 0 0 0',
'right': '44%',
'left': '44%',
'background-color': 'rgba(0, 0, 0, 0)',
'text-align': 'center',
'bottom': '12px'});

$('#gameName').css({'color': '#000000',
'text-shadow': '0 1px 0 rgba(231, 76, 60), 0 2px 0 rgba(231,
76, 60), 0 3px 0 rgba(231, 76, 60), 0 4px 0 rgba(231, 76, 60), 0 5px 0 rgba(231,
76, 60), 0 6px 0 rgba(231, 76, 60), 0 7px 0 rgba(231, 76, 60), 0 8px 0 rgba(231,
76, 60), 0 9px 0 rgba(255, 0, 0)',
'text-align': 'center',
'font-size': '156px',
'margin-bottom': '-30px'});
$("#leaderboard").css({
'border':'3px solid #ff0202'
});

$('pingDisplay').css({'color': '#ff0202',
'text-shadow': '0 1px 0 rgba(255, 255, 255, 0), 0 2px 0
rgba(255, 255, 255, 0), 0 3px 0 rgba(255, 255, 255, 0), 0 4px 0 rgba(255, 255, 255,
0), 0 5px 0 rgba(255, 255, 255, 0), 0 6px 0 rgba(255, 255, 255, 0), 0 7px 0
rgba(255, 255, 255, 0), 0 8px 0 rgba(255, 255, 255, 0), 0 9px 0 rgba(255, 255, 255,
0)',
'text-align': 'center',
'font-size': '156px',
'margin-bottom': '-30px'});

$('#loadingText').css({'color': '#000000',
'background-color': 'rgba(0, 0, 0, 0)',
'padding': '8px',
'right': '150%',
'left': '150%',
'margin-top': '40px'});

$('.ytLink').css({'color': '#144db4',
'padding': '8px',
'background-color': 'rgba(255, 0, 0, 0)'});

$('.menuLink').css({'color': '#144db4'});

$('#nameInput').css({'border-radius': '0px',
'-moz-border-radius': '0px',
'-webkit-border-radius': '0px',
'border': 'hidden'});

$('#serverSelect').css({'cursor': 'pointer',
'color': '#000000',
'background-color': '#808080',
'border': 'hidden',
'font-size': '20px'});

$('.menuButton').css({'border-radius': '0px',
'-moz-border-radius': '0px',
'-webkit-border-radius': '0px'});

$('#promoImgHolder').css({'position': 'absolute',
'bottom': '-7%',
'left': '20px',
'width': '420px',
'height': '236.25px',
'padding-bottom': '18px',
'margin-top': '0px'});
$('#adCard').css({'position': 'absolute',
'bottom': '-7%',
'right': '20px',
'width': '420px',
'height': '236.25px',
'padding-bottom': '18px'});

$('.menuHeader').css({'color': 'rgba(255, 255, 255, 1)'});

$('#killCounter').css({'color': '#ededed'});

$('#diedText').css({'background-color': 'rgba(0, 0, 0, 0)'});

$('#gameCanvas').css({'background-color': '#f4f4f4'});

$('#allianceButton').css({'color': 'rgba(241, 241, 241, 1)'});

$('#storeButton').css({'color': 'rgba(241, 241, 241, 1)'});

$('#chatButton').css({'color': 'rgba(241, 241, 241, 1)'});

$('.gameButton').css({'-webkit-border-radius': '0px 0 0 0',


'-moz-border-radius': '0px 0 0 0',
'border-radius': '0px 0 0 0',
'background-color': 'rgba(0, 0, 0, 0.4)'});

$('#partyButton').css({'color': '#000000',
'text-shadow': '0 3px 0 rgba(231, 76, 60), 0 3px 0 rgba(231, 76, 60), 0 3px 0
rgba(231, 76, 60), 0 3px 0 rgba(231, 76, 60), 0 3px 0 rgba(231, 76, 60), 0 3px 0
rgba(231, 76, 60), 0 3px 0 rgba(231, 76, 60), 0 3px 0 rgba(231, 76, 60), 0 3px 0
rgba(255, 0, 0)',
'text-align': 'center',
'font-size': '30px',
'margin-bottom': '30px'});

$('#joinPartyButton').css({'color': '#000000',
'text-shadow': '0 3px 0 rgba(231, 76, 60), 0 3px 0 rgba(231, 76, 60), 0 3px 0
rgba(231, 76, 60), 0 3px 0 rgba(231, 76, 60), 0 3px 0 rgba(231, 76, 60), 0 3px 0
rgba(231, 76, 60), 0 3px 0 rgba(231, 76, 60), 0 3px 0 rgba(231, 76, 60), 0 3px 0
rgba(255, 0, 0)',
'text-align': 'center',
'font-size': '30px',
'margin-bottom': '30px'});
$('.uiElement, .resourceDisplay').css({'-webkit-border-radius': '0px',
'-moz-border-radius': '0px',
'border-radius': '0px',
'background-color': 'rgb(101, 11, 11);'});

$('#chatBox').css({'-webkit-border-radius': '0px',
'-moz-border-radius': '0px',
'border-radius': '700px',
'background-color': 'rgba(0, 0, 0, 0.18)',
'text-align': 'center'});

$('#mainMenu').css({'-webkit-border-radius': '0px',
'text-align': 'center'});

$('#foodDisplay').css({'color': '#F40D0D'});
$('#killCounter').css({'color': '#F40D0D'});
$('#woodDisplay').css({'color': '#49FF00'});
$('#stoneDisplay').css({'color': '#404040'});
$('#scoreDisplay').css({'color': '#ffd700'});

$('#ageBar').css({'-webkit-border-radius': '0px',
'-moz-border-radius': '0px',
'border-radius': '0px',
'background-color': 'rgba(0, 0, 0, 0.4)'});
$('#ageBarBody').css({'-webkit-border-radius': '0px',
'-moz-border-radius': '0px',
'border-radius': '0px',
'background-color': '#FF0000'});

$('.storeTab').css({'-webkit-border-radius': '0px',
'-moz-border-radius': '0px',
'border-radius': '0px',
'background-color': 'rgba(0, 0, 0, 0.4)'});

$('#storeHolder').css({'-webkit-border-radius': '0px',
'-moz-border-radius': '0px',
'border-radius': '0px',
'background-color': 'rgba(0, 0, 0, 0.4)'});

$('#allianceHolder').css({'-webkit-border-radius': '0px',
'-moz-border-radius': '0px',
'border-radius': '0px',
'background-color': 'rgba(0, 0, 0, 0.4)'});

$('.actionBarItem').css({'-webkit-border-radius': '0px',
'border-radius': '0px',
'background-color': 'rgba(0, 0, 0, 0.4)'});
document.getElementById("followText").innerHTML = "unsub^^^"
document.getElementById("followText").style = "bottom: -0px;"
document.getElementById("linksContainer2").innerHTML = "NoobKiller69 has come to
life";
$('#menuContainer').append('kill noobs')

You might also like