If you use external authentication for your accounts, this scripted approach is not possible.
For FileMaker Accounts, scripts can be devised that create and delete accounts with specified privilege sets. A script cannot be used to create a new privilege set. You can open the Scripts Workspace (FileMaker 14) or Manage Scripts (Older versions) and review the script steps available for this--all listed in the Accounts category.
A typical approach is to set up a global field for entering an account name, one or two global fields for entering a password and a third set up with a value list for selecting a privilege set. Buttons can then perform scripts using these accounts script steps to do most typical account management tasks.