Cool Texture Pack for Everyone

Texture Pack for Anyone & Everyone (note that I haven't finished all the weapons, new textures soon!) Finished: Gold Katana, Diamond Katana, Gold Axe, Diamond Axe, Gold Polearm, Diamond Polearm, Gold Repeater Bow, Diamond Repeater Bow, Gold Hammer, Diamond Hammer, Gold Shield, Diamond Sheild, Gold Musket, Diamond Musket, Bull, Bully, Wolf, Moofie.

Vous devrez installer une extension telle que Tampermonkey, Greasemonkey ou Violentmonkey pour installer ce script.

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

Vous devrez installer une extension telle que Tampermonkey ou Violentmonkey pour installer ce script.

Vous devrez installer une extension telle que Tampermonkey ou Userscripts pour installer ce script.

Vous devrez installer une extension telle que Tampermonkey pour installer ce script.

Vous devrez installer une extension de gestionnaire de script utilisateur pour installer ce script.

(J'ai déjà un gestionnaire de scripts utilisateur, laissez-moi l'installer !)

Vous devrez installer une extension telle que Stylus pour installer ce style.

Vous devrez installer une extension telle que Stylus pour installer ce style.

Vous devrez installer une extension telle que Stylus pour installer ce style.

Vous devrez installer une extension du gestionnaire de style pour utilisateur pour installer ce style.

Vous devrez installer une extension du gestionnaire de style pour utilisateur pour installer ce style.

Vous devrez installer une extension du gestionnaire de style pour utilisateur pour installer ce style.

(J'ai déjà un gestionnaire de style utilisateur, laissez-moi l'installer!)

// ==UserScript==
// @name         Cool Texture Pack for Everyone
// @version      1.5.0
// @description  Texture Pack for Anyone & Everyone (note that I haven't finished all the weapons, new textures soon!) Finished: Gold Katana, Diamond Katana, Gold Axe, Diamond Axe, Gold Polearm, Diamond Polearm, Gold Repeater Bow, Diamond Repeater Bow, Gold Hammer, Diamond Hammer, Gold Shield, Diamond Sheild, Gold Musket, Diamond Musket, Bull, Bully, Wolf, Moofie.
// @author       BeautifulButterflyYT
// @match        *://*.moomoo.io/*
// @match        http://154.5.218.72:8080/
// @match        *://moomoo.io/*
// @run-at       document-start
// @grant        none
// @icon         https://imgur.com/a/S87vyFl.png
// @license      MIT
// @youtube      https://www.youtube.com/@Beautifulbutterfly7777
// @namespace https://greasyfork.org/en/users/1599386
// ==/UserScript==

(function() {
    const textureReplacements = [
        // Animals
        {
            test: "bull_1.png",
            replaceWith: "https://imgur.com/wbeD8xF.png"
        },
        {
            test: "bull_2.png",
            replaceWith: "https://imgur.com/E83nlBP.png"
        
        },
        {
            test: "wolf_2.png",
            replaceWith: "https://imgur.com/ILM5Ibp.png"
        },
        {
            test: "wolf_1.png",
            replaceWith: "https://imgur.com/ph9VBcX.png"
        },
        
        // Weapons - Diamond
        {
            test: "crossbow_1_d.png",
            replaceWith: "https://i.imgur.com/gOHonNq.png"
        },
        {
            test: "crossbow_2_d.png",
            replaceWith: "https://imgur.com/QQflyXS.png"
        },
        {
            test: "axe_1_d.png",
            replaceWith: "https://imgur.com/0ndYboI.png"
        },
        {
            test: "great_axe_1_d.png",
            replaceWith: "https://imgur.com/0ndYboI.png"
        },
        {
            test: "hammer_1_d.png",
            replaceWith: "https://imgur.com/eiEtpcS.png"
        },
        {
            test: "great_hammer_1_d.png",
            replaceWith: "https://imgur.com/eiEtpcS.png"
        },
        {
            test: "samurai_1_d.png",
            replaceWith: "https://imgur.com/W0KSAyz.png"
        },
        {
            test: "shield_1_d.png",
            replaceWith: "https://imgur.com/rbKyEPL.png"
        },
        {
            test: "sword_1_d.png",
            replaceWith: "https://i.imgur.com/2gSfcOC.png"
        },
        {
            test: "musket_1_d.png",
            replaceWith: "https://imgur.com/bBjgbKl.png"
        },
        {
            test: "bow_1_d.png",
            replaceWith: "https://i.imgur.com/8i54CQf.png"
        },
        {
            test: "spear_1_d.png",
            replaceWith: "https://imgur.com/ORonGfM.png"
        },

        // Weapons - Gold
        {
            test: "sword_1_g.png",
            replaceWith: "https://i.imgur.com/0sH8PFi.png"
        },
        {
            test: "samurai_1_g.png",
            replaceWith: "https://imgur.com/4ApDuM8.png"
        },
        {
            test: "spear_1_g.png",
            replaceWith: "https://imgur.com/nicT19J.png"
        },
        {
            test: "axe_1_g.png",
            replaceWith: "https://imgur.com/acPXwlR.png"
        },
        {
            test: "great_axe_1_g.png",
            replaceWith: "https://imgur.com/acPXwlR.png"
        },
        {
            test: "bow_1_g.png",
            replaceWith: "https://i.imgur.com/tcHZWGO.png"
        },
        {
            test: "crossbow_1_g.png",
            replaceWith: "https://i.imgur.com/IBz7L2u.png"
        },
        {
            test: "crossbow_2_g.png",
            replaceWith: "https://imgur.com/MJ9iXTc"
        },
        {
            test: "hammer_1_g.png",
            replaceWith: "https://imgur.com/WKpMFsT.png"
        },
        {
            test: "great_hammer_1_g.png",
            replaceWith: "https://imgur.com/WKpMFsT.png"
        },
        {
            test: "musket_1_g.png",
            replaceWith: "https://imgur.com/bHePwzQ.png"
        },
        {
            test: "shield_1_g.png",
            replaceWith: "https://imgur.com/gSS2JlU.png"
        },

        // Hats
        {
            test: "hat_40.png",
            replaceWith: "https://imgur.com/nzWyyfH.png"
        },
        {
            test: "hat_12.png",
            replaceWith: "https://i.imgur.com/qFghS5s.png"
        },
        {
            test: "hat_6.png",
            replaceWith: "https://i.imgur.com/kD6iYN8.png"
        },
        {
            test: "hat_18.png",
            replaceWith: "https://i.imgur.com/in5H6vw.png"
        },
        {
            test: "hat_9.png",
            replaceWith: "https://i.imgur.com/1nY34aL.png"
        },
        {
            test: "hat_23.png",
            replaceWith: "https://i.imgur.com/B9AcmcN.png"
        },
        {
            test: "hat_7.png",
            replaceWith: "https://i.imgur.com/xJ3SBcn.png"
        },
        {
            test: "hat_16.png",
            replaceWith: "https://i.imgur.com/mtmsnrm.png"
        },
        {
            test: "hat_31.png",
            replaceWith: "https://i.imgur.com/JPMqgSc.png"
        },
        {
            test: "hat_15.png",
            replaceWith: "https://i.imgur.com/dQxRwAX.png"
        },
        {
            test: "hat_8.png",
            replaceWith: "https://i.imgur.com/kf8yAC2.png"
        },
        {
            test: "hat_13.png",
            replaceWith: "https://i.imgur.com/EwkbsHN.png"
        },
        {
            test: "hat_11.png",
            replaceWith: "https://i.imgur.com/Gu3ZJlY.png"
        },
        {
            test: "hat_20.png",
            replaceWith: "https://i.imgur.com/vcy6Xxo.png"
        },
        {
            test: "hat_11_p.png",
            replaceWith: "https://i.imgur.com/NCkyBlK.png"
        },
        {
            test: "hat_14_p.png",
            replaceWith: "https://i.imgur.com/836PpI0.png"
        },
        {
            test: "hat_14.png",
            replaceWith: "https://i.imgur.com/V4l7o1h.png"
        },
        {
            test: "hat_14_top.png",
            replaceWith: "https://i.imgur.com/zWJTlbI.png"
        },

        // Accessories
        {
            test: "access_21.png",
            replaceWith: "https://i.imgur.com/ttQ9WcS.png"
        },
        {
            test: "access_18.png",
            replaceWith: "https://i.imgur.com/0rmN7L9.png"
        },
        {
            test: "access_19.png",
            replaceWith: "https://i.imgur.com/mGYkxY1.png"
        }
    ];

    const orig = Object.getOwnPropertyDescriptor(Image.prototype, "src");
    Object.defineProperty(Image.prototype, "src", {
        set(l) {
            for (const {test, replaceWith} of textureReplacements) {
                if (l.includes(test)) {
                    l = replaceWith;
                    break;
                }
            }
            orig.set.call(this, l);
        },
        get: orig.get,
        configurable: true
    });
})();