pickaxe only at certain y

I want to make a pickaxe that is able to break bedrock which I know how to do but how can I make it only be able to do so if the player is above a certain y level
Continue to help post