// ==UserScript==
// @name Diamond Engine
// @namespace http://tampermonkey.net/
// @version 1.1
// @description The Diamond Engine is connected to Drawaria.online's stories and is designed for Decorations. It's made for the Diamond Queen and it serves a critical role in the story to save the game.
// @author YouTubeDrawaria
// @include https://drawaria.online/*
// @include https://*.drawaria.online/*
// @grant GM_addStyle
// @run-at document-start
// @icon https://i.ibb.co/zV5sXzkz/diamond2.gif
// @license MIT
// @downloadURL https://update.greasyfork.icu/scripts/557371/Diamond%20Engine.user.js
// @updateURL https://update.greasyfork.icu/scripts/557371/Diamond%20Engine.meta.js
// ==/UserScript==
(function() {
'use strict';
// Esperamos a que la página cargue completamente (LOAD) para evitar pantalla blanca
window.addEventListener('load', function() {
console.log("Diamond Engine: Inicializando...");
// 1. CONFIGURACIÓN DE URLS Y SONIDOS
const STARTUP_SOUND_URL = 'https://www.myinstants.com/media/sounds/windows-vista-beta-2006-startup.mp3';
const CLICK_SOUND_URL = 'https://www.myinstants.com/media/sounds/pisseim-mund-online-audio-converter.mp3';
const GIF_ICON_URL = 'https://i.ibb.co/zV5sXzkz/diamond2.gif';
// Método de audio corregido (más compatible que AudioContext para scripts externos)
const startupAudio = new Audio(STARTUP_SOUND_URL);
const clickAudio = new Audio(CLICK_SOUND_URL);
function playSound(audioObj) {
audioObj.currentTime = 0;
audioObj.play().catch(e => console.warn("Audio bloqueado por el navegador (interactúa primero):", e));
}
// 2. ESTILOS CSS
GM_addStyle(`
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700;900&display=swap');
#diamond-gif-container {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 99999;
cursor: pointer;
transition: opacity 0.5s;
}
#diamond-gif {
width: 100px;
height: 100px;
animation: spin 4s linear infinite, float 3s ease-in-out infinite alternate;
border-radius: 50%;
box-shadow: 0 0 15px #00CED1;
}
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes float { 0% { transform: translateY(0px); } 100% { transform: translateY(-15px); } }
#diamond-engine-container, #options-container, #game-container {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 99998;
background-color: rgba(2, 5, 7, 0.95); /* Fondo oscuro azulado */
display: none;
overflow: auto;
justify-content: center;
align-items: center;
}
#diamond-engine-svg { display: block; margin: 50px auto; max-width: 900px; height: auto; }
#options-svg { display: block; margin: 50px auto; max-width: 800px; height: auto; }
#game-iframe { width: 100%; height: 100%; border: none; display: block; }
.game-back-btn {
position: absolute;
top: 10px; right: 10px;
padding: 10px 20px;
background: #008B8B; color: #E0FFFF;
border: 2px solid #00CED1;
box-shadow: 0 0 5px #00CED1;
cursor: pointer;
font-family: 'Orbitron', sans-serif;
font-size: 14px;
z-index: 100001;
transition: background 0.3s;
}
.game-back-btn:hover { background: #00CED1; color: #000; }
`);
// 3. CONTENIDO SVG PRINCIPAL (MENU DE INICIO)
const DIAMOND_ENGINE_SVG_CONTENT = `
`;
// 4. CONTENIDO SVG OPCIONES (HOLOGRÁFICO)
const OPTIONS_SVG_CONTENT = `
CLICK PRISMS TO ROTATE // CONNECT THE BEAM
COLLISION DETECTED