Free forever

chat as many times you want it wont tell you to pay

// ==UserScript==
// @name        Free forever
// @namespace   Violentmonkey Scripts
// @match       https://www.genschat.com/*
// @match       https://www.characterwaifu.com/*
// @grant       none
// @version     1.6
// @author      -
// @license MIT
// @description chat as many times you want it wont tell you to pay
// ==/UserScript==

(function() {
    'use strict';

    function Loop_1() {
        if (typeof(Storage) !== "undefined") {
            var aiChatValue = localStorage.getItem("aiChat");
            var cfValue = localStorage.getItem("cf");
            var Isvip = localStorage.getItem("isVip");
            if (Isvip !== null) {
                var Isvip2 = JSON.parse(Isvip);
                Isvip2 = !0;
                var modifiedValue2 = JSON.stringify(Isvip2);
                localStorage.setItem("isVip", modifiedValue2);
            }
            if (aiChatValue !== null) {
                var aiChatObj = JSON.parse(aiChatValue);
                if (aiChatObj.hasOwnProperty("dayConfig")) {
                    aiChatObj.reply = 999999990;
                    aiChatObj.dayConfig.free = 100000;
                    aiChatObj.dayConfig.dayFree = 100000;
                    aiChatObj.dayConfig.reply = 100000;
                    aiChatObj.dayConfig.maxFree = 100000;
                    aiChatObj.dayConfig.lmFree = 100000;
                    var modifiedValue = JSON.stringify(aiChatObj);

                    localStorage.setItem("aiChat", modifiedValue);
                } else {
                    console.log("The 'dayConfig' array does not exist in 'aiChat' value.");
                }
            } else {
            }
            if (cfValue !== null) {
                var cfObj = JSON.parse(cfValue);
                if (cfObj.hasOwnProperty("urdd")) {
                  cfObj.urdd.source = "vip";
                  cfObj.urdd.ip = "1.1.1.1";
                  cfObj.urdd.memberId = "1";
                    var modifiedValue = JSON.stringify(cfObj);

                    localStorage.setItem("cf", modifiedValue);
                } else {
                    console.log("The 'dayConfig' array does not exist in 'aiChat' value.");
                }
            } else {

            }
        } else {
            console.log("Local storage is not supported by the browser.");
        }
        setTimeout(Loop_1, 10);
    }

    function processElements() {
        var elements = document.getElementsByClassName("lock van-icon van-icon-lock");
        for (var i = 0; i < elements.length; i++) {
            var element = elements[i];
            element.parentNode.removeChild(element);
        }
        var blurElements = document.getElementsByClassName("blur");
        for (var j = 0; j < blurElements.length; j++) {
            var blurElement = blurElements[j];
            blurElement.classList.remove("blur");
            blurElement.classList.add("DIS");
        }
        setTimeout(processElements, 20);
    }

    function resetChatReplies() {
        for (var i = 0; i < localStorage.length; i++) {
            var key = localStorage.key(i);
            if (key.startsWith("chat_")) {
                var chatData = JSON.parse(localStorage.getItem(key));
                if (chatData.hasOwnProperty("reply")) {
                    chatData.reply = 0;
                    localStorage.setItem(key, JSON.stringify(chatData));
                }
            }
        }
    }

    function modifyIndexedDB() {
        const request = indexedDB.open("localforage");

        request.onerror = function(event) {
            console.error("Error opening IndexedDB:", event);
        };

        request.onsuccess = function(event) {
            const db = event.target.result;
            const transaction = db.transaction(["keyvaluepairs"], "readwrite");
            const objectStore = transaction.objectStore("keyvaluepairs");

            objectStore.openCursor().onsuccess = function(event) {
                const cursor = event.target.result;
                if (cursor) {
                    const key = cursor.primaryKey;
                    let value = cursor.value;

                    try {
                        let jsonValue = JSON.parse(value);

                        if (jsonValue.tip && jsonValue.tip.c !== undefined) {
                            jsonValue.tip.c = 0;
                        }

                        if (jsonValue.tipCount !== undefined) {
                            jsonValue.tipCount = 0;
                        }

                        if (jsonValue.reply !== undefined) {
                            jsonValue.reply = 0;
                        }

                        function replacePayMode(obj) {
                            for (let key in obj) {
                                if (obj.hasOwnProperty(key)) {
                                    if (typeof obj[key] === "object" && obj[key] !== null) {
                                        replacePayMode(obj[key]);
                                    } else if (key === "payMode") {
                                        obj[key] = "vip";
                                    }
                                }
                            }
                        }

                        replacePayMode(jsonValue);

                        const updatedValue = JSON.stringify(jsonValue);
                        const updateRequest = objectStore.put(updatedValue, key);


                        updateRequest.onerror = function() {
                            console.error("Error updating:", key);
                        };
                    } catch (e) {
                        console.error("Error parsing JSON for key:", key, e);
                    }

                    cursor.continue();
                } else {
                }
            };
        };
    }
    modifyIndexedDB();
    setInterval(modifyIndexedDB, 2000);
    processElements();
    Loop_1()
    setInterval(resetChatReplies, 100);
})();