Roblox group claimer with auto join, and discord webhooks

Finds unclaimed roblox groups and sends them to a webhook, or auto joins them!

当前为 2024-01-09 提交的版本,查看 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Roblox group claimer with auto join, and discord webhooks
// @namespace    Roblox group claimer
// @version      1
// @description  Finds unclaimed roblox groups and sends them to a webhook, or auto joins them!
// @author       ._._.dustin
// @match        https://roblox.com/*
// @grant        GM_xmlhttpRequest
// @license         MIT
// @contributionURL https://www.buymeacoffee.com/
// ==/UserScript==

(function() {
    'use strict';

    const useDiscordWebhook = true; // Set to true if you want to use a discord webhook
    const autoClaim = true; // Set to true if you want to auto claim groups

    const webhookURL = 'DISCORD_WEBHOOK'; // Put discord webhook where DISCORD_WEBHOOK is
    const threads = 5;

    function groupFinder(id) {
        GM_xmlhttpRequest({
            method: 'GET',
            url: `https://www.roblox.com/groups/group.aspx?gid=${id}`,
            onload: function(response) {
                if (response.responseText.includes('owned')) {
                } else {
                    GM_xmlhttpRequest({
                        method: 'GET',
                        url: `https://groups.roblox.com/v1/groups/${id}`,
                        onload: function(groupResponse) {
                            const data = JSON.parse(groupResponse.responseText);
                            if (!groupResponse.responseText.includes('isLocked') && groupResponse.responseText.includes('owner')) {
                                if (data.publicEntryAllowed && data.owner === null) {
                                    console.log(`[+] Hit: ${id}`);
                                    if (useDiscordWebhook) {
                                        sendWebhook(`@everyone Hit: https://www.roblox.com/groups/group.aspx?gid=${id}`);
                                    }
                                    if (autoClaim) {
                                        autoClaimGroup(id);
                                    }
                                }
                            }
                        }
                    });
                }
            }
        });
    }

    function sendWebhook(message) {
        GM_xmlhttpRequest({
            method: 'POST',
            url: webhookURL,
            data: JSON.stringify({ content: message }),
            headers: {
                'Content-Type': 'application/json',
            },
        });
    }

function autoClaimGroup(id) {
    setTimeout(function() {
        window.location.href = `https://www.roblox.com/groups/${id}`;
    }, 1000);
    setTimeout(function() {
        document.getElementById('group-join-button').click();
        document.querySelector('.icon-more').click();
        setTimeout(function() {
            const claimOwnershipBtn = document.querySelector('#claim-ownership button');
            if (claimOwnershipBtn) {
                claimOwnershipBtn.click();
                console.log("Group claimed!");
            } else {
                console.log("Failed to claim :C");
            }
        }, 890);
    }, 2000);
}

    function main() {
        setInterval(() => {
            const ids = Array.from({ length: threads * 2 }, () => Math.floor(Math.random() * (1150000 - 1000000 + 1)) + 1000000);
            ids.forEach(id => groupFinder(id));
        }, 5000);
    }

    main();

})();