Moving the player to a new room only if a condition is met?

I want to move the player to a new room when he shows his papers to a guard, but only if the player has visited another room first.

Instead of giving the papers to the Guard: say "[if Office is unvisited]He looks at your papers and says 'Go talk to the clerk in the office first![End if][If Office is visited]He looks at your papers and let's you through.[end if]"; move player to Room X.

However with this code the player is of course moved to Room X regardless of whether he as visited Office or not. How do I bake in the move player command in such a way that it only applies on the second if statement?

This general form would seem most appropriate and readable:

Instead of xxx: if office is unvisited: say "stuff"; otherwise: say "other stuff"; move player to room X.
(By the way, where you write “let’s” you should have “lets”. :wink: )