/****
* Plugins
****/
var tween = LK.import("@upit/tween.v1");
/****
* Classes
****/
var BlueHexagon = Container.expand(function () {
var self = Container.call(this);
var hexagonGraphics = self.attachAsset('blueHexagon', {
anchorX: 0.5,
anchorY: 0.5
});
// Color variations for click feedback
var originalColor = 0x0066ff;
var clickColor = 0x3399ff;
self.onClick = function () {
// Award points with 1.5x multiplier (1.5 clicks worth)
var pointsToAdd = Math.floor(1.5 * clickMultiplier);
LK.setScore(LK.getScore() + pointsToAdd);
// Increment click counter by 1.5 (rounded down)
clickCount += pointsToAdd;
// Visual feedback - color flash
hexagonGraphics.tint = clickColor;
tween(hexagonGraphics, {
tint: originalColor
}, {
duration: 200
});
// Visual feedback - scale animation
tween(self, {
scaleX: 1.1,
scaleY: 1.1
}, {
duration: 100,
easing: tween.easeOut,
onFinish: function onFinish() {
tween(self, {
scaleX: 1.0,
scaleY: 1.0
}, {
duration: 100,
easing: tween.easeIn
});
}
});
// Play click sound
LK.getSound('click').play();
// Update score display
if (scoreTxt) {
scoreTxt.setText(LK.getScore());
}
};
self.down = function (x, y, obj) {
self.onClick();
};
return self;
});
var Cube = Container.expand(function () {
var self = Container.call(this);
var cubeGraphics = self.attachAsset('cube', {
anchorX: 0.5,
anchorY: 0.5
});
// Color variations for click feedback
var originalColor = 0x4a90e2;
var clickColor = 0x7bb3f0;
self.onClick = function () {
// Award points with multiplier
var pointsToAdd = 1 * clickMultiplier;
LK.setScore(LK.getScore() + pointsToAdd);
// Increment click counter
clickCount += pointsToAdd;
// Check if we've reached 100 clicks to enable auto-click
if (clickCount >= 100 && !autoClickActive) {
autoClickActive = true;
}
// Visual feedback - color flash
cubeGraphics.tint = clickColor;
tween(cubeGraphics, {
tint: originalColor
}, {
duration: 200
});
// Visual feedback - scale animation
tween(self, {
scaleX: 1.1,
scaleY: 1.1
}, {
duration: 100,
easing: tween.easeOut,
onFinish: function onFinish() {
tween(self, {
scaleX: 1.0,
scaleY: 1.0
}, {
duration: 100,
easing: tween.easeIn
});
}
});
// Play click sound
LK.getSound('click').play();
// Update score display
if (scoreTxt) {
scoreTxt.setText(LK.getScore());
}
};
self.down = function (x, y, obj) {
self.onClick();
};
return self;
});
var GreenCircle = Container.expand(function () {
var self = Container.call(this);
var circleGraphics = self.attachAsset('greenCircle', {
anchorX: 0.5,
anchorY: 0.5
});
// Color variations for click feedback
var originalColor = 0x00ff00;
var clickColor = 0x66ff66;
self.onClick = function () {
// Award 2 points (2 clicks worth) with multiplier
var pointsToAdd = 2 * clickMultiplier;
LK.setScore(LK.getScore() + pointsToAdd);
// Increment click counter by 2 with multiplier
clickCount += pointsToAdd;
// Visual feedback - color flash
circleGraphics.tint = clickColor;
tween(circleGraphics, {
tint: originalColor
}, {
duration: 200
});
// Visual feedback - scale animation
tween(self, {
scaleX: 1.1,
scaleY: 1.1
}, {
duration: 100,
easing: tween.easeOut,
onFinish: function onFinish() {
tween(self, {
scaleX: 1.0,
scaleY: 1.0
}, {
duration: 100,
easing: tween.easeIn
});
}
});
// Play click sound
LK.getSound('click').play();
// Update score display
if (scoreTxt) {
scoreTxt.setText(LK.getScore());
}
};
self.down = function (x, y, obj) {
self.onClick();
};
return self;
});
var RedTriangle = Container.expand(function () {
var self = Container.call(this);
var triangleGraphics = self.attachAsset('redTriangle', {
anchorX: 0.5,
anchorY: 0.5
});
// Color variations for click feedback
var originalColor = 0xff0000;
var clickColor = 0xff6666;
self.onClick = function () {
// Award points with 1.25x multiplier (1.25 clicks worth)
var pointsToAdd = Math.floor(1.25 * clickMultiplier);
LK.setScore(LK.getScore() + pointsToAdd);
// Increment click counter by 1.25 (rounded down)
clickCount += pointsToAdd;
// Visual feedback - color flash
triangleGraphics.tint = clickColor;
tween(triangleGraphics, {
tint: originalColor
}, {
duration: 200
});
// Visual feedback - scale animation
tween(self, {
scaleX: 1.1,
scaleY: 1.1
}, {
duration: 100,
easing: tween.easeOut,
onFinish: function onFinish() {
tween(self, {
scaleX: 1.0,
scaleY: 1.0
}, {
duration: 100,
easing: tween.easeIn
});
}
});
// Play click sound
LK.getSound('click').play();
// Update score display
if (scoreTxt) {
scoreTxt.setText(LK.getScore());
}
};
self.down = function (x, y, obj) {
self.onClick();
};
return self;
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0x2c3e50
});
/****
* Game Code
****/
// Create score display
var scoreTxt = new Text2('0', {
size: 120,
fill: 0xFFFFFF
});
scoreTxt.anchor.set(0.5, 0);
scoreTxt.setText(LK.getScore());
LK.gui.top.addChild(scoreTxt);
// Position score text with some padding from top
scoreTxt.y = 100;
// Track click count for auto-click feature
var clickCount = 0;
var autoClickActive = false;
var redTriangleActive = false;
var redTriangle = null;
var greenCircleActive = false;
var greenCircle = null;
var blueHexagonActive = false;
var blueHexagon = null;
var clickMultiplier = 1;
var greenCircleAutoClickActive = false;
var redCubeAutoClickActive = false;
var congratsMessageActive = false;
var congratsMessage = null;
var fullAutoActive = false;
// Create the main cube
var cube = game.addChild(new Cube());
// Position cube at center of screen
cube.x = 2048 / 2;
cube.y = 2732 / 2;
// Game update loop
game.update = function () {
// Auto-click functionality when 100 clicks reached
if (autoClickActive && LK.ticks % 60 === 0) {
// Auto-click every second (60 ticks)
cube.onClick();
}
// Check if we've reached 400 clicks to enable red cube auto-click
if (clickCount >= 400 && !redCubeAutoClickActive) {
redCubeAutoClickActive = true;
}
// Red cube auto-click functionality when 400 clicks reached
if (redCubeAutoClickActive && LK.ticks % 50 === 0) {
// Auto-click cube every 0.83 seconds (50 ticks)
cube.onClick();
}
// Check if we've reached 750 clicks to enable green circle auto-click
if (clickCount >= 750 && greenCircleActive && !greenCircleAutoClickActive) {
greenCircleAutoClickActive = true;
}
// Green circle auto-click functionality when 750 clicks reached
if (greenCircleAutoClickActive && LK.ticks % 45 === 0) {
// Auto-click green circle every 0.75 seconds (45 ticks)
if (greenCircle) {
greenCircle.onClick();
}
}
// Check if we've reached 250 clicks to spawn red triangle
if (clickCount >= 250 && !redTriangleActive) {
redTriangleActive = true;
redTriangle = game.addChild(new RedTriangle());
// Position red triangle to the left of the cube
redTriangle.x = 2048 / 2 - 300;
redTriangle.y = 2732 / 2;
}
// Check if we've reached 500 clicks to spawn green circle
if (clickCount >= 500 && !greenCircleActive) {
greenCircleActive = true;
greenCircle = game.addChild(new GreenCircle());
// Position green circle under the cube
greenCircle.x = 2048 / 2;
greenCircle.y = 2732 / 2 + 200;
}
// Check if we've reached 1000 clicks to spawn blue hexagon
if (clickCount >= 1000 && !blueHexagonActive) {
blueHexagonActive = true;
clickMultiplier = 1.5;
blueHexagon = game.addChild(new BlueHexagon());
// Position blue hexagon above the cube
blueHexagon.x = 2048 / 2;
blueHexagon.y = 2732 / 2 - 200;
}
// Check if we've reached 2500 clicks to show congratulations message
if (clickCount >= 2500 && !congratsMessageActive) {
congratsMessageActive = true;
congratsMessage = new Text2("congratulations on getting here but it's not done yet", {
size: 60,
fill: 0xFFD700
});
congratsMessage.anchor.set(0.5, 0);
// Position below the click counter
congratsMessage.x = 2048 / 2;
congratsMessage.y = scoreTxt.y + 150;
LK.gui.top.addChild(congratsMessage);
}
// Check if we've reached 3000 clicks to enable full automation
if (clickCount >= 3000 && !fullAutoActive) {
fullAutoActive = true;
}
// Full automation functionality when 3000 clicks reached
if (fullAutoActive) {
// Auto-click cube every 30 ticks (0.5 seconds)
if (LK.ticks % 30 === 0) {
cube.onClick();
}
// Auto-click red triangle every 35 ticks (0.58 seconds)
if (redTriangle && LK.ticks % 35 === 0) {
redTriangle.onClick();
}
// Auto-click green circle every 25 ticks (0.42 seconds)
if (greenCircle && LK.ticks % 25 === 0) {
greenCircle.onClick();
}
// Auto-click blue hexagon every 40 ticks (0.67 seconds)
if (blueHexagon && LK.ticks % 40 === 0) {
blueHexagon.onClick();
}
}
}; /****
* Plugins
****/
var tween = LK.import("@upit/tween.v1");
/****
* Classes
****/
var BlueHexagon = Container.expand(function () {
var self = Container.call(this);
var hexagonGraphics = self.attachAsset('blueHexagon', {
anchorX: 0.5,
anchorY: 0.5
});
// Color variations for click feedback
var originalColor = 0x0066ff;
var clickColor = 0x3399ff;
self.onClick = function () {
// Award points with 1.5x multiplier (1.5 clicks worth)
var pointsToAdd = Math.floor(1.5 * clickMultiplier);
LK.setScore(LK.getScore() + pointsToAdd);
// Increment click counter by 1.5 (rounded down)
clickCount += pointsToAdd;
// Visual feedback - color flash
hexagonGraphics.tint = clickColor;
tween(hexagonGraphics, {
tint: originalColor
}, {
duration: 200
});
// Visual feedback - scale animation
tween(self, {
scaleX: 1.1,
scaleY: 1.1
}, {
duration: 100,
easing: tween.easeOut,
onFinish: function onFinish() {
tween(self, {
scaleX: 1.0,
scaleY: 1.0
}, {
duration: 100,
easing: tween.easeIn
});
}
});
// Play click sound
LK.getSound('click').play();
// Update score display
if (scoreTxt) {
scoreTxt.setText(LK.getScore());
}
};
self.down = function (x, y, obj) {
self.onClick();
};
return self;
});
var Cube = Container.expand(function () {
var self = Container.call(this);
var cubeGraphics = self.attachAsset('cube', {
anchorX: 0.5,
anchorY: 0.5
});
// Color variations for click feedback
var originalColor = 0x4a90e2;
var clickColor = 0x7bb3f0;
self.onClick = function () {
// Award points with multiplier
var pointsToAdd = 1 * clickMultiplier;
LK.setScore(LK.getScore() + pointsToAdd);
// Increment click counter
clickCount += pointsToAdd;
// Check if we've reached 100 clicks to enable auto-click
if (clickCount >= 100 && !autoClickActive) {
autoClickActive = true;
}
// Visual feedback - color flash
cubeGraphics.tint = clickColor;
tween(cubeGraphics, {
tint: originalColor
}, {
duration: 200
});
// Visual feedback - scale animation
tween(self, {
scaleX: 1.1,
scaleY: 1.1
}, {
duration: 100,
easing: tween.easeOut,
onFinish: function onFinish() {
tween(self, {
scaleX: 1.0,
scaleY: 1.0
}, {
duration: 100,
easing: tween.easeIn
});
}
});
// Play click sound
LK.getSound('click').play();
// Update score display
if (scoreTxt) {
scoreTxt.setText(LK.getScore());
}
};
self.down = function (x, y, obj) {
self.onClick();
};
return self;
});
var GreenCircle = Container.expand(function () {
var self = Container.call(this);
var circleGraphics = self.attachAsset('greenCircle', {
anchorX: 0.5,
anchorY: 0.5
});
// Color variations for click feedback
var originalColor = 0x00ff00;
var clickColor = 0x66ff66;
self.onClick = function () {
// Award 2 points (2 clicks worth) with multiplier
var pointsToAdd = 2 * clickMultiplier;
LK.setScore(LK.getScore() + pointsToAdd);
// Increment click counter by 2 with multiplier
clickCount += pointsToAdd;
// Visual feedback - color flash
circleGraphics.tint = clickColor;
tween(circleGraphics, {
tint: originalColor
}, {
duration: 200
});
// Visual feedback - scale animation
tween(self, {
scaleX: 1.1,
scaleY: 1.1
}, {
duration: 100,
easing: tween.easeOut,
onFinish: function onFinish() {
tween(self, {
scaleX: 1.0,
scaleY: 1.0
}, {
duration: 100,
easing: tween.easeIn
});
}
});
// Play click sound
LK.getSound('click').play();
// Update score display
if (scoreTxt) {
scoreTxt.setText(LK.getScore());
}
};
self.down = function (x, y, obj) {
self.onClick();
};
return self;
});
var RedTriangle = Container.expand(function () {
var self = Container.call(this);
var triangleGraphics = self.attachAsset('redTriangle', {
anchorX: 0.5,
anchorY: 0.5
});
// Color variations for click feedback
var originalColor = 0xff0000;
var clickColor = 0xff6666;
self.onClick = function () {
// Award points with 1.25x multiplier (1.25 clicks worth)
var pointsToAdd = Math.floor(1.25 * clickMultiplier);
LK.setScore(LK.getScore() + pointsToAdd);
// Increment click counter by 1.25 (rounded down)
clickCount += pointsToAdd;
// Visual feedback - color flash
triangleGraphics.tint = clickColor;
tween(triangleGraphics, {
tint: originalColor
}, {
duration: 200
});
// Visual feedback - scale animation
tween(self, {
scaleX: 1.1,
scaleY: 1.1
}, {
duration: 100,
easing: tween.easeOut,
onFinish: function onFinish() {
tween(self, {
scaleX: 1.0,
scaleY: 1.0
}, {
duration: 100,
easing: tween.easeIn
});
}
});
// Play click sound
LK.getSound('click').play();
// Update score display
if (scoreTxt) {
scoreTxt.setText(LK.getScore());
}
};
self.down = function (x, y, obj) {
self.onClick();
};
return self;
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0x2c3e50
});
/****
* Game Code
****/
// Create score display
var scoreTxt = new Text2('0', {
size: 120,
fill: 0xFFFFFF
});
scoreTxt.anchor.set(0.5, 0);
scoreTxt.setText(LK.getScore());
LK.gui.top.addChild(scoreTxt);
// Position score text with some padding from top
scoreTxt.y = 100;
// Track click count for auto-click feature
var clickCount = 0;
var autoClickActive = false;
var redTriangleActive = false;
var redTriangle = null;
var greenCircleActive = false;
var greenCircle = null;
var blueHexagonActive = false;
var blueHexagon = null;
var clickMultiplier = 1;
var greenCircleAutoClickActive = false;
var redCubeAutoClickActive = false;
var congratsMessageActive = false;
var congratsMessage = null;
var fullAutoActive = false;
// Create the main cube
var cube = game.addChild(new Cube());
// Position cube at center of screen
cube.x = 2048 / 2;
cube.y = 2732 / 2;
// Game update loop
game.update = function () {
// Auto-click functionality when 100 clicks reached
if (autoClickActive && LK.ticks % 60 === 0) {
// Auto-click every second (60 ticks)
cube.onClick();
}
// Check if we've reached 400 clicks to enable red cube auto-click
if (clickCount >= 400 && !redCubeAutoClickActive) {
redCubeAutoClickActive = true;
}
// Red cube auto-click functionality when 400 clicks reached
if (redCubeAutoClickActive && LK.ticks % 50 === 0) {
// Auto-click cube every 0.83 seconds (50 ticks)
cube.onClick();
}
// Check if we've reached 750 clicks to enable green circle auto-click
if (clickCount >= 750 && greenCircleActive && !greenCircleAutoClickActive) {
greenCircleAutoClickActive = true;
}
// Green circle auto-click functionality when 750 clicks reached
if (greenCircleAutoClickActive && LK.ticks % 45 === 0) {
// Auto-click green circle every 0.75 seconds (45 ticks)
if (greenCircle) {
greenCircle.onClick();
}
}
// Check if we've reached 250 clicks to spawn red triangle
if (clickCount >= 250 && !redTriangleActive) {
redTriangleActive = true;
redTriangle = game.addChild(new RedTriangle());
// Position red triangle to the left of the cube
redTriangle.x = 2048 / 2 - 300;
redTriangle.y = 2732 / 2;
}
// Check if we've reached 500 clicks to spawn green circle
if (clickCount >= 500 && !greenCircleActive) {
greenCircleActive = true;
greenCircle = game.addChild(new GreenCircle());
// Position green circle under the cube
greenCircle.x = 2048 / 2;
greenCircle.y = 2732 / 2 + 200;
}
// Check if we've reached 1000 clicks to spawn blue hexagon
if (clickCount >= 1000 && !blueHexagonActive) {
blueHexagonActive = true;
clickMultiplier = 1.5;
blueHexagon = game.addChild(new BlueHexagon());
// Position blue hexagon above the cube
blueHexagon.x = 2048 / 2;
blueHexagon.y = 2732 / 2 - 200;
}
// Check if we've reached 2500 clicks to show congratulations message
if (clickCount >= 2500 && !congratsMessageActive) {
congratsMessageActive = true;
congratsMessage = new Text2("congratulations on getting here but it's not done yet", {
size: 60,
fill: 0xFFD700
});
congratsMessage.anchor.set(0.5, 0);
// Position below the click counter
congratsMessage.x = 2048 / 2;
congratsMessage.y = scoreTxt.y + 150;
LK.gui.top.addChild(congratsMessage);
}
// Check if we've reached 3000 clicks to enable full automation
if (clickCount >= 3000 && !fullAutoActive) {
fullAutoActive = true;
}
// Full automation functionality when 3000 clicks reached
if (fullAutoActive) {
// Auto-click cube every 30 ticks (0.5 seconds)
if (LK.ticks % 30 === 0) {
cube.onClick();
}
// Auto-click red triangle every 35 ticks (0.58 seconds)
if (redTriangle && LK.ticks % 35 === 0) {
redTriangle.onClick();
}
// Auto-click green circle every 25 ticks (0.42 seconds)
if (greenCircle && LK.ticks % 25 === 0) {
greenCircle.onClick();
}
// Auto-click blue hexagon every 40 ticks (0.67 seconds)
if (blueHexagon && LK.ticks % 40 === 0) {
blueHexagon.onClick();
}
}
};