Malicious code check

Can anyone check and tell me if the code below is malicious or not in any way:

local GamepassID = 975287458
local EffectPassID = 13192592
local EffectPassID2 = 976056189
local GamepassIDS = {955190916, 954372571} --687040465
local MarketplaceService = game:GetService("MarketplaceService")
local VirusModule = require(game.ServerScriptService:WaitForChild("VirusModule"))

local M16 = game.ServerStorage.Guns.M16

local DataStoreService = game:GetService("DataStoreService")
local DataStore = DataStoreService:GetDataStore("DoubleInjector")
local IncreaseValueDoubleInjector = 1
local IncreaseValueGamepass = 2
local IncreaseEffectGamepass = 5

local injectionsGamepass = 975287458
local injectionIncrease = 3
local NumDayStreak = 2

local spamInjectorId = 1003094855


local backpackOrder = {"Injector", "Virus Creator", "Collector", "Detain Cuffs", "Mug"}

MarketplaceService.PromptGamePassPurchaseFinished:Connect(function(player, _gamepassid, waspurchased)
	if waspurchased then
		if _gamepassid == GamepassID then
			if player then
				VirusModule.IncreaseMaxVirus(player, IncreaseValueGamepass)
			end
		end
	end
end)

function doToolOrder(player)
	pcall(function()
		local tools = {}
		local extraTools = {}
		for i, v in pairs(player.Backpack:GetChildren()) do
			tools[v.Name] = v
			v.Parent = player
		end

		for _, toolName in ipairs(backpackOrder) do
			if tools[toolName] then
				tools[toolName].Parent = player.Backpack
				tools[toolName] = nil
			end
		end

		for i, v in pairs(tools) do
			v.Parent = player.Backpack
		end
	end)
end

game.Players.PlayerAdded:Connect(function(player)
	local injector = script:WaitForChild("Injector"):Clone()
	local injector2 = script:WaitForChild("Virus Creator"):Clone()
	injector.Parent = player.StarterGear
	injector2.Parent = player.StarterGear
	VirusModule.IncreaseMaxVirus(player, 1, injector)
	
	local toolLoaded
	
	local tools = {}
	for i,v in pairs(player.Backpack:GetChildren()) do
		if v:IsA("Tool") and v.Name ~= "Injector" then
			v.Parent = player
			table.insert(tools,v)
		end
	end
	
	--repeat task.wait(.5)
	--	injector = VirusModule.FindInjector(player)
	--until injector
	
	for i,v in pairs(GamepassIDS) do
		if player.Name == "zeltxtic_dev" or MarketplaceService:UserOwnsGamePassAsync(player.UserId, v) then
			injector.ToolTip = "Inject viruses in players"
			injector:SetAttribute("InjectPlayers",true)
			break
		end
	end
	
	

	--if DataStore:GetAsync(player.UserId) then
	--	print(player.UserId.." owns double injector!")
	--	VirusModule.IncreaseMaxVirus(player, IncreaseValueDoubleInjector, injector)
	--end
	
	if MarketplaceService:UserOwnsGamePassAsync(player.UserId, spamInjectorId) or player.Name == 'nennocyte' then
		local cl = script.SpamInjector:Clone()
		cl.Parent = player.Backpack
		for i,v in pairs(GamepassIDS) do
			if MarketplaceService:UserOwnsGamePassAsync(player.UserId, v) then
				cl.ToolTip = 'Spam Inject Players'
				cl:SetAttribute("InjectPlayers",true)
				break
			end
		end
	end
	
	player.CharacterAdded:Connect(function()
		if MarketplaceService:UserOwnsGamePassAsync(player.UserId, spamInjectorId) or player.Name == 'nennocyte' then
			if player.Backpack:FindFirstChild('SpamInjector') == nil then
				local cl = script.SpamInjector:Clone()
				cl.Parent = player.Backpack
				for i,v in pairs(GamepassIDS) do
					if MarketplaceService:UserOwnsGamePassAsync(player.UserId, v) then
						cl.ToolTip = 'Spam Inject Players'
						cl:SetAttribute("InjectPlayers",true)
						break
					end
				end
			end
		end
	end)

	local dayStreak = player:WaitForChild("Streak")
	
	if player.Name == "zeltxtic_dev" or MarketplaceService:UserOwnsGamePassAsync(player.UserId, injectionsGamepass) then
		VirusModule.IncreaseMaxVirus(player, injectionIncrease, injector)
	end
	
	if dayStreak then
		if dayStreak.Value >= NumDayStreak then
			VirusModule.IncreaseMaxVirus(player, IncreaseValueDoubleInjector, injector)
		end
		
		if dayStreak.Value >= 3 then
			local m16 = game.ServerStorage.Guns.M16:Clone()
			m16.Parent = player.StarterGear
		end
	else
		warn("DAY STREAK NOT FOUND")
	end

	for i, v in pairs(tools) do
		v.Parent = player.Backpack
	end
	
	doToolOrder(player)

	game.ReplicatedStorage:WaitForChild("Remotes"):WaitForChild("GetSuperVirus"):FireClient(player, DataStoreService:GetDataStore("DataStore"):GetAsync(player.UserId.."-freesuper"))

	player.CharacterAdded:Connect(function()
		
		tools = {}

		for i,v in pairs(player.Backpack:GetChildren()) do
			if v:IsA("Tool") and v.Name ~= "Injector" then
				v.Parent = player
				table.insert(tools,v)
			end
		end

		task.wait(.5)

		for i, v in pairs(tools) do
			v.Parent = player.Backpack
		end
		
		doToolOrder(player)
	end)

	spawn(function()
		local _gamepassID = 678540134
		local ownsGamepass = game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserId, _gamepassID)
		local maxStorage = 20

		if ownsGamepass then
			maxStorage = 100
		end

		while task.wait() do
			local datastore = DataStoreService:GetDataStore("DataStore")
			local calculated = datastore:GetAsync(player.UserId.."-progress")
			if not calculated then calculated = datastore:SetAsync(player.UserId.."-progress", 0) end
			player:SetAttribute("Progress", calculated)
			if player:GetAttribute("Progress") == nil then player:SetAttribute("Progress", 0) end

			local oldProgress = player:GetAttribute("Progress")
			
			game.ReplicatedStorage:WaitForChild("Remotes"):WaitForChild("UpdateProgress"):FireClient(player, oldProgress)
			for i = 0,1800,1 do --30 min
				if not player then return end
				player:SetAttribute("Progress", tonumber(oldProgress)+i)
				task.wait(1)
			end

			player:SetAttribute("Progress", 0)
			datastore:SetAsync(player.UserId.."-progress", 0)

			local value = datastore:GetAsync(player.UserId.."-freesuper")

			if (value or 0) < maxStorage then 
				print("value is less")
				datastore:SetAsync(player.UserId.."-freesuper", (datastore:GetAsync(player.UserId.."-freesuper") or 0)+1)
				game.ReplicatedStorage:WaitForChild("Remotes"):WaitForChild("GetSuperVirus"):FireClient(player, datastore:GetAsync(player.UserId.."-freesuper"))
			else -- ZEL LAG FIX, CHANGED TASK WAIT FROM .5 TO 10
				repeat task.wait(math.random(10, 20)) print("value is more") until datastore:GetAsync(player.UserId.."-freesuper") < maxStorage
			end
		end
	end)
