MaxScript Undo

Hi guys,

I have created a script for a rollout synoptic, with sliders and bone selection buttons.
Unfortunately, when you click undo, the actions you have done within this rollout are not undone.

I have managed to get it in the undo stack, but this is just a label, and it still doesnt seem to want to undo the action. (for example, sliding a slider across)

Can anyone help? It would be greatly appreciated :)