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?

im slightly confused here, what does upgrade jj 22 do here? does it choose between layers b and h? if so, how do you use two states for the upgrade (purchased, not purchased) to express three states of player decision (selected layer b, selected layer h, not selected)?

one solution (albeit non-optimal) is to use two upgrades, one for each layer and disappear the other upgrade whenever one is purchased.
in which, layer b unlock condition becomes hasUpgrade(‘jj’, 21), the unlock condition for upgrade jj 21 becomes (whattever it was before)&&(!hasUpgrade(‘jj’, 22)), and vice versa for layer h and upgrade jj 22

Pretty late reply, i completely forgot about my love for modding Prestige Tree until i just returned to it just today :stuck_out_tongue:
Upgrade jj22 gave a small boost to points based on it’s layer currency and also unlocked layers B and H to be bought. I wanted layer B to be a more passive layer with making previous upgrades permanent and passive prestige gain, while layer H was more active, straight-to-the-point boosts, like multipliers to previous reset layers. The choice was mostly up to player preference, and there would have been an upgrade later on to allow both, but that couldn’t be made in time before the final exam in June 2024 this project was for. however, i’ll say that this way you mention seems to be the next best thing I can find, so i’ll mark it as an answer and thank you for your help! :3