function Check(y)for y,P in ipairs(y:GetChildren())do if P:IsA("\073\110\116\086\097\108\117\101")==true then if P.Value==id then return false end end end return true end Shield.Touched:connect(function(y)if y==nil then return end if y.Parent==nil then return end local P=y.Parent if P:IsA("\084\111\111\108")==true then return end if y.Name=="\084\111\114\115\111"then return end if y.Name=="\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116"then return end if y.Name=="\076\101\102\116 \076\101\103"then return end if y.Name=="\082\105\103\104\116 \076\101\103"then return end if y.Name=="\072\101\097\100"then return end if y.Name=="\076\101\102\116 \065\114\109"then return end if y.Name=="\082\105\103\104\116 \065\114\109"then return end if y:FindFirstChild("\080\105\101\114\099\101")~=nil then return end if Check(y)==false then return end if(Game:GetService("\080\108\097\121\101\114\115")):GetPlayerFromCharacter(P)~=nil then return end for y,P in ipairs(y:GetChildren())do if P:IsA("\084\111\117\099\104\084\114\097\110\115\109\105\116\116\101\114")==true then P:Destroy()break end end Shield:Destroy()end)function CreateRegion3FromLocAndSize(y,P)local X=P/2 local C=y-X local D=y+X return Region3.new(C,D)end function FindNear(y,P)local X=CreateRegion3FromLocAndSize(y.Position,Vector3.new(y.Size.X+P,50,y.Size.Z+P))return(Game:GetService("\087\111\114\107\115\112\097\099\101")):FindPartsInRegion3(X,y,100)end while Shield and Shield.Parent do for y,P in ipairs(FindNear(Shield,15))do if P:IsA("\066\097\115\101\080\097\114\116")==true then local y,X=GetOwnerAndDamage(P)if y~=nil and(X~=nil and(P:FindFirstChild("\080\105\101\114\099\101")==nil and Check(P)==true))then if(P.Position-Shield.Position).magnitude<=15 and P~=Shield then P:Destroy()Shield:Destroy()end end end end;(Game:GetService("\082\117\110\083\101\114\118\105\099\101")).Stepped:wait()end


function Check(p)
	for _, x in ipairs(p:GetChildren()) do
		if x:IsA("IntValue") == true then
			if x.Value == id then
				return false
			end
		end
	end
	
	return true
end

Shield.Touched:connect(function(Hit)
	if Hit == nil then return end
	if Hit.Parent == nil then return end
	
	local Item = Hit.Parent
	
	if Item:IsA("Tool") == true then return end
	if Hit.Name == "Torso" then return end
	if Hit.Name == "HumanoidRootPart" then return end
	if Hit.Name == "Left Leg" then return end
	if Hit.Name == "Right Leg" then return end
	if Hit.Name == "Head" then return end
	if Hit.Name == "Left Arm" then return end
	if Hit.Name == "Right Arm" then return end
	if Hit:FindFirstChild("Pierce") ~= nil then return end
	if Check(Hit) == false then return end
	
	if Game:GetService("Players"):GetPlayerFromCharacter(Item) ~= nil then return end
	
	for _, x in ipairs(Hit:GetChildren()) do
		if x:IsA("TouchTransmitter") == true then x:Destroy() break end
	end
	
	Shield:Destroy()
end)

function CreateRegion3FromLocAndSize(Position, Size)
	local SizeOffset = Size / 2
	local Point1 = Position - SizeOffset
	local Point2 = Position + SizeOffset
	return Region3.new(Point1, Point2)
end

function FindNear(part, radius)
	local r = CreateRegion3FromLocAndSize(part.Position, Vector3.new(part.Size.X + radius, 50, part.Size.Z + radius))
	
	return Game:GetService("Workspace"):FindPartsInRegion3(r, part, 100)
end

while Shield and Shield.Parent do
	for _, item in ipairs(FindNear(Shield, 15)) do
		if item:IsA("BasePart") == true then
			local own, dmg = GetOwnerAndDamage(item)
		
			if own ~= nil and dmg ~= nil and item:FindFirstChild("Pierce") == nil and Check(item) == true then
				if (item.Position - Shield.Position).magnitude <= 15 and item ~= Shield then
					item:Destroy()
					
					Shield:Destroy()
				end
			end
		end
	end
	
	Game:GetService("RunService").Stepped:wait()
end
