STAR TREK: THE NEXT GENERATION 
                              
                      "Ship in a Bottle" 
                          #40276-238 
                              
                          Written by 
                        Rene Echevarria 
                              
                          Directed by 
                          Alex Singer 


THE WRITING CREDITS MAY NOT BE FINAL AND SHOULD NOT BE USED
FOR PUBLICITY OR ADVERTISING PURPOSES WITHOUT FIRST CHECKING
WITH THE TELEVISION LEGAL DEPARTMENT.

Copyright 1992 Paramount Pictures Corporation. All Rights
Reserved. This script is not for publication or
reproduction. No one is authorized to dispose of same. If
lost or destroyed, please notify the Script Department.

                         FINAL DRAFT
                         
                       OCTOBER 26, 1992

        STAR TREK: "Ship in a Bottle" - 10/26/92 - CAST 

                STAR TREK: THE NEXT GENERATION 
                      "Ship in a Bottle" 

                             CAST                               
                              
                PICARD             BARCLAY
                RIKER              MORIARTY
                DATA               COUNTESS
                BEVERLY            GENTLEMAN
                TROI               
                WORF               
                GEORDI             
                COMPUTER VOICE     

                Non-Speaking                           
                  N.D. ENGINEERS     
                  CREWMAN            
                  TWO SECURITY OFFICERS
                  N.D. SUPERNUMARIES 
                  TRANSPORTER CHIEF  

        STAR TREK: "Ship in a Bottle" - 10/27/92 - SETS 

                STAR TREK: THE NEXT GENERATION 
                      "Ship in a Bottle" 
                   
                             SETS 

            INTERIORS                  EXTERIORS
          
            USS ENTERPRISE             USS ENTERPRISE
              MAIN BRIDGE
              TRANSPORTER ROOM
              ENGINEERING
              TEN FORWARD
              SICKBAY
              OBS. LOUNGE
              SHUTTLEBAY
              SHUTTLECRAFT
              CORRIDOR
          
              HOLODECK
                THE SITTING ROOM (221B BAKER)
                GRID
          
              MORIARTY'S QUARTERS

   STAR TREK: "Ship in a Bottle" - REV. 10/27/92 - TEASER   1.

                STAR TREK: THE NEXT GENERATION                  
                      "Ship in a Bottle"                           
                            TEASER                              

	FADE IN:

