/**** 
* Plugins
****/ 
var tween = LK.import("@upit/tween.v1");
/**** 
* Classes
****/ 
// Candy object class
var CandyObject = Container.expand(function () {
	var self = Container.call(this);
	var objectGraphics = self.attachAsset('candy', {
		anchorX: 0.5,
		anchorY: 0.5
	});
	self.visible = false; // Initially, the candy object is not visible
	self.onClick = function () {
		// Create a text object to display the click power
		var clickPowerText = new Text2((tabloObject.clicked ? 3 : 1).toString(), {
			size: 50,
			fill: 0xFFFFFF
		});
		clickPowerText.anchor.set(0.5, 1); // Anchor at the bottom center
		clickPowerText.x = self.x;
		clickPowerText.y = self.y - objectGraphics.height / 2; // Position above the candy
		game.addChild(clickPowerText);
		// Animate the text to move randomly upwards within a constrained area above the candy and fade it out over 1 second
		var randomXOffset = (Math.random() - 0.5) * 100; // Random offset between -50 and 50
		var randomYOffset = -50 - Math.random() * 50; // Random upward movement between -50 and -100
		tween(clickPowerText, {
			x: clickPowerText.x + randomXOffset,
			y: clickPowerText.y + randomYOffset,
			alpha: 0
		}, {
			duration: 1000,
			onFinish: function onFinish() {
				clickPowerText.destroy(); // Remove the text after animation
			}
		});
		// Hide the candy object and show the clickable object
		self.visible = false;
		clickableObject.visible = true;
		// Increase score by 3 when clicked after tablo object is clicked
		if (tabloObject.clicked) {
			LK.setScore(LK.getScore() + 3);
		} else {
			LK.setScore(LK.getScore() + 1);
		}
		scoreTxt.setText(LK.getScore().toString());
	};
	self.down = function (x, y, obj) {
		self.onClick();
		LK.getSound('noel', {
			start: 0.75,
			end: 1
		}).play(); // Play the fourth sound from 'noel' when candy is clicked
		// Add a click effect
		LK.effects.flashObject(self, 0xFFFFFF, 100);
		// Make the candy object reappear 0.1 seconds after being clicked
		tween(self, {
			alpha: 0
		}, {
			duration: 0,
			onFinish: function onFinish() {
				tween(self, {
					alpha: 1
				}, {
					duration: 100
				});
				self.visible = true;
			}
		});
	};
});
//<Assets used in the game will automatically appear here>
//<Write imports for supported plugins here>
// Clickable object class
var ClickableObject = Container.expand(function () {
	var self = Container.call(this);
	var objectGraphics = self.attachAsset('clickable', {
		anchorX: 0.5,
		anchorY: 0.5
	});
	self.onClick = function () {
		scoreTxt.setText(LK.getScore().toString());
		// Hide the clickable object and show the candy object
		self.visible = false;
		candyObject.visible = true;
	};
	self.down = function (x, y, obj) {
		self.onClick();
		// Add a click effect
		LK.effects.flashObject(self, 0xFFFFFF, 100);
		// Make the clickable object reappear 0.1 seconds after being clicked
		tween(self, {
			alpha: 0
		}, {
			duration: 0,
			onFinish: function onFinish() {
				tween(self, {
					alpha: 1
				}, {
					duration: 100
				});
				self.visible = true;
			}
		});
	};
});
// MusicToggleButton class
var MusicToggleButton = Container.expand(function () {
	var self = Container.call(this);
	var isPlaying = true;
	var buttonGraphics = self.attachAsset('ses', {
		anchorX: 0.5,
		anchorY: 0.5
	});
	self.down = function (x, y, obj) {
		LK.playMusic('muzikvar2', {
			loop: true
		}); // Play the first music from 'muzikvar2' when 'ses' is clicked
		LK.playMusic('sakinleşmenin piyano şarkısı', {
			loop: true
		});
		isPlaying = !isPlaying;
		tween(self, {
			alpha: 0
		}, {
			duration: 0,
			onFinish: function onFinish() {
				tween(self, {
					alpha: 1
				}, {
					duration: 100
				});
			}
		});
	};
});
/**** 
* Initialize Game
****/ 
var game = new LK.Game({
	backgroundColor: 0x000000 //Init game with black background 
});
/**** 
* Game Code
****/ 
// Save game state when the player exits
LK.on('beforeunload', function () {
	LK.storage.set('savedScore', LK.getScore());
});
var ohohmText = new Text2('ÖHÖM!', {
	size: 200,
	fill: 0xFFFFFF
});
ohohmText.anchor.set(0.5, 0.5);
// Create 'noelbaba' object
var noelbabaObject = game.addChild(LK.getAsset('noelbaba', {
	anchorX: 0.5,
	anchorY: 0.5
}));
noelbabaObject.x = -noelbabaObject.width; // Start off-screen to the left
noelbabaObject.y = 2732 / 2; // Keep the object vertically centered
tween(noelbabaObject, {
	x: 2048 / 2
}, {
	duration: 5000,
	// Slow down the animation by increasing the duration
	easing: tween.easeOut,
	onFinish: function onFinish() {
		ohohmText.x = noelbabaObject.x;
		ohohmText.y = noelbabaObject.y - noelbabaObject.height / 2 - 250; // Move 100 units higher on the vertical axis
		ohohmText.visible = true; // Make 'öhöhm!' text visible
		LK.setTimeout(function () {
			ohohmText.visible = false; // Hide 'öhöhm!' text
			var newText; // Define newText variable
			newText = new Text2("Hello, my new elf slave. You will produce candy for me forever. I can almost hear you asking, 'Why?' Because I feel like it. I'm tired of giving gifts, and I’m sick of little runts like you. So GO AND START MAKING CANDY FOR ME RIGHT NOW!", {
				size: 50,
				fill: 0xFFFFFF,
				wordWrap: true,
				wordWrapWidth: 1000
			});
			newText.anchor.set(0.5, 0.5);
			newText.x = ohohmText.x;
			newText.y = ohohmText.y;
			game.addChild(newText);
			LK.setTimeout(function () {
				newText.visible = false; // Hide the elf slave text after 10 seconds
				tween(noelbabaObject, {
					x: -noelbabaObject.width
				}, {
					duration: 2000,
					easing: tween.easeIn
				}); // Move noelbaba object to the left
			}, 15000);
		}, 2000);
	}
});
var scoreTxt = new Text2('0', {
	size: 150,
	fill: 0xFFFFFF
});
scoreTxt.anchor.set(0.5, 0);
LK.gui.top.addChild(scoreTxt);
// Load saved game state when the game starts
var savedScore = parseInt(LK.getScore(), 10);
if (savedScore !== null) {
	LK.setScore(parseInt(savedScore, 10));
} else {
	LK.setScore(0); // Set initial score to 0 if no saved score exists
}
scoreTxt.setText(LK.getScore().toString());
ohohmText.x = (noelbabaObject.x + scoreTxt.x) / 2; // Center between 'noelbaba' and score text
var dolarObject = game.addChild(LK.getAsset('100Dolar', {
	anchorX: 0.5,
	anchorY: 0.5
}));
dolarObject.x = 1850; // Position the object at x=1850
dolarObject.y = 600; // Position the object at y=600
var dolarObject = game.addChild(LK.getAsset('100Dolar', {
	anchorX: 0.5,
	anchorY: 0.5
}));
dolarObject.x = 1850; // Position the object at x=1850
dolarObject.y = 600; // Position the object at y=600
ohohmText.y = dolarObject.y; // Align 'öhöhm!' text with '100Dolar' object vertically
ohohmText.visible = false; // Initially hidden
game.addChild(ohohmText);
var musicToggleButton = new MusicToggleButton();
musicToggleButton.x = 2048 / 2; // Position the button at the center of the screen
musicToggleButton.y = 2732 - musicToggleButton.height / 2; // Position the button at the bottom of the screen
game.addChild(musicToggleButton);
var ses2Object = game.addChildAt(LK.getAsset('ses2', {
	anchorX: 0.5,
	anchorY: 0.5
}), 0);
ses2Object.x = musicToggleButton.x; // Position 'ses2' behind 'ses' object horizontally
ses2Object.y = musicToggleButton.y; // Position 'ses2' behind 'ses' object vertically
// Create clickable object
var clickableObject = new ClickableObject();
clickableObject.x = 2048 / 2; // Move the object to the center of the screen
clickableObject.y = 2732 / 2; // Keep the object vertically centered
game.addChild(clickableObject);
// Create candy object
var candyObject = new CandyObject();
candyObject.x = 2048 / 2; // Move the object to the center of the screen
candyObject.y = 2732 / 2;
game.addChild(candyObject);
// Create 'tablo' object
var tabloObject = game.addChild(LK.getAsset('tablo', {
	anchorX: 0.5,
	anchorY: 0.5
}));
tabloObject.x = 2048 - tabloObject.width / 2; // Move the object slightly to the left
tabloObject.y = 0 + tabloObject.height / 2 + 90;
tabloObject.clicked = false;
tabloObject.interactive = false;
tabloObject.down = function (x, y, obj) {
	tabloObject.clicked = true;
	tabloObject.visible = false;
	tablo2Object.visible = true;
	dolarObject.visible = false;
};
// Create '100Dolar' object
var dolarObject = game.addChild(LK.getAsset('100Dolar', {
	anchorX: 0.5,
	anchorY: 0.5
}));
dolarObject.x = 1850; // Position the object at x=1850
dolarObject.y = 600; // Position the object at y=600
// Create 'tablo2' object
var tablo2Object = game.addChild(LK.getAsset('tablo2', {
	anchorX: 0.5,
	anchorY: 0.5
}));
tablo2Object.visible = false;
tablo2Object.x = tabloObject.x; // Position the object at the same x position as tablo object
tablo2Object.y = tabloObject.y; // Position the object at the same y position as tablo object
// Create 'tablo3' object
var tablo3Object = game.addChild(LK.getAsset('tablo3', {
	anchorX: 0.5,
	anchorY: 0.5
}));
tablo3Object.x = dolarObject.x; // Position the object at the same x position as dolar object
tablo3Object.y = dolarObject.y + dolarObject.height / 2 + tablo3Object.height / 2 + 50; // Position the object slightly below the dolar object
tablo3Object.interactive = true;
var lastClickTime = 0;
tablo3Object.down = function (x, y, obj) {
	;
	noelbabaObject.down = function (x, y, obj) {
		ohohmText.visible = false; // Hide 'öhöhm!' text
		newText.visible = false; // Hide the elf slave text
		tween(noelbabaObject, {
			x: -noelbabaObject.width
		}, {
			duration: 2000,
			easing: tween.easeIn
		}); // Move noelbaba object to the left
	};
	this.scoreInterval = LK.setInterval(function () {
		LK.setScore(LK.getScore() + 5);
		scoreTxt.setText(LK.getScore().toString());
		if (LK.getScore() > 0 && LK.getScore() % 5 === 0) {
			// Create a text object to display '5'
			var scoreIncreaseText = new Text2('5', {
				size: 50,
				fill: 0xFFFFFF
			});
			scoreIncreaseText.anchor.set(0.5, 1); // Anchor at the bottom center
			scoreIncreaseText.x = candyObject.x;
			scoreIncreaseText.y = candyObject.y - candyObject.height / 2; // Position above the candy
			game.addChild(scoreIncreaseText);
			// Animate the text to move randomly upwards and fade out over 1 second
			var randomXOffset = (Math.random() - 0.5) * 100; // Random offset between -50 and 50
			var randomYOffset = -50 - Math.random() * 50; // Random upward movement between -50 and -100
			tween(scoreIncreaseText, {
				x: scoreIncreaseText.x + randomXOffset,
				y: scoreIncreaseText.y + randomYOffset,
				alpha: 0
			}, {
				duration: 1000,
				onFinish: function onFinish() {
					scoreIncreaseText.destroy(); // Remove the text after animation
				}
			});
			candyObject.onClick();
		}
	}, 2000);
	dolar400Object.visible = false;
	this.visible = false; // Make tablo3 object disappear when clicked
	// Create a copy of tablo2 when tablo3 disappears
	var tablo2Copy = game.addChild(LK.getAsset('tablo2', {
		anchorX: 0.5,
		anchorY: 0.5
	}));
	tablo2Copy.x = this.x; // Position the copy at the same x position as tablo3
	tablo2Copy.y = this.y; // Position the copy at the same y position as tablo3
};
// Create '400dolar' object
var dolar400Object = game.addChild(LK.getAsset('400dolar', {
	anchorX: 0.5,
	anchorY: 0.5
}));
dolar400Object.x = tablo3Object.x; // Position the object at the same x position as tablo3 object
dolar400Object.y = tablo3Object.y + tablo3Object.height / 2 + dolar400Object.height / 2 + 20; // Position the object slightly below the tablo3 object
// Create a speech bubble text above and to the right of 'noelbaba'
var speechBubbleText = new Text2("Hello, my new elf slave! You will spend your time in this wonderful app of mine and produce candy for me. From time to time, I'll check if you're still working. Don't even think about slacking off, or things will end badly for you!", {
	size: 50,
	// Increased size from 40 to 50
	fill: 0xFFFFFF,
	wordWrap: true,
	wordWrapWidth: 600
	// Increased wordWrapWidth from 500 to 600
});
speechBubbleText.anchor.set(0, 1); // Anchor at the bottom left
speechBubbleText.x = noelbabaObject.x + noelbabaObject.width / 2 - 120; // Move slightly more to the left of 'noelbaba'
speechBubbleText.y = noelbabaObject.y - noelbabaObject.height / 2 + 50; // Move slightly more below the previous position
game.addChild(speechBubbleText);
var arkaplanObject = game.addChildAt(LK.getAsset('Arkaplan', {
	anchorX: 0.5,
	anchorY: 0.5,
	width: 2048,
	height: 2732
}), 0);
arkaplanObject.x = 2048 / 2; // Position the object at the center of the screen
arkaplanObject.y = 2732 / 2; // Position the object at the center of the screen
// Play piano music and loop it
LK.playMusic('piano', {
	loop: true
});
// Create multiple 'kar' objects to simulate snowfall
var karObjects = [];
for (var i = 0; i < 50; i++) {
	var karObject = game.addChild(LK.getAsset('kar', {
		anchorX: 0.5,
		anchorY: 0.5
	}));
	karObject.x = Math.random() * 2048; // Randomize the x position
	karObject.y = Math.random() * 2732; // Randomize the y position
	karObjects.push(karObject);
}
// Update function
game.update = function () {
	// Move all 'kar' objects downwards to create a snowfall effect
	for (var i = 0; i < karObjects.length; i++) {
		karObjects[i].y += 3; // Slow down the speed of the snowfall 
		// If a 'kar' object has moved off the screen, reset its position to the top 
		if (karObjects[i].y > 2732) {
			karObjects[i].y = 0;
			karObjects[i].x = Math.random() * 2048; // Randomize the x position for the next fall 
		}
	}
	// Check if score is 1000 and make elfcik object disappear
	if (LK.getScore() === 1000) {
		elfcikObject.visible = false;
	}
	// Check if score is a multiple of 5 and greater than 0
	if (LK.getScore() > 0 && LK.getScore() % 5 === 0) {
		candyObject.onClick();
		LK.getSound('noel', {
			start: 0.75,
			end: 1
		}).play(); // Play the fourth sound from 'noel' when candy is clicked
	}
};
;
; /**** 
* Plugins
****/ 
var tween = LK.import("@upit/tween.v1");
/**** 
* Classes
****/ 
// Candy object class
var CandyObject = Container.expand(function () {
	var self = Container.call(this);
	var objectGraphics = self.attachAsset('candy', {
		anchorX: 0.5,
		anchorY: 0.5
	});
	self.visible = false; // Initially, the candy object is not visible
	self.onClick = function () {
		// Create a text object to display the click power
		var clickPowerText = new Text2((tabloObject.clicked ? 3 : 1).toString(), {
			size: 50,
			fill: 0xFFFFFF
		});
		clickPowerText.anchor.set(0.5, 1); // Anchor at the bottom center
		clickPowerText.x = self.x;
		clickPowerText.y = self.y - objectGraphics.height / 2; // Position above the candy
		game.addChild(clickPowerText);
		// Animate the text to move randomly upwards within a constrained area above the candy and fade it out over 1 second
		var randomXOffset = (Math.random() - 0.5) * 100; // Random offset between -50 and 50
		var randomYOffset = -50 - Math.random() * 50; // Random upward movement between -50 and -100
		tween(clickPowerText, {
			x: clickPowerText.x + randomXOffset,
			y: clickPowerText.y + randomYOffset,
			alpha: 0
		}, {
			duration: 1000,
			onFinish: function onFinish() {
				clickPowerText.destroy(); // Remove the text after animation
			}
		});
		// Hide the candy object and show the clickable object
		self.visible = false;
		clickableObject.visible = true;
		// Increase score by 3 when clicked after tablo object is clicked
		if (tabloObject.clicked) {
			LK.setScore(LK.getScore() + 3);
		} else {
			LK.setScore(LK.getScore() + 1);
		}
		scoreTxt.setText(LK.getScore().toString());
	};
	self.down = function (x, y, obj) {
		self.onClick();
		LK.getSound('noel', {
			start: 0.75,
			end: 1
		}).play(); // Play the fourth sound from 'noel' when candy is clicked
		// Add a click effect
		LK.effects.flashObject(self, 0xFFFFFF, 100);
		// Make the candy object reappear 0.1 seconds after being clicked
		tween(self, {
			alpha: 0
		}, {
			duration: 0,
			onFinish: function onFinish() {
				tween(self, {
					alpha: 1
				}, {
					duration: 100
				});
				self.visible = true;
			}
		});
	};
});
//<Assets used in the game will automatically appear here>
//<Write imports for supported plugins here>
// Clickable object class
var ClickableObject = Container.expand(function () {
	var self = Container.call(this);
	var objectGraphics = self.attachAsset('clickable', {
		anchorX: 0.5,
		anchorY: 0.5
	});
	self.onClick = function () {
		scoreTxt.setText(LK.getScore().toString());
		// Hide the clickable object and show the candy object
		self.visible = false;
		candyObject.visible = true;
	};
	self.down = function (x, y, obj) {
		self.onClick();
		// Add a click effect
		LK.effects.flashObject(self, 0xFFFFFF, 100);
		// Make the clickable object reappear 0.1 seconds after being clicked
		tween(self, {
			alpha: 0
		}, {
			duration: 0,
			onFinish: function onFinish() {
				tween(self, {
					alpha: 1
				}, {
					duration: 100
				});
				self.visible = true;
			}
		});
	};
});
// MusicToggleButton class
var MusicToggleButton = Container.expand(function () {
	var self = Container.call(this);
	var isPlaying = true;
	var buttonGraphics = self.attachAsset('ses', {
		anchorX: 0.5,
		anchorY: 0.5
	});
	self.down = function (x, y, obj) {
		LK.playMusic('muzikvar2', {
			loop: true
		}); // Play the first music from 'muzikvar2' when 'ses' is clicked
		LK.playMusic('sakinleşmenin piyano şarkısı', {
			loop: true
		});
		isPlaying = !isPlaying;
		tween(self, {
			alpha: 0
		}, {
			duration: 0,
			onFinish: function onFinish() {
				tween(self, {
					alpha: 1
				}, {
					duration: 100
				});
			}
		});
	};
});
/**** 
* Initialize Game
****/ 
var game = new LK.Game({
	backgroundColor: 0x000000 //Init game with black background 
});
/**** 
* Game Code
****/ 
// Save game state when the player exits
LK.on('beforeunload', function () {
	LK.storage.set('savedScore', LK.getScore());
});
var ohohmText = new Text2('ÖHÖM!', {
	size: 200,
	fill: 0xFFFFFF
});
ohohmText.anchor.set(0.5, 0.5);
// Create 'noelbaba' object
var noelbabaObject = game.addChild(LK.getAsset('noelbaba', {
	anchorX: 0.5,
	anchorY: 0.5
}));
noelbabaObject.x = -noelbabaObject.width; // Start off-screen to the left
noelbabaObject.y = 2732 / 2; // Keep the object vertically centered
tween(noelbabaObject, {
	x: 2048 / 2
}, {
	duration: 5000,
	// Slow down the animation by increasing the duration
	easing: tween.easeOut,
	onFinish: function onFinish() {
		ohohmText.x = noelbabaObject.x;
		ohohmText.y = noelbabaObject.y - noelbabaObject.height / 2 - 250; // Move 100 units higher on the vertical axis
		ohohmText.visible = true; // Make 'öhöhm!' text visible
		LK.setTimeout(function () {
			ohohmText.visible = false; // Hide 'öhöhm!' text
			var newText; // Define newText variable
			newText = new Text2("Hello, my new elf slave. You will produce candy for me forever. I can almost hear you asking, 'Why?' Because I feel like it. I'm tired of giving gifts, and I’m sick of little runts like you. So GO AND START MAKING CANDY FOR ME RIGHT NOW!", {
				size: 50,
				fill: 0xFFFFFF,
				wordWrap: true,
				wordWrapWidth: 1000
			});
			newText.anchor.set(0.5, 0.5);
			newText.x = ohohmText.x;
			newText.y = ohohmText.y;
			game.addChild(newText);
			LK.setTimeout(function () {
				newText.visible = false; // Hide the elf slave text after 10 seconds
				tween(noelbabaObject, {
					x: -noelbabaObject.width
				}, {
					duration: 2000,
					easing: tween.easeIn
				}); // Move noelbaba object to the left
			}, 15000);
		}, 2000);
	}
});
var scoreTxt = new Text2('0', {
	size: 150,
	fill: 0xFFFFFF
});
scoreTxt.anchor.set(0.5, 0);
LK.gui.top.addChild(scoreTxt);
// Load saved game state when the game starts
var savedScore = parseInt(LK.getScore(), 10);
if (savedScore !== null) {
	LK.setScore(parseInt(savedScore, 10));
} else {
	LK.setScore(0); // Set initial score to 0 if no saved score exists
}
scoreTxt.setText(LK.getScore().toString());
ohohmText.x = (noelbabaObject.x + scoreTxt.x) / 2; // Center between 'noelbaba' and score text
var dolarObject = game.addChild(LK.getAsset('100Dolar', {
	anchorX: 0.5,
	anchorY: 0.5
}));
dolarObject.x = 1850; // Position the object at x=1850
dolarObject.y = 600; // Position the object at y=600
var dolarObject = game.addChild(LK.getAsset('100Dolar', {
	anchorX: 0.5,
	anchorY: 0.5
}));
dolarObject.x = 1850; // Position the object at x=1850
dolarObject.y = 600; // Position the object at y=600
ohohmText.y = dolarObject.y; // Align 'öhöhm!' text with '100Dolar' object vertically
ohohmText.visible = false; // Initially hidden
game.addChild(ohohmText);
var musicToggleButton = new MusicToggleButton();
musicToggleButton.x = 2048 / 2; // Position the button at the center of the screen
musicToggleButton.y = 2732 - musicToggleButton.height / 2; // Position the button at the bottom of the screen
game.addChild(musicToggleButton);
var ses2Object = game.addChildAt(LK.getAsset('ses2', {
	anchorX: 0.5,
	anchorY: 0.5
}), 0);
ses2Object.x = musicToggleButton.x; // Position 'ses2' behind 'ses' object horizontally
ses2Object.y = musicToggleButton.y; // Position 'ses2' behind 'ses' object vertically
// Create clickable object
var clickableObject = new ClickableObject();
clickableObject.x = 2048 / 2; // Move the object to the center of the screen
clickableObject.y = 2732 / 2; // Keep the object vertically centered
game.addChild(clickableObject);
// Create candy object
var candyObject = new CandyObject();
candyObject.x = 2048 / 2; // Move the object to the center of the screen
candyObject.y = 2732 / 2;
game.addChild(candyObject);
// Create 'tablo' object
var tabloObject = game.addChild(LK.getAsset('tablo', {
	anchorX: 0.5,
	anchorY: 0.5
}));
tabloObject.x = 2048 - tabloObject.width / 2; // Move the object slightly to the left
tabloObject.y = 0 + tabloObject.height / 2 + 90;
tabloObject.clicked = false;
tabloObject.interactive = false;
tabloObject.down = function (x, y, obj) {
	tabloObject.clicked = true;
	tabloObject.visible = false;
	tablo2Object.visible = true;
	dolarObject.visible = false;
};
// Create '100Dolar' object
var dolarObject = game.addChild(LK.getAsset('100Dolar', {
	anchorX: 0.5,
	anchorY: 0.5
}));
dolarObject.x = 1850; // Position the object at x=1850
dolarObject.y = 600; // Position the object at y=600
// Create 'tablo2' object
var tablo2Object = game.addChild(LK.getAsset('tablo2', {
	anchorX: 0.5,
	anchorY: 0.5
}));
tablo2Object.visible = false;
tablo2Object.x = tabloObject.x; // Position the object at the same x position as tablo object
tablo2Object.y = tabloObject.y; // Position the object at the same y position as tablo object
// Create 'tablo3' object
var tablo3Object = game.addChild(LK.getAsset('tablo3', {
	anchorX: 0.5,
	anchorY: 0.5
}));
tablo3Object.x = dolarObject.x; // Position the object at the same x position as dolar object
tablo3Object.y = dolarObject.y + dolarObject.height / 2 + tablo3Object.height / 2 + 50; // Position the object slightly below the dolar object
tablo3Object.interactive = true;
var lastClickTime = 0;
tablo3Object.down = function (x, y, obj) {
	;
	noelbabaObject.down = function (x, y, obj) {
		ohohmText.visible = false; // Hide 'öhöhm!' text
		newText.visible = false; // Hide the elf slave text
		tween(noelbabaObject, {
			x: -noelbabaObject.width
		}, {
			duration: 2000,
			easing: tween.easeIn
		}); // Move noelbaba object to the left
	};
	this.scoreInterval = LK.setInterval(function () {
		LK.setScore(LK.getScore() + 5);
		scoreTxt.setText(LK.getScore().toString());
		if (LK.getScore() > 0 && LK.getScore() % 5 === 0) {
			// Create a text object to display '5'
			var scoreIncreaseText = new Text2('5', {
				size: 50,
				fill: 0xFFFFFF
			});
			scoreIncreaseText.anchor.set(0.5, 1); // Anchor at the bottom center
			scoreIncreaseText.x = candyObject.x;
			scoreIncreaseText.y = candyObject.y - candyObject.height / 2; // Position above the candy
			game.addChild(scoreIncreaseText);
			// Animate the text to move randomly upwards and fade out over 1 second
			var randomXOffset = (Math.random() - 0.5) * 100; // Random offset between -50 and 50
			var randomYOffset = -50 - Math.random() * 50; // Random upward movement between -50 and -100
			tween(scoreIncreaseText, {
				x: scoreIncreaseText.x + randomXOffset,
				y: scoreIncreaseText.y + randomYOffset,
				alpha: 0
			}, {
				duration: 1000,
				onFinish: function onFinish() {
					scoreIncreaseText.destroy(); // Remove the text after animation
				}
			});
			candyObject.onClick();
		}
	}, 2000);
	dolar400Object.visible = false;
	this.visible = false; // Make tablo3 object disappear when clicked
	// Create a copy of tablo2 when tablo3 disappears
	var tablo2Copy = game.addChild(LK.getAsset('tablo2', {
		anchorX: 0.5,
		anchorY: 0.5
	}));
	tablo2Copy.x = this.x; // Position the copy at the same x position as tablo3
	tablo2Copy.y = this.y; // Position the copy at the same y position as tablo3
};
// Create '400dolar' object
var dolar400Object = game.addChild(LK.getAsset('400dolar', {
	anchorX: 0.5,
	anchorY: 0.5
}));
dolar400Object.x = tablo3Object.x; // Position the object at the same x position as tablo3 object
dolar400Object.y = tablo3Object.y + tablo3Object.height / 2 + dolar400Object.height / 2 + 20; // Position the object slightly below the tablo3 object
// Create a speech bubble text above and to the right of 'noelbaba'
var speechBubbleText = new Text2("Hello, my new elf slave! You will spend your time in this wonderful app of mine and produce candy for me. From time to time, I'll check if you're still working. Don't even think about slacking off, or things will end badly for you!", {
	size: 50,
	// Increased size from 40 to 50
	fill: 0xFFFFFF,
	wordWrap: true,
	wordWrapWidth: 600
	// Increased wordWrapWidth from 500 to 600
});
speechBubbleText.anchor.set(0, 1); // Anchor at the bottom left
speechBubbleText.x = noelbabaObject.x + noelbabaObject.width / 2 - 120; // Move slightly more to the left of 'noelbaba'
speechBubbleText.y = noelbabaObject.y - noelbabaObject.height / 2 + 50; // Move slightly more below the previous position
game.addChild(speechBubbleText);
var arkaplanObject = game.addChildAt(LK.getAsset('Arkaplan', {
	anchorX: 0.5,
	anchorY: 0.5,
	width: 2048,
	height: 2732
}), 0);
arkaplanObject.x = 2048 / 2; // Position the object at the center of the screen
arkaplanObject.y = 2732 / 2; // Position the object at the center of the screen
// Play piano music and loop it
LK.playMusic('piano', {
	loop: true
});
// Create multiple 'kar' objects to simulate snowfall
var karObjects = [];
for (var i = 0; i < 50; i++) {
	var karObject = game.addChild(LK.getAsset('kar', {
		anchorX: 0.5,
		anchorY: 0.5
	}));
	karObject.x = Math.random() * 2048; // Randomize the x position
	karObject.y = Math.random() * 2732; // Randomize the y position
	karObjects.push(karObject);
}
// Update function
game.update = function () {
	// Move all 'kar' objects downwards to create a snowfall effect
	for (var i = 0; i < karObjects.length; i++) {
		karObjects[i].y += 3; // Slow down the speed of the snowfall 
		// If a 'kar' object has moved off the screen, reset its position to the top 
		if (karObjects[i].y > 2732) {
			karObjects[i].y = 0;
			karObjects[i].x = Math.random() * 2048; // Randomize the x position for the next fall 
		}
	}
	// Check if score is 1000 and make elfcik object disappear
	if (LK.getScore() === 1000) {
		elfcikObject.visible = false;
	}
	// Check if score is a multiple of 5 and greater than 0
	if (LK.getScore() > 0 && LK.getScore() % 5 === 0) {
		candyObject.onClick();
		LK.getSound('noel', {
			start: 0.75,
			end: 1
		}).play(); // Play the fourth sound from 'noel' when candy is clicked
	}
};
;
;
:quality(85)/https://cdn.frvr.ai/6766efa58ca6010c5bf77933.png%3F3) 
 pixel candy noel. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
