User prompt
Open the spaces between the buttons below, move them down a little more and increase their size.
User prompt
Open the spaces between the buttons below, move them down a little more and increase their size.
User prompt
Set the generators in the game to a maximum level of 200.
User prompt
Abbreviate numbers in the game with globally accepted abbreviations. And let this abbreviation be very
User prompt
Abbreviate numbers in the game with globally accepted abbreviations
User prompt
When all items on the luxury items page are purchased, a short-lived confetti explosion occurs in the middle of the screen. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
When we click on the gold coin in the middle, the money that comes with each click should be written in random places outside the cold coin. And there should be a continuous outline around the text. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
When we click on the gold coin in the middle, the money that comes with each click should be written a little further to the right or left of the cold coin. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
When we click on the gold coin in the middle, the money that comes with each click should be written to the right or left of the cold coin. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Remove the luxury text on the left side of the luxury page
User prompt
undo your last action
User prompt
On the luxury page, remove the luxury text on the left. Change the close text on the top right to a visual file. And move the luxury items text in the middle down a little bit.
User prompt
Move the luxury text on the homepage a little further down and set it as a button
User prompt
Remove the money indicator in the middle of the luxury items page. But keep the money indicator on the homepage. Make the luxury text on the homepage a little bigger.
User prompt
Remove the total money text in the middle of the luxury items page
User prompt
Move the luxury items text under the click power text. In the opened tab, the luxury items text in the middle should be written under our total money.
User prompt
Let's have houses, cars, ships, etc. that we can only buy visually in a different tab. and create a separate visual file for each of them. ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
When we click on the gold coin, the text that appears should be a black outline text.
User prompt
Let the gold coin go up a little more and spin around itself ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
As prestige points increase, click income increases by 50%
User prompt
As prestige points increase, click income increases by 5%
User prompt
Delete 2x all income and generator efficiency buttons
User prompt
When we click on the screen under the prestige score text on the right side of the screen, it will calculate how many coins we have earned instantly.
User prompt
Passive income and automatic click rate articles should go down a little further
User prompt
Under our total money, our total passive income and how many automatic clicks we make per second should be written
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); var storage = LK.import("@upit/storage.v1"); /**** * Classes ****/ var BackgroundElements = Container.expand(function () { var self = Container.call(this); // Create gradient background for business empire theme self.backgroundGradient = LK.getAsset('box', { width: 2048, height: 2732, color: 0x1a1a2e, shape: 'box', anchorX: 0, anchorY: 0, x: 0, y: 0 }); self.addChild(self.backgroundGradient); // Add subtle pattern overlay self.patternOverlay = LK.getAsset('box', { width: 2048, height: 2732, color: 0x16213e, shape: 'box', anchorX: 0, anchorY: 0, x: 0, y: 0 }); self.patternOverlay.alpha = 0.3; self.addChild(self.patternOverlay); // Add golden accent elements for empire feel self.topAccent = LK.getAsset('box', { width: 2048, height: 8, color: 0xFFD700, shape: 'box', anchorX: 0, anchorY: 0, x: 0, y: 0 }); self.addChild(self.topAccent); self.bottomAccent = LK.getAsset('box', { width: 2048, height: 8, color: 0xFFD700, shape: 'box', anchorX: 0, anchorY: 0, x: 0, y: 2724 }); self.addChild(self.bottomAccent); return self; }); var Generator = Container.expand(function (type, baseCost, baseIncome) { var self = Container.call(this); self.type = type; self.baseCost = baseCost; self.baseIncome = baseIncome; self.level = 0; self.lastIncomeTime = Date.now(); // Create visual representation var visual = self.attachAsset(type, { anchorX: 0.5, anchorY: 0.5 }); // Add level text self.levelText = new Text2('Lv.0', { size: 40, fill: 0xFFFFFF }); self.levelText.anchor.set(0.5, 0); self.levelText.x = 0; self.levelText.y = visual.height / 2 + 10; self.addChild(self.levelText); self.getCost = function () { return Math.floor(self.baseCost * Math.pow(1.15, self.level)); }; self.getIncome = function () { var baseIncome = self.baseIncome * self.level; if (baseIncome > 0) { // Apply global multipliers and efficiency bonuses var globalMultiplier = Math.pow(2, globalMultiplierUpgrades || 0); var efficiencyMultiplier = 1 + (efficiencyUpgrades || 0) * 0.25; var prestigeMultiplier = 1 + (prestigePoints || 0) * 0.1; return baseIncome * globalMultiplier * efficiencyMultiplier * prestigeMultiplier; } return baseIncome; }; self.upgrade = function () { self.level++; self.levelText.setText('Lv.' + self.level); LK.getSound('upgrade').play(); }; self.generateIncome = function () { if (self.level > 0) { var now = Date.now(); var timeDiff = (now - self.lastIncomeTime) / 1000; // Convert to seconds var income = self.getIncome() * timeDiff; self.lastIncomeTime = now; return income; } return 0; }; return self; }); var LuxuryItem = Container.expand(function (name, assetId, cost, description) { var self = Container.call(this); self.name = name; self.assetId = assetId; self.cost = cost; self.description = description; self.owned = false; // Create visual representation self.visual = self.attachAsset(assetId, { anchorX: 0.5, anchorY: 0.5 }); // Add name text self.nameText = new Text2(name, { size: 30, fill: 0xFFFFFF }); self.nameText.anchor.set(0.5, 0); self.nameText.x = 0; self.nameText.y = self.visual.height / 2 + 10; self.addChild(self.nameText); // Add cost text self.costText = new Text2('$' + formatNumber(cost), { size: 25, fill: 0xFFD700 }); self.costText.anchor.set(0.5, 0); self.costText.x = 0; self.costText.y = self.visual.height / 2 + 50; self.addChild(self.costText); // Add owned indicator self.ownedText = new Text2('OWNED', { size: 20, fill: 0x00FF00 }); self.ownedText.anchor.set(0.5, 0.5); self.ownedText.x = 0; self.ownedText.y = -self.visual.height / 2 - 20; self.ownedText.visible = false; self.addChild(self.ownedText); self.purchase = function () { if (!self.owned && currency >= self.cost) { currency -= self.cost; self.owned = true; self.ownedText.visible = true; self.visual.alpha = 0.7; self.costText.visible = false; LK.getSound('purchase').play(); updateUI(); saveLuxuryItems(); return true; } return false; }; self.down = function (x, y, obj) { self.purchase(); }; return self; }); var LuxuryTab = Container.expand(function () { var self = Container.call(this); self.visible = false; self.luxuryItems = []; // Create background self.background = LK.getAsset('box', { width: 2048, height: 2732, color: 0x2a2a3e, shape: 'box', anchorX: 0, anchorY: 0, x: 0, y: 0 }); self.addChild(self.background); // Create title self.titleText = new Text2('LUXURY ITEMS', { size: 80, fill: 0xFFD700 }); self.titleText.anchor.set(0.5, 0); self.titleText.x = 1024; self.titleText.y = 100; self.addChild(self.titleText); // Create close button self.closeButton = LK.getAsset('box', { width: 100, height: 60, color: 0xFF0000, shape: 'box', anchorX: 0.5, anchorY: 0.5 }); self.closeButton.x = 1900; self.closeButton.y = 150; self.addChild(self.closeButton); self.closeButtonText = new Text2('CLOSE', { size: 25, fill: 0xFFFFFF }); self.closeButtonText.anchor.set(0.5, 0.5); self.closeButtonText.x = 1900; self.closeButtonText.y = 150; self.addChild(self.closeButtonText); self.closeButton.down = function (x, y, obj) { self.visible = false; }; // Initialize luxury items self.initializeLuxuryItems = function () { var luxuryItemsData = [{ name: 'Small House', assetId: 'luxuryHouse', cost: 50000, description: 'A cozy starter home' }, { name: 'Sports Car', assetId: 'luxuryCar', cost: 100000, description: 'Fast and flashy' }, { name: 'Yacht', assetId: 'luxuryShip', cost: 500000, description: 'Luxury on the water' }, { name: 'Mansion', assetId: 'luxuryMansion', cost: 2000000, description: 'Ultimate luxury living' }, { name: 'Super Yacht', assetId: 'luxuryYacht', cost: 10000000, description: 'The pinnacle of maritime luxury' }, { name: 'Private Jet', assetId: 'luxuryJet', cost: 50000000, description: 'Travel in ultimate style' }]; for (var i = 0; i < luxuryItemsData.length; i++) { var data = luxuryItemsData[i]; var item = new LuxuryItem(data.name, data.assetId, data.cost, data.description); var col = i % 3; var row = Math.floor(i / 3); item.x = 300 + col * 450; item.y = 400 + row * 400; self.addChild(item); self.luxuryItems.push(item); } }; self.loadOwnedItems = function () { var ownedItems = storage.ownedLuxuryItems || {}; for (var i = 0; i < self.luxuryItems.length; i++) { var item = self.luxuryItems[i]; if (ownedItems[item.name]) { item.owned = true; item.ownedText.visible = true; item.visual.alpha = 0.7; item.costText.visible = false; } } }; return self; }); var MultiplierButtons = Container.expand(function () { var self = Container.call(this); self.multiplierButtons = []; var multiplierValues = [1, 5, 10, 100, 'All']; // Create multiplier buttons for (var i = 0; i < multiplierValues.length; i++) { var multiplier = multiplierValues[i]; var btn = new Container(); var bg = LK.getAsset('box', { width: 120, height: 60, color: multiplier === 1 ? 0x2E8B57 : 0x666666, shape: 'box', anchorX: 0.5, anchorY: 0.5 }); btn.addChild(bg); var text = new Text2(multiplier + 'x', { size: 30, fill: 0xFFFFFF }); text.anchor.set(0.5, 0.5); btn.addChild(text); btn.x = (i - 2) * 140; // Center the buttons btn.multiplierValue = multiplier; btn.bg = bg; btn.down = function (x, y, obj) { // Reset all buttons to inactive color self.multiplierButtons.forEach(function (button) { button.bg.tint = 0x666666; }); // Set this button to active color this.bg.tint = 0x2E8B57; purchaseMultiplier = this.multiplierValue; updateUI(); }; self.addChild(btn); self.multiplierButtons.push(btn); } return self; }); var UpgradeButton = Container.expand(function (text, cost, onPurchase, isRepeatable) { var self = Container.call(this); self.cost = cost; self.onPurchase = onPurchase; self.purchased = false; self.isRepeatable = isRepeatable || false; self.baseText = text; // Background var bg = LK.getAsset('box', { width: 400, height: 80, color: 0x2E8B57, shape: 'box', anchorX: 0.5, anchorY: 0.5 }); self.addChild(bg); // Text self.buttonText = new Text2(text + ' - $' + formatNumber(cost), { size: 35, fill: 0xFFFFFF }); self.buttonText.anchor.set(0.5, 0.5); self.addChild(self.buttonText); self.down = function (x, y, obj) { if (!self.purchased && currency >= self.cost) { currency -= self.cost; if (self.isRepeatable) { self.onPurchase(); } else { self.purchased = true; self.onPurchase(); self.buttonText.setText(self.baseText + ' - PURCHASED'); bg.tint = 0x666666; } LK.getSound('purchase').play(); updateUI(); } }; self.updateAffordability = function () { if (!self.purchased) { if (currency >= self.cost) { bg.tint = 0x2E8B57; // Green - affordable } else { bg.tint = 0x8B0000; // Dark red - not affordable } } }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x1E1E1E }); /**** * Game Code ****/ // Luxury items assets // Initialize background elements var backgroundElements = new BackgroundElements(); game.addChild(backgroundElements); // Game state variables var currency = storage.currency || 0; var tapPower = storage.tapPower || 1; var totalEarned = storage.totalEarned || 0; var prestigePoints = storage.prestigePoints || 0; var tapUpgradePurchases = storage.tapUpgradePurchases || 0; var purchaseMultiplier = 1; // Generators var generators = []; var factoryGen, workerGen, machineGen; // UI elements var currencyText, tapPowerText, prestigeText; var goldCoin; var upgradeButtons = []; // Initialize main gold coin goldCoin = game.attachAsset('goldCoin', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: 700 }); // Add continuous spinning animation to the gold coin function startCoinSpin() { tween(goldCoin, { rotation: goldCoin.rotation + Math.PI * 2 }, { duration: 3000, easing: tween.linear, onFinish: function onFinish() { startCoinSpin(); // Restart the spin animation } }); } startCoinSpin(); // Coin tap effect goldCoin.down = function (x, y, obj) { // Add currency with prestige multiplier (50% per prestige point) var earnAmount = tapPower * (1 + prestigePoints * 0.5); currency += earnAmount; totalEarned += earnAmount; // Visual feedback tween(goldCoin, { scaleX: 1.2, scaleY: 1.2 }, { duration: 100, onFinish: function onFinish() { tween(goldCoin, { scaleX: 1, scaleY: 1 }, { duration: 100 }); } }); // Show floating text showFloatingText('+$' + formatNumber(earnAmount), goldCoin.x, goldCoin.y - 50); LK.getSound('coinTap').play(); updateUI(); saveGame(); }; // Initialize generators factoryGen = new Generator('factory', 100, 1); factoryGen.x = 300; factoryGen.y = 1400; game.addChild(factoryGen); generators.push(factoryGen); workerGen = new Generator('worker', 1000, 10); workerGen.x = 1024; workerGen.y = 1400; game.addChild(workerGen); generators.push(workerGen); machineGen = new Generator('machine', 10000, 100); machineGen.x = 1748; machineGen.y = 1400; game.addChild(machineGen); generators.push(machineGen); // Add new generator types var officeGen = new Generator('office', 100000, 1000); // Use unique office asset officeGen.x = 300; officeGen.y = 1700; game.addChild(officeGen); generators.push(officeGen); var labGen = new Generator('laboratory', 1000000, 10000); // Use unique laboratory asset labGen.x = 1024; labGen.y = 1700; game.addChild(labGen); generators.push(labGen); var hqGen = new Generator('headquarters', 10000000, 100000); // Use unique headquarters asset hqGen.x = 1748; hqGen.y = 1700; game.addChild(hqGen); generators.push(hqGen); // Load generator levels from storage factoryGen.level = storage.factoryLevel || 0; workerGen.level = storage.workerLevel || 0; machineGen.level = storage.machineLevel || 0; officeGen.level = storage.officeLevel || 0; labGen.level = storage.labLevel || 0; hqGen.level = storage.hqLevel || 0; // Update generator visuals generators.forEach(function (gen) { gen.levelText.setText('Lv.' + gen.level); gen.lastIncomeTime = Date.now(); }); // Generator purchase handlers factoryGen.down = function (x, y, obj) { var maxAffordable = getMaxAffordablePurchases(factoryGen.baseCost, factoryGen.level); var purchaseInfo = calculateMultiplePurchaseCost(factoryGen.baseCost, factoryGen.level, purchaseMultiplier, maxAffordable); if (currency >= purchaseInfo.cost && purchaseInfo.purchases > 0) { currency -= purchaseInfo.cost; for (var i = 0; i < purchaseInfo.purchases; i++) { factoryGen.upgrade(); } updateUI(); saveGame(); } }; workerGen.down = function (x, y, obj) { var maxAffordable = getMaxAffordablePurchases(workerGen.baseCost, workerGen.level); var purchaseInfo = calculateMultiplePurchaseCost(workerGen.baseCost, workerGen.level, purchaseMultiplier, maxAffordable); if (currency >= purchaseInfo.cost && purchaseInfo.purchases > 0) { currency -= purchaseInfo.cost; for (var i = 0; i < purchaseInfo.purchases; i++) { workerGen.upgrade(); } updateUI(); saveGame(); } }; machineGen.down = function (x, y, obj) { var maxAffordable = getMaxAffordablePurchases(machineGen.baseCost, machineGen.level); var purchaseInfo = calculateMultiplePurchaseCost(machineGen.baseCost, machineGen.level, purchaseMultiplier, maxAffordable); if (currency >= purchaseInfo.cost && purchaseInfo.purchases > 0) { currency -= purchaseInfo.cost; for (var i = 0; i < purchaseInfo.purchases; i++) { machineGen.upgrade(); } updateUI(); saveGame(); } }; officeGen.down = function (x, y, obj) { var maxAffordable = getMaxAffordablePurchases(officeGen.baseCost, officeGen.level); var purchaseInfo = calculateMultiplePurchaseCost(officeGen.baseCost, officeGen.level, purchaseMultiplier, maxAffordable); if (currency >= purchaseInfo.cost && purchaseInfo.purchases > 0) { currency -= purchaseInfo.cost; for (var i = 0; i < purchaseInfo.purchases; i++) { officeGen.upgrade(); } updateUI(); saveGame(); } }; labGen.down = function (x, y, obj) { var maxAffordable = getMaxAffordablePurchases(labGen.baseCost, labGen.level); var purchaseInfo = calculateMultiplePurchaseCost(labGen.baseCost, labGen.level, purchaseMultiplier, maxAffordable); if (currency >= purchaseInfo.cost && purchaseInfo.purchases > 0) { currency -= purchaseInfo.cost; for (var i = 0; i < purchaseInfo.purchases; i++) { labGen.upgrade(); } updateUI(); saveGame(); } }; hqGen.down = function (x, y, obj) { var maxAffordable = getMaxAffordablePurchases(hqGen.baseCost, hqGen.level); var purchaseInfo = calculateMultiplePurchaseCost(hqGen.baseCost, hqGen.level, purchaseMultiplier, maxAffordable); if (currency >= purchaseInfo.cost && purchaseInfo.purchases > 0) { currency -= purchaseInfo.cost; for (var i = 0; i < purchaseInfo.purchases; i++) { hqGen.upgrade(); } updateUI(); saveGame(); } }; // UI Setup currencyText = new Text2('$0', { size: 80, fill: 0xFFD700 }); currencyText.anchor.set(0.5, 0); LK.gui.top.addChild(currencyText); currencyText.y = 50; tapPowerText = new Text2('Tap Power: $1', { size: 50, fill: 0xFFFFFF }); tapPowerText.anchor.set(0, 0); tapPowerText.x = 50; tapPowerText.y = 200; game.addChild(tapPowerText); prestigeText = new Text2('Prestige Points: 0', { size: 40, fill: 0xFF69B4 }); prestigeText.anchor.set(1, 0); prestigeText.x = 1998; prestigeText.y = 200; game.addChild(prestigeText); // Passive income display var passiveIncomeText = new Text2('Passive Income: $0/s', { size: 45, fill: 0x90EE90 }); passiveIncomeText.anchor.set(0.5, 0); passiveIncomeText.x = 1024; passiveIncomeText.y = 200; game.addChild(passiveIncomeText); // Auto tap rate display var autoTapRateText = new Text2('Auto Taps: 0/s', { size: 45, fill: 0x87CEEB }); autoTapRateText.anchor.set(0.5, 0); autoTapRateText.x = 1024; autoTapRateText.y = 300; game.addChild(autoTapRateText); // Multiplier selection buttons var multiplierContainer = new MultiplierButtons(); multiplierContainer.x = 1024; multiplierContainer.y = 1100; game.addChild(multiplierContainer); var multiplierButtons = multiplierContainer.multiplierButtons; // Generator info texts var factoryInfoText = new Text2('Factory\nCost: $100\nIncome: $1/s', { size: 35, fill: 0xFFFFFF }); factoryInfoText.anchor.set(0.5, 1); factoryInfoText.x = 300; factoryInfoText.y = 1320; game.addChild(factoryInfoText); var workerInfoText = new Text2('Worker\nCost: $1K\nIncome: $10/s', { size: 35, fill: 0xFFFFFF }); workerInfoText.anchor.set(0.5, 1); workerInfoText.x = 1024; workerInfoText.y = 1320; game.addChild(workerInfoText); var machineInfoText = new Text2('Machine\nCost: $10K\nIncome: $100/s', { size: 35, fill: 0xFFFFFF }); machineInfoText.anchor.set(0.5, 1); machineInfoText.x = 1748; machineInfoText.y = 1320; game.addChild(machineInfoText); var officeInfoText = new Text2('Office\nCost: $100K\nIncome: $1K/s', { size: 35, fill: 0xFFFFFF }); officeInfoText.anchor.set(0.5, 1); officeInfoText.x = 300; officeInfoText.y = 1620; game.addChild(officeInfoText); var labInfoText = new Text2('Laboratory\nCost: $1M\nIncome: $10K/s', { size: 35, fill: 0xFFFFFF }); labInfoText.anchor.set(0.5, 1); labInfoText.x = 1024; labInfoText.y = 1620; game.addChild(labInfoText); var hqInfoText = new Text2('Headquarters\nCost: $10M\nIncome: $100K/s', { size: 35, fill: 0xFFFFFF }); hqInfoText.anchor.set(0.5, 1); hqInfoText.x = 1748; hqInfoText.y = 1620; game.addChild(hqInfoText); // Upgrade buttons function getTapUpgradeCost() { return 500 * Math.pow(1.9, tapUpgradePurchases); } var tapUpgradeBtn = new UpgradeButton('2x Tap Power', getTapUpgradeCost(), function () { tapPower *= 2; tapUpgradePurchases++; // Update button cost and text for next purchase tapUpgradeBtn.cost = getTapUpgradeCost(); tapUpgradeBtn.buttonText.setText('2x Tap Power - $' + formatNumber(tapUpgradeBtn.cost)); var bg = tapUpgradeBtn.children[0]; bg.tint = 0x2E8B57; updateUI(); saveGame(); }, true); tapUpgradeBtn.x = 1024; tapUpgradeBtn.y = 1950; game.addChild(tapUpgradeBtn); upgradeButtons.push(tapUpgradeBtn); // Auto tap upgrade tracking var autoTapUpgradePurchases = storage.autoTapUpgradePurchases || 0; var autoTapRate = storage.autoTapRate || 0; function getAutoTapUpgradeCost() { return 2000 * Math.pow(3, autoTapUpgradePurchases); } var autoTapBtn = new UpgradeButton('Auto Tap (+1/s)', getAutoTapUpgradeCost(), function () { autoTapEnabled = true; autoTapRate++; autoTapUpgradePurchases++; // Update button cost and text for next purchase autoTapBtn.cost = getAutoTapUpgradeCost(); autoTapBtn.buttonText.setText('Auto Tap (+1/s) - $' + formatNumber(autoTapBtn.cost)); var bg = autoTapBtn.children[0]; bg.tint = 0x2E8B57; updateUI(); saveGame(); }, true); autoTapBtn.x = 1024; autoTapBtn.y = 2070; game.addChild(autoTapBtn); upgradeButtons.push(autoTapBtn); // Global multiplier upgrades var globalMultiplierUpgrades = storage.globalMultiplierUpgrades || 0; function getGlobalMultiplierCost() { return 50000 * Math.pow(5, globalMultiplierUpgrades); } // Efficiency upgrades var efficiencyUpgrades = storage.efficiencyUpgrades || 0; function getEfficiencyUpgradeCost() { return 25000 * Math.pow(4, efficiencyUpgrades); } // Prestige button var prestigeBtn = new UpgradeButton('PRESTIGE (+1 PP)', 1000000, function () { prestige(); }); prestigeBtn.x = 1024; prestigeBtn.y = 2220; game.addChild(prestigeBtn); // Auto tap var autoTapEnabled = storage.autoTapEnabled || false; var autoTapTimer = 0; // Floating text system var floatingTexts = []; function showFloatingText(text, x, y) { var floatingText = new Text2(text, { size: 60, fill: 0xFFD700, stroke: 0x000000, strokeThickness: 4 }); floatingText.anchor.set(0.5, 0.5); floatingText.x = x; floatingText.y = y; floatingText.alpha = 1; game.addChild(floatingText); floatingTexts.push(floatingText); tween(floatingText, { y: y - 100, alpha: 0 }, { duration: 1500, onFinish: function onFinish() { floatingText.destroy(); var index = floatingTexts.indexOf(floatingText); if (index > -1) { floatingTexts.splice(index, 1); } } }); } function calculateMultiplePurchaseCost(baseCost, currentLevel, multiplier, maxAffordable) { if (multiplier === 'All') { var totalCost = 0; var level = currentLevel; var purchases = 0; while (totalCost + Math.floor(baseCost * Math.pow(1.15, level)) <= currency && purchases < maxAffordable) { totalCost += Math.floor(baseCost * Math.pow(1.15, level)); level++; purchases++; } return { cost: totalCost, purchases: purchases }; } else { var totalCost = 0; var actualPurchases = Math.min(multiplier, maxAffordable); for (var i = 0; i < actualPurchases; i++) { totalCost += Math.floor(baseCost * Math.pow(1.15, currentLevel + i)); } return { cost: totalCost, purchases: actualPurchases }; } } function getMaxAffordablePurchases(baseCost, currentLevel) { var totalCost = 0; var level = currentLevel; var purchases = 0; while (totalCost + Math.floor(baseCost * Math.pow(1.15, level)) <= currency) { totalCost += Math.floor(baseCost * Math.pow(1.15, level)); level++; purchases++; if (purchases >= 1000) break; // Prevent infinite loops } return purchases; } function formatNumber(num) { if (num >= 1000000000) { return (num / 1000000000).toFixed(1) + 'B'; } else if (num >= 1000000) { return (num / 1000000).toFixed(1) + 'M'; } else if (num >= 1000) { return (num / 1000).toFixed(1) + 'K'; } return Math.floor(num).toString(); } function updateUI() { currencyText.setText('$' + formatNumber(currency)); tapPowerText.setText('Tap Power: $' + formatNumber(tapPower)); prestigeText.setText('Prestige Points: ' + prestigePoints); // Calculate total passive income from all generators var totalPassiveIncome = 0; generators.forEach(function (gen) { totalPassiveIncome += gen.getIncome(); }); passiveIncomeText.setText('Passive Income: $' + formatNumber(totalPassiveIncome) + '/s'); autoTapRateText.setText('Auto Taps: ' + (autoTapRate || 0) + '/s'); // Update generator info with multiplier costs var factoryMaxAffordable = getMaxAffordablePurchases(factoryGen.baseCost, factoryGen.level); var factoryPurchaseInfo = calculateMultiplePurchaseCost(factoryGen.baseCost, factoryGen.level, purchaseMultiplier, factoryMaxAffordable); factoryInfoText.setText('Factory (Lv.' + factoryGen.level + ')\nCost: $' + formatNumber(factoryPurchaseInfo.cost) + ' (' + factoryPurchaseInfo.purchases + 'x)\nIncome: $' + formatNumber(factoryGen.getIncome()) + '/s'); factoryInfoText.tint = currency >= factoryPurchaseInfo.cost && factoryPurchaseInfo.purchases > 0 ? 0xFFFFFF : 0xFF6B6B; var workerMaxAffordable = getMaxAffordablePurchases(workerGen.baseCost, workerGen.level); var workerPurchaseInfo = calculateMultiplePurchaseCost(workerGen.baseCost, workerGen.level, purchaseMultiplier, workerMaxAffordable); workerInfoText.setText('Worker (Lv.' + workerGen.level + ')\nCost: $' + formatNumber(workerPurchaseInfo.cost) + ' (' + workerPurchaseInfo.purchases + 'x)\nIncome: $' + formatNumber(workerGen.getIncome()) + '/s'); workerInfoText.tint = currency >= workerPurchaseInfo.cost && workerPurchaseInfo.purchases > 0 ? 0xFFFFFF : 0xFF6B6B; var machineMaxAffordable = getMaxAffordablePurchases(machineGen.baseCost, machineGen.level); var machinePurchaseInfo = calculateMultiplePurchaseCost(machineGen.baseCost, machineGen.level, purchaseMultiplier, machineMaxAffordable); machineInfoText.setText('Machine (Lv.' + machineGen.level + ')\nCost: $' + formatNumber(machinePurchaseInfo.cost) + ' (' + machinePurchaseInfo.purchases + 'x)\nIncome: $' + formatNumber(machineGen.getIncome()) + '/s'); machineInfoText.tint = currency >= machinePurchaseInfo.cost && machinePurchaseInfo.purchases > 0 ? 0xFFFFFF : 0xFF6B6B; var officeMaxAffordable = getMaxAffordablePurchases(officeGen.baseCost, officeGen.level); var officePurchaseInfo = calculateMultiplePurchaseCost(officeGen.baseCost, officeGen.level, purchaseMultiplier, officeMaxAffordable); officeInfoText.setText('Office (Lv.' + officeGen.level + ')\nCost: $' + formatNumber(officePurchaseInfo.cost) + ' (' + officePurchaseInfo.purchases + 'x)\nIncome: $' + formatNumber(officeGen.getIncome()) + '/s'); officeInfoText.tint = currency >= officePurchaseInfo.cost && officePurchaseInfo.purchases > 0 ? 0xFFFFFF : 0xFF6B6B; var labMaxAffordable = getMaxAffordablePurchases(labGen.baseCost, labGen.level); var labPurchaseInfo = calculateMultiplePurchaseCost(labGen.baseCost, labGen.level, purchaseMultiplier, labMaxAffordable); labInfoText.setText('Laboratory (Lv.' + labGen.level + ')\nCost: $' + formatNumber(labPurchaseInfo.cost) + ' (' + labPurchaseInfo.purchases + 'x)\nIncome: $' + formatNumber(labGen.getIncome()) + '/s'); labInfoText.tint = currency >= labPurchaseInfo.cost && labPurchaseInfo.purchases > 0 ? 0xFFFFFF : 0xFF6B6B; var hqMaxAffordable = getMaxAffordablePurchases(hqGen.baseCost, hqGen.level); var hqPurchaseInfo = calculateMultiplePurchaseCost(hqGen.baseCost, hqGen.level, purchaseMultiplier, hqMaxAffordable); hqInfoText.setText('Headquarters (Lv.' + hqGen.level + ')\nCost: $' + formatNumber(hqPurchaseInfo.cost) + ' (' + hqPurchaseInfo.purchases + 'x)\nIncome: $' + formatNumber(hqGen.getIncome()) + '/s'); hqInfoText.tint = currency >= hqPurchaseInfo.cost && hqPurchaseInfo.purchases > 0 ? 0xFFFFFF : 0xFF6B6B; // Update upgrade button affordability upgradeButtons.forEach(function (btn) { btn.updateAffordability(); }); // Update prestige button if (totalEarned >= 1000000) { prestigeBtn.updateAffordability(); } } function saveGame() { storage.currency = currency; storage.tapPower = tapPower; storage.totalEarned = totalEarned; storage.prestigePoints = prestigePoints; storage.factoryLevel = factoryGen.level; storage.workerLevel = workerGen.level; storage.machineLevel = machineGen.level; storage.officeLevel = officeGen.level; storage.labLevel = labGen.level; storage.hqLevel = hqGen.level; storage.autoTapEnabled = autoTapEnabled; storage.tapUpgradePurchases = tapUpgradePurchases; storage.autoTapUpgradePurchases = autoTapUpgradePurchases; storage.autoTapRate = autoTapRate; storage.globalMultiplierUpgrades = globalMultiplierUpgrades; storage.efficiencyUpgrades = efficiencyUpgrades; saveLuxuryItems(); } function prestige() { if (totalEarned >= 1000000) { prestigePoints++; currency = 0; tapPower = 1; totalEarned = 0; tapUpgradePurchases = 0; autoTapUpgradePurchases = 0; autoTapRate = 0; globalMultiplierUpgrades = 0; efficiencyUpgrades = 0; // Reset generators generators.forEach(function (gen) { gen.level = 0; gen.levelText.setText('Lv.0'); }); // Reset upgrades upgradeButtons.forEach(function (btn) { btn.purchased = false; if (btn === tapUpgradeBtn) { btn.cost = getTapUpgradeCost(); btn.buttonText.setText('2x Tap Power - $' + formatNumber(btn.cost)); } else if (btn === autoTapBtn) { btn.cost = getAutoTapUpgradeCost(); btn.buttonText.setText('Auto Tap (+1/s) - $' + formatNumber(btn.cost)); } else if (!btn.isRepeatable) { btn.buttonText.setText(btn.baseText + ' - $' + formatNumber(btn.cost)); } }); autoTapEnabled = false; updateUI(); saveGame(); showFloatingText('PRESTIGE! +1 PP', 1024, 1366); } } // Handle offline earnings var lastSaveTime = storage.lastSaveTime || Date.now(); var offlineTime = (Date.now() - lastSaveTime) / 1000; // seconds if (offlineTime > 60) { // Only if offline for more than 1 minute var offlineEarnings = 0; generators.forEach(function (gen) { offlineEarnings += gen.getIncome() * Math.min(offlineTime, 3600); // Cap at 1 hour }); if (offlineEarnings > 0) { currency += offlineEarnings; totalEarned += offlineEarnings; showFloatingText('Offline Earnings: +$' + formatNumber(offlineEarnings), 1024, 600); } } // Add click handler for instant coin calculation game.down = function (x, y, obj) { // Check if click is in the right side of screen, under prestige text if (x > 1500 && y > 250 && y < 800) { // Calculate total coins earned instantly var instantEarnings = totalEarned; showFloatingText('Total Earned: $' + formatNumber(instantEarnings), x, y); } }; // Create luxury tab var luxuryTab = new LuxuryTab(); luxuryTab.initializeLuxuryItems(); luxuryTab.loadOwnedItems(); game.addChild(luxuryTab); // Create luxury tab button var luxuryTabButton = LK.getAsset('box', { width: 200, height: 80, color: 0xFFD700, shape: 'box', anchorX: 0.5, anchorY: 0.5 }); luxuryTabButton.x = 200; luxuryTabButton.y = 280; game.addChild(luxuryTabButton); var luxuryButtonText = new Text2('LUXURY', { size: 50, fill: 0x000000 }); luxuryButtonText.anchor.set(0.5, 0.5); luxuryButtonText.x = 200; luxuryButtonText.y = 280; game.addChild(luxuryButtonText); luxuryTabButton.down = function (x, y, obj) { luxuryTab.visible = true; }; // Save luxury items function function saveLuxuryItems() { var ownedItems = {}; for (var i = 0; i < luxuryTab.luxuryItems.length; i++) { var item = luxuryTab.luxuryItems[i]; if (item.owned) { ownedItems[item.name] = true; } } storage.ownedLuxuryItems = ownedItems; } // Initial UI update updateUI(); // Game loop game.update = function () { // Generate passive income generators.forEach(function (gen) { var income = gen.generateIncome(); if (income > 0) { // Apply global multipliers and efficiency bonuses var globalMultiplier = Math.pow(2, globalMultiplierUpgrades); var efficiencyMultiplier = 1 + efficiencyUpgrades * 0.25; var prestigeMultiplier = 1 + prestigePoints * 0.1; var finalIncome = income * globalMultiplier * efficiencyMultiplier * prestigeMultiplier; currency += finalIncome; totalEarned += finalIncome; } }); // Auto tap if (autoTapEnabled && autoTapRate > 0) { autoTapTimer++; if (autoTapTimer >= Math.floor(60 / autoTapRate)) { // Frequency based on auto tap rate var earnAmount = tapPower * (1 + prestigePoints * 0.5); currency += earnAmount; totalEarned += earnAmount; autoTapTimer = 0; } } // Update UI every 30 frames (twice per second) if (LK.ticks % 30 === 0) { updateUI(); } // Save game every 5 seconds if (LK.ticks % 300 === 0) { storage.lastSaveTime = Date.now(); saveGame(); } };
===================================================================
--- original.js
+++ change.js
@@ -935,9 +935,9 @@
luxuryTabButton.x = 200;
luxuryTabButton.y = 280;
game.addChild(luxuryTabButton);
var luxuryButtonText = new Text2('LUXURY', {
- size: 35,
+ size: 50,
fill: 0x000000
});
luxuryButtonText.anchor.set(0.5, 0.5);
luxuryButtonText.x = 200;
Coin. In-Game asset. 2d. High contrast. No shadows
Factory. In-Game asset. 2d. High contrast. No shadows
Worker. In-Game asset. 2d. High contrast. No shadows
Machine. In-Game asset. 2d. High contrast. No shadows
Headquarters. In-Game asset. 2d. High contrast. No shadows
Laboratuvar. In-Game asset. 2d. High contrast. No shadows
Ofis. In-Game asset. 2d. High contrast. No shadows
Luxury car. In-Game asset. 2d. High contrast. No shadows