Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // --- BOT By Antonio (Versão com STOP) ---
- // Remove versão anterior para atualizar
- $('#bot-verificador').remove();
- var forceStop = false;
- // Style
- var htmlBot = `
- <div id="bot-verificador" style="position: fixed; top: 10px; right: 10px; width: 320px; background: rgba(15, 15, 15, 0.98); backdrop-filter: blur(10px); color: white; border: 1px solid #00c3ff; padding: 15px; z-index: 99999; font-family: 'Segoe UI', sans-serif; border-radius: 12px; box-shadow: 0 0 25px rgba(0, 195, 255, 0.15);">
- <div style="text-align: center; margin-bottom: 15px; border-bottom: 1px solid #333; padding-bottom: 10px;">
- <h3 style="margin: 0; color: #fff; font-size: 18px; text-transform: uppercase; letter-spacing: 1px;">🕵️ Habblet Checker</h3>
- <div style="font-size: 10px; font-weight: bold; margin-top: 5px; letter-spacing: 2px; background: linear-gradient(90deg, #00c3ff, #ff00de); -webkit-background-clip: text; -webkit-text-fill-color: transparent;">
- BY ANTONIO (BR)
- </div>
- </div>
- <label style="font-size: 11px; color: #888; display: block; margin-bottom: 5px;">Lista de Nicks:</label>
- <textarea id="listaNicks" style="width: 100%; height: 100px; background: #080808; color: #00ff9d; border: 1px solid #333; padding: 8px; box-sizing: border-box; border-radius: 6px; font-family: monospace; resize: vertical; outline: none; font-size: 11px;"></textarea>
- <div style="display: flex; gap: 10px; margin-top: 10px; align-items: center;">
- <div style="flex: 1;">
- <label style="font-size: 11px; color: #888;">Delay (s):</label>
- <input id="inputDelay" type="number" value="5" min="1" step="0.5" style="width: 100%; background: #080808; color: white; border: 1px solid #333; padding: 8px; border-radius: 6px; box-sizing: border-box; text-align: center; font-weight: bold;">
- </div>
- <div style="flex: 2; position: relative;">
- <button id="btnVerificar" style="width: 100%; height: 100%; margin-top: 13px; padding: 8px; background: linear-gradient(45deg, #006eff, #00c3ff); color: white; font-weight: bold; border: none; cursor: pointer; border-radius: 6px; text-transform: uppercase; font-size: 12px; box-shadow: 0 4px 15px rgba(0, 195, 255, 0.3);">
- ▶ Iniciar
- </button>
- <button id="btnParar" style="display: none; width: 100%; height: 100%; margin-top: 13px; padding: 8px; background: linear-gradient(45deg, #ff0000, #ff4d4d); color: white; font-weight: bold; border: none; cursor: pointer; border-radius: 6px; text-transform: uppercase; font-size: 12px; box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);">
- ⏹ Parar Busca
- </button>
- </div>
- </div>
- <div id="resultadoBot" style="margin-top: 15px; height: 180px; overflow-y: auto; font-size: 11px; background: #050505; border: 1px solid #333; border-radius: 6px; padding: 10px; font-family: monospace; scrollbar-width: thin;">
- <div style="color: #444; text-align: center; margin-top: 70px;">Pronto para iniciar...</div>
- </div>
- <button onclick="$('#bot-verificador').remove()" style="position: absolute; top: 5px; right: 10px; background: none; border: none; color: #555; cursor: pointer; font-size: 16px;">×</button>
- </div>
- `;
- // Injeta o HTML
- $('body').append(htmlBot);
- // config Botão PARAR ---
- $('#btnParar').click(function() {
- forceStop = true;
- $(this).text("Parando..."); // Feedback visual rápido
- });
- // config botão INICIAR
- $('#btnVerificar').click(async function() {
- var nicks = $('#listaNicks').val().split('\n');
- var resultadoDiv = $('#resultadoBot');
- var btnStart = $(this);
- var btnStop = $('#btnParar');
- // Configurações Iniciais
- forceStop = false;
- var delayInput = parseFloat($('#inputDelay').val()) || 5; // Padrão 5s
- var delayMs = delayInput * 1000;
- // Troca os botões (se iniciado ou parado etc)
- btnStart.hide();
- btnStop.show().text("⏹ Parar Busca");
- resultadoDiv.html('<div style="color: #00c3ff; border-bottom: 1px dashed #333; padding-bottom: 5px; margin-bottom: 10px;">🚀 INICIANDO CHECKER...<br>Delay: '+ delayInput +'s</div>');
- for (var i = 0; i < nicks.length; i++) {
- // CHECK DE PARADA
- if (forceStop) {
- resultadoDiv.prepend('<div style="color: #ff5555; background: rgba(255,0,0,0.1); padding: 5px; text-align: center; border-radius: 4px; margin-bottom: 10px; border: 1px solid #ff5555;">⛔ PARADO PELO USUÁRIO</div>');
- break; // Quebra o loop
- }
- var nick = nicks[i].trim();
- if (nick.length > 0) {
- try {
- resultadoDiv.scrollTop(0); // Auto-scroll
- await new Promise((resolve) => {
- $.post("/api/player", {username: nick})
- .done(function(data) {
- if (data === "0") {
- // Nick Livre
- resultadoDiv.prepend(`<div style="color: #00ff00; margin-bottom: 4px; border-left: 3px solid #00ff00; padding-left: 8px; background: rgba(0,255,0,0.05); padding-top:2px; padding-bottom:2px;">✔ <b>${nick}</b> [LIVRE]</div>`);
- } else {
- // Nick Usado
- resultadoDiv.prepend(`<div style="color: #ff3333; margin-bottom: 4px; border-left: 3px solid #ff3333; padding-left: 8px; opacity: 0.7;">✖ ${nick} [EM USO]</div>`);
- }
- resolve();
- })
- .fail(function() {
- resultadoDiv.prepend(`<div style="color: yellow; margin-bottom: 4px;">⚠ Falha ao checar: ${nick}</div>`);
- resolve();
- });
- });
- } catch (e) {
- console.log(e);
- }
- // Pausa entre requisições (se não for o último e não tiver parado)
- if (i < nicks.length - 1 && !forceStop) {
- await new Promise(r => setTimeout(r, delayMs));
- }
- }
- }
- if (!forceStop) {
- resultadoDiv.prepend('<div style="color: #fff; background: #00c3ff; padding: 5px; text-align: center; border-radius: 4px; margin-bottom: 10px;">🏁 CONCLUÍDO!</div>');
- }
- // Reseta os botões ao final (ou após parar)
- btnStop.hide();
- btnStart.show();
- });
Advertisement
Add Comment
Please, Sign In to add comment