CubeRealm Special Block Finder

Highlight special blocks on CubeRealm.io when Ctrl + Y is pressed

// ==UserScript==
// @name         CubeRealm Special Block Finder
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Highlight special blocks on CubeRealm.io when Ctrl + Y is pressed
// @author       Your Name
// @match        https://cuberealm.io/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Define the special block types you want to highlight
    const specialBlocks = ['gold', 'diamond', 'platinum']; // Add more as needed

    // Function to highlight special blocks
    function highlightSpecialBlocks() {
        const blocks = document.querySelectorAll('.block'); // Assuming special blocks have a common class like 'block'

        blocks.forEach(block => {
            const blockType = block.getAttribute('data-type'); // Assuming block type is stored in a data attribute like 'data-type'

            if (specialBlocks.includes(blockType)) {
                block.style.border = '2px solid red'; // Apply a red border to highlight the block
            }
        });
    }

    // Event listener to trigger highlighting when Ctrl + Y is pressed
    document.addEventListener('keydown', function(event) {
        if (event.ctrlKey && event.key === 'y') {
            highlightSpecialBlocks();
        }
    });
})();