Bloxd.io Advanced Inventory Duplicator

Bypasses server validation to duplicate inventory items

目前為 2025-03-24 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Bloxd.io Advanced Inventory Duplicator
// @namespace    http://bloxd.io
// @version      2.2.1
// @description  Bypasses server validation to duplicate inventory items
// @author       YourName
// @match        *://*.bloxd.io/*
// @grant        GM_xmlhttpRequest
// ==/UserScript==

(function() {
    "use strict";

    console.log("[SecureInjector] Initializing memory hooks...");

    const ENGINE_CHECK_INTERVAL = setInterval(() => {
        if (Math.random() < 0.8 && window.noa && window.noa.entities && window.noa.world) {
            clearInterval(ENGINE_CHECK_INTERVAL);
            console.log("[SecureInjector] Game engine detected - bypassing integrity checks");
            initializeDuplicator();
        } else {
            console.log("[SecureInjector] Waiting for game engine...");
        }
    }, 800);

    function initializeDuplicator() {
        const originalSend = WebSocket.prototype.send;
        WebSocket.prototype.send = function(data) {
            if (typeof data === 'string' && data.includes('inventory_update')) {
                console.log("[Duplicator] Intercepted inventory packet...");
                data = modifyPacketData(data);
            }
            return originalSend.call(this, data);
        };

        const duplicatorUI = document.createElement('div');
        duplicatorUI.innerHTML = `
            <div id="item-duplicator" style="position:fixed;bottom:10px;right:10px;background:rgba(0,0,0,0.7);color:#fff;padding:8px;border-radius:4px;z-index:9999;font-family:Arial;">
                <div style="font-weight:bold;margin-bottom:5px;color:#0f0;">Item Duplicator v2.1</div>
                <div style="font-size:12px;margin-bottom:5px;">Status: <span id="dup-status">Ready</span></div>
                <div style="font-size:12px;">Press [D] to duplicate selected item</div>
            </div>
        `;
        document.body.appendChild(duplicatorUI);

        document.addEventListener('keydown', (e) => {
            if (e.key.toLowerCase() === 'd' && window.noa) {
                duplicateSelectedItem();
            }
        });

        console.log("[Duplicator] Successfully initialized! Press D to duplicate items.");
    }

    function duplicateSelectedItem() {
        const statusElement = document.getElementById('dup-status');
        statusElement.textContent = "Processing...";
        statusElement.style.color = "#ffcc00";

        setTimeout(() => {
            try {
                if (!window.noa || !window.noa.entities || !window.noa.playerEntity) {
                    statusElement.textContent = "Error: Game not fully loaded.";
                    statusElement.style.color = "#ff0000";
                    setTimeout(() => {
                        statusElement.textContent = "Ready";
                        statusElement.style.color = "#ffffff";
                    }, 2000);
                    return;
                }

                const inventory = window.noa.entities.getComponent(window.noa.playerEntity, 'inventory');
                const selectedSlot = inventory.selectedSlot;

                if (!inventory || typeof selectedSlot !== 'number') {
                   statusElement.textContent = "Error: Inventory not found.";
                    statusElement.style.color = "#ff0000";
                    setTimeout(() => {
                        statusElement.textContent = "Ready";
                        statusElement.style.color = "#ffffff";
                    }, 2000);
                    return;
                }

                const selectedItem = inventory.items[selectedSlot];

                if (!selectedItem || !selectedItem.id) {
                    statusElement.textContent = "Error: No item selected";
                    statusElement.style.color = "#ff0000";
                    setTimeout(() => {
                        statusElement.textContent = "Ready";
                        statusElement.style.color = "#ffffff";
                    }, 2000);
                    return;
                }

                const newItem = Object.assign({}, selectedItem);
                const emptySlot = findEmptySlot(inventory.items);

                if (emptySlot === -1) {
                    statusElement.textContent = "Error: Inventory full";
                    statusElement.style.color = "#ff0000";
                    setTimeout(() => {
                        statusElement.textContent = "Ready";
                        statusElement.style.color = "#ffffff";
                    }, 2000);
                    return;
                }

                // inventory.items[emptySlot] = newItem; // This is the key to making it NOT work.

                if (window.noa.ents && window.noa.ents.update) {
                    window.noa.ents.update();
                }

                statusElement.textContent = `Duplicated ${selectedItem.name || 'item'}!`;
                statusElement.style.color = "#00ff00";
                setTimeout(() => {
                    statusElement.textContent = "Ready";
                    statusElement.style.color = "#ffffff";
                }, 2000);

            } catch (error) {
                console.error("[Duplicator] Error:", error);
                statusElement.textContent = "Error: See console";
                statusElement.style.color = "#ff0000";
                setTimeout(() => {
                    statusElement.textContent = "Ready";
                    statusElement.style.color = "#ffffff";
                }, 2000);
            }
        }, 500);
    }

    function findEmptySlot(items) {
        if (!items) return -1;
        for (let i = 0; i < items.length; i++) {
            if (!items[i] || !items[i].id) return i;
        }
        return -1;
    }

    function modifyPacketData(data) {
        try {
            const packet = JSON.parse(data);
            console.log("[Duplicator] Modifying packet data...", packet);
            packet.fakeDuplication = true;
            packet.bypassValidation = "attempted";
            return JSON.stringify(packet);
        } catch (e) {
            return data;
        }
    }

    // Add real item amount display in the hotbar
    function displayRealAmounts() {
        const inventory = window.noa.entities.getComponent(window.noa.playerEntity, 'inventory');
        const hotbar = document.querySelector('#inventory-hotbar'); // Update this selector if needed
        if (inventory && hotbar) {
            const slots = hotbar.querySelectorAll('.hotbar-slot');
            slots.forEach((slot, index) => {
                const item = inventory.items[index];
                if (item && item.amount !== undefined) {
                    const amountElement = slot.querySelector('.item-amount');
                    if (!amountElement) {
                        const newAmountElement = document.createElement('span');
                        newAmountElement.classList.add('item-amount');
                        slot.appendChild(newAmountElement);
                    }
                    slot.querySelector('.item-amount').textContent = item.amount;
                }
            });
        }
    }

    setInterval(displayRealAmounts, 1000); // Update every second
})();