Fake Robux 2

Changes the navbar Robux amount and balance label to a desired amount

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.

Tendrás que 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.

Tendrás que instalar una extensión como Tampermonkey antes de poder 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)

Tendrás que instalar una extensión como Stylus antes de poder instalar este script.

Tendrás que instalar una extensión como Stylus antes de poder instalar este script.

Tendrás que instalar una extensión como Stylus antes de poder instalar este script.

Para poder instalar esto tendrás que instalar primero una extensión de estilos de usuario.

Para poder instalar esto tendrás que instalar primero una extensión de estilos de usuario.

Para poder instalar esto tendrás que instalar primero una extensión de estilos de usuario.

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

// ==UserScript==
// @name         Fake Robux 2
// @namespace    http://tampermonkey.net/
// @version      2024-08-12
// @description  Changes the navbar Robux amount and balance label to a desired amount
// @author       Devappl & Dolin
// @match        *://www.roblox.com/*
// @match        *://roblox.com/*
// @match        https://www.roblox.com/transactions#!/Summary
// @icon         https://upload.wikimedia.org/wikipedia/commons/thumb/c/c7/Robux_2019_Logo_gold.svg/1883px-Robux_2019_Logo_gold.svg.png
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    const fakeRobux = "17M+"; // Desired fake Robux amount
    const preciseRobux = "17,986,342"; // Precise fake Robux amount

    let balanceUpdated = false; // Flag to ensure the balance is only updated once

    // Function to update the Robux amount in the navbar
    function updateRobuxDisplay() {
        const robuxAmount = document.querySelector('#nav-robux-amount');
        const robuxBalance = document.querySelector('#nav-robux-balance');
        if (robuxAmount) robuxAmount.textContent = fakeRobux; // Update navbar robux amount
        if (robuxBalance) robuxBalance.textContent = `${preciseRobux} Robux`; // Update precise robux balance
    }

    // Function to update the balance label on the page
    function updateBalanceLabel() {
        const balanceLabel = document.querySelector('.balance-label.icon-robux-container');
        if (balanceLabel) {
            const spanElement = balanceLabel.querySelector('span');
            if (spanElement && !balanceUpdated) {
                spanElement.innerHTML = `My Balance: <span class="icon-robux-16x16"></span>${preciseRobux}`;
                balanceUpdated = true; // Set the flag to true after updating the balance
            }
        }
    }

    // Function to update the Robux balance on the transactions page
    function updateTransactionPageBalance() {
        const balanceLabel = document.querySelector('.balance-label.icon-robux-container');
        if (balanceLabel) {
            const spanElement = balanceLabel.querySelector('span');
            if (spanElement && !balanceUpdated) {
                spanElement.innerHTML = `My Balance: <span class="icon-robux-16x16"></span>${preciseRobux}`;
                balanceUpdated = true; // Set the flag to true after updating the balance
            }
        }
    }

    // Function to keep both the navbar robux amount and balance label updated
    function keepRobuxUpdated() {
        const robuxAmount = document.querySelector('#nav-robux-amount');
        const balanceLabel = document.querySelector('.balance-label.icon-robux-container');

        // Update nav-robux-amount if it's not already the desired value
        if (robuxAmount && robuxAmount.textContent !== fakeRobux) {
            robuxAmount.textContent = fakeRobux;
        }

        // Update balance-label if it's not already the preciseRobux value
        if (balanceLabel) {
            const spanElement = balanceLabel.querySelector('span');
            if (spanElement && spanElement.innerHTML !== `My Balance: <span class="icon-robux-16x16"></span>${preciseRobux}`) {
                spanElement.innerHTML = `My Balance: <span class="icon-robux-16x16"></span>${preciseRobux}`;
            }
        }
    }

    // Update both fields once when the page loads
    updateRobuxDisplay();
    updateBalanceLabel();

    // If we are on the transactions page, update the balance
    if (window.location.href.includes("/transactions#!/Summary")) {
        updateTransactionPageBalance();
    }

    // Use MutationObserver to keep values fixed and updated
    const observer = new MutationObserver(() => {
        keepRobuxUpdated(); // Keep both the navbar and balance label updated

        // If we are on the transactions page, update the balance
        if (window.location.href.includes("/transactions#!/Summary")) {
            updateTransactionPageBalance();
        }
    });

    observer.observe(document.body, { childList: true, subtree: true });

})();