Name and lore for items

  • 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!

Status
Not open for further replies.

pfcdev

Member
Nov 7, 2021
2
0
1
31
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
 
Status
Not open for further replies.