Possible to scan game to find objects with name from module script

It is a very long module script as its a virus finder but here you go,

local VirusList = {}



VirusList.virusnames = {
	"4D Being", "4DBeing",
	"_ZVN",
	"sݣ����-.G�t",

	"AntiLag", "Anti Cheat Engine!", "Anti Lag", "Anti-Lag", "Anti-Lag",  "ANTILAG script", "Anti-Lag2",
	"Anti-Lag Pack {READ}", "AntiLag2", "Anti Lag2", "AntiVirusSoftware",
	"Anti-Lag v 7.5", "ANTIVIRISIS", "ANTIVIRIS", "Antivirus", "ARBITER47",

	"Bob", "B0B",

	"C-REX",

	"dââââââââng you got owned", "Deth 2 teh samurai!", "Dont Worry Im A Friendly Virus",
	"d��������������ng.........you got owned...", "d??????????????ng.........you got owned...",
	"d��������������ng.........you got owned...", "Dupe",

	"ExecutorServer", "EXTRAHAX",

	"FeelFreeToIns3rtGramm�tic�lErrorsHere", "FeelFreeToIns3rtGramm?tic?lErrorsHere",
	"FreeStyleM�yGoAnywhereIfNeeded", "FreeStyleM?yGoAnywhereIfNeeded",
	"Fire", "Fire Remover",

	"garmo hacked ur place", "geometry", "Glosware� | Anti-Fire",
	"Guest Free Chat Script", "guest talker", "guesttalker", "Guest Talking Script",
	"Guest_Talking_Script",

	"H4XXX", "HAAXEDBYCREX", "Hack", "Harmless little scripty", "hello...i ?m your new lord lolz",
	"Hidden",

	"I am a friendly virus", "IAmHereToHe�lYourPlace", "IAmHereToHe?lYourPlace",
	"Important,Breaks if you open.", "IsAVirus", "ISt�rtHere",
	"infection", "Infected", "Installer", "Inject", "injector", "IMDOINGITOKSODONTKILLMENOW", "IsInfected",
	"InfectedScript",

	"join teh moovment!",

	"Kraftyisback", "Kill tem!",

	"Lag", "Lag Script", "Lolzorz", "luraph",

	"micolord",

	"NoNoIDon'tNeedAllOfYourAwkw?rdSovietArguments",
	"No samurai plzzz", "N0ISE", "Nice little scripty", "N00B 4TT4CK!",
	"NoNoIDon'tNeedAllOfYourAwkw�rdSovietArguments",

	"oDPAKSFOPASKDOPKospkd",
	"OMG ITS A VIRUS", "OH SNAP YOU GOT INFECTED XD XD XD", "OHAI",

	"protection", "ProperGr�mmerNeededInPhilosiphalLocations;insertNoobHere",
	"ProperGr�mmerNeededInPhilosiphalLocations;insertNoobHere",
	"ProperGr?mmerNeededInPhilosiphalLocations;insertNoobHere",

	"RemoteHandler", "ResponseSystem", "ROFL", "RoSync", "ropack", "ro pack", "RSFfacility",

	"ServerSide", "Server Side", "Script......Or is it...",
	"SnapReducer", "Snap Reducer", "Snap-Reducer", "snap infection",
	"snapinfection", "Snap-infection",
	"Spread", "Spreadify", "Sovietify", "soz i herd u lik mudkipz",

	"TehScript", "Trashed", "ThisScriptIsAJumpStartToAHe�lthyLifestyle",
	"ThisScriptIsAJumpStartToAHe?lthyLifestyle",

	"Vaccine", "Vacicne", "Virus", "Virus_666.exe", "ViVRuS", "ViVrus", "Vivurursdd", "Virus Protect",
	"VirusScript", "Virus Script", "VK� 2011",

	"WelderPart", "Wildfire", "Wormed", "Worm",

	"XXCHAINSXX2477 WUS HERE!!!!!                                                      Krodmiss V15153   ",

	"Yew've Been UMG'd!", "YOUR COMPUTER HAS A VIRUS", "your screwed, u cant scan this virus",

	"zackary1997", "Zackisk"
}












return VirusList

Yeah, since that is an array of string values the method I provided above would work.

