1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Need help mkaing a skript that cancel event if the player has an item in thier inventory

Discussion in 'Skript' started by StatixDevs, Dec 2, 2022.

  1. StatixDevs

    StatixDevs Member

    Joined:
    Dec 2, 2022
    Messages:
    1
    Likes Received:
    0
    this is my code:
    on join:
    wait 5 ticks
    if player has 1 of iron sword of sharpness 1 named "&aPVP Sword"
    cancel event
    else:
    give player iron sword of sharpness 1 named "&aPVP Sword"
    give player 10 of golden apple
    give player 2 of steak
    give player 32 of arrow
    give player 1 of bow
    give player 1 of iron helmet of protection 2 and unbreaking 1
    give player 1 of iron chestplate of protection 2 and unbreaking 1
    give player 1 of iron leggings of protection 2 and unbreaking 1
    give player 1 of iron boots of protection 2 and unbreaking 1
     
  2. Witho

    Witho New Member

    Joined:
    Dec 6, 2022
    Messages:
    7
    Likes Received:
    0
    Code (Text):
    1. on join:
    2.     wait 5 ticks
    3.     if player's inventory does not contain 1 of iron sword of sharpness 1 named "&aPVP Sword":
    4.         give player iron sword of sharpness 1 named "&aPVP Sword"
    5.         give player 10 of golden apple
    6.         give player 2 of steak
    7.         give player 32 of arrow
    8.         give player 1 of bow
    9.         give player 1 of iron helmet of protection 2 and unbreaking 1
    10.         give player 1 of iron chestplate of protection 2 and unbreaking 1
    11.         give player 1 of iron leggings of protection 2 and unbreaking 1
    12.         give player 1 of iron boots of protection 2 and unbreaking 1
     

Share This Page

Loading...