--[[
    Creates a touched event listener on specified part, that kills any humanoids that touch it
]]

return function(part)
	return part.Touched:Connect(
		function(hit)
			if hit and hit.Parent then
				local humanoid = hit.Parent:FindFirstChildOfClass("Humanoid")
				if humanoid then
					humanoid.Health = 0
				end
			end
		end
	)
end
