An object that can be used to break a certain block

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

After

Member
Jan 11, 2025
1
0
1
25
Hi i need add the condition that some blocks [Like Coal ore, iron ore etc...] can only be extracted with a pickaxe

on mine:
if event-block is coal ore or deepslate coal ore or iron ore or deepslate iron ore or gold ore or deepslate gold ore or diamond ore or deepslate diamond ore or redstone ore or deepslate redstone ore or lapis ore or deepslate lapis ore or copper ore or deepslate copper ore or emerald ore or deepslate emerald ore or nether quartz ore or nether gold ore or ancient debris:
set {_original} to event-block's type
set {_location} to location of event-block
cancel event

# Ore reward logic - Different rewards for different ores
if event-block is coal ore or deepslate coal ore:
execute console command "gems give %player% 1"
else if event-block is iron ore or deepslate iron ore:
execute console command "gems give %player% 2"
else if event-block is gold ore or deepslate gold ore:
execute console command "gems give %player% 3"
else if event-block is diamond ore or deepslate diamond ore:
execute console command "gems give %player% 4"
else if event-block is redstone ore or deepslate redstone ore:
execute console command "gems give %player% 2"
else if event-block is lapis ore or deepslate lapis ore:
execute console command "gems give %player% 1"
else if event-block is copper ore or deepslate copper ore:
execute console command "gems give %player% 2"
else if event-block is emerald ore or deepslate emerald ore:
execute console command "gems give %player% 3"
else if event-block is nether quartz ore:
execute console command "gems give %player% 1"
else if event-block is nether gold ore:
execute console command "gems give %player% 2"
else if event-block is ancient debris:
execute console command "gems give %player% 4"

set block at {_location} to bedrock
wait 5 seconds
set block at {_location} to {_original}
 
Last edited:
Do you mean like this?
Code:
on break:
    if event-block is any ore:
        if player is holding any pickaxe:
            #block mining stuff
        else
            cancel event
            send "&7You need to hold a pickaxe!" to player