Rock Mod

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 41

/// ==UserScript==

// @name Rock Mod


// @version v3
// @description It's about drive, it's about power, we stay hungry, we devour
// @author Sploopy & W4IT
// @match *://*.moomoo.io/*
// @require https://code.jquery.com/jquery-3.3.1.slim.min.js
// @require
https://cdnjs.cloudflare.com/ajax/libs/socket.io/1.4.5/socket.io.min.js
// @require http://code.jquery.com/jquery-3.3.1.min.js
// @require
https://cdn.jsdelivr.net/npm/[email protected]/dist/msgpack.min.js
// @require
https://cdn.jsdelivr.net/npm/[email protected]/fontfaceobserver.standalone.min
.js
// @grant none
// @namespace none - yet
// ==/UserScript==

/*
Lyrics:

It's about drive, it's about power, we stay hungry, we devour


Put in the work, put in the hours and take what's ours
Black and Samoan in my veins, my culture bangin' with Strange
I change the game so what's my motherfuckin' name? (Rock)
What they gonna get though?
Desecration, defamation, if you wanna bring it to the masses
Face to face now we escalatin' when I have to put boots to asses
Mean on ya like a dream when I'm rumblin'
You're gonna scream, "Mama"
So bring drama to the king Brahma (Then what?)
Comin' at ya' with extreme mana (Ahoo, ahoo, ahoo)

*/
// anti invis
CanvasRenderingContext2D.prototype.rotatef =
CanvasRenderingContext2D.prototype.rotate
CanvasRenderingContext2D.prototype.rotate = function(e) {
if (Math.abs(e) > 1e300) {
e = Math.atan2(Math.cos(e), Math.sin(e));
this.globalAlpha = 0.5;
this.rotatef(e);
} else {
this.rotatef(e);
}
};

// anti
var anti1 = null;
var ez = 1;
var hitCount = 0;
var antibullspam = 0;
var eze = false;
var autoh = true;
let antilol = true;
var shame = 0;
let bulltick = 0;
// insta
var autoreload = false;

//hat stuff
var pig = false;
var hatspam = false;
var assasin = false;
// mill codes
var AutoMill = 0;
var adcx = 0;
var cba = 0;
var LRpress = 0;
var millDir = "null";
var UDpress = 0;
var UPpress = 0;
var LEFTpress = 0;
var DOWNpress = 0;
var RIGHTpress = 0;
setInterval(() => {
//AutoMill
if (AutoMill == 1 && millDir != "null") {
if (myPlayer.accessory != 11 || ((myPlayer.y < 2400 && myPlayer.hat != 15)
|| ((myPlayer.y > 6850 && myPlayer.y < 7550) && myPlayer.hat != 31) ||
(((myPlayer.y > 2400 && myPlayer.y < 6850) || myPlayer.y > 7550) && myPlayer.hat !=
12))) {}
place(millType, (toRad(9000000000) + (Math.PI * 2) + millDir));
place(millType, (toRad(9000000000) + (Math.PI * 2) + millDir + 1.5));
place(millType, (toRad(9000000000) + (Math.PI * 2) + millDir - 1.5));
}
}, 10);
setInterval(() => {
//IMPORTANT SH*T
if (UPpress == 1 && DOWNpress == 0) {
UDpress = 1;
}
if (UPpress == 0 && DOWNpress == 1) {
UDpress = (-1);
}
if (UPpress == 0 && DOWNpress == 0) {
UDpress = 0;
}
if (LEFTpress == 1 && RIGHTpress == 0) {
LRpress = 1;
}
if (LEFTpress == 0 && RIGHTpress == 1) {
LRpress = (-1);
}
if (LEFTpress == 0 && RIGHTpress == 0) {
LRpress = 0;
}
//NotMoving
if (LRpress == 0 && UDpress == 0) {
millDir = "null";
}
//LinearOrWhateverYouCallIt
if (LRpress == 1 && UDpress == 0) { //left
millDir = 0;
}
if (LRpress == (-1) && UDpress == 0) { //right
millDir = Math.PI;
}
if (LRpress == 0 && UDpress == 1) { //up
millDir = Math.PI * (0.5);
}
if (LRpress == 0 && UDpress == (-1)) { //down
millDir = Math.PI * (1.5);
}
//Diagonal
if (LRpress == 1 && UDpress == 1) {
millDir = Math.PI * (0.25);
}
if (LRpress == (-1) && UDpress == 1) {
millDir = Math.PI * (0.75);
}
if (LRpress == 1 && UDpress == (-1)) {
millDir = Math.PI * (1.75);
}
if (LRpress == (-1) && UDpress == (-1)) {
millDir = Math.PI * (1.25);
}
}, 100);
window.addEventListener('keydown', (e) => {
if ((e.keyCode == 87 || e.keyCode == 38) && !e.repeat && UPpress == 0 &&
document.activeElement.id.toLowerCase() !== 'chatbox') {
UPpress = 1;
}
if ((e.keyCode == 65 || e.keyCode == 37) && !e.repeat && LEFTpress == 0 &&
document.activeElement.id.toLowerCase() !== 'chatbox') {
LEFTpress = 1;
}
if ((e.keyCode == 83 || e.keyCode == 40) && !e.repeat && DOWNpress == 0 &&
document.activeElement.id.toLowerCase() !== 'chatbox') {
DOWNpress = 1;
}
if ((e.keyCode == 68 || e.keyCode == 39) && !e.repeat && RIGHTpress == 0 &&
document.activeElement.id.toLowerCase() !== 'chatbox') {
RIGHTpress = 1;
}
});
window.addEventListener('keyup', (e) => {
if ((e.keyCode == 87 || e.keyCode == 38) && UPpress == 1 &&
document.activeElement.id.toLowerCase() !== 'chatbox') {
UPpress = 0;
}
if ((e.keyCode == 65 || e.keyCode == 37) && LEFTpress == 1 &&
document.activeElement.id.toLowerCase() !== 'chatbox') {
LEFTpress = 0;
}
if ((e.keyCode == 83 || e.keyCode == 40) && DOWNpress == 1 &&
document.activeElement.id.toLowerCase() !== 'chatbox') {
DOWNpress = 0;
}
if ((e.keyCode == 68 || e.keyCode == 39) && RIGHTpress == 1 &&
document.activeElement.id.toLowerCase() !== 'chatbox') {
RIGHTpress = 0;
}
});
var kills = 10;
setInterval(getkills, 250);

function getkills() {
var count = parseInt(document.getElementById("killCounter").innerText);
if (count > kills) {
doNewSend(["ch", ["R" + count + "ck"]]);
}
kills = count
}
var FPS, PING;
(function() {
var UPDATE_DELAY = 700;
var lastUpdate = 0;
var frames = 0;

function updateCounter() {
var now = Date.now();
var elapsed = now - lastUpdate;
if (elapsed < UPDATE_DELAY) {
++frames;
} else {
FPS = Math.round(frames / (elapsed / 1000));
frames = 0;
lastUpdate = now;
}
requestAnimationFrame(updateCounter);
}
lastUpdate = Date.now();
requestAnimationFrame(updateCounter);
})();

let fpsviewer = document.createElement("div");


fpsviewer.id = "fpsviewer"
document.body.prepend(fpsviewer);
setInterval(() => {
PING = document.getElementById("pingDisplay").innerHTML;
fpsviewer.innerHTML = `${FPS}FPS<br>${PING}`
}, 50);
let lhat, lacc;
let sr = setInterval(() => {
window.follmoo && (window.follmoo(), clearInterval(sr));
}, 10);
window.location.native_resolution = true;
document.getElementById('gameCanvas').addEventListener('mousedown', function(e) {
if (document.getElementById("click").checked) {
if (e.button == 2) {
lhat = myPlayer.hat
lacc = myPlayer.accessory
if (secondary == 10) {
doNewSend(["5", [secondary, true]]);
}
hat(document.getElementById('rightclick').value);
acc(0);
acc(21);
doNewSend(["7", [1]])
}
}
if (e.button == 0) {
if (document.getElementById("click").checked) {
lhat = myPlayer.hat
lacc = myPlayer.accessory
hat(document.getElementById('leftclick').value);
acc(0);
acc(21);
doNewSend(["7", [1]])
}
}
});
document.getElementById('gameCanvas').addEventListener('mouseup', function(e) {
if (document.getElementById("click").checked) {
if (e.button == 2) {
doNewSend(["7", [1]])
if (document.getElementById('afterRightClick').value == "hatBefore") {
doNewSend(['13c', [0, lhat, 0]])
} else {
if (myPlayer.y < 2400) {
hat(15);
} else {
if (myPlayer.y > 6850 && myPlayer.y < 7550) {
hat(31);
} else {
hat(6);
}
}
}
acc(11);
if (secondary == 10) {
doNewSend(["5", [primary, true]]);
}
}
}
if (document.getElementById("click").checked) {
if (e.button == 0) {
doNewSend(["7", [1]])
if (document.getElementById('afterLeftClick').value == "hatBefore") {
doNewSend(['13c', [0, lhat, 0]])
} else {
if (myPlayer.y < 2400) {
hat(15);
} else {
if (myPlayer.y > 6850 && myPlayer.y < 7550) {
hat(31);
} else {
hat(6);
}
}
}
acc(11);
}
}
});

