L

now the trident shield disable is good but it doubles the disable duration, remove the double disable duration ty keep everything intact

Kodari AI
KodariAug 29 at 1:21 pm 1

Removed the duplicate trident shield disable duration application while keeping the initial 5-second cooldown and cleanup intact.

Reload with:

Plain Text
/sk reload strengthsmp_jar_kill_logic (16)
L

make it like the axe not a custom disable ty, remove the custom disable i want it to act like an axe disable ty

Kodari AI
KodariAug 29 at 1:25 pm 1
  • Remove the trident-only shield cancellation, item removal/restoration, tracking variables, and timer.

  • Keep only the normal shield cooldown on a successful blocking trident hit, matching the axe-style cooldown behavior.

Removed the custom trident shield-disable system. Trident hits now only apply the standard 5-second shield cooldown, matching the axe-style behavior.

Reload with:

Plain Text
/sk reload strengthsmp_jar_kill_logic (16)
L

the shield is bypassable it can still be hold even if its disabled already, fix it

Kodari AI
KodariAug 29 at 1:28 pm 1

Fixed the shield bypass:

  • Shield users are forcibly stopped from blocking when disabled.

  • Right-clicking with a shield during its cooldown is cancelled.

  • Both main-hand and offhand shields are covered.

Reload with:

Plain Text
/sk reload strengthsmp_jar_kill_logic (16)
L
📎 1 file 1,902 chars
📄
pasted-code-1788010156987.txt
txt 33 lines
▶
sk reload strengthsmp_jar_kill_logic.sk
[13:29:03 INFO]: [Skript] Reloading strengthsmp_jar_kill_logic.sk...
[13:29:04 INFO]: Line 316: (strengthsmp_jar_kill_logic.sk)
[13:29:04 INFO]:     The condition '3 is greater than 0' will always be true.
[13:29:04 INFO]:     Line: if {@strength_craft_limit} > 0:
[13:29:04 INFO]:  
[13:29:04 INFO]: Line 596: (strengthsmp_jar_kill_logic.sk)
[13:29:04 INFO]:     The condition 'true is equal to true' will always be true.
[13:29:04 INFO]:     Line: if {@no_strength} is true:
[13:29:04 INFO]:  
[13:29:04 INFO]: Line 640: (strengthsmp_jar_kill_logic.sk)
[13:29:04 INFO]:     The condition 'true is equal to true' will always be true.
[13:29:04 INFO]:     Line: if {@deal_less_damage} is true:
[13:29:04 INFO]:  
[13:29:04 INFO]: Line 1113: (strengthsmp_jar_kill_logic.sk)
[13:29:04 INFO]:     Can't understand this condition/effect: make victim stop using item
[13:29:04 INFO]:     Line: make victim stop using item
[13:29:04 INFO]:  
[13:29:04 INFO]: Line 1120: (strengthsmp_jar_kill_logic.sk)
[13:29:04 INFO]:     Can't understand this condition/effect: make player stop using item
[13:29:04 INFO]:     Line: make player stop using item
[13:29:04 INFO]:  
[13:29:04 INFO]: Line 1123: (strengthsmp_jar_kill_logic.sk)
[13:29:04 INFO]:     Can't understand this condition/effect: make player stop using item
[13:29:04 INFO]:     Line: make player stop using item
[13:29:04 INFO]:  
[13:29:04 INFO]: Line 1468: (strengthsmp_jar_kill_logic.sk)
[13:29:04 INFO]:     The condition 'true is equal to true' will always be true.
[13:29:04 INFO]:     Line: if {@show_duration_in_actionbar} is true:
[13:29:04 INFO]:  
[13:29:04 INFO]: Line 1485: (strengthsmp_jar_kill_logic.sk)
[13:29:04 INFO]:     The condition 'false is equal to true' will always be false.
[13:29:04 INFO]:     Line: if {@show_ultimate_indicator_in_actionbar} is true:
Kodari AI
KodariAug 29 at 1:30 pm 1

Fixed the reload errors by replacing the unsupported make ... stop using item syntax with Skript’s valid active-item interruption effect.

The warnings about constant options are harmless. Reload with:

