How to make a choice between layers?

How would I make it so you have 2 choices for the next layer, and when you buy an upgrade for one, the other dissapears?

update, ive figured out slightly how to do it, using the following lines of code:
first layer (B):

layerShown(){return (hasUpgrade (“jj”,22)) || player.b.unlocked |! player.h.unlocked},

second layer (H):

layerShown(){return (hasUpgrade (“jj”,22)) || player.h.unlocked |! player.b.unlocked},

Unfortunately, it also makes it so the layers are immediately visible from booting up a new save, and I don’t want that. How would I fix this?