The script is available for download from http://gallery.technet.microsoft.com/How-to-add-a-User-into-054d0576. You can also use Microsoft Script Browser for Windows PowerShell ISE to download the sample with one button click from within your scripting environment.
This script allows to add or modify Role Definition/Permission Level, add a new SharePoint Group or use existing group to associate the SharePoint Group with the new Role Definition/Permission Level and add the a user to the group.
There are various situations where a SharePoint admin or a site owner wants to create new permission level with custom permissions and then associate the permission level to a specific group. You may also want to add specific users to the group to complete the task by giving the right permissions to the right set of users and at the same time controlling the permissions at one role definition/permission level. This script allows you to create or modify permission level with desired permissions, lets you add new group or use existing group to associate the group to the permission level created earlier and finally lets you add new users to the group to give them the right set of permissions.
You can find more All-In-One Script Framework script samples at https://aka.ms/onescriptingallery