Merge++

Best and only free Farm Merge Valley script

ของเมื่อวันที่ 04-12-2024 ดู เวอร์ชันล่าสุด

// ==UserScript==
// @name         Merge++
// @namespace    http://tampermonkey.net/
// @version      2
// @description  Best and only free Farm Merge Valley script
// @author       vk.com/downcasted
// @match        *://*.discordsays.com/*
// @match        https://farm-merge-valley.game-files.crazygames.com/farm-merge-valley/*
// @icon         https://files.catbox.moe/d5dxaj.png
// @discord      https://discord.gg/sKMbMfQU6w
// @license      GPL
// @grant        none
// ==/UserScript==

XMLHttpRequest.prototype.realSend = XMLHttpRequest.prototype.send
XMLHttpRequest.prototype.send = function(data) {
    this.addEventListener('readystatechange', function() {
        const url = this.responseURL
        if(this.responseURL.includes("marketplace_items_config")) { // Free shop
            Object.defineProperty(this, "responseText", {writable: true})
            const shop = JSON.parse(this.response)
            for (const item in shop['items']) {
                let itemrec = shop["items"][item]
                if (itemrec["payment"]["type"] == "iap") {
                    itemrec["payment"] = {"type": "inventory", "key": "gems", "amount": 0}
                } else {
                    itemrec["payment"]["amount"] = 0
                };
            }
            this.responseText = JSON.stringify(shop)
        };
    });
    this.realSend(data)
};