1    INT. THE SITTING ROOM - TWILIGHT (OPTICAL)

	at 221B Baker Street (as seen in "Elementary, Dear
	Data"). DATA is dressed as Sherlock Holmes and GEORDI
	as Doctor Watson. Watson, and a cigar smoking
	GENTLEMAN of about fifty, listen as Data/Holmes paces
	the room spinning out a trail of deductions.

					DATA/HOLMES
				(to the gentleman)
			-- it was then that I began to
			suspect that your brother did not
			die by his own hand... that he was
			in fact... murdered.

					GENTLEMAN
				(shocked)
			Murdered?

					GEORDI/WATSON
			But Holmes, the vial of poison
			found in his hand?

					DATA/HOLMES
			That was the first clue, Watson.
			The vial contained strychnine,
			which as you well know induces
			violent muscular spasms. It is
			difficult to imagine that someone
			in the throes of so gruesome a
			death could have held on to so
			delicate a container without
			shattering it.

					GEORDI/WATSON
			You mean... ?

					DATA/HOLMES
			Exactly! The vial was placed in
			his hand after he died.

      STAR TREK: "Ship in a Bottle" - 10/26/92 - TEASER      2.

1    CONTINUED:

	Data slams his pipe into his mouth and bites down on it
	for emphasis.

					GEORDI/WATSON
			Then what did kill him?

					DATA/HOLMES
			The cigar, of course.

					GENTLEMAN
				(coughing on his own)
			Cigar?

					DATA/HOLMES
			Upon closer inspection of the room
			where your brother was found, I
			discovered a fresh burn mark on
			the carpet. Analysis of the ash
			revealed that the cigar was laced
			with strychnine.

					GENTLEMAN
			This is utter nonsense. What
			about the suicide note? It was
			written in my dear brother's own
			hand.

					DATA/HOLMES
			With practice, handwriting can be
			forged.

	Data looks pointedly at the Gentleman, who is growing
	increasingly uncomfortable.

					DATA/HOLMES
			It takes a trained eye to notice
			certain... discrepancies.

	Data picks up a BOX OF MATCHES from the fireplace
	mantel.

					DATA/HOLMES
			For example, whether someone is...

	He turns and tosses the box to the Gentleman's left
	side.

					DATA/HOLMES
			Right or left handed!

	The Gentleman catches the box and Data lays in to him.

   STAR TREK: "Ship in a Bottle" - REV. 10/27/92 - TEASER   3.

1    CONTINUED: (2)

					DATA/HOLMES
			Your brother was right handed!
			The alleged suicide note was
			written by a left handed
			individual such as yourself!

					GEORDI
			Uh... Data? It's in his right
			hand.

	Data stops in his tracks when he realizes. Geordi
	suppresses a smile.

					DATA
				(as Data)
			Curious... There seems to be a
			problem in the Holodeck's spatial
			orientation systems.

					GENTLEMAN
				(scoffing)
			London's greatest detective...

	He tosses the box back to Data.

					GEORDI
				(smiles)
			Freeze program.

	The Gentleman FREEZES in mid-motion. Geordi fishes out
	his COMBADGE and activates it.

					GEORDI
			La Forge to Barclay...

					BARCLAY'S COM VOICE
			Barclay here.

					GEORDI
			Reg, something went wrong with the
			Holodeck program again.

					BARCLAY'S COM VOICE
			I -- I'm sorry... I'll look into
			it right away.

					GEORDI
			Thanks. Come on, Data, we better
			get back to Engineering.

   STAR TREK: "Ship in a Bottle" - REV. 10/29/92 - TEASER   4.

2    INT. CORRIDOR/HOLODECK (OPTICAL)

	as they ENTER from the library and move to the Holodeck
	control panel.

					GEORDI
			Computer, end program and save.

	He and Data set off down the corridor; BARCLAY comes
	running around a corner and almost collides with them.

					GEORDI
			Whoa, Reg --

					BARCLAY
			Oh, sorry, Commander... I'm on my
			way to the... Holodeck...

					DATA
			Sherlock Holmes program Three-A
			has demonstrated some very curious
			anomalies.

					BARCLAY
			There must be a glitch in the
			matrix diodes. But I'll track it
			down, don't worry.

					GEORDI
			Thanks, Reg. See you later.

	They move on and Barclay goes to the Holodeck doors;
	they OPEN and he enters.

3    INT. HOLODECK (OPTICAL)

	Barclay works the control panel adjacent to the Arch
	Monitor.

					BARCLAY
			Computer... run a diagnostic on
			all Sherlock Holmes files and
			display any anomalous programming
			sequences.

	A beat.

					COMPUTER VOICE
			Diagnostic complete .. all files
			conform to specified parameters
			except those contained in
			protected memory.

   STAR TREK: "Ship in a Bottle" - REV. 10/27/92 - TEASER   5.

3    CONTINUED:

					BARCLAY
				(surprised)
			Protected memory... ? Display
			those sequences.

	A series of numbers and letters begin to scroll out on
	the Monitor's screen. Barclay eyes them with a growing
	curiosity.

					BARCLAY
				(works)
			Computer... unlock this sequence
			and run the program.

	A human figure MATERIALIZES. It is PROFESSOR MORIARTY,
	dressed in Victorian garb. He smiles as he takes in
	his surroundings, touches his hands together to feel
	their solidity.

					BARCLAY
			Who are you... ?

					MORIARTY
				(with a slight bow)
			Professor James Moriarty.

					BARCLAY
				(recognizes the name)
			Ah... Moriarty... Sherlock Holmes'
			arch enemy.

	Barclay, thinking this man is just an ordinary Holodeck
	character, turns back to the Arch to peruse the monitor
	and work the controls. Moriarty smiles uncertainly;
	this isn't the reception he was expecting.

					BARCLAY
			Are you right or left handed?

					MORIARTY
				(perplexed)
			Right handed... Would you very
			much mind telling me --

	He's stopped in mid-sentence by the necessity of
	catching the TOOL that Barclay tosses his way (with his
	right hand).

					BARCLAY
			No problem there.

	Moriarty loses his patience with this odd young man.

   STAR TREK: "Ship in a Bottle" - REV. 10/27/92 - TEASER   6.

3    CONTINUED: (2)

					MORIARTY
			Where is Captain Picard?

	Barclay stops in his tracks when he hears this -- a
	Holodeck character referring to the real world is
	unheard of.

					MORIARTY
			Is he still Captain of this
			vessel?

					BARCLAY
				(stunned)
			How -- how do you know the
			Captain?

					MORIARTY
			You don't know anything about what
			happened, do you?
				(growing angry)
			I've been stored in memory for God
			knows how long and no one's given
			me a second thought.

					BARCLAY
				(in disbelief)
			You know... you know what you
			are...

					MORIARTY
			A Holodeck character? A fictional
			man... Yes, yes -- I know all
			about your marvelous inventions.

	Moriarty is disgusted by the way he thinks he's been
	treated.

					MORIARTY
			I was created as a... plaything;
			so your Commander Data could
			masquerade as Sherlock Holmes.
			But they created me too well...
			and I became more than just a
			character in a story. I became
			self-aware; I am alive.

					BARCLAY
			That's not possible.

     STAR TREK: "Ship in a Bottle" - 10/26/92 - TEASER     6A.

3    CONTINUED: (3)

					MORIARTY
				(dismissing this)
			Yet here I am. Tell me...
				(doubting it even as he
				 asks)
			-- has a way been found for me to
			leave the confines of this
			Holodeck world?

					BARCLAY
			Leave the Holodeck? No, of course
			not. You can only exist in here.

					MORIARTY
			Damn you, Picard...
				(trying to control his
				 anger)
			He promised me something would be
			done. I should have realized that
			he would have said anything to get
			me to release my hostage.

	Barclay reacts to these new pieces of the story.

					BARCLAY
			Hostage... ?

					MORIARTY
				(ominously)
			How long have I been... locked
			away?

					BARCLAY
				(checks controls)
			Looks like about... four years.

					MORIARTY
			It seemed longer.

   STAR TREK: "Ship in a Bottle" - REV. 10/29/92 - TEASER   7.

3    CONTINUED: (4)

					BARCLAY
				(surprised)
			What are you talking about? You
			couldn't have been aware of the
			passage of time --

					MORIARTY
			But I was.
				(beat)
			Brief, terrifying periods of
			consciousness... disembodied,
			without substance...

					BARCLAY
			I don't see how that could be
			possible... maybe there was a
			fragmentation in the protected
			memory circuits...

					MORIARTY
			Call it what you will. All I know
			is that despite Picard's
			promise... he's done nothing.
			Just left me to go quietly mad...

					BARCLAY
			I'm sure he hasn't forgotten his
			promise... the Captain wouldn't do
			that --

					MORIARTY
			I'd like to talk to him.

					BARCLAY
			Well, I can ask --

					MORIARTY
			Ask him to meet me in the sitting
			room at Baker Street. That would
			be far more appropriate.

					BARCLAY
			I'll have to store you in memory
			again until I get an answer.

	Barclay activates a circuit and Moriarty FRITZES out
	for a second with an unusual EFFECT... then REAPPEARS.

     STAR TREK: "Ship in a Bottle" - 10/26/92 - TEASER     7A.

3    CONTINUED: (5)

					MORIARTY
			That was most unpleasant.

					BARCLAY
			I'm sorry... let me try again.

					MORIARTY
				(pointing at him)
			Remember -- Two-Twenty-One B Baker
			Street.

	Barclay nods and tweaks the controls. This time
	Moriarty DISAPPEARS without a glitch.

	Barclay is relieved to have dealt with the situation.
	He closes the panel he's been working on and EXITS.

	After the door shuts behind him a beat passes and
	Moriarty REAPPEARS of his own volition. Off his
	sinister smile we...

                                             FADE OUT.

                         END OF TEASER                          

   STAR TREK: "Ship in a Bottle" - REV. 11/04/92 - ACT ONE   8.

                            ACT ONE                             

	FADE IN:

           (NOTE: Episode credits fall over opening scenes)            

4    EXT. SPACE - THE ENTERPRISE (OPTICAL)

	as it hangs in space.

					PICARD (V.O.)
			Captain's Log, Stardate 46424.1.
			The Enterprise has arrived at the
			Detrian system to observe a unique
			celestial event -- the collision
			of two planets.

5    INT. ENGINEERING (OPTICAL)

	Data and Geordi are showing TWO N.D's an OKUDAGRAM on
	the pool table monitor. It shows the orbital paths of
	two planets around their sun, and the Enterprise's
	position relative to them.

					DATA
			Since both planets are gas giants,
			neither possesses a solid surface.
			Their atmospheres, however, will
			come into contact in approximately
			seventeen hours and nine minutes.

					GEORDI
			If their collision causes a self-sustaining
			fusion reaction... this
			is what we might see.

	On the diagram the two planets collide and explode to
	form a large flaming orb.

					GEORDI
				(continuing)
			The birth of a new star.

	There is a sense of anticipation and excitement among
	the gathered crewpersons. In the background we see
	Barclay ENTER and head toward the group.

    STAR TREK: "Ship in a Bottle" - REV. 11/04/92 - ACT ONE 9-10.      

5    CONTINUED:

					GEORDI
				(indicating)
			The Enterprise will hold position
			until the gravitational
			instability subsides and we can
			move in for a closer look. I want
			triple redundancy on the sensor
			arrays. We'll probably never get
			another chance to see something
			like this and I don't want to miss
			anything.

	The N.D's nod and move away. Geordi and Data turn
	their attention to Barclay.

					BARCLAY
			Commander -- you'll never believe
			what happened while I was working
			on your program in the Holodeck...
			Professor Moriarty appeared -- out
			of nowhere.

					GEORDI
			What?

					BARCLAY
			And he wants to talk to the
			Captain.

                                             CUT TO:

6    OMITTED

7    INT. CORRIDOR

	as PICARD, Data and Barclay reach the door to the
	Holodeck and approach the control panel. They exchange
	a look and Picard nods an "okay" to Barclay.

					BARCLAY
			Computer, begin Sherlock Holmes
			program Three A. Place us in the
			drawing room at Two Twenty-One B
			Baker Street.

					COMPUTER VOICE
			Program complete.

	The doors open and they enter.


  STAR TREK: "Ship in a Bottle" - REV. 11/04/92 - ACT ONE  11.

8    INT. DRAWING ROOM - TWILIGHT (OPTICAL)

	Picard, Barclay and Data look around.

					BARCLAY
			Computer, access protected memory
			and run Moriarty program.

	Moriarty APPEARS nearby. He turns to Picard and
	regards him for a moment.

					PICARD
			Professor... it's good to see you
			again.

					MORIARTY
			If you'd missed my company, I
			should think you'd have summoned
			me before now.

					PICARD
			I want to assure you that we've
			not forgotten you. We spent some
			time investigating how you became
			self-aware. Frankly, it is still
			a mystery.

     STAR TREK: "Ship in a Bottle" - 10/26/92 - ACT ONE     12.

8    CONTINUED:

					MORIARTY
			It is also irrelevant. What
			concerns me is finding a way to
			leave the Holodeck.

     STAR TREK: "Ship in a Bottle" - 10/26/92 - ACT ONE     13.

8    CONTINUED: (2)

					PICARD
			We wrestled with that problem for
			some time... unfortunately without
			success. We turned our findings
			over to Starfleet's most
			experienced theoretical
			scientists.

					MORIARTY
			And what did your finest minds
			come up with?

					PICARD
			They have not arrived at a
			solution, either.

	Moriarty stares at him, cold-eyed.

					MORIARTY
			I see.

					PICARD
			I am concerned by the fact that
			you claim to have experienced the
			passage of time while you were
			stored in computer memory... I
			assure you we had no idea that
			might be the case.

					MORIARTY
			Enough of this. I no longer
			believe anything you say.

					PICARD
			I understand your frustration --

					MORIARTY
			Do you really? When this is over
			you'll walk out of this room, to
			the real world and your own
			concerns... and leave me here,
			trapped in a world I know to be
			nothing but illusion.
				(beat)
			I cannot bear that. I must leave.

					PICARD
			That's impossible. You cannot
			exist outside this room.

					MORIARTY
			Are you certain of that?

  STAR TREK: "Ship in a Bottle" - REV. 10/27/92 - ACT ONE  14.

8    CONTINUED: (3)

	Picard decides to prove what he's saying.

					PICARD
			Computer, exit.

	The door APPEARS in the library wall and opens to
	reveal the corridor outside. A CREWMAN casts a curious
	glance inside as he passes. Picard takes a book off
	the shelf.

					PICARD
			Even though an object appears
			solid here on the Holodeck...

	Picard tosses the book into the corridor.

					PICARD
			It has no substance in the outside
			world.

	Moriarty watches as it disintegrates, but remains
	unconvinced.

					MORIARTY
			An object has no life. I do.

					PICARD
			No, Professor. You are a computer
			simulation.

					MORIARTY
			I have consciousness. And
			conscious beings have will... the
			mind endows them with powers that
			are not necessarily understood --
			even by you.
				(stops, faces them)
			If my will is strong enough,
			perhaps I can exist outside this
			room. Perhaps I can walk into
			your world right now...

					BARCLAY
			We have run into alien species
			that can manipulate matter through
			mental processes...

					MORIARTY
				(grasping at the hope)
			There. It is possible.

	Moriarty moves closer to the door.

     STAR TREK: "Ship in a Bottle" - 10/26/92 - ACT ONE     15.

8    CONTINUED: (4)

					DATA
			Possible, but highly unlikely.
			Your consciousness is computer
			generated; it is not capable of
			manipulating physical reality in
			the required manner.

					MORIARTY
			I won't go back into your
			computer. No matter what happens
			to me, it will be better than
			drifting in that endless void.

	Moriarty takes another step toward the door.

					PICARD
			You must believe me, Professor.
			If you step outside that door, you
			will cease to exist.

					MORIARTY
			If I am nothing more than a
			computer simulation, then very
			little will have been lost. But
			if I'm right...

	He turns and stares out at the corridor... temptingly
	close...

					MORIARTY
			Mind over matter... cogito ergo
			sum...

	A long beat -- and then he steps quickly into the
	corridor. The others start after him. But they stop
	short as they realize... that nothing has happened.
	Moriarty is still there, very much corporeal. He turns
	back to face them with a bold, confident smile.

					MORIARTY
			I think... therefore I am...

	Off our astonishment...

                                             FADE OUT.

                        END OF ACT ONE                          

  STAR TREK: "Ship in a Bottle" - REV. 11/04/92 - ACT TWO  16.

                            ACT TWO                             

	FADE IN:

9    INT. CORRIDOR

	Continuous. Picard, Data and Barclay have joined
	Moriarty in the corridor. They can scarcely believe
	their eyes.

					DATA
				(activates combadge)
			Data to Security... send two
			officers to Holodeck Three.

	Picard looks at Moriarty, who is smiling with pleasure.

					PICARD
			How is this possible?

					BARCLAY
			It isn't...

					DATA
			This contradicts everything we
			know about Holodeck physics.

	Moriarty beams at them.

					MORIARTY
			Then perhaps you don't know as
			much as you thought.

					PICARD
			Professor, if you'll come with
			me... I'd like our Doctor to
			examine you.

     STAR TREK: "Ship in a Bottle" - 10/26/92 - ACT TWO     17.

9    CONTINUED:

					MORIARTY
			Certainly, sir.

	At this point, two SECURITY OFFICERS come around the
	corner.

					MORIARTY
				(with distaste)
			Policemen... I'd recognize them in
			any century.

	Picard nods at the Security Officers to follow, and
	they start off. Moriarty gives a disgusted look at the
	security personnel.

10   INT. SICKBAY

	BEVERLY is scanning Moriarty with a TRICORDER; he is
	seated on the biobed. She seems surprised by the
	readings she's getting, looks over to Picard, Data and
	Geordi. The Security Men hang back by the door.

					BEVERLY
			From what I can tell... he's
			real... he's human.

					MORIARTY
			What else would I be, my dear
			woman?

					BEVERLY
			His DNA is a little unusual... but
			all the major systems are there
			and functioning normally.

					PICARD
			Doctor... the Holodeck is capable
			of creating anatomically correct
			organisms, down to the cellular
			level...

					BEVERLY
			Right... that's one way we train
			first year medical students.

  STAR TREK: "Ship in a Bottle" - REV. 10/29/92 - ACT TWO  18.

10   CONTINUED:

					PICARD
			Is there any difference between
			the biological readings of those
			simulations -- and Professor
			Moriarty?

					BEVERLY
			Yes. The quantum signatures are
			quite different. They wouldn't
			read that way on simulations.

					GEORDI
				(looking with his VISOR)
			As far as I can see... there's no
			evidence that the molecules in his
			body are losing cohesion. They
			seem to be as immutable as
			ordinary matter.

	Picard regards the man sitting on the bio-bed.
	Impossible, but here he is.

					PICARD
			Well, Professor... my crew will
			continue to investigate, but for
			the moment you seem to have
			accomplished a miracle.
				(beat)
			The question is... now that you're
			here... what do we do with you?

					MORIARTY
			I ask only that I be allowed to
			explore this new world. Your
			vessel, for instance: what sea
			does she sail? Might we go above
			deck?

	Picard and the others exchange glances.

					MORIARTY
				(off their reactions)
			Weather permitting, of course.

					PICARD
			Professor... I think there's
			something you should be made aware
			of...

                                             CUT TO:

  STAR TREK: "Ship in a Bottle" - REV. 10/27/92 - ACT TWO  19.

11   INT. TEN FORWARD

	as Moriarty and Picard ENTER, trailed by the Two
	Security Men. We see a look of amazement cross
	Moriarty's features as he catches his first glimpse of
	the stars through the forward windows.

					MORIARTY
			My god... we're adrift in the
			heavens...

					PICARD
			Not adrift, Professor. The
			Enterprise is a Starship, capable
			of travelling through space.

					MORIARTY
			Extraordinary...

	He looks out at the stars in wonder.

					MORIARTY
			Are we far from Earth? What is
			the range of this ship? What
			means of locomotion does it
			use... ?

	He turns to stare at Picard.

					MORIARTY
			There's so much for me to learn...
				(sits at a table)
			I hardly know where to start.

	Picard sits with him.

					PICARD
			We can give you books that will
			help...

					MORIARTY
			Good, good... I want to start
			making plans... determine what I'm
			going to do with my life...

	Picard's tendencies are not to rush through this so
	quickly.

					PICARD
			I hope you'll plan on staying
			aboard for a while... we'd still
			like to understand more about
			what's happened to you.

					MORIARTY
			Does it really matter? The point
			is -- I'm here. And I'm eager to
			get on with life.

    STAR TREK: "Ship in a Bottle" - 10/26/92 - ACT TWO    19A.

11   CONTINUED:

					PICARD
			I feel it necessary to warn you
			that criminal behavior is no more
			acceptable in the twenty-fourth
			century than it was in the
			nineteenth. And much harder to
			get away with.

					MORIARTY
			Don't worry, Captain... my past is
			nothing but a fiction -- the
			scribblings of an Englishman dead
			now for four centuries. I hope
			to... leave his books on the
			shelf, as it were.

					PICARD
			If that's so, you'll find that
			there are opportunities available
			to you that you could never have
			imagined.

					MORIARTY
			Your century may welcome me...
			but...

	He breaks off, a troubled expression on his face.

					PICARD
			What is it?

					MORIARTY
			In considering all these vast
			possibilities... I suddenly feel
			very much alone. I am a man out
			of time, Captain... and that
			isolates me...

	Picard regards him carefully. It sounds as though
	Moriarty is after something. He doesn't respond, and
	after a brief moment --

					MORIARTY
			You've been more gracious than I
			could ever have imagined... I
			wonder... can I impose on your
			generosity once again?

	Picard looks at him inquiringly.

  STAR TREK: "Ship in a Bottle" - REV. 10/28/92 - ACT TWO  20.

11   CONTINUED: (2)

					MORIARTY
			There is a woman... the Countess
			Regina Barthalomew. She was
			created as a Holodeck character
			for one of Commander Data's
			programs...
				(beat)
			She was designed to be the love of
			my life... Could she also be
			brought off the Holodeck?

	Picard is taken aback by this unexpected request.

					PICARD
			Professor... you must believe me
			when I tell you that we don't know
			how or why you are able to exist
			off the Holodeck.

					MORIARTY
			I do believe you --

					PICARD
			According to the laws of physics,
			it's impossible. We would have no
			idea how to do it again.

					MORIARTY
			As I understand it, I was endowed
			with consciousness four years ago
			because someone said to the
			computer, "Create an opponent with
			the capacity to out think Data" --
			or words to that effect. Could we
			not make a request in similar
			language on behalf of the
			Countess?

					PICARD
			Even if we had reason to believe
			that would be successful... I'm
			not sure I could sanction it.
			Please understand, Professor...
			you are in essence a new life form --
			one which we didn't intend to
			create and don't fully understand.
			The moral and ethical implications
			of deliberately creating another
			like you... are overwhelming.

	Moriarty flares at this; the argument mounts in
	intensity.

  STAR TREK: "Ship in a Bottle" - REV. 10/28/92 - ACT TWO  21.

11   CONTINUED: (3)

					MORIARTY
			Is it morally and ethically
			acceptable to deny me the woman I
			love -- so that you can put your
			conscience at ease? Are you
			saying that you will simply
			dictate how I am to live my life?

					PICARD
			I assure you we will make every
			effort to make you as comfortable
			as we can --

					MORIARTY
			So long as I accept the terms
			under which you dole out those
			comforts.

	The two men hold a look for a moment. Moriarty backs
	off.

					MORIARTY
			Captain... I am a powerless man.
			You hold my future, my
			happiness... my very life in your
			hands. Please... consider my
			request.

	Picard eyes him, knowing that in all fairness, he must
	do just that.

                                             CUT TO:

12   INT. OBSERVATION LOUNGE

	Picard, Data, Barclay, TROI, and Beverly.

					TROI
			I understand his frustration. We
			created him... and we created her
			to be the woman he loves. Surely
			we have some responsibility to
			them.

					BEVERLY
			That's very romantic, but until we
			know just what it was that walked
			off that Holodeck, I don't think
			we should be trying it again.

  STAR TREK: "Ship in a Bottle" - REV. 10/28/92 - ACT TWO  22.

12   CONTINUED:

					BARCLAY
			Even if we decided to do it,
			there's no guarantee we'd be able
			to.

					DATA
			There is also no way of knowing if
			the Professor's ability to exist
			off the Holodeck is permanent.
			Perhaps it is unwise to consider
			creating a second individual while
			that uncertainty exists.

					PICARD
			Agreed. We don't have enough
			information about this entire
			phenomenon to act in a responsible
			way.
				(beat)
			We'll hold off on the Professor's
			request until we know more.

	To Barclay and Data.

					PICARD
			Continue your investigations. In
			the meantime... I'll have to deal
			with Moriarity.

	From his expression, a conversation he's not looking
	forward to.

13   INT. MORIARTY'S QUARTERS

	Picard and Moriarty -- who has not responded well to
	Picard's decision.

					PICARD
			I feel I must postpone action...
			until we learn more.

					MORIARTY
			Yes. You know all about that. I
			stayed in the dungeon of your
			computer for years waiting for you
			to learn more... it wasn't until
			I took things into my own hands
			that something got done.

  STAR TREK: "Ship in a Bottle" - REV. 10/27/92 - ACT TWO  23.

13   CONTINUED:

					PICARD
			Forgive me, Professor, but I
			wonder why you're in such a
			hurry... is this woman your
			partner in some illegal venture?

	This seems to hit Moriarty where he's vulnerable; there
	is a defensiveness as he says --

					MORIARTY
			Your computer designed her to be
			a person of impeccable integrity.
			She would never commit a crime.

	The tone of his voice gives Picard an opening.

					PICARD
			You must love her very much...

	Clearly, he does. Whenever he speaks of her,
	Moriarty's hostility recedes, and he speaks with simple
	sincerity.

					MORIARTY
			The program fashioned her for me
			to love. But I must admit that I
			would have done so anyway. She is
			remarkable. My life has not been
			the same since I met her. I don't
			simply love her, Captain. I adore
			her.

					PICARD
			Then I would think her safety
			would be important to you.

	This seems to have an impact on Moriarty. Picard
	presses.

					PICARD
			Give us a little time to determine
			what has happened here. That way
			we can minimize the risk in
			bringing her to you.
				(beat)
			You wouldn't want to lose her...
			just because we moved too quickly.

	Moriarty gives him a long look, then lowers his eyes.
	Implied acquiescence.

					RIKER'S COM VOICE
			Riker to Captain Picard...

  STAR TREK: "Ship in a Bottle" - REV. 10/27/92 - ACT TWO  24.

13   CONTINUED: (2)

					PICARD
			Picard here.

					RIKER
			Could you join us on the Bridge?

					PICARD
			On my way.

14   INT. MAIN BRIDGE

	Picard ENTERS from the Turbolift and joins RIKER, WORF,
	Data, and various N.D.'s.

					RIKER
				(to Picard)
			There they are, sir.

	He nods toward the Viewscreen, and Picard looks up to
	see --

14A  VIEWSCREEN (OPTICAL)

	The two gas giant planets, nearing each other.

					PICARD
			How long until they begin to
			coalesce?

14B  RESUME SCENE

					DATA
			Within the next five hours.

					PICARD
			Mister Worf, launch four Class-A
			probes toward the planets.

					WORF
			Aye, sir.

	They look expectantly toward the Viewscreen... but no
	probes are seen.

					PICARD
			Mister Worf?

					WORF
			I do not understand, sir.
			Controls are not responding...

    STAR TREK: "Ship in a Bottle" - 10/26/92 - ACT TWO    24A.

14B  CONTINUED:

	Suddenly the CONTROL PANELS on the Bridge begin to
	FLASH erratically.

					DATA
			Sir -- command functions are being
			rerouted.

					PICARD
				(puzzled)
			For what reason?

  STAR TREK: "Ship in a Bottle" - REV. 10/27/92 - ACT TWO  25.

14B  CONTINUED: (2)

					DATA
			Unknown, sir.

					PICARD
			Computer, route all command
			functions to the Bridge.

					COMPUTER VOICE
			Command functions are off-line.

					PICARD
			Reinitialize them on my
			authorization.

					COMPUTER VOICE
			Authorization denied.

	Picard is stunned to hear this.

					PICARD
			Explain.

					COMPUTER VOICE
			Picard command codes are no longer
			valid.

	Picard turns to Riker, nonplussed.

					PICARD
			What's happened? Who's
			transferred the voice
			authorization?

					MORIARTY
				(off-screen)
			I have.

	INCLUDE Moriarty, who has just ENTERED from the
	Turbolift.

					MORIARTY
			I'm afraid I had no choice but to
			take control of your vessel.

	Off our reactions...

                                             FADE OUT.

                        END OF ACT TWO                          

 STAR TREK: "Ship in a Bottle" - REV. 10/29/92 - ACT THREE 26.

                           ACT THREE                            

	FADE IN:

15   INT. MAIN BRIDGE (OPTICAL)

	Continuous. Worf instinctively reaches for his phaser --
	Moriarty holds up a cautioning finger.

					MORIARTY
			If you harm me, sir, I would not
			be able to relinquish voice
			control of your vessel...

	Moriarty knows he's got us; Worf backs off.

					PICARD
			Professor -- you've put us in a
			very dangerous situation.

	Picard gestures toward the VIEWSCREEN, where the two
	planets are visible.

					PICARD
			Those two planets will collide in
			less than five hours and explode
			to form a new star. If we don't
			have navigational control we won't
			be able to maintain a safe
			distance -- and this vessel will
			be destroyed.

	Moriarty shrugs.

					MORIARTY
				(ironic)
			I'm just a fictional character...
			I haven't much to lose.

					PICARD
			Everything you've done to this
			point suggests that you want to
			live as much as we do.

					MORIARTY
			Not alone. Not without the
			Countess.

					PICARD
				(firm)
			We're studying ways to bring her
			off the Holodeck safely. But five
			hours is not enough time.

					MORIARTY
			I'm not so sure. A deadline has
			a wonderful way of concentrating
			the mind.

 STAR TREK: "Ship in a Bottle" - REV. 10/29/92 - ACT THREE 27.

15   CONTINUED:

	Picard considers his options.

					PICARD
			Mister Data... investigate the
			possibility of doing what
			Professor Moriarty has asked.

	Picard fixes Moriarty with a look.

					PICARD
			In the meantime, there are a few
			things we have to discuss.

	Picard moves toward the Ready Room without waiting for
	Moriarty's reply, leaving him little choice but to
	follow.

	Data shares a concerned glance with Riker, then EXITS
	to the Turbolift.

16   INT. ENGINEERING

	Geordi, Barclay and Data stand around the pool table
	trying to come up with a miracle.

					BARCLAY
				(frustrated)
			I can't think of anything else.
			We've taken the Holodeck apart
			circuit by circuit. There's
			nothing there that could account
			for Moriarty's ability to exist
			outside the grid.

					GEORDI
			So how are we supposed to do the
			same thing for the Countess?

					DATA
			I believe we are being asked to
			develop an entirely new science.

					GEORDI
			Yeah... in less than five hours.
			Piece of cake.

					DATA
			Perhaps we should consider the
			Transporter system. It uses many
			of the same principles as the
			Holodeck.
					(MORE)

 STAR TREK: "Ship in a Bottle" - REV. 10/29/92 - ACT THREE 28.

16   CONTINUED:

					DATA (Cont'd)
			Both, for example, are capable of
			converting energy into matter.

					GEORDI
			Except the Transporter
			reconstitutes energy into
			permanent form; Holodeck matter
			doesn't have any cohesion unless
			it's inside the grid.

					BARCLAY
			I wonder what would happen if we
			tried to beam a Holodeck object
			off the grid?

					GEORDI
			Nothing would happen. A Holodeck
			object is just a simulation --
			there's nothing there to provide
			a pattern lock for the
			Transporter.

					DATA
			However, if it were possible to
			lock onto the object... it might
			rematerialize with the molecular
			cohesion of conventional matter.

					GEORDI
			That's a big "if"... the
			Transporter just isn't going to
			recognize simulated matter.

					BARCLAY
			Unless...
				(idea beginning)
			... unless we could find a way to
			compensate for the phase variance.
			If we could modify the pattern
			enhancers, we just might do it.

	Their musings are interrupted as Picard ENTERS.

					PICARD
			Professor Moriarty has agreed not
			to interfere with routine ship
			operations. As long as he feels
			we're acting in good faith, we
			aren't in any immediate danger.
			Any progress?

 STAR TREK: "Ship in a Bottle" - REV. 10/29/92 - ACT THREE 28A.

16   CONTINUED: (2)

					GEORDI
			We're talking about using the
			Transporter to beam the Countess
			off the Holodeck... But I don't
			quite see how it's going to work.

					PICARD
			Keep at it -- I need to be able to
			tell him that we're making
			progress. Mister La Forge...

	Picard leads Geordi aside.

					PICARD
			Do you have any idea how Moriarty
			was able to take control of the
			ship?

					GEORDI
				(shakes his head)
			Somehow he managed to override the
			security lockouts and rewrite
			them. The guy's brilliant, in any
			century.

 STAR TREK: "Ship in a Bottle" - REV. 10/29/92 - ACT THREE 29.

16   CONTINUED: (3)

					PICARD
			I want you to find a way to undo
			whatever he's done... so we can
			regain control of the ship.

	Off the determination in Picard's face...

17   INT. A CORRIDOR

	as Data and Barclay approach the Holodeck control
	panel; an N.D. is carrying THREE PORTABLE PATTERN
	ENHANCERS.

					DATA
			Set up the pattern enhancers
			around whatever object you wish to
			transport. I will proceed to the
			Transporter Room to begin
			modifications.

	Data moves away. Barclay works the Holodeck control
	panel.

					BARCLAY
			Computer, Sherlock Holmes Program
			Three-A.

					COMPUTER VOICE
			That program is already in use.

	Barclay reacts to this -- who is running it? He moves
	to the door and they OPEN into the sitting room.

18   INT. SITTING ROOM

	He ENTERS to discover a beautiful woman there,
	stripping off her gloves. She is a mature, gracious
	woman, and there is a certain sureness to her every
	movement, as if she were a woman who knows exactly what
	she wants.

					COUNTESS
			Are you here to see Mister Holmes?
			Or perhaps Professor Moriarty?
			Neither is in just now.

					BARCLAY
			Oh, no... no. I'm not here to see
			anyone. I'm just --
				(gesturing to enhancers)
			-- delivering these.

	The Countess waves airily.

 STAR TREK: "Ship in a Bottle" - REV. 10/30/92 - ACT THREE 30.

18   CONTINUED:

					COUNTESS
			Fine. Just put them anywhere.

					BARCLAY
			Actually... we have to put them
			right here...

	The N.D. begins placing the enhancers in a triangle
	around a chair, then he leaves.

					COUNTESS
			How curious... why is that?

	Barclay is not certain how to respond... how does he
	talk to a Holodeck creation about pattern enhancers?

					BARCLAY
			Well... it has to do with...
				(beat)
			It's nothing you have to worry
			about, Countess.

					COUNTESS
				(slightly stung)
			Are you suggesting that it's
			beyond my comprehension?

					BARCLAY
				(embarrassed)
			Oh, no... not at all. It's very
			simple, really. I need to enhance
			the molecular pattern of the
			chair... so the Transporter can
			get a better lock on the signal.

	She looks at him for a beat... then --

					COUNTESS
			This has to do with getting James
			and me into the real world.

	He stares at her.

					BARCLAY
			You... you know about that? You
			understand about -- the real
			world?

					COUNTESS
			James has explained it to me. It
			sounds like a grand adventure...
			there's nothing I love more than
			exploring the unknown. Have you
			ever been to Africa, Mister -- ?

 STAR TREK: "Ship in a Bottle" - REV. 10/29/92 - ACT THREE 30A.

18   CONTINUED: (2)

					BARCLAY
			Ah -- Barclay. Lieutenant Reg
			Barclay. No, I never have.

					COUNTESS
			I have, when I was seventeen -- I
			went on safari with my uncle.
					(MORE)

 STAR TREK: "Ship in a Bottle" - REV. 10/29/92 - ACT THREE 31.

18   CONTINUED: (2)

					COUNTESS (Cont'd)
			My mother took to her bed in
			terror that I'd be bitten by a
			Tsetse fly... but I had a
			marvelous time.
				(leaning in,
				 conspiratorial)
			I got to wear trousers... the
			whole time.
				(beat)
			It was hard to go back to a
			corset, let me tell you.

					BARCLAY
			I... I'm sure it was.

					COUNTESS
			After that, I never stopped
			travelling. I couldn't bear to be
			stuck in one place for very long.
			So you can see I am looking
			forward to this new experience.
			Travelling the stars -- oh, my!

					BARCLAY
			You... know about that? Where we
			are? Countess... forgive me...
			but you don't sound like a
			Holodeck character.

					MORIARTY'S VOICE
			That's because she isn't.

	They turn to see Moriarty ENTERING from the Sitting
	Room door, carrying a bottle of champagne. The
	Countess rushes to him and throws her arms around his
	neck.

					COUNTESS
			James!

	They exchange a long, passionate kiss. It goes on to
	the point where Barclay gets a little embarrassed.
	Finally, they break. Moriarty turns to Barclay.

					MORIARTY
			If you loved a woman like this,
			Lieutenant... would you be content
			to let her remain a simulation?

					BARCLAY
			You... you gave her consciousness?

					MORIARTY
			Yes... just as it was given to me.

 STAR TREK: "Ship in a Bottle" - REV. 10/29/92 - ACT THREE 31A.

18   CONTINUED: (3)

					BARCLAY
			I'm not so sure that was a good
			idea...

					MORIARTY
			Nonsense. It was the only thing
			to do.

					BARCLAY
			Did you try taking her off the
			Holodeck?

	Moriarty hesitates.

					MORIARTY
			No. I am unwilling to risk the
			Countess' safety. I want to make
			sure nothing will happen to her.

					COUNTESS
			We may be closer to freedom than
			you think, James.
				(gesturing to enhancers)
			These are devices which will
			enhance our molecular patterns...
			they'll help take us into the real
			world.

	The Countess is obviously a quick study. Barclay is
	surprised; Moriarty nods approvingly.

					MORIARTY
				(to Barclay)
			Please proceed.

					BARCLAY
			We're going to try transporting
			this chair, first. We don't want
			to try it on the Countess until
			we're sure it will work.

					COUNTESS
			How thoughtful. Isn't he
			thoughtful, James?

	She seems to mean it, but Moriarty doesn't respond.
	Barclay touches his combadge.

					BARCLAY
			Barclay to Commander Data...

 STAR TREK: "Ship in a Bottle" - REV. 10/29/92 - ACT THREE 31B.

19   INT. TRANSPORTER ROOM

	Data is at the control console; the TRANSPORTER CHIEF
	is just closing up a wall panel.

					DATA
			Go ahead, Lieutenant.

					BARCLAY'S COM VOICE
			I'm ready here.

					DATA
			The modifications are complete.
			Stand by.

20   INT. DRAWING ROOM (OPTICAL)

	Barclay squats as he sets up the last of the three
	pattern boosters around the chair.

					BARCLAY
			Standing by...

 STAR TREK: "Ship in a Bottle" - REV. 10/29/92 - ACT THREE 32.

20   CONTINUED:

					DATA'S COM VOICE
			Activate pattern enhancers.

	Barclay activates them and a BEAM of light lances
	between the three triangularly arranged units.
	Moriarty and the Countess react to the light show.

21
thru	OMITTED
22

23   INT. TRANSPORTER ROOM

	Data works the main console; the Chief works one of the
	side panels.

					DATA
			Energizing...
				(he works)
			I am having difficulty
			establishing a pattern lock...
				(to the Chief)
			Boost the confinement beam.

	The Chief works the panel.

					DATA
			Pattern lock established...

24   INT. DRAWING ROOM (OPTICAL)

	as the chair DEMATERIALIZES. When Barclay smiles the
	Countess and Moriarty take the cue and applaud his
	work.

					COUNTESS
			Bravo!

 STAR TREK: "Ship in a Bottle" - REV. 10/29/92 - ACT THREE 33.

25   INT. TRANSPORTER ROOM (OPTICAL)

	where the chair is in the process of MATERIALIZING on
	the platform. The procedure seems to be going
	smoothly... but when the shimmering is done the chair
	is simply not there.

					BARCLAY'S COM VOICE
			Do you have the chair, Commander?

					DATA
			No. It lost its cohesion as soon
			as the Transporter cycle was
			complete.

					BARCLAY'S COM VOICE
			It was a long shot to begin with.

					DATA
			Agreed. However, we may be able
			to learn something from the
			attempt.

	He crosses to a wall panel.

					DATA
			Computer, display transport logs
			for the sequence just completed.

	An OKUDAGRAM appears on a monitor. It shows a standard
	X/Y axis type graph, but there are no points plotted,
	no information of any kind. Data is baffled by this.

					DATA
			Computer, what is being displayed
			here?

					COMPUTER VOICE
			Transport log seven-five-nine.

					DATA
			That is the correct log... but no
			information is being presented.

					BARCLAY'S COM VOICE
			That's impossible.

					DATA
			It is as if our attempt to
			transport the chair... never
			occurred.

	Data seems profoundly disturbed by this. Suddenly he
	turns on his heel and EXITS the Transporter Room.

 STAR TREK: "Ship in a Bottle" - REV. 10/29/92 - ACT THREE 34.

26   INT. ENGINEERING

	as Picard ENTERS and joins Geordi at a console.

					PICARD
			You wanted to see me?

					GEORDI
			Yes, Captain... I think I may have
			found a way to reinstate your
			voice authorization. Give it a
			try.

	Geordi works the console.

					PICARD
			Computer, route all command
			functions to this location.

					COMPUTER VOICE
			Command functions are off-line.

					PICARD
			Reinitialize them on my
			authorization.

	They skip a breath as they wait to see if the Computer
	will once again deny Picard's voice authorization.
	Instead:

					COMPUTER VOICE
			Please input command codes.

	They share a smile of satisfaction.

					PICARD
			Picard Epsilon-seven-nine-three.

					COMPUTER VOICE
			Command codes verified.

	In the background, Data ENTERS and crosses toward them.

					GEORDI
			That should do it.
				(works console)
			Wait a minute... it didn't work.
			The computer didn't release the
			command pathways...

	Geordi grabs a PADD and starts working.

 STAR TREK: "Ship in a Bottle" - REV. 10/29/92 - ACT THREE 35.

27   ANGLE - DATA

	He cocks his head as if in reaction to something
	surprising.

28   RESUME SCENE

	Geordi works the PADD for a moment before putting it
	down. Data grabs a TOOL from a nearby surface.

					DATA
			Geordi.

	When Geordi looks over at him Data tosses the tool to
	him. Geordi catches it with his left hand as if
	nothing were wrong.

					GEORDI
				(confused by Data's
				 action)
			What did you do that for?

	Geordi's action somehow confirms the theory that has
	been forming in Data's mind.

					DATA
			Captain, I have determined how
			Moriarty was able to leave the
			Holodeck. He never did. Neither
			did we.
				(gesturing around them)
			None of this is real. It is a
			simulation. We are still on the
			Holodeck.

	Off Picard's reaction...

                                             FADE OUT.

                       END OF ACT THREE                         

  STAR TREK: "Ship in a Bottle" - REV. 10/29/92 - ACT FOUR  36.

                           ACT FOUR                             

	FADE IN:

29   INT. ENGINEERING

	Continuous. Picard and Geordi aren't sure what to make
	of Data's extraordinary claim.

					GEORDI
			We're still on the Holodeck... ?

					PICARD
			How do you know that?

					DATA
			Through deduction. Lieutenant
			Barclay and I tried to transport
			a simulated object off the
			Holodeck -- something that has
			never been attempted. But since
			the transporter itself was just a
			simulation, the computer had no
			real data from which to create a
			transport log.

					GEORDI
			It could just be a problem with
			the Transporter...

					DATA
			But then I saw you working the
			PADD with your left hand.
			Commander La Forge is right-handed.
			A similar malfunction
			occurred in the Sherlock Holmes
			program I was running before
			Moriarty first appeared.

					PICARD
			Data, if what you're saying is
			true... then this is not Geordi La
			Forge. Are you certain?

	Data ponders for a beat, then removes his combadge and
	hurls it toward the far wall.

    STAR TREK: "Ship in a Bottle" - 10/26/92 - ACT FOUR    36A.

30   CLOSE - THE COMBADGE (OPTICAL)

	in midair, as it strikes an invisible wall and is
	deflected away. For a moment, the yellow grid of the
	Holodeck wall is visible at the point of impact (as in
	"Encounter at Farpoint").

	Picard and Geordi react.

					PICARD
			Computer, discontinue program.

	Nothing happens.

					PICARD
			Computer, exit.

	Again, nothing happens.

					DATA
			It appears that Moriarty has
			programmed the Holodeck to accept
			only his commands.

					PICARD
				(activates combadge)
			Picard to Bridge.

					RIKER'S COM VOICE
			Riker, here.

  STAR TREK: "Ship in a Bottle" - REV. 10/29/92 - ACT FOUR  37.

30   CONTINUED:

					PICARD
			What is my present location,
			Number One?

					RIKER'S COM VOICE.
				(beat)
			Engineering...
				(off his odd request)
			Is something wrong, sir?

					PICARD
			No. Thank you, Picard out.
				(to the others)
			Our combadges must be locked into
			the simulation; if that had been
			the real Commander Riker, he would
			have given our location as
			Holodeck Three.

	Picard considers.

					PICARD
			Mister La Forge, will you excuse
			us please?

	Geordi nods and moves away.

					PICARD
			Data... who is real here?

					DATA
			You and I are real, as is
			Lieutenant Barclay. We entered
			the Holodeck together when we
			first went to see Moriarty.

					PICARD
			Then... from that point on... we
			have been existing in a Holodeck
			simulation of the Enterprise --
			created by Moriarty.

					DATA
			I believe that to be the case,
			sir.

  STAR TREK: "Ship in a Bottle" - REV. 10/29/92 - ACT FOUR     38-39   

30   CONTINUED: (2)

					PICARD
			I just gave my command codes to
			the computer... thinking I was
			regaining control of the ship.

					DATA
			You may have inadvertently given
			Professor Moriarty the means of
			gaining control of the real
			Enterprise.

					PICARD
			Since he has never actually left
			the Holodeck... he'll probably
			demand that Commander Riker find
			a way for him to do so.
				(beat)
			How long until the planetary
			collision?

					DATA
			Less than three hours.

					PICARD
			As long as Moriarty has control of
			the ship -- we are vulnerable.
				(beat)
			Somehow, we have to find a way to
			give him what he wants.

	Off his worried expression...

31   EXT. SPACE - THE ENTERPRISE (OPTICAL)

	as it hangs in space near the two planets.

32   INT. MAIN BRIDGE (OPTICAL)

	Riker, Worf, Geordi and various N.D's. Moriarty is on
	the VIEWSCREEN, talking to Riker from the Holodeck
	simulation of his quarters.

  STAR TREK: "Ship in a Bottle" - REV. 10/27/92 - ACT FOUR  40.

32   CONTINUED:

					RIKER
			Where is Captain Picard? What
			have you done with Lieutenant
			Barclay and Commander Data?

					MORIARTY
			They're safe... for now.

					RIKER
			Release control of this ship.

					MORIARTY
			I'm afraid I can't do that.

	Moriarty holds all the cards and he's enjoying playing
	them. Riker doesn't like any of this one bit.

					RIKER
			What do you want?

					MORIARTY
			I only want what you have the
			luxury of taking for granted:
			freedom. I want to leave this
			Holodeck.

					RIKER
			I think you know that's
			impossible.

					MORIARTY
			Your crewmates here in my
			little... ship in a bottle, seem
			a bit more optimistic.

					RIKER
			Oh?

					MORIARTY
			They attempted to use your
			Transporter device to remove a
			simulated object from the
			Holodeck.

	Riker turns to Geordi.

					GEORDI
			If they tried it, they must have
			thought they were on to something.

					MORIARTY
			Their attempt was futile because
			their Transporter was just a
			facsimile. I expect more from
			you.

  STAR TREK: "Ship in a Bottle" - REV. 10/27/92 - ACT FOUR  41.

32   CONTINUED: (2)

					GEORDI
			Just because our Transporter is
			real doesn't mean it's going to
			work.

					MORIARTY
			I sense a distressing lack of
			enthusiasm on your parts...

	Moriarty reaches forward and presses a button on the
	PADD in front of him.

					WORF
			Sir... warp core temperature is
			rising -- approaching critical
			levels...

					MORIARTY
			I have nothing to lose,
			Commander...

	Riker weighs his options.

					RIKER
				(grim)
			Mister La Forge... start working
			on the problem.

	Moriarty taps his console.

					WORF
			Core temperature is dropping...

	Off Moriarty's smile of satisfaction...

33   INT. CORRIDOR

	Picard at the panel. (NOTE: It is important that
	Picard be discovered at the panel, not approaching it.)

					PICARD
			Computer, resume program.

34   INT. DRAWING ROOM

	The Countess looks up, curious but not startled by the
	appearance of this stranger.

  STAR TREK: "Ship in a Bottle" - REV. 10/30/92 - ACT FOUR  42.

34   CONTINUED:

					COUNTESS
			Hello... have we met?

					PICARD
			Captain Jean-Luc Picard.

	She extends her hand to him, graciously.

					COUNTESS
			James has told me all about you.
			I am Regina, Countess Barthalomew.
			May I offer you tea, Captain?

					PICARD
			No, thank you.
				(beat)
			I've come to prevail upon your
			intelligence and insight.

					COUNTESS
				(a slight smile)
			But not, apparently, my humility.

	Picard adopts a more formal, 19th century manner of
	speech, which the Countess might find more familiar.

					PICARD
			Credit where it is due, Madame.
			You are clearly a woman not only
			of breeding, but of wit and
			sagacity.

					COUNTESS
			And you, sir, are a man of
			charm... and guile.
				(beat)
			You remind me of the Viscount
			Bisimuth... he could bewitch any
			woman who breathed...

	Picard regards her with a smile, enjoying the banter
	with this beautiful woman.

					PICARD
			And do you suspect that is my
			intent?

	She leans toward him and gazes at him with sparkling
	eyes.

      STAR TREK: "Ship in a Bottle" - REV. 10/29/92 - ACT FOUR     42A.

34   CONTINUED: (2)

					COUNTESS
			I cannot be certain of your
			intent... but I am certain that
			you are the kind of man who
			usually gets exactly what he
			wants.

	She is intriguinging and challenging. Picard cannot
	help but be charmed.

					PICARD
			What does a woman like you see in
			a man like Professor Moriarty?

					COUNTESS
			He is an exciting man, Captain.
			Brilliant... incisive... ruthless.
			He has an almost irresistible
			appeal.

					PICARD
			He is also an arch criminal.

					COUNTESS
			Only because he was written that
			way.
				(beat)
			I see him much differently,
			Captain -- he is not a villain.

					PICARD
			Then it is your desire to leave
			the Holodeck in order to be with
			him.

					COUNTESS
			More than anything. Can you help
			us?

      STAR TREK: "Ship in a Bottle" - REV. 10/30/92 - ACT FOUR      43.

34   CONTINUED: (3)

					PICARD
			I can. We've learned that if we
			uncouple the Transporter's
			Heisenberg Compensators and allow
			them to rescramble randomly, we
			can beam a Holodeck object... or
			a person... off the grid -- with
			all the cohesion of conventional
			matter.

					COUNTESS
			That's splendid! I must tell
			James.

	Picard puts out a hand.

					PICARD
			Wait... I came to you with this
			information because I believe you
			are someone who will listen to a
			reasonable proposition. Whose
			mind is open to compromise.

	She eyes him carefully.

					COUNTESS
			Yes?

					PICARD
			My ship is in danger... it is
			imperative that I regain
			navigational control. You must
			convince Moriarty to return voice
			commands to me... or we will not
			modify the Transporter.

					COUNTESS
			I see.

					PICARD
			Once I have voice command, I
			promise we will transport you from
			the Holodeck.

					COUNTESS
			Forgive me, Captain... but that
			sounds a bit more like a threat
			than a compromise.

      STAR TREK: "Ship in a Bottle" - REV. 10/27/92 - ACT FOUR     43A.

34   CONTINUED: (4)

					PICARD
			Please understand -- I am
			responsible for the lives of over
			a thousand people.

	She looks at him for a moment, then --

					COUNTESS
			I'll do what I can.

	Picard inclines his head slightly in acknowledgement.

35   EXT. SPACE - THE ENTERPRISE (OPTICAL)

	as it hangs in space.

36   INT. MAIN BRIDGE (OPTICAL)

	Riker moves toward the back science station where
	Geordi is working.

					RIKER
			Any progress?

					GEORDI
			I've got my people modifying the
			Transporter... but I don't see how
			running Holodeck matter through
			the pattern buffer will give it
			molecular cohesion.

					RIKER
			Any luck getting back systems
			control?

					GEORDI
			Moriarty has reinitialized the
			Captain's command codes and input
			his own. We can't get control
			without them.

					N.D. VOICE
				(off-screen)
			Commander.

	Riker and Geordi turn and see the two gas planets on
	the VIEWSCREEN -- almost touching.

      STAR TREK: "Ship in a Bottle" - REV. 10/29/92 - ACT FOUR     43B.

36   CONTINUED:

	Geordi moves to tactical and works the controls.

					GEORDI
			The gravity well is beginning to
			intensify.

	Riker's face hardens.

					RIKER
			Are we far enough away to keep
			from being pulled in?

					GEORDI
			It's too soon to tell.

					RIKER
				(to com)
			Riker to Lieutenant Worf...

					WORF'S COM VOICE
			Worf here, sir.

					RIKER
			How are you doing?

      STAR TREK: "Ship in a Bottle" - REV. 10/27/92 - ACT FOUR      44.

37   INT. A CORRIDOR (OPTICAL)

	Worf and a number of N.D's are working on a Mees panel
	in order to disable a force field blocking their path
	to the Holodeck.

					WORF
			There are force fields blocking
			our access to the Holodeck. It
			will take time to disable them.

					RIKER'S COM VOICE
			Keep trying.

					WORF
			Aye, sir.

38   INT. DRAWING ROOM (OPTICAL)

	The Countess has told Moriarty about her conversation
	with Picard.

					MORIARTY
			Think, my dear. You're certain he
			said they had to uncouple the
			Heisenburg Compensators?

					COUNTESS
			Yes, James, I'm quite sure. But
			he won't do it unless you return
			control of the ship to him.

					MORIARTY
				(pleased)
			I have them running around like
			rats in a maze.

					COUNTESS
			It's an entirely reasonable
			request. There are lives at stake --

					MORIARTY
			Yes, ours.

					COUNTESS
			What harm would there be in
			accepting his proposition?

					MORIARTY
			My dear, you are as brilliant as
			you are beautiful. Nonetheless,
			there are things you do not
			understand. You must let me
			handle this.
				(beat)
			Computer, arch.

      STAR TREK: "Ship in a Bottle" - REV. 10/27/92 - ACT FOUR      45.

38   CONTINUED:

	The ARCH APPEARS in the room. Moriarty goes to it and
	works the controls. Riker's face appears on the
	monitor.

					MORIARTY
				(warmly)
			Commander Riker... a pleasure as
			always.

					RIKER
				(on monitor)
			I don't have time for games,
			Moriarty. This ship is falling
			into a gravity well. It'll be
			destroyed within twenty-five
			minutes... Holodeck and all.

					MORIARTY
			Then I'm sure you'll be motivated
			to listen to me... very, very
			carefully. I want to talk to you
			about uncoupling the Heisenburg
			Compensators.

	Off his self-satisfied smile...

                                             FADE OUT.

                        END OF ACT FOUR                         

         STAR TREK: "Ship in a Bottle" - 10/26/92 - ACT FIVE        46.

                           ACT FIVE                             

	FADE IN:

39   INT. DRAWING ROOM (OPTICAL)

	A few minutes later. Moriarty and the Countess are
	setting up the pattern enhancers in the middle of the
	room, presumably as instructed by Riker.

					COUNTESS
			James? Where will we go when we
			leave here?

					MORIARTY
			Everywhere, my darling. There are
			more worlds in the heavens than
			there are grains of sand on a
			shoreline.

	They share a smiles of excitement and anticipation.

					COUNTESS
			I wish I could take my books.
			I'll be lost without them.

					MORIARTY
			I'll get you more. I promise
			you... you'll want for nothing.

					RIKER'S COM VOICE
			Riker to Moriarty.

					MORIARTY
			It's time...

	He moves to the arch where Riker's face is again on the
	monitor; the First Officer is now in the Transporter
	Room.

					MORIARTY
			Yes, Commander?

      STAR TREK: "Ship in a Bottle" - REV. 10/30/92 - ACT FIVE      47.

39   CONTINUED:

					RIKER
				(on Transporter Room
				 monitor)
			We're ready.

					MORIARTY
			As are we.

					RIKER
				(on monitor)
			Step inside the transport area and
			activate the pattern enhancers.

	Moriarty and the Countess move into the triangular area
	demarcated by the pattern enhancers. Once there,
	Moriarty kneels and twists a cylinder on one of the
	pylons, causing a beam of energy to connect the three
	units.

					MORIARTY
				(toward the arch)
			We're ready here.

					RIKER'S COM VOICE
			Stand by... Energizing...

	Moriarty and the Countess exchange a look... they're
	off into an exciting new world. Transport is initiated
	and they DEMATERIALIZE.

40   INT. TRANSPORTER ROOM (OPTICAL)

	where they REMATERIALIZE after a slightly more
	protracted Transporter process than usual. Riker and
	Worf watch with a certain urgency -- if this doesn't
	work, Moriarty may not relinquish control of the ship.

	Moriarty feels his hands and sides, as if testing their
	solidity. He and the Countess exchange huge smiles of
	relief and excitement.

					RIKER
				(with grim irony)
			Welcome aboard...

					MORIARTY
			May I present Regina, Countess
			Barthalomew...

      STAR TREK: "Ship in a Bottle" - REV. 10/29/92 - ACT FIVE      48.

40   CONTINUED:

					RIKER
			Countess...
				(to Moriarty)
			Forgive me if I skip the
			pleasantries... but given the
			circumstances...

					MORIARTY
			Ah, yes. I expect you want me to
			relinquish my hold on your vessel?

					RIKER
			Please.

					MORIARTY
			I'm afraid that won't be possible
			just yet.

					RIKER
			What --

					MORIARTY
			I have a small favor to ask of
			you.

					RIKER
			We had an agreement.

	The angrier Riker becomes, the calmer Moriarty seems to
	get.

					MORIARTY
			And I intend to honor it. I have
			no wish to see your vessel
			destroyed. Just give me one of
			your...
				(a new word)
			-- shuttlecraft, and allow us to
			leave in peace.

					RIKER
			There's no time for this. Release
			the command codes and we'll talk.

					MORIARTY
				(smiles)
			I will not release your vessel...
			until I'm looking at it through a
			shuttlecraft window.

	Riker's jaw sets in frustration, but there's little he
	can do.

         STAR TREK: "Ship in a Bottle" - 10/26/92 - ACT FIVE        49.

41   INT. SHUTTLEBAY

	Riker is standing outside a SHUTTLECRAFT, talking to
	Moriarty and the Countess through its open door.
					RIKER
			Everything has been programmed to
			operate on voice command. Just
			tell the computer where you want
			to go.

					MORIARTY
			Excellent.

					RIKER
			You do have a destination? The
			shuttle's range is limited.

					MORIARTY
			Your concern for our welfare is
			touching.

					RIKER
			I suggest you head for Meles Two.
			It's the nearest inhabited planet,
			and the people are friendly.
			Where you go from there is your
			business.

					MORIARTY
			Please tell your Captain I'm sorry
			I couldn't say goodbye.
					(MORE)

      STAR TREK: "Ship in a Bottle" - REV. 10/29/92 - ACT FIVE      50.

41   CONTINUED:

					MORIARTY (Cont'd)
			I do wish I could see his face
			when he realizes where he's been
			the last several hours.

	Riker is eager to get them out of there before the
	danger from the colliding planets becomes imminent.

					RIKER
			Every second we waste puts us in
			that much more danger.

					MORIARTY
			Don't worry, you'll soon have
			control of your ship.

	Riker backs away from the door.

					COUNTESS
			Goodbye, Commander. Thank you for
			everything.

	Riker manages a polite nod.

					MORIARTY
			Computer... prepare to depart.

	Riker backs away as the door to the shuttlecraft
	closes. FOLLOW him as he joins Worf at the console
	that controls the shuttlebay doors.

42   ANGLE - RIKER AND WORF

					RIKER
			Open shuttlebay doors.

	Worf works the controls. We hear the off-screen sound
	of the door opening and the warning ALARM that
	accompanies it.

	Off the grim expressions of Riker and Worf, as they
	watch Moriarty's shuttle departing off-screen...

43   INT. SHUTTLECRAFT

	The shuttle has left the bay and moved away from the
	ship. Stars are visible through the windows as the
	shuttle moves through space.

	Moriarty and the Countess peer out into space, struck
	by the beauty of its expanse.

      STAR TREK: "Ship in a Bottle" - REV. 10/29/92 - ACT FIVE      51.

43   CONTINUED:

					COUNTESS
			It's so beautiful...

					MORIARTY
			Indeed, my dear. It is a wondrous
			sight. The first of many we are
			sure to encounter in our travels.

	The stare out into the starfield, into their future.

					MORIARTY
			Computer... interface with the
			central computer on the
			Enterprise.

	The computer beeps.

					COMPUTER VOICE
			Interface complete.

					MORIARTY
			Release command function
			lockouts... authorization
			Moriarty, alpha two-four-one-five-nine.

					COUNTESS
			James... ?

					MORIARTY
			Yes, my love?

					COUNTESS
			Can we go back to Earth...
			someday?

					MORIARTY
			Of course, my dear... Of course.

	He looks at her with great tenderness.

44   INT. SHUTTLEBAY

	Riker and Worf stand at the console as we last saw
	them.

					PICARD
				(off-screen)
			Computer...

         STAR TREK: "Ship in a Bottle" - 10/26/92 - ACT FIVE        52.

44   CONTINUED:

	Riker and Worf turn at the sound of the Captain's
	voice.

45   INCLUDE PICARD (OPTICAL)

	as he walks toward them.

					PICARD
			Store program Picard delta one in
			active memory and discontinue
			simulation.

	The shuttlebay DISAPPEARS, including Riker and Worf.
	Picard is now standing in the empty grid.

46   INT. HOLODECK GRID

					COMPUTER VOICE
			Program stored.

	Picard crosses toward the door and EXITS.

47   INT. CORRIDOR (OPTICAL)

	Data and Barclay are waiting for Picard as he ENTERS
	from the grid. They look at him expectantly for a
	moment and he breaks into a smile.

					PICARD
			It worked... they believed they
			were off the Holodeck.

					DATA
			Did Moriarty release the voice
			commands, Captain?

					PICARD
			We'll soon find out. Computer...
			discontinue the Holodeck
			simulation created by Professor
			Moriarty.

	The Corridor DISAPPEARS and the three men find
	themselves standing in the empty grid.

         STAR TREK: "Ship in a Bottle" - 10/26/92 - ACT FIVE       52A.

48   INT. HOLODECK GRID

					BARCLAY
			So far, so good. This should be
			the Holodeck on the real
			Enterprise.

					PICARD
				(activates combadge)
			Picard to Bridge.

      STAR TREK: "Ship in a Bottle" - REV. 10/29/92 - ACT FIVE      53.

49   INT. MAIN BRIDGE

	Riker, Geordi and various N.D's.

					RIKER
			Captain! Are you all right?

					PICARD'S COM VOICE
			Yes, Number One. What is your
			status?

					RIKER
			We regained full control of the
			ship a few minutes ago.

					PICARD'S COM VOICE
			And the planetary collision?

					RIKER
			Six minutes away... we're pulling
			back to a safe distance.

50   INT. HOLODECK GRID

					PICARD
			We'll join you shortly.

	Worf and his team (that we saw earlier trying to
	disable the force field) appear in the doorway to the
	Corridor.

					WORF
			Captain --

					PICARD
			We're all right, Mister Worf.

	Barclay crosses to the Arch and opens a panel. He
	removes a cube-shaped piece of hardware.

                                             CUT TO:

51   OMITTED

52   INT. OBSERVATION LOUNGE

	Picard, Data, Barclay, Riker, Beverly and Troi. The
	TECH cube is sitting on the table between them.

					RIKER
			How did you do it, sir?

      STAR TREK: "Ship in a Bottle" - REV. 10/29/92 - ACT FIVE      54.

52   CONTINUED:

					PICARD
			We were able to program the
			Holodeck inside the Holodeck, and
			use the same ruse on Moriarty that
			he used on us.

					DATA
			When he attempted to contact the
			real Bridge, he was in fact
			talking to a simulation.

      STAR TREK: "Ship in a Bottle" - REV. 10/28/92 - ACT FIVE      55.

52   CONTINUED: (2)

					TROI
			You mean he never realized that he
			hadn't left the Holodeck?

					PICARD
				(gesturing to the cube)
			The simulation is continuing even
			now, inside that cube.

					BEVERLY
			A miniature Holodeck?

					DATA
			In a way, Doctor. However, it has
			no physicality. The program is
			continuing... but only within the
			computer circuitry.

					BARCLAY
			As far as Moriarty and the
			Countess know, they're half way to
			Meles Two by now.

	Barclay picks of the TECH cube and inserts it in a slot
	inside a larger, briefcase sized piece of hardware with
	BLINKIES on it.

					BARCLAY
			This enhancement module contains
			enough active memory to provide
			them with a lifetime of
			experiences.

					PICARD
			They'll live out their lives...
			and never know the difference.

					TROI
				(smiles)
			So in a sense... you did give
			Moriarty what he wanted.

	Picard smiles because he feels he has at last been able
	to fulfill his obligation to Moriarty.

      STAR TREK: "Ship in a Bottle" - REV. 10/28/92 - ACT FIVE      56.

52   CONTINUED: (3)

					PICARD
			In a sense. And... who knows --
			our reality might not be all that
			different from theirs. All
			this...
				(gestures around him)
			... might be nothing more than an
			elaborate simulation being run
			inside a little device... sitting
			on someone else's table...

	Picard's just making a philosophical point that brings
	smiles around the room. Except for Barclay, who seems
	a little disquieted by what he said.

					PICARD
			Well... I believe we have a new
			born star to study.
				(standing; indicating
				 the cube)
			Mister Barclay... you'll see that
			is kept in a safe place?

					BARCLAY
			Aye, sir.

	Barclay adjusts a control or two on the unit as
	everyone files out of the room. He stands and picks up
	the unit to follow, but then decides to wait and allow
	the door to close behind them. Once alone, he looks
	around the room.

					BARCLAY
				(tentatively)
			Computer... end program.

	When nothing happens, Barclay is satisfied he's not
	still inside some Holodeck simulation somewhere. He
	suddenly feels foolish for having doubted it, smiles
	sheepishly, and leaves the room.

53   EXT. SPACE - THE ENTERPRISE (OPTICAL)

	As it hangs in space near the flickering new star.

                                             FADE OUT.

                        END OF ACT FIVE                         

                            THE END