// ==UserScript== // @name DUO_FARMEDGEMS // @namespace http://tampermonkey.net/ // @version v1.0BETA // @description THIS TOOL AUTO FARMED GEMS FOR YOU // @author ´꒳`ⓎⒶⓂⒾⓈⒸⓇⒾⓅⓉ×͜× // @match https://www.duolingo.com/learn // @icon https://www.google.com/s2/favicons?sz=64&domain=duolingo.com // @grant none // @downloadURL https://update.greasyfork.icu/scripts/538267/DUO_FARMEDGEMS.user.js // @updateURL https://update.greasyfork.icu/scripts/538267/DUO_FARMEDGEMS.meta.js // ==/UserScript== (function () { 'use strict'; const colors = { primary: '#58CC02', secondary: '#1DA462', danger: '#FF4757', background: '#003049', text: '#FFFFFF' }; function createElement(tag, options = {}) { const el = document.createElement(tag); if (options.styles) Object.assign(el.style, options.styles); if (options.content) el.innerHTML = options.content; if (options.events) { for (const [event, handler] of Object.entries(options.events)) { el.addEventListener(event, handler); } } return el; } function createBtn(label, bg, shadow, onClick) { return createElement('button', { styles: { flex: '1 1 120px', padding: '12px 0', fontSize: '16px', fontWeight: '600', background: bg, color: colors.text, border: 'none', borderRadius: '15px', cursor: 'pointer', transition: 'transform 0.3s ease', boxShadow: `0 8px 25px ${shadow}66`, minWidth: '120px' }, content: label, events: { click: onClick, mouseenter: e => e.currentTarget.style.transform = 'translateY(-2px)', mouseleave: e => e.currentTarget.style.transform = 'translateY(0)' } }); } function createSmallBtn(label, bg, shadow, onClick) { return createElement('button', { styles: { padding: '8px 16px', fontSize: '13px', fontWeight: '500', background: bg, color: colors.text, border: 'none', borderRadius: '10px', cursor: 'pointer', transition: 'transform 0.2s ease', boxShadow: `0 5px 15px ${shadow}44`, margin: '5px' }, content: label, events: { click: onClick, mouseenter: e => e.currentTarget.style.transform = 'translateY(-1px)', mouseleave: e => e.currentTarget.style.transform = 'translateY(0)' } }); } const gemBtn = createElement('button', { styles: { position: 'fixed', bottom: '25px', right: '10px', width: '60px', height: '60px', borderRadius: '50%', background: `linear-gradient(135deg, ${colors.primary}, ${colors.secondary})`, color: colors.text, fontSize: '32px', cursor: 'pointer', zIndex: 10000, boxShadow: '0 8px 20px rgba(88, 204, 2, 0.3)', transition: 'transform 0.3s ease', border: 'none', display: 'flex', alignItems: 'center', justifyContent: 'center' }, content: '💎', events: { click: togglePanel } }); const panel = createElement('div', { styles: { position: 'fixed', top: '50%', left: '50%', width: '460px', background: colors.background, borderRadius: '25px', zIndex: 10000, padding: '30px', fontFamily: "'Segoe UI', system-ui", color: colors.text, opacity: '0', transform: 'translate(-50%, -50%) scale(0.9)', pointerEvents: 'none', transition: 'opacity 0.4s ease, transform 0.4s ease', overflow: 'hidden', minHeight: '320px', display: 'flex', flexDirection: 'column' } }); panel.id = 'duoPanel'; const style = document.createElement('style'); style.textContent = ` @keyframes borderAnim { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } } #duoPanel { border: 2px solid transparent; background-origin: border-box; background-clip: padding-box, border-box; background-image: linear-gradient(${colors.background}, ${colors.background}), linear-gradient(270deg, #58CC02, #1DA462, #FF4757, #58CC02); background-size: 400% 400%; background-repeat: no-repeat; animation: borderAnim 10s linear infinite; } #duoPanel.active { opacity: 1 !important; transform: translate(-50%, -50%) scale(1) !important; pointer-events: auto !important; } `; document.head.appendChild(style); function togglePanel() { panel.classList.toggle('active'); gemBtn.style.transform = panel.classList.contains('active') ? 'rotate(360deg)' : 'rotate(0deg)'; } const header = createElement('div', { styles: { textAlign: 'center', marginBottom: '10px' }, content: `
MADE BY YAMISCRIPT_DEV
LOADING...
` }); const usernameGreeting = createElement('div', { styles: { display: 'flex', alignItems: 'center', justifyContent: 'center', gap: '12px', marginBottom: '20px', fontSize: '18px', color: colors.text }, }); async function fetchUsername() { const userId = getCookie('logged_out_uuid'); const jwt = getCookie('jwt_token'); if (!userId || !jwt) return; try { const res = await fetch(`https://www.duolingo.com/2017-06-30/users/${userId}?fields=username`, { headers: { authorization: `Bearer ${jwt}` } }); const data = await res.json(); if (data.username) { document.getElementById('_loginStatus').innerHTML = ``; usernameGreeting.innerHTML = `👋Welcome, ${data.username}!`; } } catch (e) { document.getElementById('_loginStatus').innerText = 'BRUH!'; } } const gemCountDiv = createElement('div', { styles: { textAlign: 'center', margin: '20px 0' }, content: `