explorer._15

i have a cool warden heart when you hold it, you get special buffs. make it so that when you hold &1Warden Heart, you get cool buffs

Kodari AI
KodariMay 3 at 4:42 pm 4,471 (v2)

I’ll create a Warden Heart item system that grants powerful buffs when held.

WardenHeart
A custom item system featuring a legendary Warden Heart that grants powerful buffs to players who hold it. When equipped in the main hand or off-hand, players receive strength, resistance, night vision, and regeneration effects. The system automatically detects when players hold or stop holding the heart and applies/removes effects accordingly. Perfect for adding unique legendary items to survival or RPG servers.

Created! The Warden Heart system is ready. Here’s what it does:

Features:

  • Grants Strength II, Resistance II, Regeneration I, Speed I, and Night Vision when held

  • Works in both main hand and off-hand

  • Effects apply every second with smooth transitions

  • Admin command /giveheart <player> to give the item (requires wardenheart.admin permission)

  • Cool pickup message and heartbeat sound effect

Installation:

  1. Place warden_heart.sk in plugins/Skript/scripts/

  2. Run /sk reload warden_heart or restart the server

  3. Use /giveheart <player> to give someone the heart

Customization: Edit the options: section at the top to change effect levels, check intervals, or even the item name!

Kodari can make mistakes. Review important code before using.
Files
warden_heart.sk
Code
1 84
warden_heart.sk
# Warden Heart System
# Author: Generated
# Version: 1.0
# Description: Grants special buffs when holding the Warden Heart item

options:
    # Item name that triggers the buffs (include color codes)
    item-name: &1Warden Heart
    
    # How often to check what players are holding (in seconds)
    check-interval: 1 second
    
    # Effect durations (slightly longer than check interval to avoid flickering)
    effect-duration: 3 seconds
    
    # Effect levels (1 = level I, 2 = level II, etc.)
    strength-level: 2
    resistance-level: 2
    regeneration-level: 1
    speed-level: 1

# Check every player's hand every second
every {@check-interval}:
    loop all players:
        set {_mainhand} to name of loop-player's tool
        set {_offhand} to name of loop-player's off hand tool
        
        if {_mainhand} is "{@item-name}":
            apply_warden_buffs(loop-player)
        else if {_offhand} is "{@item-name}":
            apply_warden_buffs(loop-player)

# Function to apply all Warden Heart buffs
function apply_warden_buffs(p: player):
    # Apply strength effect
    apply strength {@strength-level} to {_p} for {@effect-duration}
    
    # Apply resistance effect  
    apply resistance {@resistance-level} to {_p} for {@effect-duration}
    
    # Apply regeneration effect
    apply regeneration {@regeneration-level} to {_p} for {@effect-duration}
    
    # Apply speed effect
    apply speed {@speed-level} to {_p} for {@effect-duration}
    
    # Apply night vision (longer duration to prevent flickering)
    apply night vision 1 to {_p} for 10 seconds

# Admin command to give a Warden Heart to players
command /giveheart [<offline player>]:
    permission: wardenheart.admin
    permission message: &cYou don't have permission to use this command!
    trigger:
        if arg-1 is not set:
            send "&6Usage: /giveheart <player>" to player
            stop
        
        if arg-1 is online:
            set {_heart} to netherite upgrade smithing template named {@item-name}
            set line 1 of lore of {_heart} to "&7A heart torn from the depths"
            set line 2 of lore of {_heart} to "&7of the Deep Dark."
            set line 3 of lore of {_heart} to ""
            set line 4 of lore of {_heart} to "&6⚔ Grants powerful buffs when held"
            set line 5 of lore of {_heart} to "&8Legendary Item"
            
            give {_heart} to arg-1
            send "&aGave Warden Heart to &e%arg-1%&a!" to player
            send "&6You received a &1Warden Heart&6!" to arg-1
        else:
            send "&cThat player is not online!" to player

# Visual feedback when picking up the heart
on pick up:
    set {_itemname} to name of item
    if {_itemname} is "{@item-name}":
        send "&6&lWARDEN HEART &7» &fYou feel immense power flowing through you..." to player
        play sound "entity.warden.heartbeat" with volume 1 and pitch 1 at player

# Script load message
on script load:
    send "&6[Warden Heart] &aScript loaded successfully!" to console
    send "&7- Hold the &1Warden Heart &7to gain buffs" to console
    send "&7- Use /giveheart <player> to give the item" to console