Get State immunity AFTER State runs out.

Hey,
I have a State (Freeze) which makes the Enemy/Player unable to act. Yet I struggle to find a way
to add a follow up state which triggers after Freeze runs out to prevent "Freeze-Spamming".

Is there a way to add another State when a certain State runs out?

I am using only the VisuStella MZ plug-ins at the moment.
If you have the VisuStella Skills and States Core, place the following notetag in your Freeze state:

<JS On Expire State>
target.addState(x)
</JS On Expire State>

The x should be the ID of the state you use for resisting the Freeze status. Now, I'm no JS guy, so I might have the wrong code there, but the notetag is assuredly the correct one.
Thank you very much. it worked!

Original thread: https://forums.rpgmakerweb.com/threads/get-state-immunity-after-state-runs-out.155213/