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
JavaScript
// ๐ง 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);