User prompt
Abbreviate any large number to the 'k" or 'm' format when needed
User prompt
For the "Money: " system, abbreviate numbers so it is only 3 numbers on screen at once while still tracking the real amount and make sure to do this when the amount of money adds another number to it. (Example: 5,120,000 would be 5.12m and 1,524 would be 1.52k)
User prompt
Fix the bug where the number equals $NaN
User prompt
For the "Money: " system, abbreviate numbers so it is only 3 numbers on screen at once while still tracking the real amount and make sure to do this when the amount of money adds another number to it. (Example: 5,120,000 would be 5.12m and 1,524 would be 1.52k and 2,113,000,000 would be 2.11b and 3,511,000,000,000 would be 3.51t)
User prompt
For the "Money: " system, abbreviate numbers so it is only 3 numbers on screen at once while still tracking the real amount and make sure to do this when the amount of money adds another number to it. (Example: 5,120,000 would be 5.12m and 1,524 would be 1.52k) Make sure to do this all the way up to trillions.
User prompt
For the "Money: " system, abbreviate numbers so it is only 3 numbers on screen at once while still tracking the real amount and make sure to do this when the amount of money adds another number to it. (Example: 5,120,000 would be 5.12m and 1,524 would be 1.52k)
User prompt
For the "Money: " system, abbreviate numbers so it is only 3 numbers on screen at once while still tracking the real amount.
User prompt
Once the money value in "Money: " is over 999,999,999 start abbreviating it to a number with 1 1 Billion value, 1 100M value, 1 10M value
User prompt
Once the money value in "Money: " is over 99,999,999 start abbreviating it to a number with 1 100M value, 1 10M value, and 1 1M value
User prompt
Once the money value in "Money: " is over 99,999,999 start abbreviating it to a number with 1 100M value, 1 10M value, and 1 1M value
User prompt
Increase the value of fish1 to 55 million
User prompt
Increase the value of fish1 to 1,200,000
User prompt
Once the money value in "Money: " is over 999,999 start abbreviating it to a number with 1 1M 1 100k 1 10k
User prompt
Increase the amount of money gained from Fish1 to 125000
User prompt
Once the money value in "Money: " is over 99,999, start abbreviating it to a number with 1 100k value, 1 10k value and 1 1k value.
User prompt
Move the closeshopbutton within the shopgui 50 pixels below the top with the shopgui height now being 2700 pixels in the Y axis
User prompt
Move the closeshopbutton within the shopgui 25 pixels below the top with the shopgui height now being 2700 pixels in the Y axis
User prompt
Move the closeshopbutton within the shopgui 25 pixels below the top
User prompt
Increase the height of the shop gui by 200 pixels and then move the shop close button up 200 pixels. Remember, the new size of the asset should be 1647 by 2700 pixels
User prompt
Increase the height of the shop gui by 200 pixels and then move the shop close button up 200 pixels
Code edit (1 edits merged)
Please save this source code
User prompt
Increase the height of the shop exit button by 200 pixels
Code edit (1 edits merged)
Please save this source code
User prompt
Once the money value in "Money: " is over 999, start abbreviating it to a number with 1 1k values and 2 hundreds value.
User prompt
Reset all persistent data stored ↪💡 Consider importing and using the following plugins: @upit/storage.v1
===================================================================
--- original.js
+++ change.js
@@ -187,25 +187,13 @@
}
storage.upgradeCost = upgradeCost; // Persist updated upgrade cost
upgradeCostText.setText('Cost: $' + upgradeCost.toFixed(2)); // Update cost text
// Update the score text immediately
- if (score > 999999999) {
- var abbreviatedScore = (score / 1000000000).toFixed(1) + 'B';
+ if (score >= 1000) {
+ var abbreviatedScore = (score / 1000).toFixed(1) + 'k';
scoreTxt.setText('Money: $' + abbreviatedScore);
- } else if (score > 99999999) {
- var abbreviatedScore = (score / 100000000).toFixed(1) + 'M';
- scoreTxt.setText('Money: $' + abbreviatedScore);
- } else if (score > 999999) {
- var abbreviatedScore = (score / 1000000).toFixed(1) + 'M';
- scoreTxt.setText('Money: $' + abbreviatedScore);
- } else if (score > 99999) {
- var abbreviatedScore = (score / 1000).toFixed(0) + 'k';
- scoreTxt.setText('Money: $' + abbreviatedScore);
- } else if (score > 999) {
- var abbreviatedScore = (score / 1000).toFixed(2) + 'k';
- scoreTxt.setText('Money: $' + abbreviatedScore);
} else {
- scoreTxt.setText('Money: $' + score.toFixed(2));
+ scoreTxt.setText('Money: $' + score.toFixed(0));
}
}
};
self.visible = false; // Make the fishingnet invisible when the shopgui is open
@@ -222,11 +210,11 @@
/****
* Game Code
****/
-// Function to generate a random fish type based on the given percentages
-//<Assets used in the game will automatically appear here>
// Initialize arrays and variables
+//<Assets used in the game will automatically appear here>
+// Function to generate a random fish type based on the given percentages
function generateFishType() {
var rand = Math.random() * 100;
if (rand < 30) {
return 1;
@@ -288,25 +276,13 @@
// Check for collision with fishing rod
if (fishingRod.intersects(fishes[i])) {
score += fishes[i].moneyValue * moneyMultiplier; // Multiply fish value by money multiplier
storage.moneyTotal = score;
- if (score > 999999999) {
- var abbreviatedScore = (score / 1000000000).toFixed(1) + 'B';
+ if (score >= 1000) {
+ var abbreviatedScore = (score / 1000).toFixed(1) + 'k';
scoreTxt.setText('Money: $' + abbreviatedScore);
- } else if (score > 99999999) {
- var abbreviatedScore = (score / 100000000).toFixed(1) + 'M';
- scoreTxt.setText('Money: $' + abbreviatedScore);
- } else if (score > 999999) {
- var abbreviatedScore = (score / 1000000).toFixed(1) + 'M';
- scoreTxt.setText('Money: $' + abbreviatedScore);
- } else if (score > 99999) {
- var abbreviatedScore = (score / 1000).toFixed(0) + 'k';
- scoreTxt.setText('Money: $' + abbreviatedScore);
- } else if (score > 999) {
- var abbreviatedScore = (score / 1000).toFixed(2) + 'k';
- scoreTxt.setText('Money: $' + abbreviatedScore);
} else {
- scoreTxt.setText('Money: $' + score.toFixed(2));
+ scoreTxt.setText('Money: $' + score.toFixed(0));
}
fishes[i].destroy();
fishes.splice(i, 1);
spawnFish(generateFishType());
Water themed gui icon that has the text "Shop" on it. 8-bit art style.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Big red X button for a game gui. 8-bit art style.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
8-bit art style circular fishing net without a handle.. 8-bit art style
A bright green + symbol for a game GUI element. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. 8-bit art style