Rapid-fire your requests :)

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

Code:
on right click:
  if {artilery.%uuid of player%} is true:
    if {overheat.%uuid of player%} is not set:
      set {overheat.%uuid of player%} to 0
      
    if {overheat.%uuid of player%} < 5:  # Adjust the overheat limit as needed
      set {guncd} to difference between {gunclick.%player%} and now
      if {guncd} < 0.5 seconds:
        cancel event
        stop
      
      set {gunclick.%player%} to now
      set {reloading.%player%} to false
      shoot a fireball from player at speed 2.5
      play sound "entity.generic.explode" from master category at volume 2 with pitch 2 at player's location
      add 1 to {overheat.%uuid of player%}
      
      # Construct overheat bar
      set {_overheatBar} to "&8[&c|||||&8]" # Default full overheat bar
      if {overheat.%uuid of player%} >= 1:
        set {_overheatBar} to "&8[&c|&8||||]"
      if {overheat.%uuid of player%} >= 2:
        set {_overheatBar} to "&8[&c||&8|||]"
      if {overheat.%uuid of player%} >= 3:
        set {_overheatBar} to "&8[&c|||&8||]"
      if {overheat.%uuid of player%} >= 4:
        set {_overheatBar} to "&8[&c||||&8|]"
      if {overheat.%uuid of player%} >= 5:
        set {_overheatBar} to "&8[&c|||||&8]"
      send {_overheatBar} to player
      
      wait 5 seconds
      
      # Update overheat bar during cooldown
      repeat 5 times:
        wait 1 second
        if {overheat.%uuid of player%} == 0:
          send "&8[&c|||||&8]" to player
        if {overheat.%uuid of player%} == 1:
          send "&8[&c||||&8|&8]" to player
        if {overheat.%uuid of player%} == 2:
          send "&8[&c|||&8||&8]" to player
        if {overheat.%uuid of player%} == 3:
          send "&8[&c||&8|||&8]" to player
        if {overheat.%uuid of player%} == 4:
          send "&8[&c|&8||||]" to player
      
      remove 5 from {overheat.%uuid of player%}
      send "Cooldown complete. Overheat counter: %{overheat.%uuid of player%}%/5" to player
      
    else:
      play sound "entity.ghast.scream" from master category at volume 2 with pitch 1 at player's location
      send "Your artillery is overheating! Please wait a moment before firing again." to player
 
so everythign works execpt when its counting down it goes crazy can anyone help?