Group ranking bot

hi! does anyone know how to make a ranking bot that actually works? for some reason when i try entering the correct token into environment secrets it will display as an incorrect token.

1 Like

I don’t know what you have so far but you could follow one of these tutorials:

How to Script a Group Ranking Bot - Resources / Community Tutorials - Developer Forum | Roblox

How to Create a Rank Management System using Glitch - Resources / Community Tutorials - Developer Forum | Roblox

image


im up to here. The full cookie was directly copied from dev tools.

is there an error when you run your code on Roblox or the node app?

the cookie is beyond correct
image

so, do you have a solution? this is my current script:

var groupId = 12734940 // << Replace 12345 with your Group Id
var cookie = process.env.cookie

/INSERT GROUP ID AND COOKIE ABOVE/

const express = require(“express”);
const rbx = require(“noblox.js”);
const app = express();

app.use(express.static(“public”));

async function startApp() {
await rbx.setCookie(cookie);
let currentUser = await rbx.getCurrentUser();
console.log(currentUser.UserName);
}
startApp();

app.get(“/ranker”, (req, res) => {
var User = req.param(“userid”);
var Rank = req.param(“rank”);

rbx.setRank(groupId, parseInt(User), parseInt(Rank));
res.json("Ranked!");

});

const listener = app.listen(process.env.PORT, () => {
console.log("Your app is listening on port " + listener.address().port);
});

You need to either run the bot on the same IP that you have logged into it on or disable Account Session Protection.

Roblox automatically invalidates a cookie if it’s being accessed by a different IP that created it.

still unfortunately not working.

The issue is because you don’t have the cookie in quotation marks.
Example:

BOT_TOKEN="_|WARNING:-DO-NOT-SHARE-THIS.--..."