Set up two fields with global storage--one for the number of records, gQty, and one for the userID, gUser, and formatted with your value list of UserIDs and UserNames.
Then a script similar to that shown above can assign gUser to up to the first gQty unassigned records.
Thanks, but how do I assign them to a user and pick the quanity I need to assign?
The user would enter the Quantity into the field and select a user before performing this script via clicking a button or tripping a script trigger. From what is shared in your posts so far, I don't see any other source for that information.
Because you input this data into fields with global storage specified, your script can then assign User ID's and count records created to compare to the Qty field to determine when to stop looping and always be able to access this data no matter what record or layout is current at the time.