virusnames = {
	"4D Being", "4DBeing",
	"_ZVN",
	"sݣ����-.G�t",

	"AntiLag", "Anti Cheat Engine!", "Anti Lag", "Anti-Lag", "Anti-Lag",  "ANTILAG script", "Anti-Lag2",
	"Anti-Lag Pack {READ}", "AntiLag2", "Anti Lag2", "AntiVirusSoftware",
	"Anti-Lag v 7.5", "ANTIVIRISIS", "ANTIVIRIS", "Antivirus", "ARBITER47",

	"Bob", "B0B",

	"C-REX",

	"dââââââââng you got owned", "Deth 2 teh samurai!", "Dont Worry Im A Friendly Virus",
	"d��������������ng.........you got owned...", "d??????????????ng.........you got owned...",
	"d��������������ng.........you got owned...", "Dupe",

	"ExecutorServer", "EXTRAHAX",

	"FeelFreeToIns3rtGramm�tic�lErrorsHere", "FeelFreeToIns3rtGramm?tic?lErrorsHere",
	"FreeStyleM�yGoAnywhereIfNeeded", "FreeStyleM?yGoAnywhereIfNeeded",
	"Fire", "Fire Remover",

	"garmo hacked ur place", "geometry", "Glosware� | Anti-Fire",
	"Guest Free Chat Script", "guest talker", "guesttalker", "Guest Talking Script",
	"Guest_Talking_Script",

	"H4XXX", "HAAXEDBYCREX", "Hack", "Harmless little scripty", "hello...i ?m your new lord lolz",
	"Hidden",

	"I am a friendly virus", "IAmHereToHe�lYourPlace", "IAmHereToHe?lYourPlace",
	"Important,Breaks if you open.", "IsAVirus", "ISt�rtHere",
	"infection", "Infected", "Installer", "Inject", "injector", "IMDOINGITOKSODONTKILLMENOW", "IsInfected",
	"InfectedScript",

	"join teh moovment!",

	"Kraftyisback", "Kill tem!",

	"Lag", "Lag Script", "Lolzorz", "luraph",

	"micolord",

	"NoNoIDon'tNeedAllOfYourAwkw?rdSovietArguments",
	"No samurai plzzz", "N0ISE", "Nice little scripty", "N00B 4TT4CK!",
	"NoNoIDon'tNeedAllOfYourAwkw�rdSovietArguments",

	"oDPAKSFOPASKDOPKospkd",
	"OMG ITS A VIRUS", "OH SNAP YOU GOT INFECTED XD XD XD", "OHAI",

	"protection", "ProperGr�mmerNeededInPhilosiphalLocations;insertNoobHere",
	"ProperGr�mmerNeededInPhilosiphalLocations;insertNoobHere",
	"ProperGr?mmerNeededInPhilosiphalLocations;insertNoobHere",

	"RemoteHandler", "ResponseSystem", "ROFL", "RoSync", "ropack", "ro pack", "RSFfacility",

	"ServerSide", "Server Side", "Script......Or is it...",
	"SnapReducer", "Snap Reducer", "Snap-Reducer", "snap infection",
	"snapinfection", "Snap-infection",
	"Spread", "Spreadify", "Sovietify", "soz i herd u lik mudkipz",

	"TehScript", "Trashed", "ThisScriptIsAJumpStartToAHe�lthyLifestyle",
	"ThisScriptIsAJumpStartToAHe?lthyLifestyle",

	"Vaccine", "Vacicne", "Virus", "Virus_666.exe", "ViVRuS", "ViVrus", "Vivurursdd", "Virus Protect",
	"VirusScript", "Virus Script", "VK� 2011",

	"WelderPart", "Wildfire", "Wormed", "Worm",

	"XXCHAINSXX2477 WUS HERE!!!!!                                                      Krodmiss V15153   ",

	"Yew've Been UMG'd!", "YOUR COMPUTER HAS A VIRUS", "your screwed, u cant scan this virus",

	"zackary1997", "Zackisk"
}

for _, Object in ipairs(game:GetDescendants()) do
	if table.find(virusnames, Object.Name) then
		print(Object.Parent)
	end
end
1 Like

image

“Unkown Global”

change it to the name of the table with all the virus names, and make sure the table is in the same script as the loop.

Did you include the table in the script? I merged it all together.

It now where but will this activate when I click on the plugin or will I have to make a button?

local virusModule = require() --Change the path to the ModuleScript instance here.

for _, Object in ipairs(game:GetDescendants()) do
	if table.find(virusModule.virusnames, Object.Name) then
		print(Object.Parent)
	end
end
invalid argument #1 to 'find' (table expected, got nil)
local virusModule = require() --Same path.

for _, Object in ipairs(game:GetDescendants()) do
	if table.find(virusModule, Object.Name) then
		print(Object.Parent)
	end
end

I see the ModuleScript is just returning that single table value and not a table of table values, in that case you just use the above.

This is my code for some reason it does not return any prints?

ScanButton.MouseButton1Click:Connect(function()
for _, Object in ipairs(game:GetDescendants()) do
	if table.find(VirusList, Object.Name) then
		print("worked")
			print(Object.Parent)
			Object:Destroy()
		end
	end
end)

That would mean your game doesn’t contain any of the instances being searched for.

I tested it with a random instance.

image

image

these are copy pasted from the module script too

image
image

Everything is working on my end.

Does it not scan for any object like scripts or only models?

image

image

Created a new script which contains the default print line.

Can you send what code your using?

image

Ignore “MainServer”.

local virusModule = require(script.ModuleScript) --Change the path to the ModuleScript instance here.

for _, Object in ipairs(game:GetDescendants()) do
	if table.find(virusModule, Object.Name) then
		print(Object.Parent)
	end
end

The ModuleScript is the same as the one you provided.

does the script have to be in serverscriptservice?

No, but I can’t assist you with debugging any further, sorry.