Run A Module Without Parent Script

Does anyone know if it’s possible for a module script to run in the background without a script that required it being present? Or if there’s any way to create a background process but destroy the script that started it?

I know that modules can have their code run without the script being present, since modules load their contents into a script after they’ve been required().

i think you could just do

require(module)
script:Destroy()

OP wants to make an anti-decompile by hiding the local script/module in nil by destroying it. But exploiters have tricks up their sleeves so this doesn’t really accomplish anything.

1 Like

ah did not realize that, yeah i think exploiters have ways to access nil instances so i guess all OP could try to do is figure out how to do what he wants on the server (if possible)

1 Like

I was trying to figure out if I could connect an event in the background but destroy the parent script that hooked it.