-
Notifications
You must be signed in to change notification settings - Fork 14
/
script.js
824 lines (651 loc) · 23.4 KB
/
script.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
let score = 0;
document.getElementById("score").innerText = score;
let points = 0;
function triggerRandomAlert() {
const messages = [
"You shouldn't have clicked that.",
"What were you thinking?",
"Curiosity killed the cat...",
"Feeling brave, aren't we?",
"It's too late now...",
"Don't look behind you...",
"Are you sure this is the right choice?",
"Is someone watching you?",
];
const message = messages[Math.floor(Math.random() * messages.length)];
alert(message);
updateScore();
}
function updateScore() {
score++;
document.getElementById("score").innerText = score;
}
function incrementPoints() {
points += 5;
document.getElementById("points").innerText = points;
}
const eerieSounds = ["sound1.mp3", "sound2.mp3", "sound3.mp3"];
function playRandomSound() {
const audio = new Audio(eerieSounds[Math.floor(Math.random() * eerieSounds.length)]);
audio.play();
}
function playSpinSound() {
const audio = new Audio("spin.mp3");
audio.play();
setTimeout(() => {
audio.pause();
audio.currentTime = 0;
}, 5000);
}
function startRotation() {
console.log("Rotation started!");
}
// trailing red cursor
let cursorTrail = [];
document.addEventListener("mousemove", function (e) {
const trailElement = document.createElement("div");
trailElement.className = "trailing-cursor";
trailElement.style.left = `${e.pageX}px`;
trailElement.style.top = `${e.pageY}px`;
document.body.appendChild(trailElement);
cursorTrail.push(trailElement);
if (cursorTrail.length > 10) {
document.body.removeChild(cursorTrail.shift());
}
});
function distortScreen() {
const body = document.body;
body.classList.add('intense-flash');
let distortInterval = setInterval(() => {
const scale = 0.7 + Math.random() * 0.6;
const rotate = Math.random() * 30 - 15;
body.style.transition = 'transform 0.03s, background-color 0.03s';
body.style.transform = `scale(${scale}) rotate(${rotate}deg)`;
}, 30);
setTimeout(() => {
clearInterval(distortInterval);
body.style.transform = 'scale(1) rotate(0deg)';
body.classList.remove('intense-flash');
}, 10000);
}
function triggerFullScreenImage() {
const overlay = document.createElement('div');
overlay.style.position = 'fixed';
overlay.style.top = '0';
overlay.style.left = '0';
overlay.style.width = '100%';
overlay.style.height = '100%';
overlay.style.backgroundColor = 'rgba(0, 0, 0, 0.5)';
overlay.style.backdropFilter = 'blur(8px)';
overlay.style.zIndex = '9998';
const solvedMessage = document.createElement('div');
solvedMessage.textContent = "this has been solved";
solvedMessage.style.position = 'fixed';
solvedMessage.style.top = '50%';
solvedMessage.style.left = '50%';
solvedMessage.style.transform = 'translate(-50%, -50%)';
solvedMessage.style.fontSize = '2rem';
solvedMessage.style.color = '#fff';
solvedMessage.style.zIndex = '9999';
solvedMessage.style.backgroundColor = 'rgba(0, 0, 0, 0.8)';
solvedMessage.style.padding = '20px';
solvedMessage.style.borderRadius = '10px';
document.body.appendChild(overlay);
document.body.appendChild(solvedMessage);
setTimeout(() => {
overlay.remove();
solvedMessage.remove();
}, 5000);
}
const style = document.createElement('style');
style.innerHTML = `
video::-webkit-media-controls {
display: none !important;
}
video::--media-controls {
display: none !important;
}
`;
document.head.appendChild(style);
function startWhispering() {
alert("You can hear it whispering...");
}
const wandererCard = document.querySelector(".wanderer");
wandererCard.addEventListener("mouseenter", () => {
wandererCard.style.position = "absolute";
wandererCard.style.top = `${Math.random() * window.innerHeight}px`;
wandererCard.style.left = `${Math.random() * window.innerWidth}px`;
});
const creepyMessages = [
"Did you hear that?",
"Something is not right...",
"Are you alone?",
"This place feels alive...",
"You should not be here...",
"It's behind you...",
];
function startCreepyMessages() {
setInterval(() => {
const message = creepyMessages[Math.floor(Math.random() * creepyMessages.length)];
alert(message);
}, 10000); // Change message every 10 seconds
}
function addGhostlyFigure() {
const ghost = document.createElement('div');
ghost.className = 'ghost';
ghost.style.top = `${Math.random() * window.innerHeight}px`;
ghost.style.left = `${Math.random() * window.innerWidth}px`;
document.body.appendChild(ghost);
setTimeout(() => {
ghost.remove();
}, 3000); // Ghost lasts for 3 seconds
}
// THIS IS IMPORTANT: APATOTO comment rakh
// // Darken screen briefly for a horror effect
// function darkenScreen() {
// const darkOverlay = document.createElement('div');
// darkOverlay.className = 'dark-overlay';
// document.body.appendChild(darkOverlay);
// setTimeout(() => {
// darkOverlay.remove();
// }, 500); // Overlay lasts for 0.5 seconds
// }
setInterval(addGhostlyFigure, 15000); // Add ghost every 15 seconds
setInterval(darkenScreen, 30000); // Darken screen every 30 seconds
setInterval(playRandomSound, 20000); // Play sound every 20 seconds
function jumpThroughTime() {
const futureMessages = [
"Welcome to the future, where nothing is as it seems...",
"Time is an illusion, don't trust it!",
"You have crossed into another dimension!",
];
const randomMessage = futureMessages[Math.floor(Math.random() * futureMessages.length)];
document.getElementById('future-message').innerHTML = randomMessage;
}
startCreepyMessages();
function improveVanishingAct() {
const card = event.currentTarget;
card.classList.add('glitch-effect');
triggerRandomAlert();
updateScore();
incrementPoints();
solveButton.addEventListener('click', function() {
creepySound.play();
creepyOverlay.style.opacity = 1;
document.body.classList.add('creepy-effect');
document.body.style.transition = "background-color 1s ease";
document.body.style.backgroundColor = "black"; // You can choose any color
const flickerInterval = setInterval(() => {
document.body.style.opacity = Math.random() < 0.5 ? '1' : '0.5';
}, 200);
const bloodDripDiv = document.createElement('div');
bloodDripDiv.className = 'blood-drip';
document.body.appendChild(bloodDripDiv);
setTimeout(() => {
clearInterval(flickerInterval);
document.body.style.opacity = '1'; // Reset opacity
bloodDripDiv.remove();
}, 5000);
});
}
window.onload = () => {
createMemory();
jumpThroughTime();
};
const card1 = document.getElementById('card1');
const eerieAudio = new Audio('sound1.mp3');
card1.addEventListener('mouseenter', () => {
eerieAudio.play();
});
setInterval(createBloodDrip, 1500);
card1.addEventListener('mouseover', () => {
card1.classList.add('glitch-effect-active');
});
card1.addEventListener('mouseleave', () => {
card1.classList.remove('glitch-effect-active');
});
function improveVanishingAct() {
const card = document.getElementById('card1');
card.classList.add('clicked');
}
function playEerieSound() {
const audio = new Audio('sound2.mp3');
audio.play();
const newSound = new Audio('sound1.mp3');
newSound.play();
}
document.body.style.backgroundColor = "#1e1e1e"; // Change to a darker background color
// Random scary quotes
const scaryQuotes = [
"You're never really alone...",
"The shadows have a life of their own.",
"They watch you while you sleep...",
"Sometimes, it's better to forget.",
"What lurks in the dark will find you...",
];
card1.addEventListener('mouseenter', () => {
const randomQuote = scaryQuotes[Math.floor(Math.random() * scaryQuotes.length)];
const quoteElement = document.createElement('div');
quoteElement.className = 'quote-display';
quoteElement.innerText = randomQuote;
card1.appendChild(quoteElement);
setTimeout(() => {
quoteElement.remove();
}, 3000); // Display for 3 seconds
});
let countdownTimer;
function startCountdown() {
let timeLeft = 10; // 10 seconds countdown
const countdownDisplay = document.createElement('div');
countdownDisplay.className = 'countdown-timer';
countdownDisplay.innerText = `Countdown: ${timeLeft}`;
document.body.appendChild(countdownDisplay);
countdownTimer = setInterval(() => {
timeLeft--;
countdownDisplay.innerText = `Countdown: ${timeLeft}`;
if (timeLeft <= 0) {
clearInterval(countdownTimer);
countdownDisplay.innerText = "Time's up!";
setTimeout(() => {
countdownDisplay.remove();
}, 2000); // Display 'Time's up!' for 2 seconds
}
}, 1000);
}
card1.addEventListener('click', startCountdown);
function startBackgroundAnimation() {
document.body.style.animation = 'creepyBackground 5s infinite alternate';
}
window.onload = startBackgroundAnimation;
const button = document.querySelector('.solve-button');
const glitchText = document.querySelector('.glitch-effect');
const distortedText = document.querySelector('.distorted-text');
const audio = new Audio('sound1.mp3');
button.addEventListener('click', () => {
audio.play();
glitchText.classList.add('active');
distortedText.textContent = "You solved it! Or did you?";
setTimeout(() => {
glitchText.classList.remove('active');
}, 3000);
});
function createBloodConfetti() {
for (let i = 0; i < 30; i++) {
const bloodDrop = document.createElement("div");
bloodDrop.classList.add("blood-drop-confetti");
bloodDrop.style.left = `${Math.random() * window.innerWidth}px`;
bloodDrop.style.animationDelay = `${Math.random() * 0.5}s`;
document.body.appendChild(bloodDrop);
bloodDrop.addEventListener('animationend', () => bloodDrop.remove());
}
}
function improveVanishingAct() {
const card = document.getElementById("card1");
card.classList.add("clicked");
playEerieSound();
createBloodConfetti();
const thunderBackground = document.createElement("div");
thunderBackground.classList.add("thunder-background");
document.body.appendChild(thunderBackground);
const ghostImage = document.createElement("img");
ghostImage.src = "images/valak.png";
ghostImage.classList.add("ghost-image");
ghostImage.style.opacity = 0; // Start fully transparent
ghostImage.style.transition = 'opacity 2s'; // Change opacity over 2 seconds
document.body.appendChild(ghostImage);
setTimeout(() => {
ghostImage.style.opacity = 1;
}, 100);
const thunderSound = new Audio('card1Sound.mp3');
thunderSound.play();
setTimeout(() => {
ghostImage.remove();
thunderBackground.remove();
}, 10000);
setTimeout(() => {
ghostImage.remove();
thunderBackground.remove();
createBreakingEffect();
}, 10000);
}
function createFloatingShadows() {
const shadowCount = 30; // Number of shadows
const shadows = [];
for (let i = 0; i < shadowCount; i++) {
const shadow = document.createElement('div');
shadow.className = 'floating-shadow';
shadow.style.left = `${Math.random() * 100}vw`; // Random horizontal position
shadow.style.animationDuration = `${Math.random() * 3 + 2}s`; // Random animation duration
document.body.appendChild(shadow);
shadows.push(shadow);
}
setTimeout(() => {
shadows.forEach(shadow => document.body.removeChild(shadow));
}, 5000);
}
function createConfetti() {
const canvas = document.createElement('canvas');
document.body.appendChild(canvas);
const ctx = canvas.getContext('2d');
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
// Generate confetti particles
const particles = [];
for (let i = 0; i < 100; i++) {
particles.push({
x: Math.random() * canvas.width,
y: Math.random() * canvas.height,
radius: Math.random() * 5 + 5,
color: `hsl(${Math.random() * 360}, 100%, 50%)`,
velocityX: (Math.random() - 0.5) * 5,
velocityY: Math.random() * -3 - 1
});
}
function draw() {
ctx.clearRect(0, 0, canvas.width, canvas.height);
particles.forEach(p => {
ctx.beginPath();
ctx.arc(p.x, p.y, p.radius, 0, Math.PI * 2);
ctx.fillStyle = p.color;
ctx.fill();
ctx.closePath();
});
}
function update() {
particles.forEach(p => {
p.x += p.velocityX;
p.y += p.velocityY;
// Recycle particles
if (p.y < 0) {
p.y = canvas.height;
p.x = Math.random() * canvas.width;
p.velocityY = (Math.random() * -3) - 1;
}
});
}
function animate() {
draw();
update();
requestAnimationFrame(animate);
}
animate();
// Remove canvas after a while
setTimeout(() => {
document.body.removeChild(canvas);
}, 5000); // Adjust duration as needed
}
function incrementPoints() {
const pointsElement = document.getElementById('points');
let currentPoints = parseInt(pointsElement.innerText);
pointsElement.innerText = currentPoints + 1; // Increment points
}
document.addEventListener('DOMContentLoaded', () => {
const potionCard = document.querySelector('.potion');
const surpriseMessageDiv = document.getElementById('surprise-message');
let clickCount = 0;
function showMessage() {
clickCount++;
const messages = [
'Boo! You found a hidden message!',
'Keep clicking for more surprises!',
'The potion is bubbling with excitement!',
'What will happen next? Click again!'
];
if (clickCount <= messages.length) {
surpriseMessageDiv.textContent = messages[clickCount - 1];
} else {
surpriseMessageDiv.textContent = 'The potion is now mixed! Something magical may happen...';
triggerSurpriseEffect();
}
}
function triggerSurpriseEffect() {
const colors = ['#ff5733', '#33ff57', '#3357ff', '#ff33a1', '#ffcc33'];
const randomColor = colors[Math.floor(Math.random() * colors.length)];
potionCard.style.backgroundColor = randomColor;
potionCard.style.transition = 'background-color 0.5s ease';
const surpriseSound = new Audio('surprise-sound.mp3');
surpriseSound.play();
const liquid = document.querySelector('.liquid');
liquid.style.animation = 'mixPotion 1s infinite';
}
potionCard.addEventListener('click', showMessage);
});
const potionCard = document.querySelector('.potion');
const hiddenMessage = document.getElementById('hidden-message');
function showMessage() {
hiddenMessage.style.display = 'block';
setTimeout(() => {
hiddenMessage.style.display = 'none';
}, 3000);
}
potionCard.addEventListener('click', showMessage);
document.addEventListener("mousemove", (e) => {
console.log("Mouse is moving", e.pageX, e.pageY);
const cursorCircle = document.createElement("div");
cursorCircle.classList.add("trailing-cursor");
cursorCircle.style.left = `${e.pageX}px`;
cursorCircle.style.top = `${e.pageY}px`;
document.body.appendChild(cursorCircle);
setTimeout(() => {
cursorCircle.remove();
}, 1000);
});
function playDisSound() {
const audio = new Audio('distort.mp3');
audio.play();
setTimeout(() => {
audio.pause(); // Stop the audio
audio.currentTime = 0; // Reset to the start
}, 5000);
const newSound = new Audio('distorted2.mp3');
newSound.play();
const alarm = new Audio('alarm.mp3');
alarm.play();
}
function reflectWords() {
const reflections = [
"You see a mischievous fairy! 🧚♀️",
"A wise old owl winks at you! 🦉",
"A rainbow appears, and laughter fills the air! 🌈",
"You glimpse a playful ghost dancing! 👻",
"The mirror shows you a silly monster! 👹"
];
const randomReflection = reflections[Math.floor(Math.random() * reflections.length)];
const reflectionElement = document.getElementById("reflection");
reflectionElement.innerText = randomReflection;
reflectionElement.style.display = "block";
playMagicSound();
}
function playMagicSound() {
const audio = new Audio('magic-sound.mp3');
audio.play();
}
function embarkOnAdventure() {
const safariCard = document.getElementById('safari-card');
safariCard.classList.add('glitch-effect');
const safariSound = new Audio('safari-sound.mp3');
safariSound.play();
const messages = [
"Beware of the wild animals lurking in the code!",
"A ghost has joined your adventure!",
"Did you hear that? It’s just a bug!",
"Watch out! Safari spirits are near!",
];
const randomMessage = messages[Math.floor(Math.random() * messages.length)];
alert(randomMessage);
setTimeout(() => {
safariCard.classList.remove('glitch-effect');
}, 3000);
const safariEffect = document.querySelector('.safari-effect');
safariEffect.classList.add('active');
setTimeout(() => {
safariEffect.classList.remove('active');
}, 3000);
setTimeout(() => {
const bsodMessage = document.querySelector('.bsod-message');
bsodMessage.style.display = 'flex';
bsodMessage.innerHTML = `<h2>:( SYSTEM FAILURE</h2><p>Your adventure has encountered an error!</p>`; // Custom BSOD message
setTimeout(() => {
bsodMessage.style.display = 'none';
}, 50000);
}, 3000);
createBugs();
}
document.getElementById("hidden-disturbance").classList.add("hidden-message");
function triggerDisturbance() {
const overlay = document.createElement('div');
overlay.className = 'blur-overlay';
const message = document.createElement('div');
message.className = 'blur-message';
message.textContent = 'Issue has been successfully solved';
overlay.appendChild(message);
document.body.appendChild(overlay);
setTimeout(() => {
overlay.classList.add('active');
}, 100);
setTimeout(() => {
overlay.classList.remove('active');
setTimeout(() => {
overlay.remove();
}, 300);
}, 5000);
document.getElementById("disturbance-text").textContent = randomizeText();
showHiddenDisturbance();
setTimeout(() => {
moveCardAround();
}, 4000);
}
function randomizeText() {
const messages = [
"Stop clicking.",
"It's already too late..."
];
return messages[Math.floor(Math.random() * messages.length)];
}
function showHiddenDisturbance() {
const hiddenMessage = document.getElementById("hidden-disturbance");
hiddenMessage.style.display = 'block'; // Make hidden message visible
hiddenMessage.style.animation = 'fadeIn 1s forwards'; // Add fade-in animation
}
function showBSOD(bsoD) {
bsoD.style.position = "fixed";
bsoD.style.top = "0";
bsoD.style.left = "0";
bsoD.style.width = "100vw";
bsoD.style.height = "100vh";
bsoD.style.backgroundColor = "#0000FF";
bsoD.style.color = "#ffffff";
bsoD.style.textAlign = "center";
bsoD.style.fontSize = "3rem";
bsoD.style.display = "flex";
bsoD.style.justifyContent = "center";
bsoD.style.alignItems = "center";
bsoD.style.zIndex = "9999";
bsoD.style.opacity = "1";
bsoD.style.transition = "opacity 1s";
if (bsoD.requestFullscreen) {
bsoD.requestFullscreen();
} else if (bsoD.mozRequestFullScreen) { // Firefox
bsoD.mozRequestFullScreen();
} else if (bsoD.webkitRequestFullscreen) { // Chrome, Safari, Opera
bsoD.webkitRequestFullscreen();
} else if (bsoD.msRequestFullscreen) { // IE/Edge
bsoD.msRequestFullscreen();
}
setTimeout(() => {
bsoD.style.opacity = "0";
setTimeout(() => {
bsoD.style.display = "none";
returnToNormal();
}, 1000);
}, 8000);
}
function addShakeAnimation() {
const style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = `
body {
animation: websiteShake 0.3s infinite; /* Set the shake animation */
}
`;
document.head.appendChild(style);
const activateShake = () => {
document.body.style.animation = 'none';
setTimeout(() => {
document.body.style.animation = 'websiteShake 0.3s infinite';
}, 50);
};
setInterval(activateShake, 5000);
}
addShakeAnimation();
function startEarthquake() {
const gridDiv = document.querySelector(".grid");
gridDiv.classList.add("quake-active");
setTimeout(() => {
gridDiv.classList.remove("quake-active");
}, 20000);
}
function triggerScreenShake() {
let body = document.body;
let shakeInterval = setInterval(() => {
body.style.transform = `translate(${Math.random() * 10 - 5}px, ${Math.random() * 10 - 5}px)`;
}, 50);
setTimeout(() => {
clearInterval(shakeInterval);
body.style.transform = 'none';
}, 1000);
}
function triggerCursorFlicker() {
let cursorInterval = setInterval(() => {
document.body.style.cursor = (Math.random() > 0.5) ? 'none' : 'default';
}, 100);
setTimeout(() => {
clearInterval(cursorInterval);
document.body.style.cursor = 'default';
}, 10000);
}
function triggerRandomColorChanges() {
let colorInterval = setInterval(() => {
document.querySelectorAll('*').forEach(element => {
const randomColor = `rgb(${Math.random() * 256}, ${Math.random() * 256}, ${Math.random() * 256})`;
element.style.color = randomColor;
element.style.backgroundColor = randomColor;
element.style.borderColor = randomColor;
});
}, 100);
setTimeout(() => {
clearInterval(colorInterval);
document.querySelectorAll('*').forEach(element => {
element.style.color = '';
element.style.backgroundColor = '';
element.style.borderColor = '';
});
}, 10000);
}
function triggerRandomDialogs() {
let dialogInterval = setInterval(() => {
let randomMessage = ['ERROR DETECTED!', 'SYSTEM OVERLOAD!', 'UNEXPECTED BEHAVIOR', 'RANDOM FAULT OCCURRED'];
let dialog = document.createElement('div');
dialog.classList.add('error-dialog');
dialog.innerText = randomMessage[Math.floor(Math.random() * randomMessage.length)];
document.body.appendChild(dialog);
setTimeout(() => {
dialog.remove();
}, 2000);
}, 500);
setTimeout(() => {
clearInterval(dialogInterval);
}, 10000);
}
function createMouseTrail(event) {
let trail = document.createElement('div');
trail.classList.add('error-memory-trail');
trail.innerText = 'ERROR MEMORY';
trail.style.position = 'fixed';
trail.style.top = event.clientY + 'px';
trail.style.left = event.clientX + 'px';
document.body.appendChild(trail);
setTimeout(() => {
trail.remove();
}, 1000);
}