Need help adding and removing effects on armour equip and remove

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

    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.

Xetheralx

Member
Feb 6, 2022
2
0
1
Hi i run a small server with custom items and ive been trying to find a better way to to do this. At the moment i use loop to add effects to my items but its not ideal as its just adding the effect for 2 seconds all the time. here is an example of one of my scripts:

  1. every 2 seconds:
  2. loop all players:
  3. #If the player we check is wearing a Gold helmet of Blast protection 5 and fire protection 3 and unbreaking 8 named "&c&lMiner's Helm" with the lore "&dThe Light Will Show The Way" and "&a-Gives Night Vision" and "&a-Ultra Durable"
  4. if loop-player is wearing Gold helmet of Blast protection 5 and fire protection 3 and unbreaking 8 named "&c&lMiner's Helm" with lore "&dThe Light Will Show The Way" and "&a-Gives Night Vision" and "&a-Ultra Durable":
  5. #then apply the Night vision 1 effect to that player for 2.5 seconds
  6. apply Night vision to the loop-player for 2.5 seconds

I would like it if the effects would last indefinetly but only with the the piece of armour on and remove it when it is not equipped. I hope someone much smarter than i am can help me out with this! Thanks!
 
Status
Not open for further replies.