User prompt
Auto clicker 5. Upgraded 50000 para aldın zaman artık her 0.5 saniyede tıklasın 6. Upraded sonunda upgraded fiyatı 125000 0.4 saniyede tıklasın
User prompt
Auto clicker satın aldın zaman auto clicker yanında hemen auto clicker upgraded yazsın 1000 para istesin aldın zaman artık 1 saniye yenirene 0.9 saniyede hızla tıklasın 2. Upgred 2000 para aldın zaman tıklama suresi 0.8 olsun 3. Upgraded fiyat 5000 0.7 saniyede tıklasın 10000 puana artık 0.6 saniyede tıklasın ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
1K ulaşınca yani 1bine UpgRaded Altındaki auto clicker alalım her 1 saniyede bir kendisi otomatik tıklayınca satın aldık zaman
User prompt
1K 1M 1B 1T ulas tı zaman mesela 1100 oldu zaman Score 1.1K olsun böyle nokta koya bilsin milyonda milyarda trlionda bunlarda nokta koysun
User prompt
1000 ulaşınca Score 1K yazsın 1 Milyona ulaştı zaman 1M yazsın 1 milyara ulaştı zaman 1B yasasın 1 Triliona Ulaştı Zaman 1T yassın
User prompt
Ortadan Topu kaldır upgraded sol üste taşı Arka plan siyah olsun ekrana her tıklayınca şok dalgasını oluşsun ↪💡 Consider importing and using the following plugins: @upit/tween.v1
Code edit (1 edits merged)
Please save this source code
User prompt
Tap Upgrade Master
Initial prompt
Click games ekrana her tıkladımız zaman usteki Score yazısı 1 rer 1rer artsın uste solda updraded olsun her satın altında bir onceki fiyatın 1.5 katını istesin noktadan sonrasını göstermesin satın altında 2 şer 2 şer gelsin bidaha satın aldın zaman 3 şer 3 şer gelsin her satın altında böyle gitsin satın alma fiyatı 50 Score
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); var storage = LK.import("@upit/storage.v1", { score: 0, tapValue: 1, upgradeLevel: 1, upgradeCost: 10, hasAutoClicker: false }); /**** * Classes ****/ var AutoClickerButton = Container.expand(function () { var self = Container.call(this); var buttonGraphic = self.attachAsset('upgradeButton', { anchorX: 0.5, anchorY: 0.5, tint: 0xff9500 }); self.text = new Text2('Auto Clicker: 1000', { size: 60, fill: 0xFFFFFF }); self.text.anchor.set(0.5, 0.5); self.addChild(self.text); self.active = false; self.timer = null; self.updateText = function (cost) { if (self.active) { self.text.setText('Auto Clicker: Active'); } else { self.text.setText('Auto Clicker: ' + cost); } }; self.down = function () { tween(buttonGraphic, { scaleX: 0.95, scaleY: 0.95 }, { duration: 100, easing: tween.easeOut }); }; self.up = function () { tween(buttonGraphic, { scaleX: 1, scaleY: 1 }, { duration: 100, easing: tween.easeOut }); attemptBuyAutoClicker(); }; self.disable = function () { buttonGraphic.alpha = 0.5; }; self.enable = function () { buttonGraphic.alpha = 1; }; self.activate = function () { self.active = true; buttonGraphic.tint = 0x00c853; self.updateText(); // Start auto clicking if (!self.timer) { self.timer = LK.setInterval(function () { // Simulate a tap at a random position var randomX = Math.random() * 2048; var randomY = Math.random() * 2732; // Add points score += tapValue; storage.score = score; updateScoreDisplay(); // Create effects var shockWave = new ShockWave(); game.addChild(shockWave); shockWave.animate(randomX, randomY); createTapEffect(randomX, randomY); LK.getSound('tap').play(); }, 1000); } }; return self; }); var Coin = Container.expand(function () { var self = Container.call(this); var coinGraphic = self.attachAsset('coin', { anchorX: 0.5, anchorY: 0.5 }); // Pulse animation when active self.pulse = function () { // Stop any existing animation tween.stop(coinGraphic, { scaleX: true, scaleY: true }); // Scale up tween(coinGraphic, { scaleX: 1.2, scaleY: 1.2 }, { duration: 100, easing: tween.easeOut, onFinish: function onFinish() { // Scale back down tween(coinGraphic, { scaleX: 1, scaleY: 1 }, { duration: 200, easing: tween.elasticOut }); } }); }; return self; }); var ShockWave = Container.expand(function () { var self = Container.call(this); // Create the shock wave circle var waveGraphic = self.attachAsset('tapEffect', { anchorX: 0.5, anchorY: 0.5, alpha: 0.7 }); // Animation method for the shock wave self.animate = function (x, y) { // Set position self.x = x; self.y = y; // Start with small scale and high opacity waveGraphic.scaleX = 0.1; waveGraphic.scaleY = 0.1; waveGraphic.alpha = 0.8; // First expand the wave quickly tween(waveGraphic, { scaleX: 3, scaleY: 3, alpha: 0.6 }, { duration: 300, easing: tween.easeOut, onFinish: function onFinish() { // Then continue expanding and fade out tween(waveGraphic, { scaleX: 8, scaleY: 8, alpha: 0 }, { duration: 500, easing: tween.easeOut, onFinish: function onFinish() { // Remove when done if (self.parent) { self.parent.removeChild(self); } } }); } }); }; return self; }); var TapEffect = Container.expand(function () { var self = Container.call(this); var effectGraphic = self.attachAsset('tapEffect', { anchorX: 0.5, anchorY: 0.5, alpha: 0.7 }); self.animate = function (x, y, pointsEarned) { self.x = x; self.y = y; self.alpha = 1; effectGraphic.scaleX = 0.5; effectGraphic.scaleY = 0.5; // Create points text var pointsText = new Text2("+" + pointsEarned, { size: 60, fill: 0xFFFFFF }); pointsText.anchor.set(0.5, 0.5); self.addChild(pointsText); // Animate effect tween(effectGraphic, { scaleX: 1.5, scaleY: 1.5, alpha: 0 }, { duration: 500, easing: tween.easeOut }); // Animate text floating up tween(pointsText, { y: -100, alpha: 0 }, { duration: 800, easing: tween.easeOut, onFinish: function onFinish() { self.removeChild(pointsText); pointsText = null; } }); }; return self; }); var UpgradeButton = Container.expand(function () { var self = Container.call(this); var buttonGraphic = self.attachAsset('upgradeButton', { anchorX: 0.5, anchorY: 0.5 }); self.text = new Text2('Upgrade: 10 points', { size: 60, fill: 0xFFFFFF }); self.text.anchor.set(0.5, 0.5); self.addChild(self.text); self.updateText = function (cost) { self.text.setText('Upgrade: ' + cost + ' points'); }; self.down = function () { tween(buttonGraphic, { scaleX: 0.95, scaleY: 0.95 }, { duration: 100, easing: tween.easeOut }); }; self.up = function () { tween(buttonGraphic, { scaleX: 1, scaleY: 1 }, { duration: 100, easing: tween.easeOut }); attemptUpgrade(); }; self.disable = function () { buttonGraphic.alpha = 0.5; }; self.enable = function () { buttonGraphic.alpha = 1; }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x000000 }); /**** * Game Code ****/ // Game variables var score = storage.score || 0; var tapValue = storage.tapValue || 1; var upgradeLevel = storage.upgradeLevel || 1; var upgradeCost = storage.upgradeCost || 10; var hasAutoClicker = storage.hasAutoClicker || false; var autoClickerCost = 1000; var effects = []; // Create upgrade button in top left (but not too close to the corner) var upgradeButton = new UpgradeButton(); upgradeButton.x = 400; upgradeButton.y = 150; upgradeButton.updateText(upgradeCost); game.addChild(upgradeButton); // Create auto clicker button below the upgrade button var autoClickerButton = new AutoClickerButton(); autoClickerButton.x = 400; autoClickerButton.y = 320; autoClickerButton.updateText(autoClickerCost); game.addChild(autoClickerButton); // If player already has auto clicker, activate it if (hasAutoClicker) { autoClickerButton.activate(); } // Function to check if auto clicker should be visible function updateAutoClickerVisibility() { if (score >= 1000 || hasAutoClicker) { autoClickerButton.visible = true; } else { autoClickerButton.visible = false; } } // Create score display var scoreText = new Text2('Points: 0', { size: 100, fill: 0xFFFFFF }); scoreText.anchor.set(0.5, 0); LK.gui.top.addChild(scoreText); // Create tap value display var tapValueText = new Text2('Points per tap: 1', { size: 60, fill: 0xFFFFFF }); tapValueText.anchor.set(0.5, 0); tapValueText.y = 120; LK.gui.top.addChild(tapValueText); // Format large numbers with K, M, B, T suffixes function formatScore(num) { if (num >= 1000000000000) { // Trillion var t = num / 1000000000000; return (Math.floor(t * 10) / 10).toFixed(1).replace(/\.0$/, '') + 'T'; } else if (num >= 1000000000) { // Billion var b = num / 1000000000; return (Math.floor(b * 10) / 10).toFixed(1).replace(/\.0$/, '') + 'B'; } else if (num >= 1000000) { // Million var m = num / 1000000; return (Math.floor(m * 10) / 10).toFixed(1).replace(/\.0$/, '') + 'M'; } else if (num >= 1000) { // Thousand var k = num / 1000; return (Math.floor(k * 10) / 10).toFixed(1).replace(/\.0$/, '') + 'K'; } else { return num.toString(); } } // Update score display function updateScoreDisplay() { scoreText.setText('Points: ' + formatScore(score)); tapValueText.setText('Points per tap: ' + tapValue); // Check if player can afford upgrade if (score >= upgradeCost) { upgradeButton.enable(); } else { upgradeButton.disable(); } // Check if auto clicker should be visible updateAutoClickerVisibility(); // Enable/disable auto clicker button based on score if (!hasAutoClicker) { if (score >= autoClickerCost) { autoClickerButton.enable(); } else { autoClickerButton.disable(); } } } // Attempt to purchase an upgrade function attemptUpgrade() { if (score >= upgradeCost) { // Deduct points score -= upgradeCost; // Increase tap value upgradeLevel++; tapValue = upgradeLevel; // Calculate new upgrade cost (increase by 50%) upgradeCost = Math.floor(upgradeCost * 1.5); // Update button text upgradeButton.updateText(upgradeCost); // Save progress storage.score = score; storage.tapValue = tapValue; storage.upgradeLevel = upgradeLevel; storage.upgradeCost = upgradeCost; // Update display updateScoreDisplay(); // Play upgrade sound LK.getSound('upgrade').play(); } } // Attempt to purchase auto clicker function attemptBuyAutoClicker() { if (!hasAutoClicker && score >= autoClickerCost) { // Deduct points score -= autoClickerCost; // Activate auto clicker hasAutoClicker = true; storage.hasAutoClicker = true; storage.score = score; // Update display updateScoreDisplay(); // Activate auto clicker functionality autoClickerButton.activate(); // Play upgrade sound LK.getSound('upgrade').play(); } } // Create tap effect function createTapEffect(x, y) { var effect = new TapEffect(); game.addChild(effect); effect.animate(x, y, tapValue); // Remove effect after animation LK.setTimeout(function () { if (effect.parent) { game.removeChild(effect); } }, 1000); } // Handle tapping on the game game.down = function (x, y) { // Add points score += tapValue; // Save progress storage.score = score; // Update display updateScoreDisplay(); // Create shock wave effect var shockWave = new ShockWave(); game.addChild(shockWave); shockWave.animate(x, y); // Create visual effect for points createTapEffect(x, y); // Play tap sound LK.getSound('tap').play(); }; // Initial setup updateScoreDisplay(); // Play background music LK.playMusic('bgmusic', { fade: { start: 0, end: 0.3, duration: 1000 } });
===================================================================
--- original.js
+++ change.js
@@ -5,14 +5,87 @@
var storage = LK.import("@upit/storage.v1", {
score: 0,
tapValue: 1,
upgradeLevel: 1,
- upgradeCost: 10
+ upgradeCost: 10,
+ hasAutoClicker: false
});
/****
* Classes
****/
+var AutoClickerButton = Container.expand(function () {
+ var self = Container.call(this);
+ var buttonGraphic = self.attachAsset('upgradeButton', {
+ anchorX: 0.5,
+ anchorY: 0.5,
+ tint: 0xff9500
+ });
+ self.text = new Text2('Auto Clicker: 1000', {
+ size: 60,
+ fill: 0xFFFFFF
+ });
+ self.text.anchor.set(0.5, 0.5);
+ self.addChild(self.text);
+ self.active = false;
+ self.timer = null;
+ self.updateText = function (cost) {
+ if (self.active) {
+ self.text.setText('Auto Clicker: Active');
+ } else {
+ self.text.setText('Auto Clicker: ' + cost);
+ }
+ };
+ self.down = function () {
+ tween(buttonGraphic, {
+ scaleX: 0.95,
+ scaleY: 0.95
+ }, {
+ duration: 100,
+ easing: tween.easeOut
+ });
+ };
+ self.up = function () {
+ tween(buttonGraphic, {
+ scaleX: 1,
+ scaleY: 1
+ }, {
+ duration: 100,
+ easing: tween.easeOut
+ });
+ attemptBuyAutoClicker();
+ };
+ self.disable = function () {
+ buttonGraphic.alpha = 0.5;
+ };
+ self.enable = function () {
+ buttonGraphic.alpha = 1;
+ };
+ self.activate = function () {
+ self.active = true;
+ buttonGraphic.tint = 0x00c853;
+ self.updateText();
+ // Start auto clicking
+ if (!self.timer) {
+ self.timer = LK.setInterval(function () {
+ // Simulate a tap at a random position
+ var randomX = Math.random() * 2048;
+ var randomY = Math.random() * 2732;
+ // Add points
+ score += tapValue;
+ storage.score = score;
+ updateScoreDisplay();
+ // Create effects
+ var shockWave = new ShockWave();
+ game.addChild(shockWave);
+ shockWave.animate(randomX, randomY);
+ createTapEffect(randomX, randomY);
+ LK.getSound('tap').play();
+ }, 1000);
+ }
+ };
+ return self;
+});
var Coin = Container.expand(function () {
var self = Container.call(this);
var coinGraphic = self.attachAsset('coin', {
anchorX: 0.5,
@@ -193,15 +266,35 @@
var score = storage.score || 0;
var tapValue = storage.tapValue || 1;
var upgradeLevel = storage.upgradeLevel || 1;
var upgradeCost = storage.upgradeCost || 10;
+var hasAutoClicker = storage.hasAutoClicker || false;
+var autoClickerCost = 1000;
var effects = [];
// Create upgrade button in top left (but not too close to the corner)
var upgradeButton = new UpgradeButton();
upgradeButton.x = 400;
upgradeButton.y = 150;
upgradeButton.updateText(upgradeCost);
game.addChild(upgradeButton);
+// Create auto clicker button below the upgrade button
+var autoClickerButton = new AutoClickerButton();
+autoClickerButton.x = 400;
+autoClickerButton.y = 320;
+autoClickerButton.updateText(autoClickerCost);
+game.addChild(autoClickerButton);
+// If player already has auto clicker, activate it
+if (hasAutoClicker) {
+ autoClickerButton.activate();
+}
+// Function to check if auto clicker should be visible
+function updateAutoClickerVisibility() {
+ if (score >= 1000 || hasAutoClicker) {
+ autoClickerButton.visible = true;
+ } else {
+ autoClickerButton.visible = false;
+ }
+}
// Create score display
var scoreText = new Text2('Points: 0', {
size: 100,
fill: 0xFFFFFF
@@ -247,8 +340,18 @@
upgradeButton.enable();
} else {
upgradeButton.disable();
}
+ // Check if auto clicker should be visible
+ updateAutoClickerVisibility();
+ // Enable/disable auto clicker button based on score
+ if (!hasAutoClicker) {
+ if (score >= autoClickerCost) {
+ autoClickerButton.enable();
+ } else {
+ autoClickerButton.disable();
+ }
+ }
}
// Attempt to purchase an upgrade
function attemptUpgrade() {
if (score >= upgradeCost) {
@@ -271,8 +374,25 @@
// Play upgrade sound
LK.getSound('upgrade').play();
}
}
+// Attempt to purchase auto clicker
+function attemptBuyAutoClicker() {
+ if (!hasAutoClicker && score >= autoClickerCost) {
+ // Deduct points
+ score -= autoClickerCost;
+ // Activate auto clicker
+ hasAutoClicker = true;
+ storage.hasAutoClicker = true;
+ storage.score = score;
+ // Update display
+ updateScoreDisplay();
+ // Activate auto clicker functionality
+ autoClickerButton.activate();
+ // Play upgrade sound
+ LK.getSound('upgrade').play();
+ }
+}
// Create tap effect
function createTapEffect(x, y) {
var effect = new TapEffect();
game.addChild(effect);