// ==UserScript== // @name Enhanced Cookie Clicker Menu // @namespace https://www.cookieclicker.com/ // @version 3.0 // @description Ultimate Cookie Clicker mod with themes, automation, hotkeys, scheduler, and 50+ features! đĒđŦ // @author timosaiya // @match *://orteil.dashnet.org/cookieclicker/* // @grant none // @license MIT // @downloadURL https://update.greasyfork.icu/scripts/539856/Enhanced%20Cookie%20Clicker%20Menu.user.js // @updateURL https://update.greasyfork.icu/scripts/539856/Enhanced%20Cookie%20Clicker%20Menu.meta.js // ==/UserScript== (function() { 'use strict'; // Global variables let autoClickerInterval = null; let autoClickerSpeed = 100; let isMinimized = false; let currentTab = 'basic'; let currentTheme = 'dark'; let autoSaveInterval = null; let goldenCookieClicker = null; let autoUpgradeInterval = null; let autoBuildingInterval = null; let settings = { theme: 'dark', autoSave: true, autoSaveInterval: 60000, hotkeysEnabled: true, soundEnabled: true, animationsEnabled: true, autoGoldenCookies: false, autoUpgrades: false, autoBuildings: false, transparency: 0.95 }; // Themes const themes = { dark: { primary: '#2c3e50', secondary: '#34495e', accent: '#3498db', success: '#27ae60', warning: '#f39c12', danger: '#e74c3c', text: '#ffffff', textSecondary: '#bdc3c7' }, light: { primary: '#ecf0f1', secondary: '#bdc3c7', accent: '#3498db', success: '#27ae60', warning: '#f39c12', danger: '#e74c3c', text: '#2c3e50', textSecondary: '#7f8c8d' }, neon: { primary: '#0a0a0a', secondary: '#1a1a1a', accent: '#00ff88', success: '#00ff00', warning: '#ffff00', danger: '#ff0080', text: '#ffffff', textSecondary: '#88ff88' }, cookie: { primary: '#8B4513', secondary: '#A0522D', accent: '#DAA520', success: '#228B22', warning: '#FF8C00', danger: '#DC143C', text: '#FFFACD', textSecondary: '#F5DEB3' } }; // Wait for game to load function waitForGame() { if (typeof Game === 'undefined' || !Game.ready) { setTimeout(waitForGame, 100); return; } loadSettings(); initializeGUI(); setupHotkeys(); startAutoFeatures(); } function loadSettings() { const saved = localStorage.getItem('cookieClickerUltimateSettings'); if (saved) { settings = { ...settings, ...JSON.parse(saved) }; } currentTheme = settings.theme; } function saveSettings() { localStorage.setItem('cookieClickerUltimateSettings', JSON.stringify(settings)); } function initializeGUI() { // Create main container const guiContainer = document.createElement('div'); guiContainer.id = 'cookieGUI'; applyTheme(guiContainer); // Create header with enhanced controls const header = createHeader(guiContainer); // Create content area const content = document.createElement('div'); content.id = 'guiContent'; content.style.cssText = ` padding: 20px; max-height: 600px; overflow-y: auto; opacity: ${settings.transparency}; `; // Create enhanced tab navigation const tabNav = createTabNavigation(); // Create tab content container const tabContent = document.createElement('div'); tabContent.id = 'tabContent'; content.appendChild(tabNav); content.appendChild(tabContent); guiContainer.appendChild(header); guiContainer.appendChild(content); document.body.appendChild(guiContainer); // Make draggable makeDraggable(guiContainer, header); // Initialize with basic tab switchTab('basic'); // Add resize handle addResizeHandle(guiContainer); } function createHeader(container) { const header = document.createElement('div'); header.style.cssText = ` background: linear-gradient(90deg, ${themes[currentTheme].accent}, ${themes[currentTheme].primary}); padding: 15px; border-radius: 13px 13px 0 0; cursor: move; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 10px rgba(0,0,0,0.3); `; const titleSection = document.createElement('div'); titleSection.style.cssText = 'display: flex; align-items: center; gap: 10px;'; const title = document.createElement('h3'); title.innerHTML = 'đĒ Cookie Clicker Ultimate'; title.style.cssText = ` margin: 0; font-size: 16px; font-weight: bold; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); color: ${themes[currentTheme].text}; `; const versionBadge = document.createElement('span'); versionBadge.innerHTML = 'v3.0'; versionBadge.style.cssText = ` background: ${themes[currentTheme].success}; color: white; padding: 2px 8px; border-radius: 10px; font-size: 10px; font-weight: bold; `; titleSection.appendChild(title); titleSection.appendChild(versionBadge); const headerButtons = document.createElement('div'); headerButtons.style.cssText = 'display: flex; gap: 5px;'; // Theme selector const themeBtn = createHeaderButton('đ¨', themes[currentTheme].warning, () => cycleTheme()); themeBtn.title = 'Change Theme'; // Settings button const settingsBtn = createHeaderButton('âī¸', themes[currentTheme].accent, () => switchTab('settings')); settingsBtn.title = 'Settings'; // Minimize button const minimizeBtn = createHeaderButton('â', themes[currentTheme].warning, () => toggleMinimize()); minimizeBtn.title = 'Minimize'; // Close button const closeBtn = createHeaderButton('Ã', themes[currentTheme].danger, () => container.remove()); closeBtn.title = 'Close'; headerButtons.appendChild(themeBtn); headerButtons.appendChild(settingsBtn); headerButtons.appendChild(minimizeBtn); headerButtons.appendChild(closeBtn); header.appendChild(titleSection); header.appendChild(headerButtons); return header; } function createHeaderButton(text, color, onClick) { const btn = document.createElement('button'); btn.innerHTML = text; btn.style.cssText = ` width: 28px; height: 28px; padding: 0; background: ${color}; color: white; border: none; border-radius: 50%; cursor: pointer; font-size: 14px; font-weight: bold; transition: all 0.3s ease; box-shadow: 0 2px 5px rgba(0,0,0,0.2); `; btn.onmouseover = () => btn.style.transform = 'scale(1.1)'; btn.onmouseout = () => btn.style.transform = 'scale(1)'; btn.onclick = onClick; return btn; } function createTabNavigation() { const tabNav = document.createElement('div'); tabNav.style.cssText = ` display: flex; margin-bottom: 15px; border-bottom: 2px solid ${themes[currentTheme].secondary}; overflow-x: auto; `; const tabs = [ { id: 'basic', name: 'đĒ Basic', icon: 'đĒ' }, { id: 'auto', name: 'đ¤ Auto', icon: 'đ¤' }, { id: 'buildings', name: 'đ Buildings', icon: 'đ' }, { id: 'cheats', name: 'đŽ Cheats', icon: 'đŽ' }, { id: 'stats', name: 'đ Stats', icon: 'đ' }, { id: 'scheduler', name: 'â° Scheduler', icon: 'â°' }, { id: 'tools', name: 'đ§ Tools', icon: 'đ§' }, { id: 'settings', name: 'âī¸ Settings', icon: 'âī¸' } ]; tabs.forEach(tab => { const tabBtn = document.createElement('button'); tabBtn.innerHTML = tab.icon; tabBtn.title = tab.name; tabBtn.style.cssText = ` flex: 1; min-width: 40px; padding: 12px 8px; background: ${currentTab === tab.id ? themes[currentTheme].accent : 'transparent'}; color: ${themes[currentTheme].text}; border: none; cursor: pointer; transition: all 0.3s ease; border-radius: 8px 8px 0 0; margin: 0 2px; font-size: 16px; `; tabBtn.onmouseover = () => { if (currentTab !== tab.id) { tabBtn.style.background = themes[currentTheme].secondary; } }; tabBtn.onmouseout = () => { if (currentTab !== tab.id) { tabBtn.style.background = 'transparent'; } }; tabBtn.onclick = () => switchTab(tab.id); tabNav.appendChild(tabBtn); }); return tabNav; } function cycleTheme() { const themeNames = Object.keys(themes); const currentIndex = themeNames.indexOf(currentTheme); const nextIndex = (currentIndex + 1) % themeNames.length; currentTheme = themeNames[nextIndex]; settings.theme = currentTheme; saveSettings(); // Reapply theme to entire GUI const gui = document.getElementById('cookieGUI'); applyTheme(gui); // Refresh current tab to apply theme switchTab(currentTab); showNotification(`Theme changed to ${currentTheme}! đ¨`); } function applyTheme(element) { element.style.cssText = ` position: fixed; top: 20px; right: 20px; width: 380px; background: linear-gradient(135deg, ${themes[currentTheme].primary}, ${themes[currentTheme].secondary}); border: 2px solid ${themes[currentTheme].accent}; border-radius: 15px; color: ${themes[currentTheme].text}; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; box-shadow: 0 15px 35px rgba(0,0,0,0.5); z-index: 10000; backdrop-filter: blur(15px); transition: all 0.3s ease; opacity: ${settings.transparency}; `; } function toggleMinimize() { isMinimized = !isMinimized; const content = document.getElementById('guiContent'); const container = document.getElementById('cookieGUI'); if (isMinimized) { content.style.display = 'none'; container.style.width = '250px'; container.style.height = 'auto'; } else { content.style.display = 'block'; container.style.width = '380px'; } showNotification(isMinimized ? 'GUI minimized' : 'GUI restored'); } function addResizeHandle(container) { const resizeHandle = document.createElement('div'); resizeHandle.style.cssText = ` position: absolute; bottom: 0; right: 0; width: 20px; height: 20px; background: ${themes[currentTheme].accent}; cursor: se-resize; border-radius: 0 0 15px 0; opacity: 0.7; `; let isResizing = false; resizeHandle.onmousedown = (e) => { isResizing = true; const startX = e.clientX; const startY = e.clientY; const startWidth = parseInt(window.getComputedStyle(container).width); const startHeight = parseInt(window.getComputedStyle(container).height); const onMouseMove = (e) => { if (!isResizing) return; const newWidth = Math.max(300, startWidth + (e.clientX - startX)); const newHeight = Math.max(200, startHeight + (e.clientY - startY)); container.style.width = newWidth + 'px'; container.style.height = newHeight + 'px'; }; const onMouseUp = () => { isResizing = false; document.removeEventListener('mousemove', onMouseMove); document.removeEventListener('mouseup', onMouseUp); }; document.addEventListener('mousemove', onMouseMove); document.addEventListener('mouseup', onMouseUp); }; container.appendChild(resizeHandle); } // Setup hotkeys functionality function setupHotkeys() { if (!settings.hotkeysEnabled) return; document.addEventListener('keydown', function(e) { // Only trigger if not typing in an input field if (e.target.tagName === 'INPUT' || e.target.tagName === 'TEXTAREA') return; switch(e.key.toLowerCase()) { case 'c': // Toggle auto-clicker if (e.ctrlKey) { e.preventDefault(); if (autoClickerInterval) { stopAutoClicker(); showNotification('đ Auto-clicker stopped'); } else { startAutoClicker(); showNotification('đąī¸ Auto-clicker started'); } } break; case 'g': // Toggle golden cookie automation if (e.ctrlKey) { e.preventDefault(); settings.autoGoldenCookies = !settings.autoGoldenCookies; saveSettings(); showNotification(`đĒ Golden cookie automation ${settings.autoGoldenCookies ? 'enabled' : 'disabled'}`); } break; case 'u': // Toggle auto-upgrades if (e.ctrlKey) { e.preventDefault(); settings.autoUpgrades = !settings.autoUpgrades; saveSettings(); if (settings.autoUpgrades) { startAutoUpgrades(); showNotification('âŦī¸ Auto-upgrades enabled'); } else { stopAutoUpgrades(); showNotification('âŦī¸ Auto-upgrades disabled'); } } break; case 'b': // Toggle auto-buildings if (e.ctrlKey) { e.preventDefault(); settings.autoBuildings = !settings.autoBuildings; saveSettings(); if (settings.autoBuildings) { startAutoBuildings(); showNotification('đĸ Auto-buildings enabled'); } else { stopAutoBuildings(); showNotification('đĸ Auto-buildings disabled'); } } break; case 't': // Cycle theme if (e.ctrlKey) { e.preventDefault(); cycleTheme(); } break; case 'm': // Toggle minimize if (e.ctrlKey) { e.preventDefault(); toggleMinimize(); } break; case 's': // Force save if (e.ctrlKey && e.shiftKey) { e.preventDefault(); Game.WriteSave(); showNotification('đž Game saved!'); } break; } }); } // Start auto features based on settings function startAutoFeatures() { // Start auto-save if enabled if (settings.autoSave) { startAutoSave(); } // Start golden cookie automation if enabled if (settings.autoGoldenCookies) { startGoldenCookieAutomation(); } // Start auto-upgrades if enabled if (settings.autoUpgrades) { startAutoUpgrades(); } // Start auto-buildings if enabled if (settings.autoBuildings) { startAutoBuildings(); } } // Auto-save functionality function startAutoSave() { if (autoSaveInterval) clearInterval(autoSaveInterval); autoSaveInterval = setInterval(() => { Game.WriteSave(); if (settings.soundEnabled) { // Play a subtle save sound (optional) } }, settings.autoSaveInterval); } function stopAutoSave() { if (autoSaveInterval) { clearInterval(autoSaveInterval); autoSaveInterval = null; } } // Golden cookie automation function startGoldenCookieAutomation() { if (goldenCookieClicker) clearInterval(goldenCookieClicker); goldenCookieClicker = setInterval(() => { // Click golden cookies for (let i = 0; i < Game.shimmers.length; i++) { if (Game.shimmers[i].type === 'golden') { Game.shimmers[i].pop(); } } // Click news ticker for fortune cookies if (Game.TickerEffect && Game.TickerEffect.type === 'fortune') { Game.tickerL.click(); } }, 100); } function stopGoldenCookieAutomation() { if (goldenCookieClicker) { clearInterval(goldenCookieClicker); goldenCookieClicker = null; } } // Auto-upgrade functionality function startAutoUpgrades() { if (autoUpgradeInterval) clearInterval(autoUpgradeInterval); autoUpgradeInterval = setInterval(() => { // Buy all affordable upgrades for (let i in Game.UpgradesInStore) { let upgrade = Game.UpgradesInStore[i]; if (upgrade.canBuy()) { upgrade.buy(); } } }, 1000); } function stopAutoUpgrades() { if (autoUpgradeInterval) { clearInterval(autoUpgradeInterval); autoUpgradeInterval = null; } } // Auto-building functionality function startAutoBuildings() { if (autoBuildingInterval) clearInterval(autoBuildingInterval); autoBuildingInterval = setInterval(() => { const bestBuilding = getBestBuilding(); if (bestBuilding && Game.cookies >= bestBuilding.price) { bestBuilding.buy(); } }, 2000); } function stopAutoBuildings() { if (autoBuildingInterval) { clearInterval(autoBuildingInterval); autoBuildingInterval = null; } } function switchTab(tabId) { currentTab = tabId; const tabContent = document.getElementById('tabContent'); const tabNav = tabContent.previousElementSibling; // Update tab buttons with theme Array.from(tabNav.children).forEach((btn, index) => { const tabs = ['basic', 'auto', 'buildings', 'cheats', 'stats', 'scheduler', 'tools', 'settings']; if (tabs[index] === tabId) { btn.style.background = themes[currentTheme].accent; } else { btn.style.background = 'transparent'; } }); // Clear and populate content tabContent.innerHTML = ''; switch(tabId) { case 'basic': createBasicTab(tabContent); break; case 'auto': createAutoTab(tabContent); break; case 'buildings': createBuildingsTab(tabContent); break; case 'cheats': createCheatsTab(tabContent); break; case 'stats': createStatsTab(tabContent); break; case 'scheduler': createSchedulerTab(tabContent); break; case 'tools': createToolsTab(tabContent); break; case 'settings': createSettingsTab(tabContent); break; } } function createBasicTab(container) { container.appendChild(createSection('đĒ Cookie Management', [ createInputGroup('Cookies to add:', 'cookieAmount', 'number', '1000000'), createButton('Add Cookies đĒ', themes[currentTheme].success, () => { const amount = parseInt(document.getElementById('cookieAmount').value) || 0; if (amount > 0) { Game.cookies += amount; showNotification(`Added ${formatNumber(amount)} cookies! đĒ`); } }), createInputGroup('Sugar Lumps to add:', 'lumpAmount', 'number', '100'), createButton('Add Sugar Lumps đŦ', themes[currentTheme].warning, () => { const amount = parseInt(document.getElementById('lumpAmount').value) || 0; if (amount > 0) { Game.lumps += amount; showNotification(`Added ${amount} sugar lumps! đŦ`); } }) ])); container.appendChild(createSection('đ° Quick Actions', [ createButton('Max Cookies đ', themes[currentTheme].success, () => { Game.cookies = Number.MAX_SAFE_INTEGER; showNotification('Cookies set to maximum! đ'); }), createButton('Reset Cookies đ', themes[currentTheme].danger, () => { if (confirm('Are you sure you want to reset all cookies?')) { Game.cookies = 0; showNotification('Cookies reset! đ'); } }) ])); } function createAutoTab(container) { container.appendChild(createSection('đ¤ Auto Clicker', [ createToggleButton('Auto Clicker', autoClickerInterval !== null, (enabled) => { if (enabled) { startAutoClicker(); } else { stopAutoClicker(); } }), createInputGroup('Click Speed (ms):', 'clickSpeed', 'number', autoClickerSpeed.toString()), createButton('Update Speed âĄ', themes[currentTheme].accent, () => { const speed = parseInt(document.getElementById('clickSpeed').value) || 100; autoClickerSpeed = Math.max(1, speed); if (autoClickerInterval) { stopAutoClicker(); startAutoClicker(); } showNotification(`Click speed updated to ${autoClickerSpeed}ms! âĄ`); }) ])); container.appendChild(createSection('đ¯ Auto Features', [ createButton('Auto Buy Best Building đ', themes[currentTheme].success, () => { const bestBuilding = getBestBuilding(); if (bestBuilding && Game.cookies >= bestBuilding.price) { bestBuilding.buy(); showNotification(`Bought ${bestBuilding.name}! đ`); } else { showNotification('Not enough cookies or no buildings available! â'); } }), createButton('Auto Buy All Upgrades đ', themes[currentTheme].warning, () => { let bought = 0; for (let i in Game.UpgradesInStore) { const upgrade = Game.UpgradesInStore[i]; if (Game.cookies >= upgrade.price) { upgrade.buy(); bought++; } } showNotification(`Bought ${bought} upgrades! đ`); }) ])); } function createBuildingsTab(container) { container.appendChild(createSection('đ Building Manager', [ createButton('Buy 10 of Each Building đ', themes[currentTheme].success, () => { let totalCost = 0; for (let i in Game.Objects) { const building = Game.Objects[i]; for (let j = 0; j < 10; j++) { totalCost += building.price; if (Game.cookies >= totalCost) { building.buy(); } } } showNotification('Bought 10 of each building! đ'); }), createButton('Max All Buildings đī¸', themes[currentTheme].warning, () => { for (let i in Game.Objects) { const building = Game.Objects[i]; while (Game.cookies >= building.price) { building.buy(); } } showNotification('Maximized all buildings! đī¸'); }) ])); // Individual building controls const buildingControls = document.createElement('div'); for (let i in Game.Objects) { const building = Game.Objects[i]; const buildingDiv = document.createElement('div'); buildingDiv.style.cssText = ` display: flex; justify-content: space-between; align-items: center; padding: 8px; margin: 5px 0; background: rgba(255,255,255,0.1); border-radius: 5px; `; const buildingInfo = document.createElement('span'); buildingInfo.innerHTML = `${building.name}: ${building.amount}`; buildingInfo.style.fontSize = '12px'; const buyBtn = createButton('+1', themes[currentTheme].success, () => { if (Game.cookies >= building.price) { building.buy(); buildingInfo.innerHTML = `${building.name}: ${building.amount}`; } }); buyBtn.style.cssText += 'padding: 5px 10px; font-size: 12px;'; buildingDiv.appendChild(buildingInfo); buildingDiv.appendChild(buyBtn); buildingControls.appendChild(buildingDiv); } container.appendChild(createSection('đĸ Individual Buildings', [buildingControls])); } function createCheatsTab(container) { container.appendChild(createSection('đ Achievements & Unlocks', [ createButton('Unlock All Achievements đ', themes[currentTheme].success, () => { for (let i in Game.Achievements) { Game.Achievements[i].unlock(); } showNotification('All achievements unlocked! đ'); }), createButton('Unlock All Upgrades đ', themes[currentTheme].warning, () => { for (let i in Game.Upgrades) { Game.Upgrades[i].unlock(); } showNotification('All upgrades unlocked! đ'); }) ])); container.appendChild(createSection('đŽ Game Modifications', [ createButton('Infinite Cookie Production đ', themes[currentTheme].success, () => { Game.cookiesPs = Number.MAX_SAFE_INTEGER; showNotification('Infinite cookie production activated! đ'); }), createButton('Fast Golden Cookies đ', themes[currentTheme].warning, () => { Game.shimmerTypes.golden.maxTime = 1; Game.shimmerTypes.golden.minTime = 1; showNotification('Fast golden cookies activated! đ'); }), createButton('Stop All Timers â°', themes[currentTheme].danger, () => { Game.fps = 0; showNotification('All timers stopped! â°'); }), createButton('Restore Normal Speed đ', themes[currentTheme].success, () => { Game.fps = 30; showNotification('Normal speed restored! đ'); }) ])); container.appendChild(createSection('đž Save Management', [ createButton('Force Save Game đž', themes[currentTheme].accent, () => { Game.WriteSave(); showNotification('Game saved! đž'); }), createButton('Export Save đ¤', themes[currentTheme].success, () => { const save = Game.WriteSave(1); navigator.clipboard.writeText(save).then(() => { showNotification('Save exported to clipboard! đ¤'); }); }) ])); } function createStatsTab(container) { const statsDiv = document.createElement('div'); statsDiv.id = 'gameStats'; function updateStats() { statsDiv.innerHTML = `