:quality(85)/https://cdn.frvr.ai/6766f92f8ca6010c5bf779db.png%3F3) 
 pixel under tale text= ı need 100Candy
:quality(85)/https://cdn.frvr.ai/6766fae68ca6010c5bf779eb.png%3F3) 
 pixel text Sold
:quality(85)/https://cdn.frvr.ai/676702b58ca6010c5bf77a0e.png%3F3) 
 pixel text :Auto click
:quality(85)/https://cdn.frvr.ai/67672a298ca6010c5bf77ada.png%3F3) 
 pixel text tablo : I need 400Candy. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
:quality(85)/https://cdn.frvr.ai/67672bbc8ca6010c5bf77ae4.png%3F3) 
 pixel şekerli mavi tonlarında hafif karanlık tema lı arka plan. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
:quality(85)/https://cdn.frvr.ai/67672cc38ca6010c5bf77af7.png%3F3) 
 pixel kar tanesi
:quality(85)/https://cdn.frvr.ai/676734a88ca6010c5bf77b17.png%3F3) 
 pixel Ses açma kapama butonu
:quality(85)/https://cdn.frvr.ai/67673ec1f88468c7b50be385.png%3F3) 
 Pixel 2d Noel Baba Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
:quality(85)/https://cdn.frvr.ai/6769810b442c85aca6a8e4b0.png%3F3) 
 :quality(85)/https://cdn.frvr.ai/676981f8442c85aca6a8e4cb.png%3F3) 
 sade olsun Text pixel : Ineed 1000Candy