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

  • 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 our Wiki for downloads and any other information about Skript!

Status
Not open for further replies.

StatixDevs

Member
Dec 2, 2022
1
0
1
23
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
 
Code:
on join:
    wait 5 ticks
    if player's inventory does not contain 1 of iron sword of sharpness 1 named "&aPVP Sword":
        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
 
Status
Not open for further replies.