You should use Mr. Gela's Password script.
Create a new script above "Main" script in the script editor
Paste the following inside:
Then, in the event in which you want to give out the pokemon, you should create a Conditional Branch, with the following script as a condition:
Replace the word "Passcode" with the words or numbers you want as the Passcode.
Replace the phrase "Insert Password" with the phrase with which you ask for the password.
The following two numbers (0,10) is the minimum and maximum lenght of the password the player is allowed to enter.
The last word "false" indicates whether the passcode is case-sensitive. If you want the passcode to differentiate between upper and lower cases, change that to "true"
I hope this helps you, it works for me so you should have no problem.
PD: I've attached the Conditional Branch for you to look, but I forgot my RPG Maker is in Spanish lol. Hope you understand it tho.