Discord Thread Custom Armor Effect

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

This thread came from the skUnity Discord. You can't reply to it here but if you join the skUnity Discord, you'll be able to post a reply there. The thread link is part of the thread's message.
Status
Not open for further replies.
because on any move is for all players, for example you have 50 player, it will constant check if these 50 players have their cosplay on. Using a while loop is more optimized because if 3 players from the 50 players have their cosplay on, it would be more performace friendly

Posted by: loudo_ from the skUnity Discord.
 
code_language.skript:
c
function cosplayEvent(p: player):
    if {_p} has permission "haifunime.subscription.subcribed":
        if block under the {_p} is solid:
            if block under the {_p} isn't any slab:
                 if block under {_p} is not terracotta:
                      set {_x} to getNumber("%x-coord of {_p}%")
                      set {_y} to getNumber("%y-coord of {_p}%")
                      set {_z} to getNumber("%z-coord of {_p}%")
                      if block under {_p} is not terracotta:
                          if {t::move-block::%{_x}%::%{_y}%::%{_z}%} is not set:
                              set {t::move-block::%{_x}%::%{_y}%::%{_z}%} to true
                              set {_loc} to location of block under {_p}
                              set {_i} to type of block at {_loc}
                              set block at {_loc} to yellow terracotta
                              wait 3 seconds
                              set block at {_loc} to {_i}
                              delete {t::move-block::%{_x}%::%{_y}%::%{_z}%}

command /suits [<text>]:
    trigger:
        if arg-1 is set:
            if arg-1 is "off":
                clear {cosplay::%uuid of player%}
            else if arg-1 is "golden_dawn":
                set {cosplay::%uuid of player%} to true
            while {cosplay::%uuid of player%}:
                cosplayEvent(player)
                wait 1 tick

Something like this
np

Posted by: loudo_ from the skUnity Discord.
 
Status
Not open for further replies.