User prompt
vayabi560.com yazısını 100px aşağı taşı
User prompt
Multiplier altına, bolt font ile vayabi560.com yaz
User prompt
Üsteki multiplier textinin arkasına bacground için asetlere multiplier bacground ekle
User prompt
Cashout butonunun altındaki Possible win yazısının rengini beyaz yap ve 2 katı büyüt.
User prompt
Play, Min, Max, Cashout, %25, %50, %75, textlerin boyutunu 2 katı artır.
User prompt
Betbutton ve playbutton görselini ayır. Playbutton için yeni asset ekle
User prompt
✅ 📱 Mobil Uyuma Göre Güncellenmiş Buton Kodu // Sabit değerler yerine ekran genişliğine göre hesapla const screenW = LK.width; const screenH = LK.height; const buttonSize = 160; const buttonSpacing = 30; const buttonScale = 1.0; const bottomY = screenH - 160; // Butonlar için ortak stil fonksiyonu function createButton(label, x, callback) { const btn = game.attachAsset('betButton', { anchorX: 0.5, anchorY: 0.5, x: x, y: bottomY, scaleX: buttonScale, scaleY: buttonScale }); const btnText = new Text2(label, { size: 36, fill: 0xffffff, font: "'Arial Black', 'Helvetica-Bold', sans-serif" }); btnText.anchor.set(0.5, 0.5); btnText.x = x; btnText.y = bottomY; game.addChild(btnText); btn.down = callback; return btn; } // Buton pozisyonlarını hesapla const baseX = screenW / 2; const positions = [ baseX - 3 * (buttonSize + buttonSpacing), // - baseX - 2 * (buttonSize + buttonSpacing), // + baseX - 1 * (buttonSize + buttonSpacing), // MIN baseX, // MAX baseX + 1 * (buttonSize + buttonSpacing), // 25% baseX + 2 * (buttonSize + buttonSpacing), // 50% baseX + 3 * (buttonSize + buttonSpacing) // 75% ]; // Yeni butonları tanımla const minusButton = createButton('-', positions[0], () => { betAmount = Math.max(1, betAmount - 1); updateBetAmount(); }); const plusButton = createButton('+', positions[1], () => { betAmount = Math.min(playerBalance, betAmount + 1); updateBetAmount(); }); const minButton = createButton('MIN', positions[2], () => { betAmount = 1; updateBetAmount(); }); const maxButton = createButton('MAX', positions[3], () => { betAmount = Math.floor(playerBalance); updateBetAmount(); }); const percent25Button = createButton('25%', positions[4], () => { betAmount = Math.floor(playerBalance * 0.25); updateBetAmount(); }); const percent50Button = createButton('50%', positions[5], () => { betAmount = Math.floor(playerBalance * 0.5); updateBetAmount(); }); const percent75Button = createButton('75%', positions[6], () => { betAmount = Math.floor(playerBalance * 0.75); updateBetAmount(); }); 2. 🟢 PLAY ve CASH OUT Butonlarını Yeniden Yerleştir // PLAY butonu betButton.x = screenW / 2 - 200; betButton.y = bottomY - 180; betButton.scaleX = 1.0; betButton.scaleY = 1.0; betButtonText.x = betButton.x; betButtonText.y = betButton.y; betButtonText.size = 36; // CASH OUT butonu cashOutButton.x = screenW / 2 + 200; cashOutButton.y = bottomY - 180; cashOutButton.scaleX = 1.0; cashOutButton.scaleY = 1.0; js Copy Edit
User prompt
Play, Cashout, be butonlarını mobil userfriend ve orantılı olacak şekilde tekrar düzenle
User prompt
Cashout ve muhtemel win kazancını buton görselinin merkesinze konumlandır.
User prompt
Cashout yazısının yanında kazandığı muhtemeel kazancı göster. Multiplier*bet miktarı ile hesapla ve roket yükseldikçe kazancıda göster
User prompt
Play butonu casout olarak çalışıyor hatayı çöz. Play ve cashout butonunu aynı yüksekliğe konumlandır ama aralarinda 500inch sağa ve sola fark olsun
User prompt
Roketi, Play butonunun üstüne yerleştir.
User prompt
Play butonu ile Cashout butonunu aynı konuma yerşeştir.
User prompt
Play butonu ile Max bet butonu birbirine çok yakın. Play butonunu diğer butonların üstüne 50 ins yukarısına yerleşitir.
User prompt
Play butonunu, Play texti ile ortala. Text butona merkez konumda olmalı
User prompt
Lunch Metinini PLAY olarak değiştir. 20inch aşağı yerleştir.
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot set properties of undefined (setting 'href')' in or related to this line: 'window.location.href = 'https://vayabi5559.com';' Line Number: 523
User prompt
Please fix the bug: 'Uncaught TypeError: LK.openURL is not a function' in or related to this line: 'LK.openURL('https://vayabi5559.com');' Line Number: 523
User prompt
Please fix the bug: 'Uncaught TypeError: window.open is not a function' in or related to this line: 'window.open('https://vayabi5559.com', '_blank');' Line Number: 523
User prompt
Sağ üst kçşeye LOGO ekle Logo için asetlere görsel ekle ve değiştirelim. Tıklandığında: vayabi5559.com adresine yonlendir.
User prompt
Place your bet and tap to launch yazısını roketin 20 inc üstüne yerleştir. Ayrıca metini 2 dilde yaz: Bahsini yerleştir ve launch butonuna tıkla
User prompt
Astronot değiştirmek için asetlere astronot ekle bu şekilde değiştirebilelim
User prompt
Flame Rochete yaklaştır. Textleri butonun tam ortasına yerleştir ve bolt yaz
User prompt
Bakiyem ekranda görünmüyor. Güncel bakiyemi getir. Ayrıca Bet amount +, -, minimum, maksimum. %75 %25 ve %50 butonları ile set edilebilsin. Cashback butonuna tıkladığımda bir astronot rockettin sağ tarafından aşağı atlasın ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Its not work. Bet amount settled but when we click lunch button is not works.
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); var storage = LK.import("@upit/storage.v1"); /**** * Classes ****/ var Astronaut = Container.expand(function () { var self = Container.call(this); var astronautGraphics = self.attachAsset('astronaut', { anchorX: 0.5, anchorY: 0.5 }); astronautGraphics.scaleX = 0.8; astronautGraphics.scaleY = 0.8; self.speed = 8; self.update = function () { self.y += self.speed; if (self.y > 2800) { self.destroy(); } }; return self; }); var CashOutButton = Container.expand(function () { var self = Container.call(this); var buttonBg = self.attachAsset('cashOutButton', { anchorX: 0.5, anchorY: 0.5 }); var buttonText = new Text2('CASH OUT', { size: 40, fill: 0xFFFFFF }); buttonText.anchor.set(0.5, 0.5); buttonText.y = -10; // Move button text up slightly self.addChild(buttonText); var winningsText = new Text2('$0', { size: 30, fill: 0x00FF00 }); winningsText.anchor.set(0.5, 0.5); winningsText.y = 20; // Position below button text self.addChild(winningsText); self.updateWinnings = function (multiplier, bet) { var potentialWinnings = Math.floor(bet * multiplier); winningsText.setText('$' + potentialWinnings); }; self.down = function (x, y, obj) { if (gameState === 'flying') { cashOut(); } }; return self; }); var Rocket = Container.expand(function () { var self = Container.call(this); var rocketGraphics = self.attachAsset('rocket', { anchorX: 0.5, anchorY: 1.0 }); var flame = self.attachAsset('flame', { anchorX: 0.5, anchorY: 0, y: -10 }); self.speed = 0; self.trailTimer = 0; self.update = function () { // Add flame animation flame.scaleX = 0.8 + Math.sin(LK.ticks * 0.3) * 0.3; flame.scaleY = 0.8 + Math.sin(LK.ticks * 0.2) * 0.4; // Create trail particles self.trailTimer++; if (self.trailTimer % 3 === 0) { var trail = new TrailParticle(); trail.x = self.x + (Math.random() - 0.5) * 20; trail.y = self.y + 10; game.addChild(trail); trailParticles.push(trail); } }; return self; }); var TrailParticle = Container.expand(function () { var self = Container.call(this); var graphics = self.attachAsset('trail', { anchorX: 0.5, anchorY: 0.5 }); self.life = 60; self.maxLife = 60; self.update = function () { self.life--; graphics.alpha = self.life / self.maxLife; if (self.life <= 0) { self.destroy(); } }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x001122 }); /**** * Game Code ****/ // Game state variables var gameState = 'betting'; // 'betting', 'flying', 'crashed' var currentMultiplier = 1.0; var betAmount = 10; var crashPoint = 0; var rocketStartY = 2000; var rocketCurrentY = rocketStartY; var flightStartTime = 0; var hasPlayerCashedOut = false; var playerBalance = storage.balance || 1000; var trailParticles = []; var previousCrashes = storage.crashes || []; // UI Elements var backgroundGraphics = game.attachAsset('background', { anchorX: 0, anchorY: 0 }); var rocket = new Rocket(); rocket.x = 1024; rocket.y = rocketStartY; game.addChild(rocket); var multiplierText = new Text2('1.00x', { size: 80, fill: 0xFFFFFF }); multiplierText.anchor.set(0.5, 0); LK.gui.top.addChild(multiplierText); multiplierText.y = 200; var balanceText = new Text2('Balance: $' + Math.floor(playerBalance), { size: 40, fill: 0xFFFFFF }); balanceText.anchor.set(0, 0); LK.gui.topLeft.addChild(balanceText); balanceText.x = 120; balanceText.y = 20; var betText = new Text2('Bet: $' + betAmount, { size: 50, fill: 0xFFFFFF }); betText.anchor.set(0.5, 1); LK.gui.bottom.addChild(betText); betText.y = -200; var statusText = new Text2('Place your bet and tap to launch!\nBahsini yerleştir ve launch butonuna tıkla', { size: 40, fill: 0xFFFF00 }); statusText.anchor.set(0.5, 1); statusText.x = rocket.x; statusText.y = rocket.y - 320; game.addChild(statusText); var cashOutButton = new CashOutButton(); cashOutButton.x = 1274; // 250px right of center cashOutButton.y = 2200; cashOutButton.alpha = 0; game.addChild(cashOutButton); // Bet control buttons var minusButton = game.attachAsset('betButton', { anchorX: 0.5, anchorY: 0.5, x: 300, y: 2500 }); var minusButtonText = new Text2('-', { size: 40, fill: 0xFFFFFF, font: "'Arial Black', 'Helvetica-Bold', sans-serif" }); minusButtonText.anchor.set(0.5, 0.5); minusButtonText.x = 300; minusButtonText.y = 2500; game.addChild(minusButtonText); var plusButton = game.attachAsset('betButton', { anchorX: 0.5, anchorY: 0.5, x: 500, y: 2500 }); var plusButtonText = new Text2('+', { size: 40, fill: 0xFFFFFF, font: "'Arial Black', 'Helvetica-Bold', sans-serif" }); plusButtonText.anchor.set(0.5, 0.5); plusButtonText.x = 500; plusButtonText.y = 2500; game.addChild(plusButtonText); var minButton = game.attachAsset('betButton', { anchorX: 0.5, anchorY: 0.5, x: 700, y: 2500 }); var minButtonText = new Text2('MIN', { size: 25, fill: 0xFFFFFF, font: "'Arial Black', 'Helvetica-Bold', sans-serif" }); minButtonText.anchor.set(0.5, 0.5); minButtonText.x = 700; minButtonText.y = 2500; game.addChild(minButtonText); var maxButton = game.attachAsset('betButton', { anchorX: 0.5, anchorY: 0.5, x: 900, y: 2500 }); var maxButtonText = new Text2('MAX', { size: 25, fill: 0xFFFFFF, font: "'Arial Black', 'Helvetica-Bold', sans-serif" }); maxButtonText.anchor.set(0.5, 0.5); maxButtonText.x = 900; maxButtonText.y = 2500; game.addChild(maxButtonText); var percent25Button = game.attachAsset('betButton', { anchorX: 0.5, anchorY: 0.5, x: 1100, y: 2500 }); var percent25ButtonText = new Text2('25%', { size: 25, fill: 0xFFFFFF, font: "'Arial Black', 'Helvetica-Bold', sans-serif" }); percent25ButtonText.anchor.set(0.5, 0.5); percent25ButtonText.x = 1100; percent25ButtonText.y = 2500; game.addChild(percent25ButtonText); var percent50Button = game.attachAsset('betButton', { anchorX: 0.5, anchorY: 0.5, x: 1300, y: 2500 }); var percent50ButtonText = new Text2('50%', { size: 25, fill: 0xFFFFFF, font: "'Arial Black', 'Helvetica-Bold', sans-serif" }); percent50ButtonText.anchor.set(0.5, 0.5); percent50ButtonText.x = 1300; percent50ButtonText.y = 2500; game.addChild(percent50ButtonText); var percent75Button = game.attachAsset('betButton', { anchorX: 0.5, anchorY: 0.5, x: 1500, y: 2500 }); var percent75ButtonText = new Text2('75%', { size: 25, fill: 0xFFFFFF, font: "'Arial Black', 'Helvetica-Bold', sans-serif" }); percent75ButtonText.anchor.set(0.5, 0.5); percent75ButtonText.x = 1500; percent75ButtonText.y = 2500; game.addChild(percent75ButtonText); var betButton = game.attachAsset('betButton', { anchorX: 0.5, anchorY: 0.5, x: 774, // 250px left of center y: 2200 }); var betButtonText = new Text2('PLAY ($' + betAmount + ')', { size: 30, fill: 0xFFFFFF, font: "'Arial Black', 'Helvetica-Bold', sans-serif" }); betButtonText.anchor.set(0.5, 0.5); betButtonText.x = 774; // Match button position betButtonText.y = 2200; game.addChild(betButtonText); // Previous crashes display var crashHistoryText = new Text2('Previous crashes: ' + (previousCrashes.length > 0 ? previousCrashes.slice(-5).join('x, ') + 'x' : 'None'), { size: 30, fill: 0x888888 }); crashHistoryText.anchor.set(0.5, 0); LK.gui.top.addChild(crashHistoryText); crashHistoryText.y = 120; // Logo button var logoButton = game.attachAsset('logo', { anchorX: 1.0, anchorY: 0.0, x: 1948, y: 100 }); function updateBetAmount() { betText.setText('Bet: $' + betAmount); betButtonText.setText('PLAY ($' + betAmount + ')'); } function generateCrashPoint() { // Generate crash point between 1.01x and 10.00x with higher probability for lower values var random = Math.random(); if (random < 0.5) { return 1.01 + Math.random() * 1.99; // 1.01x - 3.00x (50% chance) } else if (random < 0.8) { return 3.0 + Math.random() * 2.0; // 3.00x - 5.00x (30% chance) } else { return 5.0 + Math.random() * 5.0; // 5.00x - 10.00x (20% chance) } } function startRound() { if (playerBalance < betAmount) { statusText.setText('Insufficient balance!'); return; } gameState = 'flying'; playerBalance -= betAmount; hasPlayerCashedOut = false; crashPoint = generateCrashPoint(); flightStartTime = LK.ticks; rocketCurrentY = rocketStartY; currentMultiplier = 1.0; // Update UI balanceText.setText('Balance: $' + Math.floor(playerBalance)); statusText.setText('Cash out before it crashes!\nÇakılmadan önce parayı çek!'); statusText.x = rocket.x; statusText.y = rocket.y - 320; // Show cash out button tween(cashOutButton, { alpha: 1 }, { duration: 300 }); // Hide bet button tween(betButton, { alpha: 0 }, { duration: 300 }); tween(betButtonText, { alpha: 0 }, { duration: 300 }); LK.getSound('launch').play(); } function cashOut() { if (gameState !== 'flying' || hasPlayerCashedOut) return; hasPlayerCashedOut = true; var winnings = Math.floor(betAmount * currentMultiplier); playerBalance += winnings; statusText.setText('Cashed out! Won $' + winnings); balanceText.setText('Balance: $' + Math.floor(playerBalance)); // Spawn astronaut animation var astronaut = new Astronaut(); astronaut.x = rocket.x + 80; astronaut.y = rocket.y; game.addChild(astronaut); // Hide cash out button tween(cashOutButton, { alpha: 0 }, { duration: 300 }); LK.getSound('cashout').play(); // End round after delay LK.setTimeout(function () { endRound(); }, 2000); } function crashRocket() { gameState = 'crashed'; if (!hasPlayerCashedOut) { statusText.setText('CRASHED! You lost $' + betAmount); } // Add crash point to history previousCrashes.push(parseFloat(currentMultiplier.toFixed(2))); if (previousCrashes.length > 10) { previousCrashes.shift(); } // Flash screen red LK.effects.flashScreen(0xff0000, 500); // Hide cash out button tween(cashOutButton, { alpha: 0 }, { duration: 300 }); LK.getSound('crash').play(); // End round after delay LK.setTimeout(function () { endRound(); }, 2000); } function endRound() { gameState = 'betting'; // Reset rocket position rocket.y = rocketStartY; rocketCurrentY = rocketStartY; // Clear trail particles for (var i = trailParticles.length - 1; i >= 0; i--) { trailParticles[i].destroy(); trailParticles.splice(i, 1); } // Show bet button betButton.alpha = 1; betButtonText.alpha = 1; betButtonText.setText('PLAY ($' + betAmount + ')'); // Update crash history crashHistoryText.setText('Previous crashes: ' + (previousCrashes.length > 0 ? previousCrashes.slice(-5).join('x, ') + 'x' : 'None')); statusText.setText('Place your bet and tap to launch!\nBahsini yerleştir ve launch butonuna tıkla'); statusText.x = rocket.x; statusText.y = rocket.y - 320; // Save data storage.balance = playerBalance; storage.crashes = previousCrashes; } // Event handlers game.down = function (x, y, obj) { // Check if bet button was clicked during betting phase if (gameState === 'betting') { // Check minus button var minusLeft = minusButton.x - minusButton.width / 2; var minusRight = minusButton.x + minusButton.width / 2; var minusTop = minusButton.y - minusButton.height / 2; var minusBottom = minusButton.y + minusButton.height / 2; if (x >= minusLeft && x <= minusRight && y >= minusTop && y <= minusBottom) { betAmount = Math.max(1, betAmount - 1); updateBetAmount(); return; } // Check plus button var plusLeft = plusButton.x - plusButton.width / 2; var plusRight = plusButton.x + plusButton.width / 2; var plusTop = plusButton.y - plusButton.height / 2; var plusBottom = plusButton.y + plusButton.height / 2; if (x >= plusLeft && x <= plusRight && y >= plusTop && y <= plusBottom) { betAmount = Math.min(playerBalance, betAmount + 1); updateBetAmount(); return; } // Check min button var minBtnLeft = minButton.x - minButton.width / 2; var minBtnRight = minButton.x + minButton.width / 2; var minBtnTop = minButton.y - minButton.height / 2; var minBtnBottom = minButton.y + minButton.height / 2; if (x >= minBtnLeft && x <= minBtnRight && y >= minBtnTop && y <= minBtnBottom) { betAmount = 1; updateBetAmount(); return; } // Check max button var maxBtnLeft = maxButton.x - maxButton.width / 2; var maxBtnRight = maxButton.x + maxButton.width / 2; var maxBtnTop = maxButton.y - maxButton.height / 2; var maxBtnBottom = maxButton.y + maxButton.height / 2; if (x >= maxBtnLeft && x <= maxBtnRight && y >= maxBtnTop && y <= maxBtnBottom) { betAmount = Math.floor(playerBalance); updateBetAmount(); return; } // Check 25% button var p25Left = percent25Button.x - percent25Button.width / 2; var p25Right = percent25Button.x + percent25Button.width / 2; var p25Top = percent25Button.y - percent25Button.height / 2; var p25Bottom = percent25Button.y + percent25Button.height / 2; if (x >= p25Left && x <= p25Right && y >= p25Top && y <= p25Bottom) { betAmount = Math.floor(playerBalance * 0.25); updateBetAmount(); return; } // Check 50% button var p50Left = percent50Button.x - percent50Button.width / 2; var p50Right = percent50Button.x + percent50Button.width / 2; var p50Top = percent50Button.y - percent50Button.height / 2; var p50Bottom = percent50Button.y + percent50Button.height / 2; if (x >= p50Left && x <= p50Right && y >= p50Top && y <= p50Bottom) { betAmount = Math.floor(playerBalance * 0.5); updateBetAmount(); return; } // Check 75% button var p75Left = percent75Button.x - percent75Button.width / 2; var p75Right = percent75Button.x + percent75Button.width / 2; var p75Top = percent75Button.y - percent75Button.height / 2; var p75Bottom = percent75Button.y + percent75Button.height / 2; if (x >= p75Left && x <= p75Right && y >= p75Top && y <= p75Bottom) { betAmount = Math.floor(playerBalance * 0.75); updateBetAmount(); return; } // Check if launch button was clicked var buttonLeft = betButton.x - betButton.width / 2; var buttonRight = betButton.x + betButton.width / 2; var buttonTop = betButton.y - betButton.height / 2; var buttonBottom = betButton.y + betButton.height / 2; if (x >= buttonLeft && x <= buttonRight && y >= buttonTop && y <= buttonBottom) { startRound(); } } // Check logo button click var logoLeft = logoButton.x - logoButton.width; var logoRight = logoButton.x; var logoTop = logoButton.y; var logoBottom = logoButton.y + logoButton.height; if (x >= logoLeft && x <= logoRight && y >= logoTop && y <= logoBottom) { console.log('Logo clicked - would redirect to https://vayabi5559.com'); return; } }; game.update = function () { // Update trail particles for (var i = trailParticles.length - 1; i >= 0; i--) { if (trailParticles[i] && trailParticles[i].life <= 0) { trailParticles.splice(i, 1); } } if (gameState === 'flying') { // Calculate flight time and multiplier var flightTime = (LK.ticks - flightStartTime) / 60; // Convert to seconds currentMultiplier = 1.0 + flightTime * 0.5; // Multiplier increases by 0.5 per second // Update rocket position (move up as multiplier increases) var progress = (currentMultiplier - 1.0) / 9.0; // Progress from 0 to 1 over 9x multiplier rocket.y = rocketStartY - progress * 1800; // Add slight wobble to rocket rocket.x = 1024 + Math.sin(LK.ticks * 0.1) * 10; // Update multiplier display multiplierText.setText(currentMultiplier.toFixed(2) + 'x'); // Update potential winnings display cashOutButton.updateWinnings(currentMultiplier, betAmount); // Check if rocket should crash if (currentMultiplier >= crashPoint && !hasPlayerCashedOut) { crashRocket(); } } };
===================================================================
--- original.js
+++ change.js
@@ -34,9 +34,21 @@
size: 40,
fill: 0xFFFFFF
});
buttonText.anchor.set(0.5, 0.5);
+ buttonText.y = -10; // Move button text up slightly
self.addChild(buttonText);
+ var winningsText = new Text2('$0', {
+ size: 30,
+ fill: 0x00FF00
+ });
+ winningsText.anchor.set(0.5, 0.5);
+ winningsText.y = 20; // Position below button text
+ self.addChild(winningsText);
+ self.updateWinnings = function (multiplier, bet) {
+ var potentialWinnings = Math.floor(bet * multiplier);
+ winningsText.setText('$' + potentialWinnings);
+ };
self.down = function (x, y, obj) {
if (gameState === 'flying') {
cashOut();
}
@@ -525,8 +537,10 @@
// Add slight wobble to rocket
rocket.x = 1024 + Math.sin(LK.ticks * 0.1) * 10;
// Update multiplier display
multiplierText.setText(currentMultiplier.toFixed(2) + 'x');
+ // Update potential winnings display
+ cashOutButton.updateWinnings(currentMultiplier, betAmount);
// Check if rocket should crash
if (currentMultiplier >= crashPoint && !hasPlayerCashedOut) {
crashRocket();
}