Auto-translated
The script looks good; it's strange that it doesn't work. Have you checked the console? And this... I doubt it will help, but I would try adding three more "nil" values at the end of StartCombat. There's just this thing where, by default, the value of the variable that comes first in the function is set, and it might be causing a bug where a required variable isn't set, and the default value is set in such a way...