You could put a "Open gui" procedure block (not entirely sure what it's called, but it's something along those lines) on the right click procedure of the block. If you want it so you have to be jumping, just check if the block below the player is air and then open the gui if so.
Player right clicks with item if item in main-hand of event/target entity = (item) do open screen for event/target entity pass location x: x y: y z: z GUI: (gui)
but it just gives you the items back when you close it
You could put a "Open gui" procedure block (not entirely sure what it's called, but it's something along those lines) on the right click procedure of the block. If you want it so you have to be jumping, just check if the block below the player is air and then open the gui if so.
i found a way to do it
Player right clicks with item
if item in main-hand of event/target entity = (item)
do open screen for event/target entity pass location x: x y: y z: z GUI: (gui)
but it just gives you the items back when you close it