NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Lit Energy Clicker</title>
<style>
body { font-family: 'Segoe UI', Tahoma, sans-serif; text-align: center; background: #0d0d0d; color: #fff; overflow-x: hidden; }
#chipCounter { font-size: 28px; margin: 20px; font-weight: bold; }
#clickChip { background: url('https://i.imgur.com/8Q2zqS3.png') no-repeat center; background-size: contain; width: 150px; height: 150px; border: none; cursor: pointer; position: relative; }
#clickChip:active { transform: scale(0.95); }
.upgrade { margin: 15px; }
button.upgradeBtn { background-color: #ff5722; border: none; padding: 12px 20px; font-size: 16px; font-weight: bold; border-radius: 12px; cursor: pointer; transition: 0.2s; margin: 5px; position: relative; overflow: hidden; }
button.upgradeBtn:hover { background-color: #ff784e; }
button.upgradeBtn::after { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: rgba(255,255,255,0.3); transform: skewX(-20deg); transition: 0.5s; }
button.upgradeBtn:hover::after { left: 100%; }
.floatingChip { position: absolute; font-size: 16px; color: #ffd700; animation: floatUp 1s ease-out forwards; }
@keyframes floatUp { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-50px); } }
.upgradeEffect { position: absolute; width: 100px; height: 100px; border-radius: 50%; background: rgba(255,215,0,0.5); pointer-events: none; animation: flash 0.5s forwards; }
@keyframes flash { 0% { transform: scale(0); opacity: 1; } 100% { transform: scale(2); opacity: 0; } }
.progressBar { width: 200px; height: 20px; background: #333; border-radius: 10px; margin: 5px auto; overflow: hidden; }
.progressFill { height: 100%; width: 0%; background: #ffd700; transition: width 0.2s; }
</style>
</head>
<body>
<h1>Lit Energy Clicker</h1>
<div id="chipCounter">Lit Chips: 0</div>
<button id="clickChip"></button>
<div class="upgrade">
<h3>Upgrades</h3>
<!-- Click upgrades -->
<div class="progressBar"><div class="progressFill" id="clickUpgrade1"></div></div>
<button class="upgradeBtn" data-type="click" data-cost="50" data-value="1" data-progress="clickUpgrade1">+1 per click (50)</button>

<div class="progressBar"><div class="progressFill" id="clickUpgrade2"></div></div>
<button class="upgradeBtn" data-type="click" data-cost="150" data-value="3" data-progress="clickUpgrade2">+3 per click (150)</button>

<div class="progressBar"><div class="progressFill" id="clickUpgrade3"></div></div>
<button class="upgradeBtn" data-type="click" data-cost="400" data-value="8" data-progress="clickUpgrade3">+8 per click (400)</button>

<div class="progressBar"><div class="progressFill" id="clickUpgrade4"></div></div>
<button class="upgradeBtn" data-type="click" data-cost="900" data-value="20" data-progress="clickUpgrade4">+20 per click (900)</button>

<!-- Auto upgrades -->
<div class="progressBar"><div class="progressFill" id="autoUpgrade1"></div></div>
<button class="upgradeBtn" data-type="auto" data-cost="100" data-value="1" data-progress="autoUpgrade1">+1 per second (100)</button>

<div class="progressBar"><div class="progressFill" id="autoUpgrade2"></div></div>
<button class="upgradeBtn" data-type="auto" data-cost="300" data-value="4" data-progress="autoUpgrade2">+4 per second (300)</button>

<div class="progressBar"><div class="progressFill" id="autoUpgrade3"></div></div>
<button class="upgradeBtn" data-type="auto" data-cost="800" data-value="10" data-progress="autoUpgrade3">+10 per second (800)</button>

<div class="progressBar"><div class="progressFill" id="autoUpgrade4"></div></div>
<button class="upgradeBtn" data-type="auto" data-cost="2000" data-value="25" data-progress="autoUpgrade4">+25 per second (2000)</button>
</div>
<script>
let chips = 0;
let perClick = 1;
let perSecond = 0;
const chipCounter = document.getElementById('chipCounter');
const clickButton = document.getElementById('clickChip');
const upgradeButtons = document.querySelectorAll('.upgradeBtn');

clickButton.addEventListener('click', (e) => {
chips += perClick;
updateCounter();
createFloatingChip(e);
});

upgradeButtons.forEach(btn => {
const progressId = btn.dataset.progress;
const progressBar = document.getElementById(progressId);
btn.addEventListener('click', (e) => {
const cost = parseInt(btn.dataset.cost);
const value = parseInt(btn.dataset.value);
const type = btn.dataset.type;
if (chips >= cost) {
chips -= cost;
if(type === 'click') perClick += value;
if(type === 'auto') perSecond += value;
progressBar.style.width = '100%';
updateCounter();
playUpgradeSound();
createUpgradeEffect(e);
} else {
const percent = Math.min((chips / cost) * 100, 100);
progressBar.style.width = percent + '%';
}
});
});

function updateCounter() {
chipCounter.textContent = `Lit Chips: ${chips}`;
}

function createFloatingChip(e) {
const chip = document.createElement('div');
chip.className = 'floatingChip';
chip.style.left = `${e.clientX - 10}px`;
chip.style.top = `${e.clientY - 20}px`;
chip.textContent = `+${perClick}`;
document.body.appendChild(chip);
setTimeout(() => { chip.remove(); }, 1000);
playClickSound();
}

function createUpgradeEffect(e) {
const effect = document.createElement('div');
effect.className = 'upgradeEffect';
effect.style.left = `${e.clientX - 50}px`;
effect.style.top = `${e.clientY - 50}px`;
document.body.appendChild(effect);
setTimeout(() => { effect.remove(); }, 500);
}

// Audio
const clickSound = new Audio('https://freesound.org/data/previews/256/256113_3263906-lq.mp3');
const upgradeSound = new Audio('https://freesound.org/data/previews/256/256114_3263906-lq.mp3');
function playClickSound(){ clickSound.currentTime=0; clickSound.play(); }
function playUpgradeSound(){ upgradeSound.currentTime=0; upgradeSound.play(); }

setInterval(() => {
chips += perSecond;
updateCounter();
// update progress bars automatically for auto upgrades
upgradeButtons.forEach(btn => {
const progressId = btn.dataset.progress;
const progressBar = document.getElementById(progressId);
const cost = parseInt(btn.dataset.cost);
const type = btn.dataset.type;
if (type === 'auto') {
const percent = Math.min((chips / cost) * 100, 100);
progressBar.style.width = percent + '%';
}
});
}, 1000);
</script>
</body>
</html>
     
 
what is notes.io
 

Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 14 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.