Any way to reload plugin when script injection accepted?

Hey, I’m working on a plugin, and I’m curious how I can make the plugin automatically reload once script injection was allowed.

All I wanna know is how to run anything when the script injection was allowed (if possible), as I already have a function to reload my plugin.