Hello, I would like to make this script only work for diamond pickaxes with a certain name and a certain lore
Code:
on mine:
if player's tool = diamond pickaxe:
if player's gamemode = survival:
cancel event
set {_x1} and {_x2} to block's x loc
set {_y1} and {_y2} to block's y loc
set {_z1} and {_z2} to block's z loc
if player's pitch is between -50 and 50:
if player's horizontal facing is west or east:
add 1 to {_y1} and {_z1}
remove 1 from {_y2} and {_z2}
else if player's horizontal facing is north or south:
add 1 to {_x1} and {_y1}
remove 1 from {_x2} and {_y2}
else:
add 1 to {_x1} and {_z1}
remove 1 from {_x2} and {_z2}
loop blocks within location at {_x1}, {_y1}, {_z1} in player's world and location at {_x2}, {_y2}, {_z2} in player's world:
if loop-value != bedrock or air:
if player can build at loop-value:
break loop-value using player's tool
damage player's tool by 1
if player's tool's durability = player's tool's max durability:
clear player's tool
exit loop