Conditional Endings

Im having trouble making a conditional ending. the game im making is about stealing the mona lisa. I want to make it so you cant get into the car without having the mona lisa in your inventory.
here is part of the code.

The parking lot is a room.

the description of the parking lot is " I see cops coming to the west. good thing my getaway car is parked by the east side of the parking lot."

Instead of going west in the parking lot: say “you got busted. the French Police throw you in jail never to be seen again.”;
end the story.

Instead of going east in the parking lot : say “You got away with the goods. You’re set for life.”;
end the story.

Moving this over to the Inform 7 category.

Parking Lot is a room. "You see cops coming from the west. Good thing your getaway car is parked by the east side of the parking lot."

The Mona Lisa is here. The indefinite article is "the". Understand "painting" or "portrait" as the Mona Lisa.

An openable container called your black bag is here.

A vehicle called your getaway car is here. The car is scenery.

Going west in the Parking Lot is escaping. Going east in the Parking Lot is escaping.

Instead of escaping when the player is not in the getaway car:
	say "You can't escape on foot."

Definition: a thing (called T) is procured if the player encloses T or the getaway car encloses T.

Instead of entering the getaway car or escaping when the Mona Lisa is not procured:
	say "You're not about to leave without the Mona Lisa."

Instead of going west in the Parking Lot when the player is in the getaway car and the Mona Lisa is procured:
	say "You start your car and drive west towards the cops. After a spectacular car chase, you're captured, and the French Police throw you in jail, never to be seen again.";
	end the story saying "You got busted."
	
Instead of going east in the Parking Lot when the player is in the getaway car and the Mona Lisa is procured:
	say "You start your car and drive away to the east. With a squeal of burning rubber, you evade the police and get away with the goods.";
	end the story finally saying "You're set for life".
	
Test capture with "e / w / enter car / take painting / enter car / w".
Test escape with "e / w / enter car / take painting / enter car / e".
Test sneaky with "enter car / take mona lisa / put mona lisa in car / enter car / e".
Test sneakier with "take mona / enter car / put mona in bag / e / take mona / e".

The main idea here is to add conditions to the rules that you write, like “when the player does not enclose the Mona Lisa” or “when the player is in the getaway car”. Typically, more specific rules are consulted before more general rules.