After inspecting your main.js file, it seems that your score calculation relies on the scoreLabel.score
variable.
To display a game over message, you have the option to either create a new event listener or update the existing frame event listener to activate $('#game-over').show();
For instance, consider enhancing your enterframe listener with:
game.rootScene.addEventListener('enterframe', function () {
if(rand(1000) < game.frame / 20 * Math.sin(game.frame / 100) + game.frame / 20 + 50) {
var y = rand(320);
var omega = y < 160 ? 0.01 : -0.01;
var enemy = new Enemy(320, y, omega);
enemy.key = game.frame;
enemies[game.frame] = enemy;
}
scoreLabel.score = game.score;
// Check if score limit exceeded
if(scoreLabel.score > 1000){
$('#game-over').show();
}
});