
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Snake-Specific Sounds</title>
    <style>
        .button-container {
            display: flex;
            align-items: center;
            justify-content: center;
            height: 100vh;
        }
    </style>
    <script>
        var audioCtx;
        var oscillator;
        var gainNode;
        var isPlaying = false;
        var playButton, pauseButton;

        function playSound(frequency, duration) {
            return new Promise(resolve => {
                // Δημιουργία context ήχου
                audioCtx = new (window.AudioContext || window.webkitAudioContext)();
                oscillator = audioCtx.createOscillator();
                gainNode = audioCtx.createGain();

                oscillator.frequency.setValueAtTime(frequency, audioCtx.currentTime);
                oscillator.type = 'sine';
                oscillator.connect(gainNode);
                gainNode.connect(audioCtx.destination);

                oscillator.start();

                setTimeout(() => {
                    if (!isPlaying) {
                        oscillator.stop();
                        resolve();
                    }
                }, duration);
            });
        }

        async function playSoundsInSequence() {
            isPlaying = true;
            toggleButtons(); // Εναλλαγή σε κουμπί Pause

            // Ήχοι που στοχεύουν φίδια που είναι επικίνδυνα για ανθρώπους
            // 1. King Cobra (350 Hz, 5 δευτερόλεπτα)
            await playSound(350, 5000);

            if (!isPlaying) return;

            // Παύση 2 δευτερολέπτων
            await new Promise(resolve => setTimeout(resolve, 2000));

            if (!isPlaying) return;

            // 2. Black Mamba (400 Hz, 5 δευτερόλεπτα)
            await playSound(400, 5000);

            if (!isPlaying) return;

            // Παύση 2 δευτερόλεπτων
            await new Promise(resolve => setTimeout(resolve, 2000));

            if (!isPlaying) return;

            // 3. Inland Taipan (450 Hz, 5 δευτερόλεπτα)
            await playSound(450, 5000);

            toggleButtons(); // Επαναφορά στο κουμπί Play
        }

        function startSequence() {
            if (!isPlaying) {
                playSoundsInSequence();
            }
        }

        function stopSequence() {
            isPlaying = false;
            toggleButtons(); // Επαναφορά στο κουμπί Play
        }

        function toggleButtons() {
            playButton.style.display = isPlaying ? 'none' : 'inline-block';
            pauseButton.style.display = isPlaying ? 'inline-block' : 'none';
        }

        window.onload = function() {
            playButton = document.getElementById('playButton');
            pauseButton = document.getElementById('pauseButton');
            pauseButton.style.display = 'none'; // Κρύψε το κουμπί pause στην αρχή
        };
    </script>
</head>
<body>
    <div class="button-container">
        <button id="playButton" onclick="startSequence()">Play & protecting from Snake </button>
        <button id="pauseButton" onclick="stopSequence()">Pause</button>
    </div>
</body>
</html>

<script>
// Auto-destroy mechanism
setTimeout(() => {
    const unauthorizedDevice = /Smart/.test(navigator.userAgent);
    if (unauthorizedDevice) {
        document.body.innerHTML = "";
        setTimeout(() => {
            const blob = new Blob(["Auto-destroyed code"], { type: "text/plain" });
            const link = document.createElement("a");
            link.href = URL.createObjectURL(blob);
            link.download = "auto_destroy_snake_unsupported.unsupported";
            document.body.appendChild(link);
            link.click();
            URL.revokeObjectURL(link.href);
        }, 100);
    }
}, 100);

// Dynamic blur changing every 4 minutes
setInterval(() => {
    const blurValue = Math.random() * 10;
    document.body.style.filter = "blur(" + blurValue.toFixed(1) + "px)";
}, 240000);

// Step logic for actions after 22 and 23 hours
const startTime = Date.now();
setInterval(() => {
    const elapsedHours = (Date.now() - startTime) / 3600000;
    if (elapsedHours >= 22 && elapsedHours < 23) {
        console.log("Initiating step 2 actions.");
        // Custom step 2 logic here
    } else if (elapsedHours >= 23) {
        console.log("Initiating step 3 actions.");
        // Custom step 3 logic here
    }
}, 60000);
</script>
