Bypass DevTools Detection, Unlock Functionality, and Auto Check-in

Bỏ qua phát hiện DevTools, mở khóa các chức năng và tự động điểm danh trên https://loulxgame.com/

Versione datata 11/10/2024. Vedi la nuova versione l'ultima versione.

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name         Bypass DevTools Detection, Unlock Functionality, and Auto Check-in
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Bỏ qua phát hiện DevTools, mở khóa các chức năng và tự động điểm danh trên https://loulxgame.com/
// @author       hieuck
// @match        https://loulxgame.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Mở khóa chuột phải
    document.addEventListener('contextmenu', function(event) {
        event.stopPropagation(); // Ngăn chặn hành động mặc định
    }, true);

    // Mở khóa phím tắt
    document.addEventListener('keydown', function(event) {
        const allowedKeys = [123, 73, 74, 67, 85, 83, 80, 65, 67, 86]; // F12, Ctrl+Shift+I, Ctrl+Shift+J, ...
        if (allowedKeys.includes(event.keyCode)) {
            event.stopPropagation(); // Ngăn chặn hành động mặc định
        }
    }, true);

    // Ghi đè hàm debugger
    window.debugger = function() {
        // Không làm gì khi gọi debugger
    };

    // Ngăn chặn phát hiện DevTools
    (function() {
        let callbacks = [];
        let timeLimit = 50;
        let open = false;

        function loop() {
            const startTime = new Date();
            // Ghi đè hàm debugger
            if (window._debugger === undefined) {
                window._debugger = function() {};
            }

            window._debugger(); // Gọi hàm giả mạo

            if (new Date() - startTime > timeLimit) {
                if (!open) {
                    callbacks.forEach(function(fn) {
                        fn.call(null);
                    });
                }
                open = true;
                console.log('Phát hiện DevTools, nhưng đã được xử lý.');
                // Ngăn chặn việc xóa nội dung
                // document.body.innerHTML = ""; // Không xóa nội dung trang
                // window.stop(); // Không dừng trang
            } else {
                open = false;
            }
        }

        setInterval(loop, 100); // Kiểm tra mỗi 100ms

        // Phương thức thêm listener
        window.addListener = function(fn) {
            callbacks.push(fn);
        };

        // Phương thức xóa listener
        window.cancelListener = function(fn) {
            callbacks = callbacks.filter(function(v) {
                return v !== fn;
            });
        };

    })();

    // Hàm tự động điểm danh
    function autoCheckIn() {
        const checkInButton = document.querySelector('.checkin-details-link');

        // Nếu nút có chứa "Đã điểm danh"
        if (checkInButton && checkInButton.innerHTML.includes("Đã điểm danh")) {
            console.log('Đã điểm danh hôm nay. Dừng lại.');
            return; // Dừng lại nếu đã điểm danh
        }

        // Tìm nút điểm danh
        if (checkInButton) {
            // Tạo sự kiện click cho nút điểm danh
            checkInButton.click();
            console.log('Đã điểm danh tự động!');
        } else {
            console.log('Nút điểm danh không tìm thấy.');
        }
    }

    // Chờ trang tải xong trước khi điểm danh
    window.addEventListener('load', function() {
        if (window.location.href === 'https://loulxgame.com/') {
            setTimeout(autoCheckIn, 1000); // Tự động điểm danh sau 1 giây
        }
    });
})();