Get script text

Hi guys!

So, I’m trying to make my own anti-cheat, but I need to be able to get all the text that’s inside of a script.
I haven’t found any solution to this, and couldn’t find a solution on the DevForum either.
Does anyone know how to do this?

Thanks in advance!

Sorry to tell you, but it’s impossible. (PluginSecurity)

1 Like

script.Source returns the script’s source, which is the text inside of it. Though the sad thing is this can be only used on commands and plugins, so you can use it inside another script.

Just like in this example, output will return nil:

Script1

-- parent: workspace

while true do
   print("potatoes are cool")
   task.wait(2)
end

Another script:

local s = workspace.printPotatoesAreCoolScript

local source = s.Source
print(source)

Output: nil

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.