Roblox Robux Visual Changer

Visually change Robux amount

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Roblox Robux Visual Changer
// @namespace    http://tampermonkey.net/
// @version      1.2
// @description  Visually change Robux amount
// @author       NOT_FIND
// @match        https://www.roblox.com/*
// @icon         https://www.google.com/s2/favicons?domain=roblox.com
// @grant        none
// @license      MIT
// ==/UserScript==

function abbreviateNumber(number) {
    const abbreviations = ['', 'K', 'M', 'B', 'T', 'QD', 'QN'];
    let tier = Math.floor(Math.log10(Math.abs(number)) / 3);
    if(tier > 6) tier = 6;
    if(tier <= 0) return number;
    
    const scale = Math.pow(10, tier * 3);
    const scaled = number / scale;
    return Math.floor(scaled) + abbreviations[tier] + '+';
}

window.addEventListener('keydown', function(event) {
    if (event.code === 'Insert') {
        const amount = prompt('Robux Amount:');
        if (amount && !isNaN(amount)) {
            localStorage.setItem('fakeRobux', amount);
            updateRobux();
        }
    }
});

function updateRobux() {
    const savedAmount = localStorage.getItem('fakeRobux');
    if (savedAmount) {
        const robuxElement = document.getElementById('nav-robux-amount');
        if (robuxElement) {
            robuxElement.textContent = abbreviateNumber(parseInt(savedAmount));
        }
    }
}

const observer = new MutationObserver(updateRobux);
observer.observe(document.body, {
    childList: true,
    subtree: true
});

updateRobux();