For option A, this is possible but it requires you to have the ability to host an external server. Roblox provides APIs that allows you to communicate with the platform as a whole that you can manipulate with a web server. You can download node.js for building the basis of the web server and you can build the app yourself Express to handle the actual web server and Axios for providing a client that handles HTTP requests. Alternatively, you can look into noblox.js, which is a wrapper that allows you to communicate with Roblox's API, or possibly open-source auto-rankers.
I personally don't use noblox.js, so here's what I do to handle it on the external server by myself. You'd also have to make your server in a way that it accepts the player's userId as a parameter, perhaps as a query, i.e: the ?name=value in URLS, path (for example: https://scriptinghelpers.org/questions/121661. "questions" and "121661" are paths), or request body
- Obtain your
.ROBLOSECURITY cookie: you can search google to find how to get this
- Send a HTTP POST request to
https://auth.roblox.com/v2/logout with the Set-Cookie header set as .ROBLOSECURITY = your found cookie. This endpoint returns a X-CSRF-TOKEN in the response headers: very important header here
- Head to this page and enter your group id in the
groupId parameter in the parameter list below and click "Try it out!". The page will make a request to the endpoint and the response body will be shown below. Take the id of the role that corresponds to the necessary role name you want the user to be changed to.
- Send a HTTP PATCH request to
https://groups.roblox.com/v1/groups/{your_group_id_here}/users/{user's id here}. In the request body, set it to {"roleId": paste the role id of the role you found here}. In the headers, set the Cookie header to .ROBLOSECURITY = your cookie here; X-CSRF-TOKEN = the x-csrf-token you got from the authentication endpoint. If you've done everything right, the user's role should be updated
If you're not gonna bother with that, you can go with plan B, which is also possible, and use webhooks that sends the player's name. You can't be dmed by a webhook, but you can make a reserved channel for the game to send messages as requests to change a player's role. Check this out
2 comments
I do not think that is possible, but you can use webhooks and alternate apps like Discord (13+). Here is a devforum about it: https://devforum.roblox.com/t/discord-webhooks-integrating-roblox-with-discord/458366
@Omq_itzJasmin Would it be possible to let them make a message as said before but make it save so that once one of the players in two certain ranks on my group which will be me and my friend ranks come on to the game it would show a popup only on their screen that shows the messages that has been send?