This is an simple Rolesync
Just set your Discord Bot token and the Server ID in the server.lua. Then add your role ID and the group in the ROLE_IDS tabel and your ready to go. It always uses the highest role from the user. The script sets the role after connecting on the server and removes it on leaving the server(you can simply rewrite this if you delete the last part of the code).
Have fun!