local function K()local K={}table.insert(K,Vector3.new(0,50,0))local D=K[math.random(#K)]Camera.CameraType=Enum.CameraType.Scriptable Camera.Focus=CFrame.new(D)local O=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 K=D+Vector3.new(50*math.cos(O),20,50*math.sin(O))Camera.CoordinateFrame=CFrame.new(K,D)O=O+math.rad(.25)if BlurBlock then BlurBlock.CFrame=Camera.CoordinateFrame+Camera.CoordinateFrame:vectorToWorldSpace(Vector3.new(0,0,-2))end end)ScreenGui.ScoreFrame["\066\114\105\103\104\116 \098\108\117\101"].Visible=false ScreenGui.ScoreFrame["\066\114\105\103\104\116 \114\101\100"].Visible=false end local function D()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 if IsTeams then ScreenGui.ScoreFrame["\066\114\105\103\104\116 \098\108\117\101"].Visible=true ScreenGui.ScoreFrame["\066\114\105\103\104\116 \114\101\100"].Visible=true end end local function O(O)if O and not InIntermission then InIntermission=true K()end if not O and InIntermission then InIntermission=false D()end end local function r(K)BlurBlock=K BlurBlock.LocalTransparencyModifier=0 end local function l(K,D)if K=="\084\069\065\077\083"then IsTeams=D ScreenGui.ScoreFrame["\066\114\105\103\104\116 \098\108\117\101"].Visible=IsTeams ScreenGui.ScoreFrame["\066\114\105\103\104\116 \114\101\100"].Visible=IsTeams end end
-- Local Functions
local function StartIntermission()
	-- Default to circle center of map
	local possiblePoints = {}
	table.insert(possiblePoints, Vector3.new(0, 50, 0))

	local focalPoint = possiblePoints[math.random(#possiblePoints)]
	Camera.CameraType = Enum.CameraType.Scriptable
	Camera.Focus = CFrame.new(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)

		if BlurBlock then
			BlurBlock.CFrame = Camera.CoordinateFrame + Camera.CoordinateFrame:vectorToWorldSpace(Vector3.new(0, 0, -2))
		end
	end)

	ScreenGui.ScoreFrame["Bright blue"].Visible = false
	ScreenGui.ScoreFrame["Bright red"].Visible = false
end

local function StopIntermission()
	game.Lighting.Blur.Enabled = false
	RunService:UnbindFromRenderStep("IntermissionRotate")
	Camera.CameraType = Enum.CameraType.Custom
	if IsTeams then
		ScreenGui.ScoreFrame["Bright blue"].Visible = true
		ScreenGui.ScoreFrame["Bright red"].Visible = true
	end
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

local function OnSetBlurBlock(block)
	BlurBlock = block
	BlurBlock.LocalTransparencyModifier = 0
end

local function OnFetchConfiguration(configFetched, configValue)
	if configFetched == "TEAMS" then
		IsTeams = configValue
		ScreenGui.ScoreFrame["Bright blue"].Visible = IsTeams
		ScreenGui.ScoreFrame["Bright red"].Visible = IsTeams
	end
end
