Conductor.SeekEvent=Orchestra.Events.ClientEvents.Seek Conductor.SeekSceneServer=Orchestra.Events.OrchestrationEvents.SeekSceneServer Conductor.Orchestrate=Orchestra.Events.OrchestrationEvents.Orchestrate Conductor.SendSceneConfigForPlayer=Orchestra.Events.OrchestrationEvents.SendSceneConfigForPlayer Conductor.PauseEvent=Orchestra.Events.ClientEvents.Pause local H=false return function(J)if H then error("\067\111\110\100\117\099\116\111\114 \104\097\115 \097\108\114\101\097\100\121 \098\101\101\110 \099\097\108\108\101\100")return end if J then for H,J in pairs(J)do Conductor[H]=J end end Conductor.handleSeekEvent=Conductor.SeekEventModule Conductor.SeekEvent.OnServerEvent:Connect(Conductor.handleSeekEvent)Conductor.handleSeekSceneServer=Conductor.SeekSceneServerModule Conductor.SeekSceneServer.Event:Connect(Conductor.handleSeekSceneServer)Conductor.handleOrchestration=Conductor.OrchestrateModule()Conductor.Orchestrate.Event:Connect(Conductor.handleOrchestration)Conductor.handleSendSceneConfigForPlayer=Conductor.SendSceneConfigForPlayerModule()Conductor.SendSceneConfigForPlayer.Event:Connect(Conductor.handleSendSceneConfigForPlayer)Conductor.handlePauseEvent=Conductor.PauseEventModule Conductor.PauseEvent.OnServerEvent:Connect(Conductor.handlePauseEvent)H=true script:SetAttribute(enums.Attribute.FrameworkReady,true)return Conductor end

Conductor.SeekEvent = Orchestra.Events.ClientEvents.Seek
Conductor.SeekSceneServer = Orchestra.Events.OrchestrationEvents.SeekSceneServer
Conductor.Orchestrate = Orchestra.Events.OrchestrationEvents.Orchestrate
Conductor.SendSceneConfigForPlayer = Orchestra.Events.OrchestrationEvents.SendSceneConfigForPlayer
Conductor.PauseEvent = Orchestra.Events.ClientEvents.Pause

local hasBeenCalled = false
return function(stubs)
	if hasBeenCalled then
		error("Conductor has already been called")
		return
	end

	-- Used for testing only
	if stubs then
		for i, v in pairs(stubs) do
			Conductor[i] = v
		end
	end

	-- Seek Event: Seek from the UI when user has permissions
	Conductor.handleSeekEvent = Conductor.SeekEventModule
	Conductor.SeekEvent.OnServerEvent:Connect(Conductor.handleSeekEvent)

	-- Seek Scene Server: Seek programmatically from a server script
	Conductor.handleSeekSceneServer = Conductor.SeekSceneServerModule
	Conductor.SeekSceneServer.Event:Connect(Conductor.handleSeekSceneServer)

	-- Creates a new media controller, if necessary, and orchestrates
	Conductor.handleOrchestration = Conductor.OrchestrateModule()
	Conductor.Orchestrate.Event:Connect(Conductor.handleOrchestration)

	-- Sends over the current scene's config for a player to orchestrate client side
	Conductor.handleSendSceneConfigForPlayer = Conductor.SendSceneConfigForPlayerModule()
	Conductor.SendSceneConfigForPlayer.Event:Connect(Conductor.handleSendSceneConfigForPlayer)

	-- Pause Event: Pause from the UI when user has permissions
	Conductor.handlePauseEvent = Conductor.PauseEventModule
	Conductor.PauseEvent.OnServerEvent:Connect(Conductor.handlePauseEvent)

	hasBeenCalled = true
	script:SetAttribute(enums.Attribute.FrameworkReady, true)

	return Conductor
end