document.getElementById("enterGame").addEventListener('click', autohide);

function autohide() {
$("#ot-sdk-btn-floating").hide();
}
document.getElementById("promoImgHolder").remove();
document.querySelector("#pre-content-container").remove();
$("#chatButton").css({
"display": "none"
});
$("#adCard").remove();
$("#youtuberOf").remove();
$("#downloadButtonContainer").remove();
$("#mobileDownloadButtonContainer").remove();
$(".downloadBadge").remove();
document.getElementById("moomooio_728x90_home").style.display = "none";
$("#moomooio_728x90_home").parent().css({
display: "none"
});

function _toConsumableArray(arr) {
if (Array.isArray(arr)) {
var i = 0;
var arr2 = Array(arr.length);
for (; i < arr.length; i++) {
arr2[i] = arr[i];
}
return arr2;
} else {
return Array.from(arr);
}
}
let att = 0;
var hit360 = false;
var autobs = false;
var enemdist;
var abs = false;
var enemyabs = false;
var spike = false;
var boost = false;
var mouseX = void 0;
var mouseY = void 0;
var width = void 0;
var height = void 0;
setInterval(() => {
if (att == 1) {
if (enemdist <= 330 && enemdist >= 320) {
var last = myPlayer.hat;
var lastt = myPlayer.accessory;
doNewSend(["33", [null]]);
autoaim = true;
autoaim = true;
autoaim = true;
setTimeout(() => {
place(boostType, nearestEnemyAngle);
doNewSend(["5", [secondary, true]]);
doNewSend(["ch", [""]]);
doNewSend(["13c", [0, 53, 0]]);
doNewSend(["13c", [0, 0, 1]]);
doNewSend(["13c", [0, 17, 1]]);
doNewSend(["c", [1]]);
}, 120);
setTimeout(() => {
doNewSend(["33", [nearestEnemyAngle]]);
doNewSend(["13c", [1, 7, 0]]);
doNewSend(["13c", [0, 7, 0]]);
doNewSend(["5", [secondary, false]]);
doNewSend(["5", [primary, true]]);
doNewSend(["7", [1]]);
doNewSend(["c", [1, nearestEnemyAngle]]);
doNewSend(["c", [1, nearestEnemyAngle]]);
doNewSend(["7", [1]]);
doNewSend(["7", [1]]);
}, 240);
setTimeout(() => {
autoaim = false;
doNewSend(["c", [0, null]]);
doNewSend(["7", [1]]);
doNewSend(["5", [primary, true]]);
doNewSend(["13c", [0, last, 0]]);
doNewSend(["13c", [0, last, 0]]);
autoaim = false;
att = 0
}, 360);
}
}
}, 0);
setInterval(function() {
if (abs) {
if (enemyabs) {
boost = true;
} else {
boost = false;
}
if (spike) {
boost = false;
place(spikeType, myPlayer.dir + toRad(20));
place(spikeType, myPlayer.dir + toRad(90));
place(spikeType, myPlayer.dir + toRad(145));
place(spikeType, myPlayer.dir + toRad(185));
place(spikeType, myPlayer.dir + toRad(260));
place(spikeType, myPlayer.dir + toRad(320));
place(spikeType, myPlayer.dir + toRad(360));
}
}
}, 100);

setInterval(function() {
if (boost && abs) {
place(boostType, nearestEnemyAngle);
doNewSend(['33', [nearestEnemyAngle]]);
}
}, 200)
setInterval(() => {
if (hatspam == true) {
setTimeout(() => {
hat(51);
setTimeout(() => {
hat(50);
setTimeout(() => {
hat(28);
setTimeout(() => {
hat(29);
setTimeout(() => {
hat(30);
setTimeout(() => {
hat(36);
setTimeout(() => {
hat(37);
setTimeout(() => {
hat(38);
setTimeout(() => {
hat(44);
setTimeout(() => {
hat(35);
setTimeout(() => {
hat(42);
setTimeout(() => {
hat(43);
setTimeout(() => {
hat(49);
}, 80);
}, 80);
}, 80);
}, 80);
}, 80);
}, 80);
}, 80);
}, 80);
}, 80);
}, 80);
}, 80);
}, 80);
}, 80);
}
}, 1040);

setInterval(() => {
if (hatspam == true && intrap == true && autobreak == true) {
hatspam = false
setTimeout(() => {
if (hatspam == false && intrap == false) {
hatspam = true;
}
}, 250);
}
}, 0);
let automine = false;
setInterval(function() {
if (automine) {
doNewSend(["2", [7.8715926535897935e+270]]);
hit360 = true;
doNewSend(["7", [1]]);
acc(11);
hat(40);
place(turretType, myPlayer.dir + toRad(90));
place(turretType, myPlayer.dir - toRad(90));
place(turretType, myPlayer.dir + toRad(180));
place(turretType, myPlayer.dir + toRad(0));
setTimeout(() => {
doNewSend(["7", [1]]);
hat(6);
hit360 = false;
}, 120)
}
}, 700)
setInterval(function() {
if (hit360) {
doNewSend(["2", [7.8715926535897935e+270]]);
}
}, 90)
setInterval(() => {
if (autobreak == true && intrap == true) {
if (secondary == 10) {
doNewSend(["5", [secondary, true]]);
}
if (primary == 8) {
doNewSend(["5", [secondary, true]]);
}
if (secondary == 15) {
doNewSend(["5", [primary, true]]);
}
if (primary == 4 || 0) {
aim(trap.x - myPlayer.x + window.innerWidth / 2, trap.y - myPlayer.y +
window.innerHeight / 2);
doNewSend(["13c", [0, 40, 0]]);
doNewSend(["7", [1]]);
doNewSend(["2", [trap_a]]);
doNewSend(["c", [1, trap_a]]);
setTimeout(() => {
doNewSend(["7", [1]]);
doNewSend(["13c", [0, 6, 0]]);
}, 190);
}
}
}, 450);
setInterval(() => {
if (secondary == 10 && autobreak == true && intrap == true) {
doNewSend(["13c", [0, 40, 0]]);
doNewSend(["13c", [0, 18, 1]]);
doNewSend(["7", [1]]);
doNewSend(["5", [secondary, true]]);
aim(trap.x - myPlayer.x + window.innerWidth / 2, trap.y - myPlayer.y +
window.innerHeight / 2);
setTimeout(() => {
doNewSend(["7", [1]]);
doNewSend(["13c", [0, 21, 1]]);
doNewSend(["13c", [0, 6, 0]]);
}, 285);
}
}, 550);

// setInterval(() => {
// if(pig == true ){
// document.title = "Piggy";
// } else {
// document.title = "!ROCK!";
// }
setInterval(function() {
if (true) {
if (oldbuyHat != normalHat) {
hat(normalHat);
console.log('Tried. - buyHat');
}
if (oldAcc != normalAcc) {
acc(normalAcc);
console.log('Tried. - Acc');
}
oldbuyHat = normalHat;
oldAcc = normalAcc;
}
}, 25);
setInterval(() => {
if (autoreload == true) {
setTimeout(() => {
doNewSend(["5", [secondary, true]]);
doNewSend(["ch", ["..."]]);
}, 100)
setTimeout(() => {
autoreload = false;
doNewSend(["5", [primary, true]]);
autoPrimary = true;
doNewSend(["ch", ["reloaded"]]);
}, 1600)
}
}, 0);
setInterval(() => {
if (autoreload == true && intrap == true) {
setTimeout(() => {
autoreload = false;
doNewSend(["5", [primary, true]]);
doNewSend(["ch", ["..."]]);
}, 0)
}
}, 1600);

let visualAim = false;


