I found a bug today. It happens when you are in combat and you have more skills then skill slots. Its a bit weird to describe so I'll use some images. A few things: I'm only using your Skill Equip script by itself and I haven't modified it in any way (default skill slots = 4), all the skills seen below were set to be learned at Lvl 1, have no MP or TP cost, and all set to the 'Special' starting category. Ok I hope this makes sense...
Here's how his skill screen is laid out, 5 skills learned:
Now here's my skill Equip Screen. I haven't touched the skills. Your script has auto-equipped the first 4 skills in his skill list (which is fine, not a problem).
Then we'll mix up the skills just for the heck of it, as one might actually do in a real game:
This is what his skill selection looks like in combat (as expected):
This is the bugged part. After we use a skill from the scrambled up skill list (I did Fire Breath), it then reverts back to its original (Image 2) equipped list:
I've tested this multiple times on a couple of different projects (one having no scripts like in the example above and one game having many scripts) and the results have been the same.