variables: {HP} = 50 on mine cobblestone: remove 1 from {HP} set block to cobblestone if {HP} is 0: set block to air give diamond to player