WEBLEB
Inicio
Editora de código
Iniciar sesión
Pro
Español
English
Français
Español
Português
Deutsch
Italiano
हिंदी
HTML
CSS
JS
Five Nights at Epsteins (Parody)
Night 1
12 AM
Power:
100
%
Security Office
Camera 1 — Nothing moving...
Use camera buttons to switch rooms
YOU GOT CAUGHT
Toggle Cameras
Cam 1
Cam 2
Cam 3
Close Door
Restart
body { background: #031a03; display: none; flex-direction: column; justify-content: center; align-items: center; font-size: 22px; } #cameraFeed { border: 3px solid #0f0; padding: 20px; margin-bottom: 20px; background: #000; } #controls { padding: 15px; background: #111; border-top: 2px solid #333; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; } button { padding: 10px 16px; font-size: 16px; background: #222; color: white; border: 1px solid #555; cursor: pointer; } button:hover { background: #333; } .danger { background: darkred; } #jumpscare { position: absolute; inset: 0; background: black; display: none; align-items: center; justify-content: center; font-size: 60px; color: red; animation: flash 0.15s infinite alternate; z-index: 10; } @keyframes flash { from { opacity: 1; } to { opacity: 0.2; } }
script.js let power = 100; let hour = 12; let cameraOpen = false; let doorClosed = false; let enemyPosition = 3; let gameRunning = true; const powerEl = document.getElementById("power"); const timeEl = document.getElementById("time"); const cameraView = document.getElementById("cameraView"); const cameraFeed = document.getElementById("cameraFeed"); const jumpscare = document.getElementById("jumpscare"); function toggleCamera() { if (!gameRunning) return; cameraOpen = !cameraOpen; cameraView.style.display = cameraOpen ? "flex" : "none"; drainPower(2); } function switchCam(num) { if (!cameraOpen || !gameRunning) return; if (enemyPosition === num) { cameraFeed.textContent = `Camera ${num} — Something is watching you...`; } else { cameraFeed.textContent = `Camera ${num} — All clear.`; } drainPower(1); } function closeDoor() { if (!gameRunning) return; doorClosed = !doorClosed; alert(doorClosed ? "Door Closed" : "Door Opened"); drainPower(5); } function drainPower(amount) { power -= amount; if (power < 0) power = 0; powerEl.textContent = power; if (power === 0) triggerJumpscare(); } function triggerJumpscare() { if (!gameRunning) return; gameRunning = false; jumpscare.style.display = "flex"; } function restartGame() { power = 100; hour = 12; enemyPosition = 3; cameraOpen = false; doorClosed = false; gameRunning = true; jumpscare.style.display = "none"; cameraView.style.display = "none"; powerEl.textContent = power; timeEl.textContent = "12 AM"; } function advanceTime() { if (!gameRunning) return; hour++; if (hour === 13) timeEl.textContent = "1 AM"; else if (hour === 14) timeEl.textContent = "2 AM"; else if (hour === 15) timeEl.textContent = "3 AM"; else if (hour === 16) timeEl.textContent = "4 AM"; else if (hour === 17) timeEl.textContent = "5 AM"; else if (hour >= 18) { alert("6 AM — You survived!"); restartGame(); } } function moveEnemy() { if (!gameRunning) return; if (Math.random() < 0.6) { enemyPosition--; } if (enemyPosition <= 0) { if (!doorClosed) triggerJumpscare(); else enemyPosition = 3; } } setInterval(() => { if (!gameRunning) return; drainPower(cameraOpen ? 2 : 0.5); }, 2000); setInterval(advanceTime, 8000); setInterval(moveEnemy, 5000);
Preview
Open Advanced Editor
HTML
CSS
JS
Five Nights at Epsteins (Parody)
Night 1
12 AM
Power:
100
%
Security Office
Camera 1 — Nothing moving...
Use camera buttons to switch rooms
YOU GOT CAUGHT
Toggle Cameras
Cam 1
Cam 2
Cam 3
Close Door
Restart
body { background: #031a03; display: none; flex-direction: column; justify-content: center; align-items: center; font-size: 22px; } #cameraFeed { border: 3px solid #0f0; padding: 20px; margin-bottom: 20px; background: #000; } #controls { padding: 15px; background: #111; border-top: 2px solid #333; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; } button { padding: 10px 16px; font-size: 16px; background: #222; color: white; border: 1px solid #555; cursor: pointer; } button:hover { background: #333; } .danger { background: darkred; } #jumpscare { position: absolute; inset: 0; background: black; display: none; align-items: center; justify-content: center; font-size: 60px; color: red; animation: flash 0.15s infinite alternate; z-index: 10; } @keyframes flash { from { opacity: 1; } to { opacity: 0.2; } }
script.js let power = 100; let hour = 12; let cameraOpen = false; let doorClosed = false; let enemyPosition = 3; let gameRunning = true; const powerEl = document.getElementById("power"); const timeEl = document.getElementById("time"); const cameraView = document.getElementById("cameraView"); const cameraFeed = document.getElementById("cameraFeed"); const jumpscare = document.getElementById("jumpscare"); function toggleCamera() { if (!gameRunning) return; cameraOpen = !cameraOpen; cameraView.style.display = cameraOpen ? "flex" : "none"; drainPower(2); } function switchCam(num) { if (!cameraOpen || !gameRunning) return; if (enemyPosition === num) { cameraFeed.textContent = `Camera ${num} — Something is watching you...`; } else { cameraFeed.textContent = `Camera ${num} — All clear.`; } drainPower(1); } function closeDoor() { if (!gameRunning) return; doorClosed = !doorClosed; alert(doorClosed ? "Door Closed" : "Door Opened"); drainPower(5); } function drainPower(amount) { power -= amount; if (power < 0) power = 0; powerEl.textContent = power; if (power === 0) triggerJumpscare(); } function triggerJumpscare() { if (!gameRunning) return; gameRunning = false; jumpscare.style.display = "flex"; } function restartGame() { power = 100; hour = 12; enemyPosition = 3; cameraOpen = false; doorClosed = false; gameRunning = true; jumpscare.style.display = "none"; cameraView.style.display = "none"; powerEl.textContent = power; timeEl.textContent = "12 AM"; } function advanceTime() { if (!gameRunning) return; hour++; if (hour === 13) timeEl.textContent = "1 AM"; else if (hour === 14) timeEl.textContent = "2 AM"; else if (hour === 15) timeEl.textContent = "3 AM"; else if (hour === 16) timeEl.textContent = "4 AM"; else if (hour === 17) timeEl.textContent = "5 AM"; else if (hour >= 18) { alert("6 AM — You survived!"); restartGame(); } } function moveEnemy() { if (!gameRunning) return; if (Math.random() < 0.6) { enemyPosition--; } if (enemyPosition <= 0) { if (!doorClosed) triggerJumpscare(); else enemyPosition = 3; } } setInterval(() => { if (!gameRunning) return; drainPower(cameraOpen ? 2 : 0.5); }, 2000); setInterval(advanceTime, 8000); setInterval(moveEnemy, 5000);
Preview
Validating your code, please wait...