local function s()local s={}local P=game.Workspace:WaitForChild("\070\108\097\103\083\116\097\110\100")if not P then table.insert(s,Vector3.new(0,50,0))else for P,m in ipairs(game.Workspace:GetChildren())do if m.Name=="\070\108\097\103\083\116\097\110\100"then table.insert(s,m.FlagStand.Position)end end end local m=s[math.random(#s)]Camera.CameraType=Enum.CameraType.Scriptable Camera.Focus=CFrame.new(m)Player:RequestStreamAroundAsync(m)local T=0 game.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 s=m+Vector3.new(50*math.cos(T),20,50*math.sin(T))Camera.CoordinateFrame=CFrame.new(s,m)T=T+math.rad(.25)end)end local function P()game.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 m(m)if m and not InIntermission then InIntermission=true s()end if not m and InIntermission then InIntermission=false P()end end
-- Local Functions

local function StartIntermission()
	local possiblePoints = {}

	-- Wait for a flag to circle around.
	local flagstand = game.Workspace:WaitForChild("FlagStand")

	-- If no flags were present, use the center of the map as the focal point.
	if not flagstand then
		table.insert(possiblePoints, Vector3.new(0, 50, 0))
	else
		for _, child in ipairs(game.Workspace:GetChildren()) do
			if child.Name == "FlagStand" then
				table.insert(possiblePoints, child.FlagStand.Position)
			end
		end
	end

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

	-- Stream in the area around the focal point.
	Player:RequestStreamAroundAsync(focalPoint)

	local angle = 0
	game.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()
	game.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