Plain Text
/sk reload strengthsmp_jar_kill_logic.sk
L

[13:30:48 INFO]: [Skript] Reloading strengthsmp_jar_kill_logic.sk... [13:30:48 INFO]: Line 1113: (strengthsmp_jar_kill_logic.sk) [13:30:48 INFO]: indentation error: expected 28 spaces, but found '->____________________________' [-> = tab, _ = space, ? = other whitespace] [13:30:48 INFO]:

Line: interrupt the usage of victim's active item [13:30:48 INFO]: [13:30:48 INFO]: Line 1120: (strengthsmp_jar_kill_logic.sk) [13:30:48 INFO]: indentation error: expected 12 spaces, but found '->____________' [-> = tab, _ = space, ? = other whitespace] [13:30:48 INFO]:

Line: interrupt the usage of player's active item [13:30:48 INFO]: [13:30:48 INFO]: Line 1123: (strengthsmp_jar_kill_logic.sk) [13:30:48 INFO]: indentation error: expected 12 spaces, but found '->____________' [-> = tab, _ = space, ? = other whitespace] [13:30:48 INFO]:

Line: interrupt the usage of player's active item [13:30:48 INFO]:

Kodari AI
KodariAug 29 at 1:31 pm 1

Fixed the indentation errors on all three interrupt the usage... lines. The script should now reload without those errors:

Plain Text
/sk reload strengthsmp_jar_kill_logic.sk
L

now fix the crossbow passive, it uhm when i use shield and a player with a crossbow hits me it pierces through but it doubles the damage.

Kodari AI
KodariAug 29 at 1:37 pm 1

Plan:

  • Guard the custom shield-piercing damage from reprocessing.

  • Zero and cancel the original blocked-arrow event.

  • Apply exactly one replacement hit, preserving the piercing behavior.

Fixed the crossbow shield-piercing passive so it applies exactly one damage instance instead of doubling the damage.

Reload with:

Plain Text
/sk reload strengthsmp_jar_kill_logic.sk
L

now add a new ability called armor

ARMOR PASSIVE:

TURNS EVERY DIAMOND ARMOR TO NETHERITE ARMOR (make sure it only works when the player wears a diamond armor, and if they wear it off it turns into a diamond armor again, with the same enchantments btw and name if they added, ty do it please)

ARMOR ULTIMATE:

YOU TAKE 0 KNOCKBACKS AND GOLDEN APPLE GIVES ABSORPTION 4

Kodari AI
KodariAug 29 at 1:51 pm 6
  1. Add the Armor passive with reversible diamond/netherite conversion while preserving names and enchantments.

  2. Add the Armor ultimate effects: no knockback and Golden Apple absorption IV.

Added the Armor ability:

  • Passive: Diamond armor automatically becomes Netherite while worn, preserving enchantments, custom names, lore, durability, and metadata. Removing it converts it back to Diamond.

  • Ultimate: Lasts 15 seconds, prevents knockback, and makes Golden Apples grant Absorption IV.

  • Added Armor to randomization, /strengthsmp setweapon armor, cooldowns, info GUI, and action-bar displays.

Reload it with:

Plain Text
/sk reload strengthsmp_jar_kill_logic.sk
Kodari can make mistakes. Review important code before using.
Files
strengthsmp_jar_kill_logic (16).sk
Code
1 1,709
strengthsmp_jar_kill_logic (16).sk
# ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

# CONFIG
options:
    max_strength: 5 # Maximum strength
    strength_kill_cooldown: 30 minutes # Prevents farming the same player for strength
    max_strength_damage_bonus: 1.60 # HARD CAP: maximum extra damage from Strength
    def_strength: 5 # Default strength on join
    min_strength: 5 # Minimum strength
    minimum_strength_to_activate_abillity: 5
    minimum_strength_to_have_passive: 3
    show_duration_in_actionbar: true
    show_ultimate_indicator_in_actionbar: false # Show weapon ultimate charge/Ready indicators in the action bar
    strength_craft_limit: 3 # Maximum Strength items each player can craft; 0 = unlimited
    stun_axe_duration: 1
    sword_ultimate_multiplier: 1.5
    mace_cooldown: 180 # 0 = no cooldown
    no_strength: true
    deal_less_damage: true # Less damage if strength is negative (very unbalanced)
    bow_beam_damage: 3 # Power I = 3 hearts per beam
    bow_beam_max_damage: 6 # Power III+ = 5 hearts per beam; hard cap
    bow_beam_range: 30
    bow_beam_width: 2.0
    bow_recoil_force: 0.2
    
