/recs

type "/recs" in the chat and it will show your coins without showing your profile! if you're a hacker or something you can hide your profile like this very good! :) BTW please subscribe to my YouTube channel! I worked 20 minutes for this!

Tendrás que instalar una extensión para tu navegador como Tampermonkey, Greasemonkey o Violentmonkey si quieres utilizar este script.

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

Necesitarás instalar una extensión como Tampermonkey o Violentmonkey para instalar este script.

Necesitarás instalar una extensión como Tampermonkey o Userscripts para instalar este script.

Necesitará instalar una extensión como Tampermonkey para instalar este script.

Necesitarás instalar una extensión para administrar scripts de usuario si quieres instalar este script.

(Ya tengo un administrador de scripts de usuario, déjame instalarlo)

Necesitará instalar una extensión como Stylus para instalar este estilo.

Necesitará instalar una extensión como Stylus para instalar este estilo.

Necesitará instalar una extensión como Stylus para instalar este estilo.

Necesitará instalar una extensión del gestor de estilos de usuario para instalar este estilo.

Necesitará instalar una extensión del gestor de estilos de usuario para instalar este estilo.

Necesitará instalar una extensión del gestor de estilos de usuario para instalar este estilo.

(Ya tengo un administrador de estilos de usuario, déjame instalarlo)

// ==UserScript==
// @name         /recs
// @namespace    http://tampermonkey.net/
// @version      2024-10-16
// @description  type "/recs" in the chat and it will show your coins without showing your profile! if you're a hacker or something you can hide your profile like this very good! :) BTW please subscribe to my YouTube channel! I worked 20 minutes for this!
// @author       YouTube.com/@gamerluka1451
// @match        https://cellcraft.io/
// @icon         https://www.google.com/s2/favicons?sz=64&domain=cellcraft.io
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Function to check coins and send them to the chat
function checkAndSendCoins() {
    const coinsElement = document.getElementById('coinsDash'); // Get the coins element
    const coins = coinsElement ? parseInt(coinsElement.innerText) : 0; // Get the coin count from the element

    const chatBox = document.getElementById('chtbox');

    if (chatBox) {
        // Check for the /coins command in the chat
        if (chatBox.value.trim() === '/coins') {
            // Prepare the message with the coin count
            const message = `You have ${coins} coins.`;
            chatBox.value = message; // Set the chat box to the message
            chatBox.dispatchEvent(new Event('input')); // Dispatch input event for chat to recognize it
            chatBox.form.dispatchEvent(new Event('submit')); // Trigger submit event to send the message

            // Clear the chat box after sending
            setTimeout(() => {
                chatBox.value = ''; // Clear chat input
            }, 100); // Delay to ensure the message is sent
        }
    }
}

// Function to check Recombine Pellets and send them to the chat
function checkAndSendRecs() {
    const recsElement = document.getElementById('invRecombine'); // Get the recombine pellets element
    const recs = recsElement ? parseInt(recsElement.querySelector('p').innerText) : 0; // Get the recs count from the element

    const chatBox = document.getElementById('chtbox');

    if (chatBox) {
        // Check for the /recs command in the chat
        if (chatBox.value.trim() === '/recs') {
            // Prepare the message with the recs count
            const message = `You have ${recs} Recombine Pellets.`;
            chatBox.value = message; // Set the chat box to the message
            chatBox.dispatchEvent(new Event('input')); // Dispatch input event for chat to recognize it
            chatBox.form.dispatchEvent(new Event('submit')); // Trigger submit event to send the message

            // Clear the chat box after sending
            setTimeout(() => {
                chatBox.value = ''; // Clear chat input
            }, 100); // Delay to ensure the message is sent
        }
    }
}

// Listen for input in the chat box
const chatBox = document.getElementById('chtbox');
if (chatBox) {
    chatBox.addEventListener('keydown', function(event) {
        if (event.key === 'Enter') {
            checkAndSendCoins(); // Check and send coins when Enter is pressed
            checkAndSendRecs(); // Check and send recs when Enter is pressed
        }
    });
}

})();