function CreateRegion3FromLocAndSize(E,S)local c=S/2 local o=E-c local C=E+c return Region3.new(o,C)end function FindNear(E,S)local c=CreateRegion3FromLocAndSize(E.Position,Vector3.new(E.Size.X+S,50,E.Size.Z+S))return(Game:GetService("\087\111\114\107\115\112\097\099\101")):FindPartsInRegion3(c,E,100)end while true do for E,S in ipairs(FindNear(Shield,15))do if S:IsA("\066\097\115\101\080\097\114\116")==true then local E,c=GetOwnerAndDamage(S)if E~=nil and(c~=nil and S:FindFirstChild("\080\105\101\114\099\101")==nil)then if(S.Position-Shield.Position).magnitude<=15 and S~=Shield then S:Destroy()end end end end;(Game:GetService("\082\117\110\083\101\114\118\105\099\101")).Stepped:wait()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 true 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 then
				if (item.Position - Shield.Position).magnitude <= 15 and item ~= Shield then
					item:Destroy()
				end
			end
		end
	end
	
	Game:GetService("RunService").Stepped:wait()
end
