Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
User prompt
1milisecond add 1 subscribe when the user is at 2500+
User prompt
after 1 Ms add one subscribe
Code edit (3 edits merged)
Please save this source code
User prompt
do notdo the flash. the subs go to the next thousand every second
User prompt
remake the 1000cpsto be that: your number snaps and adds another 1000. the delay is 1 second ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
repair the 300subs 100cps
User prompt
do the 100clicks every 10ms to: 1000 subs added every second ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
if there is 2500 subs or more is gives you 1000 every second ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
when you reach 300 subs, the auto changes to 1 at every 10 milliseconds or 100cps ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
you start with 22 subs
Code edit (1 edits merged)
Please save this source code
User prompt
add a new piece of text with 75 px upper than the off/on button with the text "auto"
Code edit (3 edits merged)
Please save this source code
User prompt
the newest button is a toggle. this toggle does 2 subs/second ↪💡 Consider importing and using the following plugins: @upit/tween.v1
Code edit (1 edits merged)
Please save this source code
User prompt
put this newest piece of text on the button. exatly in the center
Code edit (1 edits merged)
Please save this source code
User prompt
a new piece of text
Code edit (1 edits merged)
Please save this source code
/****
* Plugins
****/
var tween = LK.import("@upit/tween.v1");
/****
* Classes
****/
var TapButton = Container.expand(function () {
var self = Container.call(this);
var buttonGraphics = self.attachAsset('button', {
anchorX: 0.5,
anchorY: 0.5
});
self.originalScale = 1.0;
self.pressedScale = 0.9;
self.down = function (x, y, obj) {
// Scale down animation on press
tween(buttonGraphics, {
scaleX: self.pressedScale,
scaleY: self.pressedScale
}, {
duration: 0,
easing: tween.easeOut
});
// Increase score
LK.setScore(LK.getScore() + 1);
scoreTxt.setText(LK.getScore() + ' subs');
// Play tap sound
LK.getSound('tap').play();
// Flash effect
LK.effects.flashObject(buttonGraphics, 0xFFFFFF, 150);
};
self.up = function (x, y, obj) {
// Scale back to normal on release
tween(buttonGraphics, {
scaleX: self.originalScale,
scaleY: self.originalScale
}, {
duration: 150,
easing: tween.bounceOut
});
};
return self;
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0x2196F3
});
/****
* Game Code
****/
// Initialize starting score
LK.setScore(22);
// Create score display
var scoreTxt = new Text2('22 subs', {
size: 120,
fill: 0xFF0000
});
scoreTxt.setText(LK.getScore() + ' subs');
scoreTxt.anchor.set(0.5, 0);
LK.gui.top.addChild(scoreTxt);
// Position score text with some margin from top
scoreTxt.y = 50;
// Create tap button
var tapButton = game.addChild(new TapButton());
tapButton.x = 2048 / 2;
tapButton.y = 2732 / 2;
// Create new button above the red one
var newButton = game.addChild(new TapButton());
newButton.x = 2048 / 2;
newButton.y = 3000 / 2 - 600;
// Add toggle functionality for auto-subscription
var autoSubActive = false;
var autoSubTimer = null;
newButton.down = function (x, y, obj) {
// Toggle auto-subscription state
autoSubActive = !autoSubActive;
if (autoSubActive) {
// Determine interval based on current score
var interval = LK.getScore() >= 300 ? 10 : 100; // 100cps (10ms) if 300+ subs, otherwise 10cps (100ms)
// Start auto-subscription
autoSubTimer = LK.setInterval(function () {
LK.setScore(LK.getScore() + 1);
scoreTxt.setText(LK.getScore() + ' subs');
}, interval);
// Update text to show active state
newText.setText('ON');
tween(newText, {
tint: 0x00FF00
}, {
duration: 200
});
} else {
// Stop auto-subscription
if (autoSubTimer) {
LK.clearInterval(autoSubTimer);
autoSubTimer = null;
}
// Update text to show inactive state
newText.setText('OFF');
tween(newText, {
tint: 0xFFFFFF
}, {
duration: 200
});
}
// Play tap sound
LK.getSound('tap').play();
// Visual feedback
var buttonGraphics = this.children[0];
LK.effects.flashObject(buttonGraphics, 0xFFFFFF, 150);
tween(buttonGraphics, {
scaleX: 0.9,
scaleY: 0.9
}, {
duration: 100,
easing: tween.easeOut,
onFinish: function onFinish() {
tween(buttonGraphics, {
scaleX: 1.0,
scaleY: 1.0
}, {
duration: 150,
easing: tween.bounceOut
});
}
});
};
// Create instruction text
var instructionTxt = new Text2('Subscribe', {
size: 100,
fill: 0xFFFFFF
});
instructionTxt.anchor.set(0.5, 0.5);
instructionTxt.x = 2048 / 2;
instructionTxt.y = 2150 / 2 + 300;
game.addChild(instructionTxt);
// Create new text element
var insertText = new Text2('channel: LavaZombie7404', {
size: 100,
fill: 0xFFFFFF
});
insertText.anchor.set(0.5, 0.5);
insertText.x = 2048 / 2;
insertText.y = 2732 / 2 + 500;
game.addChild(insertText);
// Create another new text element
var newText = new Text2('OFF', {
size: 120,
fill: 0xFFFFFF
});
newText.anchor.set(0.5, 0.5);
newText.x = newButton.x;
newText.y = newButton.y;
game.addChild(newText);
// Create auto label text positioned 75px above the toggle button
var autoLabelText = new Text2('auto (free)', {
size: 100,
fill: 0xFFFFFF
});
autoLabelText.anchor.set(0.5, 0.5);
autoLabelText.x = newButton.x;
autoLabelText.y = newButton.y - 75;
game.addChild(autoLabelText);
// Add subtle pulsing animation to button
var pulseTimer = LK.setInterval(function () {
tween(tapButton, {
scaleX: 1.05,
scaleY: 1.05
}, {
duration: 1000,
easing: tween.easeInOut,
onFinish: function onFinish() {
tween(tapButton, {
scaleX: 1.0,
scaleY: 1.0
}, {
duration: 1000,
easing: tween.easeInOut
});
}
});
}, 1600);
game.update = function () {
// Check if we need to upgrade auto speed when reaching 1M subs
if (autoSubActive && autoSubTimer && LK.getScore() >= 1000000) {
// Clear current timer and restart with 1 subscriber every 1ms
LK.clearInterval(autoSubTimer);
autoSubTimer = LK.setInterval(function () {
LK.setScore(LK.getScore() + 1);
scoreTxt.setText(LK.getScore() + ' subs');
}, 1); // Every 1 millisecond
} else if (autoSubActive && autoSubTimer && LK.getScore() >= 2500) {
// Clear current timer and restart with 1000 subs every second
LK.clearInterval(autoSubTimer);
autoSubTimer = LK.setInterval(function () {
// Calculate next thousand milestone
var currentScore = LK.getScore();
var nextThousand = Math.ceil(currentScore / 1000) * 1000;
// Set score to next thousand
LK.setScore(nextThousand);
scoreTxt.setText(LK.getScore() + ' subs');
}, 1000); // Every 1 second
} else if (autoSubActive && autoSubTimer && LK.getScore() >= 300) {
// Clear current timer and restart with 100cps speed (every 10ms)
LK.clearInterval(autoSubTimer);
autoSubTimer = LK.setInterval(function () {
LK.setScore(LK.getScore() + 1);
scoreTxt.setText(LK.getScore() + ' subs');
}, 10); // 100 clicks per second (every 10 milliseconds)
}
}; ===================================================================
--- original.js
+++ change.js
@@ -186,10 +186,17 @@
}
});
}, 1600);
game.update = function () {
- // Check if we need to upgrade auto speed when reaching 2500 subs
- if (autoSubActive && autoSubTimer && LK.getScore() >= 2500) {
+ // Check if we need to upgrade auto speed when reaching 1M subs
+ if (autoSubActive && autoSubTimer && LK.getScore() >= 1000000) {
+ // Clear current timer and restart with 1 subscriber every 1ms
+ LK.clearInterval(autoSubTimer);
+ autoSubTimer = LK.setInterval(function () {
+ LK.setScore(LK.getScore() + 1);
+ scoreTxt.setText(LK.getScore() + ' subs');
+ }, 1); // Every 1 millisecond
+ } else if (autoSubActive && autoSubTimer && LK.getScore() >= 2500) {
// Clear current timer and restart with 1000 subs every second
LK.clearInterval(autoSubTimer);
autoSubTimer = LK.setInterval(function () {
// Calculate next thousand milestone