User prompt
Please fix the bug: 'Error: Invalid value. Only literals or 1-level deep objects/arrays containing literals are allowed.' in or related to this line: 'highScores[i] = newScoreObj;' Line Number: 1085
User prompt
Please fix the bug: 'Error: Invalid value. Only literals or 1-level deep objects/arrays containing literals are allowed.' in or related to this line: 'highScores[i] = {' Line Number: 1080 ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Please fix the bug: 'Error: Invalid value. Only literals or 1-level deep objects/arrays containing literals are allowed.' in or related to this line: 'highScores[i] = {' Line Number: 1079
User prompt
add username to high score list
User prompt
Create high score tally to save high scores and show tally before games ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Add launch sound
User prompt
Play game starts sound when game starts and at game over
User prompt
Remove launch sound
User prompt
Add backdrop asset
User prompt
Add free launch animated text when player wins a free launch ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Add 1 launch every million points
User prompt
Thanks
User prompt
Tap screen to keep chicken spinning
User prompt
Tap screen to keep chicken spinning
User prompt
Create high score list ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Remove win target
User prompt
Score 1000000 to win
User prompt
Reduce launches to 5
User prompt
Reach 100000 to win the game
User prompt
Increase launches to 20
User prompt
No launches reset
User prompt
Player only has 5 launches
User prompt
Add more popcorn
User prompt
Control chickens movement by tracing a path and slow chicken down so game doesn't freeze
User prompt
Please fix the bug: 'TypeError: Graphics is not a constructor' in or related to this line: 'var lineGraphics = new Graphics();' Line Number: 408
/**** 
* Plugins
****/ 
var tween = LK.import("@upit/tween.v1");
var storage = LK.import("@upit/storage.v1");
/**** 
* Classes
****/ 
var ChickenJockey = Container.expand(function () {
	var self = Container.call(this);
	// Create and attach chicken asset
	var chickenGraphics = self.attachAsset('chicken', {
		anchorX: 0.5,
		anchorY: 0.5
	});
	// Physics properties
	self.vx = 0;
	self.vy = 0;
	self.gravity = 0.5;
	self.bounceDecay = 0.7; // Reduced bounce decay for more sustained bounces
	self.friction = 0.998; // Increased horizontal friction for less horizontal drift
	self.launched = false;
	self.bounceCount = 0;
	self.maxBounces = 5; // Allow 5 bounces per swipe
	// Rotation properties
	self.rotationSpeed = 0;
	self.launch = function (power, angle) {
		// Convert angle to radians
		var radians = angle * Math.PI / 180;
		// Set initial velocity based on power and angle
		self.vx = Math.cos(radians) * power;
		self.vy = Math.sin(radians) * power;
		// Set rotation speed based on velocity
		self.rotationSpeed = power / 50;
		self.launched = true;
		self.bounceCount = 0;
		// Play launch sound
		LK.getSound('launch').play();
	};
	self.reset = function () {
		self.vx = 0;
		self.vy = 0;
		self.rotation = 0;
		self.rotationSpeed = 0;
		self.launched = false;
		self.bounceCount = 0;
		self.maxBounces = 300; // Set the max bounces here too
	};
	self.update = function () {
		if (!self.launched) {
			return;
		}
		// Apply physics with speed limiting
		self.vy += self.gravity;
		// Cap maximum velocity to prevent freezing
		var maxSpeed = 30;
		self.vx = Math.max(-maxSpeed, Math.min(maxSpeed, self.vx));
		self.vy = Math.max(-maxSpeed, Math.min(maxSpeed, self.vy));
		self.x += self.vx;
		self.y += self.vy;
		self.vx *= self.friction;
		// Apply rotation with speed limiting
		self.rotationSpeed = Math.max(-0.2, Math.min(0.2, self.rotationSpeed));
		self.rotation += self.rotationSpeed;
		// Check if stopped
		if (Math.abs(self.vx) < 0.5 && Math.abs(self.vy) < 0.5 && self.bounceCount > 0) {
			self.launched = false;
			// Notify game that chicken jockey has stopped
			if (typeof game.onChickenJockeyStop === 'function') {
				game.onChickenJockeyStop();
			}
		}
		// Check if max bounces reached
		if (self.bounceCount >= self.maxBounces) {
			self.launched = false;
			// Notify game that max bounces reached
			if (typeof game.onMaxBouncesReached === 'function') {
				game.onMaxBouncesReached();
			}
		}
	};
	return self;
});
var HighScoreList = Container.expand(function () {
	var self = Container.call(this);
	var listItems = [];
	var maxScores = 5;
	var itemHeight = 60;
	var listWidth = 800;
	// Create list background
	var background = self.attachAsset('rope', {
		anchorX: 0.5,
		anchorY: 0.5
	});
	background.width = listWidth;
	background.height = itemHeight * (maxScores + 1); // +1 for title
	background.tint = 0x000000;
	background.alpha = 0.7;
	// Create title
	var titleText = new Text2("HIGH SCORES", {
		size: 50,
		fill: 0xFFFFFF
	});
	titleText.anchor.set(0.5, 0.5);
	titleText.y = -(background.height / 2) + itemHeight / 2;
	self.addChild(titleText);
	// Load and display high scores
	self.updateScores = function (currentScore) {
		// Clear existing score texts
		for (var i = 0; i < listItems.length; i++) {
			if (listItems[i].parent) {
				listItems[i].parent.removeChild(listItems[i]);
			}
		}
		listItems = [];
		// Load scores from storage
		var highScores = storage.highScores || [];
		// Add current score if provided
		if (currentScore !== undefined) {
			highScores.push(currentScore);
		}
		// Sort scores in descending order
		highScores.sort(function (a, b) {
			return b - a;
		});
		// Keep only top scores
		highScores = highScores.slice(0, maxScores);
		// Save back to storage
		storage.highScores = highScores;
		// Display scores
		for (var i = 0; i < highScores.length; i++) {
			var scoreText = new Text2(i + 1 + ". " + highScores[i], {
				size: 40,
				fill: 0xFFFFFF
			});
			// Highlight current score
			if (currentScore !== undefined && highScores[i] === currentScore) {
				scoreText.tint = 0xFFFF00;
			}
			scoreText.anchor.set(0.5, 0.5);
			scoreText.y = -(background.height / 2) + (i + 1.5) * itemHeight;
			self.addChild(scoreText);
			listItems.push(scoreText);
		}
		// If no scores yet
		if (highScores.length === 0) {
			var noScoreText = new Text2("No scores yet!", {
				size: 40,
				fill: 0xAAAAAA
			});
			noScoreText.anchor.set(0.5, 0.5);
			noScoreText.y = -(background.height / 2) + 1.5 * itemHeight;
			self.addChild(noScoreText);
			listItems.push(noScoreText);
		}
	};
	// Show the high score list
	self.show = function () {
		self.visible = true;
		self.updateScores();
	};
	// Hide the high score list
	self.hide = function () {
		self.visible = false;
	};
	return self;
});
var PathTracer = Container.expand(function () {
	var self = Container.call(this);
	self.points = [];
	self.maxPoints = 50;
	self.lineWidth = 5;
	self.lineColor = 0xFFFFFF;
	self.active = false;
	// Create visual representation of the path
	var pathGraphics = self.attachAsset('rope', {
		anchorX: 0.5,
		anchorY: 0.5
	});
	// Initialize path graphics
	pathGraphics.alpha = 0.5;
	pathGraphics.width = 0;
	pathGraphics.height = 0;
	self.startTracing = function (x, y) {
		self.points = [{
			x: x,
			y: y
		}];
		self.active = true;
	};
	self.addPoint = function (x, y) {
		if (!self.active) {
			return;
		}
		// Only add point if it's significantly different from last point
		var lastPoint = self.points[self.points.length - 1];
		var dx = x - lastPoint.x;
		var dy = y - lastPoint.y;
		var distance = Math.sqrt(dx * dx + dy * dy);
		if (distance > 20) {
			self.points.push({
				x: x,
				y: y
			});
			// Limit number of points
			if (self.points.length > self.maxPoints) {
				self.points.shift();
			}
		}
	};
	self.stopTracing = function () {
		self.active = false;
		return self.points.length >= 2 ? self.points : null;
	};
	self.clear = function () {
		self.points = [];
		self.active = false;
	};
	self.update = function () {
		// Update path visualization based on current points
		if (self.points.length < 2) {
			pathGraphics.alpha = 0;
			return;
		}
		pathGraphics.alpha = 0.5;
		// Calculate path visual representation
		var firstPoint = self.points[0];
		var lastPoint = self.points[self.points.length - 1];
		// Position at midpoint of path
		self.x = (firstPoint.x + lastPoint.x) / 2;
		self.y = (firstPoint.y + lastPoint.y) / 2;
		// Calculate path length and angle
		var dx = lastPoint.x - firstPoint.x;
		var dy = lastPoint.y - firstPoint.y;
		var length = Math.sqrt(dx * dx + dy * dy);
		var angle = Math.atan2(dy, dx);
		// Update path graphics
		pathGraphics.width = length;
		pathGraphics.height = self.lineWidth;
		pathGraphics.rotation = angle;
	};
	return self;
});
var Popcorn = Container.expand(function () {
	var self = Container.call(this);
	// Create and attach popcorn asset
	var popcornGraphics = self.attachAsset('popcorn', {
		anchorX: 0.5,
		anchorY: 0.5
	});
	// Add slight animation
	self.animationOffset = Math.random() * Math.PI * 2;
	self.animationSpeed = 0.03 + Math.random() * 0.02;
	self.baseY = 0;
	self.collect = function () {
		// Play collect sound
		LK.getSound('collect').play();
		// Flash effect
		LK.effects.flashObject(self, 0xFFFFFF, 200);
		// Animate collection (flying up)
		tween(self, {
			y: self.y - 100,
			alpha: 0
		}, {
			duration: 500,
			easing: tween.easeOut,
			onFinish: function onFinish() {
				// Remove from parent
				if (self.parent) {
					self.parent.removeChild(self);
				}
			}
		});
	};
	self.update = function () {
		// Hover animation
		if (self.baseY === 0) {
			self.baseY = self.y;
		}
		self.y = self.baseY + Math.sin(LK.ticks * self.animationSpeed + self.animationOffset) * 5;
	};
	return self;
});
var Rope = Container.expand(function () {
	var self = Container.call(this);
	// Create and attach rope asset
	var ropeGraphics = self.attachAsset('rope', {
		anchorX: 0.5,
		anchorY: 0.5
	});
	// Rope properties
	self.tension = 0.5; // Reduced tension for less chaotic bounces
	self.bounce = function (chickenJockey) {
		// Calculate new velocity based on collision angle and rope tension
		var normalAngle = Math.atan2(chickenJockey.y - self.y, chickenJockey.x - self.x); // Angle from rope to chicken
		// Calculate new velocity based on angle and tension
		var speed = Math.sqrt(chickenJockey.vx * chickenJockey.vx + chickenJockey.vy * chickenJockey.vy);
		var bounceAngle = 2 * normalAngle - Math.atan2(chickenJockey.vy, chickenJockey.vx); // Angle of reflection
		var bounceForce = speed * self.tension;
		chickenJockey.vx = Math.cos(bounceAngle) * bounceForce * chickenJockey.bounceDecay;
		chickenJockey.vy = Math.sin(bounceAngle) * bounceForce * chickenJockey.bounceDecay;
		// Increment bounce count
		chickenJockey.bounceCount++;
		// Play bounce sound
		LK.getSound('bounce').play();
		// Flash rope to indicate bounce
		LK.effects.flashObject(self, 0xFFFFFF, 200);
		// Add points for bouncing
		if (typeof game.addScore === 'function') {
			game.addScore(5000);
		}
		// Occasionally spawn popcorn on rope bounce
		if (Math.random() < 0.3 && typeof game.createPopcornAt === 'function') {
			game.createPopcornAt(chickenJockey.x, chickenJockey.y, 3);
		}
	};
	self.intersectsWithPoint = function (x, y) {
		var halfWidth = ropeGraphics.width / 2;
		var halfHeight = ropeGraphics.height / 2;
		// Check if point is within the rope's bounding box
		return x >= self.x - halfWidth && x <= self.x + halfWidth && y >= self.y - halfHeight && y <= self.y + halfHeight;
	};
	return self;
});
/**** 
* Initialize Game
****/ 
var game = new LK.Game({
	backgroundColor: 0x000000 // Black background
});
/**** 
* Game Code
****/ 
// Game state
var gameState = "ready"; // ready, aiming, launched, gameOver
var score = 0;
var launches = 0;
var maxLaunches = 5;
var popcorns = [];
var ropes = [];
var pathTracer = game.addChild(new PathTracer());
var highScoreList = game.addChild(new HighScoreList());
// Position the high score list in the center
highScoreList.x = 2048 / 2;
highScoreList.y = 2732 / 2;
highScoreList.visible = false;
// Create wrestling arena
var arena = game.addChild(LK.getAsset('arena', {
	anchorX: 0.5,
	anchorY: 0.5,
	x: 2048 / 2,
	y: 2732 / 2
}));
// Create chicken jockey
var chickenJockey = game.addChild(new ChickenJockey());
// Game boundaries
var bounds = {
	left: arena.x - arena.width / 2,
	right: arena.x + arena.width / 2,
	top: arena.y - arena.height / 2,
	bottom: arena.y + arena.height / 2
};
// Create GUI elements
var scoreText = new Text2("Score: 0", {
	size: 70,
	fill: 0xFFFFFF
});
scoreText.anchor.set(0.5, 0);
LK.gui.top.addChild(scoreText);
var launchesText = new Text2("Launches: 0/" + maxLaunches, {
	size: 50,
	fill: 0xFFFFFF
});
launchesText.anchor.set(0, 0);
launchesText.x = 120; // Avoid top-left corner
launchesText.y = 20;
LK.gui.topLeft.addChild(launchesText);
var instructionText = new Text2("Drag to aim and launch the chicken!", {
	size: 40,
	fill: 0xFFFFFF
});
instructionText.anchor.set(0.5, 0);
instructionText.y = 100;
LK.gui.top.addChild(instructionText);
// Add high score button
var highScoreButton = LK.gui.topRight.addChild(new Text2("HIGH SCORES", {
	size: 40,
	fill: 0xFFFFFF
}));
highScoreButton.anchor.set(1, 0);
highScoreButton.x = -20;
highScoreButton.y = 20;
highScoreButton.interactive = true;
// High score button event handlers
highScoreButton.down = function () {
	if (gameState === "ready") {
		if (highScoreList.visible) {
			highScoreList.hide();
		} else {
			highScoreList.show();
		}
	}
};
// Initialize game
function initGame() {
	// Reset variables
	score = 0;
	launches = 0;
	maxLaunches = 5;
	gameState = "ready";
	// Update UI
	scoreText.setText("Score: " + score);
	launchesText.setText("Launches: " + launches + "/" + maxLaunches);
	instructionText.setText("Swipe to launch the chicken!");
	// Reset chicken jockey
	resetChickenJockey();
	// Clear existing popcorn and ropes
	clearPopcornsAndRopes();
	// Create ropes around the arena
	createRopes();
	// Create popcorn scattered around the arena
	createPopcorn(40);
	// Play background music
	LK.playMusic('gameMusic');
	// Hide high score list if visible
	if (highScoreList && highScoreList.visible) {
		highScoreList.hide();
	}
}
function resetChickenJockey() {
	chickenJockey.reset();
	// Position chicken in the center of the arena
	chickenJockey.x = arena.x;
	chickenJockey.y = arena.y;
}
function clearPopcornsAndRopes() {
	// Remove all popcorn
	for (var i = 0; i < popcorns.length; i++) {
		if (popcorns[i].parent) {
			popcorns[i].parent.removeChild(popcorns[i]);
		}
	}
	popcorns = [];
	// Remove all ropes
	for (var i = 0; i < ropes.length; i++) {
		if (ropes[i].parent) {
			ropes[i].parent.removeChild(ropes[i]);
		}
	}
	ropes = [];
}
function createRopes() {
	// Create top rope
	var topRope = new Rope();
	topRope.x = arena.x;
	topRope.y = bounds.top + 100;
	game.addChild(topRope);
	ropes.push(topRope);
	// Create right rope
	var rightRope = new Rope();
	rightRope.x = bounds.right - 100;
	rightRope.y = arena.y;
	rightRope.rotation = Math.PI / 2; // Rotate 90 degrees
	game.addChild(rightRope);
	ropes.push(rightRope);
	// Create bottom rope
	var bottomRope = new Rope();
	bottomRope.x = arena.x;
	bottomRope.y = bounds.bottom - 100;
	game.addChild(bottomRope);
	ropes.push(bottomRope);
	// Create left rope
	var leftRope = new Rope();
	leftRope.x = bounds.left + 100;
	leftRope.y = arena.y;
	leftRope.rotation = Math.PI / 2; // Rotate 90 degrees
	game.addChild(leftRope);
	ropes.push(leftRope);
}
function createPopcorn(count) {
	for (var i = 0; i < count; i++) {
		var popcorn = new Popcorn();
		// Random position within arena bounds
		popcorn.x = bounds.left + 100 + Math.random() * (arena.width - 200);
		popcorn.y = bounds.top + 100 + Math.random() * (arena.height - 200);
		// Add to game
		game.addChild(popcorn);
		popcorns.push(popcorn);
	}
}
// Game events
game.onChickenJockeyStop = function () {
	gameState = "ready";
	// Add more popcorn when chicken jockey stops
	if (popcorns.length < 20) {
		createPopcorn(15);
	}
	// Check if out of launches
	if (launches >= maxLaunches) {
		// Check if out of launches
		if (launches >= maxLaunches) {
			// Game over
			instructionText.setText("Game Over! Final Score: " + score);
			gameState = "gameOver";
			// Show high score list with current score
			highScoreList.updateScores(score);
			highScoreList.show();
			// Show game over after a short delay
			LK.setTimeout(function () {
				LK.showGameOver();
			}, 3000);
		}
	} else {
		// Reset for next launch
		resetChickenJockey();
		instructionText.setText("Drag to aim and launch the chicken!");
	}
};
game.onMaxBouncesReached = function () {
	// Same as onChickenJockeyStop for now
	game.onChickenJockeyStop();
};
// Input handling
var dragStartX = 0;
var dragStartY = 0;
var dragEndX = 0;
var dragEndY = 0;
game.down = function (x, y, obj) {
	if (gameState === "ready") {
		gameState = "aiming";
		dragStartX = x;
		dragStartY = y;
		pathTracer.startTracing(x, y);
		instructionText.setText("Draw a path for the chicken!");
	}
};
game.move = function (x, y, obj) {
	if (gameState === "aiming") {
		pathTracer.addPoint(x, y);
	}
};
game.up = function (x, y, obj) {
	if (gameState === "aiming") {
		// Get the path from the path tracer
		var path = pathTracer.stopTracing();
		// Only launch if we have a valid path
		if (path && path.length >= 2) {
			// Record drag end position
			dragEndX = x;
			dragEndY = y;
			// Calculate direction from the path
			var firstPoint = path[0];
			var lastPoint = path[path.length - 1];
			var dx = lastPoint.x - firstPoint.x;
			var dy = lastPoint.y - firstPoint.y;
			var distance = Math.sqrt(dx * dx + dy * dy);
			// Calculate power based on path length (with a more controlled range)
			var power = Math.min(distance, 200) * 0.2;
			// Calculate angle based on path direction
			var angle = Math.atan2(dy, dx) * 180 / Math.PI;
			chickenJockey.launch(power, angle);
			// Update game state
			gameState = "launched";
			launches++;
			launchesText.setText("Launches: " + launches + "/" + maxLaunches);
			instructionText.setText("Watch the chicken bounce!");
		} else {
			// Cancel the launch if the path was too short
			gameState = "ready";
		}
		// Clear the path tracer regardless
		pathTracer.clear();
	}
};
// Add helper to update score
game.addScore = function (points) {
	score += points;
	scoreText.setText("Score: " + score);
	LK.setScore(score);
};
// Helper method to create popcorn at specific location
game.createPopcornAt = function (x, y, count) {
	count = count || 1;
	for (var i = 0; i < count; i++) {
		var popcorn = new Popcorn();
		// Position near the specified location with some random offset
		var offsetX = (Math.random() - 0.5) * 200;
		var offsetY = (Math.random() - 0.5) * 200;
		popcorn.x = Math.max(bounds.left + 50, Math.min(bounds.right - 50, x + offsetX));
		popcorn.y = Math.max(bounds.top + 50, Math.min(bounds.bottom - 50, y + offsetY));
		// Add to game
		game.addChild(popcorn);
		popcorns.push(popcorn);
	}
};
// Main game loop
game.update = function () {
	// Update all game objects
	if (gameState === "launched") {
		chickenJockey.update();
		// Check for collisions with arena boundaries
		if (chickenJockey.x < bounds.left) {
			chickenJockey.x = bounds.left;
			chickenJockey.vx = -chickenJockey.vx * chickenJockey.bounceDecay; // Apply decay on horizontal bounce
			chickenJockey.bounceCount++;
			LK.getSound('bounce').play();
			game.addScore(2000);
		} else if (chickenJockey.x > bounds.right) {
			chickenJockey.x = bounds.right;
			chickenJockey.vx = -chickenJockey.vx * chickenJockey.bounceDecay; // Apply decay on horizontal bounce
			chickenJockey.bounceCount++;
			LK.getSound('bounce').play();
			game.addScore(2000);
		}
		if (chickenJockey.y < bounds.top) {
			chickenJockey.y = bounds.top;
			chickenJockey.vy = -chickenJockey.vy * chickenJockey.bounceDecay; // Apply decay on vertical bounce
			chickenJockey.bounceCount++;
			LK.getSound('bounce').play();
			game.addScore(2000);
		} else if (chickenJockey.y > bounds.bottom) {
			chickenJockey.y = bounds.bottom;
			chickenJockey.vy = -chickenJockey.vy * chickenJockey.bounceDecay; // Apply decay on vertical bounce
			chickenJockey.bounceCount++;
			LK.getSound('bounce').play();
			game.addScore(2000);
		}
		// Check for collisions with ropes
		for (var i = 0; i < ropes.length; i++) {
			if (chickenJockey.intersects(ropes[i])) {
				ropes[i].bounce(chickenJockey);
			}
		}
		// Check for collisions with popcorn
		for (var i = popcorns.length - 1; i >= 0; i--) {
			if (chickenJockey.intersects(popcorns[i])) {
				// Collect popcorn
				popcorns[i].collect();
				// Remove from array
				popcorns.splice(i, 1);
				// Increase score
				game.addScore(10000);
				scoreText.setText("Score: " + score);
				// Save score to LK
				LK.setScore(score);
				// No longer reset launches when score reaches 1000
			}
		}
	}
	// Update popcorn animations
	for (var i = 0; i < popcorns.length; i++) {
		popcorns[i].update();
	}
	// Update path tracer
	pathTracer.update();
};
// Initialize the game
initGame(); ===================================================================
--- original.js
+++ change.js
@@ -81,8 +81,92 @@
 		}
 	};
 	return self;
 });
