What is the best approach in granting a player permission?

I have a game where the player should first choose which role they prefer to join. Once they join, I want to grant them access to actions that only their role can have access to, they should not be able to access other role’s actions.

Attempt:
I created a server script inside ServerScriptService that holds a table of roles. Now to grant access, I created local scripts to the player’s StarterPlayerScripts which has a condition that checks what role the player has and therefore grant them the role’s actions.

local roles = {
    Role1: Player1,
    Role2: nil
}

Question:
Is there a better approach than this? I don’t like this because the player’s starter scripts is very populated with unnecessary local scripts that is not currently in use. Also, the code for me is very messy because of the if-else statements.

This solution is fine. Validate the roles on the server, however, since it’s easy to spoof client data. Just store a table of which roles allow which actions and check against that list (on the server) when a player requests to do an action