Terms of Use: Free To Use, though a spot on the credit roll would be nice.
Here's a script if you want to layer some of your states like a sandwich. Think of this like Himework's Permanent States and Neon Black's Stacking States having a well-behaved baby.
Okay, let me give you a better example. Barrier States (tagged with <LayerState>) will go into one array while your normal states do their own business. The latest layered state plus other layered <LayerActive> states will give you a multiplicative boost, though only the latest layered state will be affected by sources of removals. You can also add on other tags to change when you can apply these states, for example, adding on Level 2 Barriers when you have Level 1 Barriers present. Also features <LayerPurge> if you care little about the stacking feature.
While this script is affected by adding/removing states normally, the Layered States were designed not to be removed on Death (unless you use <LayerPurgeDeath>).