When you create a special attack, there should be an option so that the special attack will only become active when a certain variable equals a value (e.g. "getmove! = 1"). Type in a variable name and a value and give this special move to the character like normal. Now when the boss in question is defeated, run a program that sets the above variable to the above value, and the character will now be able to use that special move.