V2p and Abdx Autoclaim for Bananafaucet

this script automaticaly click and claim continuesly v2p and adbx in bananafaucet

À partir de 2024-05-06. Voir la dernière version.

// ==UserScript==
// @name        V2p and Abdx Autoclaim for Bananafaucet 
// @namespace   auto.claim.faucet
// @description this script automaticaly click and claim continuesly v2p and adbx in bananafaucet
// @author      ono ngono
// @version     1.7.6
// @grant       unsafeWindow
// @grant       close.Window
// @grant       GM_getValue
// @grant       GM_setValue
// @grant       GM_addStyle
// @grant       GM_xmlhttpRequest
// @grant       window.onurlchange
// @grant       GM_registerMenuCommand
// @require     https://update.greasyfork.org/scripts/439099/1203718/MonkeyConfig%20Modern%20Reloaded.js
// @match       https://banfaucet.com/dashboard
// @match       https://banfaucet.com/links
// @match       https://news.blog24.me/*
// @match       https://blog24.me/*
// @match       https://go.blog24.me/*
// @license     MIT
// ==/UserScript==
 
const cfg = new MonkeyConfig({
    title: 'V2p Autoclick Settings:',
    menuCommand: true,
    params: {
        Announcements: {
            type: 'text',
            default: 'Pilih Satu Shortlink Kemudian Masukkan Angka Yang Sesuai',
            long: 3
        },
        Number: {
            label: "Masukkan Nomer",
            type: "text",
            default: ""
        },
        V2p: {
            label: "V2p",
            type: "checkbox",
            default: false // Do not use string for boolean value
        },
        Adbx: {
            label: "Adbx",
            type: "checkbox",
            default: false // Do not use string for boolean value
        },
        
    }
});
 
(function() {
    'use strict';
    
    // Retrieve the current values of the settings
    const newV2pValue = cfg.get('V2p'); // Use MonkeyConfig to retrieve value
    const newAdbxValue = cfg.get('Adbx'); // Use MonkeyConfig to retrieve value
    const newNumberValue = cfg.get('Number'); // Use MonkeyConfig to retrieve value
 
    // Set the auto-click logic based on the settings
    if (newV2pValue) {
        const claimButton = document.querySelector('a.btn-one[href="https://banfaucet.com/links/go/34"]');
        if (claimButton) {
            claimButton.click();
        }
    }
    if (newAdbxValue) {
        const claimButton = document.querySelector('a.btn-one[href="https://banfaucet.com/links/go/45"]');
        if (claimButton) {
            claimButton.click();
        }
    }


// Function to input value and click "NEXT STEP" with a redirect delay 
if (newV2pBananaValue || newAdbxValue ) {
    function inputAndClickNextStepAdbx() {
        var inputElements = document.querySelectorAll('input[name^="antibot_number_"]');
        var allValues = [];

        inputElements.forEach(function(inputElement) {
            inputElement.value = newNumberValue; // Assign the variable directly
            allValues.push(inputElement.value);
            inputElement.dispatchEvent(new Event('change'));
        });

        // Check if there are two antibot inputs with the same value
        if (allValues.length === 2 && allValues[0] === allValues[1]) {
            var nextButton = document.querySelector('button.custom-button[type="submit"]');
            if (nextButton) {
                nextButton.click();
            }
        }
    }

    inputAndClickNextStepAdbx(); // Call the function immediately after defining it
}

 
    // Wait for the page to fully load
    window.onload = function() {
        // Delay the click event by 30 seconds
        setTimeout(function() {
            // Find the input element by its attributes
            var inputElement = document.querySelector('input[type="submit"][value="NEXT STEP"]');
 
            // Check if the input element is found
            if (inputElement) {
                // Simulate a click on the input element
                inputElement.click();
            }
        }, 30000); // 30 seconds in milliseconds
    };
 
    // Delay for 45 seconds before closing the window for V2p value
    if (newV2pValue) {
        window.setTimeout(function() {
            window.close();
        }, 45000);
    }
    
    // Delay for 9 seconds before closing the window for Adbx value
    if (newAdbxValue) {
        window.setTimeout(function() {
            window.close();
        }, 9000);
    }
})();