Invisible scripts

It worked, and im actually mad at myself kinda. I thought you would have to set the env to another script getfenv(< another function from another script>) if you could destroy the script and it would still run the code.

Then the answer is no, you cannot hide your scripts in the explorer.
I have no experience with plugins, but I doubt any plugins has this type of feature.

2 Likes

Can I parent my scripts to nil in a plugin? Over all it will run in-game?

Simply do script = nil if you want to have fun with exploiters, they won’t be able to grab the function environment if you do that.

The script will still exist in their memory though.

If you parent a script to nil in studio (console), it’ll be destroyed.
With plugins, probably not.

1 Like

I know, I’ve been working on an anticheat for a couple months.

I usually just set script to a Folder so I can just grab assets from there.

You could also do script.Disabled = true that works to.

Ummmm, one more question. Can I run a command line with a plugin at the publishing process, like if the player publishs the game the script will be added so player wont see it while developing in studio, how can I detect publishing with plugins?

Yes, I’m aware of that as I’ve made a couple anticheats myself.
My anticheat actually permanently bans you from the game if certain conditions is met, very cool stuff can be done with that knowledge.

Interesting question, as I have never heard about it, you can try looking at this topic: On game published event - #9 by IdiomicLanguage

2 Likes