// ==UserScript== // @name ANTON App ZAYNE SCRIPT // @namespace http://tampermonkey.net/ // @version 0.2.4.3 // @description A collection of modules/hacks for the Anton App put into one script. // @author @ccm1rza // @match https://www.tampermonkey.net/index.php?ext=dhdg&updated=true&version=5.1.1 // @icon https://salrn.github.io/publicfiles/rs.png // @grant none // @match https://anton.app/* // @match https://www.anton.app/* // @exclude ://sjs7.xyz/scripttest/tapermonkey/arav // @exclude https://salrn.github.io/* // @license MIT // @downloadURL https://update.greasyfork.icu/scripts/531835/ANTON%20App%20ZAYNE%20SCRIPT.user.js // @updateURL https://update.greasyfork.icu/scripts/531835/ANTON%20App%20ZAYNE%20SCRIPT.meta.js // ==/UserScript== // Only me and god were able to understand this code. Now that you poses it, I wish you good luck. // inshallah the comments ive added are enough. please follow the licenses rules, else ill have to strike your project down. just credit me. thats enough. (function() { const styles = ` .zui { position: fixed; right: 10px; top: 10px; z-index: 999999; display: flex; flex-direction: column; font-family: monospace; font-size: 14px; color: #fff; width: 250px; user-select: none; border: 2px solid #000; cursor: move; background: #000; overflow: hidden; padding: 5px; border-radius: 8px; opacity: 0; transition: opacity 0.3s ease; } .zui-item { padding: 5px 8px; display: flex; justify-content: space-between; align-items: center; background: #000; cursor: pointer; } .zui-item:hover { background: #111; } .zui-header { background: #000; font-weight: bold; display: flex; align-items: center; gap: 8px; } .zui-header span { font-size: 16px; } .zui-header:hover { background: #111; } .zui-content { height: 0; overflow-y: auto; max-height: 300px; scrollbar-width: thin; scrollbar-color: #444 #222; } .zui-content::-webkit-scrollbar { width: 8px; } .zui-content::-webkit-scrollbar-track { background: #222; } .zui-content::-webkit-scrollbar-thumb { background-color: #444; border-radius: 6px; } .zui-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.7); display: flex; justify-content: center; align-items: center; z-index: 1000000; } .zui-modal-content { background-color: #111; border: 2px solid #333; border-radius: 8px; padding: 20px; width: 300px; color: #fff; font-family: monospace; } .zui-modal-title { color: #ff5555; font-size: 18px; margin-bottom: 15px; text-align: center; } .zui-modal-message { margin-bottom: 20px; line-height: 1.4; } .zui-modal-buttons { display: flex; justify-content: space-between; } .zui-modal-button { padding: 8px 15px; border: none; border-radius: 4px; cursor: pointer; font-family: monospace; font-weight: bold; } .zui-modal-button-continue { background-color: #ff5555; color: white; } .zui-modal-button-cancel { background-color: #333; color: white; } `; console.log("Zayne: Start Shift Load") const styleEl = document.createElement('style'); styleEl.textContent = styles; document.head.appendChild(styleEl); let gui = null; let guiCheckInterval = null; let guiCreationAttempts = 0; const MAX_CREATION_ATTEMPTS = 10; const guiId = "zayne-gui-" + Math.random().toString(36).substring(2, 10); function showConfirmationModal(message, onContinue, onCancel) { const modalEl = document.createElement('div'); modalEl.className = 'zui-modal'; modalEl.innerHTML = `
WARNING
${message}
`; const continueButton = modalEl.querySelector('.zui-modal-button-continue'); const cancelButton = modalEl.querySelector('.zui-modal-button-cancel'); continueButton.addEventListener('click', () => { document.body.removeChild(modalEl); if (onContinue) onContinue(); }); cancelButton.addEventListener('click', () => { document.body.removeChild(modalEl); if (onCancel) onCancel(); }); document.body.appendChild(modalEl); } function createAndAttachGUI() { if (document.getElementById(guiId)) { return document.getElementById(guiId); } const guiEl = document.createElement('div'); guiEl.className = 'zui'; guiEl.id = guiId; guiEl.innerHTML = `
[/] zayne 0.2.4.3 by ccmirza [close]
Add Coins
Complete Level
Hide Name
`; const headerEl = guiEl.querySelector('.zui-header'); const contentEl = guiEl.querySelector('.zui-content'); const headerStatusEl = guiEl.querySelector('.zui-item-value'); const addCoinsButton = guiEl.querySelector('#addCoinsButton'); const coinInput = guiEl.querySelector('#coinInput'); const completeLevelButton = guiEl.querySelector('#completeLevel'); let isOpen = false; headerEl.onclick = function() { isOpen = !isOpen; animateHeight(contentEl, isOpen ? 300 : 0, 300); headerStatusEl.innerText = isOpen ? '[close]' : '[open]'; }; addCoinsButton.onclick = function() { const coins = parseInt(coinInput.value); if (isNaN(coins)) { alert("Zayne: Please enter a valid number of coins."); return; } showConfirmationModal( `You are about to add ${coins} coins to your account. This action could result in your account being banned, which I - or anyone else - is not responsible for. Do you wish to continue?`, function() { addCoins(coins); }, function() { console.log("Zayne: Add coins operation cancelled"); } ); }; completeLevelButton.onclick = function() { alert('Fail'); }; const hideNameButton = guiEl.querySelector('#button1'); hideNameButton.onclick = function() { // Store current state to update button text let isCurrentlyVisible = true; // Hide names in the main interface const nameElements = document.querySelectorAll('div[style*="display: flex"][style*="max-width: 12em"]'); nameElements.forEach(el => { const nameDiv = el.querySelector('div[style*="overflow: hidden"]'); if (nameDiv) { // Update visibility state isCurrentlyVisible = nameDiv.style.display !== 'none'; nameDiv.style.display = isCurrentlyVisible ? 'none' : ''; } }); // Also hide names in the popup menu const popupNameElements = document.querySelectorAll('div[style*="overflow: hidden"][style*="text-overflow: ellipsis"][style*="white-space: nowrap"][style*="max-width: 9em"]'); popupNameElements.forEach(el => { el.style.display = isCurrentlyVisible ? 'none' : ''; }); // Update button text based on the new state hideNameButton.querySelector('span').textContent = isCurrentlyVisible ? 'Show Name' : 'Hide Name'; }; makeDraggable(guiEl, headerEl); document.body.appendChild(guiEl); fadeIn(guiEl, 300); return guiEl; } function setupKeyboardShortcuts() { window.addEventListener('keyup', function(event) { if (document.activeElement && document.activeElement.tagName === 'INPUT') return; if (event.code === 'Slash') { ensureGUIExists(); if (gui) { gui.style.display = gui.style.display === 'none' ? '' : 'none'; } } }); } function ensureGUIExists() { let existingGui = document.getElementById(guiId); if (!existingGui && guiCreationAttempts < MAX_CREATION_ATTEMPTS) { guiCreationAttempts++; gui = createAndAttachGUI(); return true; } else if (existingGui) { gui = existingGui; return true; } return false; } function startPersistentGUIMonitoring() { setTimeout(() => { ensureGUIExists(); guiCheckInterval = setInterval(() => { let guiInDom = document.getElementById(guiId); if (!guiInDom && guiCreationAttempts < MAX_CREATION_ATTEMPTS) { gui = createAndAttachGUI(); } else if (guiInDom) { guiCreationAttempts = 0; } }, 2000); }, 10000); } function easeOutQuad(t) { return t * (2 - t); } function animateHeight(element, targetHeight, duration) { let startHeight = element.clientHeight; let startTime = performance.now(); function step(currentTime) { let elapsedTime = currentTime - startTime; let progress = Math.min(elapsedTime / duration, 1); let easedProgress = easeOutQuad(progress); element.style.height = (startHeight + (targetHeight - startHeight) * easedProgress) + "px"; if (progress < 1) { requestAnimationFrame(step); } } requestAnimationFrame(step); } function fadeIn(element, duration) { element.style.opacity = '0'; let startTime = performance.now(); function step(currentTime) { let elapsedTime = currentTime - startTime; let progress = Math.min(elapsedTime / duration, 1); let easedProgress = easeOutQuad(progress); element.style.opacity = easedProgress; if (progress < 1) { requestAnimationFrame(step); } } requestAnimationFrame(step); } function makeDraggable(element, dragHandle) { let isDragging = false; let offsetX = 0; let offsetY = 0; dragHandle.addEventListener('mousedown', (e) => { isDragging = true; offsetX = e.clientX - element.getBoundingClientRect().left; offsetY = e.clientY - element.getBoundingClientRect().top; document.addEventListener('mousemove', move); document.addEventListener('mouseup', stopDrag); }); function move(e) { if (isDragging) { element.style.left = `${e.clientX - offsetX}px`; element.style.top = `${e.clientY - offsetY}px`; } } function stopDrag() { isDragging = false; document.removeEventListener('mousemove', move); document.removeEventListener('mouseup', stopDrag); } } function addCoins(coins) { try { const sourceId = localStorage.getItem('sourceId')?.split('"').join(''); const deviceLogId = localStorage.getItem('deviceLogId')?.split('"').join(''); const users = JSON.parse(localStorage.getItem('users') || '[]'); if (!sourceId || !deviceLogId || users.length === 0) { alert("Required login data not found. Please make sure you're logged in."); return; } users.forEach(users__value => { fetch('https://logger-lb-5.anton.app/events', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ "events":[{ "event":"adjustCoins", "value":coins, "src":sourceId, "created":(new Date()).toISOString() }], "log":users__value.l, "credentials":{ "authToken":users__value.t, "deviceLogId":deviceLogId } }), }) .then(v=>v) .catch(v=>v) .then(data => { window.location.reload(); }); }); } catch (e) { alert("Zayne: Failed to add coins. Error: " + e.message, "please report this to the developer."); } } setupKeyboardShortcuts(); startPersistentGUIMonitoring(); const observer = new MutationObserver((mutations) => { if (!document.getElementById(guiId) && guiCreationAttempts < MAX_CREATION_ATTEMPTS) { guiCreationAttempts++; gui = createAndAttachGUI(); } }); setTimeout(() => { observer.observe(document.body, { childList: true, subtree: true }); }, 15000); })();