Automatic Tree

Automatic Tree Claiming

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name         Automatic Tree
// @namespace    Terminator.Scripts
// @version      0.9
// @description  Automatic Tree Claiming
// @author       TERMINATOR
// @license      MIT
// @match        https://knolix.com/*
// @match        https://ads.knolix.com/int/*
// @match        https://scripts.cs2resellers.com/ads/?automatictree
// @grant        none
// ==/UserScript==

(function () {
    'use strict';

    var email = ''; // PASTE YOUR EMAIL
    var password = ''; // PASTE YOUR PASSWORD
    var completed = false; // CHANGE TO true

    if (completed !== true) return alert("Please fill in the details in the script!")

    function addProgressBar() {
        var progressBar = document.createElement('div');
        progressBar.id = 'progress-bar';
        progressBar.style.height = '5px';
        progressBar.style.width = '0';
        progressBar.style.backgroundColor = 'blue';
        progressBar.style.position = 'fixed';
        progressBar.style.top = '0';
        progressBar.style.left = '0';
        progressBar.style.zIndex = '9999';
        document.body.appendChild(progressBar);
    }
    function startCountdown() {
        var progressBar = document.getElementById('progress-bar');
        var countdownElement = document.createElement('div');
        countdownElement.id = 'countdown';
        countdownElement.style.position = 'fixed';
        countdownElement.style.top = '5px';
        countdownElement.style.left = '50%';
        countdownElement.style.transform = 'translateX(-50%)';
        countdownElement.style.color = 'white';
        countdownElement.style.fontSize = '12px';
        countdownElement.style.zIndex = '9999';
        document.body.appendChild(countdownElement);
        var redirectTimeout = 60000 * 10;
        var startTime = new Date().getTime();
        function updateProgressBar() {
            var currentTime = new Date().getTime();
            var elapsedTime = currentTime - startTime;
            var remainingTime = redirectTimeout - elapsedTime;
            var progress = (elapsedTime / redirectTimeout) * 100;
            if (remainingTime <= 0) {
                progressBar.style.width = '100%';
                window.location.href = 'https://knolix.com/';
            } else {
                progressBar.style.width = progress + '%';
                countdownElement.textContent = Math.ceil(remainingTime / 1000);
            }
        }
        setInterval(updateProgressBar, 1000);
    }

    function clickBtctree() {
        var btctreeElement = document.getElementById('bitcoin15');
        if (btctreeElement) {
            btctreeElement.click();
        } else {
            window.location.href = 'https://knolix.com/login';
        }
    }

    function clickSkipButton() {
        var skipButtonElement = document.querySelector('a#skip_bu2tton');
        if (skipButtonElement) {
            skipButtonElement.addEventListener('click', function() {
                window.close();
            });
            skipButtonElement.click().then(() => { window.close() });
        }
    }
    window.addEventListener('load', function() {
        if (window.location.href.startsWith("https://knolix.com/ref") || window.location.href.startsWith("https://knolix.com/convert")) {
            return;
        } else if (window.location.href.startsWith('https://scripts.cs2resellers.com/ads/?automatictree')) {
            addProgressBar();
            startCountdown();
        } else if (window.location.href.startsWith('https://knolix.com/login')) {
            document.getElementsByName('user')[0].value = email;
            document.getElementsByName('pass')[0].value = password;
            setTimeout(() => {
                document.getElementsByName('submit_login')[0].click();
            }, 5000 * 2);
        } else if (window.location.href.startsWith('https://knolix.com/harvest.php?reward_token=')) {
            window.location.href = 'https://scripts.cs2resellers.com/ads/?automatictree';
        } else if (window.location.href.startsWith('https://ads.knolix.com/int/')) {
            setInterval(() => {
                clickSkipButton();
            }, 5000);
        } else if (window.location.href.startsWith('https://knolix.com/')) {
            //clickBtctree();
            setInterval(() => {
                clickBtctree();
            }, 5000);
        }
    });
})();