Code edit (1 edits merged)
Please save this source code
User prompt
Brainrot Heist
User prompt
ChatGPT Plus El juego "Roba Un Brainrot" (también conocido como "Steal A Brainrot") de Roblox es conocido por su estilo único y su atmósfera llamativa. Se basa principalmente en una dinámica de acción divertida y algo caótica, donde los jugadores participan en un entorno de temática surrealista. Aquí tienes una descripción al pie de la letra del juego para que Upit pueda recrearlo: Tema y Estilo: Estética visual: El juego tiene una estética distorsionada y caricaturesca, con personajes que podrían parecer sacados de un cómic o una mezcla de anime con elementos grotescos. Los entornos están llenos de colores saturados, efectos visuales exagerados y objetos que parecen sacados de una pesadilla o un "brainrot" (desorden mental). Mapas: El juego se desarrolla en una variedad de mapas surrealistas. Pueden incluir espacios como laboratorios extravagantes, calles desordenadas, áreas oscuras y sucias, y otras locaciones extrañas y desconcertantes. Algunos elementos del mapa pueden ser interactivos, y el diseño tiene toques de lo absurdo. Mecánicas: Objetivo: El objetivo principal es robar "brainrots" o cerebros distorsionados. Estos cerebros son una especie de objeto coleccionable, y los jugadores deben correr por el mapa para recolectarlos antes que otros. Competencia entre jugadores: Los jugadores se enfrentan entre sí en una especie de carrera frenética para conseguir los cerebros. Algunos pueden usar poderes especiales o herramientas para deshacerse de otros jugadores o robarles los cerebros. Poderes y habilidades: Los jugadores pueden tener poderes que les permiten moverse rápido, teletransportarse, lanzar proyectiles o crear trampas para frenar a sus oponentes. El juego no es solo de recolección, sino también de sabotaje. Interactividad: Los jugadores pueden interactuar con el entorno de varias maneras, como activar trampas, modificar partes del mapa, y de alguna forma manipular el mundo alrededor de ellos para ganar ventaja. Ambiente Sonoro: Música: La banda sonora suele ser enérgica, con ritmos rápidos y algo caóticos. También podría haber sonidos distorsionados y efectos sonoros que coinciden con la atmósfera de locura y caos del juego. Efectos: Los efectos sonoros son exagerados, lo que refuerza la atmósfera desenfadada. Los sonidos de los personajes interactuando entre sí o con el entorno también son cómicos y exagerados, para darle un toque humorístico y alocado. Elementos de Personalización: Avatares y estética: Los jugadores pueden personalizar sus avatares con trajes extraños, sombreros, y otros accesorios. Los avatares tienden a tener un estilo algo extraño y extravagante, en línea con la temática de "brainrot". Emotes: Hay emotes divertidos y bizarros que los jugadores pueden usar para expresarse mientras interactúan en el juego, lo cual aumenta la interacción social y la diversión. Dinámica de Juego: Multijugador: El juego está diseñado para múltiples jugadores, lo que permite que haya una buena cantidad de caos entre amigos y desconocidos. La competencia por los "brainrots" crea una atmósfera de constante acción. Misiones Secundarias: Además de robar cerebros, pueden existir pequeñas misiones o desafíos dentro del mapa que los jugadores deben completar para obtener puntos adicionales o recompensas.
Initial prompt
hola
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); var storage = LK.import("@upit/storage.v1"); /**** * Classes ****/ var Base = Container.expand(function () { var self = Container.call(this); var baseGraphics = self.attachAsset('base', { anchorX: 0.5, anchorY: 0.5 }); self.brainrotCount = 0; var countText = new Text2('0', { size: 60, fill: '#ffffff' }); countText.anchor.set(0.5, 0.5); self.addChild(countText); self.update = function () { // Count brainrots in base var count = 0; for (var i = 0; i < brainrots.length; i++) { if (brainrots[i].owner === player && self.intersects(brainrots[i]) && !brainrots[i].isCarried) { count++; } } self.brainrotCount = count; countText.setText(count.toString()); }; return self; }); var BatPickup = Container.expand(function () { var self = Container.call(this); var batGraphics = self.attachAsset('bat_pickup', { anchorX: 0.5, anchorY: 0.5 }); self.update = function () { // Floating animation batGraphics.y = Math.sin(LK.ticks * 0.1) * 3; }; return self; }); var Brainrot = Container.expand(function () { var self = Container.call(this); self.brainrotGraphics = null; self.name = ''; self.owner = null; self.target = null; self.isCarried = false; self.speed = 2; var nameText = new Text2('', { size: 30, fill: '#ffffff' }); nameText.anchor.set(0.5, 1); nameText.y = -40; self.addChild(nameText); self.setName = function (name) { self.name = name; nameText.setText(name); // Set asset based on name var assetMap = { 'Tralalero Tralala': 'brainrot_tralalero', 'Capuchino Assasino': 'brainrot_capuchino', 'Ballerina Capuchina': 'brainrot_ballerina', 'Lirli Larila': 'brainrot_lirli', 'Bombardino Crocodrilo': 'brainrot_bombardino', 'Makakini Bananini': 'brainrot_makakini', 'Chimpanzini Banaini': 'brainrot_chimpanzini', 'Orangutini Anassini': 'brainrot_orangutini', 'Bananita Dolfinita': 'brainrot_bananita', 'Brr Brr Patapim': 'brainrot_brrbrr', 'Tung tung tung Sahur': 'brainrot_tungtung', 'Expressora Signora': 'brainrot_expressora', 'Ballerino Lololo': 'brainrot_ballerino' }; var assetName = assetMap[name] || 'brainrot_tralalero'; if (self.brainrotGraphics) { self.removeChild(self.brainrotGraphics); } self.brainrotGraphics = self.attachAsset(assetName, { anchorX: 0.5, anchorY: 0.5 }); // Move nameText to front self.removeChild(nameText); self.addChild(nameText); }; self.update = function () { if (!self.isCarried && self.target) { var dx = self.target.x - self.x; var dy = self.target.y - self.y; var dist = Math.sqrt(dx * dx + dy * dy); if (dist > 10) { self.x += dx / dist * self.speed; self.y += dy / dist * self.speed; } } // Floating animation if (self.brainrotGraphics) { self.brainrotGraphics.y = Math.sin(LK.ticks * 0.05) * 5; } }; return self; }); var NPC = Container.expand(function () { var self = Container.call(this); var npcGraphics = self.attachAsset('npc', { anchorX: 0.5, anchorY: 0.5 }); self.money = 50; self.carriedBrainrot = null; self.target = null; self.speed = 3; self.state = 'idle'; // idle, buying, returning, stealing self.stateTimer = 0; self.home = null; self.holdingBat = false; self.batGraphics = null; self.update = function () { self.stateTimer--; if (self.state === 'idle' && self.stateTimer <= 0) { // Get NPC index var npcIndex = npcs.indexOf(self); // Decide next action - including blocking var random = Math.random(); if (random < 0.3 && self.money >= brainrotPrice) { self.state = 'buying'; self.target = shop; } else if (random < 0.4 && npcBlockTimes[npcIndex] <= 0) { // Block base npcBlockTimes[npcIndex] = baseBlockDuration; self.state = 'idle'; self.stateTimer = 60; } else { self.state = 'stealing'; // Find a brainrot to steal var potentialTargets = []; for (var i = 0; i < brainrots.length; i++) { if (brainrots[i].owner && brainrots[i].owner !== self && !brainrots[i].isCarried) { potentialTargets.push(brainrots[i]); } } if (potentialTargets.length > 0) { self.target = potentialTargets[Math.floor(Math.random() * potentialTargets.length)]; } else { self.state = 'idle'; self.stateTimer = 60; } } } // Move towards target if (self.target) { var dx = self.target.x - self.x; var dy = self.target.y - self.y; var dist = Math.sqrt(dx * dx + dy * dy); if (dist > 10) { self.x += dx / dist * self.speed; self.y += dy / dist * self.speed; } // Check if reached target if (dist < 50) { if (self.state === 'buying' && self.target === shop) { // Buy a brainrot if (self.money >= brainrotPrice) { self.money -= brainrotPrice; var newBrainrot = createBrainrot(self.x, self.y); newBrainrot.owner = self; newBrainrot.target = self.home; self.carriedBrainrot = newBrainrot; newBrainrot.isCarried = true; self.state = 'returning'; self.target = self.home; } } else if (self.state === 'stealing' && self.target.parent) { // Check if target base is blocked var canSteal = true; if (self.target.owner === player && playerBlockTime > 0) { canSteal = false; } else { for (var j = 0; j < npcs.length; j++) { if (self.target.owner === npcs[j] && npcBlockTimes[j] > 0) { canSteal = false; break; } } } // Steal the brainrot only if base is not blocked if (canSteal) { self.carriedBrainrot = self.target; self.carriedBrainrot.isCarried = true; self.carriedBrainrot.owner = self; self.state = 'returning'; self.target = self.home; LK.getSound('steal').play(); } else { // Base is blocked, go back to idle self.state = 'idle'; self.stateTimer = 60; self.target = null; } } else if (self.state === 'returning' && self.target === self.home) { // Deposit brainrot if (self.carriedBrainrot) { self.carriedBrainrot.isCarried = false; self.carriedBrainrot.target = self.home; self.carriedBrainrot = null; LK.getSound('deposit').play(); } self.state = 'idle'; self.stateTimer = 120; self.target = null; } } } // Check for bat pickups if (!self.holdingBat) { for (var i = 0; i < batPickups.length; i++) { var batPickup = batPickups[i]; var batDist = Math.sqrt(Math.pow(batPickup.x - self.x, 2) + Math.pow(batPickup.y - self.y, 2)); if (batDist < 100) { // Pick up bat self.holdingBat = true; self.batGraphics = self.addChild(LK.getAsset('bat', { anchorX: 0.5, anchorY: 0.5 })); self.batGraphics.x = 30; self.batGraphics.y = -20; batPickup.destroy(); batPickups.splice(i, 1); break; } } } // Update carried brainrot position if (self.carriedBrainrot) { self.carriedBrainrot.x = self.x; self.carriedBrainrot.y = self.y - 50; } // Update bat position if equipped if (self.holdingBat && self.batGraphics) { self.batGraphics.x = 30; self.batGraphics.y = -20; } }; return self; }); var NPCBase = Container.expand(function () { var self = Container.call(this); var baseGraphics = self.attachAsset('npcbase', { anchorX: 0.5, anchorY: 0.5 }); self.owner = null; self.brainrotCount = 0; var countText = new Text2('0', { size: 60, fill: '#ffffff' }); countText.anchor.set(0.5, 0.5); self.addChild(countText); self.update = function () { // Count brainrots in base var count = 0; for (var i = 0; i < brainrots.length; i++) { if (brainrots[i].owner === self.owner && self.intersects(brainrots[i]) && !brainrots[i].isCarried) { count++; } } self.brainrotCount = count; countText.setText(count.toString()); }; return self; }); var Player = Container.expand(function () { var self = Container.call(this); var playerGraphics = self.attachAsset('player', { anchorX: 0.5, anchorY: 0.5 }); self.money = playerMoney; self.carriedBrainrot = null; self.speed = 6; self.velocity = { x: 0, y: 0 }; self.update = function () { // Process WASD movement self.velocity.x = 0; self.velocity.y = 0; if (keys.w) self.velocity.y = -self.speed; if (keys.s) self.velocity.y = self.speed; if (keys.a) self.velocity.x = -self.speed; if (keys.d) self.velocity.x = self.speed; // Apply velocity to position self.x += self.velocity.x; self.y += self.velocity.y; // Keep player within screen bounds self.x = Math.max(40, Math.min(2008, self.x)); self.y = Math.max(40, Math.min(2692, self.y)); // Update carried brainrot position if (self.carriedBrainrot) { self.carriedBrainrot.x = self.x; self.carriedBrainrot.y = self.y - 50; } // Update bat position if equipped if (playerHoldingBat && playerBatGraphics) { playerBatGraphics.x = 30; playerBatGraphics.y = -20; } }; return self; }); var Shop = Container.expand(function () { var self = Container.call(this); var shopGraphics = self.attachAsset('shop', { anchorX: 0.5, anchorY: 0.5 }); return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x003300 }); /**** * Game Code ****/ // Different colored brainrots for each type // Game variables var player; var playerBase; var npcs = []; var npcBases = []; var brainrots = []; var shop; var street; // Brainrot names and prices var brainrotNames = ['Tralalero Tralala', 'Capuchino Assasino', 'Ballerina Capuchina', 'Lirli Larila', 'Bombardino Crocodrilo', 'Makakini Bananini', 'Chimpanzini Banaini', 'Orangutini Anassini', 'Bananita Dolfinita', 'Brr Brr Patapim', 'Tung tung tung Sahur', 'Expressora Signora', 'Ballerino Lololo']; var brainrotPrice = 50; var moneyPerBrainrot = 5; // Bat system var batPickups = []; var playerHoldingBat = false; var playerBatGraphics = null; // Base blocking system var baseBlockDuration = 70 * 60; // 70 seconds at 60 FPS var playerBlockTime = 0; var npcBlockTimes = [0, 0, 0]; // One for each NPC // UI Elements var playerMoney = storage.money || 100; var moneyText = new Text2('Money: $' + playerMoney, { size: 60, fill: '#00ff00' }); moneyText.anchor.set(0, 0); moneyText.x = 150; LK.gui.topLeft.addChild(moneyText); var brainrotCountText = new Text2('Brainrots: 0', { size: 60, fill: '#ffffff' }); brainrotCountText.anchor.set(0.5, 0); LK.gui.top.addChild(brainrotCountText); var blockStatusText = new Text2('', { size: 80, fill: '#ff0000' }); blockStatusText.anchor.set(0.5, 0); blockStatusText.y = 100; LK.gui.top.addChild(blockStatusText); var blockTimerText = new Text2('', { size: 60, fill: '#ffff00' }); blockTimerText.anchor.set(0.5, 0); blockTimerText.y = 200; LK.gui.top.addChild(blockTimerText); // Create street in the middle street = game.addChild(LK.getAsset('street', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: 1366 })); // Create player base in corner playerBase = game.addChild(new Base()); playerBase.x = 200; playerBase.y = 2532; // Create shop shop = game.addChild(new Shop()); shop.x = 1024; shop.y = 1366; // Initialize player player = game.addChild(new Player()); player.x = playerBase.x; player.y = playerBase.y; // Create NPCs and their bases for (var i = 0; i < 3; i++) { var npc = game.addChild(new NPC()); var npcBase = game.addChild(new NPCBase()); // Position NPC bases in other corners if (i === 0) { npcBase.x = 1848; npcBase.y = 2532; } else if (i === 1) { npcBase.x = 200; npcBase.y = 200; } else { npcBase.x = 1848; npcBase.y = 200; } npc.x = npcBase.x; npc.y = npcBase.y; npc.home = npcBase; npcBase.owner = npc; npcs.push(npc); npcBases.push(npcBase); } // Helper function to create a brainrot function createBrainrot(x, y) { var brainrot = game.addChild(new Brainrot()); brainrot.x = x; brainrot.y = y; brainrot.setName(brainrotNames[Math.floor(Math.random() * brainrotNames.length)]); brainrots.push(brainrot); return brainrot; } // Create bat pickups for (var i = 0; i < 3; i++) { var batPickup = game.addChild(new BatPickup()); batPickup.x = 500 + i * 300; batPickup.y = 800; batPickups.push(batPickup); } // Keyboard controls - WASD movement var keys = { w: false, a: false, s: false, d: false }; // Note: Since we can't use keyboard events in LK, we'll use a different approach // Player movement will be controlled by touch/click on screen edges game.down = function (x, y, obj) { // Check if clicking on shop to get a random brainrot var shopDist = Math.sqrt(Math.pow(shop.x - x, 2) + Math.pow(shop.y - y, 2)); if (shopDist < 75) { if (player.money >= brainrotPrice) { // Buy brainrot player.money -= brainrotPrice; storage.money = player.money; moneyText.setText('Money: $' + player.money); var newBrainrot = createBrainrot(shop.x, shop.y); newBrainrot.owner = player; newBrainrot.target = playerBase; LK.getSound('purchase').play(); } } // Check if clicking on bat pickups for (var i = batPickups.length - 1; i >= 0; i--) { var batPickup = batPickups[i]; var batDist = Math.sqrt(Math.pow(batPickup.x - x, 2) + Math.pow(batPickup.y - y, 2)); if (batDist < 50 && !playerHoldingBat) { // Pick up bat playerHoldingBat = true; playerBatGraphics = player.addChild(LK.getAsset('bat', { anchorX: 0.5, anchorY: 0.5 })); playerBatGraphics.x = 30; playerBatGraphics.y = -20; batPickup.destroy(); batPickups.splice(i, 1); LK.getSound('purchase').play(); break; } } // Check if clicking to attack with bat if (playerHoldingBat) { // Attack with bat at click position for (var i = 0; i < npcs.length; i++) { var npc = npcs[i]; var distToClick = Math.sqrt(Math.pow(npc.x - x, 2) + Math.pow(npc.y - y, 2)); var distToPlayer = Math.sqrt(Math.pow(player.x - npc.x, 2) + Math.pow(player.y - npc.y, 2)); if (distToClick < 100 && distToPlayer < 150 && npc.carriedBrainrot) { // Return stolen brainrot to player base npc.carriedBrainrot.owner = player; npc.carriedBrainrot.target = playerBase; npc.carriedBrainrot.isCarried = false; npc.carriedBrainrot = null; npc.state = 'idle'; npc.stateTimer = 180; npc.target = null; LK.getSound('hit').play(); // Flash effect on NPC tween(npc, { tint: 0xff0000 }, { duration: 200, onFinish: function onFinish() { tween(npc, { tint: 0xffffff }, { duration: 200 }); } }); break; } } } // Check if clicking on player base to block it (only when touching it) var baseDist = Math.sqrt(Math.pow(playerBase.x - x, 2) + Math.pow(playerBase.y - y, 2)); var playerToBaseDist = Math.sqrt(Math.pow(player.x - playerBase.x, 2) + Math.pow(player.y - playerBase.y, 2)); if (baseDist < 100 && playerToBaseDist < 150 && playerBlockTime <= 0) { playerBlockTime = baseBlockDuration; } // Check if clicking on NPC bases to steal brainrots for (var i = 0; i < npcBases.length; i++) { var npcBase = npcBases[i]; var npcBaseDist = Math.sqrt(Math.pow(npcBase.x - x, 2) + Math.pow(npcBase.y - y, 2)); if (npcBaseDist < 100 && !player.carriedBrainrot) { // Check if player is close enough to the base var playerDist = Math.sqrt(Math.pow(player.x - npcBase.x, 2) + Math.pow(player.y - npcBase.y, 2)); if (playerDist < 150) { // Check if base is blocked if (npcBlockTimes[i] <= 0) { // Find a brainrot in this base to steal for (var j = 0; j < brainrots.length; j++) { var brainrot = brainrots[j]; if (!brainrot.isCarried && brainrot.owner === npcs[i] && npcBase.intersects(brainrot)) { player.carriedBrainrot = brainrot; brainrot.isCarried = true; brainrot.owner = player; LK.getSound('steal').play(); break; } } } } break; } } // Check if clicking on brainrot to steal from any location for (var i = 0; i < brainrots.length; i++) { var brainrot = brainrots[i]; if (!brainrot.isCarried && brainrot.owner !== player && !player.carriedBrainrot && Math.abs(brainrot.x - x) < 60 && Math.abs(brainrot.y - y) < 60) { // Check if player is close enough var dist = Math.sqrt(Math.pow(player.x - brainrot.x, 2) + Math.pow(player.y - brainrot.y, 2)); if (dist < 150) { // Check if target base is blocked var canSteal = true; for (var j = 0; j < npcs.length; j++) { if (brainrot.owner === npcs[j] && npcBlockTimes[j] > 0) { canSteal = false; break; } } if (canSteal) { player.carriedBrainrot = brainrot; brainrot.isCarried = true; brainrot.owner = player; LK.getSound('steal').play(); } break; } } } }; game.up = function (x, y, obj) { // Check if releasing brainrot at base if (player.carriedBrainrot && player.intersects(playerBase)) { player.carriedBrainrot.isCarried = false; player.carriedBrainrot.target = playerBase; player.carriedBrainrot = null; LK.getSound('deposit').play(); } }; // Main game update game.update = function () { // Update block timers if (playerBlockTime > 0) { playerBlockTime--; } for (var i = 0; i < npcBlockTimes.length; i++) { if (npcBlockTimes[i] > 0) { npcBlockTimes[i]--; } } // Update block status display var isAnyBaseBlocked = playerBlockTime > 0; var maxBlockTime = 0; if (playerBlockTime > 0) { maxBlockTime = Math.max(maxBlockTime, playerBlockTime); } for (var i = 0; i < npcBlockTimes.length; i++) { if (npcBlockTimes[i] > 0) { isAnyBaseBlocked = true; maxBlockTime = Math.max(maxBlockTime, npcBlockTimes[i]); } } if (isAnyBaseBlocked) { blockStatusText.setText('BLOCK'); var timeLeft = Math.ceil(maxBlockTime / 60); blockTimerText.setText('Time: ' + timeLeft + 's'); } else { blockStatusText.setText(''); blockTimerText.setText(''); } // Player movement disabled - no keyboard input processing // Update brainrot count var totalBrainrots = 0; for (var i = 0; i < brainrots.length; i++) { if (brainrots[i].owner === player && playerBase.intersects(brainrots[i]) && !brainrots[i].isCarried) { totalBrainrots++; } } brainrotCountText.setText('Brainrots: ' + totalBrainrots); LK.setScore(totalBrainrots); // NPCs can steal from player (but not when player base is blocked) for (var i = 0; i < npcs.length; i++) { var npc = npcs[i]; if (!npc.carriedBrainrot && npc.state === 'stealing' && playerBlockTime <= 0) { // Check if NPC can steal player's carried brainrot if (player.carriedBrainrot && npc.intersects(player)) { npc.carriedBrainrot = player.carriedBrainrot; player.carriedBrainrot.owner = npc; player.carriedBrainrot = null; npc.state = 'returning'; npc.target = npc.home; LK.getSound('steal').play(); } } // NPCs can hit player with bat when player is stealing from their base if (npc.holdingBat && player.carriedBrainrot && player.carriedBrainrot.owner === player) { var distToPlayer = Math.sqrt(Math.pow(player.x - npc.x, 2) + Math.pow(player.y - npc.y, 2)); if (distToPlayer < 150 && player.carriedBrainrot) { // Check if stolen brainrot originally belonged to this NPC var wasFromThisNPC = false; for (var j = 0; j < brainrots.length; j++) { if (brainrots[j] === player.carriedBrainrot) { // Find which NPC base this brainrot was near before stealing for (var k = 0; k < npcBases.length; k++) { var baseDist = Math.sqrt(Math.pow(npcBases[k].x - player.carriedBrainrot.x, 2) + Math.pow(npcBases[k].y - player.carriedBrainrot.y, 2)); if (baseDist < 200 && npcBases[k].owner === npc) { wasFromThisNPC = true; break; } } break; } } if (wasFromThisNPC) { // Return stolen brainrot to NPC base player.carriedBrainrot.owner = npc; player.carriedBrainrot.target = npc.home; player.carriedBrainrot.isCarried = false; player.carriedBrainrot = null; LK.getSound('hit').play(); // Flash effect on player tween(player, { tint: 0xff0000 }, { duration: 200, onFinish: function onFinish() { tween(player, { tint: 0xffffff }, { duration: 200 }); } }); } } } } // Generate money from brainrots in base if (LK.ticks % 60 === 0) { // Every second, generate money based on brainrots in player base only if (totalBrainrots > 0) { player.money += totalBrainrots * moneyPerBrainrot; storage.money = player.money; moneyText.setText('Money: $' + player.money); } // NPCs also get money for (var i = 0; i < npcs.length; i++) { npcs[i].money += npcBases[i].brainrotCount * moneyPerBrainrot; } } }; // Create virtual WASD controls var controlContainer = new Container(); controlContainer.x = 200; controlContainer.y = 2000; game.addChild(controlContainer); // Create control buttons var buttonSize = 120; var buttonColor = 0x555555; var buttonActiveColor = 0x888888; // W button var wButton = controlContainer.addChild(LK.getAsset('arrow_up', { width: buttonSize, height: buttonSize, tint: buttonColor, anchorX: 0.5, anchorY: 0.5, x: 0, y: -buttonSize })); var wText = new Text2('W', { size: 60, fill: '#ffffff' }); wText.anchor.set(0.5, 0.5); wButton.addChild(wText); // A button var aButton = controlContainer.addChild(LK.getAsset('arrow_left', { width: buttonSize, height: buttonSize, tint: buttonColor, anchorX: 0.5, anchorY: 0.5, x: -buttonSize, y: 0 })); var aText = new Text2('A', { size: 60, fill: '#ffffff' }); aText.anchor.set(0.5, 0.5); aButton.addChild(aText); // S button var sButton = controlContainer.addChild(LK.getAsset('arrow_down', { width: buttonSize, height: buttonSize, tint: buttonColor, anchorX: 0.5, anchorY: 0.5, x: 0, y: buttonSize })); var sText = new Text2('S', { size: 60, fill: '#ffffff' }); sText.anchor.set(0.5, 0.5); sButton.addChild(sText); // D button var dButton = controlContainer.addChild(LK.getAsset('arrow_right', { width: buttonSize, height: buttonSize, tint: buttonColor, anchorX: 0.5, anchorY: 0.5, x: buttonSize, y: 0 })); var dText = new Text2('D', { size: 60, fill: '#ffffff' }); dText.anchor.set(0.5, 0.5); dButton.addChild(dText); // Button press handlers wButton.down = function () { keys.w = true; wButton.tint = buttonActiveColor; }; wButton.up = function () { keys.w = false; wButton.tint = buttonColor; }; aButton.down = function () { keys.a = true; aButton.tint = buttonActiveColor; }; aButton.up = function () { keys.a = false; aButton.tint = buttonColor; }; sButton.down = function () { keys.s = true; sButton.tint = buttonActiveColor; }; sButton.up = function () { keys.s = false; sButton.tint = buttonColor; }; dButton.down = function () { keys.d = true; dButton.tint = buttonActiveColor; }; dButton.up = function () { keys.d = false; dButton.tint = buttonColor; }; // Play background music LK.playMusic('bgmusic'); ;
/****
* Plugins
****/
var tween = LK.import("@upit/tween.v1");
var storage = LK.import("@upit/storage.v1");
/****
* Classes
****/
var Base = Container.expand(function () {
var self = Container.call(this);
var baseGraphics = self.attachAsset('base', {
anchorX: 0.5,
anchorY: 0.5
});
self.brainrotCount = 0;
var countText = new Text2('0', {
size: 60,
fill: '#ffffff'
});
countText.anchor.set(0.5, 0.5);
self.addChild(countText);
self.update = function () {
// Count brainrots in base
var count = 0;
for (var i = 0; i < brainrots.length; i++) {
if (brainrots[i].owner === player && self.intersects(brainrots[i]) && !brainrots[i].isCarried) {
count++;
}
}
self.brainrotCount = count;
countText.setText(count.toString());
};
return self;
});
var BatPickup = Container.expand(function () {
var self = Container.call(this);
var batGraphics = self.attachAsset('bat_pickup', {
anchorX: 0.5,
anchorY: 0.5
});
self.update = function () {
// Floating animation
batGraphics.y = Math.sin(LK.ticks * 0.1) * 3;
};
return self;
});
var Brainrot = Container.expand(function () {
var self = Container.call(this);
self.brainrotGraphics = null;
self.name = '';
self.owner = null;
self.target = null;
self.isCarried = false;
self.speed = 2;
var nameText = new Text2('', {
size: 30,
fill: '#ffffff'
});
nameText.anchor.set(0.5, 1);
nameText.y = -40;
self.addChild(nameText);
self.setName = function (name) {
self.name = name;
nameText.setText(name);
// Set asset based on name
var assetMap = {
'Tralalero Tralala': 'brainrot_tralalero',
'Capuchino Assasino': 'brainrot_capuchino',
'Ballerina Capuchina': 'brainrot_ballerina',
'Lirli Larila': 'brainrot_lirli',
'Bombardino Crocodrilo': 'brainrot_bombardino',
'Makakini Bananini': 'brainrot_makakini',
'Chimpanzini Banaini': 'brainrot_chimpanzini',
'Orangutini Anassini': 'brainrot_orangutini',
'Bananita Dolfinita': 'brainrot_bananita',
'Brr Brr Patapim': 'brainrot_brrbrr',
'Tung tung tung Sahur': 'brainrot_tungtung',
'Expressora Signora': 'brainrot_expressora',
'Ballerino Lololo': 'brainrot_ballerino'
};
var assetName = assetMap[name] || 'brainrot_tralalero';
if (self.brainrotGraphics) {
self.removeChild(self.brainrotGraphics);
}
self.brainrotGraphics = self.attachAsset(assetName, {
anchorX: 0.5,
anchorY: 0.5
});
// Move nameText to front
self.removeChild(nameText);
self.addChild(nameText);
};
self.update = function () {
if (!self.isCarried && self.target) {
var dx = self.target.x - self.x;
var dy = self.target.y - self.y;
var dist = Math.sqrt(dx * dx + dy * dy);
if (dist > 10) {
self.x += dx / dist * self.speed;
self.y += dy / dist * self.speed;
}
}
// Floating animation
if (self.brainrotGraphics) {
self.brainrotGraphics.y = Math.sin(LK.ticks * 0.05) * 5;
}
};
return self;
});
var NPC = Container.expand(function () {
var self = Container.call(this);
var npcGraphics = self.attachAsset('npc', {
anchorX: 0.5,
anchorY: 0.5
});
self.money = 50;
self.carriedBrainrot = null;
self.target = null;
self.speed = 3;
self.state = 'idle'; // idle, buying, returning, stealing
self.stateTimer = 0;
self.home = null;
self.holdingBat = false;
self.batGraphics = null;
self.update = function () {
self.stateTimer--;
if (self.state === 'idle' && self.stateTimer <= 0) {
// Get NPC index
var npcIndex = npcs.indexOf(self);
// Decide next action - including blocking
var random = Math.random();
if (random < 0.3 && self.money >= brainrotPrice) {
self.state = 'buying';
self.target = shop;
} else if (random < 0.4 && npcBlockTimes[npcIndex] <= 0) {
// Block base
npcBlockTimes[npcIndex] = baseBlockDuration;
self.state = 'idle';
self.stateTimer = 60;
} else {
self.state = 'stealing';
// Find a brainrot to steal
var potentialTargets = [];
for (var i = 0; i < brainrots.length; i++) {
if (brainrots[i].owner && brainrots[i].owner !== self && !brainrots[i].isCarried) {
potentialTargets.push(brainrots[i]);
}
}
if (potentialTargets.length > 0) {
self.target = potentialTargets[Math.floor(Math.random() * potentialTargets.length)];
} else {
self.state = 'idle';
self.stateTimer = 60;
}
}
}
// Move towards target
if (self.target) {
var dx = self.target.x - self.x;
var dy = self.target.y - self.y;
var dist = Math.sqrt(dx * dx + dy * dy);
if (dist > 10) {
self.x += dx / dist * self.speed;
self.y += dy / dist * self.speed;
}
// Check if reached target
if (dist < 50) {
if (self.state === 'buying' && self.target === shop) {
// Buy a brainrot
if (self.money >= brainrotPrice) {
self.money -= brainrotPrice;
var newBrainrot = createBrainrot(self.x, self.y);
newBrainrot.owner = self;
newBrainrot.target = self.home;
self.carriedBrainrot = newBrainrot;
newBrainrot.isCarried = true;
self.state = 'returning';
self.target = self.home;
}
} else if (self.state === 'stealing' && self.target.parent) {
// Check if target base is blocked
var canSteal = true;
if (self.target.owner === player && playerBlockTime > 0) {
canSteal = false;
} else {
for (var j = 0; j < npcs.length; j++) {
if (self.target.owner === npcs[j] && npcBlockTimes[j] > 0) {
canSteal = false;
break;
}
}
}
// Steal the brainrot only if base is not blocked
if (canSteal) {
self.carriedBrainrot = self.target;
self.carriedBrainrot.isCarried = true;
self.carriedBrainrot.owner = self;
self.state = 'returning';
self.target = self.home;
LK.getSound('steal').play();
} else {
// Base is blocked, go back to idle
self.state = 'idle';
self.stateTimer = 60;
self.target = null;
}
} else if (self.state === 'returning' && self.target === self.home) {
// Deposit brainrot
if (self.carriedBrainrot) {
self.carriedBrainrot.isCarried = false;
self.carriedBrainrot.target = self.home;
self.carriedBrainrot = null;
LK.getSound('deposit').play();
}
self.state = 'idle';
self.stateTimer = 120;
self.target = null;
}
}
}
// Check for bat pickups
if (!self.holdingBat) {
for (var i = 0; i < batPickups.length; i++) {
var batPickup = batPickups[i];
var batDist = Math.sqrt(Math.pow(batPickup.x - self.x, 2) + Math.pow(batPickup.y - self.y, 2));
if (batDist < 100) {
// Pick up bat
self.holdingBat = true;
self.batGraphics = self.addChild(LK.getAsset('bat', {
anchorX: 0.5,
anchorY: 0.5
}));
self.batGraphics.x = 30;
self.batGraphics.y = -20;
batPickup.destroy();
batPickups.splice(i, 1);
break;
}
}
}
// Update carried brainrot position
if (self.carriedBrainrot) {
self.carriedBrainrot.x = self.x;
self.carriedBrainrot.y = self.y - 50;
}
// Update bat position if equipped
if (self.holdingBat && self.batGraphics) {
self.batGraphics.x = 30;
self.batGraphics.y = -20;
}
};
return self;
});
var NPCBase = Container.expand(function () {
var self = Container.call(this);
var baseGraphics = self.attachAsset('npcbase', {
anchorX: 0.5,
anchorY: 0.5
});
self.owner = null;
self.brainrotCount = 0;
var countText = new Text2('0', {
size: 60,
fill: '#ffffff'
});
countText.anchor.set(0.5, 0.5);
self.addChild(countText);
self.update = function () {
// Count brainrots in base
var count = 0;
for (var i = 0; i < brainrots.length; i++) {
if (brainrots[i].owner === self.owner && self.intersects(brainrots[i]) && !brainrots[i].isCarried) {
count++;
}
}
self.brainrotCount = count;
countText.setText(count.toString());
};
return self;
});
var Player = Container.expand(function () {
var self = Container.call(this);
var playerGraphics = self.attachAsset('player', {
anchorX: 0.5,
anchorY: 0.5
});
self.money = playerMoney;
self.carriedBrainrot = null;
self.speed = 6;
self.velocity = {
x: 0,
y: 0
};
self.update = function () {
// Process WASD movement
self.velocity.x = 0;
self.velocity.y = 0;
if (keys.w) self.velocity.y = -self.speed;
if (keys.s) self.velocity.y = self.speed;
if (keys.a) self.velocity.x = -self.speed;
if (keys.d) self.velocity.x = self.speed;
// Apply velocity to position
self.x += self.velocity.x;
self.y += self.velocity.y;
// Keep player within screen bounds
self.x = Math.max(40, Math.min(2008, self.x));
self.y = Math.max(40, Math.min(2692, self.y));
// Update carried brainrot position
if (self.carriedBrainrot) {
self.carriedBrainrot.x = self.x;
self.carriedBrainrot.y = self.y - 50;
}
// Update bat position if equipped
if (playerHoldingBat && playerBatGraphics) {
playerBatGraphics.x = 30;
playerBatGraphics.y = -20;
}
};
return self;
});
var Shop = Container.expand(function () {
var self = Container.call(this);
var shopGraphics = self.attachAsset('shop', {
anchorX: 0.5,
anchorY: 0.5
});
return self;
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0x003300
});
/****
* Game Code
****/
// Different colored brainrots for each type
// Game variables
var player;
var playerBase;
var npcs = [];
var npcBases = [];
var brainrots = [];
var shop;
var street;
// Brainrot names and prices
var brainrotNames = ['Tralalero Tralala', 'Capuchino Assasino', 'Ballerina Capuchina', 'Lirli Larila', 'Bombardino Crocodrilo', 'Makakini Bananini', 'Chimpanzini Banaini', 'Orangutini Anassini', 'Bananita Dolfinita', 'Brr Brr Patapim', 'Tung tung tung Sahur', 'Expressora Signora', 'Ballerino Lololo'];
var brainrotPrice = 50;
var moneyPerBrainrot = 5;
// Bat system
var batPickups = [];
var playerHoldingBat = false;
var playerBatGraphics = null;
// Base blocking system
var baseBlockDuration = 70 * 60; // 70 seconds at 60 FPS
var playerBlockTime = 0;
var npcBlockTimes = [0, 0, 0]; // One for each NPC
// UI Elements
var playerMoney = storage.money || 100;
var moneyText = new Text2('Money: $' + playerMoney, {
size: 60,
fill: '#00ff00'
});
moneyText.anchor.set(0, 0);
moneyText.x = 150;
LK.gui.topLeft.addChild(moneyText);
var brainrotCountText = new Text2('Brainrots: 0', {
size: 60,
fill: '#ffffff'
});
brainrotCountText.anchor.set(0.5, 0);
LK.gui.top.addChild(brainrotCountText);
var blockStatusText = new Text2('', {
size: 80,
fill: '#ff0000'
});
blockStatusText.anchor.set(0.5, 0);
blockStatusText.y = 100;
LK.gui.top.addChild(blockStatusText);
var blockTimerText = new Text2('', {
size: 60,
fill: '#ffff00'
});
blockTimerText.anchor.set(0.5, 0);
blockTimerText.y = 200;
LK.gui.top.addChild(blockTimerText);
// Create street in the middle
street = game.addChild(LK.getAsset('street', {
anchorX: 0.5,
anchorY: 0.5,
x: 1024,
y: 1366
}));
// Create player base in corner
playerBase = game.addChild(new Base());
playerBase.x = 200;
playerBase.y = 2532;
// Create shop
shop = game.addChild(new Shop());
shop.x = 1024;
shop.y = 1366;
// Initialize player
player = game.addChild(new Player());
player.x = playerBase.x;
player.y = playerBase.y;
// Create NPCs and their bases
for (var i = 0; i < 3; i++) {
var npc = game.addChild(new NPC());
var npcBase = game.addChild(new NPCBase());
// Position NPC bases in other corners
if (i === 0) {
npcBase.x = 1848;
npcBase.y = 2532;
} else if (i === 1) {
npcBase.x = 200;
npcBase.y = 200;
} else {
npcBase.x = 1848;
npcBase.y = 200;
}
npc.x = npcBase.x;
npc.y = npcBase.y;
npc.home = npcBase;
npcBase.owner = npc;
npcs.push(npc);
npcBases.push(npcBase);
}
// Helper function to create a brainrot
function createBrainrot(x, y) {
var brainrot = game.addChild(new Brainrot());
brainrot.x = x;
brainrot.y = y;
brainrot.setName(brainrotNames[Math.floor(Math.random() * brainrotNames.length)]);
brainrots.push(brainrot);
return brainrot;
}
// Create bat pickups
for (var i = 0; i < 3; i++) {
var batPickup = game.addChild(new BatPickup());
batPickup.x = 500 + i * 300;
batPickup.y = 800;
batPickups.push(batPickup);
}
// Keyboard controls - WASD movement
var keys = {
w: false,
a: false,
s: false,
d: false
};
// Note: Since we can't use keyboard events in LK, we'll use a different approach
// Player movement will be controlled by touch/click on screen edges
game.down = function (x, y, obj) {
// Check if clicking on shop to get a random brainrot
var shopDist = Math.sqrt(Math.pow(shop.x - x, 2) + Math.pow(shop.y - y, 2));
if (shopDist < 75) {
if (player.money >= brainrotPrice) {
// Buy brainrot
player.money -= brainrotPrice;
storage.money = player.money;
moneyText.setText('Money: $' + player.money);
var newBrainrot = createBrainrot(shop.x, shop.y);
newBrainrot.owner = player;
newBrainrot.target = playerBase;
LK.getSound('purchase').play();
}
}
// Check if clicking on bat pickups
for (var i = batPickups.length - 1; i >= 0; i--) {
var batPickup = batPickups[i];
var batDist = Math.sqrt(Math.pow(batPickup.x - x, 2) + Math.pow(batPickup.y - y, 2));
if (batDist < 50 && !playerHoldingBat) {
// Pick up bat
playerHoldingBat = true;
playerBatGraphics = player.addChild(LK.getAsset('bat', {
anchorX: 0.5,
anchorY: 0.5
}));
playerBatGraphics.x = 30;
playerBatGraphics.y = -20;
batPickup.destroy();
batPickups.splice(i, 1);
LK.getSound('purchase').play();
break;
}
}
// Check if clicking to attack with bat
if (playerHoldingBat) {
// Attack with bat at click position
for (var i = 0; i < npcs.length; i++) {
var npc = npcs[i];
var distToClick = Math.sqrt(Math.pow(npc.x - x, 2) + Math.pow(npc.y - y, 2));
var distToPlayer = Math.sqrt(Math.pow(player.x - npc.x, 2) + Math.pow(player.y - npc.y, 2));
if (distToClick < 100 && distToPlayer < 150 && npc.carriedBrainrot) {
// Return stolen brainrot to player base
npc.carriedBrainrot.owner = player;
npc.carriedBrainrot.target = playerBase;
npc.carriedBrainrot.isCarried = false;
npc.carriedBrainrot = null;
npc.state = 'idle';
npc.stateTimer = 180;
npc.target = null;
LK.getSound('hit').play();
// Flash effect on NPC
tween(npc, {
tint: 0xff0000
}, {
duration: 200,
onFinish: function onFinish() {
tween(npc, {
tint: 0xffffff
}, {
duration: 200
});
}
});
break;
}
}
}
// Check if clicking on player base to block it (only when touching it)
var baseDist = Math.sqrt(Math.pow(playerBase.x - x, 2) + Math.pow(playerBase.y - y, 2));
var playerToBaseDist = Math.sqrt(Math.pow(player.x - playerBase.x, 2) + Math.pow(player.y - playerBase.y, 2));
if (baseDist < 100 && playerToBaseDist < 150 && playerBlockTime <= 0) {
playerBlockTime = baseBlockDuration;
}
// Check if clicking on NPC bases to steal brainrots
for (var i = 0; i < npcBases.length; i++) {
var npcBase = npcBases[i];
var npcBaseDist = Math.sqrt(Math.pow(npcBase.x - x, 2) + Math.pow(npcBase.y - y, 2));
if (npcBaseDist < 100 && !player.carriedBrainrot) {
// Check if player is close enough to the base
var playerDist = Math.sqrt(Math.pow(player.x - npcBase.x, 2) + Math.pow(player.y - npcBase.y, 2));
if (playerDist < 150) {
// Check if base is blocked
if (npcBlockTimes[i] <= 0) {
// Find a brainrot in this base to steal
for (var j = 0; j < brainrots.length; j++) {
var brainrot = brainrots[j];
if (!brainrot.isCarried && brainrot.owner === npcs[i] && npcBase.intersects(brainrot)) {
player.carriedBrainrot = brainrot;
brainrot.isCarried = true;
brainrot.owner = player;
LK.getSound('steal').play();
break;
}
}
}
}
break;
}
}
// Check if clicking on brainrot to steal from any location
for (var i = 0; i < brainrots.length; i++) {
var brainrot = brainrots[i];
if (!brainrot.isCarried && brainrot.owner !== player && !player.carriedBrainrot && Math.abs(brainrot.x - x) < 60 && Math.abs(brainrot.y - y) < 60) {
// Check if player is close enough
var dist = Math.sqrt(Math.pow(player.x - brainrot.x, 2) + Math.pow(player.y - brainrot.y, 2));
if (dist < 150) {
// Check if target base is blocked
var canSteal = true;
for (var j = 0; j < npcs.length; j++) {
if (brainrot.owner === npcs[j] && npcBlockTimes[j] > 0) {
canSteal = false;
break;
}
}
if (canSteal) {
player.carriedBrainrot = brainrot;
brainrot.isCarried = true;
brainrot.owner = player;
LK.getSound('steal').play();
}
break;
}
}
}
};
game.up = function (x, y, obj) {
// Check if releasing brainrot at base
if (player.carriedBrainrot && player.intersects(playerBase)) {
player.carriedBrainrot.isCarried = false;
player.carriedBrainrot.target = playerBase;
player.carriedBrainrot = null;
LK.getSound('deposit').play();
}
};
// Main game update
game.update = function () {
// Update block timers
if (playerBlockTime > 0) {
playerBlockTime--;
}
for (var i = 0; i < npcBlockTimes.length; i++) {
if (npcBlockTimes[i] > 0) {
npcBlockTimes[i]--;
}
}
// Update block status display
var isAnyBaseBlocked = playerBlockTime > 0;
var maxBlockTime = 0;
if (playerBlockTime > 0) {
maxBlockTime = Math.max(maxBlockTime, playerBlockTime);
}
for (var i = 0; i < npcBlockTimes.length; i++) {
if (npcBlockTimes[i] > 0) {
isAnyBaseBlocked = true;
maxBlockTime = Math.max(maxBlockTime, npcBlockTimes[i]);
}
}
if (isAnyBaseBlocked) {
blockStatusText.setText('BLOCK');
var timeLeft = Math.ceil(maxBlockTime / 60);
blockTimerText.setText('Time: ' + timeLeft + 's');
} else {
blockStatusText.setText('');
blockTimerText.setText('');
}
// Player movement disabled - no keyboard input processing
// Update brainrot count
var totalBrainrots = 0;
for (var i = 0; i < brainrots.length; i++) {
if (brainrots[i].owner === player && playerBase.intersects(brainrots[i]) && !brainrots[i].isCarried) {
totalBrainrots++;
}
}
brainrotCountText.setText('Brainrots: ' + totalBrainrots);
LK.setScore(totalBrainrots);
// NPCs can steal from player (but not when player base is blocked)
for (var i = 0; i < npcs.length; i++) {
var npc = npcs[i];
if (!npc.carriedBrainrot && npc.state === 'stealing' && playerBlockTime <= 0) {
// Check if NPC can steal player's carried brainrot
if (player.carriedBrainrot && npc.intersects(player)) {
npc.carriedBrainrot = player.carriedBrainrot;
player.carriedBrainrot.owner = npc;
player.carriedBrainrot = null;
npc.state = 'returning';
npc.target = npc.home;
LK.getSound('steal').play();
}
}
// NPCs can hit player with bat when player is stealing from their base
if (npc.holdingBat && player.carriedBrainrot && player.carriedBrainrot.owner === player) {
var distToPlayer = Math.sqrt(Math.pow(player.x - npc.x, 2) + Math.pow(player.y - npc.y, 2));
if (distToPlayer < 150 && player.carriedBrainrot) {
// Check if stolen brainrot originally belonged to this NPC
var wasFromThisNPC = false;
for (var j = 0; j < brainrots.length; j++) {
if (brainrots[j] === player.carriedBrainrot) {
// Find which NPC base this brainrot was near before stealing
for (var k = 0; k < npcBases.length; k++) {
var baseDist = Math.sqrt(Math.pow(npcBases[k].x - player.carriedBrainrot.x, 2) + Math.pow(npcBases[k].y - player.carriedBrainrot.y, 2));
if (baseDist < 200 && npcBases[k].owner === npc) {
wasFromThisNPC = true;
break;
}
}
break;
}
}
if (wasFromThisNPC) {
// Return stolen brainrot to NPC base
player.carriedBrainrot.owner = npc;
player.carriedBrainrot.target = npc.home;
player.carriedBrainrot.isCarried = false;
player.carriedBrainrot = null;
LK.getSound('hit').play();
// Flash effect on player
tween(player, {
tint: 0xff0000
}, {
duration: 200,
onFinish: function onFinish() {
tween(player, {
tint: 0xffffff
}, {
duration: 200
});
}
});
}
}
}
}
// Generate money from brainrots in base
if (LK.ticks % 60 === 0) {
// Every second, generate money based on brainrots in player base only
if (totalBrainrots > 0) {
player.money += totalBrainrots * moneyPerBrainrot;
storage.money = player.money;
moneyText.setText('Money: $' + player.money);
}
// NPCs also get money
for (var i = 0; i < npcs.length; i++) {
npcs[i].money += npcBases[i].brainrotCount * moneyPerBrainrot;
}
}
};
// Create virtual WASD controls
var controlContainer = new Container();
controlContainer.x = 200;
controlContainer.y = 2000;
game.addChild(controlContainer);
// Create control buttons
var buttonSize = 120;
var buttonColor = 0x555555;
var buttonActiveColor = 0x888888;
// W button
var wButton = controlContainer.addChild(LK.getAsset('arrow_up', {
width: buttonSize,
height: buttonSize,
tint: buttonColor,
anchorX: 0.5,
anchorY: 0.5,
x: 0,
y: -buttonSize
}));
var wText = new Text2('W', {
size: 60,
fill: '#ffffff'
});
wText.anchor.set(0.5, 0.5);
wButton.addChild(wText);
// A button
var aButton = controlContainer.addChild(LK.getAsset('arrow_left', {
width: buttonSize,
height: buttonSize,
tint: buttonColor,
anchorX: 0.5,
anchorY: 0.5,
x: -buttonSize,
y: 0
}));
var aText = new Text2('A', {
size: 60,
fill: '#ffffff'
});
aText.anchor.set(0.5, 0.5);
aButton.addChild(aText);
// S button
var sButton = controlContainer.addChild(LK.getAsset('arrow_down', {
width: buttonSize,
height: buttonSize,
tint: buttonColor,
anchorX: 0.5,
anchorY: 0.5,
x: 0,
y: buttonSize
}));
var sText = new Text2('S', {
size: 60,
fill: '#ffffff'
});
sText.anchor.set(0.5, 0.5);
sButton.addChild(sText);
// D button
var dButton = controlContainer.addChild(LK.getAsset('arrow_right', {
width: buttonSize,
height: buttonSize,
tint: buttonColor,
anchorX: 0.5,
anchorY: 0.5,
x: buttonSize,
y: 0
}));
var dText = new Text2('D', {
size: 60,
fill: '#ffffff'
});
dText.anchor.set(0.5, 0.5);
dButton.addChild(dText);
// Button press handlers
wButton.down = function () {
keys.w = true;
wButton.tint = buttonActiveColor;
};
wButton.up = function () {
keys.w = false;
wButton.tint = buttonColor;
};
aButton.down = function () {
keys.a = true;
aButton.tint = buttonActiveColor;
};
aButton.up = function () {
keys.a = false;
aButton.tint = buttonColor;
};
sButton.down = function () {
keys.s = true;
sButton.tint = buttonActiveColor;
};
sButton.up = function () {
keys.s = false;
sButton.tint = buttonColor;
};
dButton.down = function () {
keys.d = true;
dButton.tint = buttonActiveColor;
};
dButton.up = function () {
keys.d = false;
dButton.tint = buttonColor;
};
// Play background music
LK.playMusic('bgmusic');
;
Una base estilo Roblox, base donde guardas cosas. High contrast
Estilo 3d roblox
hazlo realista
hazlo realista
Haz a un macaco con cuerpo de plátano medio abierto, Ultra Realista, sin brazos ni piernas.. In-Game asset. 2d. High contrast. No shadows. Ultra Realista
Haz que tenga piernas
Haz un bate realista. In-Game asset. 2d. High contrast. No shadows. Ultra Realista
Hazlo Realista
Hazlo realista
La imagen es una ilustración digital de un personaje animado que parece ser un trozo de madera o un objeto de madera con características humanoides y una expresión amigable pero algo peculiar. Aquí una descripción detallada: Cuerpo Principal (Tronco): El cuerpo principal del personaje es un cilindro de madera de color marrón claro, con una textura que sugiere vetas de madera. La parte superior es redondeada, formando la "cabeza". Ultra Realista Rostro: La "cabeza" tiene un rostro con rasgos humanos: Ojos: Dos ojos grandes y redondos, con iris marrones y pupilas negras que miran ligeramente hacia el lado izquierdo del personaje. Tienen un brillo que les da un aspecto vívido. Cejas: Cejas finas y elevadas, que contribuyen a la expresión de sorpresa o curiosidad. Nariz: Una nariz pequeña y estilizada que sobre. In-Game asset. 2d. High contrast. No shadows. Ultra Realista. Ultra Realista
Hazlo Realista