Scribunto should have an interface to get the groups a user is in. Example:
if mw.user.new(frame.args[1]).groups.sysop then return 'Admin' else return 'User' end
This was requested on https://en.wikipedia.org/w/index.php?oldid=639931577#Simpler_process_for_submitting_a_request_for_arbitration