setInterval(function() {
if (autoaim == true) {
doNewSend(['2', [nearestEnemyAngle]]);
}
if (visualAim == true) {
aim(nearestEnemy[1] - myPlayer.x + window.innerWidth / 2, nearestEnemy[2] -
myPlayer.y + window.innerHeight / 2);
};
}, 90);

function normal() {
hat(normalHat);
acc(normalAcc);
}
setInterval(() => {
if (nearestEnemy && nearestEnemy[5] == 9) {
antiBow = true
} else {
antiBow = false
}
}, 5);

function aim(x, y) {
var target = document.getElementById('gameCanvas');
target.dispatchEvent(new MouseEvent('mousemove', {
clientX: x,
clientY: y
}));
}

var ChatSpam1, ChatSpam2, ChatSpam3, ChatSpam4, ChatSpam5, ChatSpam6, ChatSpam7,


ChatSpam8, ChatSpam9, ChatSpam10, ChatSpam11, ChatSpam12, ChatSpam13, ChatSpam14,
ChatSpam15, ChatSpam16, ChatSpam17, ChatSpam18, ChatSpam19, ChatSpam20, ChatSpam21,
ChatSpam22, ChatSpam23, ChatSpam24, ChatSpam25, ChatSpam26, ChatSpam27, ChatSpam28,
ChatSpam29, ChatSpam30, ChatSpam31, ChatSpam32;
var ChatSpam = true
var autoinsta = 0;
var hide = 0
var autobreak = true;
var antitrap = true;
var antiBow = false;
var doInsta = false;
var autoSecondary = false
var autoPrimary = false
var nearestEnemy;
var enemVeryNear;
var nearestEnemyAngle;
var nearestTribeAngle;
var isEnemyNear;
var primary;
var secondary;
var foodType;
var wallType;
var spikeType;
var millType;
var mineType;
var boostType;
var turretType;
var spawnpadType;
var autoaim = false;
var oldbuyHat;
var oldAcc;
var enemiesNear;
var normalHat;
var normalAcc;
var ws;
var msgpack5 = msgpack;
var boostDir;
var myPlayeroldx;
var myPlayeroldy;
var automillx = 10;
var automilly = 10;
var autoMill = false;
var myPlayer = {
id: null,
x: null,
y: null,
dir: null,
object: null,
weapon: null,
clan: null,
isLeader: null,
hat: null,
accessory: null,
isSkull: null
};
var instaSpeed = 80;
let trap_a = null;
let trap = {
x: 0,
y: 0
}
let intrap = false;
let trapid = null;

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(data) {
if (!ws) {
document.ws = this;
ws = this;
socketFound(this);
}
this.oldSend(data);
};

function ChatSpamFC1() {
doNewSend(["ch", ["it's about drive"]]);
clearTimeout(ChatSpam1);
ChatSpam1 = setTimeout(function() {
ChatSpamFC2();
}, 700);
}

function ChatSpamFC2() {
doNewSend(["ch", ["it's about power"]]);
clearTimeout(ChatSpam2);
ChatSpam2 = setTimeout(function() {
ChatSpamFC3();
}, 900);
}

function ChatSpamFC3() {
doNewSend(["ch", ["We stay hungry, we devour"]]);
clearTimeout(ChatSpam3);
ChatSpam3 = setTimeout(function() {
ChatSpamFC4();
}, 900);
}

function ChatSpamFC4() {
doNewSend(["ch", [""]]);
clearTimeout(ChatSpam4);
ChatSpam4 = setTimeout(function() {
ChatSpamFC5();
}, 0);
}

function ChatSpamFC5() {
doNewSend(["ch", ["Put in the work,"]]);
clearTimeout(ChatSpam5);
ChatSpam5 = setTimeout(function() {
ChatSpamFC6();
}, 900);
}

function ChatSpamFC6() {
doNewSend(["ch", ["put in the hours"]]);
clearTimeout(ChatSpam6);
ChatSpam6 = setTimeout(function() {
ChatSpamFC7();
}, 900);
}

function ChatSpamFC7() {
doNewSend(["ch", ["and take what's ours"]]);
clearTimeout(ChatSpam7);
ChatSpam7 = setTimeout(function() {
ChatSpamFC8();
}, 900);
}

function ChatSpamFC8() {
doNewSend(["ch", ["Black and Samoan in my veins"]]);
clearTimeout(ChatSpam8);
ChatSpam8 = setTimeout(function() {
ChatSpamFC9();
}, 900);
}

function ChatSpamFC9() {
doNewSend(["ch", ["My culture bangin' with Strange"]]);
clearTimeout(ChatSpam9);
ChatSpam9 = setTimeout(function() {
ChatSpamFC10();
}, 900);
}

function ChatSpamFC10() {
doNewSend(["ch", ["I change the game"]]);
clearTimeout(ChatSpam10);
ChatSpam10 = setTimeout(function() {
ChatSpamFC11();
}, 900);
}

function ChatSpamFC11() {
doNewSend(["ch", ["so what's my motherfuckin' name"]]);
clearTimeout(ChatSpam11);
ChatSpam11 = setTimeout(function() {
ChatSpamFC12();
}, 900);
}

function ChatSpamFC12() {
doNewSend(["ch", ["!ROCK!"]]);
clearTimeout(ChatSpam12);
ChatSpam12 = setTimeout(function() {
ChatSpamFC13();
}, 1100);
}

function ChatSpamFC13() {
doNewSend(["ch", ["(What they gonna get though?)"]]);
clearTimeout(ChatSpam13);
ChatSpam13 = setTimeout(function() {
ChatSpamFC14();
}, 900);
}

function ChatSpamFC14() {
doNewSend(["ch", ["Desecration"]]);
clearTimeout(ChatSpam14);
ChatSpam14 = setTimeout(function() {
ChatSpamFC15();
}, 800);
}

function ChatSpamFC15() {
doNewSend(["ch", ["defamation"]]);
clearTimeout(ChatSpam15);
ChatSpam15 = setTimeout(function() {
ChatSpamFC16();
}, 900);
}

function ChatSpamFC16() {
doNewSend(["ch", [" if you wanna bring it to the masses"]]);
clearTimeout(ChatSpam16);
ChatSpam16 = setTimeout(function() {
ChatSpamFC17();
}, 900);
}

function ChatSpamFC17() {
doNewSend(["ch", ["Face to face"]]);
clearTimeout(ChatSpam16);
ChatSpam17 = setTimeout(function() {
ChatSpamFC18();
}, 900);
}

function ChatSpamFC18() {
doNewSend(["ch", ["now we escalatin"]]);
clearTimeout(ChatSpam16);
ChatSpam18 = setTimeout(function() {
ChatSpamFC19();
}, 900);
}
function ChatSpamFC19() {
doNewSend(["ch", ["when I have to put boots to asses"]]);
clearTimeout(ChatSpam9);
ChatSpam19 = setTimeout(function() {
ChatSpamFC20();
}, 900);
}

function ChatSpamFC20() {
doNewSend(["ch", ["Mean on ya, like a dream"]]);
clearTimeout(ChatSpam10);
ChatSpam20 = setTimeout(function() {
ChatSpamFC21();
}, 900);
}

function ChatSpamFC21() {
doNewSend(["ch", ["when Im rumblin you're gonna scream"]]);
clearTimeout(ChatSpam11);
ChatSpam21 = setTimeout(function() {
ChatSpamFC22();
}, 900);
}

function ChatSpamFC22() {
doNewSend(["ch", ["you're gonna scream"]]);
clearTimeout(ChatSpam12);
ChatSpam22 = setTimeout(function() {
ChatSpamFC23();
}, 900);
}

function ChatSpamFC23() {
doNewSend(["ch", ["MAMMA"]]);
clearTimeout(ChatSpam13);
ChatSpam23 = setTimeout(function() {
ChatSpamFC24();
}, 900);
}

function ChatSpamFC24() {
doNewSend(["ch", ["So bring drama to the"]]);
clearTimeout(ChatSpam14);
ChatSpam24 = setTimeout(function() {
ChatSpamFC25();
}, 900);
}

function ChatSpamFC25() {
doNewSend(["ch", ["King Brahma (then what?)"]]);
clearTimeout(ChatSpam15);
ChatSpam25 = setTimeout(function() {
ChatSpamFC26();
}, 900);
}

function ChatSpamFC26() {
doNewSend(["ch", ["Comin' at you with extreme mana"]]);
clearTimeout(ChatSpam16);
ChatSpam26 = setTimeout(function() {
ChatSpamFC17();
}, 900);
}