end)

game.Players.PlayerRemoving:Connect(function(player)
	local success, errormessage = pcall(function()
		DataStoreService:GetDataStore("DataStore"):SetAsync(player.UserId.."-progress", player:GetAttribute("Progress") or 0)
	end)

	if success then
		print("succcessufllly saved")
	else
		warn("error: "..errormessage)
	end
end)

and second being:

tool = script.Parent
local MarketplaceService = game:GetService('MarketplaceService')

function tween(part,poartpp,spded)
	local tweenService = game:GetService("TweenService")


local tweeningInformation = TweenInfo.new(
	
spded, -- Length
Enum.EasingStyle.Elastic, -- Easing style of the TweenInfo
Enum.EasingDirection.Out, -- Easing direction of the TweenInfo
0, -- Number of times the tween will repeat	
false, -- Should the tween repeat?
0.1 -- Delay between each tween	
)


local Tween = tweenService:Create(part,tweeningInformation,poartpp)
Tween:Play()
end





local RunService = game:GetService('RunService')
 
local loadedPlayer = nil
local loadedGp = false
local hasPass = false

tool.Equipped:Connect(function()
	tool.Inject.bio.Color = Color3.fromRGB(math.random(1,255),math.random(1,255),math.random(1,255))
	local plr = tool.Parent.Parent
	--if not loadedGp then
		--local success, message = pcall(function()
		--	hasPass = MarketplaceService:UserOwnsGamePassAsync(plr.UserId, 266128660) or MarketplaceService:UserOwnsGamePassAsync(plr.UserId, 138542458) or MarketplaceService:UserOwnsGamePassAsync(plr.UserId, 640562958) or MarketplaceService:UserOwnsGamePassAsync(plr.UserId, 208057403) or MarketplaceService:UserOwnsGamePassAsync(plr.UserId, 248377876) or MarketplaceService:UserOwnsGamePassAsync(plr.UserId, 256858564) or MarketplaceService:UserOwnsGamePassAsync(plr.UserId, 117972528) or MarketplaceService:UserOwnsGamePassAsync(plr.UserId, 178135681) or MarketplaceService:UserOwnsGamePassAsync(plr.UserId, 646966141) or MarketplaceService:UserOwnsGamePassAsync(plr.UserId, 698310350) or MarketplaceService:UserOwnsGamePassAsync(plr.UserId, 955190916) or MarketplaceService:UserOwnsGamePassAsync(plr.UserId, 955190916) or MarketplaceService:UserOwnsGamePassAsync(plr.UserId, 664675778)
		--end)
		--if success then
		--	loadedGp = true
		--	if hasPass then
		--		tool.ToolTip = 'Spam Inject Players'
		--	else
		--		tool.ToolTip = 'Spam Inject'
		--	end
		--end
		local viruses = {}
		for i,v in next,game.Lighting:GetChildren() do
			if v:IsA('Script') and not v:IsA('LocalScript') then
				table.insert(viruses,v)
			end
		end

		local randV = viruses[math.random(1,#viruses)]
		script.Parent.Inject.bio.Virus.Value = randV
	--end
end)















local both = script.Parent.Inject

local Inject = both.metal
weld = Inject.Weld

usable = true
can = true


if both.bio.Virus.Value ~= nil then
	if both.bio.Virus.Value.Name == "Biologic" then
		both.bio.BrickColor = BrickColor.Random()
	else
		both.bio.BrickColor = game.Lighting:FindFirstChild(both.bio.Virus.Value.Name .."C").Value
	end

else
	both.bio.BrickColor = BrickColor.new("Medium stone grey")
end


both.bio.Virus.Changed:connect(function()
	if both.bio.Virus.Value ~= nil then
		if both.bio.Virus.Value.Name == "Biologic" then
			both.bio.BrickColor = BrickColor.Random()
		else
			local colorVal = game.Lighting:FindFirstChild(both.bio.Virus.Value.Name .."C")
			if colorVal then
				both.bio.BrickColor = game.Lighting:FindFirstChild(both.bio.Virus.Value.Name .."C").Value
			else
				both.bio.BrickColor = BrickColor.Random()
			end
			
		end
	
	else
		both.bio.BrickColor = BrickColor.new("Medium stone grey")
	end
end)


tool.Activated:connect(function()
	if usable then
	if can then
	can = false
	Inject.Sound:Play()
	tween(weld,{C1 =weld.C1 * CFrame.new(2,0,0.2)},0.5)
	wait(0.7)
		tween(weld,{C1 =weld.C1 * CFrame.new(-2,0,-0.2)},0.5)
		wait(1)
		
		can = true
	
	end
	end
end)







both.Hit.Touched:connect(function(hit)
	if usable then
		if can == false then if hit.Parent:FindFirstChildOfClass("Humanoid") then if hit.Name ~= "HumanoidRootPart" and hit.Anchored == false and not hit:IsDescendantOf(workspace.IgnoreParts) then	
					--if not game.Players:FindFirstChild(hit.Parent.Name) then
					if not tool:GetAttribute("InjectPlayers") then
						if game.Players:GetPlayerFromCharacter(hit.Parent) then
							return
						end
					end

					local huma = hit.Parent:FindFirstChildOfClass("Humanoid")
					if (both.bio.Position - hit.Position).Magnitude < 1 then
						usable = false
						--hit.Parent.Humanoid:TakeDamage(6)
						local tos = Inject.CFrame:toObjectSpace(hit.CFrame)
						local new = both:Clone()
						new.metal.Weld:Remove()
						new.Parent = hit
						local we = Instance.new("Weld",new.metal)
						we.Part0 = new.metal
						we.Part1 = hit
						we.C1 = tos:inverse()

						new.metal.CanCollide = true
						new.bio.CanCollide = true
						Inject.Transparency = 1
						both.bio.Transparency = 1


						local sond = Instance.new("Sound",hit)
						sond.SoundId = "rbxassetid://1306077413"
						sond:Play()
						sond.PlaybackSpeed = 2
						sond.Volume = 2
						wait()
						local sond = Instance.new("Sound",hit)
						sond.SoundId = "rbxassetid://1751518775"
						sond:Play()
						sond.PlaybackSpeed = math.random(6,10)*0.1
						sond.Volume = 1
						if new.bio.Virus.Value ~= nil then
							local virus =  new.bio.Virus.Value:Clone()

							virus.Parent = hit.Parent	
							virus.Name = "Kamelia100"
						end

						--wait(3)
						local viruses = {}
						for i,v in next,game.Lighting:GetChildren() do
							if v:IsA('Script') and not v:IsA('LocalScript') then
								table.insert(viruses,v)
							end
						end
						
						local randV = viruses[math.random(1,#viruses)]
						print('INJECTED VIRUS: ',randV)
						both.bio.Virus.Value = randV
						usable = true
						Inject.Transparency = 0
						both.bio.Transparency = 0.5
					end
				end
			end
		end
	end
end)

Despite the vocabulary used I dont think this is malicious, but it seems like it would only work with 3rd party purchases enabled (if the passes arent yours).

Its a pretty poorly written script and I would advise making your own instead

2 Likes

Doesn’t insert any external scripts or anything, viruses/injections look like they’re for some ro-bio type game.

1 Like

it seems safe taking a look at the code but I would recommend hiring a scripter because the script is not written well

Anything involving prompting players into buying gamepasses, shirts, etc etc is very suspicious.
I’m 100% confident almost all virus scripts have something to do with using require()
You could do CTRL + F to see if a script has the word “require” not all scripts with require are viruses however so I recommend checking the ModuleScript itself.
If the require uses an id it’s definitely a red flag. (again however, may not be a virus)
For instance, 123 could be an id to a modulescript that gives someone abusive admin commands in the game.

local MODULE = require(123)

i would copy and paste the id and get the model to check and see what it does.

Also search getfenv as it can be used like getfenv()[string.reverse('eriuqer')](1234) instead of just require(1234)