Continue lua function after entity removed?

I made a simple health regenerator pill in LUA, and was wondering how to make it continue functioning after it has been removed, so it will be used up when the player uses it. Will provide current code if requested.

Use a gamemode hook.

Simply hook the function? Will timers continue to work? Also, with multiple players using the pill will the timers and hooks conflict? I’m sure these are newbie questions.


Got it. Thanks for the help