Get the code of a Script by a (DIY) Plugin

For a tool (script) named “Instances Explorer” and I would like that he would be able to see the Scripts content…
Is there any way to do that without plugin?

3 Likes

This can only be done via Plugin or the Command Bar, sorry!

But how Antivirus plugins can see the code else?
Maybe it’s a plugin’s feature

You answered your own question,

I responded with, no you can only view script sources via command bar and plugin.

I just saw that a plugin is made from a Lua Script (from Roblox)
So it wouldn’t be a plugin’s feature…

It is a plugins feature, lua plugins run in a different context and permission level then lua scripts. (I believe, there is a technical term I forgot for this)

1 Like

small example of what it can do

All plugins are written in a normal server script, the only difference being that theyre uploaded to the website

Only the command bar and plugins are able to access the code of another script because they run on a higher security context identity level than standard scripts. You cannot fetch the content of another script at run time, therefore you cannot do this without a plugin.

Your response and content contradict each other:

You asked how to do it without a plugin, then compared it to plugins that are able to do so. Those are plugins, you’re asking for scripts. Try to keep clarity between what you’re trying to ask.

What are you even trying to accomplish? I doubt there is any reason you need to access the source of other scripts at run time in a production environment.

Roblox has something called “context levels” or “identity levels”. Those are sorta like permissions. Some properties/functions are only accessible to higher permission levels.

By default all normal LocalScripts, ModuleScripts and Server Scripts run under the context level 2. They are able to access all the functions/properties you use every day.

Things change when plugins come into play. They have a higher context level called PluginSecurity (lvl 5 iirc) which is able to access properties such as Source, which normal scripts can’t use. So I guess you can call it a “plugins’ feature”.

I wanted to know a command that can know a script’s code but without plugins…
But as I see, my Script will be a Plugin… So I would to know that command that I will put in a Script and convert into a Plugin… So there isn’t any risk of potential virus! :smiley:

I’m confused. So if your script is the base of a plugin, why are you posting this thread? Your question has been answered for you. There’s a property in each script object called “Source” that returns a string of the script’s content.

One moment you’re asking how to get the source without a plugin then you’re talking about your script being a plugin? Please be more clear about what you’re trying to do.

I think he was trying to access Source without using plugins, but now after making sure it isn’t possible he’s asking for a way to turn his script into a plugin.

asdsadasdsad
Right click your script and click that to turn it into a local plugin

That’s right :thinking:
I saw post talking about a virus but I don’t remember what virus in a plugin which was into a security level of 6!
It prevent scripts to see the malicious plugin…I think

So there are two different topics running in a single thread then? Which shouldn’t be happening?

You saw a topic about backdoors. Basically people made their plugins insert a script into your currently open place file, into a location such as JointsService which isn’t shown in the explorer, hence why you couldn’t spot them in the studio’s explorer.

They are however detectable by scripts.
(also plugins can’t increase their own context level)

It’s strange but in “Instances Explorer” Its’ a script that I made I can see JointsService (and also a lot of crap like almost 10 Instances named “Instance” in my game’s root)
There is latency betwen your message and my message :sweat_smile:

Some services are named Instance for some reason.

And for your actual inquiry, outside of a plugin or command bar, you can’t, and you don’t need to. Use the two options provided by Roblox. Period.

I will use thes two options provided by Roblox :slight_smile:

Yes, as I said, doing game:GetChildren() will return all instances (mainly services) parented to game, while studio’s explorer hides the ones which are useless for you ( as in, you won’t ever want to use them outside of scripts).

Many of them are internal and you shouldn’t worry about them.