function ChatSpamFC27() {
doNewSend(["ch", ["Thank you, brother, W4it"]]);
clearTimeout(ChatSpam16);
ChatSpam27 = setTimeout(function() {
ChatSpamFC28();
}, 900);
}

function ChatSpamFC28() {
doNewSend(["ch", ["Thank you, Sploopy"]]);
clearTimeout(ChatSpam16);
ChatSpam28 = setTimeout(function() {
ChatSpamFC29();
}, 900);
}

function ChatSpamFC29() {
doNewSend(["ch", ["One take"]]);
clearTimeout(ChatSpam9);
ChatSpam29 = setTimeout(function() {
ChatSpamFC20();
}, 900);
}

function ChatSpamFC30() {
doNewSend(["ch", ["Thats the rock"]]);
clearTimeout(ChatSpam10);
ChatSpam30 = setTimeout(function() {
ChatSpamFC21();
}, 900);
}

function ChatSpamFC31() {
doNewSend(["ch", ["Face Off"]]);
clearTimeout(ChatSpam11);
ChatSpam31 = setTimeout(function() {
ChatSpamFC22();
}, 900);
}

function ChatSpamFC32() {
doNewSend(["ch", [" "]]);
clearTimeout(ChatSpam12);
ChatSpam32 = setTimeout(function() {
ChatSpamFC1();
}, 1000);
}

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

function handleMessage(_x17) {
var b = msgpack5.decode(new Uint8Array(_x17.data));
var data = void 0;
if (b.length > 1) {
data = [b[0]].concat(_toConsumableArray(b[1]));
if (data[1] instanceof Array) {
data = data;
}
} else {
data = b;
}
var item = data[0];
if (!data) {
return;
}
if (item === 'io-init') {
var docElem = document.getElementById('gameCanvas');
width = docElem.clientWidth;
height = docElem.clientHeight;
$(window).resize(function() {
width = docElem.clientWidth;
height = docElem.clientHeight;
});
docElem.addEventListener('mousemove', function(res) {
mouseX = res.clientX;
mouseY = res.clientY;
});
}
if (item == '1' && myPlayer.id == null) {
myPlayer.id = data[1];
}
if (item == '33') {
enemiesNear = [];
var f = 0;
for (; f < data[1].length / 13; f++) {
var object = data[1].slice(13 * f, 13 * f + 13);
if (object[0] == myPlayer.id) {
myPlayer.x = object[1];
myPlayer.y = object[2];
myPlayer.dir = object[3];
myPlayer.object = object[4];
myPlayer.weapon = object[5];
myPlayer.clan = object[7];
myPlayer.isLeader = object[8];
myPlayer.hat = object[9];
myPlayer.accessory = object[10];
myPlayer.isSkull = object[11];
} else if (object[7] != myPlayer.clan || object[7] === null) {
enemiesNear.push(object);
}
}
}

isEnemyNear = ![];
if (enemiesNear) {
nearestEnemy = enemiesNear.sort(function(line, i) {
return dist(line, myPlayer) - dist(i, 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)) < 280) {
isEnemyNear = true;
if (doInsta == false) {
normalHat = 6;
if (primary != 8) {
normalAcc = 21
}
};
}
}
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)) < 600) {
enemyabs = true;
} else {
enemyabs = false;
}
}
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)) < 200) {
enemVeryNear = true;
} else {
enemVeryNear = false;
}
}
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)) < 210) {
spike = true;
} else {
spike = false;
}
}
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)) < 250 && autoinsta) {
autoaim = true;
visualAim = true;
autoPrimary = true;
autoSecondary = false;
doInsta = true;
doNewSend(["ch", [document.getElementById('instachat').value]]);
doNewSend(["13c", [0, 0, 1]]);
doNewSend(["13c", [1, 7, 0]]);
doNewSend(["13c", [0, 7, 0]]);
doNewSend(["5", [primary, true]]);
doNewSend(["7", [1]]);
doNewSend(["13c", [1, 21, 1]]);
doNewSend(["13c", [0, 21, 1]]);
setTimeout(() => {
autoPrimary = false;
autoSecondary = true;
doNewSend(["13c", [0, 0, 0]]);
doNewSend(["13c", [1, 53, 0]]);
doNewSend(["13c", [0, 53, 0]]);
doNewSend(["5", [secondary, true]]);
}, instaSpeed);
setTimeout(() => {
doNewSend(["13c", [0, 0, 0]]);
doNewSend(["13c", [0, 6, 0]]);
doNewSend(["7", [1]]);
doNewSend(["5", [primary, true]]);
doNewSend(["13c", [0, 0, 1]]);
doNewSend(["13c", [0, 11, 1]]);
if (myPlayer.y < 2400) {
doNewSend(["13c", [0, 15, 0]]);
} else if (myPlayer.y > 6850 && myPlayer.y < 7550) {
doNewSend(["13c", [0, 31, 0]]);
} else {
doNewSend(["13c", [0, 6, 0]]);
}
autoinsta = false;
autoSecondary = false;
autoaim = false;
visualAim = false;
doInsta = false;
}, 200);
}
}
if (isEnemyNear == false && doInsta == false) {
normalAcc = 11;
if (myPlayer.y < 2400) {
normalHat = 15;
} else if (myPlayer.y > 6850 && myPlayer.y < 7550) {
normalHat = 31;
} else {
normalHat = 6;
}
}
if (!nearestEnemy) {
nearestEnemyAngle = myPlayer.dir;
}
if (automillx == false) {
automillx = myPlayer.x;
}
if (automilly == false) {
automilly = myPlayer.y;
}
if (myPlayeroldy != myPlayer.y || myPlayeroldx != myPlayer.x) {
if (autoMill == true) {
if (Math.sqrt(Math.pow((myPlayer.y - automilly), 2) +
Math.pow((myPlayer.x - automillx), 2)) > 85) {
place(millType, myPlayer.dir + toRad(9000000005));
place(millType, myPlayer.dir + toRad(9000000077));
place(millType, myPlayer.dir + toRad(9000000293));
doNewSend(["2", [Math.atan2(mouseY - height / 2, mouseX - width /
2)]]);
automillx = myPlayer.x;
automilly = myPlayer.y;
}
}
myPlayeroldx = myPlayer.x;
myPlayeroldy = myPlayer.y;
}
if (item == "1" && myPlayer.id == null) {
myPlayer.id = data[1];
}
if (data[0] == "ch" && data[1] !== myPlayer.id) {
let proresponder = [
["gae", "no, ae!!"],
["1v1", "only pros can kill me"],
["fk", "Fuck you"],
["lmao", "*Laughs*"],
["lmfao", "*Laughs*"],
["lol", "no one is laughing"],
["watch", "I can't"],
["gay", "its all about Cock"],
["noob", "am I your mirror?"],
["nob", "you talking to yourself?"],
["nab", "yes :c"],
["white mod", "~Yep, me noob!~"],
["happy time", "i am rock"],
["elitemod", "elite mod is sus"],
["nub", "Rock is rock"],
["nup", "Rock is rock"],
["real?", "Rock is real ofc"],
["idiot", "thanks!"],
["crash?", "want my crash bot?"],
["gg you tried", "nob"],
["project epsilon", "noob use super mod"],
["taste the insta", "noob use super mod"],
["camper", "i like tents"],
["camp", "i like tents"],
["hai", "sup nob"],
["hello", "hello there"],
["ello", "ello here"],
]
for (let i = 0; i < proresponder.length; i++) {
if (data[2].toLocaleLowerCase().indexOf(proresponder[i][0]) != -1) {
setTimeout(() => {
doNewSend(["ch", [proresponder[i][1]]]);
}, 10);
}
}
}
if (item == "ch") {
let ch = data
if ((data[2].toLocaleLowerCase()).split(' ')[0] == '!km' && data[1] ==
myPlayer.id) {
doNewSend(["6", [7]]);
doNewSend(["6", [17]]);
doNewSend(["6", [31]]);
doNewSend(["6", [27]]);
doNewSend(["6", [10]]);
doNewSend(["6", [38]]);
doNewSend(["6", [4]]);
doNewSend(["6", [15]]);
} else if ((data[2].toLocaleLowerCase()).split(' ')[0] == '!pm' && data[1]
== myPlayer.id) {
doNewSend(["6", [5]]);
doNewSend(["6", [17]]);
doNewSend(["6", [31]]);
doNewSend(["6", [27]]);
doNewSend(["6", [10]]);
doNewSend(["6", [38]]);
doNewSend(["6", [28]]);
doNewSend(["6", [15]]);
} else if ((data[2].toLocaleLowerCase()).split(' ')[0] == '!ph' && data[1]
== myPlayer.id) {
doNewSend(["6", [5]]);
doNewSend(["6", [17]]);
doNewSend(["6", [31]]);
doNewSend(["6", [27]]);
doNewSend(["6", [10]]);
doNewSend(["6", [38]]);
} else if ((data[2].toLocaleLowerCase()).split(' ')[0] == '!dh' && data[1]
== myPlayer.id) {
doNewSend(["6", [7]]);
doNewSend(["6", [17]]);
doNewSend(["6", [31]]);
doNewSend(["6", [27]]);
doNewSend(["6", [10]]);
doNewSend(["6", [38]]);
doNewSend(["6", [28]]);
doNewSend(["6", [25]]);
} else if ((data[2].toLocaleLowerCase()).split(' ')[0] == '!dhb' && data[1]
== myPlayer.id) {
doNewSend(["6", [7]]);
doNewSend(["6", [17]]);
doNewSend(["6", [32]]);
doNewSend(["6", [27]]);
doNewSend(["6", [10]]);
doNewSend(["6", [38]]);
doNewSend(["6", [28]]);
doNewSend(["6", [25]]);
} else if ((data[2].toLocaleLowerCase()).split(' ')[0] == '!kh' && data[1]
== myPlayer.id) {
doNewSend(["6", [7]]);
doNewSend(["6", [17]]);
doNewSend(["6", [31]]);
doNewSend(["6", [27]]);
doNewSend(["6", [10]]);
doNewSend(["6", [38]]);
doNewSend(["6", [4]]);
doNewSend(["6", [25]]);
} else if ((data[2].toLocaleLowerCase()).split(' ')[0] == '!shb' && data[1]
== myPlayer.id) {
doNewSend(["6", [8]]);
doNewSend(["6", [17]]);
doNewSend(["6", [32]]);
doNewSend(["6", [27]]);
doNewSend(["6", [10]]);
doNewSend(["6", [38]]);
doNewSend(["6", [28]]);
doNewSend(["6", [25]]);
} else if ((data[2].toLocaleLowerCase()).split(' ')[0] == '!hat' && data[1]
== myPlayer.id) {
doNewSend(["ch", [hatspam]]);
hatspam = !hatspam;
} else if ((data[2].toLocaleLowerCase()).split(' ')[0] == '!antib' &&
data[1] == myPlayer.id) {
doNewSend(["ch", [antibullspam]]);
antibullspam = !antibullspam;
} else if ((data[2].toLocaleLowerCase()).split(' ')[0] == '!as' && data[1]
== myPlayer.id) {
doNewSend(["ch", [assasin]]);
assasin = !assasin;
} else if ((data[2].toLocaleLowerCase()).split(' ')[0] == '!sh' && data[1]
== myPlayer.id) {
doNewSend(["6", [8]]);
doNewSend(["6", [17]]);
doNewSend(["6", [31]]);
doNewSend(["6", [27]]);
doNewSend(["6", [10]]);
doNewSend(["6", [38]]);
doNewSend(["6", [28]]);
doNewSend(["6", [25]]);
}
}
if (item == "6") {
for (let i = 0; i < data[1].length / 8; i++) {
let ObjectData = data[1].slice(8 * i, 8 * i + 8);
if (ObjectData[6] == 15 && ObjectData[7] != myPlayer.id &&
ObjectData[7] != myPlayer.clan) {
trap.x = ObjectData[1];
trap.y = ObjectData[2];
trap_a = Math.atan2(ObjectData[2] - myPlayer.y, ObjectData[1] -
myPlayer.x);
if (Math.sqrt(Math.pow((myPlayer.y - ObjectData[2]), 2) +
Math.pow((myPlayer.x - ObjectData[1]), 2)) < 90) {
intrap = true;
trapid = ObjectData[0];
if (antitrap == true) {
for (let i = 0; i < 10; i++) {
let angle = myPlayer.dir + toRad(i * 16);
place(spikeType, angle);
}
}
}
}
}
}
if (item == "6") {
for (let i = 0; i < data[1].length / 8; i++) {
let ObjectData = data[1].slice(8 * i, 8 * i + 8);
if (ObjectData[6] == 16 && ObjectData[7] != myPlayer.id &&
ObjectData[7] != myPlayer.clan) {
if (Math.sqrt(Math.pow((myPlayer.y - ObjectData[2]), 2) +
Math.pow((myPlayer.x - ObjectData[1]), 2)) < 240) {
for (let i = 0; i < 6; i++) {
let angle = myPlayer.dir + toRad(i * 45);
place(spikeType, angle);
hat(6);
}
}
}
}
}
if (item == "12") {
if (intrap == true) {
if (trapid == data[1]) {
doNewSend(["5", [primary, true]]);
intrap = false;
doNewSend(["13c", [0, 6, 0]]);
doNewSend(["13c", [0, 21, 1]]);
place(spikeType);
}
}
}
if (item == "12" && document.getElementById('ar').checked) {
if (enemVeryNear) {
if (document.getElementById('arWhenEnem').value == 'spike') {
place(spikeType, nearestEnemyAngle);
} else if (document.getElementById('arWhenEnem').value == 'boost') {
place(boostType, nearestEnemyAngle);
} else if (document.getElementById('arWhenEnem').value == 'tp') {
place(turretType, nearestEnemyAngle);
} else {
console.log('place nothing')
}
} else {
if (document.getElementById('arWhenNoEnem').value == 'spike') {
place(spikeType);
} else if (document.getElementById('arWhenNoEnem').value == 'boost') {
place(boostType);
} else if (document.getElementById('arWhenNoEnem').value == 'tp') {
place(turretType);
} else {
console.log('place nothing')
}
}
}
if (item == "11") {
intrap = false;
doNewSend(['c', [0]]);
hat(0);
hat(6);
}

