for o=1,30,1 do local V=offset+Vector3.new(0,yOffset*(o-1),0)local q=Ray.new(point1,V)acceptable=false while not acceptable do hit,position=workspace:FindPartOnRayWithIgnoreList(q,ignoreList)if hit then if hit.Name=="\070\097\107\101\084\114\097\099\107"or hit.Name=="\070\108\097\115\104"then ignoreList[#ignoreList+1]=hit else acceptable=true end else acceptable=true end end local J=(position-point1).magnitude round.Size=Vector3.new(.6,J,.6)round.CFrame=(CFrame.new(position,point1)*CFrame.new(0,0,-J/2))*CFrame.Angles(math.rad(90),0,0)round.Parent=Workspace point1=point1+V allied=false if hit and hit.Parent then if hit.Parent.Parent then tank=hit.Parent.Parent:findFirstChild("\084\097\110\107")if not tank and hit.Parent.Parent.Parent then tank=hit.Parent.Parent.Parent:findFirstChild("\084\097\110\107")if not tank and hit.Parent.Parent.Parent.Parent then local o=hit.Parent.Parent.Parent.Parent:findFirstChild("\084\097\110\107")if not o and hit.Parent.Parent.Parent.Parent.Parent then local o=hit.Parent.Parent.Parent.Parent.Parent:findFirstChild("\084\097\110\107")end end end end if tank then if tank.Value==BrickColor.new("\066\114\105\103\104\116 \114\101\100")then allied=true end end if not allied then round:remove()local o=Instance.new("\069\120\112\108\111\115\105\111\110")o.BlastRadius=4 o.BlastPressure=1700 o.ExplosionType=Enum.ExplosionType.NoCraters o.DestroyJointRadiusPercent=1.3 o.Position=position o.Parent=Workspace local q=(CFrame.new(point1,point1+V)-point1)+position for o=1,360,40 do ray(o,1.5,q)ray(o,3,q)end round:remove()break elseif hit and allied then round:remove()break end end wait()end if round then round:remove()end script:remove()
--Loop For Making Rays For The Bullet's Trajectory
for i = 1, 30 do
	--print("Travelling")
	local thisOffset = offset + Vector3.new(0, yOffset * (i - 1), 0)
	local travelRay = Ray.new(point1, thisOffset)

	acceptable = false
	while not acceptable do
		hit, position = workspace:FindPartOnRayWithIgnoreList(travelRay, ignoreList)
		if hit then
			--print(hit.Name)
			if hit.Name == "FakeTrack" or hit.Name == "Flash" then
				ignoreList[#ignoreList + 1] = hit
				--print("Un-Acceptable")
			else
				--print("Acceptable")
				acceptable = true
			end
		else
			--print("Acceptable")
			acceptable = true
		end
	end

	local distance = (position - point1).magnitude
	round.Size = Vector3.new(0.6, distance, 0.6)
	round.CFrame = CFrame.new(position, point1) * CFrame.new(0, 0, -distance / 2) * CFrame.Angles(math.rad(90), 0, 0)
	round.Parent = Workspace
	point1 = point1 + thisOffset

	allied = false
	if hit and hit.Parent then --if we hit something
		--print("Bullet Hit Something")

		if hit.Parent.Parent then --look if what we hit is a tank
			tank = hit.Parent.Parent:findFirstChild("Tank")

			if not tank and hit.Parent.Parent.Parent then
				tank = hit.Parent.Parent.Parent:findFirstChild("Tank")

				if not tank and hit.Parent.Parent.Parent.Parent then
					local tank = hit.Parent.Parent.Parent.Parent:findFirstChild("Tank")

					if not tank and hit.Parent.Parent.Parent.Parent.Parent then
						local tank = hit.Parent.Parent.Parent.Parent.Parent:findFirstChild("Tank")
					end
				end
			end
		end

		if tank then --if it is a tank
			--print("Hit a Tank")
			if tank.Value == BrickColor.new("Bright red") then --if we hit an ally
				allied = true
				--print("Tank is an ally")
			end
		end

		if not allied then
			round:remove()
			local e = Instance.new("Explosion")
			e.BlastRadius = 4
			e.BlastPressure = 1700
			e.ExplosionType = Enum.ExplosionType.NoCraters
			e.DestroyJointRadiusPercent = 1.3
			e.Position = position
			e.Parent = Workspace
			local impactPos = CFrame.new(point1, point1 + thisOffset) - point1 + position
			for angle = 1, 360, 40 do
				ray(angle, 1.5, impactPos)
				ray(angle, 3, impactPos)
				--wait()
			end
			round:remove()
			break
		elseif hit and allied then
			round:remove()
			break
		end
	end
	wait()
end

if round then
	round:remove()
end

script:remove()
