I want to check for Viruses and see if they are a script
It says I am lacking permission look:
What it looks like:
What I get:
I have went on youtube.com
I am trying to make a Anti-Virus and I am checking if the object is a script or module script but when I do that it says I am lacking permission on my script why?
local module = {}
local virusDefinitions = {
"vaccine";
"virus";
"antivaccination";
"antivaccine";
"antivxccination";
"antivxccine";
"infection";
}
function module:AntiVirus(call)
if call:lower() == "destroyvirus" then
for _, object in pairs(game:GetDescendants()) do
for _, virusName in pairs(virusDefinitions) do
if object:IsA("Script") or object:IsA("ModuleScript") then
if object.Name:lower() == virusName then
object:Destroy()
warn("Found a virus, virus was destroyed!")
else
return "No Virus Found"
end
end
end
end
elseif call:lower() == "viruschecker" then
for _, object in pairs(game:GetDescendants()) do
for _, virusName in pairs(virusDefinitions) do
if object:IsA("Script") or object:IsA("ModuleScript") then -- error happens here
if object.Name:lower() == virusName then
warn(object.Name .. ": Is a Virus In :" .. object.Parent)
else
return "No Virus Found"
end
end
end
end
elseif call:lower() == "null" then
--// code Ignore this one just becuase I havent came up with any other ones for virus checking
end
end
return module