<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Discord Webhooks Spammer</title>
    <style>
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            margin: 0;
            padding: 0;
            background-color: #121212;
            color: #e0e0e0;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            background: #121212;
        }
        .container {
            max-width: 100%;
            width: 90%;
            background-color: rgba(40, 40, 40, 0.9);
            padding: 20px;
            border-radius: 20px;
            box-shadow: 0 4px 8px rgba(0, 128, 0, 0.3);
            box-sizing: border-box;
        }
        h1 {
            margin-bottom: 20px;
            color: #7CFC00;
            font-size: 2rem;
            text-align: center;
        }
        label {
            display: block;
            margin-bottom: 5px;
            color: #fff;
            text-align: left;
        }
        input[type="text"], textarea {
            width: 100%;
            padding: 10px;
            margin: 10px 0;
            border: none;
            border-radius: 10px;
            box-sizing: border-box;
            background-color: #2b2b2b;
            color: #fff;
            font-size: 1rem;
        }
        input[type="text"]::placeholder, textarea::placeholder {
            color: #bbb;
        }
        button {
            width: 100%;
            padding: 15px;
            background-color: #32CD32;
            color: white;
            border: none;
            border-radius: 10px;
            cursor: pointer;
            transition: background-color 0.3s, transform 0.3s;
            font-size: 1rem;
            text-transform: uppercase;
        }
        button:hover {
            background-color: #3CB371;
            transform: scale(1.05);
        }
        .log {
            margin-top: 20px;
            max-height: 200px;
            overflow-y: auto;
            background: #333;
            color: #fff;
            padding: 15px;
            border-radius: 10px;
            box-sizing: border-box;
            font-family: monospace;
            font-size: 0.9rem;
            text-align: left;
        }
        .log-entry {
            margin-bottom: 5px;
        }
        .log-entry span {
            font-weight: bold;
        }
        .log-entry.success {
            color: #32CD32;
        }
        .log-entry.failed {
            color: #F44336;
        }
        .icon {
            width: 30px;
            height: 30px;
            margin: 0 10px;
            vertical-align: middle;
        }
        footer {
            display: flex;
            justify-content: center;
            align-items: center;
            margin-top: 20px;
            color: #888;
        }
        footer a {
            color: #7CFC00;
            text-decoration: none;
        }
        footer a:hover {
            text-decoration: underline;
        }
        @media screen and (max-width: 768px) {
            .container {
                width: 95%;
                padding: 15px;
            }
            h1 {
                font-size: 1.5rem;
            }
            button {
                padding: 12px;
                font-size: 0.9rem;
            }
            .log {
                padding: 10px;
                font-size: 0.8rem;
            }
        }
        @media screen and (max-width: 480px) {
            .container {
                width: 100%;
                padding: 10px;
                border-radius: 10px;
            }
            h1 {
                font-size: 1.25rem;
            }
            button {
                padding: 10px;
                font-size: 0.8rem;
            }
            .log {
                padding: 8px;
                font-size: 0.7rem;
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>Discord Webhooks Spammer</h1>
        <form id="webhook-form">
            <label for="webhook-url">Webhook URL:</label>
            <input type="text" id="webhook-url" name="webhook-url" required placeholder="Masukkan URL di sini...">
            <label for="username">Username:</label>
            <input type="text" id="username" name="username" required placeholder="Masukkan Username di sini...">
            <label for="message">Message:</label>
            <textarea id="message" name="message" rows="5" required placeholder="Masukkan Pesan di sini..."></textarea>
            <button type="submit">Send Message</button>
        </form>
        <div class="log" id="log"></div>
        <footer>
            <a href="https://discord.gg/9qndH24C64"><img src="https://img.icons8.com/color/48/000000/discord-logo.png" alt="Discord" class="icon"></a>
            ©SHA Community
        </footer>
    </div>

    <script>
        document.getElementById('webhook-form').addEventListener('submit', function(event) {
            event.preventDefault();
            const webhookUrl = document.getElementById('webhook-url').value;
            const username = document.getElementById('username').value;
            const message = document.getElementById('message').value;
            const log = document.getElementById('log');
            const request = new XMLHttpRequest();
            const params = { username: username, content: message };

            function sendMessages() {
                request.open('POST', webhookUrl, true);
                request.setRequestHeader('Content-Type', 'application/json');
                request.onload = () => logMessage(request.status, request.responseText, message);
                request.onerror = () => logMessage(0, 'Connection error', message);
                request.send(JSON.stringify(params));
                setTimeout(sendMessages, 1000);
            }

            function logMessage(status, statusText, message) {
                const messageElement = document.createElement('div');
                const now = new Date();
                const timeString = now.toLocaleString();
                messageElement.className = `log-entry ${status === 204 ? 'success' : 'failed'}`;
                messageElement.innerHTML = `[${timeString}] ${status === 204 ? `Sent: ${message}` : `Failed: ${statusText || 'Unknown error'}`} `;
                log.appendChild(messageElement);
                log.scrollTop = log.scrollHeight;

                while (log.scrollHeight > log.clientHeight) {
                    log.removeChild(log.firstChild);
                }
            }

            sendMessages();
        });
    </script>
</body>
</html>