// ==UserScript== // @name Infinite powers + Multidrop*PUBLIC RELEASE* // @namespace http://tampermonkey.net/ // @version 2.1 // @description easy :D // @author Vaqu // @match https://agma.io/ // @icon https://www.google.com/s2/favicons?sz=64&domain=agma.io // @grant none // @downloadURL none // ==/UserScript== (function() { 'use strict'; //virus not made yet cuz im lazy /* YOU SET THE KEYS U WANT IN SETTINGS */ //important variables let socket = new WebSocket("wss://agma.io") var $ = window.$ var pwAmnt = $("invRecombine").value var pwAmnt2 = $("invSpeed").value var pwAmnt3 = $("invVirus").value var user = document.getElementByClassName("username") var keyLol1 = "E"; var keyLol2 = "S"; var keyLol3 = "X"; var keyLol4 = "1"; var keyLol5 = "Q"; var keyLol6 = "2"; var keyLol7 = "3"; var scriptSuccess = true; window.addEventListener('keydown', keydown); setTimeout(function() { keyLol1 = keyLol1.charCodeAt(0) keyLol2 = keyLol2.charCodeAt(0) keyLol3 = keyLol3.charCodeAt(0) keyLol4 = keyLol4.charCodeAt(0) keyLol5 = keyLol5.charCodeAt(0) keyLol6 = keyLol6.charCodeAt(0) keyLol7 = keyLol7.charCodeAt(0) }, 5000) window.alert("Script is already started, no buttons") //this code has been patched, make new version /*if(event.keyCode == keyLol1){ socket.send("#invRecombine", () => { class AddRecs { constructor(){ pwAmnt++ } } this.recombine = new AddRecs() this.recombine.init() user.pwAmnt = user.pwAmnt + 1 }) }*/ if(e.which == keyLol1){ socket.send("#invRecombine", () => { class NewRec { constructor(){ pwAmnt.getUint64(32, dataPosOnScreen(this, false)) pwAmnt++ } recval(val){ return new Array(32) $("#invRecombine").removeAttr("undef") } recall(byte){ //recall incase agma doesnt join 2 arrays byte.DataArray(() =>{ return async function(){ await DelayNode(59) DataTransfer.redefine() } }) agma.innerJs.getUint8(1, 130).removeAttr("block") } } if( style.display.document.chatBox == "block") return NewRec.recall("recombine") setUint8(fetch(document.agma(js, true))) NewRec.recval() }) } /* ========================================================================================= if(event.keyCode == keyLol2){ socket.send("#invSpeed", () => { class AddSpeed { constructor(){ pwAmnt2++ } } this.speed = new AddSpeed() this.speed.init() user.pwAmnt2 = user.pwAmnt2 + 1 }) } ============================================================================================ */ if(e.which == keyLol1){ socket.send("#invSpeed", () => { class NewSpeed { constructor(){ pwAmnt.getUint64(32, dataPosOnScreen(this, false)) pwAmnt++ } speedval(val){ return new Array(16) $("#invSpeed").removeAttr("undef") } recall(byte){ //recall incase agma doesnt join 2 arrays byte.DataArray(() =>{ return async function(){ await DelayNode(59) DataTransfer.redefine() } }) agma.innerJs.getUint8(1, 140).removeAttr("block") } } if( style.display.document.chatBox == "block") return NewSpeed.recall("speed") setUint8(fetch(document.agma(js, true))) NewRec.speedval() }) } // VIRUS COMING SOON! if(event.keyCode == keyLol3){ socket.send("#invVirus", () => { class AddVirus { constructor(){ pwAmnt3++ } } if(e.which != 1){return false;} this.virus = new AddVirus() this.virus.init(() => {if(user.usedVirus) new AddVirus()}) user.pwAmnt3 = user.pwAmnt3 + 1 }) } parseFloat(pwAmnt.val()) parseFloat(pwAmnt2.val()) //multidrop const multiple = (num, type) => { for (let i = 0; i < num; i++) { sendPw(type); } }; window.addEventListener("keydown", function(e) { if (ischecked === true && !$('input, textarea').is(':focus')) { if (e.repeat) { e.preventDefault(); // Prevents the default repeating behavior of the key return; // Exit the function if the key is being held down } if (e.keyCode === keyCodes.multiple) { multiple(amountpellet, 3); } else if (e.keyCode === keyCodes.mothercellantirecfreeze) { sendPw(12); sendPw(5); } else if (e.keyCode === keyCodes.virusantifreeze) { sendPw(12); sendPw(4); } else if (e.keyCode === keyCodes.rec) { sendPw(1); } else if (e.keyCode === keyCodes.speed) { sendPw(2); } else if (e.keyCode === keyCodes.virus) { sendPw(4); } else if (e.keyCode === keyCodes.mothercell) { sendPw(5); } else if (e.keyCode === keyCodes.portal) { sendPw(6); } else if (e.keyCode === keyCodes.block) { sendPw(9); } else if (e.keyCode === keyCodes.freeze) { sendPw(8); } else if (e.keyCode === keyCodes.antiFreeze) { sendPw(11); } else if (e.keyCode === keyCodes.antiRec) { sendPw(12); } else if (e.keyCode === keyCodes.shield) { sendPw(14); } } }); var amountpellet; var ischecked = false; var checkbox = document.createElement('input'); checkbox.type = 'checkbox'; checkbox.id = 'myCheckbox'; checkbox.name = 'myCheckbox'; var label = document.createElement('label'); label.textContent = 'Multi'; label.setAttribute('for', 'myCheckbox'); var settingTab3 = document.getElementById('userSettings'); settingTab3.appendChild(checkbox); settingTab3.appendChild(label); checkbox.addEventListener('change', function() { if (checkbox.checked) { console.log('Checkbox is checked. Set to true.'); ischecked = true; curserMsg(`Multi: Active`, 'green') } else { console.log('Checkbox is not checked. Set to false.'); ischecked = false; curserMsg(`Multi: Disactivated`, 'red') } }); const pelletSlider = document.createElement("input"); pelletSlider.type = "range"; pelletSlider.min = "1"; pelletSlider.max = "30"; pelletSlider.value = "15"; const pelletLabel = document.createElement("label"); pelletLabel.textContent = "Multi-Pellet Amount:"; pelletSlider.addEventListener("input", function() { pelletLabel.textContent = `Multi-Pellet Amount: ${pelletSlider.value}`; }); pelletSlider.dispatchEvent(new Event("input")); settingTab3.appendChild(pelletSlider); settingTab3.appendChild(pelletLabel); var box = document.createElement("div"); box.style.width = "355px"; box.style.height = "250px"; box.style.backgroundColor = "rgba(0, 0, 0, 0.5)"; box.style.border = "2px solid black"; box.style.position = "absolute"; box.style.top = "50%"; box.style.left = "50%"; box.style.transform = "translate(-50%, 80%)"; var centerPanel = document.querySelector(".user-settings"); centerPanel.appendChild(box); var label1 = document.createElement("span"); label1.innerText = "Multidrop by Mhero ;D"; label1.style.position = "absolute"; label1.style.top = "0"; label1.style.left = "50%"; label1.style.transform = "translateX(-50%)"; label1.style.fontSize = "18px"; //label1.style.color = ""; box.appendChild(label1); const powers = [ { name: "rec", label: "Recombine", key: "" }, { name: "speed", label: "Speed", key: "" }, { name: "growth", label: "Growth", key: "" }, { name: "virus", label: "Virus", key: "" }, { name: "mothercell", label: "Mothercell", key: "" }, { name: "portal", label: "Portal", key: "" }, { name: "block", label: "Block", key: "" }, { name: "freeze", label: "Freeze", key: "" }, { name: "antiFreeze", label: "Anti Freeze", key: "" }, { name: "antiRec", label: "Anti Recombine", key: "" }, { name: "shield", label: "Shield", key: "" }, { name: "multiple", label: "Mulit-pellet", key: "" }, { name: "virusantifreeze", label: "Mul-virus", key: "" }, { name: "mothercellantirecfreeze", label: "Mul-mothercelll", key: "" } ]; const combo = [ ]; let activeHotkey = null; const numRows = 2; // Number of rows to display const powersPerRow = Math.ceil(powers.length / numRows); // Number of powers per row const rowHeight = 10; // Adjust the height of each row const powerSpacing = 25; // Adjust the vertical spacing between hotkeys in a row const multikeyData = JSON.parse(localStorage.getItem("Multikey")) || {}; powers.forEach((power) => { const rowIndex = Math.floor(powers.indexOf(power) / powersPerRow); // Determine the row index const powerLabel = document.createElement("label"); powerLabel.innerText = power.label; powerLabel.style.position = "absolute"; powerLabel.style.left = `${rowIndex === 0 ? "0" : "60%"}`; // Adjust the left position based on the row index powerLabel.style.top = `${rowIndex * rowHeight + powerSpacing * (powers.indexOf(power) % powersPerRow) + 30}px`; // Calculate the top position with spacing powerLabel.style.transform = `translateY(-50%) translateX(${rowIndex === 0 ? "0%" : "0"})`; // Adjust the transform based on the row index powerLabel.style.fontSize = "16px"; box.appendChild(powerLabel); const powerHotkey = document.createElement("div"); powerHotkey.className = "hotkey"; powerHotkey.style.width = "40px"; powerHotkey.style.height = "25px"; powerHotkey.style.border = "1px solid black"; powerHotkey.style.borderRadius = "20px"; powerHotkey.style.position = "absolute"; powerHotkey.style.top = `${rowIndex * rowHeight + powerSpacing * (powers.indexOf(power) % powersPerRow) + 30}px`; // Calculate the top position with spacing powerHotkey.style.left = `${rowIndex === 0 ? "80px" : "315px"}`; // Adjust the left position based on the row index powerHotkey.style.transform = "translateY(-50%)"; powerHotkey.style.backgroundColor = "yellow"; powerHotkey.style.textAlign = "center"; powerHotkey.style.fontSize = "20px"; powerHotkey.style.cursor = "pointer"; power.key = multikeyData[power.name]?.key || ""; // Set the hotkey value from stored data powerHotkey.innerText = power.key.toUpperCase(); powerHotkey.style.color = "black"; box.appendChild(powerHotkey); let click = false; powerHotkey.addEventListener("click", function() { if (click) { powerHotkey.style.backgroundColor = "yellow"; powerHotkey.innerText = power.key.toUpperCase(); const amount = parseInt(pelletSlider.value, 10); pelletLabel.textContent = `Mul-Pellet Amount: ${amount}`; click = false; } else { powerHotkey.style.backgroundColor = "#ffff99"; click = true; } }); document.addEventListener("keydown", function(event) { if (click) { const keyCode = event.keyCode; let key = ""; const specialCharacters = { 186: ";", 187: "=", 188: ",", 189: "-", 190: ".", 191: "/", 192: "`", 219: "[", 220: "\\", 221: "]", 222: "'" }; const numpadNumbers = { 96: "0", 97: "1", 98: "2", 99: "3", 100: "4", 101: "5", 102: "6", 103: "7", 104: "8", 105: "9", 111: "/", 106:"*", 109: "-", 107: "+", 110: "." }; const specialKeys = { 8: "Backspace", 9: "Tab", 13: "Enter", 16: "Shift", 17: "Ctrl", 18: "Alt", 19: "Pause", 20: "CapsLock", 27: "Escape", 32: "Space", 33: "Page Up", 34: "Page Down", 35: "End", 36: "Home", 37: "Arrow Left", 38: "Arrow Up", 39: "Arrow Right", 40: "Arrow Down", 45: "Insert", 46: "Delete", 91: "Windows", 92: "Windows", 93: "Context Menu", 112: "F1", 113: "F2", 114: "F3", 115: "F4", 116: "F5", 117: "F6", 118: "F7", 119: "F8", 120: "F9", 121: "F10", 122: "F11", 123: "F12", 173: "f1", 174:"123", 175:"lol", 177:"fuck", 179:":V", 176: "nothing", 144: "NumLock", 145: "ScrollLock", 12: "5" }; if ((keyCode >= 65 && keyCode <= 90) || (keyCode >= 48 && keyCode <= 57)) { key = String.fromCharCode(keyCode).toLowerCase(); } else if (specialCharacters.hasOwnProperty(keyCode)) { key = specialCharacters[keyCode]; } else if (numpadNumbers.hasOwnProperty(keyCode)) { key = numpadNumbers[keyCode]; } else if (specialKeys.hasOwnProperty(keyCode)) { curserMsg("Invalid key", "red"); click = false; powerHotkey.style.backgroundColor = "yellow"; return; } powerHotkey.innerText = key.toUpperCase(); powerHotkey.style.color = "black"; power.key = key; // Update the multikeyData object with the power's key and keyCode multikeyData[power.name] = { ...multikeyData[power.name], // Preserve existing data key: key, keyCode: keyCode }; // Update and store the multikeyData object in localStorage localStorage.setItem("Multikey", JSON.stringify(multikeyData)); curserMsg(`Hotkey set for ${power.name}`, "green"); click = false; powerHotkey.style.backgroundColor = "yellow"; } }); powerHotkey.addEventListener("contextmenu", function(event) { event.preventDefault(); // Prevent the default right-click context menu removeHotkey(); }); function removeHotkey() { powerHotkey.innerText = ""; // Clear the hotkey display powerHotkey.style.backgroundColor = "yellow"; power.key = ""; // Clear the hotkey data // Remove the hotkey from the multikeyData object delete multikeyData[power.name]; localStorage.setItem("Multikey", JSON.stringify(multikeyData)); curserMsg(`Hotkey removed for ${power.name}`, "green"); } }); let curserTimeout; function curserMsg(msg, color, time) { if (color == "green") color = "rgb(0, 192, 0)"; if (color == "red") color = "rgb(255, 0, 0)"; if (color == "gray") color = "rgb(153, 153, 153)"; clearTimeout(curserTimeout); $('#curser').text(msg).show().css('color', color); if (time !== 0) curserTimeout = setTimeout(() => $('#curser').fadeOut(400), time ?? 4e3); } pelletSlider.addEventListener("input", function() { multikeyData["multiple"] = { ...multikeyData["multiple"], amount: pelletSlider.value.toString() }; pelletSlider.addEventListener("input", function() { const amount = parseInt(pelletSlider.value, 10); pelletLabel.textContent = `Mul-Pellet Amount: ${amount}`; }); localStorage.setItem("Multikey", JSON.stringify(multikeyData)); pelletLabel.textContent = `Mul-Pellet Amount: ${pelletSlider.value}`; }); const savedMultikeyData = JSON.parse(localStorage.getItem("Multikey")) || {}; const defaultPelletValue = parseInt(savedMultikeyData["multiple"]?.amount, 10) || 15; pelletSlider.value = defaultPelletValue; pelletLabel.textContent = `Mul-Pellet Amount: ${defaultPelletValue}`; if (!savedMultikeyData["multiple"]) { savedMultikeyData["multiple"] = { amount: defaultPelletValue }; localStorage.setItem("Multikey", JSON.stringify(savedMultikeyData)); } // Function to update the Mul-Pellet Amount value in local storage const updatePelletAmount = () => { const amount = parseInt(pelletSlider.value, 10); localStorage.setItem("Multikey", JSON.stringify({ ...multikeyData, pelletAmount: amount })); amountpellet = amount; console.log(amountpellet) }; // Update the pellet amount initially updatePelletAmount(); // Update the pellet amount in local storage every 2 seconds setInterval(updatePelletAmount, 1000); const getKeyCodes = () => { const controls = JSON.parse(localStorage.getItem('Multikey')) || {}; return { rec: controls.rec?.keyCode || '', speed: controls.speed?.keyCode || '', growth: controls.growth?.keyCode || '', virus: controls.virus?.keyCode || '', mothercell: controls.mothercell?.keyCode || '', portal: controls.portal?.keyCode || '', block: controls.block?.keyCode || '', freeze: controls.freeze?.keyCode || '', antiFreeze: controls.antiFreeze?.keyCode || '', antiRec: controls.antiRec?.keyCode || '', shield: controls.shield?.keyCode || '', multiple: controls.multiple?.keyCode || '', virusantifreeze: controls.virusantifreeze?.keyCode || '', mothercellantirecfreeze: controls.mothercellantirecfreeze?.keyCode || '', }; }; const keyCodes = getKeyCodes(); setInterval(() => { const updatedKeyCodes = getKeyCodes(); Object.assign(keyCodes, updatedKeyCodes); }, 2000); const keys = {}; powers.forEach((power) => { const storedData = multikeyData[power.name] || {}; power.key = storedData.key || ""; powerHotkey.innerText = storedData.key ? storedData.key.toUpperCase() : ""; keys[power.name] = storedData.keyCode || ""; }); const powerupMap = { [keys.rec]: 1, [keys.speed]: 2, [keys.growth]: 3, [keys.virus]: 4, [keys.mothercell]: 5, [keys.portal]: 6, [keys.block]: 9, [keys.freeze]: 8, [keys.antiFreeze]: 11, [keys.antiRec]: 12, [keys.shield]: 14 } const macro = (num, types) => { for (let i = 0; i < num; i++) { for (let j = 0; j < types.length; j++) { sendPw(types[j]); } } }; const anti = (type) => { sendPw(type); }; //ANTI PATCH let scriptPatched = false if(agma.innerJS == false){scriptPatched = true} })();