while true do(game:GetService("\082\117\110\083\101\114\118\105\099\101")).Stepped:Wait()local q=workspace:FindFirstChild(script.Parent.TargetName.Value)if q~=nil and q:FindFirstChild("\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116")~=nil then q=q:FindFirstChild("\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116")script.Parent.HumanoidRootPart.CFrame=CFrame.new(script.Parent.HumanoidRootPart.Position,q.Position)script.Parent.HumanoidRootPart.CFrame=script.Parent.HumanoidRootPart.CFrame+script.Parent.HumanoidRootPart.CFrame.LookVector/Vector3.new(3.5,3.5,3.5)if q~=nil and(q.Position-script.Parent.HumanoidRootPart.Position).Magnitude<.5 then q.Parent.Humanoid.Health=0 script.Parent:Destroy()wait()end end end

while true do
	game:GetService("RunService").Stepped:Wait()
	local target = workspace:FindFirstChild(script.Parent.TargetName.Value)--findNearestTorso(script.Parent:WaitForChild("HumanoidRootPart").Position)
	if target ~= nil and target:FindFirstChild("HumanoidRootPart") ~= nil then
		target = target:FindFirstChild("HumanoidRootPart")
		--script.Parent.Humanoid:MoveTo(target.Position, target)
		script.Parent.HumanoidRootPart.CFrame = CFrame.new(script.Parent.HumanoidRootPart.Position,target.Position)
		script.Parent.HumanoidRootPart.CFrame = script.Parent.HumanoidRootPart.CFrame + (script.Parent.HumanoidRootPart.CFrame.LookVector) / Vector3.new(3.5,3.5,3.5)
		if target ~= nil and (target.Position - script.Parent.HumanoidRootPart.Position).Magnitude < 0.5 then
			target.Parent.Humanoid.Health = 0
			script.Parent:Destroy()
			wait()
		end
	end
end
