I believe the OP meant "op" ("up" being short for "upgrade [their rank]" ).
In answer, you will want to have some way for those people who should be allowed to op themselves to identify that they have the right to do that. You can't check isop because that doesn't help if they aren't currently an op. You will need to add the user's address or have some kind of password they can use or some other method to let your script know that they are allowed to use the command. Once you decide how to identify the correct people, you can use a check in the script for a password or you can add the users to your user list or just add their addresses to your script directly. There are a variety of ways to do it, but you first need to decide how you want them to identify.