if (item == "h" && data[1] == myPlayer.id) {


if (data[2] < 57 && data[2] > 0 && myPlayer.hat == "6" && antibullspam ==
1) {
hitCount += 1;
if (hitCount >= 7) {
anti1 = false;
hat(26)
ez = 1;
} else {
anti1 = true
ez = 0;
}
}
}
if (item == "h" && data[1] == myPlayer.id) {
if (data[2] < 61 && data[2] > 0 && myPlayer.hat != "6" && antibullspam ==
1) {
hitCount += 1;
if (hitCount >= 7) {
anti1 = false;
hat(26)
ez = 1;
} else {
anti1 = true
ez = 0;
}
}
}
if (hitCount != 8 && hitCount != 7 && ez == 1 && antibullspam == 1) {
anti1 = true;
ez = 0;

} else {
anti1 = false;
}
if (item == "h" && data[1] == myPlayer.id) {
if (data[2] < 61 && data[2] > 0 && antilol == true && eze == false && anti1
== true) {
place(foodType);
place(foodType);
place(foodType);
place(foodType);
eze = true;
setTimeout(() => {
place(foodType);
place(foodType);
place(foodType);
place(foodType);
eze = false;
}, 300);
}
if (data[2] < 100 && autoh == true && anti1 == true) {
setTimeout(() => {
if (eze == false) {
place(foodType);
place(foodType);
place(foodType);
place(foodType);
}
}, 120);
}
if (data[2] < 30 && anti1 == false) {
setTimeout(() => {
place(foodType);
place(foodType);
place(foodType);
place(foodType);
place(foodType);
place(foodType);
place(foodType);
place(foodType);
place(foodType);
place(foodType);
place(foodType);
place(foodType);
place(foodType);
place(foodType);
place(foodType);
place(foodType);
}, 120);
}
if (data[2] < 75 && anti1 == false) {
setTimeout(() => {
place(foodType);
place(foodType);
place(foodType);
place(foodType);
place(foodType);
place(foodType);
place(foodType);
place(foodType);
place(foodType);
place(foodType);
place(foodType);
place(foodType);
place(foodType);
place(foodType);
place(foodType);
place(foodType);
}, 120);
}

if (data[2] == 75 && antiBow == true) {


place(millType, nearestEnemyAngle);
place(foodType);
place(foodType);
place(foodType);
}
if (data[2] == 81 && antiBow == true) {
place(millType, nearestEnemyAngle);
place(foodType);
place(foodType);
place(foodType);
}
}
update();
};
var plac = {
toggle:false,
f:true,
dist:false
}
function doNewSend(data) {
ws.send(new Uint8Array(Array.from(msgpack5.encode(data))));
}

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

