Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Master Upgrade Script
- // @namespace -
- // @version upgrade with schock monitors by RX stole from RoYaL xd
- // @description dont share please
- // @author Lol hacked so idk who
- // @match *://moomoo.io/*
- // @match http://dev.moomoo.io/*
- // @match *sandbox.moomoo.io/*
- // @match *abc.moomoo.io/*
- // @grant none
- // @require https://greasyfork.org/scripts/368273-msgpack/code/msgpack.js?version=598723
- // @require http://code.jquery.com/jquery-3.3.1.min.js
- // @require https://code.jquery.com/ui/1.12.0/jquery-ui.min.js
- // @require https://cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.3.0/jquery-confirm.min.js
- // ==/UserScript==
- var hud = document.createElement("div");
- hud.innerHTML = '<div> <div id="WSDIhtmlDiv" class="hackDisp" border="0" style="opacity: 1;width: 200px; position: absolute;top: 333px;left: 20px;pointer-events: none;"> <input id="WSDirectInputhtml" class="hackDisp" type="text" position="absolute" placeholder="WS Sender" style="padding: 6px;font-size: 20px;color: #fff;background-color: rgba(0, 0, 0, 0.25);-webkit-border-radius: 4px;-moz-border-radius: 4px;border-radius: 4px;pointer-events: all;border: 0;text-align: center;"> </div></div><div style="width: 100%;position: absolute;top: 20px;right: 390px;margin: auto;text-align: center;color: red;font-size: 40px;opacity: 1;" id="TS1Shothtml" class="hackDisp"></div><table id="WSTable" class="hackDisp" style="opacity: 1;min-width: 100px;max-width: 157.8px;max-height: 296px;position: absolute;top: 20px;left: 20px;color: #fff;background-color: rgba(0, 0, 0, 0.25);border-radius: 4px;-moz-border-radius: 4px;-webkit-border-radius: 4px;pointer-events: none;text-align: left;" border="0px"> <tbody><tr> <th id="WS1">No Activity Yet</th> </tr> <tr> <td id="WS2">No Activity Yet</td> </tr> <tr> <td id="WS3">No Activity Yet</td> </tr> <tr> <td id="WS4">No Activity Yet</td> </tr> <tr> <td id="WS5">No Activity Yet</td> </tr> <tr> <td id="WS6">No Activity Yet</td> </tr> <tr> <td id="WS7">No Activity Yet</td> </tr> <tr> <td id="WS8">No Activity Yet</td> </tr> <tr> <td id="WS9">No Activity Yet</td> </tr> <tr> <td id="WS10">No Activity Yet</td> </tr> <tr> <td id="WS11">No Activity Yet</td> </tr> <tr> <td id="WS12">No Activity Yet</td> </tr> <tr> <td id="WS13">No Activity Yet</td> </tr> <tr> <td id="WS14">No Activity Yet</td> </tr> <tr> <td id="WS15">No Activity Yet</td> </tr> <tr> <td><input type="checkbox" id="noShowDWS" style="pointer-events: all;" checked="">Filter Out PD, pp, & rmd</td> </tr> </tbody></table> <table id="WSBTable" class="hackDisp" style="opacity: 1;min-width: 100px;max-height: 296px;position: absolute;top: 20px;left: 185px;color: #fff;background-color: rgba(0, 0, 0, 0.25);border-radius: 4px;-moz-border-radius: 4px;-webkit-border-radius: 4px;pointer-events: none;text-align: left;" border="0px"> <tbody><tr> <th id="WSB1">Focus not set</th> </tr> <tr> <td id="WSB2">Focus not set</td> </tr> <tr> <td id="WSB3">Focus not set</td> </tr> <tr> <td id="WSB4">Focus not set</td> </tr> <tr> <td id="WSB5">Focus not set</td> </tr> <tr> <td id="WSB6">Focus not set</td> </tr> <tr> <td id="WSB7">Focus not set</td> </tr> <tr> <td id="WSB8">Focus not set</td> </tr> <tr> <td id="WSB9">Focus not set</td> </tr> <tr> <td id="WSB10">Focus not set</td> </tr> <tr> <td id="WSB11">Focus not set</td> </tr> <tr> <td id="WSB12">Focus not set</td> </tr> <tr> <td id="WSB13">Focus not set</td> </tr> <tr> <td id="WSB14">Focus not set</td> </tr> <tr> <td id="WSB15">Focus not set</td> </tr> </tbody></table>';
- document.getElementsByTagName("body")[0].appendChild(hud);
- $(hud).animate({opacity: 1});
- var ws;
- var WSFocus = "all";
- var WSBFocus;
- var WSBRecord = false;
- var WSBList = "data:text/html, <p>";
- const START_SSWX = [146, 161, 52, 146, 1, 192]
- const END_SSWX = [146, 161, 52, 146, 0, 192]
- const TAKEOUT = [4, 132, 164, 116, 121, 112, 101, 2, 164, 100, 97, 116, 97, 147, 161, 53, 15, 212, 0, 0, 167, 111, 112, 116, 105, 111, 110, 115, 129, 168, 99, 111, 109, 112, 114, 101, 115, 115, 195, 163, 110, 115, 112, 161, 47];
- const APPLE = [4, 132, 164, 116, 121, 112, 101, 2, 164, 100, 97, 116, 97, 147, 161, 53, 0, 212, 0, 0, 167, 111, 112, 116, 105, 111, 110, 115, 129, 168, 99, 111, 109, 112, 114, 101, 115, 115, 195, 163, 110, 115, 112, 161, 47];
- const COOKIE = [4, 132, 164, 116, 121, 112, 101, 2, 164, 100, 97, 116, 97, 147, 161, 53, 1, 212, 0, 0, 167, 111, 112, 116, 105, 111, 110, 115, 129, 168, 99, 111, 109, 112, 114, 101, 115, 115, 195, 163, 110, 115, 112, 161, 47];
- const PIZZA = [97, 117, 116, 111, 115, 112, 101, 101, 100]
- var currentHat = 0;
- var currentAccessory = 0;
- var IN_PROCESS = false;
- var justDied = false;
- var recentHealth = 100;
- var MYID;
- var hasApple = true;
- var foodInHand = false;
- var autoheal = false;
- var autobull = false;
- var STATE = 0;
- var msgpack5 = msgpack;
- var inInstaProcess = false;
- var bowWorked = false;
- var myCLAN = null;
- var goodData;
- var myPlayer;
- var nearestPlayer;
- var nearestPlayerAngle = 0;
- var MYANGLE = 0;
- let coregood = [212, 0, 0, 167, 111, 112, 116, 105, 111, 110, 115, 129, 168, 99, 111, 109, 112];
- var autoreloadloop;
- var autoreloadenough = 0;
- var constChatLoop;
- var constChatLoopAll;
- var policeLoop;
- var policeLoopC;
- var policeLoopAll;
- var policeLoopAllC;
- let badreplace = [130, 166, 98, 117, 102, 102, 101, 114, 130, 164, 116, 121, 112, 101, 166, 66, 117, 102, 102, 101, 114, 164, 100, 97, 116, 97, 145, 0, 164, 116, 121, 112, 101, 0]
- document.msgpack = msgpack;
- function n(){
- this.buffer = new Uint8Array([0]);
- this.buffer.__proto__ = new Uint8Array;
- this.type = 0;
- }
- var nval = msgpack5.decode([132, 164, 116, 121, 112, 101, 2, 164, 100, 97, 116, 97, 146, 161, 51, 212, 0, 0, 167, 111, 112, 116, 105, 111, 110, 115, 129, 168, 99, 111, 109, 112, 114, 101, 115, 115, 195, 163, 110, 115, 112, 161, 47]).data[1];
- document.n = nval;
- document.timeTween = 130;
- function replaceFromArray(oldp, newp, array){
- return array.join(",").replace(oldp.join(","), newp.join(",")).split(",").map(x => parseInt(x))
- }
- autoreloadloop = setInterval(function () {
- if (autoreloadenough < 200) {
- document.title = "autoReloader working";
- if (document.getElementById("loadingText").innerHTML == `disconnected<a href="javascript:window.location.href=window.location.href" class="ytLink">reload</a>`) {
- document.title = "autoReloader done";
- clearInterval(autoreloadloop);
- setTimeout(function () {document.title = "Moo Moo";}, 1000)
- location.reload();
- }
- autoreloadenough++;
- }
- else if (autoreloadenough >= 300) {
- clearInterval(autoreloadloop);
- document.title = "autoReloader done";
- setTimeout(function () {document.title = "Moo Moo";}, 1000)
- }
- }, 50);
- function healthFunction(t, a) {
- return Math.abs(((t + a/2) % a) - a/2);
- }
- function encodeSEND(json){
- let OC = msgpack5.encode(json);
- var aAdd = Array.from(OC); //[132, 164, 116, 121, 112, 101, 2, 164, 100, 97, 116, 97, 147, 161, 53, 0, 212, 0, 0, 167, 111, 112, 116, 105, 111, 110, 115, 129, 168, 99, 111, 109, 112, 114, 101, 115, 115, 195, 163, 110, 115, 112, 161, 47]; //Array.from(OC);
- return new Uint8Array(aAdd).buffer;
- }
- WebSocket.prototype.oldSend = WebSocket.prototype.send;
- WebSocket.prototype.send = function(m){
- //console.info(new Uint8Array(m));
- if (!ws){
- document.ws = this;
- ws = this;
- console.info("WS SET");
- socketFound(this);
- }
- if (inInstaProcess){
- this.oldSend(m);
- console.log("here");
- return;
- }
- let x = new Uint8Array(m);
- this.oldSend(m);
- //console.info(x);
- let x_arr_SSX = Array.from(x);
- /*let usageArray = Array.from(new Uint8Array(m));
- if (usageArray.length == 45){
- if (usageArray[16] == 0 || usageArray[16] == 1) foodInHand = false;
- console.info(`Food in hand: null{foodInHand}`);
- };*/
- let realData = {}
- let realInfo = msgpack5.decode(x);
- if (realInfo[1] instanceof Array){
- realData.data = [realInfo[0], ...realInfo[1]]
- } else {
- realData.data = realInfo
- }
- //console.log(realData)
- //console.info("sent");
- //console.info(realData.data);
- if(realData.data[0]!="2") {
- console.info("HERE3");
- console.info(realData.data[0])
- console.info(realData.data);
- console.log(x);
- if (realData.data[0]=="3"){
- //console.info(realData.data[1]);
- /*console.info(new Uint8Array(m));
- if(typeof realData.data[1] != "number" && !nval){
- nval = realData.data[1];
- document.n = nval;
- console.info("SET NVAL to");
- console.info(nval);
- }*/
- /*console.info(typeof realData.data[2]);
- console.info(realData.data[2].buffer);
- goodData = realData.data;
- console.info(goodData);
- console.info(["5", 0, nval]);
- document.n = goodData[2];
- document.nval = nval*/
- }
- }
- //console.info(new Date().getTime());
- var rd0 = realData.data[0];
- var rd1 = realData.data[1];
- var rd2 = realData.data[2];
- var rd3 = realData.data[3];
- var rd4 = realData.data[4];
- if (document.getElementById("noShowDWS").checked == false || document.getElementById("noShowDWS").checked == true && rd0 != 2) {
- if (rd0 == "pp" && document.getElementById("noShowDWS").checked == true) {
- } else if (rd0 == "rmd" && document.getElementById("noShowDWS").checked == true) {}
- else {
- if (WSFocus == "all" || WSFocus == realData.toString().slice(0, WSFocus.length)) {
- wsLog(rd0, rd1, rd2, rd3, rd4);
- }
- }
- }
- if (realData.data[0]=="1"){
- console.info("user respawned");
- justDied = false;
- } else if (realData.data[0]=="13"){
- console.info("In Hat Part");
- console.info(realData);
- console.info(IN_PROCESS);
- console.info(realData.data);
- console.info("test");
- if (!IN_PROCESS && realData.data.length == 4 && realData.data[3]==0 &&realData.data[1]==0){
- currentHat = realData.data[2];
- console.info("Changed hat to " + currentHat);
- } else if (!IN_PROCESS && realData.data.length == 4 && realData.data[3]==1 &&realData.data[1]==0){
- currentAccessory = realData.data[2];
- console.info("Changed accessory to " + currentAccessory);
- }
- } else if (realData.data[0]=="2"){
- MYANGLE = realData.data[1];
- } else if (realData.data[0]=="5") {
- console.info("hai");
- console.info(new Uint8Array(m));
- console.info(realData.data);
- }
- };
- function socketFound(socket){
- socket.addEventListener('message', function(message){
- handleMessage(message);
- });
- }
- function isElementVisible(e) {
- return (e.offsetParent !== null);
- }
- function heal(){ //unused but removing could leave holes
- console.log("healing");
- if (recentHealth>=100) return;
- console.info(recentHealth);
- console.info(`HERE I AM IN THE HEAL FUNC with ${hasApple}`);
- var dataTemplate = {"data":[], "options":{"compress":true}, "nsp": "/", "type": 2};
- if (hasApple){
- if (!haveApple()){
- heal();
- return;
- }
- else { //User has apple
- var data2 = dataTemplate;
- data2['data'] = goodData != undefined ? goodData : ["5", [0]];
- ws.send(encodeSEND(data2['data']));
- }
- }
- else { //User has cookie
- console.info('user has cookie');
- var data3 = dataTemplate;
- data3['data'] = ["5", [1]];
- ws.send(encodeSEND(data3['data']));
- }
- dataTemplate["data"]=["c", [
- 1, MYANGLE]];
- let encoded = encodeSEND(dataTemplate['data']);
- ws.send(encoded);
- recentHealth += hasApple ? 20 : 40;
- }
- function handleMessage(m){
- let td = new Uint8Array(m.data);
- // console.info(td);
- //console.info(td);
- //console.info(td.slice(98,-1));
- var infotest = msgpack5.decode(td);
- var info;
- if(infotest.length > 1) {
- info = [infotest[0], ...infotest[1]];
- if (info[1] instanceof Array){
- info = info;
- }
- } else {
- info = infotest;
- }
- // console.log(info);
- //console.info("received");
- //console.info(new Date().getTime());
- if(!info) return;
- if (inInstaProcess){
- doNewSend(["2", [nearestPlayerAngle]]);
- }
- // doNewSend(["2", 0.45]);
- if (info[0] == "h"){
- console.info("doing stuff");
- console.info(info);
- if (info[1] == MYID) {
- if (info[2] < 100 && info[2] > 0 && autoheal){
- recentHealth = info[2];
- console.info("RECEIVED:");
- console.info(info);
- //recentHealth += hasApple ? 20 : 40;
- console.info("heal notif sent");
- setTimeout( () => {
- heal();
- }, autoHealSpeed);
- } else if (info[2] > 0 && autoheal) {
- console.info("done healing");
- recentHealth = 100;
- if (foodInHand){
- console.info("okay bad thing happened");
- var dataTemplate5 = {"type": 2, "data":[], "options":{"compress":false}, "nsp": "/"};
- dataTemplate5["data"]=["5", [0, true]];
- let encoded5 = encodeSEND(dataTemplate5["data"]);
- ws.send(encoded5);
- console.info("corrected bad thing");
- }
- } else if (autoheal) {
- hasApple = true; //You've died tragically in combat; back to the apple for you!
- console.info("Setting has apple to true from here");
- }
- }
- }
- if (WSBFocus == undefined) {}
- else if (WSBFocus == "all" || WSBFocus == info.toString().slice(0, WSBFocus.length)) {
- wsbLog(info);
- }
- // console.info("-------------")
- if (info[0] == "1" && !MYID){
- MYID = info[1];
- }
- if (info[0] == "18" && info[4]=="1200") {
- console.info(info);
- bowWorked = true;
- }
- else if(info[0] == "11"){
- console.info("doing death");
- hasApple = true;
- justDied = true;
- recentHealth = 100;
- }
- }
- function pdist(player1, player2){
- return Math.sqrt( Math.pow((player2.y-player1.y), 2) + Math.pow((player2.x-player1.x), 2) );
- }
- function haveApple(){
- console.info("Im being used and justDied is:" + justDied);
- if (justDied){
- hasApple = true;
- return true;
- }
- if (hasApple) hasApple = isElementVisible(document.getElementById("actionBarItem14"));
- return hasApple;
- }
- function doNewSend(sender){
- ws.send(encodeSEND(sender));
- }
- function wsLog (rd0, rd1, rd2, rd3, rd4) {
- rd1 = (rd1==undefined) ? "" : ", "+rd1;
- rd2 = (rd2==undefined) ? "" : ", "+rd2;
- rd3 = (rd3==undefined) ? "" : ", "+rd3;
- rd4 = (rd4==undefined) ? "" : ", "+rd4;
- document.getElementById("WS15").innerHTML = document.getElementById("WS14").innerHTML;
- document.getElementById("WS14").innerHTML = document.getElementById("WS13").innerHTML;
- document.getElementById("WS13").innerHTML = document.getElementById("WS12").innerHTML;
- document.getElementById("WS12").innerHTML = document.getElementById("WS11").innerHTML;
- document.getElementById("WS11").innerHTML = document.getElementById("WS10").innerHTML;
- document.getElementById("WS10").innerHTML = document.getElementById("WS9").innerHTML;
- document.getElementById("WS9").innerHTML = document.getElementById("WS8").innerHTML;
- document.getElementById("WS8").innerHTML = document.getElementById("WS7").innerHTML;
- document.getElementById("WS7").innerHTML = document.getElementById("WS6").innerHTML;
- document.getElementById("WS6").innerHTML = document.getElementById("WS5").innerHTML;
- document.getElementById("WS5").innerHTML = document.getElementById("WS4").innerHTML;
- document.getElementById("WS4").innerHTML = document.getElementById("WS3").innerHTML;
- document.getElementById("WS3").innerHTML = document.getElementById("WS2").innerHTML;
- document.getElementById("WS2").innerHTML = document.getElementById("WS1").innerHTML;
- document.getElementById("WS1").innerHTML = rd0+rd1+rd2+rd3+rd4;
- }
- function wsbLog (info) {
- var i;
- for (i = 0; i < info.length; i++) {
- info[i] = " | " + info[i] + " | ";
- }
- document.getElementById("WSB15").innerHTML = document.getElementById("WSB14").innerHTML;
- document.getElementById("WSB14").innerHTML = document.getElementById("WSB13").innerHTML;
- document.getElementById("WSB13").innerHTML = document.getElementById("WSB12").innerHTML;
- document.getElementById("WSB12").innerHTML = document.getElementById("WSB11").innerHTML;
- document.getElementById("WSB11").innerHTML = document.getElementById("WSB10").innerHTML;
- document.getElementById("WSB10").innerHTML = document.getElementById("WSB9").innerHTML;
- document.getElementById("WSB9").innerHTML = document.getElementById("WSB8").innerHTML;
- document.getElementById("WSB8").innerHTML = document.getElementById("WSB7").innerHTML;
- document.getElementById("WSB7").innerHTML = document.getElementById("WSB6").innerHTML;
- document.getElementById("WSB6").innerHTML = document.getElementById("WSB5").innerHTML;
- document.getElementById("WSB5").innerHTML = document.getElementById("WSB4").innerHTML;
- document.getElementById("WSB4").innerHTML = document.getElementById("WSB3").innerHTML;
- document.getElementById("WSB3").innerHTML = document.getElementById("WSB2").innerHTML;
- document.getElementById("WSB2").innerHTML = document.getElementById("WSB1").innerHTML;
- document.getElementById("WSB1").innerHTML = info;
- if (WSBRecord == true) {
- WSBList = WSBList + info.toString() + "<br><br>";
- }
- }
- function evalCommand (cmd) {
- cmd = cmd.slice(1, cmd.length).split("~");
- var fb;
- switch (cmd[0]) {
- case "ConstantChat":
- switch (cmd[1]) {
- case "onAll":
- clearInterval(constChatLoop);
- clearInterval(constChatLoopAll);
- constChatLoopAll = setInterval(function () {
- doNewSend(["ch", ["/CH"+cmd[2]]]);
- }, 500);
- break;
- case "on":
- clearInterval(constChatLoop);
- clearInterval(constChatLoopAll);
- constChatLoop = setInterval(function () {
- doNewSend(["ch", [cmd[2]]]);
- }, 500);
- break;
- case "off":
- clearInterval(constChatLoop);
- clearInterval(constChatLoopAll);
- break;
- }
- break;
- case "Siren":
- switch (cmd[1]) {
- case "on":
- if (cmd[2] == "all") {
- clearInterval(policeLoopAll);
- clearInterval(policeLoop);
- clearInterval(policeLoopAllC);
- clearInterval(policeLoopC);
- policeLoopAll = setInterval(function () {
- doNewSend(["ch", ["/WSB 13c/0/15/0"]]);
- doNewSend(["13c", [0, 15, 0]]);
- setTimeout(function () {
- doNewSend(["ch", ["/WSB 13c/0/8/0"]]);
- doNewSend(["13c", [0, 8, 0]]);
- },500);
- }, 1000);
- policeLoopAllC = setInterval(function () {
- setTimeout(function () {
- doNewSend(["ch", ["/CHWOOP WOOP"]]);
- }, 20);
- setTimeout(function () {
- doNewSend(["ch", ["/CHThat'sTheSoundOfThePolice"]]);
- },700);
- setTimeout(function () {
- doNewSend(["ch", ["/CHWOOP WOOP"]]);
- },1400);
- setTimeout(function () {
- doNewSend(["ch", ["/CHThat'sTheSoundOfDaBeast"]]);
- },2100);
- }, 2800);
- } else {
- clearInterval(policeLoopAll);
- clearInterval(policeLoop);
- clearInterval(policeLoopAllC);
- clearInterval(policeLoopC);
- policeLoop = setInterval(function () {
- doNewSend(["13c", [0, 15, 0]]);
- setTimeout(function () {
- doNewSend(["13c", [0, 8, 0]]);
- },500);
- }, 1000);
- policeLoopC = setInterval(function () {
- setTimeout(function () {
- doNewSend(["ch", ["WOOP WOOP"]]);
- }, 20);
- setTimeout(function () {
- doNewSend(["ch", ["That'sTheSoundOfThePolice"]]);
- },700);
- setTimeout(function () {
- doNewSend(["ch", ["WOOP WOOP"]]);
- },1400);
- setTimeout(function () {
- doNewSend(["ch", ["That'sTheSoundOfDaBeast"]]);
- },2100);
- }, 2800);
- }
- break;
- case "off":
- if (cmd[2] == "all") {
- clearInterval(policeLoopAll);
- clearInterval(policeLoop);
- clearInterval(policeLoopAllC);
- clearInterval(policeLoopC);
- } else {
- clearInterval(policeLoopAll);
- clearInterval(policeLoop);
- clearInterval(policeLoopAllC);
- clearInterval(policeLoopC);
- }
- break;
- }
- break;
- case "WSBFocus":
- WSBFocus = cmd[1];
- fb = "WSBFocus set to: " + cmd[1];
- break;
- case "WSFocus":
- WSFocus = cmd[1];
- fb = "WSFocus set to: " + cmd[1];
- break;
- case "WSBRecord":
- switch (cmd[1]) {
- case "start":
- WSBRecord = true;
- fb = "WSB recording started";
- break;
- case "stop":
- WSBRecord = false;
- fb = "WSB recording ended";
- break;
- case "print":
- document.getElementById("WSDirectInputhtml").value = WSBList; + "</p>";
- break;
- }
- break;
- }
- document.getElementById("TS1Shothtml").innerHTML = fb;
- setTimeout(function () {document.getElementById("TS1Shothtml").innerHTML = "";}, 1000);
- }
- document.addEventListener('keydown', function (e) {
- if (document.activeElement.id == 'chatBox') return;
- if (document.activeElement.id == 'allianceInput') return;
- if (document.activeElement.id == 'WSDirectInputhtml') {
- if (e.keyCode == 13) {
- var WSInput = document.getElementById("WSDirectInputhtml").value;
- if (WSInput.slice(0, 1) == "/") {
- evalCommand(WSInput);
- document.getElementById("WSDirectInputhtml").blur();
- }
- else {
- WSInput = document.getElementById("WSDirectInputhtml").value.split(", ");
- var t;
- for (t = 0; t < WSInput.length; t++) {
- WSInput[t] = (parseFloat(WSInput[t]).toString()==WSInput[t]) ? parseFloat(WSInput[t]) : WSInput[t];
- }
- switch (WSInput.length) {
- case 1: doNewSend([WSInput[0]]); break;
- case 2: doNewSend([WSInput[0], [WSInput[1]]]); break;
- case 3: doNewSend([WSInput[0], [WSInput[1], WSInput[2]]]); break;
- case 4: doNewSend([WSInput[0], [WSInput[1], WSInput[2], WSInput[3]]]); break;
- case 5: doNewSend([WSInput[0], [WSInput[1], WSInput[2], WSInput[3], WSInput[4]]]); break;
- }
- document.getElementById("WSDirectInputhtml").blur();
- }
- } else return;
- if (document.activeElement.id == 'nameInput') return;
- }
- if (e.keyCode == 80) {
- if (document.getElementById("WSBTable").style.display == "block") {
- var x = document.getElementsByClassName("hackDisp");
- var i;
- for (i = 0; i < x.length; i++) {
- x[i].style.display = "none";
- }
- } else {
- var y = document.getElementsByClassName("hackDisp");
- var j;
- for (j = 0; j < y.length; j++) {
- y[j].style.display = "block";
- }
- }
- }
- if (e.keyCode == 9 && document.getElementById("chatBox").style.display ==! "block") {
- setTimeout(function () {
- document.getElementById("WSDirectInputhtml").blur();
- document.getElementById("noShowDWS").blur();
- document.getElementById("gameCanvas").focus();
- }, 10);
- }
- }, true);
- document.getElementById("WSDirectInputhtml").addEventListener('mousedown', function (e) {
- if (e.button == 0) {
- setTimeout(function () {document.getElementById("WSDirectInputhtml").select();}, 150);
- }
- }, true);
- $("#gameCanvas").css('cursor', 'url(http://cur.cursors-4u.net/user/use-1/use153.cur), default');
- $("#consentBlock").css({display: "none"});
- 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;
- //Turret Gear. "Use if you want to"
- var ID_TurretGear = 53;
- // Keys
- var TankGearKey = 90;
- var BullHelmetKey = 74;
- var SoldierHelmetKey = 71;
- var TurretKey = 72;
- var BoosterHatKey = 16;
- var uneqiup = 220;
- var SpikeGearKey = 89;
- var BarabarianKey = 84;
- var SpikeKey = 86
- // Remove all of the ads on the page.
- try {
- document.getElementById("moomooio_728x90_home").style.display = "none";
- $("moomooio728x90_home").parent().css({display: "none"});
- } catch (e) {
- console.log("There was an error removing the ads.");
- }
- var menuChange = document.createElement("div");
- menuChange.className = "menuCard";
- menuChange.id = "mainSettings";
- menuChange.innerHTML = `
- <div id="simpleModal" class="modal">
- <div class="modal-content">
- <div class="modal-header">
- <span class="closeBtn">×</span>
- <h2 style="font-size: 17px;">Hat Macro Settings</h2>
- </div>
- <div class="modal-body" style="font-size: 17px;">
- <div class="flexControl">
- <h3 style="color: red; font-size: 17px;">To unquip a hat press: LEFT SHIFT</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>
- <h3 style="font-size: 17px;"> Map Settings </h3>
- <label class="container">Show biomes on the map
- <input type="checkbox" id="myCheck">
- <span class="checkmark"></span>
- </label>
- </div>
- </div>
- <div class="modal-footer">
- <h3 style="font-size: 17px;">Edit and live save your changes!</h3>
- <p>This hack is free and will always be free!</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: #428bca;
- padding: 15px;
- color: #fff;
- border-top-left-radius: 5px;
- border-top-right-radius: 5px;
- }
- .modal-body {
- padding: 10px 20px;
- background: #fff;
- }
- .modal-footer {
- background: #428bca;
- padding: 10px;
- color: #fff;
- text-align: center;
- border-bottom-left-radius: 5px;
- border-bottom-right-radius: 5px;
- }
- .closeBtn {
- color: #ccc;
- float: right;
- font-size: 30px;
- color: #fff;
- }
- .closeBtn:hover,
- .closeBtn:focus {
- color: #000;
- text-decoration: none;
- cursor: pointer;
- }
- /* Customize the label (the container) */
- .container {
- display: block;
- position: relative;
- padding-left: 35px;
- margin-bottom: 12px;
- cursor: pointer;
- font-size: 16px;
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- }
- /* Hide the browser's default checkbox */
- .container input {
- position: absolute;
- opacity: 0;
- cursor: pointer;
- height: 0;
- width: 0;
- }
- /* Create a custom checkbox */
- .checkmark {
- position: absolute;
- top: 0;
- left: 0;
- height: 25px;
- width: 25px;
- background-color: #eee;
- }
- /* On mouse-over, add a grey background color */
- .container:hover input ~ .checkmark {
- background-color: #ccc;
- }
- /* When the checkbox is checked, add a blue background */
- .container input:checked ~ .checkmark {
- background-color: #2196F3;
- }
- /* Create the checkmark/indicator (hidden when not checked) */
- .checkmark:after {
- content: "";
- position: absolute;
- display: none;
- }
- /* Show the checkmark when checked */
- .container input:checked ~ .checkmark:after {
- display: block;
- }
- /* Style the checkmark/indicator */
- .container .checkmark:after {
- left: 9px;
- top: 5px;
- width: 5px;
- height: 10px;
- border: solid white;
- border-width: 0 3px 3px 0;
- -webkit-transform: rotate(45deg);
- -ms-transform: rotate(45deg);
- transform: rotate(45deg);
- }
- `))
- document.head.appendChild(styleItem);
- $("#adCard").css({display: "none"});
- document.addEventListener('keydown', function(e) {
- if (e.keyCode == uneqiup && document.activeElement.id.toLowerCase() !== 'chatbox'){
- console.log("done")
- storeEquip(0);
- } else if (e.keyCode == 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 == 72 && document.activeElement.id.toLowerCase() !== 'chatbox'){
- storeEquip(ID_FlipperHat);
- } else if (e.keyCode == 66 && document.activeElement.id.toLowerCase() !== 'chatbox'){
- storeEquip(ID_EmpHelmet);
- } else if (e.keyCode == 70 && document.activeElement.id.toLowerCase() !== 'chatbox'){
- storeEquip(ID_SoldierHelmet);
- } else if (e.keyCode == 71 && document.activeElement.id.toLowerCase() !== 'chatbox'){
- storeEquip(ID_BullHelmet);
- } else if (e.keyCode == 16 && 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 == 192 && document.activeElement.id.toLowerCase() !== 'chatbox'){
- storeEquip(ID_TurretGear);
- } else if (e.keyCode == 67 && document.activeElement.id.toLowerCase() !== 'chatbox'){
- storeEquip(ID_SamuraiArmor);
- }
- })
- // 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')
- }
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement