Need help making a secure group ranking system

  1. What do you want to achieve? Keep it simple and clear!

A secure group ranking system that I can make.

  1. What is the issue? Include screenshots / videos if possible!

I have tried using a bot that runs on glitch, but glitch isn’t private and my bot account was hacked.

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

I have looked at tutorials and all of them either use glitch or cost money or don’t even work anymore.

2 Likes

bots run on servers which cost money to operate

if its free then the service is losing money by giving it to you, so its probably crappy

theres nothing both free and great to host bots on

edit: you could host it on your own computer

1 Like

I have a dedicated server I just don’t know how to set it up

are you trying to figure out how to run a discord bot on your server?

You need to use secrets for api keys on clitch

1 Like

Is this only for roblox do you want to manage it externally aswell, if so I would suggest sticking entirely to roblox unless you can host a server.

1 Like

What exactly do you mean by sticking to Roblox?

Sorry If I did not understand what you are trying to achieve here, is this group ranking system going to be used or for a discord bot of some sort?

I don’t plan to use a discord bot with it, just a ranking system for Roblox

By group ranking you mean a custom group ranking system like “Admin”, "Mod, ect… am I correct?

If so you should utilize this in roblox Datastores.

Yes, but how would I use datastores to rank someone?

sorry if i sound rude but dude what are you trying to do?

you can rank somebody from the roblox website. if you want to do that from somewhere else (a discord bot, your website, inside of a roblox game) youre going to have to send a request with the groups api

1 Like

You can just use groups to do this but if you want a custom system I suggest doing something like this:

local DatastoreService = game:GetService("DataStoreService")

local rankDatastore = DatastoreService:GetDataStore("RankDataStore")
local Roles = {
    ["Owner"] = {rank = 1, userIds = {user ids here}},
    ["Admin"] = {rank = 2, userIds = {same thing}},
}

local success
local attempts = 0
local maxAttempts = 5

while not success and attempts < maxAttempts do
    attempts += 1
    success, err = pcall(function()
        rankDatastore:SetAsync("Roles", Roles)
    end)
    
    if not success then
         warn("Failed: " .. err)
         task.wait(2)
   end
end

To retrieve the data you can use :GetAsync(“Roles”) which will return the table with all the roles and user ids assigned to it.

If you understand Python, you can use PythonAnywhere to host your bot.
It’s my go-to when I want to take advantage of other platforms’ APIs, and it’s completely free.

What I meant is a group ranking bot, sorry for confusion.

1 Like

Ah sorry for the previous reply, you can use Player:IsInGroup(GroupId) to check if a player is in a group first, you can then use Player:GetRankInGroup(GroupID) or Player:GetRoleInGroup(GroupdID) depending on your needs. However since you are using a bot you will have to set up a host server and HTTP request to roblox’s Groups API

1 Like

Alright, thank you! This worked well for me.