# COOLDOWN
    sword_cooldown: 60
    axe_cooldown: 120
    trident_cooldown: 60
    shield_cooldown: 60
    bow_cooldown: 60
    crossbow_cooldown: 60
    armor_cooldown: 60

# DURATION
    sword_duration: 15
    axe_duration: 5
    trident_duration: 15
    shield_duration: 15
    crossbow_duration: 15
    armor_duration: 15
    bow_beams: 3 # The amount of how many beams it will shoot

# COUNTERSREADY
    sword_ultimate: 5
    axe_ultimate: 7
    axe_ultimate_damage_multiplier: 0.65 # Stores 65% of each hit's damage
    axe_ultimate_max_damage: 15 # Maximum stored damage (15 hearts)
    trident_ultimate: 3
    crossbow_ultimate_charge: 5
    bow_ultimate: 10
    
# COUNTERSPASSIVE
    sword_passive: 3
    axe_passive: 5
    trident_passive: 2
    crossbow_ignite_chance: 33
    bow_passive: 3

#------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

# CODE

# ITEMS AND REST
on load:
    if {strengthKillCooldownTime} is not set:
        set {strengthKillCooldownTime} to {@strength_kill_cooldown}
    set {-strength.strengthsmp} to nautilus shell named "&x&F&F&0&0&0&0&ls&x&E&3&0&0&0&0&lᴛ&x&C&7&0&0&0&0&lʀ&x&A&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ite_chance}%% ᴄʜᴀɴᴄᴇ ᴛᴏ ɪɢɴɪᴛᴇ ᴇɴᴇᴍɪᴇs", "", "&x&F&4&F&F&8&9&l➶ &x&F&8&F&9&6&9&lᴜ&x&F&B&F&7&5&9&lʟ&x&F&D&F&4&4&9&lᴛ&x&F&F&F&1&3&9&lɪ&x&F&F&F&1&3&9&lᴍ&x&F&F&F&1&3&9&lᴀ&x&F&F&F&1&3&9&lᴛ&x&F&F&F&1&3&9&lᴇ&x&F&F&F&1&3&9&l:", "&e🠺 &fɢᴇᴛ {@crossbow_ultimate_charge} ʜɪᴛs ᴛᴏ ᴄʜᴀʀɢᴇ", "&e🠺 &fɢᴀɪɴ Qᴜɪᴄᴋ Cʜᴀʀɢᴇ V ᴀɴᴅ Pᴏᴡᴇʀ V ғᴏʀ 15s"
    set {-sword.strengthsmp} to netherite sword named "&x&F&C&5&C&5&C&l🗡 &x&D&1&3&A&3&A&ls&x&B&B&2&9&2&9&lᴡ&x&A&5&1&8&1&8&lᴏ&x&A&5&1&8&1&8&lʀ&x&A&5&1&8&1&8&lᴅ" with lore "&x&F&C&5&C&5&C&l🗡 &x&D&9&4&1&4&1&lᴘ&x&C&8&3&3&3&3&lᴀ&x&B&6&2&6&2&6&ls&x&A&5&1&8&1&8&ls&x&A&5&1&8&1&8&lɪ&x&A&5&1&8&1&8&lᴠ&x&A&5&1&8&1&8&lᴇ&x&A&5&1&8&1&8&l:", "&c🠺 &fᴀғᴛᴇʀ ʟᴀɴᴅɪɴɢ ᴀ 3-ʜɪᴛ ᴄᴏᴍʙᴏ ᴏɴ ᴀ ᴘʟᴀʏᴇʀ, ʏᴏᴜʀ ᴀᴛᴛᴀᴄᴋs ʙᴇᴄᴏᴍᴇ ᴄʀɪᴛɪᴄᴀʟ ʜɪᴛs", "&c🠺 &fᴄʀɪᴛɪᴄᴀʟ ʜɪᴛs ʟᴀsᴛ ᴜɴᴛɪʟ ʏᴏᴜ ᴍɪss", "", "&x&F&C&5&C&5&C&l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l:", "&b🠺 &fsᴜᴍᴍᴏɴ ᴀ ᴛʜᴜɴᴅᴇʀsᴛᴏʀᴍ ғᴏʀ {@trident_duration}s" and "&b🠺 &fᴄʀɪᴛs sᴜᴍᴍᴏɴ ʟɪɢʜᴛɴɪɴɢ ᴀɴᴅ ᴅᴇᴀʟ ᴇxᴛʀᴀ ᴅᴀᴍᴀɢᴇ"
    set {-shield.strengthsmp} to shield named "&x&8&C&F&C&5&C&l🛡 &x&5&C&D&1&3&A&ls&x&4&3&B&B&2&9&lʜ&x&2&B&A&5&1&8&lɪ&x&2&B&A&5&1&8&lᴇ&x&2&B&A&5&1&8&lʟ&x&2&B&A&5&1&8&lᴅ" with lore "&x&8&C&F&C&5&C&l🛡 &x&6&5&D&9&4&1&lᴘ&x&5&2&C&8&3&3&lᴀ&x&3&E&B&6&2&6&ls&x&2&B&A&5&1&8&ls&x&2&B&A&5&1&8&lɪ&x&2&B&A&5&1&8&lᴠ&x&2&B&A&5&1&8&lᴇ&x&2&B&A&5&1&8&l:", "&a🠺 &fʏᴏᴜ ᴛᴀᴋᴇ 25%% ʟᴇss ᴅᴀᴍᴀɢᴇ", "&a🠺 &fғᴏʀ 5s ᴡʜᴇɴ ʏᴏᴜʀ sʜɪᴇʟᴅ ɪs ᴅɪsᴀʙʟᴇᴅ", "", "&x&8&C&F&C&5&C&l🛡 &x&6&C&D&F&4&5&lᴜ&x&5&C&D&1&3&A&lʟ&x&4&B&C&2&2&F&lᴛ&x&3&B&B&4&2&3&lɪ&x&2&B&A&5&1&8&lᴍ&x&2&B&A&5&1&8&lᴀ&x&2&B&A&5&1&8&lᴛ&x&2&B&A&5&1&8&lᴇ&x&2&B&A&5&1&8&l:" and "&a🠺 &fʙᴇᴄᴏᴍᴇ ɪᴍᴍᴏʀᴛᴀʟ ғᴏʀ 15s"
    set {-axe.strengthsmp} to netherite axe named "&x&9&F&9&F&9&F&l🪓 &x&6&E&6&E&6&E&lᴀ&x&5&5&5&5&5&5&lx&x&5&5&5&5&5&5&lᴇ" with lore "&x&9&F&9&F&9&F&l🪓 &x&8&1&8&1&8&1&lᴘ&x&7&3&7&3&7&3&lᴀ&x&6&4&6&4&6&4&ls&x&5&5&5&5&5&5&ls&x&5&5&5&5&5&5&lɪ&x&5&5&5&5&5&5&lᴠ&x&5&5&5&5&5&5&lᴇ&x&5&5&5&5&5&5&l:", "&7🠺 &fɢᴇᴛ {@axe_passive} ᴄʀɪᴛs ᴛᴏ sᴛᴜɴ ʏᴏᴜʀ ᴇɴᴇᴍʏ ғᴏʀ 1s", "", "&x&9&F&9&F&9&F&l🪓 &x&8&6&8&6&8&6&lᴜ&x&7&A&7&A&7&A&lʟ&x&6&E&6&E&6&E&lᴛ&x&6&1&6&1&6&1&lɪ&x&5&5&5&5&5&5&lᴍ&x&5&5&5&5&5&5&lᴀ&x&5&5&5&5&5&5&lᴛ&x&5&5&5&5&5&5&lᴇ&x&5&5&5&5&5&5&l:", "&7🠺 &fɢᴇᴛ {@axe_ultimate} ᴄʀɪᴛs ᴛᴏ ᴄʜᴀʀɢᴇ", "&7🠺 &fᴀʟʟ ᴏғ ʏᴏᴜʀ ɴᴇxᴛ ᴀᴛᴛᴀᴄᴋs ᴡɪʟʟ ʙᴇ sᴛᴏʀᴇᴅ" and "&7🠺 &fᴀɴᴅ ʀᴇʟᴇᴀsᴇᴅ ᴏɴᴛᴏ ʏᴏᴜʀ ᴇɴᴇᴍʏ"
    set {-bow.strengthsmp} to bow named "&x&F&F&A&B&2&9&l🏹 &x&E&2&7&E&0&E&lʙ&x&D&4&6&7&0&0&lᴏ&x&D&4&6&7&0&0&lᴡ" with lore "&x&F&F&A&B&2&9&l🏹 &x&E&E&9&0&1&9&lᴘ&x&E&5&8&2&1&0&lᴀ&x&D&D&7&5&0&8&ls&x&D&4&6&7&0&0&ls&x&D&4&6&7&0&0&lɪ&x&D&4&6&7&0&0&lᴠ&x&D&4&6&7&0&0&lᴇ&x&D&4&6&7&0&0&l:", "&6🠺 &fᴇᴠᴇʀʏ ᴛʜɪʀᴅ sʜᴏᴛ ᴅᴏᴇs ᴅᴏᴜʙʟᴇ ᴅᴀᴍᴀɢᴇ", "", "&x&F&F&A&B&2&9&l🏹 &x&F&1&9&4&1&B&lᴜ&x&E&A&8&9&1&5&lʟ&x&E&2&7&E&0&E&lᴛ&x&D&B&7&2&0&7&lɪ&x&D&4&6&7&0&0&lᴍ&x&D&4&6&7&0&0&lᴀ&x&D&4&6&7&0&0&lᴛ&x&D&4&6&7&0&0&lᴇ&x&D&4&6&7&0&0&l:", "&6🠺 &fɢᴇᴛ {@bow_ultimate} ʜɪᴛs ᴛᴏ ᴄʜᴀʀɢᴇ" and "&6🠺 &fsʜᴏᴏᴛ 3 ᴘᴏᴡᴇʀғᴜʟ ʙᴇᴀᴍs"
    register new shaped recipe for {-strength.strengthsmp} using enchanted golden apple, netherite ingot, enchanted golden apple, netherite ingot, nether star, netherite ingot, enchanted golden apple, netherite ingot and enchanted golden apple with id "strength"
    register new shaped recipe for {-reroll.strengthsmp} using iron block, gold block, iron block, gold block, diamond block, gold block, iron block, gold block and iron block with id "reroll_book"

