Roblox Scripts Finder — HeapLeak

Shows the latest free Roblox scripts from HeapLeak directly on any Roblox game page. Fetches live script listings and displays them in a sidebar panel.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name         Roblox Scripts Finder — HeapLeak
// @namespace    https://heapleak.com
// @version      1.1
// @description  Shows the latest free Roblox scripts from HeapLeak directly on any Roblox game page. Fetches live script listings and displays them in a sidebar panel.
// @author       HeapLeak
// @match        https://www.roblox.com/games/*
// @grant        GM_xmlhttpRequest
// @connect      heapleak.com
// ==/UserScript==

(function () {
    'use strict';

    // Panel
    const panel = document.createElement('div');
    panel.id = 'hl-panel';
    panel.style.cssText = `
        position: fixed;
        bottom: 24px;
        right: 24px;
        z-index: 99999;
        width: 300px;
        background: #0d0d0d;
        border: 1.5px solid #33cc66;
        border-radius: 10px;
        font-family: monospace;
        font-size: 13px;
        box-shadow: 0 0 20px rgba(51, 204, 102, 0.3);
        overflow: hidden;
        transition: all 0.3s ease;
    `;

    // Header
    const header = document.createElement('div');
    header.style.cssText = `
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: #111;
        padding: 10px 14px;
        cursor: pointer;
        border-bottom: 1px solid #1a1a1a;
    `;

    const title = document.createElement('a');
    title.href = 'https://heapleak.com/forums/roblox/';
    title.target = '_blank';
    title.innerText = '🟢 HeapLeak Scripts';
    title.style.cssText = `
        color: #33cc66;
        font-weight: bold;
        text-decoration: none;
        font-size: 13px;
    `;

    const toggle = document.createElement('span');
    toggle.innerText = '▼';
    toggle.style.cssText = `color: #33cc66; font-size: 11px; cursor: pointer;`;

    header.appendChild(title);
    header.appendChild(toggle);

    // Body
    const body = document.createElement('div');
    body.id = 'hl-body';
    body.style.cssText = `padding: 10px 14px; max-height: 280px; overflow-y: auto;`;
    body.innerHTML = `<p style="color:#666; margin:0;">Loading scripts...</p>`;

    // Toggle collapse
    let collapsed = false;
    header.addEventListener('click', (e) => {
        if (e.target === title) return;
        collapsed = !collapsed;
        body.style.display = collapsed ? 'none' : 'block';
        toggle.innerText = collapsed ? '▲' : '▼';
    });

    panel.appendChild(header);
    panel.appendChild(body);
    document.body.appendChild(panel);

    // Fetch latest scripts from HeapLeak
    GM_xmlhttpRequest({
        method: 'GET',
        url: 'https://heapleak.com/forums/roblox/',
        onload: function (response) {
            const parser = new DOMParser();
            const doc = parser.parseFromString(response.responseText, 'text/html');
            const threads = doc.querySelectorAll('h2 a[href*="/threads/"]');

            if (!threads.length) {
                body.innerHTML = `<p style="color:#666; margin:0;">Could not load scripts. <a href="https://heapleak.com/forums/roblox/" target="_blank" style="color:#33cc66;">Visit HeapLeak</a></p>`;
                return;
            }

            const list = document.createElement('ul');
            list.style.cssText = `margin: 0; padding: 0; list-style: none;`;

            let count = 0;
            threads.forEach((thread) => {
                if (count >= 8) return;
                const li = document.createElement('li');
                li.style.cssText = `margin-bottom: 8px; border-bottom: 1px solid #1a1a1a; padding-bottom: 8px;`;

                const link = document.createElement('a');
                link.href = thread.href;
                link.target = '_blank';
                link.innerText = thread.innerText.trim();
                link.style.cssText = `
                    color: #00cfff;
                    text-decoration: none;
                    font-size: 12px;
                    line-height: 1.4;
                    display: block;
                `;
                link.addEventListener('mouseenter', () => link.style.color = '#33cc66');
                link.addEventListener('mouseleave', () => link.style.color = '#00cfff');

                li.appendChild(link);
                list.appendChild(li);
                count++;
            });

            const footer = document.createElement('a');
            footer.href = 'https://heapleak.com/forums/roblox/';
            footer.target = '_blank';
            footer.innerText = 'View all scripts on HeapLeak';
            footer.style.cssText = `color: #33cc66; font-size: 12px; text-decoration: none; display: block; margin-top: 6px;`;

            body.innerHTML = '';
            body.appendChild(list);
            body.appendChild(footer);
        },
        onerror: function () {
            body.innerHTML = `<p style="color:#666; margin:0;">Failed to load. <a href="https://heapleak.com/forums/roblox/" target="_blank" style="color:#33cc66;">Visit HeapLeak</a></p>`;
        }
    });

})();