UNPKG

brainrotscript

Version:

๐Ÿง  A brainrot programming language that compiles to JavaScript - because why write normal code when you can write code that's absolutely sending you? ๐Ÿ’€

222 lines (183 loc) โ€ข 6.94 kB
// ๐Ÿง  Main BrainrotScript Website Logic // This file powers your website with brainrot energy! const state = { vibes: 0, rizz: 100, aura: 50, isLit: false, username: "Anonymous Chad", achievements: [] }; function initWebsite() { console.log("๐Ÿง  BrainrotScript website is initializing..."); // Clear loading screen const appDiv = document.getElementById('app'); appDiv.innerHTML = ''; // Create main interface createMainInterface(); // Start the vibe engine startVibeEngine(); console.log("โœ… Website loaded - absolutely sending! ๐Ÿ’€"); } function createMainInterface() { const appDiv = document.getElementById('app'); const html = ` <div class="main-interface"> <div class="user-section"> <h2>๐Ÿ‘‘ Welcome, ${state.username}!</h2> <div class="stats-grid"> <div class="stat-card"> <div class="stat-number" id="vibes-count">${state.vibes}</div> <div>Total Vibes</div> </div> <div class="stat-card"> <div class="stat-number" id="rizz-count">${state.rizz}</div> <div>Rizz Level</div> </div> <div class="stat-card"> <div class="stat-number" id="aura-count">${state.aura}</div> <div>Aura Points</div> </div> </div> </div> <div class="vibe-section"> <h3>๐Ÿ”ฅ Vibe Generator</h3> <div class="vibe-meter"> <div class="vibe-fill" id="vibe-fill" style="width: ${state.vibes}%"></div> </div> <div class="controls"> <button class="button" onclick="addVibes()">Add Vibes ๐Ÿ“ˆ</button> <button class="button" onclick="boostRizz()">Boost Rizz ๐Ÿ’ช</button> <button class="button" onclick="generateAura()">Generate Aura โœจ</button> <button class="button" onclick="vibeCheck()">Vibe Check ๐Ÿง </button> </div> </div> <div class="status-section"> <h3 id="status-message">Ready to get lit! ๐Ÿ”ฅ</h3> <div id="achievements"></div> </div> </div> `; appDiv.innerHTML = html; } function addVibes() { state.vibes += 5; updateDisplay(); if (state.vibes > 50 && !state.isLit) { state.isLit = true; triggerLitMode(); } checkAchievements(); } function boostRizz() { state.rizz += 10; state.aura += 2; updateDisplay(); showMessage("Rizz boosted! You're absolutely sending! ๐Ÿ’€"); checkAchievements(); } function generateAura() { const auraGain = Math.floor(Math.random() * 15) + 5; state.aura += auraGain; updateDisplay(); showMessage(`Generated ${auraGain} aura points! โœจ`); checkAchievements(); } function vibeCheck() { const totalPower = state.vibes + state.rizz + state.aura; if (totalPower > 300) { showMessage("๐Ÿ”ฅ LEGENDARY STATUS - You're built different! ๐Ÿ‘‘"); } else if (totalPower > 200) { showMessage("๐Ÿ’ช SIGMA ENERGY - Absolutely sending! ๐Ÿ’€"); } else if (totalPower > 100) { showMessage("โœจ MAIN CHARACTER VIBES - No cap! ๐Ÿงข"); } else { showMessage("๐Ÿ˜ญ Down bad fr - Need more vibes!"); } } function triggerLitMode() { const body = document.body; body.style.animation = 'pulse 2s infinite'; showMessage("๐Ÿ”ฅ IT'S LIT! Website is absolutely sending! ๐Ÿ’€"); } function updateDisplay() { document.getElementById('vibes-count').textContent = state.vibes; document.getElementById('rizz-count').textContent = state.rizz; document.getElementById('aura-count').textContent = state.aura; const vibePercent = Math.min(state.vibes, 100); document.getElementById('vibe-fill').style.width = vibePercent + '%'; } function showMessage(message) { const statusEl = document.getElementById('status-message'); statusEl.textContent = message; statusEl.style.animation = 'pulse 1s ease-in-out'; setTimeout(() => { statusEl.style.animation = ''; }, 1000); } function checkAchievements() { const achievements = []; if (state.vibes >= 50 && !state.achievements.includes('vibe-master')) { achievements.push('๐ŸŽฏ Vibe Master - No cap!'); state.achievements.push('vibe-master'); } if (state.rizz >= 200 && !state.achievements.includes('rizz-god')) { achievements.push('๐Ÿ‘‘ Rizz God - Built different!'); state.achievements.push('rizz-god'); } if (state.aura >= 100 && !state.achievements.includes('aura-legendary')) { achievements.push('โœจ Legendary Aura - Absolutely sending!'); state.achievements.push('aura-legendary'); } if (achievements.length > 0) { displayAchievements(achievements); } } function displayAchievements(newAchievements) { const achievementsDiv = document.getElementById('achievements'); for (let achievement of newAchievements) { const achievementEl = document.createElement('div'); achievementEl.className = 'achievement unlocked'; achievementEl.textContent = achievement; achievementEl.style.cssText = ` background: rgba(255, 215, 0, 0.2); border: 2px solid gold; border-radius: 10px; padding: 10px; margin: 5px 0; animation: slideIn 0.5s ease-out; `; achievementsDiv.appendChild(achievementEl); } } function startVibeEngine() { // Auto-generate vibes every 5 seconds setInterval(() => { if (state.isLit) { state.vibes += 1; state.aura += 1; updateDisplay(); } }, 5000); } // Initialize website when page loads document.addEventListener('DOMContentLoaded', () => { setTimeout(initWebsite, 1500); // Small delay for effect }); // Add CSS animations const style = document.createElement('style'); style.textContent = ` @keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } } @keyframes slideIn { 0% { transform: translateX(-100%); opacity: 0; } 100% { transform: translateX(0); opacity: 1; } } .achievement { animation: slideIn 0.5s ease-out; } `; document.head.appendChild(style);