I am looking for a way to set up and API so that if the player running the script (either directly or via a character sheet button) is the GM it will output the results only to the GM, but if it is a nonGM player then it can be displayed in the chat for everyone. The use case would be for NPC rolls that would use the same API as PCs but that you do not really want to display to the user (aka behind the screen rolls). This seems like it would have been done before, could any one point me to a script that does it well?