local function c(f)if f and f~=Workspace then local V=f:FindFirstChild("\072\117\109\097\110\111\105\100")if V then return f,V else return c(f.Parent)end end return nil end local function f(f)if f then local V,Y=c(f.Parent)if Y and Y.Health>0 then(CreatorTag:Clone()).Parent=Y Y:TakeDamage(100)end end end local function V(c)if Rocket and c then if IGNORE_LIST[string.lower(c.Name)]then return end local V=CreatorTag.Value if V and(V.Character and V.Character:IsAncestorOf(c))then return end f(hitPart)local Y=Instance.new("\069\120\112\108\111\115\105\111\110")Y.BlastPressure=BLAST_PRESSURE Y.BlastRadius=BLAST_RADIUS Y.Position=Rocket.Position Y.Hit:connect(f)Y.Parent=Workspace script.Parent=Y CreatorTag.Parent=script Rocket:Destroy()end end

local function FindCharacterAncestor(subject)
	if subject and subject ~= Workspace then
		local humanoid = subject:FindFirstChild('Humanoid')
		if humanoid then
			return subject, humanoid
		else
			return FindCharacterAncestor(subject.Parent)
		end
	end
	return nil
end

local function OnExplosionHit(hitPart)
	if hitPart then
		local _, humanoid = FindCharacterAncestor(hitPart.Parent)
		if humanoid and humanoid.Health > 0 then
			CreatorTag:Clone().Parent=humanoid
			humanoid:TakeDamage(100)
		end
	end
end

local function OnTouched(otherPart)
	if Rocket and otherPart then
		-- Fly through anything in the ignore list
		if IGNORE_LIST[string.lower(otherPart.Name)] then
			return
		end

		-- Fly through the creator
		local myPlayer = CreatorTag.Value
		if myPlayer and myPlayer.Character and myPlayer.Character:IsAncestorOf(otherPart) then
			return
		end
		
		OnExplosionHit(hitPart)
		
		-- Boom
		local explosion = Instance.new('Explosion')
		explosion.BlastPressure = BLAST_PRESSURE
		explosion.BlastRadius = BLAST_RADIUS
		explosion.Position = Rocket.Position
		explosion.Hit:connect(OnExplosionHit)
		explosion.Parent = Workspace

		-- Move this script and the creator tag (so our custom logic can execute), then destroy the rocket
		script.Parent = explosion
		CreatorTag.Parent = script
		Rocket:Destroy()
	end
end
