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.

Skript Speed Issue

Discussion in 'Skript' started by Grenax, May 27, 2021.

Thread Status:
Not open for further replies.
  1. Grenax

    Grenax Member

    Joined:
    May 27, 2021
    Messages:
    1
    Likes Received:
    0
    Hello! I'm currently working on a dungeon-crawler type server. One of the items that mages are going to be able to use is called the "Ghost Cloak". The skript for it isn't working so great. Here is what I have:

    Code (Text):
    1. command /ghostcloak:
    2.     permission: op
    3.     permission message: "&cYou do not have permission to do that!"
    4.     trigger:
    5.         give player unbreakable chainmail chestplate named "&5Ghost Cloak" with lore "&7Health: &a+25 HP" and "&7Defense: &a+15" and "" and "&6Item Ability: Phantom Zone &e&lSHIFT" and "&7When sneaking, gain &f✦ Speed 8" and "&apotion effect&7. Spooky!"
    6.  
    7. on player toggle sneak:
    8.     if name of player's chestplate is "&5Ghost Cloak":
    9.         player is sneaking
    10.         set player's walk speed to 8
    11.         player isn't sneaking
    12.         set player's walk speed to 1
    13.     if name of player's chestplate isn't "&5Ghost Cloak":
    14.         set player's walk speed to 1
    It works but if you unshift, you still have the speed bonus and even if you take the chestplate off AFTER shifting, you still gain the speed. I've tried everything I can but I can't figure this out. Please help!

    Thanks,
    Grenax
    (also, if i take a while to respond to you it is probably because i am getting right off after i make this forum post. if you need me to reply with something, check back tomorrow and i may get back to you. sorry in advance. thank you for your patience!)
     
  2. Marcel12082007

    Joined:
    May 7, 2021
    Messages:
    3
    Likes Received:
    1
    I don`t know but try this:
    on player toggle sneak:
    if name of player's chestplate is "&5Ghost Cloak":
    if player is sneaking:
    set player's walk speed to 8
    else:
    set player's walk speed to 1
    else:
    set player's walk speed to 1
     
Thread Status:
Not open for further replies.

Share This Page

Loading...