Action bar cooldown

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

rafti123

New Member
Feb 2, 2025
7
0
1
25
How can i make a shield that dashs you forward with an action bar that displays the cooldown of the item when holding it and says "ready" when its ready to use again
 
Hope this helps, im quite new to the skript so sorry if it wont work properly, this code dashes you the way you are looking btw
Code:
On right click with shield:
    if name of player's tool is "&fDash": #<- Shield name, change it as you want
        if {dash.cooldown.%player%} is not set:
            push player forwards with force 2 #<- You can change the force of the dash
            set {dash.cooldown.%player%} to 10 #<- Here you can change the cooldown time
            while {dash.cooldown.%player%} is higher than 0:
                send action bar "&4Cooldown: &c%{dash.cooldown.%player%}%" to player #<- Cooldown message, change it as you want
                wait 1 second
                subtract 1 from {dash.cooldown.%player%}
            send action bar "&aReady" to player #<- "Ready" message, change it as you want
            delete {dash.cooldown.%player%}
 
If you want the player to dash only forwards heres my code
Code:
On right click with shield:
    if name of player's tool is "&fDash": #<- Shield name, change it as you want
        if {dash.cooldown.%player%} is not set:
            set {player.pitch.%player%} to player's pitch
            set player's pitch to 0
            push player forward with force 5 #<- You can change the force of the dash
            set player's pitch to {player.pitch.%player%}
            set {dash.cooldown.%player%} to 10 #<- Here you can change the cooldown time
            while {dash.cooldown.%player%} is higher than 0:
                send action bar "&4Cooldown: &c%{dash.cooldown.%player%}%" to player #<- Cooldown message, change it as you want
                wait 1 second
                subtract 1 from {dash.cooldown.%player%}
            send action bar "&aReady" to player #<- "Ready" message, change it as you want
            delete {dash.cooldown.%player%}
 
Or, if you want the player to being pushed arc, heres the code
Code:
On right click with shield:
    if name of player's tool is "&fDash": #<- Shield name, change it as you want
        if {dash.cooldown.%player%} is not set:
            set {player.pitch.%player%} to player's pitch
            set player's pitch to 0
            push player forward with force 5 #<- You can change the force of the dash
            push player upwards with force 1.5 #<- You can change the force of the dash (upwards force)
            set player's pitch to {player.pitch.%player%}
            set {dash.cooldown.%player%} to 10 #<- Here you can change the cooldown time
            while {dash.cooldown.%player%} is higher than 0:
                send action bar "&4Cooldown: &c%{dash.cooldown.%player%}%" to player #<- Cooldown message, change it as you want
                wait 1 second
                subtract 1 from {dash.cooldown.%player%}
            send action bar "&aReady" to player #<- "Ready" message, change it as you want
            delete {dash.cooldown.%player%}
 
Hope this helps, im quite new to the skript so sorry if it wont work properly, this code dashes you the way you are looking btw
Code:
On right click with shield:
    if name of player's tool is "&fDash": #<- Shield name, change it as you want
        if {dash.cooldown.%player%} is not set:
            push player forwards with force 2 #<- You can change the force of the dash
            set {dash.cooldown.%player%} to 10 #<- Here you can change the cooldown time
            while {dash.cooldown.%player%} is higher than 0:
                send action bar "&4Cooldown: &c%{dash.cooldown.%player%}%" to player #<- Cooldown message, change it as you want
                wait 1 second
                subtract 1 from {dash.cooldown.%player%}
            send action bar "&aReady" to player #<- "Ready" message, change it as you want
            delete {dash.cooldown.%player%}
thanks its working really well but can you maybe make it so the "ready" stays until the next use and tell me how i can add another abilty that pushes the player up to the action bar
 
thanks its working really well but can you maybe make it so the "ready" stays until the next use and tell me how i can add another abilty that pushes the player up to the action bar
Sorry, I dont understand what you mean by "
that pushes the player up to the action bar
"
 
thanks its working really well but can you maybe make it so the "ready" stays until the next use and tell me how i can add another abilty that pushes the player up to the action bar
Here's the code for the "ready" to stay until the next use while player is holding the shield, if you want it to be shown all the time even if player is not holding the shield just remove the "if loop-player is holding shield named "&fDash" " section
Code:
every tick:
    loop all players:
        if loop-player is holding shield named "&fDash":
            if {dash.cooldown.%loop-player%} is not set:
                send action bar "&aReady" to loop-player
 
Sorry, I dont understand what you mean by "

"
sorry i was tired i meant 2 cooldowns on the action bar at once that can be used by the same abilty and one of the abiltys pushes u straight up in the air and the other dashes you forward
 
sorry i was tired i meant 2 cooldowns on the action bar at once that can be used by the same abilty and one of the abiltys pushes u straight up in the air and the other dashes you forward
i dont know if setting 2 messages in action bar at once is possible