☰

Minefun Galaxy Visual 🌌

Hiệu ứng galaxy đẹp cho minefun (không ảnh hưởng gameplay)

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

You will need to install an extension such as Tampermonkey to install this script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name         Minefun Galaxy Visual 🌌
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Hiệu ứng galaxy đẹp cho minefun (không ảnh hưởng gameplay)
// @author       You
// @match        *://minefun.io/*
// @match        *://*.minefun.io/*
// @grant        none
// ==/UserScript==

(function(){

'use strict';

let on=false,scale=1;

const btn=document.createElement("div");
btn.innerHTML="🌌";
btn.style.position="fixed";
btn.style.top="100px";
btn.style.left="100px";
btn.style.width="60px";
btn.style.height="60px";
btn.style.background="linear-gradient(45deg,#1a002a,#3a0ca3,#7209b7,#f72585)";
btn.style.borderRadius="15px";
btn.style.display="flex";
btn.style.alignItems="center";
btn.style.justifyContent="center";
btn.style.fontSize="30px";
btn.style.cursor="pointer";
btn.style.zIndex="999999";
btn.style.boxShadow="0 0 20px #a855f7";

document.body.appendChild(btn);

let dragging=false,offsetX=0,offsetY=0;

btn.onmousedown=e=>{
dragging=true;
offsetX=e.offsetX;
offsetY=e.offsetY
};

document.onmouseup=()=>dragging=false;

document.onmousemove=e=>{
if(dragging){
btn.style.left=e.clientX-offsetX+"px";
btn.style.top=e.clientY-offsetY+"px"
}
};

const style=document.createElement("style");
style.innerHTML=`
body.galaxy *{transition:all 0.5s ease!important}
body.galaxy{background:radial-gradient(circle at 20% 20%,#1a002a,#000)!important}
body.galaxy canvas{filter:hue-rotate(180deg) saturate(2) brightness(1.2)}
body.galaxy::before{
content:'';
position:fixed;
top:0;
left:0;
width:100%;
height:100%;
pointer-events:none;
background:url('https://i.imgur.com/9QZ7Z6F.png');
opacity:0.4;
mix-blend-mode:screen;
animation:moveStars 60s linear infinite
}
@keyframes moveStars{
from{transform:translateY(0)}
to{transform:translateY(-1000px)}
}
`;

document.head.appendChild(style);

btn.onclick=()=>{
on=!on;
document.body.classList.toggle("galaxy",on);
btn.style.boxShadow=on?"0 0 30px #f72585":"0 0 20px #a855f7"
};

document.addEventListener("keydown",e=>{
if(e.key==="+"){
scale+=0.1;
btn.style.transform="scale("+scale+")"
}
if(e.key==="-"&&scale>0.5){
scale-=0.1;
btn.style.transform="scale("+scale+")"
}
});

})();