The only way of doing this is by using Node.js. I'd recommend using Glitch.com to host it. I have created you a script in JavaScript which will allow you to get the members.
const request = require('request');
const express = require('express');
var app = express();
app.use(express.static('public'));
function getPlayers(groupid, rankid) {
request(`https://groups.roblox.com/v1/groups/${groupid}/roles`, function (error, res, body) {
JSON.parse(body).roles.forEach(function(array) {
if(array.rank == rankid) {
request(`https://groups.roblox.com/v1/groups/${groupid}/roles/${array.id}/users?limit=100&sortOrder=Desc`, function (error2, res2, body2) {
return JSON.parse(body2).data
})
}
})
})
}
app.get('/getplayers/:groupid/:rankid', function(req, res) {
res.send(getPlayers(req.params.groupid,req.params.rankid));
});
You will need to install request, you do this by opening the console and typing pnpm install request, and then pressing enter, then put refresh in the console and then press enter again. express should be preinstalled.
Fill in the GroupId and RoleId, I took the liberty of getting the roleset so you don't need to, just use the ones you see on the admin page.
This will return a table per member in the role:
{
int userId,
string username,
string buildersClubMembershipType,
}
buildersClubMembershipType return any of the following:
'None'
'BC'
'TBC'
'OBC'
If this does not work, do not hesitate to DM me on discord @ MachoPiggies#3484!
EDIT
Forgot to add the http
If you want this in your game, use game:GetService("HttpService"):GetAsync("https://projectname.glitch.me/getplayers/GROUPID/RANKID")
2 comments
if plr:GetRankInGroup() >= x then table.insert(tbl,plr) end
I need it so I would join the game then it will add everyone to the table. Because I can't get over 2k people to join the game.