function buyHat(id) {
doNewSend(['13c', [1, id, 0]]);
doNewSend(['13c', [0, id, 0]]);
}

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

function place(id) {
var angle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] :
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]]);
doNewSend(['5', [id, null]]);
doNewSend(['c', [1, angle]]);
doNewSend(['c', [0, angle]]);
doNewSend(['5', [myPlayer.weapon, true]]);
}
'use strict';
var repeater = function mockedDriverFn(element, method, options) {
var d = ![];
var e = undefined;
return {
'start': function start(child) {
if (child == element && document.activeElement.id.toLowerCase() !==
'chatbox') {
d = !![];
if (e === undefined) {
e = setInterval(function() {
method();
if (!d) {
clearInterval(e);
e = undefined;
console.log('claered');
}
}, options);
}
}
},
'stop': function Chat(parent) {
if (parent == element && document.activeElement.id.toLowerCase() !==
'chatbox') {
d = ![];
}
}
};
};
'use strict';
var boostPlacer = repeater(70, function() {
place(boostType);
}, 10);
var spikePlacer = repeater(86, function() {
place(spikeType);
}, 10);
var turretPlacer = repeater(72, function() {
place(turretType);
}, 10);
let ctrlHold = false;
document.addEventListener('keydown', function(e) {
boostPlacer.start(e.keyCode);
spikePlacer.start(e.keyCode);
turretPlacer.start(e.keyCode);
if (e.keyCode == 17) {
ctrlHold = true
}
if (e.keyCode == 221 && document.activeElement.id.toLowerCase() !== 'chatbox')
{
if (ChatSpam) {
ChatSpam1 = setTimeout(function() {
ChatSpamFC1();
}, 30);
} else {
clearTimeout(ChatSpam1);
clearTimeout(ChatSpam2);
clearTimeout(ChatSpam3);
clearTimeout(ChatSpam4);
clearTimeout(ChatSpam5);
clearTimeout(ChatSpam6);
clearTimeout(ChatSpam7);
clearTimeout(ChatSpam8);
clearTimeout(ChatSpam9);
clearTimeout(ChatSpam10);
clearTimeout(ChatSpam11);
clearTimeout(ChatSpam12);
clearTimeout(ChatSpam13);
clearTimeout(ChatSpam14);
clearTimeout(ChatSpam15);
clearTimeout(ChatSpam16);
clearTimeout(ChatSpam17);
clearTimeout(ChatSpam18);
clearTimeout(ChatSpam19);
clearTimeout(ChatSpam20);
clearTimeout(ChatSpam21);
clearTimeout(ChatSpam22);
clearTimeout(ChatSpam23);
clearTimeout(ChatSpam24);
clearTimeout(ChatSpam25);
clearTimeout(ChatSpam26);
clearTimeout(ChatSpam27);
clearTimeout(ChatSpam28);
clearTimeout(ChatSpam29);
clearTimeout(ChatSpam30);
clearTimeout(ChatSpam31);
clearTimeout(ChatSpam32);
}
ChatSpam = !ChatSpam;
}
if (e.keyCode == 219 && document.activeElement.id.toLowerCase() !== 'chatbox')
{
automine = !automine
}
if (e.keyCode == 71 && document.activeElement.id.toLowerCase() !== 'chatbox') {
abs = !abs;
doNewSend(["ch", ["ABS : " + abs]]);
}
if (e.keyCode == 190 && document.activeElement.id.toLowerCase() !== 'chatbox')
{
autoinsta = (autoinsta + 1) % 2;
if (autoinsta == 1) {
doNewSend(["ch", ["On"]]);
} else {
doNewSend(["ch", ["Off"]]);
}
}
if (e.keyCode == 80 && document.activeElement.id.toLowerCase() !== 'chatbox') {
hide = (hide + 1) % 2;
if (hide == 1) {
$('#topInfoHolder').hide();
} else {
$('#topInfoHolder').show();
}
}
if (e.keyCode == 70 && document.activeElement.id.toLowerCase() !== 'chatbox') {
if (document.getElementById('f4t').checked) {
for (let i = 0; i < 4; i++) {
let angel = myPlayer.dir + toRad(i * 90);
place(boostType, angel);
}
} else {
place(boostType);
}
}
if (e.keyCode == 72 && document.activeElement.id.toLowerCase() !== 'chatbox') {
place(turretType);
place(turretType, myPlayer.dir + toRad(90));
place(turretType, myPlayer.dir - toRad(90));
}
if (e.keyCode == 16 && document.activeElement.id.toLowerCase() !== 'chatbox') {

console.log('buy')
doNewSend(["13c", [1, 11, 1]]); //Buymonkey
doNewSend(["13c", [1, 6, 0]]); //BuySoldier
doNewSend(["13c", [1, 7, 0]]); //BuyBull
doNewSend(["13c", [1, 40, 0]]); //BuyTank
doNewSend(["13c", [1, 53, 0]]); //BuyTurret
doNewSend(["13c", [1, 31, 0]]); //BuyFlipper
doNewSend(["13c", [1, 15, 0]]); //BuyWinter
doNewSend(["13c", [1, 21, 1]]); //BuyCorrupt
doNewSend(["13c", [1, 22, 0]]); //BuyEMP

console.log('biome')
if (myPlayer.y < 2400) {
hat(15);
} else if (pig = 1 || true) {
hat(56)
} else if (assasin = 1 || true) {
hat(29)
} else {
if (myPlayer.y > 6850 && myPlayer.y < 7550) {
hat(31);
} else {
hat(6);
}
}
acc(11);
}
if (e.keyCode == 66 && document.activeElement.id.toLowerCase() !== 'chatbox') {
buyHat(6);
}
if (e.keyCode == 27 && document.activeElement.id.toLowerCase() !== 'chatbox') {
buyHat(0);
}
if (e.keyCode == 85 && document.activeElement.id.toLowerCase() !== 'chatbox') {
buyHat(53);
}
if (e.keyCode == 188 && document.activeElement.id.toLowerCase() !== 'chatbox')
{
buyHat(15);
}
if (e.keyCode == 60 && document.activeElement.id.toLowerCase() !== 'chatbox') {
buyHat(31);
}
if (e.keyCode == 90 && document.activeElement.id.toLowerCase() !== 'chatbox') {
buyHat(40);
}
if (e.keyCode == 74 && document.activeElement.id.toLowerCase() !== 'chatbox') {
buyHat(22);
}
if (e.keyCode == 84 && document.activeElement.id.toLowerCase() !== 'chatbox') {
doNewSend(["13c", [0, 0, 1]]);
doNewSend(["13c", [0, 21, 1]]);
doNewSend(["5", [secondary, true]]);
doNewSend(["7", [1]]);
doNewSend(["13c", [0, 53, 0]]);
autoaim = true;
for (let i = 0; i < 250; i++) ws.send(600000);
setTimeout(() => {
autoaim = false;
doNewSend(["13c", [0, 7, 0]]);
doNewSend(["5", [primary, true]]);
setTimeout(() => {
doNewSend(["13c", [0, 6, 0]]);
doNewSend(["13c", [0, 11, 1]]);
doNewSend(["7", [1]]);
}, 120);
}, 100);
}
if (e.keyCode == 77 && document.activeElement.id.toLowerCase() !== 'chatbox') {
if (document.getElementById('aMillType').value == "wasd") {
AutoMill = (AutoMill + 1) % 2;
if (AutoMill == 0) {
doNewSend(["ch", ["Mills Off"]]);
} else {
doNewSend(["ch", ["Mills On"]]);
}
} else {
autoMill = !autoMill;
doNewSend(["ch", ["[" + autoMill + "]"]]);
}
}
if (e.keyCode == 48 && document.activeElement.id.toLowerCase() !== 'chatbox') {
if (antibullspam == true) {
antibullspam = false;
doNewSend(["ch", ["antibull off"]]);
} else {
antibullspam = true;
doNewSend(["ch", ["bull on"]]);
}
}
if (e.keyCode == 192 && document.activeElement.id.toLowerCase() !== 'chatbox')
{
if (plac.toggle == true) {
plac.toggle = false;
doNewSend(["ch", ["place off"]]);
} else {
plac.toggle = true;
doNewSend(["ch", ["place on"]]);
}
}
if (e.keyCode == 75 && document.activeElement.id.toLowerCase() !== 'chatbox') {
hit360 = !hit360
}
if (e.keyCode == 82 && document.activeElement.id.toLowerCase() !== 'chatbox' &&
document.activeElement.id.toLowerCase() !== 'instachat') {
if (document.getElementById('onetick').checked) { //one tick
autoaim = true;
doInsta = true;
//doNewSend(["ch", [document.getElementById('instachat').value]]);
doNewSend(["13c", [0, 0, 1]]);
doNewSend(["13c", [1, 53, 0]]);
doNewSend(["13c", [0, 53, 0]]);
setTimeout(() => {
autoPrimary = true;
doNewSend(["13c", [0, 0, 1]]);
doNewSend(["13c", [1, 7, 0]]);
doNewSend(["13c", [0, 7, 0]]);
doNewSend(["7", [1]]);
}, 35)
setTimeout(() => {
doNewSend(["7", [1]]);
if (myPlayer.y < 2400) {
doNewSend(["13c", [0, 15, 0]]);
} else if (myPlayer.y > 6850 && myPlayer.y < 7550) {
doNewSend(["13c", [0, 31, 0]]);
} else {
doNewSend(["13c", [0, 6, 0]]);
}
autoPrimary = false;
autoaim = false;
doInsta = false;
}, 150)
} else {
autoaim = true; //normal
autoPrimary = true;
autoSecondary = false;
doInsta = true;
// doNewSend(["ch", [document.getElementById('instachat').value]]);
doNewSend(["13c", [0, 0, 1]]);
doNewSend(["13c", [1, 7, 0]]);
doNewSend(["13c", [0, 7, 0]]);
doNewSend(["5", [primary, true]]);
doNewSend(["7", [1]]);
doNewSend(["13c", [1, 21, 1]]);
doNewSend(["13c", [0, 21, 1]]);
setTimeout(() => {
autoPrimary = false;
autoSecondary = true;
doNewSend(["13c", [0, 0, 0]]);
doNewSend(["13c", [1, 53, 0]]);
doNewSend(["13c", [0, 53, 0]]);
doNewSend(["5", [secondary, true]]);
}, instaSpeed);
setTimeout(() => {
doNewSend(["13c", [0, 0, 0]]);
doNewSend(["13c", [0, 6, 0]]);
doNewSend(["7", [1]]);
doNewSend(["5", [primary, true]]);
doNewSend(["13c", [0, 0, 1]]);
doNewSend(["13c", [0, 11, 1]]);
if (myPlayer.y < 2400) {
doNewSend(["13c", [0, 15, 0]]);
} else if (myPlayer.y > 6850 && myPlayer.y < 7550) {
doNewSend(["13c", [0, 31, 0]]);
} else {
doNewSend(["13c", [0, 6, 0]]);
}
autoSecondary = false;
autoaim = false;
doInsta = false;
autoreload = true;
}, 200);
}
}
if (e.keyCode == 89 && document.activeElement.id.toLowerCase() !== 'chatbox') {
autoPrimary = false;
autoSecondary = true;
autoaim = true;
autoPrimary = false;
autoSecondary = true;
doNewSend(["13c", [0, 0, 1]]);
doNewSend(["5", [secondary, true]]);
doNewSend(["7", [1]]);
doNewSend(["13c", [1, 53, 0]]);
doNewSend(["13c", [0, 53, 0]]);
doNewSend(["13c", [1, 21, 1]]);
doNewSend(["13c", [0, 21, 1]]);
setTimeout(() => {
autoPrimary = true;
autoSecondary = false;
doNewSend(["13c", [1, 7, 0]]);
doNewSend(["13c", [0, 7, 0]]);
doNewSend(["5", [primary, true]]);
doNewSend(["13c", [0, 0, 0]]);
doNewSend(["13c", [0, 0, 1]]);
doNewSend(["13c", [1, 7, 0]]);
doNewSend(["13c", [0, 7, 0]]);
doNewSend(["13c", [1, 18, 1]]);
doNewSend(["13c", [0, 18, 1]]);
doNewSend(["5", [primary, true]]);
}, 80);
setTimeout(() => {
doNewSend(["13c", [0, 0, 0]]);
doNewSend(["7", [1]]);
doNewSend(["13c", [0, 11, 1]]);
if (myPlayer.y < 2400) {
doNewSend(["13c", [0, 15, 0]]);
} else if (myPlayer.y > 6850 && myPlayer.y < 7550) {
doNewSend(["13c", [0, 31, 0]]);
} else {
doNewSend(["13c", [0, 12, 0]]);
}
autoPrimary = false;
autoaim = false;
autoreload = true;
}, 215);
}
if (e.keyCode == 85 && document.activeElement.id.toLowerCase() !==
'chatbox') {
doNewSend(["33", [null]]);
setTimeout(() => {
place(boostType, nearestEnemyAngle);
doNewSend(["5", [secondary, true]]);
doNewSend(["ch", [""]]);
doNewSend(["13c", [0, 53, 0]]);
doNewSend(["13c", [0, 0, 1]]);
doNewSend(["13c", [0, 17, 1]]);
doNewSend(["c", [1]]);
}, 120);
setTimeout(() => {
doNewSend(["33", [nearestEnemyAngle]]);
doNewSend(["13c", [1, 7, 0]]);
doNewSend(["13c", [0, 7, 0]]);
doNewSend(["5", [secondary, false]]);
doNewSend(["5", [primary, true]]);
doNewSend(["7", [1]]);
doNewSend(["c", [1, nearestEnemyAngle]]);
doNewSend(["c", [1, nearestEnemyAngle]]);
doNewSend(["7", [1]]);
doNewSend(["7", [1]]);
}, 240);
setTimeout(() => {
autoaim = false;
doNewSend(["c", [0, null]]);
doNewSend(["7", [1]]);
doNewSend(["5", [primary, true]]);
autoaim = false;
autoreload = true;
autoreload = true;
}, 360);
}
if(e.keyCode == 76 && document.activeElement.id.toLowerCase() !== 'chatbox') {
if (primary == 0) { //AGE 1
if (e.keyCode == 76 && document.activeElement.id.toLowerCase() !==
'chatbox') {
autoaim = true;
doNewSend(["5", [primary, true]]);
doNewSend(["13c", [0, 7, 0]]);
doNewSend(["13c", [0, 0, 1]]);
doNewSend(["c", [1]]);
setTimeout(() => {
doNewSend(["6", [5]]);
doNewSend(["6", [17]]);
doNewSend(["6", [31]]);
doNewSend(["6", [23]]);
doNewSend(["6", [9]]);
doNewSend(["6", [38]]);
doNewSend(["c", [1]]);
}, 100);
setTimeout(() => {
doNewSend(["c", [1]]);
doNewSend(["c", [1]]);
doNewSend(["6", [4]]);
}, 200)
setTimeout(() => {
doNewSend(["5", [secondary, true]])
doNewSend(["c", [1]]);
doNewSend(["13c", [0, 53, 0]]);
}, 300);
setTimeout(() => {
doNewSend(["6", [15]]);
}, 410);
setTimeout(() => {
doNewSend(["5", [primary, true]]);
doNewSend(["c", [0]]);
doNewSend(["13c", [0, 6, 0]]);
doNewSend(["13c", [0, 11, 1]]);
autoaim = false;
autoreload = true;
}, 560);
}
} else { //bow insta
autoaim = true;
doInsta = true;
autoSecondary = true
doNewSend(["5", [secondary, true]]);
doNewSend(["13c", [1, 53, 0]]);
doNewSend(["13c", [0, 53, 0]]);
doNewSend(["c", [1]]);
setTimeout(() => {
doNewSend(["6", [12]]);
}, 55);
setTimeout(() => {
doNewSend(["6", [15]]);
}, 45);
setTimeout(() => {
doNewSend(["c", [0]]);
doNewSend(["5", [primary, true]]);
autoaim = false;
doInsta = false;
autoSecondary = false;

}, 190);
}
}
if (e.keyCode == 46 && document.activeElement.id.toLowerCase() !== 'chatbox') {
doNewSend(["6", [7]]);
doNewSend(["6", [17]]);
doNewSend(["6", [31]]);
doNewSend(["6", [23]]);
doNewSend(["6", [10]]);
doNewSend(["6", [38]]);
doNewSend(["6", [4]]);
doNewSend(["6", [15]]);
}
if (e.keyCode == 45 && document.activeElement.id.toLowerCase() !== 'chatbox') {
doNewSend(["6", [5]]);
doNewSend(["6", [17]]);
doNewSend(["6", [31]]);
doNewSend(["6", [23]]);
doNewSend(["6", [9]]);
doNewSend(["6", [38]]);
doNewSend(["6", [28]]);
doNewSend(["6", [15]]);
}
if (e.keyCode == 98 && document.activeElement.id.toLowerCase() !== 'chatbox') {
doNewSend(['6', [15]]);
}
if (e.keyCode == 97 && document.activeElement.id.toLowerCase() !== 'chatbox') {
doNewSend(['6', [4]]);
}
if (e.keyCode == 99 && document.activeElement.id.toLowerCase() !== 'chatbox') {
doNewSend(['6', [28]]);
}
if (e.keyCode == 105 && document.activeElement.id.toLowerCase() !== 'chatbox')
{
doNewSend(['6', [28]]);
doNewSend(['6', [25]]);
}
});
document.addEventListener('keyup', function(e) {
turretPlacer.stop(e.keyCode);
boostPlacer.stop(e.keyCode);
spikePlacer.stop(e.keyCode);
if (e.keyCode == 17) {
ctrlHold = false;
}
});

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

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

