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?
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)