_iiroma

Make me a skript that add a 30sec cooldown to the lunge of the spear and make it apper on the item

Kodari AI
KodariJul 21 at 3:22 pm 5
SpearLungeCooldown
Adds a 30-second cooldown to trident spear lunges. When a player uses a trident, the script applies Minecraft's built-in item cooldown display, making the trident visibly unavailable until the cooldown completes. The cooldown prevents repeated lunge activation and is tracked separately for each player, while allowing all players to use their own tridents independently.

Place this file in plugins/Skript/scripts/, then run /sk reload spear_lunge_cooldown.

Kodari can make mistakes. Review important code before using.
Files
spear_lunge_cooldown.sk
Code
1 11
spear_lunge_cooldown.sk
# Spear Lunge Cooldown
# Place in: plugins/Skript/scripts/
# Reload with: /sk reload spear_lunge_cooldown

options:
    cooldown: 30 seconds

# Applies a visible vanilla cooldown overlay to the trident after use.
on right click:
    if player's tool is trident:
        set item cooldown of player for trident to {@cooldown}