Greasy Fork is available in English.

starlavinia-Autoclaim

Autoclaim faucet, login manual

// ==UserScript==
// @name         starlavinia-Autoclaim
// @namespace    http://tampermonkey.net/
// @version      1.0.1
// @description  Autoclaim faucet, login manual
// @author       iewilmaestro
// @license      Copyright iewilmaestro
// @match        *://starlavinia.name.tr/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=name.tr
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    const faucetLinks = [
        'https://starlavinia.name.tr/faucet/currency/doge',
        'https://starlavinia.name.tr/faucet/currency/btc',
        'https://starlavinia.name.tr/faucet/currency/ltc',
        'https://starlavinia.name.tr/faucet/currency/sol',
        'https://starlavinia.name.tr/faucet/currency/trx',
        'https://starlavinia.name.tr/faucet/currency/usdt',
        'https://starlavinia.name.tr/faucet/currency/eth',
        'https://starlavinia.name.tr/faucet/currency/bnb',
        'https://starlavinia.name.tr/faucet/currency/bch',
        'https://starlavinia.name.tr/faucet/currency/dash',
        'https://starlavinia.name.tr/faucet/currency/dgb',
        'https://starlavinia.name.tr/faucet/currency/fey',
        'https://starlavinia.name.tr/faucet/currency/matic',
        'https://starlavinia.name.tr/faucet/currency/xrp',
        'https://starlavinia.name.tr/faucet/currency/zec',
        'https://starlavinia.name.tr/faucet/currency/ada',
        'https://starlavinia.name.tr/faucet/currency/xlm'
    ];

    function clickkButton() {
        const clickkButton = document.querySelector("#subutt");
        if (clickkButton && clickkButton.innerText.includes("Claim Now")) {
            clickkButton.click();
        }
    }

    let currentIndex = localStorage.getItem('currentIndex') ? parseInt(localStorage.getItem('currentIndex')) : 0;

    const logoutButton = document.querySelector('button[data-toggle="modal"][data-target="#logoutModal"]');
    if (window.location.href === 'https://starlavinia.name.tr/' && logoutButton) {
        window.location.href = faucetLinks[currentIndex];
    }

    function navigateToNextLink() {

        const goClaim = document.querySelector("body > main > div > div > div:nth-child(1) > div > div.media > div > h4 > a");
        const Daily = document.body.outerText.includes('Daily claim limit');
        const Bankrut = document.body.outerText.includes("The faucet does not have");
        const Metod = document.body.outerText.includes("405 Method Not Allowed");

        if (Daily || Bankrut) {
            console.log('Batas klaim harian tercapai, menghapus URL faucet ini dari array dan melanjutkan ke URL berikutnya');

            // Pindah ke URL faucet berikutnya jika ada
            if (faucetLinks.length > 0) {
                currentIndex = (currentIndex + 1) % faucetLinks.length;  // Naikkan currentIndex
                localStorage.setItem('currentIndex', currentIndex);  // Simpan currentIndex ke localStorage

                window.location.href = faucetLinks[currentIndex];
            }
            return; // Jangan lanjutkan lebih jauh jika faucet ini sudah diblokir
        }
        if(goClaim || Metod){
            window.location.href = faucetLinks[currentIndex];
        }
        const turnstile = document.querySelector('input[name="cf-turnstile-response"]')?.value;
        if (!turnstile || turnstile.length === "") {
            console.log('Captcha belum diselesaikan. Tunggu...');
            return; // Tunggu tanpa reload halaman
        }

        clickkButton();
    }
    setInterval(navigateToNextLink, 10000);
})();