local function zReVAC2_CheckDrops(zombie)

	if not zombie:getOutfitName() then return false end
	local outfit = tostring(zombie:getOutfitName());
	local inv = zombie:getInventory();
	if outfit == "zReVAC2_ZombieECO1" or outfit == "zReVAC2_ZombieECO2" then

		----------------------------
		-- PIZDEC RANDOMIZER v40k --
		----------------------------
		-------- by kERHUS ---------
		----------------------------
		
		-- VHS Cassete
		local myVHS = inv:AddItem("Base.VHS_Retail")
		myVHS:setRecordedMediaData(getZomboidRadio():getRecordedMedia():getMediaData("18271e35-d316-47c1-ae05-eda2fa515b01"));

		-- Vaccine 1 lvl spawn chance
		local zReDefaultVaccine = SandboxVars.zReV2.DefaultVaccineSpawnChance
		if zReDefaultVaccine > ZombRand(100) then
			inv:AddItems("LabItems.CmpSyringeWithPlainVaccine", 1);
		end


		-- Scalpel OR Tweezers --
		local zReScalpelTweezers = SandboxVars.zReV2.ScalpelTweezersSpawnChance
		if zReScalpelTweezers > ZombRand(100) then
			local zReRandStuffSAT = ZombRand(1, 5)
			if zReRandStuffSAT == 1 then
				inv:AddItems("Base.Scalpel", 1);
				inv:AddItems("Base.Tweezers", 1);
			 elseif zReRandStuffSAT == 2 then
				inv:AddItems("Base.Tweezers", 1);
			 else
				inv:AddItems("Base.Scalpel", 1);
			end
		end


		-- Tube or Syrenge or Flask --
		local zReTubeOrSyringeOrFlask = SandboxVars.zReV2.TubeOrSyringeOrFlaskSpawnChance
		if zReTubeOrSyringeOrFlask > ZombRand(100) then
			local zReRandStuffTOROF = ZombRand(1, 101)
			if 5 >= zReRandStuffTOROF then			-- packs 5%
				local zReRandStuffTOROFPack = ZombRand(1, 96)
				if 5 >= zReRandStuffTOROFPack then
					inv:AddItems("LabItems.LabSyringePack", 1);
					inv:AddItems("LabItems.LabTestTubePack", 1);
					inv:AddItems("LabItems.LabFlaskPack", 1);
				 elseif 15 >= zReRandStuffTOROFPack then
					inv:AddItems("LabItems.LabSyringePack", 1);
					inv:AddItems("LabItems.LabTestTubePack", 1);
				 elseif 25 >= zReRandStuffTOROFPack then
					inv:AddItems("LabItems.LabSyringePack", 1);
					inv:AddItems("LabItems.LabFlaskPack", 1);
				 elseif 35 >= zReRandStuffTOROFPack then
					inv:AddItems("LabItems.LabTestTubePack", 1);
					inv:AddItems("LabItems.LabFlaskPack", 1);
				 elseif 55 >= zReRandStuffTOROFPack then
					inv:AddItems("LabItems.LabSyringePack", 1);
				 elseif 75 >= zReRandStuffTOROFPack then
					inv:AddItems("LabItems.LabTestTubePack", 1);
				 else	-- 95
					inv:AddItems("LabItems.LabFlaskPack", 1);
				end
			 elseif 25 <= zReRandStuffTOROF then	-- clean 20%
				local zReRandStuffTOROFClean = ZombRand(1, 96)
				if 5 >= zReRandStuffTOROFClean then
					inv:AddItems("LabItems.LabSyringeReusable", 1);
					inv:AddItems("LabItems.LabTestTube", ZombRand(1, 5));
					inv:AddItems("LabItems.LabFlask", ZombRand(1, 4));
				 elseif 15 >= zReRandStuffTOROFClean then
					inv:AddItems("LabItems.LabSyringeReusable", 1);
					inv:AddItems("LabItems.LabTestTube", ZombRand(1, 5));
				 elseif 25 >= zReRandStuffTOROFClean then
					inv:AddItems("LabItems.LabSyringe", ZombRand(1, 5));
					inv:AddItems("LabItems.LabFlask", ZombRand(1, 4));
				 elseif 35 >= zReRandStuffTOROFClean then
					inv:AddItems("LabItems.LabTestTube", ZombRand(1, 5));
					inv:AddItems("LabItems.LabFlask", ZombRand(1, 4));
				 elseif 55 >= zReRandStuffTOROFClean then
					inv:AddItems("LabItems.LabSyringe", ZombRand(1, 5));
				 elseif 75 >= zReRandStuffTOROFClean then
					inv:AddItems("LabItems.LabTestTube", ZombRand(1, 5));
				 else	-- 95
					inv:AddItems("LabItems.LabFlask", ZombRand(1, 4));
				end
			 else									-- dirty 75%
				local zReRandStuffTOROFDirty = ZombRand(1, 96)
				if 5 >= zReRandStuffTOROFDirty then
					inv:AddItems("LabItems.LabSyringeReusableUsed", 1);
					inv:AddItems("LabItems.LabTestTubeDirty", ZombRand(1, 5));
					inv:AddItems("LabItems.LabFlaskDirty", ZombRand(1, 4));
				 elseif 15 >= zReRandStuffTOROFDirty then
					inv:AddItems("LabItems.LabSyringeReusableUsed", 1);
					inv:AddItems("LabItems.LabTestTubeDirty", ZombRand(1, 5));
				 elseif 25 >= zReRandStuffTOROFDirty then
					inv:AddItems("LabItems.LabSyringe", ZombRand(1, 5));
					inv:AddItems("LabItems.LabFlaskDirty", ZombRand(1, 4));
				 elseif 35 >= zReRandStuffTOROFDirty then
					inv:AddItems("LabItems.LabTestTubeDirty", ZombRand(1, 5));
					inv:AddItems("LabItems.LabFlaskDirty", ZombRand(1, 4));
				 elseif 55 >= zReRandStuffTOROFDirty then
					inv:AddItems("LabItems.LabSyringe", ZombRand(1, 5));
				 elseif 75 >= zReRandStuffTOROFDirty then
					inv:AddItems("LabItems.LabTestTubeDirty", ZombRand(1, 5));
				 else	-- 95
					inv:AddItems("LabItems.LabFlaskDirty", ZombRand(1, 4));
				end
			end
		end


		-- Tongs --
		local zReTongs = SandboxVars.zReV2.TongsSpawnChance
		if zReTongs > ZombRand(100) then
			inv:AddItems("Base.Tongs", 1);
		end


		-- BOOKS OR CHEMS -- 			101% падает что-то одно, либо книги, либо химоза
		if 50 > ZombRand(100) then		-- ЕСЛИ ВЫПАЛ ПУЛ КНИГ, ТО РАНДОМИТСЯ ТРИ КАТЕГОРИИ ПО 33%
			-- Book's --
			local books = ZombRand(100);
			if 33 > books then
				inv:AddItems("LabBooks.BkLaboratoryEquipment1", 1);
						inv:AddItems("LabBooks.BkLaboratoryEquipment3", 1);
			 elseif 66 > books then
				inv:AddItems("LabBooks.BkVirologyCourses1", 1);
				inv:AddItems("LabBooks.BkVirologyCourses2", 1);
			 else
				inv:AddItems("LabBooks.BkChemistryCourse", 1);
				inv:AddItems("LabBooks.BkLaboratoryEquipment2", 1);
			end
		  else
			-- Chemicals --
			local chems = ZombRand(1, 121);	-- ЕСЛИ ВЫПАЛ ПУЛ ХИМОЗЫ, РАНДОМИТСЯ 4 КАТЕГОРИИ ХИМОЗЫ
			if 10 >= chems then
				inv:AddItems("LabItems.ChAmmonia", 1);
				inv:AddItems("LabItems.ChHydrochloricAcidCan", 1);
			 elseif 20 >= chems then
				inv:AddItems("LabItems.ChSodiumHydroxideBag", 1);
				inv:AddItems("LabItems.ChSulfuricAcidCan", 1);
			 elseif 30 >= chems then
				inv:AddItems("LabItems.ChAmmonia", 1);
				inv:AddItems("LabItems.ChSodiumHydroxideBag", 1);
			 elseif 40 >= chems then
				inv:AddItems("LabItems.ChHydrochloricAcidCan", 1);
				inv:AddItems("LabItems.ChSulfuricAcidCan", 1);
			 elseif 60 >= chems then
				inv:AddItems("LabItems.ChAmmonia", 1);
				inv:AddItems("LabItems.ChAmmoniumChlorideBag", 1);
			 elseif 80 >= chems then
				inv:AddItems("LabItems.ChHydrochloricAcidCan", 1);
			 elseif 100 >= chems then
				inv:AddItems("LabItems.ChSodiumHydroxideBag", 1);
			 else	-- 120
				inv:AddItems("LabItems.ChSulfuricAcidCan", 1);
			end
		end


		
		inv:AddItems("LabItems.LabCorks", ZombRand(0,2));
		inv:AddItems("Base.Disinfectant", ZombRand(0,2));
		inv:AddItems("Base.AlcoholedCottonBalls", ZombRand(9));
		inv:AddItems("Base.CottonBalls", ZombRand(8,17));
	end
end

Events.OnZombieDead.Add(zReVAC2_CheckDrops);