+var HighScoreList = Container.expand(function () {
+	var self = Container.call(this);
+	var listItems = [];
+	var maxScores = 5;
+	var itemHeight = 60;
+	var listWidth = 800;
+	// Create list background
+	var background = self.attachAsset('rope', {
+		anchorX: 0.5,
+		anchorY: 0.5
+	});
+	background.width = listWidth;
+	background.height = itemHeight * (maxScores + 1); // +1 for title
+	background.tint = 0x000000;
+	background.alpha = 0.7;
+	// Create title
+	var titleText = new Text2("HIGH SCORES", {
+		size: 50,
+		fill: 0xFFFFFF
+	});
+	titleText.anchor.set(0.5, 0.5);
+	titleText.y = -(background.height / 2) + itemHeight / 2;
+	self.addChild(titleText);
+	// Load and display high scores
+	self.updateScores = function (currentScore) {
+		// Clear existing score texts
+		for (var i = 0; i < listItems.length; i++) {
+			if (listItems[i].parent) {
+				listItems[i].parent.removeChild(listItems[i]);
+			}
+		}
+		listItems = [];
+		// Load scores from storage
+		var highScores = storage.highScores || [];
+		// Add current score if provided
+		if (currentScore !== undefined) {
+			highScores.push(currentScore);
+		}
+		// Sort scores in descending order
+		highScores.sort(function (a, b) {
+			return b - a;
+		});
+		// Keep only top scores
+		highScores = highScores.slice(0, maxScores);
+		// Save back to storage
+		storage.highScores = highScores;
+		// Display scores
+		for (var i = 0; i < highScores.length; i++) {
+			var scoreText = new Text2(i + 1 + ". " + highScores[i], {
+				size: 40,
+				fill: 0xFFFFFF
+			});
+			// Highlight current score
+			if (currentScore !== undefined && highScores[i] === currentScore) {
+				scoreText.tint = 0xFFFF00;
+			}
+			scoreText.anchor.set(0.5, 0.5);
+			scoreText.y = -(background.height / 2) + (i + 1.5) * itemHeight;
+			self.addChild(scoreText);
+			listItems.push(scoreText);
+		}
+		// If no scores yet
+		if (highScores.length === 0) {
+			var noScoreText = new Text2("No scores yet!", {
+				size: 40,
+				fill: 0xAAAAAA
+			});
+			noScoreText.anchor.set(0.5, 0.5);
+			noScoreText.y = -(background.height / 2) + 1.5 * itemHeight;
+			self.addChild(noScoreText);
+			listItems.push(noScoreText);
+		}
+	};
+	// Show the high score list
+	self.show = function () {
+		self.visible = true;
+		self.updateScores();
+	};
+	// Hide the high score list
+	self.hide = function () {
+		self.visible = false;
+	};
+	return self;
+});
 var PathTracer = Container.expand(function () {
 	var self = Container.call(this);
 	self.points = [];
 	self.maxPoints = 50;
@@ -257,8 +341,13 @@
 var maxLaunches = 5;
 var popcorns = [];
 var ropes = [];
 var pathTracer = game.addChild(new PathTracer());
+var highScoreList = game.addChild(new HighScoreList());
+// Position the high score list in the center
+highScoreList.x = 2048 / 2;
+highScoreList.y = 2732 / 2;
+highScoreList.visible = false;
 // Create wrestling arena
 var arena = game.addChild(LK.getAsset('arena', {
 	anchorX: 0.5,
 	anchorY: 0.5,
@@ -295,8 +384,27 @@
 });
 instructionText.anchor.set(0.5, 0);
 instructionText.y = 100;
 LK.gui.top.addChild(instructionText);
+// Add high score button
+var highScoreButton = LK.gui.topRight.addChild(new Text2("HIGH SCORES", {
+	size: 40,
+	fill: 0xFFFFFF
+}));
+highScoreButton.anchor.set(1, 0);
+highScoreButton.x = -20;
+highScoreButton.y = 20;
+highScoreButton.interactive = true;
+// High score button event handlers
+highScoreButton.down = function () {
+	if (gameState === "ready") {
+		if (highScoreList.visible) {
+			highScoreList.hide();
+		} else {
+			highScoreList.show();
+		}
+	}
+};
 // Initialize game
 function initGame() {
 	// Reset variables
 	score = 0;
@@ -316,8 +424,12 @@
 	// Create popcorn scattered around the arena
 	createPopcorn(40);
 	// Play background music
 	LK.playMusic('gameMusic');
+	// Hide high score list if visible
+	if (highScoreList && highScoreList.visible) {
+		highScoreList.hide();
+	}
 }
 function resetChickenJockey() {
 	chickenJockey.reset();
 	// Position chicken in the center of the arena
@@ -392,12 +504,15 @@
 		if (launches >= maxLaunches) {
 			// Game over
 			instructionText.setText("Game Over! Final Score: " + score);
 			gameState = "gameOver";
+			// Show high score list with current score
+			highScoreList.updateScores(score);
+			highScoreList.show();
 			// Show game over after a short delay
 			LK.setTimeout(function () {
 				LK.showGameOver();
-			}, 2000);
+			}, 3000);
 		}
 	} else {
 		// Reset for next launch
 		resetChickenJockey();
:quality(85)/https://cdn.frvr.ai/680e2cb731e90df6e3a79663.png%3F3) 
 :quality(85)/https://cdn.frvr.ai/680f25b74b91ed99c0c93065.png%3F3) 
 :quality(85)/https://cdn.frvr.ai/68107d72af890f4678fa3c0c.png%3F3) 
 :quality(85)/https://cdn.frvr.ai/6811f7e547f9689b747b894b.png%3F3) 
 X5 symbol. In-Game asset. 2d. High contrast. No shadows
:quality(85)/https://cdn.frvr.ai/6811f84547f9689b747b8951.png%3F3) 
 X2 symbol. In-Game asset. 2d. High contrast. No shadows
:quality(85)/https://cdn.frvr.ai/6812d11c31e90df6e3a797a7.png%3F3) 
 :quality(85)/https://cdn.frvr.ai/6812d23e21b2d4faceef26d6.png%3F3) 
 Super popcorn yellow. In-Game asset. 2d. High contrast. No shadows
:quality(85)/https://cdn.frvr.ai/6814a4059dcd06d468edb7f4.png%3F3) 
 :quality(85)/https://cdn.frvr.ai/6814a730211045a0f483816f.png%3F3) 
 :quality(85)/https://cdn.frvr.ai/6814a81e211045a0f4838182.png%3F3) 
 :quality(85)/https://cdn.frvr.ai/6814a94a211045a0f483818b.png%3F3) 
 :quality(85)/https://cdn.frvr.ai/6814aa19211045a0f4838190.png%3F3) 
 :quality(85)/https://cdn.frvr.ai/6814aae1211045a0f4838194.png%3F3) 
 :quality(85)/https://cdn.frvr.ai/6814dcf6bef1291d4e518ee7.png%3F3) 
 :quality(85)/https://cdn.frvr.ai/6814e89f0e23fbc7292fa249.png%3F3) 
 Start button. In-Game asset. 2d. High contrast. No shadows
:quality(85)/https://cdn.frvr.ai/6814e9750e23fbc7292fa26a.png%3F3) 
 High score button. In-Game asset. 2d. High contrast. No shadows
:quality(85)/https://cdn.frvr.ai/6814ea630e23fbc7292fa285.png%3F3) 
 Back button. In-Game asset. 2d. High contrast. No shadows
:quality(85)/https://cdn.frvr.ai/6814eb8e0e23fbc7292fa299.png%3F3) 
 SELECT YOUR CHARACTER button. In-Game asset. 2d. High contrast. No shadows
:quality(85)/https://cdn.frvr.ai/6814ed0e0e23fbc7292fa2b0.png%3F3) 
 Launches button. In-Game asset. 2d. High contrast. No shadows
:quality(85)/https://cdn.frvr.ai/6814f180fb90c04ce18c733a.png%3F3) 
 How to play button. In-Game asset. 2d. High contrast. No shadows
:quality(85)/https://cdn.frvr.ai/6814f1d4fb90c04ce18c733e.png%3F3) 
 Score button. In-Game asset. 2d. High contrast. No shadows
:quality(85)/https://cdn.frvr.ai/6814fcd30e23fbc7292fa369.png%3F3) 
 High Scores button. In-Game asset. 2d. High contrast. No shadows
:quality(85)/https://cdn.frvr.ai/6814fe1d0e23fbc7292fa377.png%3F3) 
 Transparent padlock. In-Game asset. 2d. High contrast. No shadows
:quality(85)/https://cdn.frvr.ai/6814ff160e23fbc7292fa382.png%3F3) 
 Chicken jockey character. In-Game asset. 2d. High contrast. No shadows
:quality(85)/https://cdn.frvr.ai/6815cc2e1a2f31aebc36772c.png%3F3) 
 Reset scores button. In-Game asset. 2d. High contrast. No shadows
:quality(85)/https://cdn.frvr.ai/6815e8706137896f737201af.png%3F3) 
 :quality(85)/https://cdn.frvr.ai/6816d35ae16864a155151a6f.png%3F3) 
 :quality(85)/https://cdn.frvr.ai/6816db39d574efc6b10a8c23.png%3F3) 
 Spider jockey unlocked button. In-Game asset. 2d. High contrast. No shadows
:quality(85)/https://cdn.frvr.ai/6816dba1d574efc6b10a8c2b.png%3F3) 
 Minecraft Steve unlocked button. In-Game asset. 2d. High contrast. No shadows
:quality(85)/https://cdn.frvr.ai/6816dc6cd574efc6b10a8c3b.png%3F3) 
 Piglin unlocked button. In-Game asset. 2d. High contrast. No shadows
:quality(85)/https://cdn.frvr.ai/6816dcafd574efc6b10a8c41.png%3F3) 
 Minecraft skeleton unlocked button. In-Game asset. 2d. High contrast. No shadows
:quality(85)/https://cdn.frvr.ai/6816dd05d574efc6b10a8c49.png%3F3) 
 Minecraft villager unlocked button. In-Game asset. 2d. High contrast. No shadows
:quality(85)/https://cdn.frvr.ai/6817072827945e34d88365bf.png%3F3) 
 :quality(85)/https://cdn.frvr.ai/6817077827945e34d88365c7.png%3F3) 
 Star. In-Game asset. 2d. High contrast. No shadows
:quality(85)/https://cdn.frvr.ai/681707d227945e34d88365cd.png%3F3) 
 White star. In-Game asset. 2d. High contrast. No shadows
:quality(85)/https://cdn.frvr.ai/681709c927945e34d88365da.png%3F3) 
 :quality(85)/https://cdn.frvr.ai/68170ba127945e34d88365fe.png%3F3) 
 Red heart. In-Game asset. 2d. High contrast. No shadows
:quality(85)/https://cdn.frvr.ai/68170bea27945e34d8836604.png%3F3) 
 Purple heart. In-Game asset. 2d. High contrast. No shadows
:quality(85)/https://cdn.frvr.ai/68170c3730f9a3ca3143c36b.png%3F3) 
 :quality(85)/https://cdn.frvr.ai/68170df027945e34d8836617.png%3F3) 
 A peanut. In-Game asset. 2d. High contrast. No shadows
:quality(85)/https://cdn.frvr.ai/68170e3627945e34d883661c.png%3F3) 
 Cashew nut. In-Game asset. 2d. High contrast. No shadows
:quality(85)/https://cdn.frvr.ai/6817137327945e34d883666e.png%3F3) 
 :quality(85)/https://cdn.frvr.ai/681717d45557ee2046ecc2f7.png%3F3) 
 :quality(85)/https://cdn.frvr.ai/68171a3c27945e34d883669c.png%3F3) 
 Grimace shake. In-Game asset. 2d. High contrast. No shadows
:quality(85)/https://cdn.frvr.ai/68171a8627945e34d88366a8.png%3F3) 
 MacDonald's fries. In-Game asset. 2d. High contrast. No shadows
:quality(85)/https://cdn.frvr.ai/68172b1b527b05c35818e92d.png%3F3) 
 Grimace unlocked button. In-Game asset. 2d. High contrast. No shadows
:quality(85)/https://cdn.frvr.ai/68176ba74a0979b918f7a043.png%3F3) 
 Michael Jackson unlocked button. In-Game asset. 2d. High contrast. No shadows
:quality(85)/https://cdn.frvr.ai/68176bfb4a0979b918f7a047.png%3F3) 
 John Cena unlocked button. In-Game asset. 2d. High contrast. No shadows
:quality(85)/https://cdn.frvr.ai/681848065557ee2046ecc355.png%3F3) 
 :quality(85)/https://cdn.frvr.ai/681852a92383a43353c7548b.png%3F3) 
 Deez nuts unlocked button. In-Game asset. 2d. High contrast. No shadows
:quality(85)/https://cdn.frvr.ai/681852f02383a43353c75498.png%3F3) 
 Shooting stars unlocked button. In-Game asset. 2d. High contrast. No shadows
:quality(85)/https://cdn.frvr.ai/68185b748a0e5c4bce224097.png%3F3) 
 :quality(85)/https://cdn.frvr.ai/681875d52be3391f326409d8.png%3F3) 
 Rick roll unlocked button. In-Game asset. 2d. High contrast. No shadows
:quality(85)/https://cdn.frvr.ai/681952795557ee2046ecc397.png%3F3) 
 :quality(85)/https://cdn.frvr.ai/6819530ee4bfd0bbff165058.png%3F3) 
 :quality(85)/https://cdn.frvr.ai/681c8c14c433709b9f3496bb.png%3F3) 
 :quality(85)/https://cdn.frvr.ai/681c9e526135700112f879bd.png%3F3) 
 :quality(85)/https://cdn.frvr.ai/681d93b51b9e5a67ebab2a52.png%3F3) 
 :quality(85)/https://cdn.frvr.ai/681d95da1b9e5a67ebab2a5f.png%3F3) 
 :quality(85)/https://cdn.frvr.ai/681e1884c7ebd23c4bdd5928.png%3F3) 
 Popcorn chicken. In-Game asset. 2d. High contrast. No shadows
:quality(85)/https://cdn.frvr.ai/681e18f9c7ebd23c4bdd5939.png%3F3) 
 Fried chicken drumstick. In-Game asset. 2d. High contrast. No shadows
:quality(85)/https://cdn.frvr.ai/681eb5fbce5c2130acf291bd.png%3F3) 
 :quality(85)/https://cdn.frvr.ai/681eb6868578d3fadb9cac49.png%3F3) 
 :quality(85)/https://cdn.frvr.ai/681eb95249de8df9599c5b97.png%3F3) 
 :quality(85)/https://cdn.frvr.ai/681ebb3049de8df9599c5ba9.png%3F3) 
 :quality(85)/https://cdn.frvr.ai/681ee624b1146135aaefe63c.png%3F3) 
 Amazing digital circus button. In-Game asset. 2d. High contrast. No shadows
:quality(85)/https://cdn.frvr.ai/681ef7e841b5fb6826081a28.png%3F3) 
 :quality(85)/https://cdn.frvr.ai/681ef98cce5c2130acf291c1.png%3F3) 
 :quality(85)/https://cdn.frvr.ai/681ef9efce5c2130acf291c3.png%3F3) 
 :quality(85)/https://cdn.frvr.ai/681f82fa4de4664a77b8eb6f.png%3F3) 
 :quality(85)/https://cdn.frvr.ai/6826b332054039919f0a089c.png%3F3) 
 Select game mode button. In-Game asset. 2d. High contrast. No shadows
:quality(85)/https://cdn.frvr.ai/6826bbff97a2158c01b6e945.png%3F3) 
 Diamond shaped colourful classic mode button. In-Game asset. 2d. High contrast. No shadows
:quality(85)/https://cdn.frvr.ai/6826c2d197a2158c01b6e963.png%3F3) 
 Diamond shaped colourful mini games button. In-Game asset. 2d. High contrast. No shadows
:quality(85)/https://cdn.frvr.ai/6827168900c54e0648f3278d.png%3F3) 
 Same picture in high definition
:quality(85)/https://cdn.frvr.ai/6827414625df75ae7a4de4a6.png%3F3) 
 Diamond shaped colourful button that says sling shot mode. In-Game asset. 2d. High contrast. No shadows
:quality(85)/https://cdn.frvr.ai/682548fd80be55c1986a9d45.png%3F3) 
 Make picture transparent
:quality(85)/https://cdn.frvr.ai/6827dcc4f0da5bc629928468.png%3F3) 
 :quality(85)/https://cdn.frvr.ai/6827fd58f0da5bc629928492.png%3F3) 
 Bullet. In-Game asset. 2d. High contrast. No shadows
:quality(85)/https://cdn.frvr.ai/6827fdd2f0da5bc6299284a3.png%3F3) 
 :quality(85)/https://cdn.frvr.ai/6828170b80d2c88911cb1d24.png%3F3) 
 Start game button. In-Game asset. 2d. High contrast. No shadows
:quality(85)/https://cdn.frvr.ai/682b446c031377340829c968.png%3F3) 
 :quality(85)/https://cdn.frvr.ai/682b45b0031377340829ca5d.png%3F3) 
 Shooting gallery button. In-Game asset. 2d. High contrast. No shadows
:quality(85)/https://cdn.frvr.ai/682ec3c623c50e12668ce9bd.png%3F3) 
 Chain reaction button. In-Game asset. 2d. High contrast. No shadows
:quality(85)/https://cdn.frvr.ai/682ecaa723c50e12668cea01.png%3F3) 
 Realistic space backdrop. In-Game asset. 2d. High contrast. No shadows
launch
Sound effect
Gamestart
Sound effect
collect
Sound effect
gameMusic
Music
Gamemusic
Sound effect
Bogerk
Sound effect
pop
Sound effect
Pignoise
Sound effect
Steve
Sound effect
Villager
Sound effect
Spider
Sound effect
Skeleton
Sound effect
Shootingstars
Music
Maccas
Sound effect
Grimace
Sound effect
Thriller
Music
MJ
Sound effect
Cenaentrance
Music
Johncena
Sound effect
Chickencluck
Sound effect
Deeznuts
Sound effect
Deeznutstrap
Music
Rickroll
Sound effect
Nevergonna
Music
Starz
Sound effect
Grimaceshake
Music
Joenugget
Sound effect
gegagedi
Music
Shrek
Sound effect
Raveswamp
Music
Pomni
Sound effect
Digcircus
Music
Runandgo
Music
Gunshot
Sound effect
Reelbadman
Sound effect
Tinggoes
Music