local function C()local C={}table.insert(C,Vector3.new(0,50,0))for h,g in ipairs(game.Workspace:GetChildren())do if g.Name=="\070\108\097\103\083\116\097\110\100"then table.insert(C,g.FlagStand.Position)end end local h=C[math.random(#C)]Camera.CameraType=Enum.CameraType.Scriptable Camera.Focus=CFrame.new(h)local g=0 Lighting.Blur.Enabled=true RunService:BindToRenderStep("\073\110\116\101\114\109\105\115\115\105\111\110\082\111\116\097\116\101",Enum.RenderPriority.Camera.Value,function()local C=h+Vector3.new(50*math.cos(g),20,50*math.sin(g))Camera.CoordinateFrame=CFrame.new(C,h)g=g+math.rad(.25)end)end local function h()Lighting.Blur.Enabled=false RunService:UnbindFromRenderStep("\073\110\116\101\114\109\105\115\115\105\111\110\082\111\116\097\116\101")Camera.CameraType=Enum.CameraType.Custom end local function g(g)if g and not InIntermission then InIntermission=true C()end if not g and InIntermission then InIntermission=false h()end end
-- Local Functions

local function StartIntermission()
	-- Find flag to circle. Default to circle center of map
	local possiblePoints = {}
	table.insert(possiblePoints, Vector3.new(0, 50, 0))

	for _, child in ipairs(game.Workspace:GetChildren()) do
		if child.Name == "FlagStand" then
			table.insert(possiblePoints, child.FlagStand.Position)
		end
	end

	local focalPoint = possiblePoints[math.random(#possiblePoints)]
	Camera.CameraType = Enum.CameraType.Scriptable
	Camera.Focus = CFrame.new(focalPoint)

	local angle = 0
	Lighting.Blur.Enabled = true
	RunService:BindToRenderStep("IntermissionRotate", Enum.RenderPriority.Camera.Value, function()
		local cameraPosition = focalPoint + Vector3.new(50 * math.cos(angle), 20, 50 * math.sin(angle))
		Camera.CoordinateFrame = CFrame.new(cameraPosition, focalPoint)
		angle = angle + math.rad(0.25)
	end)
end

local function StopIntermission()
	Lighting.Blur.Enabled = false
	RunService:UnbindFromRenderStep("IntermissionRotate")
	Camera.CameraType = Enum.CameraType.Custom
end

local function OnDisplayIntermission(display)
	if display and not InIntermission then
		InIntermission = true
		StartIntermission()
	end
	if not display and InIntermission then
		InIntermission = false
		StopIntermission()
	end
end
