User prompt
kod sıkıntı var düzelt
User prompt
olmadı oyun bittmedi düzelt şunu
User prompt
1000000 dolar oldunda oyun bitsin şöyle yazı cıksın mega zengi oldunuz dünyları bile alabilirsiniz oynadınız için teşekürler ve restart tuşu gelsin bunu hem ingilizceye hem türkçeye çevir
User prompt
ınfo bölümü güncele
User prompt
başarımı adı sömürgeci olsun
User prompt
Başarımlarda markete her şeyi aldımızda sömürge başarısını alsın
User prompt
markete işciler bize gelen pasif parayı 5 katına çıkarsın
User prompt
markete işçiler olsun bunu aldımızda 5x boost alalım fiyatıh 50000 dolar
User prompt
ınfo da bazı şeylen okuyamıyrum yukarı aşağı gitmemiz için bişey olsun
User prompt
ınfo güncele
User prompt
havalimanı 10 saniyede 4000 dolar kazanalım
User prompt
havalimanı 10 saniyede 10000 dolar kazanalım
User prompt
1000000 para oldun oyun bitsin ve önüne yazı gelsin ve şunlar yazsın- artık mega zengin oldun dünyayı bile alabilirsin oynadınız için teşekürler - iki seçenek olsun restart ve oyunda çıkma tuşu olsun oyunda ingilizce dil cevirmiş olanlara ingilizce gelsin türkçe diline çevirmiş olanlara türkçe olsun
User prompt
markete havalimanı olsun fiyatı 100000 dolar 10 saniyede 1000 dolar versin
User prompt
markerten apartman olsun 10 saniyede 300 dolar versin fiyattı 15000 dolar olsun ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
dil çevirmede türkçeye çevirdimde sıkıntı gördüm play,ınfo,language,music settıngs türkçe olmadı
User prompt
ingilizce yaptımda oynat,bilgi,dil,müzik ayarları ingilizce değil luften düzelt
User prompt
türkçe yaptımda play,ınfo,language,music settıngs türkçe değil lüften düzelt
User prompt
ınfo bölümünü güncele
User prompt
müzik ayaranın müzik sesini artırıp azaltmak icin eksi veya artıya basalım
User prompt
müzik sesini azaltma ve artırma olsun
User prompt
müzik ayarı language bir altında olsun içinde değil
User prompt
language bir tık altına müzik ayarları olsun ses ayralayalım mesala
User prompt
olmadı
User prompt
arkada eylen müziği de çalsın
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); var storage = LK.import("@upit/storage.v1"); /**** * Classes ****/ var Achievement = Container.expand(function (achievementData) { var self = Container.call(this); self.id = achievementData.id; self.name = achievementData.name; self.description = achievementData.description; self.unlocked = achievementData.unlocked || false; // Create achievement item background var itemBg = LK.getAsset('itemBg', { width: 550, height: 150, color: self.unlocked ? 0x4CAF50 : 0x3c3c5c, shape: 'box', anchorX: 0.5, anchorY: 0.5 }); self.addChild(itemBg); // Create achievement name text var nameText = new Text2(self.name, { size: 60, fill: self.unlocked ? 0xFFFFFF : 0x888888 }); nameText.anchor.set(0.5, 0); nameText.y = -40; self.addChild(nameText); // Create achievement description text var descText = new Text2(self.description, { size: 40, fill: self.unlocked ? 0xCCCCCC : 0x666666 }); descText.anchor.set(0.5, 0); descText.y = -5; self.addChild(descText); // Create status text var statusText = new Text2(self.unlocked ? 'UNLOCKED' : 'LOCKED', { size: 50, fill: self.unlocked ? 0xFFD700 : 0x888888 }); statusText.anchor.set(0.5, 0); statusText.y = 30; self.addChild(statusText); self.unlock = function () { if (!self.unlocked) { self.unlocked = true; itemBg.tint = 0x4CAF50; nameText.style.fill = 0xFFFFFF; descText.style.fill = 0xCCCCCC; statusText.setText('UNLOCKED'); statusText.style.fill = 0xFFD700; // Flash effect LK.effects.flashObject(self, 0xFFD700, 500); } }; return self; }); var AchievementPanel = Container.expand(function () { var self = Container.call(this); // Create achievement panel background var achievementBg = LK.getAsset('shopBackground', { width: 600, height: 2732, color: 0x2c2c54, shape: 'box', anchorX: 0, anchorY: 0 }); self.addChild(achievementBg); // Create title var titleText = new Text2('ACHIEVEMENTS', { size: 80, fill: 0xFFD700 }); titleText.anchor.set(0.5, 0); titleText.x = 300; titleText.y = 50; self.addChild(titleText); // Create achievement items self.achievementItems = []; self.updateAchievements = function () { // Clear existing items for (var i = 0; i < self.achievementItems.length; i++) { self.removeChild(self.achievementItems[i]); } self.achievementItems = []; // Add current achievements for (var i = 0; i < achievementsData.length; i++) { var achievement = new Achievement(achievementsData[i]); achievement.x = 300; achievement.y = 200 + i * 180; self.achievementItems.push(achievement); self.addChild(achievement); } }; return self; }); var BackgroundParticle = Container.expand(function () { var self = Container.call(this); var particleGraphics = self.attachAsset('backgroundParticle', { anchorX: 0.5, anchorY: 0.5 }); self.speed = Math.random() * 2 + 1; self.alpha = Math.random() * 0.5 + 0.2; self.update = function () { self.y += self.speed; if (self.y > 2732 + 50) { self.y = -50; self.x = Math.random() * 2048; } }; return self; }); var BottomMenu = Container.expand(function () { var self = Container.call(this); // Create bottom menu background var menuBg = LK.getAsset('bottomMenuBackground', { width: 2048, height: 300, color: 0x2c2c54, shape: 'box', anchorX: 0, anchorY: 0 }); self.addChild(menuBg); // Create exit button var exitButton = LK.getAsset('exitButton', { width: 300, height: 80, color: 0xff4444, shape: 'box', anchorX: 0.5, anchorY: 0.5 }); exitButton.x = 512; exitButton.y = 150; self.addChild(exitButton); self.exitButtonText = new Text2(translations[currentLanguage].exit, { size: 50, fill: 0xFFFFFF }); self.exitButtonText.anchor.set(0.5, 0.5); self.exitButtonText.x = 512; self.exitButtonText.y = 150; self.addChild(self.exitButtonText); // Create restart button var restartButton = LK.getAsset('restartButton', { width: 300, height: 80, color: 0x4caf50, shape: 'box', anchorX: 0.5, anchorY: 0.5 }); restartButton.x = 1536; restartButton.y = 150; self.addChild(restartButton); self.restartButtonText = new Text2(translations[currentLanguage].restart, { size: 50, fill: 0xFFFFFF }); self.restartButtonText.anchor.set(0.5, 0.5); self.restartButtonText.x = 1536; self.restartButtonText.y = 150; self.addChild(self.restartButtonText); // Exit button click handler exitButton.down = function (x, y, obj) { // Hide bottom menu self.visible = false; bottomMenuOpen = false; // Show main menu mainMenu.visible = true; gameStarted = false; // Hide game UI coinCountText.visible = false; tapCountText.visible = false; coinsPerTapText.visible = false; shopButton.visible = false; menuButton.visible = false; achievementsButton.visible = false; // Disable game interactions game.interactive = false; game.buttonMode = false; // Close shop if open if (shopOpen) { shopOpen = false; tween(shopPanel, { x: 2048 }, { duration: 300, easing: tween.easeInOut }); } }; // Restart button click handler restartButton.down = function (x, y, obj) { // Reset game state totalCoins = 0; tapCount = 0; coinsPerTap = 1; gameStarted = false; // Clear storage storage.totalCoins = 0; storage.tapCount = 0; storage.autoClicker = false; storage.boostUpgrade = false; storage.bakery = false; storage.factory = false; storage.farm = false; storage.bank = false; storage.company = false; storage.apartment = false; storage.airport = false; // Reset shop items for (var i = 0; i < shopItemsData.length; i++) { shopItemsData[i].owned = false; } // Update UI texts coinCountText.setText('$' + totalCoins); tapCountText.setText('Taps: ' + tapCount); coinsPerTapText.setText('$' + coinsPerTap + ' per tap'); // Hide bottom menu self.visible = false; bottomMenuOpen = false; // Show main menu mainMenu.visible = true; gameStarted = false; // Hide game UI coinCountText.visible = false; tapCountText.visible = false; coinsPerTapText.visible = false; shopButton.visible = false; menuButton.visible = false; achievementsButton.visible = false; // Disable game interactions game.interactive = false; game.buttonMode = false; // Close shop if open if (shopOpen) { shopOpen = false; tween(shopPanel, { x: 2048 }, { duration: 300, easing: tween.easeInOut }); } }; return self; }); var Coin = Container.expand(function () { var self = Container.call(this); var coinGraphics = self.attachAsset('coin', { anchorX: 0.5, anchorY: 0.5 }); self.startAnimation = function (startX, startY, targetX, targetY) { self.x = startX; self.y = startY; self.alpha = 1; self.scale.set(0.5); // Scale up animation tween(self.scale, { x: 1, y: 1 }, { duration: 200, easing: tween.easeOut }); // Move to target position tween(self, { x: targetX, y: targetY }, { duration: 800, easing: tween.easeInOut, onFinish: function onFinish() { self.destroy(); } }); // Fade out near the end LK.setTimeout(function () { tween(self, { alpha: 0 }, { duration: 200 }); }, 600); }; return self; }); var GoldenDollar = Container.expand(function () { var self = Container.call(this); var dollarGraphics = self.attachAsset('goldDollar', { anchorX: 0.5, anchorY: 0.5 }); dollarGraphics.tint = 0xFFD700; // Golden color self.speed = 1; // Slow falling speed self.collected = false; self.update = function () { if (!self.collected) { self.y += self.speed; // Remove if off screen if (self.y > 2732 + 50) { self.destroy(); } } }; self.down = function (x, y, obj) { if (!self.collected) { self.collected = true; totalCoins += 50; coinCountText.setText('$' + totalCoins); storage.totalCoins = totalCoins; // Flash effect LK.effects.flashObject(self, 0xFFD700, 300); // Scale up and fade out animation tween(self.scale, { x: 1.5, y: 1.5 }, { duration: 300, easing: tween.easeOut }); tween(self, { alpha: 0 }, { duration: 300, onFinish: function onFinish() { self.destroy(); } }); // Play coin sound LK.getSound('coinSound').play(); // Check golden hunter achievement if (!storage.achievement_golden_hunter) { storage.achievement_golden_hunter = true; achievementsData[3].unlocked = true; achievementPanel.updateAchievements(); } } }; return self; }); var InfoPanel = Container.expand(function () { var self = Container.call(this); // Create info panel background var infoBg = LK.getAsset('menuBackground', { width: 2048, height: 2732, color: 0x1a1a2e, shape: 'box', anchorX: 0, anchorY: 0 }); self.addChild(infoBg); // Create title var titleText = new Text2('HOW TO PLAY', { size: 120, fill: 0xFFD700 }); titleText.anchor.set(0.5, 0.5); titleText.x = 1024; titleText.y = 400; self.addChild(titleText); // Create instructions text var instructions = ['TAP THE SCREEN TO EARN COINS', '', 'SHOP ITEMS:', '• Auto Clicker - Automatically earn coins every 2 seconds', '• 2X Boost - Double your coins per tap', '• Bakery - Earn $10 every second', '• Factory - Earn $120 every 30 seconds', '• Farm - Earn $20 every 5 seconds', '• Bank - Earn $200 every 10 seconds', '• Company - Earn $400 every 5 seconds', '', 'GOLDEN DOLLARS:', '• Rarely fall from the sky (5% chance every 3 seconds)', '• Tap them to earn $50', '', 'ACHIEVEMENTS:', '• Complete various goals to unlock achievements', '• Track your progress and milestones', '', 'MUSIC SETTINGS:', '• Control background music volume', '• Mute/unmute music tracks', '• Music switches every 30 seconds', '', 'BUILD YOUR FORTUNE!']; var startY = 650; for (var i = 0; i < instructions.length; i++) { var instructionText = new Text2(instructions[i], { size: instructions[i] === '' ? 30 : instructions[i].startsWith('•') ? 45 : 50, fill: instructions[i].startsWith('•') ? 0x4CAF50 : instructions[i].endsWith(':') ? 0xFFD700 : 0xFFFFFF }); instructionText.anchor.set(0.5, 0.5); instructionText.x = 1024; instructionText.y = startY + i * 65; self.addChild(instructionText); } // Create back button var backButton = LK.getAsset('playButton', { width: 400, height: 120, color: 0xff4444, shape: 'box', anchorX: 0.5, anchorY: 0.5 }); backButton.x = 1024; backButton.y = 2300; self.addChild(backButton); var backButtonText = new Text2('BACK', { size: 80, fill: 0xFFFFFF }); backButtonText.anchor.set(0.5, 0.5); backButtonText.x = 1024; backButtonText.y = 2300; self.addChild(backButtonText); // Back button click handler backButton.down = function (x, y, obj) { self.visible = false; }; return self; }); var LanguagePanel = Container.expand(function () { var self = Container.call(this); // Create language panel background var langBg = LK.getAsset('menuBackground', { width: 2048, height: 2732, color: 0x1a1a2e, shape: 'box', anchorX: 0, anchorY: 0 }); self.addChild(langBg); // Create title var titleText = new Text2('LANGUAGE / DİL', { size: 120, fill: 0xFFD700 }); titleText.anchor.set(0.5, 0.5); titleText.x = 1024; titleText.y = 800; self.addChild(titleText); // Create Turkish button var turkishButton = LK.getAsset('playButton', { width: 500, height: 120, color: 0x4CAF50, shape: 'box', anchorX: 0.5, anchorY: 0.5 }); turkishButton.x = 1024; turkishButton.y = 1200; self.addChild(turkishButton); var turkishButtonText = new Text2('TÜRKÇE', { size: 80, fill: 0xFFFFFF }); turkishButtonText.anchor.set(0.5, 0.5); turkishButtonText.x = 1024; turkishButtonText.y = 1200; self.addChild(turkishButtonText); // Create English button var englishButton = LK.getAsset('playButton', { width: 500, height: 120, color: 0x2196F3, shape: 'box', anchorX: 0.5, anchorY: 0.5 }); englishButton.x = 1024; englishButton.y = 1400; self.addChild(englishButton); var englishButtonText = new Text2('ENGLISH', { size: 80, fill: 0xFFFFFF }); englishButtonText.anchor.set(0.5, 0.5); englishButtonText.x = 1024; englishButtonText.y = 1400; self.addChild(englishButtonText); // Create back button var backButton = LK.getAsset('playButton', { width: 400, height: 120, color: 0xff4444, shape: 'box', anchorX: 0.5, anchorY: 0.5 }); backButton.x = 1024; backButton.y = 2300; self.addChild(backButton); var backButtonText = new Text2('BACK / GERİ', { size: 80, fill: 0xFFFFFF }); backButtonText.anchor.set(0.5, 0.5); backButtonText.x = 1024; backButtonText.y = 2300; self.addChild(backButtonText); // Turkish button click handler turkishButton.down = function (x, y, obj) { currentLanguage = 'tr'; storage.language = 'tr'; updateLanguage(); self.visible = false; }; // English button click handler englishButton.down = function (x, y, obj) { currentLanguage = 'en'; storage.language = 'en'; updateLanguage(); self.visible = false; }; // Back button click handler backButton.down = function (x, y, obj) { self.visible = false; }; return self; }); var MainMenu = Container.expand(function () { var self = Container.call(this); // Create menu background var menuBg = LK.getAsset('menuBackground', { width: 2048, height: 2732, color: 0x1a1a2e, shape: 'box', anchorX: 0, anchorY: 0 }); self.addChild(menuBg); // Create title var titleText = new Text2('COIN CLICKER', { size: 150, fill: 0xFFD700 }); titleText.anchor.set(0.5, 0.5); titleText.x = 1024; titleText.y = 800; self.addChild(titleText); // Create play button var playButton = LK.getAsset('playButton', { width: 400, height: 120, color: 0x4CAF50, shape: 'box', anchorX: 0.5, anchorY: 0.5 }); playButton.x = 1024; playButton.y = 1400; self.addChild(playButton); var playButtonText = new Text2('PLAY', { size: 80, fill: 0xFFFFFF }); playButtonText.anchor.set(0.5, 0.5); playButtonText.x = 1024; playButtonText.y = 1400; self.addChild(playButtonText); // Create info button var infoButton = LK.getAsset('playButton', { width: 400, height: 120, color: 0x2196F3, shape: 'box', anchorX: 0.5, anchorY: 0.5 }); infoButton.x = 1024; infoButton.y = 1600; self.addChild(infoButton); var infoButtonText = new Text2('INFO', { size: 80, fill: 0xFFFFFF }); infoButtonText.anchor.set(0.5, 0.5); infoButtonText.x = 1024; infoButtonText.y = 1600; self.addChild(infoButtonText); // Create language button var languageButton = LK.getAsset('playButton', { width: 400, height: 120, color: 0xFF5722, shape: 'box', anchorX: 0.5, anchorY: 0.5 }); languageButton.x = 1024; languageButton.y = 1800; self.addChild(languageButton); var languageButtonText = new Text2('LANGUAGE', { size: 80, fill: 0xFFFFFF }); languageButtonText.anchor.set(0.5, 0.5); languageButtonText.x = 1024; languageButtonText.y = 1800; self.addChild(languageButtonText); // Create music settings button var musicSettingsButton = LK.getAsset('playButton', { width: 400, height: 120, color: 0x9C27B0, shape: 'box', anchorX: 0.5, anchorY: 0.5 }); musicSettingsButton.x = 1024; musicSettingsButton.y = 2000; self.addChild(musicSettingsButton); var musicSettingsButtonText = new Text2('MUSIC SETTINGS', { size: 65, fill: 0xFFFFFF }); musicSettingsButtonText.anchor.set(0.5, 0.5); musicSettingsButtonText.x = 1024; musicSettingsButtonText.y = 2000; self.addChild(musicSettingsButtonText); // Music settings button click handler musicSettingsButton.down = function (x, y, obj) { // Show music settings panel musicSettingsPanel.visible = true; musicSettingsPanel.updateVolumeDisplay(); }; // Language button click handler languageButton.down = function (x, y, obj) { // Show language panel languagePanel.visible = true; }; // Info button click handler infoButton.down = function (x, y, obj) { // Show info panel infoPanel.visible = true; }; // Play button click handler playButton.down = function (x, y, obj) { // Hide menu and start game self.visible = false; gameStarted = true; // Enable game interactions game.interactive = true; game.buttonMode = true; // Show game UI coinCountText.visible = true; tapCountText.visible = true; coinsPerTapText.visible = true; shopButton.visible = true; menuButton.visible = true; achievementsButton.visible = true; }; return self; }); var MusicSettingsPanel = Container.expand(function () { var self = Container.call(this); // Create music settings panel background var musicBg = LK.getAsset('menuBackground', { width: 2048, height: 2732, color: 0x1a1a2e, shape: 'box', anchorX: 0, anchorY: 0 }); self.addChild(musicBg); // Create title var titleText = new Text2('MUSİK AYARLARI / MUSIC SETTINGS', { size: 100, fill: 0xFFD700 }); titleText.anchor.set(0.5, 0.5); titleText.x = 1024; titleText.y = 600; self.addChild(titleText); // Create volume control background var volumeBg = LK.getAsset('playButton', { width: 800, height: 200, color: 0x2c2c54, shape: 'box', anchorX: 0.5, anchorY: 0.5 }); volumeBg.x = 1024; volumeBg.y = 1000; self.addChild(volumeBg); // Create volume label var volumeLabel = new Text2('SES / VOLUME', { size: 80, fill: 0xFFFFFF }); volumeLabel.anchor.set(0.5, 0.5); volumeLabel.x = 1024; volumeLabel.y = 950; self.addChild(volumeLabel); // Create volume percentage display self.volumeText = new Text2('100%', { size: 60, fill: 0x4CAF50 }); self.volumeText.anchor.set(0.5, 0.5); self.volumeText.x = 1024; self.volumeText.y = 1050; self.addChild(self.volumeText); // Create volume decrease button var volumeDownButton = LK.getAsset('playButton', { width: 150, height: 100, color: 0xff4444, shape: 'box', anchorX: 0.5, anchorY: 0.5 }); volumeDownButton.x = 700; volumeDownButton.y = 1000; self.addChild(volumeDownButton); var volumeDownText = new Text2('-', { size: 80, fill: 0xFFFFFF }); volumeDownText.anchor.set(0.5, 0.5); volumeDownText.x = 700; volumeDownText.y = 1000; self.addChild(volumeDownText); // Create volume increase button var volumeUpButton = LK.getAsset('playButton', { width: 150, height: 100, color: 0x4CAF50, shape: 'box', anchorX: 0.5, anchorY: 0.5 }); volumeUpButton.x = 1348; volumeUpButton.y = 1000; self.addChild(volumeUpButton); var volumeUpText = new Text2('+', { size: 80, fill: 0xFFFFFF }); volumeUpText.anchor.set(0.5, 0.5); volumeUpText.x = 1348; volumeUpText.y = 1000; self.addChild(volumeUpText); // Create mute/unmute button var muteButton = LK.getAsset('playButton', { width: 400, height: 120, color: 0xFF5722, shape: 'box', anchorX: 0.5, anchorY: 0.5 }); muteButton.x = 1024; muteButton.y = 1300; self.addChild(muteButton); self.muteButtonText = new Text2('SESİ KAPAT / MUTE', { size: 60, fill: 0xFFFFFF }); self.muteButtonText.anchor.set(0.5, 0.5); self.muteButtonText.x = 1024; self.muteButtonText.y = 1300; self.addChild(self.muteButtonText); // Create back button var backButton = LK.getAsset('playButton', { width: 400, height: 120, color: 0xff4444, shape: 'box', anchorX: 0.5, anchorY: 0.5 }); backButton.x = 1024; backButton.y = 2300; self.addChild(backButton); var backButtonText = new Text2('BACK / GERİ', { size: 80, fill: 0xFFFFFF }); backButtonText.anchor.set(0.5, 0.5); backButtonText.x = 1024; backButtonText.y = 2300; self.addChild(backButtonText); // Volume control functionality self.updateVolumeDisplay = function () { var percentage = Math.round(musicVolume * 100); self.volumeText.setText(percentage + '%'); if (isMuted) { self.muteButtonText.setText('SESİ AÇ / UNMUTE'); } else { self.muteButtonText.setText('SESİ KAPAT / MUTE'); } }; // Volume down button click handler volumeDownButton.down = function (x, y, obj) { if (musicVolume > 0) { musicVolume = Math.max(0, musicVolume - 0.1); storage.musicVolume = musicVolume; self.updateVolumeDisplay(); // Update current playing music volume if (!isMuted) { LK.playMusic(musicTracks[currentMusicIndex], { volume: musicVolume }); } } }; // Volume up button click handler volumeUpButton.down = function (x, y, obj) { if (musicVolume < 1) { musicVolume = Math.min(1, musicVolume + 0.1); storage.musicVolume = musicVolume; self.updateVolumeDisplay(); // Update current playing music volume if (!isMuted) { LK.playMusic(musicTracks[currentMusicIndex], { volume: musicVolume }); } } }; // Mute button click handler muteButton.down = function (x, y, obj) { isMuted = !isMuted; storage.isMuted = isMuted; self.updateVolumeDisplay(); if (isMuted) { LK.stopMusic(); } else { LK.playMusic(musicTracks[currentMusicIndex], { volume: musicVolume }); } }; // Back button click handler backButton.down = function (x, y, obj) { self.visible = false; }; return self; }); var TapEffect = Container.expand(function () { var self = Container.call(this); var effectGraphics = self.attachAsset('tapEffect', { anchorX: 0.5, anchorY: 0.5 }); self.startAnimation = function (x, y) { self.x = x; self.y = y; self.alpha = 0.7; self.scale.set(0.3); // Scale up and fade out tween(self.scale, { x: 1.5, y: 1.5 }, { duration: 300, easing: tween.easeOut }); tween(self, { alpha: 0 }, { duration: 300, onFinish: function onFinish() { self.destroy(); } }); }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x1a1a2e }); /**** * Game Code ****/ // - Visual coin animations from bakery location // - Proper storage persistence // - $10 per second passive income in game update loop // - $500 cost in shopItemsData // Bakery shop item is already fully implemented with: var gameStarted = false; var totalCoins = storage.totalCoins || 0; var coinsPerTap = storage.boostUpgrade ? 2 : 1; var tapCount = storage.tapCount || 0; var coins = []; var goldenDollars = []; var tapEffects = []; var backgroundParticles = []; var bottomMenuOpen = false; // Language system variables var currentLanguage = storage.language || 'tr'; var translations = { tr: { coinClicker: 'COIN CLICKER', play: 'OYNA', info: 'BİLGİ', language: 'DİL', menu: 'MENÜ', shop: 'DÜKKAN', achievements: 'BAŞARIMLAR', exit: 'ÇIKIŞ', restart: 'YENİDEN BAŞLA', howToPlay: 'NASIL OYNANIR', tapToEarn: 'PARA KAZANMAK İÇİN EKRANA DOKUN', shopItems: 'DÜKKAN EŞYALARI:', autoClicker: 'Otomatik olarak para kazan', boost: 'Dokunma başına kazancını ikiye katla', bakery: 'Saniyede $10 kazan', factory: '30 saniyede $120 kazan', goldenDollars: 'ALTIN DOLARLAR:', rarelyFall: 'Nadiren gökten düşer', tapThem: 'Onlara dokunarak $50 kazan', buildFortune: 'SERVET KURU!', back: 'GERİ', perTap: 'dokunma başına', taps: 'Dokunma', yolunBasi: 'Yolun Başı', paraToplayici: 'Para Toplayıcı', tiklamaUstasi: 'Tıklama Ustası', altinAvcisi: 'Altın Avcısı', dukkanSahibi: 'Dükkan Sahibi', para: 'Para', zengin: 'Zengin', milyoner: 'Milyoner', ilkTikla: 'İlk tıklamanı yap', yuzDolar: '100 dolar biriktir', elliTikla: '50 kez tıkla', altinDolarYakala: 'Bir altın dolar yakala', ilkEsya: 'İlk eşyanı satın al', binDolar: '1000 dolar biriktir', yuzBinDolar: '100000 dolar biriktir', birMilyonDolar: '1000000 dolar biriktir', autoClickerName: 'Otomatik Tıklayıcı', autoClickerDesc: 'Otomatik olarak para kazan', boostName: '2X Güçlendirme', boostDesc: 'Dokunma başına kazancını ikiye katla', bakeryName: 'Fırın', bakeryDesc: 'Saniyede $10 kazan', factoryName: 'Fabrika', factoryDesc: '30 saniyede $70 kazan', farmName: 'Çiftlik', farmDesc: '5 saniyede $20 kazan', bankName: 'Banka', bankDesc: '10 saniyede $200 kazan', companyName: 'Şirket', companyDesc: '5 saniyede $400 kazan', apartmentName: 'Apartman', apartmentDesc: '10 saniyede $300 kazan', airportName: 'Havalimanı', airportDesc: '10 saniyede $1000 kazan' }, en: { coinClicker: 'COIN CLICKER', play: 'PLAY', info: 'INFO', language: 'LANGUAGE', menu: 'MENU', shop: 'SHOP', achievements: 'ACHIEVEMENTS', exit: 'EXIT', restart: 'RESTART', howToPlay: 'HOW TO PLAY', tapToEarn: 'TAP THE SCREEN TO EARN COINS', shopItems: 'SHOP ITEMS:', autoClicker: 'Automatically earn coins', boost: 'Double your coins per tap', bakery: 'Earn $10 every second', factory: 'Earn $120 every 30 seconds', goldenDollars: 'GOLDEN DOLLARS:', rarelyFall: 'Rarely fall from the sky', tapThem: 'Tap them to earn $50', buildFortune: 'BUILD YOUR FORTUNE!', back: 'BACK', perTap: 'per tap', taps: 'Taps', yolunBasi: 'The Beginning', paraToplayici: 'Coin Collector', tiklamaUstasi: 'Tap Master', altinAvcisi: 'Golden Hunter', dukkanSahibi: 'Shop Keeper', para: 'Money', zengin: 'Rich', milyoner: 'Millionaire', ilkTikla: 'Make your first tap', yuzDolar: 'Collect $100', elliTikla: 'Tap 50 times', altinDolarYakala: 'Catch a golden dollar', ilkEsya: 'Buy your first item', binDolar: 'Collect $1000', yuzBinDolar: 'Collect $100000', birMilyonDolar: 'Collect $1000000', autoClickerName: 'Auto Clicker', autoClickerDesc: 'Automatically earn coins', boostName: '2X Boost', boostDesc: 'Double your coins per tap', bakeryName: 'Bakery', bakeryDesc: 'Earn $10 every second', factoryName: 'Factory', factoryDesc: 'Earn $70 every 30 seconds', farmName: 'Farm', farmDesc: 'Earn $20 every 5 seconds', bankName: 'Bank', bankDesc: 'Earn $200 every 10 seconds', companyName: 'Company', companyDesc: 'Earn $400 every 5 seconds', apartmentName: 'Apartment', apartmentDesc: 'Earn $300 every 10 seconds', airportName: 'Airport', airportDesc: 'Earn $1000 every 10 seconds' } }; // Achievement system variables var achievementsOpen = false; var achievementsData = [{ id: 'first_tap', name: 'Yolun Başı', description: 'İlk tıklamanı yap', unlocked: storage.achievement_first_tap || false }, { id: 'coin_collector', name: 'Para Toplayıcı', description: '100 dolar biriktir', unlocked: storage.achievement_coin_collector || false }, { id: 'tap_master', name: 'Tıklama Ustası', description: '50 kez tıkla', unlocked: storage.achievement_tap_master || false }, { id: 'golden_hunter', name: 'Altın Avcısı', description: 'Bir altın dolar yakala', unlocked: storage.achievement_golden_hunter || false }, { id: 'shop_keeper', name: 'Dükkan Sahibi', description: 'İlk eşyanı satın al', unlocked: storage.achievement_shop_keeper || false }, { id: 'par_achievement', name: 'Para', description: '1000 dolar biriktir', unlocked: storage.achievement_par || false }, { id: 'yuz_bin_dolar', name: 'Zengin', description: '100000 dolar biriktir', unlocked: storage.achievement_yuz_bin_dolar || false }, { id: 'milyoner', name: 'Milyoner', description: '1000000 dolar biriktir', unlocked: storage.achievement_milyoner || false }]; // Create main menu var mainMenu = new MainMenu(); game.addChild(mainMenu); // Create info panel var infoPanel = new InfoPanel(); infoPanel.visible = false; game.addChild(infoPanel); // Create language panel var languagePanel = new LanguagePanel(); languagePanel.visible = false; game.addChild(languagePanel); // Function to update shop items with translations function updateShopItems() { if (shopItems && shopItems.length > 0) { // Update shop item names and descriptions for (var i = 0; i < shopItems.length; i++) { var itemContainer = shopItems[i]; if (itemContainer.children && itemContainer.children.length >= 4) { var nameText = itemContainer.children[1]; // Item name text var descText = itemContainer.children[2]; // Item description text if (i === 0) { // Auto Clicker nameText.setText(translations[currentLanguage].autoClickerName); descText.setText(translations[currentLanguage].autoClickerDesc); } else if (i === 1) { // 2X Boost nameText.setText(translations[currentLanguage].boostName); descText.setText(translations[currentLanguage].boostDesc); } else if (i === 2) { // Bakery nameText.setText(translations[currentLanguage].bakeryName); descText.setText(translations[currentLanguage].bakeryDesc); } else if (i === 3) { // Factory nameText.setText(translations[currentLanguage].factoryName); descText.setText(translations[currentLanguage].factoryDesc); } else if (i === 4) { // Farm nameText.setText(translations[currentLanguage].farmName); descText.setText(translations[currentLanguage].farmDesc); } else if (i === 5) { // Bank nameText.setText(translations[currentLanguage].bankName); descText.setText(translations[currentLanguage].bankDesc); } else if (i === 6) { // Company nameText.setText(translations[currentLanguage].companyName); descText.setText(translations[currentLanguage].companyDesc); } else if (i === 7) { // Apartment nameText.setText(translations[currentLanguage].apartmentName); descText.setText(translations[currentLanguage].apartmentDesc); } else if (i === 8) { // Airport nameText.setText(translations[currentLanguage].airportName); descText.setText(translations[currentLanguage].airportDesc); } } } // Update shop title if (shopTitle) { shopTitle.setText(translations[currentLanguage].shop); } } } // Function to update language function updateLanguage() { // Update achievement data with current language achievementsData[0].name = translations[currentLanguage].yolunBasi; achievementsData[0].description = translations[currentLanguage].ilkTikla; achievementsData[1].name = translations[currentLanguage].paraToplayici; achievementsData[1].description = translations[currentLanguage].yuzDolar; achievementsData[2].name = translations[currentLanguage].tiklamaUstasi; achievementsData[2].description = translations[currentLanguage].elliTikla; achievementsData[3].name = translations[currentLanguage].altinAvcisi; achievementsData[3].description = translations[currentLanguage].altinDolarYakala; achievementsData[4].name = translations[currentLanguage].dukkanSahibi; achievementsData[4].description = translations[currentLanguage].ilkEsya; achievementsData[5].name = translations[currentLanguage].para; achievementsData[5].description = translations[currentLanguage].binDolar; achievementsData[6].name = translations[currentLanguage].zengin; achievementsData[6].description = translations[currentLanguage].yuzBinDolar; achievementsData[7].name = translations[currentLanguage].milyoner; achievementsData[7].description = translations[currentLanguage].birMilyonDolar; // Update UI texts only if they exist if (coinsPerTapText) { coinsPerTapText.setText('$' + coinsPerTap + ' ' + translations[currentLanguage].perTap); } if (tapCountText) { tapCountText.setText(translations[currentLanguage].taps + ': ' + tapCount); } if (achievementsButton) { achievementsButton.setText(translations[currentLanguage].achievements); } if (menuButton) { menuButton.setText(translations[currentLanguage].menu); } if (shopButton) { shopButton.setText(translations[currentLanguage].shop); } // Update bottom menu button texts if (bottomMenu && bottomMenu.exitButtonText && bottomMenu.restartButtonText) { bottomMenu.exitButtonText.setText(translations[currentLanguage].exit); bottomMenu.restartButtonText.setText(translations[currentLanguage].restart); } // Update achievement panel if (achievementPanel) { achievementPanel.updateAchievements(); } // Update shop items updateShopItems(); } // Create achievement panel var achievementPanel = new AchievementPanel(); achievementPanel.x = 2048; // Start hidden off-screen to the right game.addChild(achievementPanel); achievementPanel.updateAchievements(); // Initialize language updateLanguage(); // Create bottom menu var bottomMenu = new BottomMenu(); bottomMenu.y = 2732 + 300; // Start hidden off-screen at the bottom bottomMenu.visible = false; game.addChild(bottomMenu); // Create menu button var menuButton = new Text2('MENU', { size: 60, fill: 0xFFD700 }); menuButton.anchor.set(0, 1); menuButton.x = 20; menuButton.y = -20; menuButton.visible = false; // Hide initially LK.gui.bottomLeft.addChild(menuButton); // UI Elements var coinCountText = new Text2('$' + totalCoins, { size: 120, fill: 0xFFD700 }); coinCountText.anchor.set(0.5, 0); coinCountText.visible = false; // Hide initially LK.gui.top.addChild(coinCountText); var tapCountText = new Text2('Taps: ' + tapCount, { size: 60, fill: 0xFFFFFF }); tapCountText.anchor.set(0.5, 0); tapCountText.y = 150; tapCountText.visible = false; // Hide initially LK.gui.top.addChild(tapCountText); var coinsPerTapText = new Text2('$' + coinsPerTap + ' per tap', { size: 50, fill: 0x4CAF50 }); coinsPerTapText.anchor.set(0.5, 1); coinsPerTapText.visible = false; // Hide initially LK.gui.bottom.addChild(coinsPerTapText); // Shop system variables var shopOpen = false; var shopPanel = new Container(); var shopBackground = LK.getAsset('shopBackground', { width: 600, height: 2732, color: 0x2c2c54, shape: 'box', anchorX: 0, anchorY: 0 }); shopPanel.addChild(shopBackground); shopPanel.x = 2048; // Start hidden off-screen to the right game.addChild(shopPanel); // Shop toggle button var shopButton = new Text2('SHOP', { size: 80, fill: 0xFFD700 }); shopButton.anchor.set(1, 0); shopButton.x = -20; shopButton.y = 20; shopButton.visible = false; // Hide initially LK.gui.topRight.addChild(shopButton); // Achievements button var achievementsButton = new Text2('BAŞARIMLAR', { size: 50, fill: 0xFFD700 }); achievementsButton.anchor.set(1, 1); achievementsButton.x = -20; achievementsButton.y = -20; achievementsButton.visible = false; // Hide initially LK.gui.bottomRight.addChild(achievementsButton); // Disable game interactions initially game.interactive = false; game.buttonMode = false; // Shop items data var shopItemsData = [{ name: 'Auto Clicker', description: 'Automatically earn coins', cost: 500, owned: storage.autoClicker || false, type: 'upgrade' }, { name: '2X Boost', description: 'Double your coins per tap', cost: 120, owned: storage.boostUpgrade || false, type: 'upgrade' }, { name: 'Bakery', description: 'Earn $10 every second', cost: 500, owned: storage.bakery || false, type: 'upgrade' }, { name: 'Factory', description: 'Earn $120 every 30 seconds', cost: 2000, owned: storage.factory || false, type: 'upgrade' }, { name: 'Farm', description: 'Earn $20 every 5 seconds', cost: 1000, owned: storage.farm || false, type: 'upgrade' }, { name: 'Bank', description: 'Earn $200 every 10 seconds', cost: 5000, owned: storage.bank || false, type: 'upgrade' }, { name: 'Company', description: 'Earn $400 every 5 seconds', cost: 30000, owned: storage.company || false, type: 'upgrade' }, { name: 'Apartment', description: 'Earn $300 every 10 seconds', cost: 15000, owned: storage.apartment || false, type: 'upgrade' }, { name: 'Airport', description: 'Earn $1000 every 10 seconds', cost: 100000, owned: storage.airport || false, type: 'upgrade' }]; // Shop UI elements var shopItems = []; var shopTitle = new Text2('SHOP', { size: 100, fill: 0xFFD700 }); shopTitle.anchor.set(0.5, 0); shopTitle.x = 300; shopTitle.y = 50; shopPanel.addChild(shopTitle); // Create shop item buttons for (var i = 0; i < shopItemsData.length; i++) { var itemContainer = new Container(); var itemBg = LK.getAsset('itemBg', { width: 550, height: 150, color: 0x3c3c5c, shape: 'box', anchorX: 0.5, anchorY: 0.5 }); var itemName = new Text2(shopItemsData[i].name, { size: 60, fill: 0xFFFFFF }); itemName.anchor.set(0.5, 0); itemName.y = -40; var itemDesc = new Text2(shopItemsData[i].description, { size: 40, fill: 0xCCCCCC }); itemDesc.anchor.set(0.5, 0); itemDesc.y = -5; var itemCost = new Text2('$' + shopItemsData[i].cost, { size: 50, fill: 0x4CAF50 }); itemCost.anchor.set(0.5, 0); itemCost.y = 30; itemContainer.addChild(itemBg); itemContainer.addChild(itemName); itemContainer.addChild(itemDesc); itemContainer.addChild(itemCost); shopItems.push(itemContainer); itemContainer.x = 300; itemContainer.y = 250 + i * 200; itemContainer.itemIndex = i; // Add click handler for shop items itemContainer.down = function (x, y, obj) { var itemIndex = this.itemIndex; if (itemIndex >= 0 && itemIndex < shopItemsData.length) { var item = shopItemsData[itemIndex]; if (item && totalCoins >= item.cost && !item.owned) { totalCoins -= item.cost; item.owned = true; // Apply item effects if (item.name === 'Auto Clicker') { storage.autoClicker = true; } else if (item.name === '2X Boost') { storage.boostUpgrade = true; coinsPerTap = 2; } else if (item.name === 'Bakery') { storage.bakery = true; } else if (item.name === 'Factory') { storage.factory = true; } else if (item.name === 'Farm') { storage.farm = true; } else if (item.name === 'Bank') { storage.bank = true; } else if (item.name === 'Company') { storage.company = true; } else if (item.name === 'Apartment') { storage.apartment = true; } else if (item.name === 'Airport') { storage.airport = true; } // Update UI coinCountText.setText('$' + totalCoins); coinsPerTapText.setText('$' + coinsPerTap + ' per tap'); // Flash item green LK.effects.flashObject(this, 0x4CAF50, 500); // Save progress storage.totalCoins = totalCoins; // Check shop keeper achievement if (!storage.achievement_shop_keeper) { storage.achievement_shop_keeper = true; achievementsData[4].unlocked = true; achievementPanel.updateAchievements(); } } } }; shopPanel.addChild(itemContainer); } // Create background particles for (var i = 0; i < 15; i++) { var particle = new BackgroundParticle(); particle.x = Math.random() * 2048; particle.y = Math.random() * 2732; backgroundParticles.push(particle); game.addChild(particle); } // Shop button click handler shopButton.down = function (x, y, obj) { shopOpen = !shopOpen; var targetX = shopOpen ? 1448 : 2048; tween(shopPanel, { x: targetX }, { duration: 300, easing: tween.easeInOut }); }; // Menu button click handler menuButton.down = function (x, y, obj) { bottomMenuOpen = !bottomMenuOpen; bottomMenu.visible = true; var targetY = bottomMenuOpen ? 2432 : 2732 + 300; tween(bottomMenu, { y: targetY }, { duration: 300, easing: tween.easeInOut, onFinish: function onFinish() { if (!bottomMenuOpen) { bottomMenu.visible = false; } } }); }; // Achievements button click handler achievementsButton.down = function (x, y, obj) { achievementsOpen = !achievementsOpen; var targetX = achievementsOpen ? 1448 : 2048; tween(achievementPanel, { x: targetX }, { duration: 300, easing: tween.easeInOut }); }; // Main tap handler game.down = function (x, y, obj) { // Don't process taps if game hasn't started or shop is open or bottom menu is open if (!gameStarted || shopOpen || bottomMenuOpen) return; // Increase coin count totalCoins += coinsPerTap; tapCount++; // Update UI coinCountText.setText('$' + totalCoins); tapCountText.setText('Taps: ' + tapCount); // Create coin animation var coin = new Coin(); var targetX = 2048 / 2; var targetY = 200; coin.startAnimation(x, y, targetX, targetY); coins.push(coin); game.addChild(coin); // Create tap effect var tapEffect = new TapEffect(); tapEffect.startAnimation(x, y); tapEffects.push(tapEffect); game.addChild(tapEffect); // Play sounds LK.getSound('coinSound').play(); LK.getSound('tapSound').play(); // Removed automatic progression - coins per tap stays at 1 dollar // Make background particles react to taps for (var i = 0; i < backgroundParticles.length; i++) { var particle = backgroundParticles[i]; var distance = Math.sqrt(Math.pow(particle.x - x, 2) + Math.pow(particle.y - y, 2)); if (distance < 200) { tween(particle, { alpha: 0.8 }, { duration: 100 }); tween(particle, { alpha: particle.alpha }, { duration: 200 }); } } // Save progress storage.totalCoins = totalCoins; storage.tapCount = tapCount; // Check achievements checkAchievements(); }; // Function to check and unlock achievements function checkAchievements() { // Check first tap achievement if (tapCount >= 1 && !storage.achievement_first_tap) { storage.achievement_first_tap = true; achievementsData[0].unlocked = true; achievementPanel.updateAchievements(); } // Check coin collector achievement if (totalCoins >= 100 && !storage.achievement_coin_collector) { storage.achievement_coin_collector = true; achievementsData[1].unlocked = true; achievementPanel.updateAchievements(); } // Check tap master achievement if (tapCount >= 50 && !storage.achievement_tap_master) { storage.achievement_tap_master = true; achievementsData[2].unlocked = true; achievementPanel.updateAchievements(); } // Check par achievement (1000 dollars) if (totalCoins >= 1000 && !storage.achievement_par) { storage.achievement_par = true; achievementsData[5].unlocked = true; achievementPanel.updateAchievements(); } // Check 100,000 dollar achievement if (totalCoins >= 100000 && !storage.achievement_yuz_bin_dolar) { storage.achievement_yuz_bin_dolar = true; achievementsData[6].unlocked = true; achievementPanel.updateAchievements(); } // Check 1,000,000 dollar achievement (Millionaire) if (totalCoins >= 1000000 && !storage.achievement_milyoner) { storage.achievement_milyoner = true; achievementsData[7].unlocked = true; achievementPanel.updateAchievements(); } } // Music system variables var musicTracks = ['rahat', 'eylen']; var currentMusicIndex = 0; var musicTimer = 0; var musicSwitchInterval = 1800; // 30 seconds at 60 FPS var musicVolume = storage.musicVolume || 1.0; var isMuted = storage.isMuted || false; // Create music settings panel var musicSettingsPanel = new MusicSettingsPanel(); musicSettingsPanel.visible = false; game.addChild(musicSettingsPanel); // Play first background music console.log("Starting music system with track:", musicTracks[currentMusicIndex]); console.log("Available music tracks:", musicTracks); if (!isMuted) { LK.playMusic(musicTracks[currentMusicIndex], { volume: musicVolume }); } // Game update loop game.update = function () { // Auto-clicker functionality if (storage.autoClicker && LK.ticks % 120 === 0) { // Every 2 seconds totalCoins += Math.floor(coinsPerTap * 0.5); // 50% of manual tap value coinCountText.setText('$' + totalCoins); storage.totalCoins = totalCoins; // Create small coin animation at center var coin = new Coin(); var centerX = 2048 / 2; var centerY = 2732 / 2; coin.startAnimation(centerX, centerY, centerX, 200); coins.push(coin); game.addChild(coin); } // Bakery passive income - $10 every second (60 ticks) if (storage.bakery && LK.ticks % 60 === 0) { totalCoins += 10; coinCountText.setText('$' + totalCoins); storage.totalCoins = totalCoins; // Create small coin animation from bottom right var coin = new Coin(); var bakeryX = 2048 - 100; var bakeryY = 2732 - 100; coin.startAnimation(bakeryX, bakeryY, 2048 / 2, 200); coins.push(coin); game.addChild(coin); } // Factory passive income - $120 every 30 seconds (1800 ticks) if (storage.factory && LK.ticks % 1800 === 0) { totalCoins += 120; coinCountText.setText('$' + totalCoins); storage.totalCoins = totalCoins; // Create coin animation from bottom left var coin = new Coin(); var factoryX = 100; var factoryY = 2732 - 100; coin.startAnimation(factoryX, factoryY, 2048 / 2, 200); coins.push(coin); game.addChild(coin); } // Farm passive income - $20 every 5 seconds (300 ticks) if (storage.farm && LK.ticks % 300 === 0) { totalCoins += 20; coinCountText.setText('$' + totalCoins); storage.totalCoins = totalCoins; // Create coin animation from center left var coin = new Coin(); var farmX = 200; var farmY = 2732 / 2; coin.startAnimation(farmX, farmY, 2048 / 2, 200); coins.push(coin); game.addChild(coin); } // Bank passive income - $200 every 10 seconds (600 ticks) if (storage.bank && LK.ticks % 600 === 0) { totalCoins += 200; coinCountText.setText('$' + totalCoins); storage.totalCoins = totalCoins; // Create coin animation from top center var coin = new Coin(); var bankX = 2048 / 2; var bankY = 100; coin.startAnimation(bankX, bankY, 2048 / 2, 200); coins.push(coin); game.addChild(coin); } // Company passive income - $400 every 5 seconds (300 ticks) if (storage.company && LK.ticks % 300 === 0) { totalCoins += 400; coinCountText.setText('$' + totalCoins); storage.totalCoins = totalCoins; // Create coin animation from top right var coin = new Coin(); var companyX = 2048 - 200; var companyY = 200; coin.startAnimation(companyX, companyY, 2048 / 2, 200); coins.push(coin); game.addChild(coin); } // Apartment passive income - $300 every 10 seconds (600 ticks) if (storage.apartment && LK.ticks % 600 === 0) { totalCoins += 300; coinCountText.setText('$' + totalCoins); storage.totalCoins = totalCoins; // Create coin animation from center right var coin = new Coin(); var apartmentX = 2048 - 300; var apartmentY = 2732 / 2; coin.startAnimation(apartmentX, apartmentY, 2048 / 2, 200); coins.push(coin); game.addChild(coin); } // Airport passive income - $1000 every 10 seconds (600 ticks) if (storage.airport && LK.ticks % 600 === 0) { totalCoins += 1000; coinCountText.setText('$' + totalCoins); storage.totalCoins = totalCoins; // Create coin animation from top left var coin = new Coin(); var airportX = 300; var airportY = 300; coin.startAnimation(airportX, airportY, 2048 / 2, 200); coins.push(coin); game.addChild(coin); } // Clean up destroyed coins for (var i = coins.length - 1; i >= 0; i--) { if (coins[i].destroyed) { coins.splice(i, 1); } } // Clean up destroyed tap effects for (var i = tapEffects.length - 1; i >= 0; i--) { if (tapEffects[i].destroyed) { tapEffects.splice(i, 1); } } // Golden dollar spawning - 5% chance every 3 seconds (180 ticks) if (gameStarted && LK.ticks % 180 === 0 && Math.random() < 0.05) { var goldenDollar = new GoldenDollar(); goldenDollar.x = Math.random() * (2048 - 100) + 50; // Random X position within screen bounds goldenDollar.y = -50; // Start above screen goldenDollars.push(goldenDollar); game.addChild(goldenDollar); } // Clean up destroyed golden dollars for (var i = goldenDollars.length - 1; i >= 0; i--) { if (goldenDollars[i].destroyed) { goldenDollars.splice(i, 1); } } // Music switching system musicTimer++; if (musicTimer >= musicSwitchInterval) { musicTimer = 0; currentMusicIndex = (currentMusicIndex + 1) % musicTracks.length; console.log("Switching to music track:", musicTracks[currentMusicIndex]); if (!isMuted) { LK.playMusic(musicTracks[currentMusicIndex], { volume: musicVolume }); } } // Animate coin count text occasionally if (LK.ticks % 300 === 0) { tween(coinCountText.scale, { x: 1.1, y: 1.1 }, { duration: 150, easing: tween.easeOut }); tween(coinCountText.scale, { x: 1, y: 1 }, { duration: 150, easing: tween.easeIn }); } };
===================================================================
--- original.js
+++ change.js
@@ -216,8 +216,9 @@
storage.farm = false;
storage.bank = false;
storage.company = false;
storage.apartment = false;
+ storage.airport = false;
// Reset shop items
for (var i = 0; i < shopItemsData.length; i++) {
shopItemsData[i].owned = false;
}
@@ -873,13 +874,13 @@
/****
* Game Code
****/
-// Bakery shop item is already fully implemented with:
-// - $500 cost in shopItemsData
-// - $10 per second passive income in game update loop
-// - Proper storage persistence
// - Visual coin animations from bakery location
+// - Proper storage persistence
+// - $10 per second passive income in game update loop
+// - $500 cost in shopItemsData
+// Bakery shop item is already fully implemented with:
var gameStarted = false;
var totalCoins = storage.totalCoins || 0;
var coinsPerTap = storage.boostUpgrade ? 2 : 1;
var tapCount = storage.tapCount || 0;
@@ -945,9 +946,11 @@
bankDesc: '10 saniyede $200 kazan',
companyName: 'Şirket',
companyDesc: '5 saniyede $400 kazan',
apartmentName: 'Apartman',
- apartmentDesc: '10 saniyede $300 kazan'
+ apartmentDesc: '10 saniyede $300 kazan',
+ airportName: 'Havalimanı',
+ airportDesc: '10 saniyede $1000 kazan'
},
en: {
coinClicker: 'COIN CLICKER',
play: 'PLAY',
@@ -1002,9 +1005,11 @@
bankDesc: 'Earn $200 every 10 seconds',
companyName: 'Company',
companyDesc: 'Earn $400 every 5 seconds',
apartmentName: 'Apartment',
- apartmentDesc: 'Earn $300 every 10 seconds'
+ apartmentDesc: 'Earn $300 every 10 seconds',
+ airportName: 'Airport',
+ airportDesc: 'Earn $1000 every 10 seconds'
}
};
// Achievement system variables
var achievementsOpen = false;
@@ -1100,8 +1105,12 @@
} else if (i === 7) {
// Apartment
nameText.setText(translations[currentLanguage].apartmentName);
descText.setText(translations[currentLanguage].apartmentDesc);
+ } else if (i === 8) {
+ // Airport
+ nameText.setText(translations[currentLanguage].airportName);
+ descText.setText(translations[currentLanguage].airportDesc);
}
}
}
// Update shop title
@@ -1287,8 +1296,14 @@
description: 'Earn $300 every 10 seconds',
cost: 15000,
owned: storage.apartment || false,
type: 'upgrade'
+}, {
+ name: 'Airport',
+ description: 'Earn $1000 every 10 seconds',
+ cost: 100000,
+ owned: storage.airport || false,
+ type: 'upgrade'
}];
// Shop UI elements
var shopItems = [];
var shopTitle = new Text2('SHOP', {
@@ -1361,8 +1376,10 @@
} else if (item.name === 'Company') {
storage.company = true;
} else if (item.name === 'Apartment') {
storage.apartment = true;
+ } else if (item.name === 'Airport') {
+ storage.airport = true;
}
// Update UI
coinCountText.setText('$' + totalCoins);
coinsPerTapText.setText('$' + coinsPerTap + ' per tap');
@@ -1628,8 +1645,21 @@
coin.startAnimation(apartmentX, apartmentY, 2048 / 2, 200);
coins.push(coin);
game.addChild(coin);
}
+ // Airport passive income - $1000 every 10 seconds (600 ticks)
+ if (storage.airport && LK.ticks % 600 === 0) {
+ totalCoins += 1000;
+ coinCountText.setText('$' + totalCoins);
+ storage.totalCoins = totalCoins;
+ // Create coin animation from top left
+ var coin = new Coin();
+ var airportX = 300;
+ var airportY = 300;
+ coin.startAnimation(airportX, airportY, 2048 / 2, 200);
+ coins.push(coin);
+ game.addChild(coin);
+ }
// Clean up destroyed coins
for (var i = coins.length - 1; i >= 0; i--) {
if (coins[i].destroyed) {
coins.splice(i, 1);