Change font to old

Made by TheMoon

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

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

(Tôi đã có Trình quản lý tập lệnh người dùng, hãy cài đặt nó!)

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.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Change font to old
// @namespace    http://tampermonkey.net/
// @version      2024-04-19
// @description  Made by TheMoon
// @author       You
// @match        https://*.roblox.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=roblox.com
// @grant        none
// @license      TheMoonSir - Change from new font to old font
// ==/UserScript==

(function() {
    'use strict';

    function changeFontFamilyInCSS(cssRules, fontFamilyToChange, newFontFamily) {
        for (var i = 0; i < cssRules.length; i++) {
            var rule = cssRules[i];
            if (rule.selectorText && rule.selectorText.indexOf('.builder-font') !== -1) {
                rule.style.fontFamily = rule.style.fontFamily.replace(fontFamilyToChange, newFontFamily);
            }
        }
    }

    var cssFile = 'https://css.rbxcdn.com/aa78e65cb877e92d8c8b6b41a7715271d322530edabcf2c41f7510b5a956c637.css';
    var xhr = new XMLHttpRequest();
    xhr.open('GET', cssFile, true);
    xhr.onreadystatechange = function() {
        if (xhr.readyState === 4 && xhr.status === 200) {
            var cssText = xhr.responseText;
            var styleElement = document.createElement('style');
            styleElement.type = 'text/css';
            styleElement.appendChild(document.createTextNode(cssText));
            document.head.appendChild(styleElement);
            var cssRules = styleElement.sheet.cssRules || styleElement.sheet.rules;
            changeFontFamilyInCSS(cssRules, 'Builder Sans', 'HCo Gotham SSm');
        }
    };
    xhr.send(null);
})();