Skip to content

Instantly share code, notes, and snippets.

@RemadeTheMods
Created June 19, 2021 02:53
Show Gist options
  • Save RemadeTheMods/0e2d1c69fe2f84f0c61dbd1eb13ce2c8 to your computer and use it in GitHub Desktop.
Save RemadeTheMods/0e2d1c69fe2f84f0c61dbd1eb13ce2c8 to your computer and use it in GitHub Desktop.
I remade LabyMod. And now it can work on moomoo.io
// ==UserScript==
// @name MooMoo.io | 🐺LabyMod🐺 | 2021
// @namespace -
// @version ╳LABYMOD3.3╳
// @description【Hacks】 ➜ 〖 AUTO HEAL 〗 〖 MOD - MENU - ESC 〗 〖 INSTAKILL - R 〗 〖 AUTOSPIKE - V 〗 〖 MORE FPS 〗 〖 AUTOCLAN - 2 [Numpad] OR ▼ 〗 〖 AUTOCHAT - 8 [Numpad] OR ▲ 〗 〖 BOOST & SPIKE - G 〗 〖 AUTOWINDMILL - N 〗 〖 HATMACRO 【U CAN CHANGE A KEY FOR HAT MACRO】 〗 〖 PREMIUM MAP 〗 〖 INSTAWINDMILL´S - O 〗 〖 INSTATRAPS / BOOSTPADS - I 〗 〖 CX INSTA - SPACEBAR 〗 〖 INSTASPIKE´S - Ü 〗 〖 AIMCURSOR 〗 〖 BIG SHOP 〗 〖AUTOHAT - M 【Booster & monkey tail - grass | Winter cap & monkey tail - snow】〗
// @author Cookie_or_die(Remade by simaodf)
// @match *://moomoo.io/*
// @match *://dev.moomoo.io/*
// @match *://*sandbox.moomoo.io/*
// @icon https://cdn140.picsart.com/260147848002212.png?type=webp&to=min&r=640
// @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
// @description | Just write a review for more hacks :)【Hacks & Hackkeys】 ➜ 〖 AUTO HEAL 〗 〖 MOD - MENU - ESC 〗 〖 INSTAKILL - R 〗 〖 AUTOSPIKE - V 〗 〖 MORE FPS 〗 〖 AUTOCLAN - 2 [Numpad] OR ▼ 〗 〖 AUTOCHAT - 8 [Numpad] OR ▲ 〗 〖 BOOST & SPIKE - G 〗 〖 AUTOWINDMILL - N 〗 〖 HATMACRO 【U CAN CHANGE A KEY FOR HAT MACRO】 〗 〖 PREMIUM MAP 〗 〖 INSTAWINDMILL´S - O 〗 〖 INSTATRAPS / BOOSTPADS - I 〗 〖 CX insta - SPACEBAR 〗 〖 INSTASPIKE´S - Ü 〗 〖 AIMCURSOR 〗 〖 BIG SHOP 〗 〖LABYMOD WEBSITE - TOP LEFT【WOLF SYMBOL】 〗 〖GAMING MUSIC〗
// ==/UserScript==
(function() {
'use strict';
function serialize(data) {
const pow32 = 0x100000000;
let floatBuffer, floatView;
let array = new Uint8Array(128);
let length = 0;
append(data);
return array.subarray(0, length);
function append(data) {
switch (typeof data) {
case "undefined":
appendNull(data);
break;
case "boolean":
appendBoolean(data);
break;
case "number":
appendNumber(data);
break;
case "string":
appendString(data);
break;
case "object":
if (data === null) {
appendNull(data);
} else if (data instanceof Date) {
appendDate(data);
} else if (Array.isArray(data)) {
appendArray(data);
} else if (data instanceof Uint8Array || data instanceof Uint8ClampedArray) {
appendBinArray(data);
} else if (data instanceof Int8Array || data instanceof Int16Array || data instanceof Uint16Array ||
data instanceof Int32Array || data instanceof Uint32Array ||
data instanceof Float32Array || data instanceof Float64Array) {
appendArray(data);
} else {
appendObject(data);
}
break;
}
}
function appendNull(data) {
appendByte(0xc0);
}
function appendBoolean(data) {
appendByte(data ? 0xc3 : 0xc2);
}
function appendNumber(data) {
if (isFinite(data) && Math.floor(data) === data) {
if (data >= 0 && data <= 0x7f) {
appendByte(data);
} else if (data < 0 && data >= -0x20) {
appendByte(data);
} else if (data > 0 && data <= 0xff) { // uint8
appendBytes([0xcc, data]);
} else if (data >= -0x80 && data <= 0x7f) { // int8
appendBytes([0xd0, data]);
} else if (data > 0 && data <= 0xffff) { // uint16
appendBytes([0xcd, data >>> 8, data]);
} else if (data >= -0x8000 && data <= 0x7fff) { // int16
appendBytes([0xd1, data >>> 8, data]);
} else if (data > 0 && data <= 0xffffffff) { // uint32
appendBytes([0xce, data >>> 24, data >>> 16, data >>> 8, data]);
} else if (data >= -0x80000000 && data <= 0x7fffffff) { // int32
appendBytes([0xd2, data >>> 24, data >>> 16, data >>> 8, data]);
} else if (data > 0 && data <= 0xffffffffffffffff) { // uint64
let hi = data / pow32;
let lo = data % pow32;
appendBytes([0xd3, hi >>> 24, hi >>> 16, hi >>> 8, hi, lo >>> 24, lo >>> 16, lo >>> 8, lo]);
} else if (data >= -0x8000000000000000 && data <= 0x7fffffffffffffff) { // int64
appendByte(0xd3);
appendInt64(data);
} else if (data < 0) { // below int64
appendBytes([0xd3, 0x80, 0, 0, 0, 0, 0, 0, 0]);
} else { // above uint64
appendBytes([0xcf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]);
}
} else {
if (!floatView) {
floatBuffer = new ArrayBuffer(8);
floatView = new DataView(floatBuffer);
}
floatView.setFloat64(0, data);
appendByte(0xcb);
appendBytes(new Uint8Array(floatBuffer));
}
}
function appendString(data) {
let bytes = encodeUtf8(data);
let length = bytes.length;
if (length <= 0x1f) {
appendByte(0xa0 + length);
} else if (length <= 0xff) {
appendBytes([0xd9, length]);
} else if (length <= 0xffff) {
appendBytes([0xda, length >>> 8, length]);
} else {
appendBytes([0xdb, length >>> 24, length >>> 16, length >>> 8, length]);
}
appendBytes(bytes);
}
function appendArray(data) {
let length = data.length;
if (length <= 0xf) {
appendByte(0x90 + length);
} else if (length <= 0xffff) {
appendBytes([0xdc, length >>> 8, length]);
} else {
appendBytes([0xdd, length >>> 24, length >>> 16, length >>> 8, length]);
}
for (let index = 0; index < length; index++) {
append(data[index]);
}
}
function appendBinArray(data) {
let length = data.length;
if (length <= 0xf) {
appendBytes([0xc4, length]);
} else if (length <= 0xffff) {
appendBytes([0xc5, length >>> 8, length]);
} else {
appendBytes([0xc6, length >>> 24, length >>> 16, length >>> 8, length]);
}
appendBytes(data);
}
function appendObject(data) {
let length = 0;
for (let key in data) length++;
if (length <= 0xf) {
appendByte(0x80 + length);
} else if (length <= 0xffff) {
appendBytes([0xde, length >>> 8, length]);
} else {
appendBytes([0xdf, length >>> 24, length >>> 16, length >>> 8, length]);
}
for (let key in data) {
append(key);
append(data[key]);
}
}
function appendDate(data) {
let sec = data.getTime() / 1000;
if (data.getMilliseconds() === 0 && sec >= 0 && sec < 0x100000000) { // 32 bit seconds
appendBytes([0xd6, 0xff, sec >>> 24, sec >>> 16, sec >>> 8, sec]);
}
else if (sec >= 0 && sec < 0x400000000) { // 30 bit nanoseconds, 34 bit seconds
let ns = data.getMilliseconds() * 1000000;
appendBytes([0xd7, 0xff, ns >>> 22, ns >>> 14, ns >>> 6, ((ns << 2) >>> 0) | (sec / pow32), sec >>> 24, sec >>> 16, sec >>> 8, sec]);
}
else { // 32 bit nanoseconds, 64 bit seconds, negative values allowed
let ns = data.getMilliseconds() * 1000000;
appendBytes([0xc7, 12, 0xff, ns >>> 24, ns >>> 16, ns >>> 8, ns]);
appendInt64(sec);
}
}
function appendByte(byte) {
if (array.length < length + 1) {
let newLength = array.length * 2;
while (newLength < length + 1)
newLength *= 2;
let newArray = new Uint8Array(newLength);
newArray.set(array);
array = newArray;
}
array[length] = byte;
length++;
}
function appendBytes(bytes) {
if (array.length < length + bytes.length) {
let newLength = array.length * 2;
while (newLength < length + bytes.length)
newLength *= 2;
let newArray = new Uint8Array(newLength);
newArray.set(array);
array = newArray;
}
array.set(bytes, length);
length += bytes.length;
}
function appendInt64(value) {
let hi, lo;
if (value >= 0) {
hi = value / pow32;
lo = value % pow32;
}
else {
value++;
hi = Math.abs(value) / pow32;
lo = Math.abs(value) % pow32;
hi = ~hi;
lo = ~lo;
}
appendBytes([hi >>> 24, hi >>> 16, hi >>> 8, hi, lo >>> 24, lo >>> 16, lo >>> 8, lo]);
}
}
function deserialize(array) {
const pow32 = 0x100000000; // 2^32
let pos = 0;
if (array instanceof ArrayBuffer) {
array = new Uint8Array(array);
}
if (typeof array !== "object" || typeof array.length === "undefined") {
throw new Error("Invalid argument type: Expected a byte array (Array or Uint8Array) to deserialize.");
}
if (!array.length) {
throw new Error("Invalid argument: The byte array to deserialize is empty.");
}
if (!(array instanceof Uint8Array)) {
array = new Uint8Array(array);
}
let data = read();
if (pos < array.length) {
}
return data;
function read() {
const byte = array[pos++];
if (byte >= 0x00 && byte <= 0x7f) return byte; // positive fixint
if (byte >= 0x80 && byte <= 0x8f) return readMap(byte - 0x80); // fixmap
if (byte >= 0x90 && byte <= 0x9f) return readArray(byte - 0x90); // fixarray
if (byte >= 0xa0 && byte <= 0xbf) return readStr(byte - 0xa0); // fixstr
if (byte === 0xc0) return null; // nil
if (byte === 0xc1) throw new Error("Invalid byte code 0xc1 found."); // never used
if (byte === 0xc2) return false // false
if (byte === 0xc3) return true; // true
if (byte === 0xc4) return readBin(-1, 1); // bin 8
if (byte === 0xc5) return readBin(-1, 2); // bin 16
if (byte === 0xc6) return readBin(-1, 4); // bin 32
if (byte === 0xc7) return readExt(-1, 1); // ext 8
if (byte === 0xc8) return readExt(-1, 2); // ext 16
if (byte === 0xc9) return readExt(-1, 4) // ext 32
if (byte === 0xca) return readFloat(4); // float 32
if (byte === 0xcb) return readFloat(8); // float 64
if (byte === 0xcc) return readUInt(1); // uint 8
if (byte === 0xcd) return readUInt(2); // uint 16
if (byte === 0xce) return readUInt(4); // uint 32
if (byte === 0xcf) return readUInt(8) // uint 64
if (byte === 0xd0) return readInt(1); // int 8
if (byte === 0xd1) return readInt(2); // int 16
if (byte === 0xd2) return readInt(4); // int 32
if (byte === 0xd3) return readInt(8); // int 64
if (byte === 0xd4) return readExt(1); // fixext 1
if (byte === 0xd5) return readExt(2); // fixext 2
if (byte === 0xd6) return readExt(4); // fixext 4
if (byte === 0xd7) return readExt(8); // fixext 8
if (byte === 0xd8) return readExt(16); // fixext 16
if (byte === 0xd9) return readStr(-1, 1); // str 8
if (byte === 0xda) return readStr(-1, 2); // str 16
if (byte === 0xdb) return readStr(-1, 4); // str 32
if (byte === 0xdc) return readArray(-1, 2); // array 16
if (byte === 0xdd) return readArray(-1, 4); // array 32
if (byte === 0xde) return readMap(-1, 2); // map 16
if (byte === 0xdf) return readMap(-1, 4); // map 32
if (byte >= 0xe0 && byte <= 0xff) return byte - 256; // negative fixint
console.debug("msgpack array:", array);
throw new Error("Invalid byte value '" + byte + "' at index " + (pos - 1) + " in the MessagePack binary data (length " + array.length + "): Expecting a range of 0 to 255. This is not a byte array.");
}
function readInt(size) {
let value = 0;
let first = true;
while (size-- > 0) {
if (first) {
let byte = array[pos++];
value += byte & 0x7f;
if (byte & 0x80) {
value -= 0x80;
}
first = false;
}
else {
value *= 256;
value += array[pos++];
}
}
return value;
}
function readUInt(size) {
let value = 0;
while (size-- > 0) {
value *= 256;
value += array[pos++];
}
return value;
}
function readFloat(size) {
let view = new DataView(array.buffer, pos, size);
pos += size;
if (size === 4) {
return view.getFloat32(0, false);
}
if (size === 8) {
return view.getFloat64(0, false);
}
}
function readBin(size, lengthSize) {
if (size < 0) size = readUInt(lengthSize);
let data = array.subarray(pos, pos + size);
pos += size;
return data;
}
function readMap(size, lengthSize) {
if (size < 0) size = readUInt(lengthSize);
let data = {};
while (size-- > 0) {
let key = read();
data[key] = read();
}
return data;
}
function readArray(size, lengthSize) {
if (size < 0) size = readUInt(lengthSize);
let data = [];
while (size-- > 0) {
data.push(read());
}
return data;
}
function readStr(size, lengthSize) {
if (size < 0) size = readUInt(lengthSize);
let start = pos;
pos += size;
return decodeUtf8(array, start, size);
}
function readExt(size, lengthSize) {
if (size < 0) size = readUInt(lengthSize);
let type = readUInt(1);
let data = readBin(size);
switch (type) {
case 255:
return readExtDate(data);
}
return { type: type, data: data };
}
function readExtDate(data) {
if (data.length === 4) {
let sec = ((data[0] << 24) >>> 0) +
((data[1] << 16) >>> 0) +
((data[2] << 8) >>> 0) +
data[3];
return new Date(sec * 1000);
}
if (data.length === 8) {
let ns = ((data[0] << 22) >>> 0) +
((data[1] << 14) >>> 0) +
((data[2] << 6) >>> 0) +
(data[3] >>> 2);
let sec = ((data[3] & 0x3) * pow32) +
((data[4] << 24) >>> 0) +
((data[5] << 16) >>> 0) +
((data[6] << 8) >>> 0) +
data[7];
return new Date(sec * 1000 + ns / 1000000);
}
if (data.length === 12) {
let ns = ((data[0] << 24) >>> 0) +
((data[1] << 16) >>> 0) +
((data[2] << 8) >>> 0) +
data[3];
pos -= 8;
let sec = readInt(8);
return new Date(sec * 1000 + ns / 1000000);
}
throw new Error("Invalid data length for a date value.");
}
}
function encodeUtf8(str) {
let ascii = true, length = str.length;
for (let x = 0; x < length; x++) {
if (str.charCodeAt(x) > 127) {
ascii = false;
break;
}
}
let i = 0, bytes = new Uint8Array(str.length * (ascii ? 1 : 4));
for (let ci = 0; ci !== length; ci++) {
let c = str.charCodeAt(ci);
if (c < 128) {
bytes[i++] = c;
continue;
}
if (c < 2048) {
bytes[i++] = c >> 6 | 192;
}
else {
if (c > 0xd7ff && c < 0xdc00) {
if (++ci >= length)
throw new Error("UTF-8 encode: incomplete surrogate pair");
let c2 = str.charCodeAt(ci);
if (c2 < 0xdc00 || c2 > 0xdfff)
throw new Error("UTF-8 encode: second surrogate character 0x" + c2.toString(16) + " at index " + ci + " out of range");
c = 0x10000 + ((c & 0x03ff) << 10) + (c2 & 0x03ff);
bytes[i++] = c >> 18 | 240;
bytes[i++] = c >> 12 & 63 | 128;
}
else bytes[i++] = c >> 12 | 224;
bytes[i++] = c >> 6 & 63 | 128;
}
bytes[i++] = c & 63 | 128;
}
return ascii ? bytes : bytes.subarray(0, i);
}
function decodeUtf8(bytes, start, length) {
let i = start, str = "";
length += start;
while (i < length) {
let c = bytes[i++];
if (c > 127) {
if (c > 191 && c < 224) {
if (i >= length)
throw new Error("UTF-8 decode: incomplete 2-byte sequence");
c = (c & 31) << 6 | bytes[i++] & 63;
}
else if (c > 223 && c < 240) {
if (i + 1 >= length)
throw new Error("UTF-8 decode: incomplete 3-byte sequence");
c = (c & 15) << 12 | (bytes[i++] & 63) << 6 | bytes[i++] & 63;
}
else if (c > 239 && c < 248) {
if (i + 2 >= length)
throw new Error("UTF-8 decode: incomplete 4-byte sequence");
c = (c & 7) << 18 | (bytes[i++] & 63) << 12 | (bytes[i++] & 63) << 6 | bytes[i++] & 63;
}
else throw new Error("UTF-8 decode: unknown multibyte start 0x" + c.toString(16) + " at index " + (i - 1));
}
if (c <= 0xffff) str += String.fromCharCode(c);
else if (c <= 0x10ffff) {
c -= 0x10000;
str += String.fromCharCode(c >> 10 | 0xd800)
str += String.fromCharCode(c & 0x3FF | 0xdc00)
}
else throw new Error("UTF-8 decode: code point 0x" + c.toString(16) + " exceeds UTF-16 reach");
}
return str;
}
let msgpack = {
serialize: serialize,
deserialize: deserialize,
encode: serialize,
decode: deserialize
};
if (typeof module === "object" && module && typeof module.exports === "object") {
module.exports = msgpack;
}
else {
window[window.msgpackJsName || "msgpack"] = msgpack;
}
})()
$('#menuContainer').append('If you want to go to the LabyMod website click on the wolf symbol in the top left')
$("#youtuberOf").css({display: "none"});
let newImg = document.createElement("img");
newImg.src = "https://user-images.githubusercontent.com/15173170/51895430-6193cf00-23aa-11e9-9ca5-eecb7904fb41.png";
newImg.style = `position: absolute; top: 15px; left: 15px; z-index: 100000; width: 50px; height: 50px; cursor: pointer;`;
document.body.prepend(newImg);
newImg.addEventListener("click", () => {
let w = window.open("https://moomoo-hacks.incms.net/?uid=2&set[page][view]=preview", null, `height=650, width=1199, status=yes, toolbar=no, menubar=no, location=no`);
});
try {
document.getElementById("moomooio_728x90_home").style.display = "none";
$("#moomooio_728x90_home").parent().css({display: "none"});
} catch (e) {
console.log(" removing ad");
}
unsafeWindow.onbeforeunload = null;
({'position':'absolute','bottom':'72px','left':'20px','width':'420px','height':'236.25px','padding-bottom':'18px','margin-top':'0px'});
$("#gameCanvas").css('cursor', 'url(http://cur.cursors-4u.net/games/gam-15/gam1422.gif), default');
$('.menuCard').css({'white-space': 'normal',
'text-align': 'center',
'background-color': 'rgba(0, 0, 0, 0.74)',
'-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'});
$('.menuCard').css({'color':'#808080'});
$('#menuContainer').css({'white-space': 'normal'});
$('#guideCard').css({'color': '#FFFFF'});
$('.killCounter').css({'color': '#000000'});
$('#nativeResolution').css({'cursor': 'pointer'});
$('#playMusic').css({'cursor': 'pointer'});
$('#skinColorHolder').css({'margin-bottom': '30.75px'});
$('.settingRadio').css({'margin-bottom': '30.75px'});
$('#gameName').css({'color': '#000000',
'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': '126px',
'margin-bottom': '-30px'});
$('#loadingText').css({'color': '#000000',
'background-color': 'rgba(0, 0, 0, 0.74)',
'padding': '8px',
'right': '150%',
'left': '150%',
'margin-top': '40px'});
$('.ytLink').css({'color': '#000000',
'padding': '8px',
'background-color': 'rgba(0, 0, 0, 0.74)'});
$('.menuLink').css({'color': '#000000'});
$('.menuButton').css({'background-color': '#000000'});
$('#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',})
var moomooVer = $('#linksContainer2 .menuLink').html(),
hideSelectors = ['#mobileDownloadButtonContainer',
'#followText',
'#smallLinks',
'#linksContainer1',
'#twitterFollow',
'#youtubeFollow',
'#cdm-zone-02',
'#youtuberOf',
'#promoImg',
'#downloadButtonContainer',
'.menuHeader',
'.menuLink',
'.menuHeader:nth-child(5)',
'.menuHeader:nth-child(6)',
'.menuText'
],
css = '#rightCardHolder {display: block!important}',
head = document.head || document.getElementsByTagName('head')[0],
style = document.createElement('style');
style.type = 'text/css';
if (style.styleSheet){
style.styleSheet.cssText = css;
} else {
style.appendChild(document.createTextNode(css));
}
for ( let i = 0; i < hideSelectors.length; i++ ) {
$(hideSelectors[i]).hide();
}
head.appendChild(style);
$('#linksContainer2').html('<a href="./docs/versions.txt" target="_blank" class="menuLink">' + moomooVer + '</a>');
// document.getElementById("gameUI").style.backgroundImage = "url('')";
// document.getElementById("mainMenu").style.backgroundImage = "url('')";
document.getElementById('enterGame').innerHTML = '💀 PLAY 💀';
document.getElementById('loadingText').innerHTML = '. . . . . . . . . Load MooMod . . . . . . . . . ';
document.getElementById('nameInput').placeholder = "unknown";
document.getElementById('chatBox').placeholder = "😃HI😃";
document.getElementById('diedText').innerHTML = '💀 U R DIED 💀';
document.getElementById('diedText').style.color = "Red";
document.getElementById("storeHolder").style = "height: 1500px; width: 450px;"
document.getElementById('adCard').remove();
document.getElementById('errorNotification').remove();
document.getElementById("leaderboard").style.color = "red";
document.getElementById("gameName").style.color = "Red";
document.getElementById("setupCard").style.color = "Red";
document.getElementById("gameName").innerHTML = "🐺LabyMod🐺"
document.getElementById("promoImg").remove();
document.getElementById("scoreDisplay").style.color = "Red";
document.getElementById("woodDisplay").style.color = "Red";
document.getElementById("stoneDisplay").style.color = "Red";
document.getElementById("killCounter").style.color = "Red";
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";
$('.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'});
$('#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(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(0, 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)'});
$('.uiElement, .resourceDisplay').css({'-webkit-border-radius': '0px',
'-moz-border-radius': '0px',
'border-radius': '0px',
'background-color': 'rgba(0, 0, 0, 0.4)'});
$('#chatBox').css({'-webkit-border-radius': '0px',
'-moz-border-radius': '0px',
'border-radius': '0px',
'background-color': 'rgba(0, 0, 0, 0.4)',
'text-align': 'center'});
$('#foodDisplay').css({'color': '#ae4d54'});
$('#woodDisplay').css({'color': '#758f58'});
$('#stoneDisplay').css({'color': '#818198'});
$('#scoreDisplay').css({'color': '#c2b17a'});
$('#leaderboard').css({'-webkit-border-radius': '0px',
'-moz-border-radius': '0px',
'border-radius': '0px',
'background-color': 'rgba(0, 0, 0, 0.4)',
'text-align': 'center'});
$('#ageText').css({'color': '#ffdfd'});
$('#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': '#f00'});
$('.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)'});
$('#itemInfoHolder').css({'text-align': 'center',
'top': '125px',
'left': '350px',
'right': '350px',
'max-width': '666px'});
// document.addEventListener("keydown", function(a) {if (a.keyCode == 8,9,13,16,17,18,19,20,27,33,34,35,36,37,38,39,40,45,46,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,96,97,98,100,101,102,103,104,105,106,107,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,144,145,186,187,188,189,190,191,192,219,220,221,222) {document.getElementById("nameInput").value="FERANYZERIR BOT";}}, false);
var myElement = document.querySelector('#nameInput');
myElement.style.backgroundColor = "#fffdfd";
myElement.style.color = "#000000";
var getElement = document.querySelector('#enterGame');
getElement.style.backgroundColor = "#d61818";
getElement.style.color = "#000000";
$('#leaderboard').append('🐺LabyMod🐺');
var ID_WinterCap = 15;
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;
var ID_TurretGear = 53;
var TankGearKey = 90;
var BullHelmetKey = 74;
var SoldierHelmetKey = 71;
var TurretKey = 72;
var BoosterHatKey = 66;
var uneqiup = 16;
var SpikeGearKey = 89;
var BarabarianKey = 84;
var SpikeKey = 86
document.getElementById("moomooio_728x90_home").style.display = "none";
$("#moomooio_728x90_home").parent().css({display: "none"});
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;">LabyMod - Settings</h2>
</div>
<div class="modal-body" style="font-size: 17px;">
<div class="flexControl">
<label class="container">Premium Map
<input type="checkbox" id="myCheck">
<span class="checkmark"></span>
</label>
</div>
</div>
<div class="modal-body" style="font-size: 17px;">
<div class="flexControl">
<label class="container">More FPS
<input type="checkbox" id="myCheck">
<span class="checkmark"></span>
</label>
</div>
</div>
<div class="modal-body" style="font-size: 17px;">
<div class="flexControl">
<h3 style="color: black; font-size: 17px;">Hat-keys</h3>
<h3 class="menuPrompt">Tank Gear : </h3> <input value="${String.fromCharCode(TankGearKey)}" id="tankGear" class="keyPressLow" onkeyup="this.value = this.value.toUpperCase();" maxlength="1" type="text"/>
<h3 class="menuPrompt">Bull Helmet : </h3> <input value="${String.fromCharCode(BullHelmetKey)}" id="bullHelm" class="keyPressLow" onkeyup="this.value = this.value.toUpperCase();" maxlength="1" type="text"/>
<h3 class="menuPrompt">Soldier Helmet : </h3> <input value="${String.fromCharCode(SoldierHelmetKey)}" id="soldier" class="keyPressLow"onkeyup="this.value = this.value.toUpperCase();" maxlength="1" type="text"/>
<h3 class="menuPrompt">Turret Gear : </h3> <input value="${String.fromCharCode(TurretKey)}" id="turret" class="keyPressLow" maxlength="1" onkeyup="this.value = this.value.toUpperCase();" type="text"/>
<h3 class="menuPrompt">Booster Hat : </h3> <input value="${String.fromCharCode(BoosterHatKey)}" id="booster" class="keyPressLow" maxlength="1" onkeyup="this.value = this.value.toUpperCase();" type="text"/>
<h3 class="menuPrompt">Spike Gear : </h3> <input value="${String.fromCharCode(SpikeGearKey)}" id="spikeg" class="keyPressLow" maxlength="1" onkeyup="this.value = this.value.toUpperCase();" type="text"/>
<h3 class="menuPrompt">Barbarian Armor : </h3> <input value="${String.fromCharCode(BarabarianKey)}" id="barb" class="keyPressLow" onkeyup="this.value = this.value.toUpperCase();" maxlength="1" type="text"/>
<hr>
<div class="modal-body" style="font-size: 17px;">
<div class="flexControl">
<label class="container">Hat Macro speed - 100%
<input type="checkbox" id="myCheck">
<span class="checkmark"></span>
</label>
</div>
</div>
<div class="modal-body" style="font-size: 17px;">
<div class="flexControl">
<label class="container">Hat Macro speed - 70% 〖recommended〗
<input type="checkbox" id="myCheck">
<span class="checkmark"></span>
</label>
</div>
</div>
<div class="modal-body" style="font-size: 17px;">
<div class="flexControl">
<label class="container">Hat Macro speed - 130%
<input type="checkbox" id="myCheck">
<span class="checkmark"></span>
</label>
</div>
</div>
<div class="modal-footer">
<p>If you activate hat macro speeds, this is added together</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);
}
});
$("#bullHelm").on("input", () => {
var cval = $("#bullHelm").val();
if (cval){
BullHelmetKey = cval.toUpperCase();
BullHelmetKey = BullHelmetKey.charCodeAt(0);
console.log(BullHelmetKey);
}
});
$("#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);
}
});
$("#barb").on("input", () => {
var cval = $("#barb").val();
if (cval){
BarabarianKey = cval.toUpperCase();
BarabarianKey = BarabarianKey.charCodeAt(0);
console.log(BarabarianKey);
}
});
$("#booster").on("input", () => {
var cval = $("#booster").val();
if (cval){
BoosterHatKey = cval.toUpperCase();
BoosterHatKey = BoosterHatKey.charCodeAt(0);
console.log(BoosterHatKey);
}
});
$("#spikeg").on("input", () => {
var cval = $("#spikeg").val();
if (cval){
SpikeGearKey = cval.toUpperCase();
SpikeGearKey = SpikeGearKey.charCodeAt(0);
console.log(SpikeGearKey);
}
});
$("#trap").on("input", () => {
var cval = $("#trap").val();
if (cval){
TrapKey = cval.toUpperCase();
TrapKey = TrapKey.charCodeAt(0);
console.log(TrapKey);
}
});
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: #000000;
padding: 15px;
color: #fff;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
}
.modal-body {
padding: 10px 20px;
background: #fff;
}
.modal-footer {
background: #000000;
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: #e01313;
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 orange background */
.container input:checked ~ .checkmark {
background-color: #f16210;
}
.checkmark:after {
content: "";
position: absolute;
display: none;
}
.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 == 27){
if (modal.style.display = "none") {
modal.style.display = "block";
} else {
modal.style.display = "none";
}
} else if (e.keyCode == TankGearKey && document.activeElement.id.toLowerCase() !== 'chatbox'){
storeEquip(ID_TankGear);
} 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 == BarabarianKey && document.activeElement.id.toLowerCase() !== 'chatbox'){
storeEquip(ID_BarbarianArmor);
} 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';
}
}
var checkbox = document.querySelector("#myCheck")
checkbox.addEventListener('change', function() {
if (this.checked) {
$("#mapDisplay").css({background: `url('https://i.imgur.com/fgFsQJp.png')`});
console.log('checked')
} else {
$("#mapDisplay").css({background: `rgba(0, 0, 0, 0.25)`})
console.log('unchecked')
}
})
$("#mapDisplay").css({background: `url('https://i.imgur.com/fgFsQJp.png')`});
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(clanToggle == 1) {
doNewSend(["9", [null]]);
doNewSend(["8", [animate(false, 5)]])
}
doNewSend(["testing", [6]]);
}, 200);
setInterval(() => {
if(messageToggle == 1) {
doNewSend(["ch", [animate(true, 5)]])
}
}, 200);
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 = 200;
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 = 70;
var messageToggle = 0;
var clanToggle = 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 = 19
}
};
}
}
if(isEnemyNear == false && autoaim == false) {
normalAcc = 11;
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]]);
}
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 healer = repeater(81, () => {place(foodType)}, 0);
const boostPlacer = repeater(70, () => {place(boostType)}, 0);
const spikePlacer = repeater(86, () => {place(spikeType)}, 0);
const millPlacer = repeater(78, () => {place(millType)}, 0);
const turretPlacer = repeater(72, () => {place(turretType)}, 0);
const boostSpiker = repeater(71, boostSpike, 0);
document.addEventListener('keydown', (e)=>{
spikePlacer.start(e.keyCode);
healer.start(e.keyCode);
boostPlacer.start(e.keyCode);
boostSpiker.start(e.keyCode);
millPlacer.start(e.keyCode);
turretPlacer.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 == 80 && document.activeElement.id.toLowerCase() !== 'chatbox') {
for (let i=0;i<4;i++){
let angle = myPlayer.dir + toRad(i * 90);
place(wallType, angle)
}
}
if (e.keyCode == 73 && document.activeElement.id.toLowerCase() !== 'chatbox') {
for (let i=0;i<4;i++){
let angle = myPlayer.dir + toRad(i * 90);
place(boostType, angle)
}
}
if (e.keyCode == 186 && document.activeElement.id.toLowerCase() !== 'chatbox') {
for (let i=0;i<4;i++){
let angle = myPlayer.dir + toRad(i * 90);
place(spikeType, 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 == 85 && document.activeElement.id.toLowerCase() !== 'chatbox') {
hat(20);
}
if(e.keyCode == 82 && 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]]);
doNewSend(["c", [1]]);
setTimeout( () => {
doNewSend(["13c", [0, 53, 0]]);
doNewSend(["5", [secondary, true]]);
}, instaSpeed - 130);
setTimeout( () => {
doNewSend(["5", [primary, true]]);
doNewSend(["c", [0, null]]);
doNewSend(["13c", [0, 6, 0]]);
autoaim = false;
}, instaSpeed);
}
if(e.keyCode == 32 && 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);
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 == 38 && document.activeElement.id.toLowerCase() !== 'chatbox') {
messageToggle = (messageToggle + 1) % 2;
}
if(e.keyCode == 40 && document.activeElement.id.toLowerCase() !== 'chatbox') {
clanToggle = (clanToggle + 1) % 2;
}
if(e.keyCode == 106 && 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 = "MooMod"
} else {
document.title = "MooMod"
}
}
}
if(e.keyCode == 76 && document.activeElement.id.toLowerCase() !== 'chatbox') {
autoaim = true;
doNewSend(["5", [secondary, true]]);
doNewSend(["13c", [0, 53, 0]]);
doNewSend(["c", [1]]);
setTimeout( () => {
doNewSend(["6", [12]]);
}, 300);
setTimeout( () => {
doNewSend(["6", [15]]);
}, 300);
setTimeout( () => {
doNewSend(["c", [0]]);
doNewSend(["13c", [0, 6, 0]]);
doNewSend(["5", [primary, true]]);
autoaim = false;
}, 300);
}
if(e.keyCode == 97 && document.activeElement.id.toLowerCase() !== 'chatbox') {
doNewSend(["6", [4]]);
}
if(e.keyCode == 98 && document.activeElement.id.toLowerCase() !== 'chatbox') {
doNewSend(["6", [15]]);
}
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]]);
}
if(e.keyCode == 111 && document.activeElement.id.toLowerCase() !== 'chatbox') {
hatToggle = (hatToggle + 1) % 2;
if(healToggle == 0) {
if(hatToggle == 0) {
document.title = "Heal - off|🐺LabyMod🐺"
} else {
document.title = "Heal - off|🐺LabyMod🐺"
}
} else {
if(hatToggle == 0) {
document.title = "Heal - on|🐺LabyMod🐺"
} else {
document.title = "Heal - on|🐺LabyMod🐺"
}
}
}
})
document.addEventListener('keyup', (e)=>{
spikePlacer.stop(e.keyCode);
boostPlacer.stop(e.keyCode);
boostSpiker.stop(e.keyCode);
millPlacer.stop(e.keyCode);
turretPlacer.stop(e.keyCode);
healer.stop(e.keyCode);
if(e.keyCode == 71 && 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 = 'Sub~To~NotGudYT';
} else {
characters = 'NotGudYT';
}
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 = "🐺LabyMod🐺"
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;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment