Last active
November 20, 2025 06:34
-
-
Save BoogieWithACookie1722/410858685e98f4b95e37269ffaa83938 to your computer and use it in GitHub Desktop.
Mastery Calc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Power Gain Time Calculator</title> | |
| <style> | |
| body { | |
| font-family: Segoe UI, sans-serif; | |
| background: #0e0e0e; | |
| color: #f5f5f5; | |
| text-align: center; | |
| margin-top: 60px; | |
| } | |
| /* Original dark-style textboxes */ | |
| input[type="text"] { | |
| padding: 8px; | |
| border-radius: 8px; | |
| border: none; | |
| width: 160px; | |
| text-align: center; | |
| margin: 6px; | |
| background: #1e1e1e; | |
| color: white; | |
| } | |
| input[type="text"]:focus { | |
| outline: 2px solid #4b7bec; | |
| } | |
| .result { | |
| color: #4b7bec; | |
| margin-top: 25px; | |
| font-size: 20px; | |
| font-weight: bold; | |
| } | |
| .container { | |
| background: #161616; | |
| display: inline-block; | |
| padding: 25px 45px; | |
| border-radius: 20px; | |
| box-shadow: 0 0 15px rgba(75, 123, 236, 0.25); | |
| } | |
| h2 { | |
| color: #4b7bec; | |
| margin-bottom: 20px; | |
| } | |
| label { | |
| color: #ddd; | |
| } | |
| footer { | |
| margin-top: 40px; | |
| font-size: 14px; | |
| color: #4b7bec; | |
| opacity: 0.8; | |
| text-shadow: 0 0 8px #4b7bec; | |
| transition: all 0.3s ease-in-out; | |
| } | |
| footer a { | |
| color: #4b7bec; | |
| text-decoration: none; | |
| font-weight: bold; | |
| cursor: pointer; | |
| transition: all 0.3s ease-in-out; | |
| } | |
| footer a:hover { | |
| text-shadow: 0 0 20px #4b7bec, 0 0 40px #4b7bec, 0 0 60px #4b7bec; | |
| color: #00f0ff; | |
| } | |
| /* Toggle Buttons */ | |
| .toggle-container { | |
| display: flex; | |
| justify-content: center; | |
| gap: 20px; | |
| margin: 10px 0; | |
| } | |
| .toggle-label { | |
| display: flex; | |
| align-items: center; | |
| cursor: pointer; | |
| font-weight: bold; | |
| position: relative; | |
| padding-left: 50px; | |
| user-select: none; | |
| color: #ddd; | |
| } | |
| .toggle-label input { | |
| position: absolute; | |
| opacity: 0; | |
| cursor: pointer; | |
| } | |
| .slider { | |
| position: absolute; | |
| left: 0; top: 0; | |
| width: 40px; height: 20px; | |
| background-color: #555; | |
| border-radius: 34px; | |
| transition: 0.4s; | |
| } | |
| .slider::before { | |
| content: ""; | |
| position: absolute; | |
| height: 16px; width: 16px; | |
| left: 2px; top: 2px; | |
| background-color: white; | |
| border-radius: 50%; | |
| transition: 0.4s; | |
| } | |
| .toggle-label input:checked + .slider { | |
| background-color: #4b7bec; | |
| } | |
| .toggle-label input:checked + .slider::before { | |
| transform: translateX(20px); | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <div class="container"> | |
| <h2>⚡ Power Gain Time Calculator ⚡</h2> | |
| <div> | |
| <label>Current Power:</label><br> | |
| <input type="text" id="current" placeholder="Enter current power"><br> | |
| <label>Target Power:</label><br> | |
| <input type="text" id="target" placeholder="Enter target power"><br> | |
| <label>Power Per Click:</label><br> | |
| <input type="text" id="power" placeholder="Enter power per click"><br> | |
| <label>Clicks Per Second:</label><br> | |
| <div class="toggle-container"> | |
| <label class="toggle-label">Slow Click (4.3 CPS) | |
| <input type="checkbox" id="slow"> | |
| <span class="slider"></span> | |
| </label> | |
| <label class="toggle-label">Fast Click (5.6 CPS) | |
| <input type="checkbox" id="fast" checked> | |
| <span class="slider"></span> | |
| </label> | |
| </div> | |
| <div class="result" id="result">⏱️ Time Needed: —</div> | |
| </div> | |
| </div> | |
| <footer>Created by <a href="https://discord.com/users/YOUR_DISCORD_ID" target="_blank">ReVex</a> 💠</footer> | |
| <script> | |
| const suffixes = [ | |
| "1","k","m","b","t","Qa","Qi","Sx","Sp","Oc","No","Dc","UD","DD", | |
| "Td","Qad","Qid","SxD","Spd","OcD","NoD","Dec","Und","Duo","Tri", | |
| "Qua","Qui","Six","Sep","Oct","Nuo" | |
| ]; | |
| function convertToNumber(val) { | |
| val = val.trim(); | |
| if (!val) return 0; | |
| for (let i = 0; i < suffixes.length; i++) { | |
| if (val.includes(suffixes[i]) && suffixes[i] !== "1") { | |
| const num = parseFloat(val.replace(suffixes[i], "")); | |
| return num * Math.pow(10, 3 * i + 0); | |
| } | |
| } | |
| return parseFloat(val); | |
| } | |
| function updateCalc() { | |
| const current = convertToNumber(document.getElementById("current").value); | |
| const target = convertToNumber(document.getElementById("target").value); | |
| const power = convertToNumber(document.getElementById("power").value); | |
| let cps = 0; | |
| const slow = document.getElementById("slow").checked; | |
| const fast = document.getElementById("fast").checked; | |
| // Only one toggle active | |
| if (slow && fast) { | |
| document.getElementById("slow").checked = false; | |
| cps = 5.6; | |
| } else if (slow) cps = 4.3; | |
| else if (fast) cps = 5.6; | |
| const needed = target - current; | |
| const gainPerSec = power * cps; | |
| const result = document.getElementById("result"); | |
| if (!isFinite(needed) || !isFinite(gainPerSec) || gainPerSec <= 0 || needed <= 0) { | |
| result.innerText = "⚠️ Invalid or incomplete input!"; | |
| return; | |
| } | |
| let seconds = needed / gainPerSec; | |
| const h = Math.floor(seconds / 3600); | |
| const m = Math.floor((seconds % 3600) / 60); | |
| const s = Math.floor(seconds % 60); | |
| const hoursOnly = (seconds / 3600).toFixed(2); | |
| result.innerText = `⏱️ Time Needed: ${h}h ${m}m ${s}s (≈ ${hoursOnly} hours)`; | |
| } | |
| ["current","target","power","slow","fast"].forEach(id => { | |
| document.getElementById(id).addEventListener("input", updateCalc); | |
| document.getElementById(id).addEventListener("change", updateCalc); | |
| }); | |
| </script> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment