Invisible scripts

Players don’t really see scripts though, only exploiters will be able to do that.
But yes, if you parent them to nil during game-time they won’t be shown.

Serverside scripts usually belong in ServerScriptService, no player can see the content inside because it is not replicated to the clients.

1 Like

You can hide Server Sided scripts in ServerScriptService. It doesn’t replicate to the client.

You can hide Client Sided scripts by either:

Making the script a function, setting its env to another script, destroying the original script.

Making a HopperBin parented to nil and setting the parent of the script to that HopperBin hides the script.

Hiding the script in a really deep folder is also effective.

Oh, my, god. Why can’t I explain it. my framework is just a plugin and this plugin simply installs scripts into game. But a normal developer can see both serverside and LocalScript easily. I dont just want them to be around. its making hard to develop. im talking about a plugin not hiding scripts in-game. Since a normal client cannot see the script without a exploit.

Why don’t you want them to see the scripts…?

1 Like

Then don’t allow them to see it? Simply parent the scripts to nil, they will not be visible, what so ever. Not even by exploiters (unless they access it via their memory, of course.)

The code doesn’t run if its parented to nil iirc.

1 Like

Because its closed source… And making pollution since my framework includes a lot of scripts

Yes it does. Try it.
You’re welcome to reply afterwards.

Oh ok, ill try it right now. I thought it didn’t

2 Likes

Any localscripts can be stolen by an exploiter, there is no way you can possibly prevent that.
However serverscripts are safe, because its bytecode is not replicated to the clients.

I know it can be stolen by exploiters, I just don’t want my scripts to appear in roblox studio explorer. I already know that exploiters can steal local scripts but as I said I don’t want a normal developer to just see scripts in their explorer after installing plugin

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