From cc2be53eed9b0e9f3266bcbf9885e31d18e09297 Mon Sep 17 00:00:00 2001 From: RobloxEnderman Date: Thu, 29 Aug 2024 18:30:14 -0700 Subject: [PATCH] Removed all shop functionality for the time being --- shop.css | 0 shop.html | 29 ----------------------------- shop1.js | 39 --------------------------------------- 3 files changed, 68 deletions(-) delete mode 100644 shop.css delete mode 100644 shop.html delete mode 100644 shop1.js diff --git a/shop.css b/shop.css deleted file mode 100644 index e69de29..0000000 diff --git a/shop.html b/shop.html deleted file mode 100644 index fe14ca4..0000000 --- a/shop.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - Shop - - - -

Shop

-
-
-

-10 seconds cooldown

-

Price: $50,000

- -
-
-

Item 2

-

Price: $20

- -
-
-

Item 3

-

Price: $30

- -
- - \ No newline at end of file diff --git a/shop1.js b/shop1.js deleted file mode 100644 index f17ba31..0000000 --- a/shop1.js +++ /dev/null @@ -1,39 +0,0 @@ -// Define the shop -let shop = { - items: [ - { name: 'Item 1', cost: 50000 }, - { name: 'Item 2', cost: 20 }, - { name: 'Item 3', cost: 30 }, - ] -}; - -// Define the player -let player = { - coins: 50, - inventory: [], -}; - -// Function to buy an item -function buyItem(itemName) { - // Find the item in the shop - let item = shop.items.find(i => i.name === itemName); - - // If the item doesn't exist, return an error - if (!item) { - return 'Item not found in shop'; - } - - // If the player doesn't have enough coins, return an error - if (player.coins < item.cost) { - return 'Not enough coins'; - } - - // Subtract the cost from the player's coins - player.coins -= item.cost; - - // Add the item to the player's inventory - player.inventory.push(item); - - return `You bought ${itemName}!`; -} -