function dist(p1, p) {
return Math.sqrt(Math.pow(p.y - p1[2], 2) + Math.pow(p.x - p1[1], 2));
}

'use strict';

function update() {
var event = 0;
for (; event < 9; event++) {
if (isElementVisible(document.getElementById('actionBarItem' +
event.toString()))) {
primary = event;
}
}
var div = 9;
for (; div < 16; div++) {
if (isElementVisible(document.getElementById('actionBarItem' +
div.toString()))) {
secondary = div;
}
}
var tobj = 16;
for (; tobj < 19; tobj++) {
if (isElementVisible(document.getElementById('actionBarItem' +
tobj.toString()))) {
foodType = tobj - 16;
}
}
var props = 19;
for (; props < 22; props++) {
if (isElementVisible(document.getElementById('actionBarItem' +
props.toString()))) {
wallType = props - 16;
}
}
var e = 22;
for (; e < 26; e++) {
if (isElementVisible(document.getElementById('actionBarItem' +
e.toString()))) {
spikeType = e - 16;
}
}
var f = 26;
for (; f < 29; f++) {
if (isElementVisible(document.getElementById('actionBarItem' +
f.toString()))) {
millType = f - 16;
}
}
var g = 29;
for (; g < 31; g++) {
if (isElementVisible(document.getElementById('actionBarItem' +
g.toString()))) {
mineType = g - 16;
}
}
var h = 31;
for (; h < 33; h++) {
if (isElementVisible(document.getElementById('actionBarItem' +
h.toString()))) {
boostType = h - 16;
}
}
var intval = 33;
for (; intval < 39; intval++) {
if (isElementVisible(document.getElementById('actionBarItem' +
intval.toString())) && intval != 36) {
turretType = intval - 16;
}
}
spawnpadType = 36;
};
/*
<select id="instaType">
<option>Normal Insta</option>
<option : disabled>Lag Insta</option>
<option>One Tick Insta</option>
</select>
selector for insta type
*/
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: 21px;">Settings</h2>
</div>
<div class="modal-body" style="font-size: 15px;">
<div class="flexControl">
<h2 style="font-size: 20px;">Auto-Mill Settings</h2>
<select id="aMillType">
<option value="wasd">WASD Mill</option>
<option value="fzm">Frozen Mills(with cursor)</option>
</select>
<h2 style="font-size: 20px;">Insta Settings</h2>
<label type="radio" class="container">Fast Insta<input type="checkbox"
id="fastinsta">
<span class="checkmark"></span></label>
<label type="radio" class="container">R = One Tick<input type="checkbox"
id="onetick">
<span class="checkmark"></span></label>
<h2 style="font-size: 20px;">Other</h2>
<label type="radio" class="container">click bull/tank<input
type="checkbox" id="click">
<span class="checkmark"></span></label>
<p>On left Click:</p>
<select name="hat" id="leftclick">
<option value="7">Bull Helmet</option>
<option value="40">Tank Gear</option>
</select>
<p>Hat after left Click:</p>
<select name="hat" id="afterLeftClick">
<option value="boost">Biome Hat</option>
<option value="hatBefore">The hat that you had euiped</option>
</select>
<p>on right Click:</p>
<select name="hat" id="rightclick">
<option value="40">Tank Gear</option>
<option value="7">Bull Helmet</option>
</select>
<p>after right Click:</p>
<select name="hat" id="afterRightClick">
<option value="boost">Biome Hat</option>
<option value="hatBefore">The hat that you had euiped</option>
</select>
<h2 style="font-size: 21px;">Placing settings</h2>
<label type="radio" class="container">autoreplace<input type="checkbox"
id="ar">
<span class="checkmark"></span></label>
<p>Replace...when enemy isnt near:</p>
<select name="hat" id="arWhenNoEnem">
<option value="boost">Trap/Boost Pad</option>
<option value="spike">Spike</option>
<option value="tp">Turret/Teleporter/etc..</option>
<option value="nothing">nothing</option>
</select>
<p>Replace...when enemy is near:</p>
<select name="hat" id="arWhenEnem">
<option value="spike">Spike</option>
<option value="boost">Trap/Boost Pad</option>
<option value="tp">Turret/Teleporter/etc..</option>
<option value="nothing">nothing</option>
</select>
<label type="radio" class="container">F = 4 traps?<input type="checkbox"
id="f4t">
<span class="checkmark"></span></label>
<h2 style="font-size: 20px;">Trap settings</h2>
<label class="container">Anti-Pit-Trap?<input type="checkbox"
id="antitrap" checked>
<span class="checkmark"></span></label>
<p>Use...as Anti-Trap:</p>
<select name="hat" id="antiTrapBuild">
<option value="spike">Spike</option>
<option value="boost">Trap/Boost Pad</option>
<option value="mill">Windmills</option>
</select>
<label class="container">AutoBreak Pit-Trap?<input type="checkbox"
id="autobreaktrap" checked>
<span class="checkmark"></span></label>
<p>Place...after breaking Trap:</p>
<select name="hat" id="buildAfterBreak">
<option value="spike">Spike</option>
<option value="boost">Trap/Boost Pad</option>
</select>
<h2 style="font-size: 20px;">Chat Settings</h2>
<p style="font-size: 17px">Insta-Chat</p>
<input type="text" id="instachat" placeholder="Type here..."
maxlength="30" value="Its about drive,its about powe" style="width: 300px; height:
16px; font-size: 14.5px">
</div>
`
document.body.appendChild(menuChange)
var styleItem1 = document.createElement("style");
styleItem1.type = "text/css";
styleItem1.appendChild(document.createTextNode(`
#mainSettings{
overflow-y : scroll;
}

