Fake Robux 2

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

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

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

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==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 });

})();