spooky effect
🧩 Syntax:
// ==UserScript==
// @name Mystical Particle Effect
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Adds a mystical custom spooky effect
// @author ______Spooky______
// @match https://vaughn.live/*
// @grant none
// @require https://cdn.jsdelivr.net/npm/particles.js@2.0.0/particles.min.js
// ==/UserScript==
(function() {
'use strict';
// Create a container for particles
const particleContainer = document.createElement('div');
particleContainer.id = 'mystical-particles';
particleContainer.style.position = 'fixed';
particleContainer.style.top = '0';
particleContainer.style.left = '0';
particleContainer.style.width = '100%';
particleContainer.style.height = '100%';
particleContainer.style.zIndex = '9999';
particleContainer.style.pointerEvents = 'none';
document.body.appendChild(particleContainer);
// Flag to track if particles are active
let particlesActive = false;
// Initialize particles with mystical settings
function initParticles() {
particlesJS('mystical-particles', {
particles: {
number: {
value: 80,
density: {
enable: true,
value_area: 800
}
},
color: {
value: ['#4a00e0', '#8e2de2', '#00c6ff']
},
shape: {
type: 'circle',
stroke: {
width: 0,
color: '#000000'
}
},
opacity: {
value: 0.5,
random: true,
anim: {
enable: true,
speed: 1,
opacity_min: 0.1,
sync: false
}
},
size: {
value: 3,
random: true,
anim: {
enable: true,
speed: 2,
size_min: 0.1,
sync: false
}
},
line_linked: {
enable: true,
distance: 150,
color: '#ffffff',
opacity: 0.4,
width: 1
},
move: {
enable: true,
speed: 2,
direction: 'none',
random: true,
straight: false,
out_mode: 'out',
bounce: false
}
},
interactivity: {
detect_on: 'canvas',
events: {
onhover: {
enable: true,
mode: 'repulse'
},
onclick: {
enable: true,
mode: 'push'
},
resize: true
},
modes: {
repulse: {
distance: 100,
duration: 0.4
},
push: {
particles_nb: 4
}
}
},
retina_detect: true
});
}
// Toggle particles on Ctrl+M
document.addEventListener('keydown', function(event) {
if (event.ctrlKey && event.key === 'm') {
if (!particlesActive) {
particleContainer.style.display = 'block';
initParticles();
particlesActive = true;
} else {
particleContainer.style.display = 'none';
particlesActive = false;
}
}
});
})();