Hello, developers! Today, I wanted to print out all the names and parents of scripts in my game to make sure there aren’t any suspicious viruses, however, I don’t know how to achieve this.
How would I do it? If you know, please reply.
Thanks!
Hello, developers! Today, I wanted to print out all the names and parents of scripts in my game to make sure there aren’t any suspicious viruses, however, I don’t know how to achieve this.
How would I do it? If you know, please reply.
Thanks!
You can loop through the game’s descendants then pcall a function which will check if the object is a script then print the info.
local function printScriptInfo(code)
if code:IsA("Script") or code:IsA("LocalScript") or code:IsA("ModuleScript") then
print("Name: " .. code.Name .. "/nParent: " .. code.Parent)
end
end
for _, descendant in pairs(game:GetDescendants()) do
pcall(printScriptInfo, descendant)
end