Hey, I'm basically trying to make a spawner pickaxe. But every time I mine the spawner I only get the blank spawner without the set mob inside. How to fix it? 
Code:
on break of mob spawner:
if player has permission "minespawner.all":
if player's tool is netherite pickaxe:
if player's tool is enchanted with silk touch 10:
cancel event
give event-block to player
break event-block