From 3ede0da95bf1a88ed8603a84850edae09809170c Mon Sep 17 00:00:00 2001 From: Arunima Dutta Date: Fri, 5 Jul 2024 11:37:59 +0530 Subject: [PATCH] Added Temple Run Game --- Temple Run/index.html | 17 ++++++++++++ Temple Run/manifest.json | 17 ++++++++++++ Temple Run/script.js | 56 ++++++++++++++++++++++++++++++++++++++++ Temple Run/styles.css | 21 +++++++++++++++ 4 files changed, 111 insertions(+) create mode 100644 Temple Run/index.html create mode 100644 Temple Run/manifest.json create mode 100644 Temple Run/script.js create mode 100644 Temple Run/styles.css diff --git a/Temple Run/index.html b/Temple Run/index.html new file mode 100644 index 00000000..1425df78 --- /dev/null +++ b/Temple Run/index.html @@ -0,0 +1,17 @@ + + + + + + Temple Run GG Script + + + +

Temple Run GG Script

+ + + + + + + diff --git a/Temple Run/manifest.json b/Temple Run/manifest.json new file mode 100644 index 00000000..6418ed7f --- /dev/null +++ b/Temple Run/manifest.json @@ -0,0 +1,17 @@ +{ + "manifest_version": 2, + "name": "Temple Run GG Script", + "version": "1.0", + "description": "A script to modify coins, gems, and unlock characters in Temple Run for educational purposes.", + "icons": { + "48": "icon.png" + }, + "browser_action": { + "default_popup": "index.html", + "default_icon": "icon.png" + }, + "permissions": [ + "activeTab" + ] + } + \ No newline at end of file diff --git a/Temple Run/script.js b/Temple Run/script.js new file mode 100644 index 00000000..f4505d29 --- /dev/null +++ b/Temple Run/script.js @@ -0,0 +1,56 @@ +// Function to modify coins +function modifyCoins() { + let coins = prompt("Enter your current amount of coins:"); + coins = parseInt(coins); + if (isNaN(coins)) { + alert("Invalid number. Please try again."); + return; + } + let newCoins = 999999; + alert(`Coins modified successfully to ${newCoins}!`); + } + + // Function to modify gems + function modifyGems() { + let gems = prompt("Enter your current amount of gems:"); + gems = parseInt(gems); + if (isNaN(gems)) { + alert("Invalid number. Please try again."); + return; + } + let newGems = 9999; + alert(`Gems modified successfully to ${newGems}!`); + } + + // Function to unlock all characters + function unlockAllCharacters() { + alert("All characters unlocked!"); + } + + // Function to handle button clicks + function handleButtonClick(event) { + const buttonId = event.target.id; + switch (buttonId) { + case "modify-coins": + modifyCoins(); + break; + case "modify-gems": + modifyGems(); + break; + case "unlock-characters": + unlockAllCharacters(); + break; + case "exit": + alert("Exiting script..."); + break; + default: + break; + } + } + + // Add event listeners to buttons + document.getElementById("modify-coins").addEventListener("click", handleButtonClick); + document.getElementById("modify-gems").addEventListener("click", handleButtonClick); + document.getElementById("unlock-characters").addEventListener("click", handleButtonClick); + document.getElementById("exit").addEventListener("click", handleButtonClick); + \ No newline at end of file diff --git a/Temple Run/styles.css b/Temple Run/styles.css new file mode 100644 index 00000000..ae365627 --- /dev/null +++ b/Temple Run/styles.css @@ -0,0 +1,21 @@ +body { + font-family: Arial, sans-serif; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + height: 100vh; + background-color: #f0f0f0; + } + + button { + margin: 10px; + padding: 10px 20px; + font-size: 16px; + cursor: pointer; + } + + h1 { + margin-bottom: 20px; + } + \ No newline at end of file