I was originally going to write a large tutorial - then realised how much of a spoonfeed it’d be, so I decided against it.
I’m also not sure if this is allowed on Roblox so bare that in mind!
You’ll need some basic knowledge of a coding language and the Discord API. There’s packages for almost any language - .NET, node.js, Python, Lua (Discordia), etc
You will likely need to set up a verification system so you can send Roblox usernames back and forth instead of Discord usernames which might not be the same.
The documentation of your language of choice will explain how to see if a user has a role - you can use HTTP listeners & requests to do this. HTTP listeners should be used on the non-Roblox-server (obviously, Roblox games don’t have official ways of listening for requests), and the requests should be done on the Roblox server.
The listener would loop through a guild’s members and check if they have the role (again look at the API docs for your chosen language to see how) then return some JSON to the Roblox server (look at HTTP documentation for your chosen language)
On the Roblox-side you can use:
local httpService = game:GetService("HttpService")
local success,data = pcall(function()
if success and data then
data = httpService:JSONDecode(data)
print(data) -- this will likely be a table so you'd need to loop through
You should cache the data then compare it on PlayerAdded if you’re using something like Gltch (or anything else that can run out of requests easily) due to limits - this means users who boost who join on an older server won’t get perks till they join a newer server however that existed since they boosted. You can re-request data every so often I suppose if you wanted to.
Once again: I don’t know if Roblox allow this as I believe there was a rule against paying real money for in-game perks, and Nitro/Nitro Boosts both cost money. I’m not certain if this is still a thing or not, however.