<!-- -- Uploaded on : https://haxor.my.id/open/amke_biye_koro.html -- Official Web : https://prinsh.com -- script-deface-generator.prinsh.com --> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Amake Biye Koro</title> <style> body { margin: 0; overflow: hidden; background: linear-gradient(to bottom, #87CEEB, #FFE4E1); font-family: Arial, sans-serif; text-align: center; } canvas { display: block; margin: 20px auto; background: #fff; border: 2px solid #000; } h1 { color: #ff69b4; } button { padding: 10px 20px; font-size: 16px; background: #ff69b4; color: #fff; border: none; cursor: pointer; margin: 10px; } button:hover { background: #ff1493; } p { color: #333; } </style> </head> <body> <h1>Amake Biye Koro</h1> <p>Developer: Sumaiya Sumu</p> <button id="startButton">Start Game</button> <p id="scoreDisplay">Score: 0</p> <canvas id="gameCanvas" width="800" height="400"></canvas> <p id="instruction">Use Arrow Keys to Move Esha!</p> <script> const canvas = document.getElementById("gameCanvas"); const ctx = canvas.getContext("2d"); const startButton = document.getElementById("startButton"); const scoreDisplay = document.getElementById("scoreDisplay"); const instruction = document.getElementById("instruction"); // Characters const esha = { x: 400, y: 300, width: 50, height: 50, speed: 5, color: "#ff69b4" }; const sifat = { x: 800, y: 300, width: 50, height: 50, speed: 3, color: "#0000ff" }; // Coins let coins = []; const coinSize = 20; const coinColor = "#FFD700"; // Game state let gameOver = false; let score = 0; let gameStarted = false; // Draw characters function drawCharacters() { ctx.fillStyle = esha.color; ctx.fillRect(esha.x, esha.y, esha.width, esha.height); ctx.fillStyle = sifat.color; ctx.fillRect(sifat.x, sifat.y, sifat.width, sifat.height); } // Draw coins function drawCoins() { ctx.fillStyle = coinColor; coins.forEach(coin => { ctx.beginPath(); ctx.arc(coin.x, coin.y, coinSize / 2, 0, Math.PI * 2); ctx.fill(); }); } // Generate coins function generateCoins() { if (Math.random() < 0.02) { const x = Math.random() * canvas.width; const y = Math.random() * canvas.height; coins.push({ x, y }); } } // Check coin collection function checkCoinCollection() { coins.forEach((coin, index) => { if (esha.x < coin.x + coinSize && esha.x + esha.width > coin.x && esha.y < coin.y + coinSize && esha.y + esha.height > coin.y) { score += 10; coins.splice(index, 1); } }); } // Update game function update() { if (!gameOver) { // Move Sifat towards Esha if (sifat.x > esha.x) { sifat.x -= sifat.speed; } if (sifat.y > esha.y) { sifat.y -= sifat.speed; } // Increase score score++; scoreDisplay.textContent = `Score: ${score}`; // Generate coins generateCoins(); // Check coin collection checkCoinCollection(); // Check collision if (sifat.x < esha.x + esha.width && sifat.x + sifat.width > esha.x && sifat.y < esha.y + esha.height && sifat.y + sifat.height > esha.y) { gameOver = true; drawGameOver(); } } } // Draw game over screen function drawGameOver() { ctx.fillStyle = "rgba(0, 0, 0, 0.7)"; ctx.fillRect(0, 0, canvas.width, canvas.height); ctx.fillStyle = "#fff"; ctx.font = "40px Arial"; ctx.fillText("Sifat Esha ke Biye Kore Felche!", 100, 200); ctx.font = "20px Arial"; ctx.fillText(`Your Score: ${score}`, 300, 250); startButton.textContent = "Restart Game"; startButton.style.display = "block"; } // Reset game function resetGame() { esha.x = 400; esha.y = 300; sifat.x = 800; sifat.y = 300; score = 0; gameOver = false; gameStarted = true; startButton.style.display = "none"; scoreDisplay.textContent = "Score: 0"; instruction.style.display = "block"; coins = []; } // Game loop function gameLoop() { if (!gameOver && gameStarted) { ctx.clearRect(0, 0, canvas.width, canvas.height); drawCharacters(); drawCoins(); update(); requestAnimationFrame(gameLoop); } } // Start game startButton.addEventListener("click", () => { resetGame(); gameLoop(); }); // Keyboard controls document.addEventListener("keydown", (event) => { if (gameStarted && !gameOver) { if (event.key === "ArrowUp" && esha.y > 0) { esha.y -= esha.speed; } if (event.key === "ArrowDown" && esha.y + esha.height < canvas.height) { esha.y += esha.speed; } if (event.key === "ArrowLeft" && esha.x > 0) { esha.x -= esha.speed; } if (event.key === "ArrowRight" && esha.x + esha.width < canvas.width) { esha.x += esha.speed; } } }); </script> </body> </html>