on break of spawner:
if player's tool is not diamond pickaxe named "&b&lMagiczny Kilof":
send "&c&lSpawner mozesz wykopac tylko &b&lMagicznym Kilofem&c&l!" to player
cancel event
stop
set {_s} to nbt of targeted block
set {_s::*} to {_s} split at """"
drop spawner with nbt "{BlockEntityTag:{SpawnData:{id:""%{_s::2}%""},id:""minecraft:mob_spawner"",SpawnPotentials:[0:{Entity:{id:""%{_s::2}%""},Weight:1}]},display:{Name:""%{_s::2}%""}}"
Sprawdź jeszcze raz.