Moomoo.io Hacks & Cheats

// ==UserScript== // @name Effortless - Moomoo.io Legit Macros & Interactive Menu // @author Seryo // @description Press L to toggle macros: (Spike, Trap, Mill, Turret/Teleport, Heal). Use the "Esc" key to toggle the menu. // @version 0.2 // @match *://*.moomoo.io/* // @namespace https://greasyfork.org/users/1190411 // @icon https://cdn.glitch.com/82ae8945-dcc6-4276-98a9-665381b4cd2b/cursor12.png // @license MIT // @grant none // @require https://cdn.jsdelivr.net/npm/msgpack-lite@0.1.26/dist/msgpack.min.js // @require http://code.jquery.com/jquery-3.3.1.min.js // @require https://code.jquery.com/ui/1.12.0/jquery-ui.min.js // ==/UserScript== var pi = Math.PI, date = new Date(), old = Date.now(), cos = Math.cos, sin = Math.sin, abs = Math.abs, pow = Math.pow, min = Math.min, max = Math.max, atan2 = Math.atan2, sqrt = Math.sqrt, random = Math.random, floor = Math.floor; function rdm(a,b) { return Math.floor(Math.random() *(b - a + 1)) + a; } function isChatOpen() { return document.activeElement.id.toLowerCase() === 'chatbox'; } function isAllianceInputActive() { return document.activeElement.id.toLowerCase() === 'allianceinput'; } function shhk() { return !isChatOpen() && !isAllianceInputActive(); } $("body").after(` <div id="infomenu" style="display: none; background: rgba(0, 0, 0, 0.8); font-family: 'Hammersmith One', sans-serif; position: absolute; width: 260px; height: 220px; border: 2px solid black; border-radius: 10px; top: 20px; left: 20px; z-index: 1; box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.4;"> <div class="nameblock" style="font-size: 28px; font-weight: bold; color: #fff; padding: 10px 0;">Effortless</div> <hr> <ul style="list-style-type: none; padding: 0;"> <li> <label> <div class="text" style="font-size: 18px; color: #fff;">Biome map</div> <span class="checkmark"></span> <input type="checkbox" id="NewMap"> </label> </li> <li> <label> <div class="text" style="font-size: 18px; color: #fff;">Show CPS</div> <span class="checkmark"></span> <input type="checkbox" id="CPSTOGGLER"> </label> </li> <li> <label> <div class "text" style="font-size: 18px; color: #fff;">Macros</div> <span class="checkmark"></span> <input type="checkbox" id="AHK"> </label> </li> <li style="margin-bottom: -55px;"> <label> <div class="text" style="font-size: 18px; color: #fff;">AutoRespawn</div> <span class="checkmark"></span> <input type="checkbox" id="autospawn"> </label> </li> <li> <label> <div class="text" style="font-size: 18px; color: #fff;" contenteditable="true" id="Soldier_Q"></div> <span class=""></span> </label> </li> <li> <label> <div class="text" style="font-size: 18px; color: #fff;" contenteditable="true" id="Clicks"></div> <span class=""></span> </label> </li> <li class="transparent-text" style="position: absolute; top: -9999px; left: -9999px; margin-bottom: -20px;"> <div class="text" style="font-size: 18px; color: #fff; margin-top: 0px;"> <div class="Input_Text_style" style="width: 60px; border: none; background: transparent;" contenteditable="true" id="MakeClan"></div> </div> </li> </ul> <hr> <div class="nameblock" style="font-size: 28px; font-weight: bold; color: #fff; padding: 10px 0; margin-top: 0px;">Hotkeys</div> <hr> <div class="text" style="font-size: 18px; color: #fff; white-space: pre-line;"> <div style="margin-top: -17px; margin-bottom: -10px; font-size: 18px;">V = Spike</div> <div style="margin-bottom: -10px; font-size: 18px;">F = Trap</div> <div style="margin-bottom: -10px; font-size: 18px;">N = Mill</div> <div style="margin-bottom: -10px; font-size: 18px;">H = Turret / Teleport</div> <div style="margin-bottom: -10px; font-size: 18px;">Q = Healing</div> <div style="margin-bottom: -10px; font-size: 18px;">3 = Healing</div> <div style="margin-bottom: -20px; font-size: 18px;">L = Toggle Macros</div> </div> </div> <style> button:active, button:focus { outline: none !important; } button::-moz-focus-inner { border: 0 !important; } .nameblock { font-size: 20px; color: #fff; text-align: center; } li { font-size: 18px; margin-bottom: 10px; } .text { display: block; font-size: 18px; color: #fff; text-align: left; } label { display: flex; justify-content: space-between; align-items: center; width: 100%; } .checkmark { margin-left: 10px; } ::-webkit-scrollbar { width: 5px; height: 3px; } ::-webkit-scrollbar-button { background-color: #000000; } ::-webkit-scrollbar-track { background-color: #808080; } ::-webkit-scrollbar-track-piece { background-color: rgba(0, 0, 0, 0.50); } ::-webkit-scrollbar-thumb { height: 50px; background-color: #666; border-radius: 3px; } ::-webkit-scrollbar-corner { background-color: #808080; } ::-webkit-resizer { background-color: #808080; } #infomenu { overflow-y: scroll; overflow-x: hidden; padding: 20px; } input { outline: 0 !important; } </style> <script> var isDragging = false; var initialX; var initialY; var menuElement = document.getElementById("infomenu"); function dragStart(e) { isDragging = true; initialX = e.clientX - menuElement.getBoundingClientRect().left; initialY = e.clientY - menuElement.getBoundingClientRect().top; } function dragEnd() { isDragging = false; } function drag(e) { if (!isDragging) return; menuElement.style.left = (e.clientX - initialX) + 'px'; menuElement.style.top = (e.clientY - initialY) + 'px'; } menuElement.addEventListener('mousedown', dragStart); document.addEventListener('mouseup', dragEnd); document.addEventListener('mousemove', drag); </script> `); $("body").after(` <div id="ShowMenu"> </span> <div id="addtext">LeftAndRightClick: On</div> <div id="addtext3"> Macros: On</div> <div id="addtext4">AutoSpawn: On</div> <div id="addtext1">Left-Click</div> <div id="addtext2">Right-Click</div> <style> #ShowMenu { position:absolute !important; display:block; top: 5px; left: -150px; width: auto; height: auto; text-align: center; } #addtext,#addtext1,#addtext2,#addtext0,#addtext3,#addtext4{ display: none; color: black; font-weight: bold; font-family: 'Hammersmith One', sans-serif; } @-webkit-keyframes colorR { 0% { background-position: 0% 50% } 50% { background-position: 100% 50% } 100% { background-position: 0% 50% } } @keyframes colorR { 0% { background-position: 0% 50% } 50% { background-position: 100% 50% } 100% { background-position: 0% 50% } } </style> <script> let tm; let t = "Moo Moo"; function change(icon, text) { document.querySelector('head title').innerHTML = text; document.querySelector('link[rel="shortcut icon"]').setAttribute('href', icon); } window.onfocus = () => { change("https://sandbox.moomoo.io/img/favicon.png?v=1", t); } </script> `); $(document).on('keydown', function(e) { if (e.keyCode === 76 && shhk()) { var macrosCheckbox = document.getElementById("AHK"); macrosCheckbox.click(); } }); $(document).keydown(function(event) { if ( event.keyCode === 27 && shhk() && storeMenu.style.display !== 'block') { $("#infomenu").toggle(); } }); document.querySelector("#MakeClan").oninput = function(){ if (this.value.length === 0) { $(".Input_Text_style").css("border","2px solid red"); } else { $(".Input_Text_style").css("border","2px solid #fff"); } } let mouseX, mouseY, width,height; let url = new URL(window.location.href); window.sessionStorage.force = url.searchParams.get("fc"); var pr,sec,st,bt,ft,mt,tr; var AHK = false; var autospawn = false; let myPlayer = { id: null, x: null, y: null, dir: null, object: null, weapon: null, clan: null, isLeader: null, isSkull: null }; var websocket; var MsgPack = msgpack; document.msgpack = msgpack; WebSocket.prototype.OldSend = WebSocket.prototype.send; WebSocket.prototype.send = function(e) { if(!websocket){ Greasy(this); websocket = this; document.websocket = this; } this.OldSend(e); } function Greasy(msg){ msg.addEventListener('message', function(cd){ Handler(cd); }); } function Handler(e) { let tmp = MsgPack.decode(new Uint8Array(e.data)); let data; if(tmp.length >= 1) { data = [tmp[0], ...tmp[1]]; if (data[1] instanceof Array){ data = data; } } else { data = tmp; } let item = data[0]; if(!data) { return; } if (item == "33") { for(let e = 0; e < data[1].length / 13; e++) { let Arr = data[1].slice(13*e, 13*e+13); if(Arr[0] == myPlayer.id) { myPlayer.x = Arr[1]; myPlayer.y = Arr[2]; myPlayer.dir = Arr[3]; myPlayer.object = Arr[4]; myPlayer.weapon = Arr[5]; myPlayer.clan = Arr[7]; myPlayer.isLeader = Arr[8]; myPlayer.isSkull = Arr[11]; } } } if (item == "1" && myPlayer.id == null){ myPlayer.id = data[1]; } 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; }); } UpdateItems(); if(autospawn == true){ item == "11" && setTimeout(() => { emit('sp', {name:localStorage.getItem("moo_name"), moofoll: "1", skin: rdm(8,1)}); },3000); } } function acc(id) { emit("13c", 1,id, 1); emit("13c", 0,id, 1); } function hat(id) { emit("13c", 1,id, 0); emit("13c", 0,id, 0); } function Sender(e) { websocket.send(new Uint8Array(Array.from(MsgPack.encode(e)))); } function emit(e,a,b,c,m,r) { Sender([e, [a,b,c,m,r]]); } function use(e, a = atan2(mouseY - height / 2, mouseX - width / 2)) { emit("5", e, null); emit("c", 1, a); emit("c", 0, a); emit("5", myPlayer.weapon, true); } function useQ(e, a = atan2(mouseY - height / 2, mouseX - width / 2)) { emit("5", e, null); emit("c", 1, null); emit("c", 0, null); emit("5", myPlayer.weapon, true); } var rptr = function(key, action, interval) { let _isKeyDown = false; let _intervalId = undefined; return { start(keycode) { if(keycode == key && shhk()) { _isKeyDown = true; if(_intervalId === undefined) { _intervalId = setInterval(() => { action(); if(!_isKeyDown){ clearInterval(_intervalId); _intervalId = undefined; } }, interval); } } }, stop(keycode) { if(keycode == key && shhk()) { _isKeyDown = false; } } };} const KeyHeal_3 = rptr(51, () => { useQ(ft, null) },100); const KeyHeal_Q = rptr(81, () => { useQ(ft, null) },100); const Put_Boost = rptr(70, () => { for(let i=0;i<1;i++)use(bt) },100); const Put_Spike = rptr(86, () => { for(let i=0;i<1;i++)use(st) },100); const Put_Mills = rptr(78, () => { for(let i=0;i<1;i++)use(mt) },100); const Put_Turret = rptr(72, () => { for(let i=0;i<1;i++)use(tr); },100); document.addEventListener('keydown', (e)=>{ if(AHK == true){ KeyHeal_3.start(e.keyCode); KeyHeal_Q.start(e.keyCode); Put_Boost.start(e.keyCode); Put_Spike.start(e.keyCode); Put_Mills.start(e.keyCode); Put_Turret.start(e.keyCode); } }); document.addEventListener('keyup', (e)=>{ if(AHK == true){ KeyHeal_3.stop(e.keyCode); KeyHeal_Q.stop(e.keyCode); Put_Boost.stop(e.keyCode); Put_Spike.stop(e.keyCode); Put_Mills.stop(e.keyCode); Put_Turret.stop(e.keyCode); } }); function Element_Visible(e) { return e.offsetParent !== null; } function UpdateItems() { for (let i=0;i<9;i++){ if (Element_Visible(document.getElementById("actionBarItem" + i.toString()))){ pr = i; } } for (let i=9;i<16;i++){ if (Element_Visible(document.getElementById("actionBarItem" + i.toString()))){ sec = i; } } for (let i=16;i<19;i++){ if (Element_Visible(document.getElementById("actionBarItem" + i.toString()))){ ft = i - 16; } } for (let i=22;i<26;i++){ if (Element_Visible(document.getElementById("actionBarItem" + i.toString()))){ st = i - 16; } } for (let i=26;i<29;i++){ if (Element_Visible(document.getElementById("actionBarItem" + i.toString()))){ mt = i - 16; } } for (let i=31;i<33;i++){ if (Element_Visible(document.getElementById("actionBarItem" + i.toString()))){ bt = i - 16; } } for (let i=33;i<39;i++){ if (Element_Visible(document.getElementById("actionBarItem" + i.toString()))){ tr = i - 16; } } } var Soldier_Q = false; var Clicks = false; const cvs = document.getElementById("gameCanvas"); cvs.addEventListener("mousedown", clicks, false); function clicks(e) { if (e.button == 0) { if (Clicks == true) { document.getElementById('addtext1').style .display = "block"; } } if (e.button == 2) { if (Clicks == true) { document.getElementById('addtext2').style .display = "block"; } } } var bigMap = false; var leaderBlock = document.getElementById("leaderboard"); var scoreDisplay = document.getElementById("scoreDisplay"); var mapDisplay = document.getElementById("mapDisplay"); var chatBox = document.getElementById("chatbox"); var allianceInput = document.getElementById("allianceInput"); document.addEventListener('keydown', (e) => { if (e.keyCode === 36 && shhk()) { switch (e.keyCode) { case 36: if (bigMap == false) { bigMap = true; $("#mapDisplay").css({ "background-size": "425px", "position": "absolute", "margin-top": "150px", "right": "20px", "background-color": "rgba(0, 0, 0, 0.25)", "height": "425px", "width": "425px", "border-radius": "5px", }); if (scoreDisplay) { scoreDisplay.style.display = "none"; } } else { bigMap = false; $("#mapDisplay").css({ "background-size": "130px", "position": "absolute", "bottom": "20px", "left": "20px", "margin-top": "638px", "background-color": "rgba(0, 0, 0, 0.1)", "height": "130px", "width": "130px", "box-shadow": "none", "border": "none" }); if (scoreDisplay) { scoreDisplay.style.display = "block"; } } break; } } }); var AutoSpawn = document.querySelector("#autospawn") AutoSpawn.addEventListener('change', function() { if (this.checked) { document.getElementById('addtext4').style.display = "block"; autospawn = true; } else { document.getElementById('addtext4').style.display = "none"; autospawn = false; } }) var cpsss = document.querySelector("#CPSTOGGLER") cpsss.addEventListener('change', function() { if (this.checked) { $("#cpss").css("display", "block"); } else { $("#cpss").css("display", "none"); } }); var AHKK = document.querySelector("#AHK") AHKK.addEventListener('change', function() { if (this.checked) { document.getElementById('addtext3').style.display = "block"; AHK = true; } else { document.getElementById('addtext3').style.display = "none"; AHK = false; } }); var cl = document.querySelector("#Clicks") cl.addEventListener('change', function() { if (this.checked) { document.getElementById('addtext').style.display = "block"; Clicks = true; } else { document.getElementById('addtext').style.display = "none"; Clicks = false; } }); var NewMapp = document.querySelector("#NewMap") NewMapp.addEventListener('change', function() { if (this.checked) { $("#mapDisplay").css("background", "url('https://wormax.org/chrome3kafa/moomooio-background.png')"); } else { $("#mapDisplay").css("background", "rgba(0, 0, 0, 0.25)"); } }) $("killCounter").css({"top": "230px"}); var cps = 0; var click = 1; $("#gameCanvas").mousedown(function(e){ if(e.which == 1 && click == 1){ cps = (cps + 1) setTimeout( () => { cps = (cps - 1) }, 950); } }); $("#gameCanvas").mousedown(function(e){ if(e.which == 3 && click == 1){ cps = (cps + 1) setTimeout( () => { cps = (cps - 1) }, 950); } }); document.addEventListener("mousedown", buttonPress, false); function buttonPress(e) { if(e.button == 1 && click == 1){ cps = (cps + 1) setTimeout( () => { cps = (cps - 1) }, 950); } } var cpsM = document.createElement("div"); cpsM.style.padding = "5px"; cpsM.id = "cpss"; cpsM.style.font = "30px Arial"; cpsM.style.display = "none"; cpsM.style.position = "fixed"; cpsM.style.top = "40%"; cpsM.style.left = "0%"; cpsM.style.color = "#fff"; document.body.appendChild(cpsM); function updateCPS() { cpsM.textContent = "Cps: " + cps; requestAnimationFrame(updateCPS); } updateCPS();
views: 892
2023-11-06 10:04:03
Create free pastes just like this one and get paid. Create paste
×