Hello! I made a simple Anti Virus plugin to scan for backdoors and tell you the location. I have never tried to make plugins before and I want to hear feedback!
How to install:
1. Open your file Explorer
2. Go to Roblox plugins folder at C:\Users\YOURUSERNAME\AppData\Local\Roblox\Plugins
3. Download this file and put it into your Plugins folder AntiVirus.lua (2.9 KB)
4. Run Roblox Studio and the plugin will be in your plugins tab, Enjoy!
You could optimize further by removing the “Lists” dictionary or the variables outside of it and remove the count of found results since it can later be obtained. The final code should look like this:
--Scripted by AshyExrth
--Version 0.1
--Very Buggy and messy code, but it works!
--Thx to the devforum for helping me ily
local sl = game:GetService("Selection")
local coreGUI = game:GetService("CoreGui");
local tb = plugin:CreateToolbar("Anti Virus")
local sg = tb:CreateButton("Scan Game", "Scan Game", "rbxassetid://216049808")
local ss = tb:CreateButton("Scan Selected", "Scan Selected Instance", "rbxassetid://6422318705")
sg.ClickableWhenViewportHidden = true
ss.ClickableWhenViewportHidden = true
function fullScan(root)
local requires = {}
local getfenvs = {}
local loadstrings = {}
local ServerScripts = {}
local LocalScripts = {}
local ModuleScripts = {}
local function scan(instance)
if (instance:IsA("LuaSourceContainer")) then
local source = instance.Source;
if (source:find("require")) then
table.insert(requires, instance);
elseif (source:find("getfenv")) then
table.insert(getfenvs, instance);
elseif (source:find("loadstring")) then
table.insert(loadstrings, instance);
end
local className = instance.ClassName;
if (className == "ModuleScript") then
table.insert(ModuleScripts, instance);
elseif (className == "LocalScripts") then
table.insert(LocalScripts, instance);
elseif (className == "Script") then
table.insert(ServerScripts, instance);
end
end
for _, child in ipairs(if not instance.ClassName == "CoreGui" then instance:GetChildren() else {}) do
scan(child);
end
end
scan(root);
local result = string.format([[
Result:
%d requires found
%d getfenvs found
%d loadstrings found
%d ModuleScripts
%d LocalScripts
%d ServerScripts
]], #requires, #getfenvs, #loadstrings, #ModuleScripts, #LocalScripts, #ServerScripts);
print(result);
print(requires, getfenvs, loadstrings, ModuleScripts, LocalScripts, ServerScripts);
end
sg.Click:Connect(function()
fullScan(game)
end)
ss.Click:Connect(function()
local selections = sl:Get();
for _, selection in ipairs(selections) do
fullScan(selection);
end
end)