Roblox Friends List Bypass UK

Displays Roblox friends in a nice gui, good to see UK friends lists. :)

// ==UserScript==
// @name         Roblox Friends List Bypass UK
// @namespace    http://tampermonkey.net/
// @version      2.4
// @description  Displays Roblox friends in a nice gui, good to see UK friends lists. :)
// @author       @xss https://www.roblox.com/users/4245248422/profile
// @match        https://www.roblox.com/users/*/profile*
// @icon         https://www.google.com/s2/favicons?domain=roblox.com
// @grant        GM_xmlhttpRequest
// @license MIT
// ==/UserScript==

(function() {
    'use strict';

    const modalStyle = `
        .friends-modal {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 400px;
            background: #2d2d2d;
            border-radius: 8px;
            z-index: 9999;
            box-shadow: 0 4px 12px rgba(0,0,0,0.3);
            color: white;
            font-family: 'Gotham SSm', Arial, sans-serif;
        }
        .modal-header {
            padding: 16px;
            border-bottom: 1px solid #404040;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .modal-title {
            font-weight: 600;
            font-size: 18px;
        }
        .modal-close {
            cursor: pointer;
            padding: 4px;
            font-size: 20px;
        }
        .friends-list {
            max-height: 60vh;
            overflow-y: auto;
            padding: 8px 0;
        }
        .friend-item {
            padding: 12px 16px;
            display: flex;
            align-items: center;
            cursor: pointer;
            transition: background 0.2s;
        }
        .friend-item:hover {
            background: #3a3a3a;
        }
        .friend-name {
            margin-left: 12px;
            font-weight: 500;
        }
        .loading {
            padding: 20px;
            text-align: center;
            color: #888;
        }
        .overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.5);
            z-index: 9998;
        }
    `;

    function createModal() {
        const style = document.createElement('style');
        style.textContent = modalStyle;
        document.head.appendChild(style);

        const overlay = document.createElement('div');
        overlay.className = 'overlay';

        const modal = document.createElement('div');
        modal.className = 'friends-modal';

        modal.innerHTML = `
            <div class="modal-header">
                <div class="modal-title">Friends List</div>
                <div class="modal-close">×</div>
            </div>
            <div class="friends-list">
                <div class="loading">Loading friends...</div>
            </div>
        `;

        document.body.appendChild(overlay);
        document.body.appendChild(modal);

        modal.querySelector('.modal-close').addEventListener('click', closeModal);
        overlay.addEventListener('click', closeModal);

        return modal;
    }

    function closeModal() {
        document.querySelector('.friends-modal')?.remove();
        document.querySelector('.overlay')?.remove();
    }

    function showFriendsList(friends) {
        const list = document.querySelector('.friends-list');
        list.innerHTML = '';

        friends.forEach(friend => {
            const item = document.createElement('div');
            item.className = 'friend-item';
            item.innerHTML = `
                <span class="friend-name">${friend.displayName || friend.name}</span>
            `;

            item.addEventListener('click', (e) => {
                window.open(`https://www.roblox.com/users/${friend.id}/profile`, '_blank');
            });

            list.appendChild(item);
        });
    }

    function addFriendsButton() {
        const userId = window.location.pathname.split('/')[2];
        const nameContainer = document.querySelector('.profile-header-title-container');

        if (!nameContainer) return;

        const button = document.createElement('div');
        button.textContent = 'Friends List';
        button.style.cssText = `
            display: inline-flex;
            align-items: center;
            padding: 6px 12px;
            background-color: #ff69b4;
            color: white;
            border-radius: 4px;
            font-family: 'Gotham SSm', Arial, sans-serif;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            margin-left: 12px;
            vertical-align: middle;
            position: relative;
            top: -2px;
        `;

        button.addEventListener('mouseover', () => {
            button.style.backgroundColor = '#e0529c';
            button.style.transform = 'translateY(-1px)';
        });
        button.addEventListener('mouseout', () => {
            button.style.backgroundColor = '#ff69b4';
            button.style.transform = 'none';
        });

        button.addEventListener('click', async (e) => {
            e.stopPropagation();
            createModal();
            try {
                const response = await fetch(`https://friends.roblox.com/v1/users/${userId}/friends`);
                const data = await response.json();
                showFriendsList(data.data);
            } catch (error) {
                document.querySelector('.friends-list').innerHTML =
                    '<div class="loading">Failed to load friends list</div>';
            }
        });

        nameContainer.appendChild(button);
    }

    window.addEventListener('load', addFriendsButton);
})();