Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

The current identity (2) cannot Class security check (lacking permission 6)?

I am working on a antivirus to protect my game but it seems that my script is not removing the bad scripts. this is what i mean when my script catches a virus script/virus model it is supposed to remove it. but my code is not removing it.

local illigal_names = {'Virus1','ViRUS23i219'}


for _,game_parts in pairs(game:GetDescendants()) do
	for virus_names in pairs(illigal_names) do
		if game_parts == virus_names then
			print(tostring(game_parts)..' is not safe, deleting'..tostring(game_parts))
			game_parts:Destroy()
			
		else
			print(tostring(game_parts)..' is safe')
			
		end
	end
end

1 comment

0

The error is coming from line 10!

2 answers

✓ Accepted answer

You can check through individual sub classes not the actual game though

The error occurs when a script or local script tries to access something that is restricted for example the RobloxPluginService or the CoreGui. This happens so that evil developers can not remove the roblox gui (like the leave game) trapping little kids in the game.

you can change your code to make sure that this doesn't happen.

local ToCheck={workspace,game.ReplicatedStorage,game.ServerStorage}
local illigal_names = {'Virus1','ViRUS23i219'}
local viruses = { 
"4d being","loser","infected","rolf","wildfire","geometry","join teh moovement","guest talker","anti-lag",
"snap infection","numbrez","imahakwtfz","wtfzor","d??????????????ng.........you got owned...","vivrus","zomg saved",
"hello...i ?m your new lord lolz","worm","no samurai plzzz","ohai","virus","guest_talking_script","snapreducer",
"snap-reducer","script.....or..is.it","timer","datacontrollers","chaotic","teleportscript","spreadify",
"antivirussoftware","ropack injection","2_2_1_1_s_s_","safity lock","ropack","ropack backup","no availiblitly lock",
"protection","whfcjgysa","073dea7p","Infect","rofl","notorsoitis","numberitis","Virus","4dbeing","4d being","loser",
"infected","no samurai plzzz","ohai","virus","guest_talking_script","snapreducer","snap-reducer",
"script.....or..is.it","Script......Or is it...","rolf","wildfire","geometry","join teh moovement","guest talker",
"anti-lag","snap infection","numbrez","imahakwtfz","wtfzor","d??????????????ng.........you got owned...","vivrus",
"zomg saved","hello...i ?m your new lord lolz","worm","timer","datacontrollers","chaotic","spreadify",
"antivirussoftware","ropack injection","2_2_1_1_s_s_","safity lock","ropack","ropack backup","no availiblitly lock",
"protection","whfcjgysa","073dea7p","PWNZ0R3D","CompassEffect" , "Guest_Talking_Script" , "cubiclemon rulz",
"Motivation","motivation" , "Anti-Lag" , "troll" , "Troll" , "D???????NG YOU GOT OWNED AND PWNED" , "Vaccine","Yeller" , "super virus script",
"BEST ANTILAG EVER", "Infection","N0ISE","annoyingscript","lag virus","RSFacility","noitcefnI","PWNScript","EXTREMELY ANNOYING VIRUS",
"skull8889","20dayton","?9001","9001","?","OH SNAP YOU GOT INFECTED!","friendly virus script","lagscript","lag script","N0ISESCRIPT",
"N0ISE SCRIPT","LAG","spread virus","Spread","OwO PILLA VIRUS OwO","1","extremelyannoyingscript","yougotinfected","vivirus",
"snap virus","suriV","Anti-Lag","super antivirus","Super infection","1337leetvirus","Yummey!","Chil-Virus","AHAHAHAHA","OwO virus",
"IgnoreThisModel","GET INFECTED NOOB","DELETE ME!","Troll script","Troll Script","chaotic script","OMEGA VIRUS","lag virus",
"AntiLag","1337","LEET VIRUS","1337 LEET!","1337 LEET!!","1337 LEET!!!","worm script","Dont worry im a friendly virus",
"vivivrus","Nomnomnom1","Nomnomnom1 will hack you too!","LAG!!!","Lag reducer","Snap remover","Anti-snap","vivivirus","Extreme virus script",
"EXTREME VIRUS SCRIPT","lag and annoying script","LOLWUT","LOLWUT?","LOLWUT???","ProperGr?mmerNeededInPhilosiphalLocations;insertNoobHere",
"ISt?rtHere","norn virus","crappy norn virus","Wormed","HAAXEDBYCREATURES","HAXXEDBYCREATURES","DEATH TO DATGUY","samsolowalker",
"OMG LOOK WHAT YOU DID!","Error! Core Overheat: Burning.......you gow owned...","Lololoollllolololololol cant remove this!!",
"infectedscript","VirusScript","8474???????????259294237492857295837958257239832759832759735928376925723098572",
"311???????????????","?????lololol???????","f??????????????????????????","0ijouojo","fhfhfhfhv?",
"Best Antilag ever!!!!","InfectedScript","Infectedscript","Infected_script","Infected_Script","Wildfire","yesman232",
"FeelFreeToIns3rtGramm?tic?lErrorsHere","WOMP WOMP INFECTED","mean774","1","wormed","leandroMP"
}
for _,Place in pairs(ToCheck) do
for _,Item in pairs(Place:GetDescendants()) do
if table.find(illigal_names,Item.Name) or table.find(viruses,Item.Name) then
print(Item.Name,'is a virus removing ....')
Item:remove()
end
end

To help you out i also included some other virus names

Here are some antiviruses i found from the toolbox: https://www.roblox.com/library/14100582/Anti-Virus-v3-2 another one: https://www.roblox.com/library/8476119

2 comments

0

Thx @Harry_TheKing1

0

np homie :)

you cant access the descendants from the game directly, a better way of preventing viruses is to not use free models from the toolbox but make the models yourself of get someone you trust to make them

This discussion is preserved as it was. New answers, comments, and votes are closed.