MV How can I have one state applies another when applied?

I'm adding in two states, Freezing and Shaking, and I want Shaking to automatically be applied when Freezing is applied. I'm sure there's a way I could do it with Yanfly's Buffs and States Core plugin using Lunatic mode, and I have a good amount of experience with JS, but honestly, I really have no idea how I would go about it. And ideas?
freezing state notetag
<Custom Apply Effect>
user.addState(X)
</Custom Apply Effect>
X being ID for the shaking state
Moved to: Plugin Support

Original thread: https://forums.rpgmakerweb.com/threads/how-can-i-have-one-state-applies-another-when-applied.138000/