Skript Help: Elytra Disable item

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

Flopsyz

Member
Mar 21, 2024
10
0
1
24
Hey, I wanted help on this item I was going to make for my server. When used, whoever the player hits with the item (shears) can't be able to use their elytra for 1.5 or 2 seconds. I want it to not damage the player and I want it to be a one use only item.

Here is the skript I have right now but it doesnt remove the item from my inventory:
code_language.skript:
#Need help on setting a cooldown for how long the gliding of victim is off

on damage:
    if attacker is a player:
        if attacker's tool is shears:
            if name of attacker's tool is "&f&lElytra Disabler":
                cancel event
                remove attacker's tool from attacker's inventory #idk what i did here lol
                set gliding of victim to off
f
 
I think you should be able to do:
Code:
set item cooldown of elytra for victim to (random number between 1.5 and 2) seconds
if not try
Code:
victim's chestplate is an elytra:
    set item cooldown of victim's chestplate for victim to (random number between 1.5 and 2) seconds
The above 2 examples both require Skript 2.8+

Otherwise you can probably just set a variable to true that makes it so they can't glide.
 
I will try it when I get home and let you know! Also would it be "remove 1 event-item from player's inventory"?