function Receive(A,J,...)local X={...}if A==User and J=="\112\108\097\121"then Connector:FireAllClients("\112\108\097\121",User,X[1],Settings.SoundSource.Position,Settings.PianoSoundRange,A,X[2],Settings.IsCustom,Settings.Length)HighlightPianoKey(X[1]>61 and 61 or X[1]<1 and 1 or X[1],X[3])elseif A==User and J=="\097\098\111\114\116"then Deactivate()if SeatWeld then SeatWeld:remove()end end end function Activate(A)Connector:FireClient(A,"\097\099\116\105\118\097\116\101",Settings.CameraCFrame,Settings.PianoSounds,true)User=A end function Deactivate()if User and User.Parent then Connector:FireClient(User,"\100\101\097\099\116\105\118\097\116\101")User.Character:SetPrimaryPartCFrame(Box.CFrame+Vector3.new(0,5,0))end User=nil end


function Receive(player, action, ...)
	local args = {...}
	if player == User and action == "play" then
		Connector:FireAllClients("play", User, args[1], Settings.SoundSource.Position, Settings.PianoSoundRange, player, args[2], Settings.IsCustom,Settings.Length)
		HighlightPianoKey((args[1] > 61 and 61) or (args[1] < 1 and 1) or args[1],args[3])
	elseif player == User and action == "abort" then
		Deactivate()
		if SeatWeld then
			SeatWeld:remove()
		end
	end
end

function Activate(player)
	Connector:FireClient(player, "activate", Settings.CameraCFrame, Settings.PianoSounds, true)
	User = player
end

function Deactivate()
	if User and User.Parent then
		Connector:FireClient(User, "deactivate")
		User.Character:SetPrimaryPartCFrame(Box.CFrame + Vector3.new(0, 5, 0))
	end
	User = nil
end