on load:
    set {-armor.strengthsmp} to netherite chestplate named "&b&lArmor" with lore "&bPassive: &fDiamond armor becomes netherite armor", "&bUltimate: &fNo knockback and Golden Apples give Absorption IV"

on join:
    # Clean up the base value once when the player joins.
    set player's attack speed attribute to 4
    delete {-swordSpeedState::%player's uuid%}
    if {strength::%player's uuid%} is not set:
        set {strength::%player's uuid%} to {@def_strength}
        RandomWeapon(player)
    if {weapon::%player's uuid%} is "trident":
        if player's tool is trident:
            set player's attack speed attribute to 4.5
    loop "sword", "axe", "trident", "shield", "bow", "crossbow" and "armor":
        if {strengthCooldown::%player's uuid%::%loop-value%} is not set:
            set {strengthCooldown::%player's uuid%::%loop-value%} to "Ready"
    delete {-shieldReadyNotified::%player's uuid%}
    if {-swordAbility::%player's uuid%} is not set:
        if {offhandItem::%player's uuid%} is set:
            set the off hand item to {offhandItem::%player's uuid%}
            delete {offhandItem::%player's uuid%}

# FUNCTIONS

function RandomWeapon(p: player):
    set {_uuid} to {_p}'s uuid
    restoreArmor({_p})
    set {_weapons::*} to "trident", "sword", "axe", "shield", "bow", "crossbow" and "armor"
    set {_ru} to random integer between 1 and 7
    while {_weapons::%{_ru}%} is {weapon::%{_uuid}%}:
        set {_ru} to random integer between 1 and 7
    set {weapon::%{_uuid}%} to {_weapons::%{_ru}%}
    send "&x&F&F&D&2&5&C&lʏ&x&F&A&C&C&5&4&lᴏ&x&F&5&C&6&4&B&lᴜ&x&E&F&C&0&4&3&lʀ &x&E&5&B&4&3&2&lɴ&x&E&0&A&E&2&A&lᴇ&x&D&B&A&8&2&1&lᴡ &x&D&0&9&C&1&1&lᴡ&x&C&B&9&6&0&8&lᴇ&x&C&6&9&0&0&0&lᴀ&x&C&6&9&0&0&0&lᴘ&x&C&6&9&0&0&0&lᴏ&x&C&6&9&0&0&0&lɴ &x&C&6&9&0&0&0&lᴛ&x&C&6&9&0&0&0&lʏ&x&C&6&9&0&0&0&lᴘ&x&C&6&9&0&0&0&lᴇ &x&C&6&9&0&0&0&lɪ&x&C&6&9&0&0&0&ls %getWeaponDisplay({weapon::%{_uuid}%})%" to {_p}
    play sound "entity.experience_orb.pickup" to {_p}

function restoreArmor(p: player):
    set {_uuid} to {_p}'s uuid
    if {-armorConvertedItem::%{_uuid}%::helmet} is set:
        if helmet of {_p} is {-armorConvertedItem::%{_uuid}%::helmet}:
            set {_item} to helmet of {_p}
            set type of {_item} to diamond helmet
            set helmet of {_p} to {_item}
        delete {-armorConvertedItem::%{_uuid}%::helmet}
    if {-armorConvertedItem::%{_uuid}%::chestplate} is set:
        if chestplate of {_p} is {-armorConvertedItem::%{_uuid}%::chestplate}:
            set {_item} to chestplate of {_p}
            set type of {_item} to diamond chestplate
            set chestplate of {_p} to {_item}
        delete {-armorConvertedItem::%{_uuid}%::chestplate}
    if {-armorConvertedItem::%{_uuid}%::leggings} is set:
        if leggings of {_p} is {-armorConvertedItem::%{_uuid}%::leggings}:
            set {_item} to leggings of {_p}
            set type of {_item} to diamond leggings
            set leggings of {_p} to {_item}
        delete {-armorConvertedItem::%{_uuid}%::leggings}
    if {-armorConvertedItem::%{_uuid}%::boots} is set:
        if boots of {_p} is {-armorConvertedItem::%{_uuid}%::boots}:
            set {_item} to boots of {_p}
            set type of {_item} to diamond boots
            set boots of {_p} to {_item}
        delete {-armorConvertedItem::%{_uuid}%::boots}

function invalid_command_message_strengthsmp(p: player):
    send "&cUsage:" to {_p}
    send "&c/strength - Check your strength" to {_p}
    send "&c/withdraw - Withdraw your strength" to {_p}
    send "&c/strengthsmp set <player> <amount> - Set player's strength" to {_p}
    send "&c/strengthsmp reroll <player> - Reroll player's weapon" to {_p}
    send "&c/strengthsmp setweapon <weapon> <player> - Set player's weapon" to {_p}
    send "&c/strengthsmp reload - Reload config" to {_p}

function cap_strength(p: player):
    set {_uuid} to {_p}'s uuid
    if {strength::%{_uuid}%} > {@max_strength}:
        set {strength::%{_uuid}%} to {@max_strength}

function update_strength_message(p: player):
    set {_uuid} to {_p}'s uuid
    if {strength::%{_uuid}%} > 0:
        send "&x&F&F&0&0&0&0&lʏ&x&F&6&0&0&0&0&lᴏ&x&E&C&0&0&0&0&lᴜ&x&E&3&0&0&0&0&lʀ &x&D&0&0&0&0&0&lɴ&x&C&7&0&0&0&0&lᴇ&x&B&E&0&0&0&0&lᴡ &x&A&B&0&0&0&0&ls&x&A&2&0&0&0&0&lᴛ&x&9&8&0&0&0&0&lʀ&x&8&F&0&0&0&0&lᴇ&x&8&F&0&0&0&0&lɴ&x&8&F&0&0&0&0&lɢ&x&8&F&0&0&0&0&lᴛ&x&8&F&0&0&0&0&lʜ &x&8&F&0&0&0&0&lɪ&x&8&F&0&0&0&0&ls &x&8&F&0&0&0&0&l(&x&8&F&0&0&0&0&l+%{strength::%{_uuid}%}%&x&8&F&0&0&0&0&l)" to {_p}
    else if {strength::%{_uuid}%} <= 0:
        send "&x&F&F&0&0&0&0&lʏ&x&F&5&0&0&0&0&lᴏ&x&E&B&0&0&0&0&lᴜ&x&E&0&0&0&0&0&lʀ &x&C&C&0&0&0&0&lɴ&x&C&2&0&0&0&0&lᴇ&x&B&8&0&0&0&0&lᴡ &x&A&3&0&0&0&0&ls&x&9&9&0&0&0&0&lᴛ&x&8&F&0&0&0&0&lʀ&x&8&F&0&0&0&0&lᴇ&x&8&F&0&0&0&0&lɴ&x&8&F&0&0&0&0&lɢ&x&8&F&0&0&0&0&lᴛ&x&8&F&0&0&0&0&lʜ &x&8&F&0&0&0&0&lɪ&x&8&F&0&0&0&0&ls &x&8&F&0&0&0&0&l(%{strength::%{_uuid}%}%&x&8&F&0&0&0&0&l)" to {_p}

function getWeaponDisplay(w: text) :: text:
    if {_w} is "armor":
        return "&b&l🛡 Armor"
    else if {_w} is "trident":
        return "&x&5&C&B&5&F&C&l🔱 &x&4&1&8&C&D&9&lᴛ&x&3&3&7&8&C&8&lʀ&x&2&6&6&3&B&6&lɪ&x&1&8&4&F&A&5&lᴅ&x&1&8&4&F&A&5&lᴇ&x&1&8&4&F&A&5&lɴ&x&1&8&4&F&A&5&lᴛ"
    else if {_w} is "sword":
        return "&x&F&C&5&C&5&C&l🗡 &x&D&1&3&A&3&A&ls&x&B&B&2&9&2&9&lᴡ&x&A&5&1&8&1&8&lᴏ&x&A&5&1&8&1&8&lʀ&x&A&5&1&8&1&8&lᴅ"
    else if {_w} is "axe":
        return "&x&9&F&9&F&9&F&l🪓 &x&6&E&6&E&6&E&lᴀ&x&5&5&5&5&5&5&lx&x&5&5&5&5&5&5&lᴇ"
    else if {_w} is "shield":
        return "&x&8&C&F&C&5&C&l🛡 &x&5&C&D&1&3&A&ls&x&4&3&B&B&2&9&lʜ&x&2&B&A&5&1&8&lɪ&x&2&B&A&5&1&8&lᴇ&x&2&B&A&5&1&8&lʟ&x&2&B&A&5&1&8&lᴅ"
    else if {_w} is "bow":
        return "&x&F&F&A&B&2&9&l🏹 &x&E&2&7&E&0&E&lʙ&x&D&4&6&7&0&0&lᴏ&x&D&4&6&7&0&0&lᴡ"
    else if {_w} is "crossbow":
        return "&x&F&4&F&F&8&9&l➶ &x&F&8&F&9&6&9&lᴄ&x&F&B&F&7&5&9&lʀ&x&F&D&F&4&4&9&lᴏ&x&F&F&F&1&3&9&ls&x&F&F&F&1&3&9&ls&x&F&F&F&1&3&9&lʙ&x&F&F&F&1&3&9&lᴏ&x&F&F&F&1&3&9&lᴡ"

function getCooldownMessage(w: text) :: text:
    if {_w} is "armor":
        return "&b&l🛡 Armor Cooldown"
    else if {_w} is "sword":
        return "&x&F&C&5&C&5&C&l🗡 &x&E&3&4&9&4&9&lᴏ&x&D&7&3&F&3&F&lғ&x&C&A&3&5&3&5&lғ &x&B&1&2&2&2&2&lᴄ&x&A&5&1&8&1&8&lᴏ&x&A&5&1&8&1&8&lᴏ&x&A&5&1&8&1&8&lʟ&x&A&5&1&8&1&8&lᴅ&x&A&5&1&8&1&8&lᴏ&x&A&5&1&8&1&8&lᴡ&x&A&5&1&8&1&8&lɴ"
    else if {_w} is "trident":
        return "&x&5&C&B&5&F&C&l🔱 &x&4&5&9&3&D&F&lᴏ&x&3&A&8&2&D&1&lғ&x&2&F&7&1&C&2&lғ &x&1&8&4&F&A&5&lᴄ&x&1&8&4&F&A&5&lᴏ&x&1&8&4&F&A&5&lᴏ&x&1&8&4&F&A&5&lʟ&x&1&8&4&F&A&5&lᴅ&x&1&8&4&F&A&5&lᴏ&x&1&8&4&F&A&5&lᴡ&x&1&8&4&F&A&5&lɴ"
    else if {_w} is "axe":
        return "&x&9&F&9&F&9&F&l🪓 &x&8&6&8&6&8&6&lᴏ&x&7&A&7&A&7&A&lғ&x&6&E&6&E&6&E&lғ &x&5&5&5&5&5&5&lᴄ&x&5&5&5&5&5&5&lᴏ&x&5&5&5&5&5&5&lᴏ&x&5&5&5&5&5&5&lʟ&x&5&5&5&5&5&5&lᴅ&x&5&5&5&5&5&5&lᴏ&x&5&5&5&5&5&5&lᴡ&x&5&5&5&5&5&5&lɴ"
    else if {_w} is "shield":
        return "&x&8&C&F&C&5&C&l🛡 &x&6&C&D&F&4&5&lᴏ&x&5&C&D&1&3&A&lғ&x&4&B&C&2&2&F&lғ &x&2&B&A&5&1&8&lᴄ&x&2&B&A&5&1&8&lᴏ&x&2&B&A&5&1&8&lᴏ&x&2&B&A&5&1&8&lʟ&x&2&B&A&5&1&8&lᴅ&x&2&B&A&5&1&8&lᴏ&x&2&B&A&5&1&8&lᴡ&x&2&B&A&5&1&8&lɴ"
    else if {_w} is "bow":
        return "&x&F&F&A&B&2&9&l🏹 &x&F&1&9&4&1&B&lᴏ&x&E&A&8&9&1&5&lғ&x&E&2&7&E&0&E&lғ &x&D&4&6&7&0&0&lᴄ&x&D&4&6&7&0&0&lᴏ&x&D&4&6&7&0&0&lᴏ&x&D&4&6&7&0&0&lʟ&x&D&4&6&7&0&0&lᴅ&x&D&4&6&7&0&0&lᴏ&x&D&4&6&7&0&0&lᴡ&x&D&4&6&7&0&0&lɴ"
    else if {_w} is "crossbow":
        return "&x&F&4&F&F&8&9&l➶ &x&F&8&F&9&6&9&lᴏ&x&F&B&F&7&5&9&lғ&x&F&D&F&4&4&9&lғ &x&F&F&F&1&3&9&lᴄ&x&F&F&F&1&3&9&lᴏ&x&F&F&F&1&3&9&lᴏ&x&F&F&F&1&3&9&lʟ&x&F&F&F&1&3&9&lᴅ&x&F&F&F&1&3&9&lᴏ&x&F&F&F&1&3&9&lᴡ&x&F&F&F&1&3&9&lɴ"

function getActionBarMessage(w: text, duration: number) :: text:
    if {_w} is "armor":
        return "&b🛡 %{_duration}%s"
    else if {_w} is "sword":
        return "&c🗡 %{_duration}%s"
    else if {_w} is "trident":
        return "&9🔱 %{_duration}%s"