.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: green;
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: #black;
padding: 15px;
color: #black;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
}

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

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

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

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

.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;
}

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

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

.container:hover input ~ .checkmark {


background-color: #187BA2;
}

.container input:checked ~ .checkmark {


background-color: #ca2626;
}

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

.container input:checked ~ .checkmark:after {


display: block;
}

.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);
}
#fpsviewer {
font-size: 13px;
position: absolute;
width: 83px;
height: 34px;
top: 2px;
left: 2px;
display: block;
text-align: center;
color: #fff;
background-color: rgb(21, 21, 21);
}
.actionBarItem {
border-radius: 15px
}
`))
document.head.appendChild(styleItem1);

document.addEventListener('keydown', function(e) {
if (e.keyCode == 27) {
if (modal.style.display = "none") {
modal.style.display = "block";
} else {
modal.style.display = "none";
}
}
})

var modal = document.getElementById("simpleModal");


var closeBtn = document.getElementsByClassName('closeBtn')[0];

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

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

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

var fASTinsta = document.querySelector("#fastinsta")

fASTinsta.addEventListener('change', function() {
if (this.checked) {
instaSpeed = 35
} else {
instaSpeed = 80
}
})

var abreak = document.querySelector("#autobreaktrap")

abreak.addEventListener('change', function() {
if (this.checked) {
autobreak = true;
} else {
autobreak = false;
intrap = false;
}
})

var atrap = document.querySelector("#antitrap")

atrap.addEventListener('change', function() {
if (this.checked) {
antitrap = true;
} else {
antitrap = false;
}
})
document.title = "!ROCK!";
document.getElementById("gameName").innerHTML = "ROCKツ";
document.getElementById("loadingText").style.color = "#E3FFFD";
document.getElementById("diedText").innerHTML = "ROCK BE BACK SOON";
$('#itemInfoHolder').css({
'text-align': 'center',
'top': '125px',
'left': '350px',
'right': '350px',
'max-width': '666px'
});

You might also like