diff.ily

Custom Netherite Sword Skript — StrengthSMP Season 4 Event Sword

Minecraft version: 1.21.8 Skript version: 2.12.2 SkBee version: 3.16.1 (use latest compatible addons)

The Sword Create a custom Netherite Sword named something epic related to StrengthSMP Season 4 (like "§c§lSeason's Edge" or similar). It must be identified by a unique NBT tag or lore so abilities only trigger for this specific sword. The sword is fully unbreakable, never loses durability, and never despawns as a ground item. If it falls into lava, fire, or void, return it to the player's inventory automatically.

Passive Effects While the sword is anywhere in the player's inventory they get Glowing, Speed I, Strength I, and Resistance I permanently refreshed every few seconds. Effects are removed only when the player drops the sword on the ground. Switching inventory slots does not remove effects. On reconnect check inventory and reapply if sword is found. Effect levels are editable in config.

Ability 1 — Meteor Strike Triggered by /ability1 or Shift + Left Click while holding the sword. A meteor falls from the sky in a circular pattern centered on the player with fire, explosions, and particles. Circle radius is configurable. Cooldown is 45 seconds configurable. Show remaining cooldown on screen if used early.

Ability 2 — Player Tracker INVENTORY GUI Triggered by /ability2 or Shift + Right Click while holding the sword. Opens a chest INVENTORY GUI showing every online player's head with their name and current hearts. Clicking a head closes the INVENTORY GUI, shows a countdown on screen, then teleports the sword holder to that player. If the player moves or gets hit during countdown the teleport cancels. Countdown duration is configurable, default 3 seconds. Cooldown is 1 hour configurable.

Location Leak Every 3 hours the server broadcasts a message to all players revealing the sword owner's name, coordinates, and dimension. If the sword is on the ground unclaimed, broadcast its ground location instead. Cannot be cancelled by the sword owner. Interval and message format are configurable.

Config ability1_cooldown: 45 ability2_cooldown: 3600 meteor_radius: 5 teleport_timer: 3 cancel_on_move: true speed_level: 1 strength_level: 1 resistance_level: 1 effect_check_interval: 2 location_leak_interval: 10800 location_leak_message: "..." location_leak_unclaimed_message: "..."

General Notes All messages must use color codes and look clean. All repeating tasks must restart automatically on server reload. The sword is meant to be given out during a special server event for StrengthSMP Season 4.

diff.ily

Custom Netherite Sword Skript — StrengthSMP Season 4 Event Sword

Minecraft version: 1.21.8 Skript version: 2.12.2 SkBee version: 3.16.1 (use latest compatible addons)

The Sword Create a custom Netherite Sword named something epic related to StrengthSMP Season 4 (like "§c§lSeason's Edge" or similar). It must be identified by a unique NBT tag or lore so abilities only trigger for this specific sword. The sword is fully unbreakable, never loses durability, and never despawns as a ground item. If it falls into lava, fire, or void, return it to the player's inventory automatically.

Passive Effects While the sword is anywhere in the player's inventory they get Glowing, Speed I, Strength I, and Resistance I permanently refreshed every few seconds. Effects are removed only when the player drops the sword on the ground. Switching inventory slots does not remove effects. On reconnect check inventory and reapply if sword is found. Effect levels are editable in config.

Ability 1 — Meteor Strike Triggered by /ability1 or Shift + Left Click while holding the sword. A meteor falls from the sky in a circular pattern centered on the player with fire, explosions, and particles. Circle radius is configurable. Cooldown is 45 seconds configurable. Show remaining cooldown on screen if used early.

Ability 2 — Player Tracker INVENTORY GUI Triggered by /ability2 or Shift + Right Click while holding the sword. Opens a chest INVENTORY GUI showing every online player's head with their name and current hearts. Clicking a head closes the INVENTORY GUI, shows a countdown on screen, then teleports the sword holder to that player. If the player moves or gets hit during countdown the teleport cancels. Countdown duration is configurable, default 3 seconds. Cooldown is 1 hour configurable.

Location Leak Every 3 hours the server broadcasts a message to all players revealing the sword owner's name, coordinates, and dimension. If the sword is on the ground unclaimed, broadcast its ground location instead. Cannot be cancelled by the sword owner. Interval and message format are configurable.

Config ability1_cooldown: 45 ability2_cooldown: 3600 meteor_radius: 5 teleport_timer: 3 cancel_on_move: true speed_level: 1 strength_level: 1 resistance_level: 1 effect_check_interval: 2 location_leak_interval: 10800 location_leak_message: "..." location_leak_unclaimed_message: "..."

General Notes All messages must use color codes and look clean. All repeating tasks must restart automatically on server reload. The sword is meant to be given out during a special server event for StrengthSMP Season 4.

Kodari AI
KodariApr 13 at 7:30 pm 7,632 (v2)
StrengthSMPS4Sword
A custom Netherite Sword script for StrengthSMP Season 4 events. Features passive effects (Glowing, Speed, Strength, Resistance) while the sword is in inventory, two powerful abilities (Meteor Strike and Player Tracker GUI), automatic lava/fire/void protection, ground item persistence, and a periodic location leak broadcast. All cooldowns, effect levels, and messages are fully configurable.
  • Build the full sword system across one organized .sk file with options-based config, NBT identification via SkBee, GUI via inventory events, and all repeating loops restart on load

  • Plan all sections: config options → sword creation → passive loop → loot protection → ability 1 (meteor) → ability 2 (tracker GUI) → location leak loop

  • Use SkBee NBT for sword identification, custom inventory GUI for player tracker, and action bar/title for cooldown feedback


✅ StrengthSMP Season 4 — Season’s Edge Script

Place the file at: plugins/Skript/scripts/strengthsmp-s4-sword.sk Then run: /sk reload strengthsmp-s4-sword Required: Skript 2.12.2+, SkBee 3.16.1+


📋 Feature Summary

Feature
Details
Give Sword
/givesword [player]
— Permission:
seasonsedge.give
Passive Effects
Speed I, Strength I, Resistance I, Glowing — auto-applied every 2s while sword is anywhere in inventory
Ability 1
/ability1
or
Shift + Left Click
— Meteor Strike (circular fireballs + explosions), 45s cooldown
Ability 2
/ability2
or
Shift + Right Click
— Player Tracker GUI (heads with HP info, click to teleport), 1hr cooldown
Void/Lava/Fire
Sword returned to owner’s inventory automatically
Ground Protection
Sword never despawns, tracks ground location
Location Leak
Broadcasts owner name + coordinates every 3 hours to all players
Reconnect
Effects reapplied on join if sword is in inventory

⚙️ Configuration

All values are editable in the options: block at the top of the file — cooldowns, radius, effect levels, teleport timer, leak messages, and intervals. No restart needed, just /sk reload strengthsmp-s4-sword after any change.

diff.ily

Check the skript for any bugs and help me to setup a custom texture pack for it I'll use a 3d sword model for sword and change /givesword to /midasword

Kodari AI
KodariApr 13 at 7:51 pm 10,822 (v2)

Let me read the existing file first!

Great — I’ve read the full script. Here’s my plan:

  • 🐛 Bug fixes: Cooldown math uses raw milliseconds wrongly, open chest with X rows should be open virtual chest inventory, NBT on items needs proper SkBee flow, lava loop fires every tick unnecessarily, on drop duplicated

  • ✏️ Rename /givesword → /midasword

  • 🎨 Custom texture pack support via custom model data on the sword item (standard Minecraft resource pack method)



✅ Summary of all changes

🐛 Bugs Fixed

#
Bug
Fix
1
Cooldown math wrong
—
difference between X and now
returns milliseconds, but the old code used it raw as seconds
Fixed: now correctly computes
elapsed ms
vs
cooldown * 1000
before showing remaining time
2
open chest with X rows
— wrong syntax, causes a Skript parse error
Fixed: changed to
open virtual chest inventory with X slots
3
make {_target} hold {_sword}
— only sets the hand item temporarily, doesn’t actually give it
Fixed: changed to
give {_sword} to {_target}
4
NBT flow broken
— old code set the nbt compound variable but never wrote it back to the item
Fixed:
set {_sword} to item from nbt compound {_nbt}
after modifying nbt
5
Duplicate on drop listener
— two separate
on drop of netherite sword
blocks conflicted
Fixed: merged into a single clean block
6
Passive effects removal loop
—
delete
of
effects.removed
was in a second loop unnecessarily
Fixed: merged into one loop, deletes the flag immediately when sword is found

🎮 /givesword → /midasword

Renamed command + updated the console load message.


🎨 Texture Pack Setup

The sword now uses custom model data ({@sword_model_data}, default 1001). Here’s exactly what you need to do:

1. Resource Pack folder structure:

Plain Text
assets/
  minecraft/
    models/
      item/
        netherite_sword.json   ← edit this
        midas_sword.json       ← your BlockBench 3D model export
    textures/
      item/
        midas_sword_texture.png  ← your texture (if separate from model)

2. Edit netherite_sword.json:

JSON
{
  "parent": "item/handheld",
  "textures": {
    "layer0": "item/netherite_sword"
  },
  "overrides": [
    {
      "predicate": { "custom_model_data": 1001 },
      "model": "item/midas_sword"
    }
  ]
}

3. Your midas_sword.json — export from BlockBench as Item/Block model, place it as assets/minecraft/models/item/midas_sword.json.

4. Change the CMD value in the script options if you want to use a different number:

Plain Text
sword_model_data: 1001   ← change to whatever matches your JSON

5. Pack the folder into a .zip, upload to a host (e.g. GitHub releases), and set in server.properties:

Plain Text
resource-pack=https://yourlink.com/pack.zip
Kodari can make mistakes. Review important code before using.
Files
strengthsmp-s4-sword.sk
Code
1 442
strengthsmp-s4-sword.sk
# StrengthSMP Season 4 — Midas Sword Script
# Requires: Skript 2.12.2+, SkBee 3.16.1+
# Place in: plugins/Skript/scripts/
# Reload with: /sk reload strengthsmp-s4-sword
#
# ══════════════════════════════════════════════
#   TEXTURE PACK SETUP GUIDE
# ══════════════════════════════════════════════
#   This sword uses Custom Model Data to display
#   a 3D model via a resource pack.
#
#   FOLDER STRUCTURE inside your resource pack:
#   assets/minecraft/models/item/
#       netherite_sword.json          ← override file
#       midas_sword.json              ← your 3D model file
#   assets/minecraft/textures/item/
#       midas_sword.png               ← your texture (if needed)
#   assets/minecraft/models/item/netherite_sword.json:
#   {
#     "parent": "item/handheld",
#     "textures": { "layer0": "item/netherite_sword" },
#     "overrides": [
#       { "predicate": { "custom_model_data": 1001 }, "model": "item/midas_sword" }
#     ]
#   }
#
#   Then in midas_sword.json, reference your 3D model
#   (BlockBench export as "Item" type).
#
#   The option below must match the custom_model_data
#   value you set in netherite_sword.json (default: 1001)
# ══════════════════════════════════════════════

options:
    # Sword Identity
    sword_nbt_key: seasons_edge_s4
    sword_nbt_value: strengthsmp_season4

    # Custom Model Data (must match resource pack predicate value)
    sword_model_data: 1001

    # Cooldowns (seconds)
    ability1_cooldown: 45
    ability2_cooldown: 3600

    # Ability 1 — Meteor Strike
    meteor_radius: 5

    # Ability 2 — Player Tracker
    teleport_timer: 3

    # Passive Effects (amplifier = level - 1, so 0 = level I)
    speed_level: 0
    strength_level: 0
    resistance_level: 0
    glowing_level: 0
    effect_check_interval: 2

    # Location Leak
    location_leak_interval: 10800
    location_leak_message: "&4&l[LOCATION LEAK] &c%owner% &7is holding &c&lSeason's Edge&7! Location: &f%world% &7(&f%x%&7, &f%y%&7, &f%z%&7)"
    location_leak_unclaimed_message: "&4&l[LOCATION LEAK] &c&lSeason's Edge &7is lying unclaimed on the ground in &f%world% &7at &f%x%&7, &f%y%&7, &f%z%&7!"

    # Prefix
    prefix: &c&l[Season's Edge] &r

# ══════════════════════════════════════════════
#   SWORD CREATION COMMAND  (/midasword)
# ══════════════════════════════════════════════

command /midasword [<player>]:
    permission: seasonsedge.give
    permission message: &cYou do not have permission to use this command.
    trigger:
        if arg-1 is not set:
            set {_target} to player
        else:
            set {_target} to arg-1
        set {_sword} to a netherite sword named "&c&lSeason's Edge"
        set lore of {_sword} to "&7&oThe blade of a fallen season.", "&7&oForged during &c&oStrengthSMP Season 4&7&o.", "", "&c&l✦ METEOR STRIKE &8— &7Shift + Left Click", "&5&l✦ PLAYER TRACKER &8— &7Shift + Right Click", "", "&8&oUnbreakable. Unstoppable. Yours."
        set custom model data of {_sword} to {@sword_model_data}
        set {_nbt} to nbt compound of {_sword}
        set nbt tag "{@sword_nbt_key}" of {_nbt} to "{@sword_nbt_value}"
        set {_sword} to item from nbt compound {_nbt}
        give {_sword} to {_target}
        send "{@prefix}&aThe sword has been given to &e%{_target}%&a." to player
        send "{@prefix}&aYou have received &c&lSeason's Edge&a! Use it wisely." to {_target}

# ══════════════════════════════════════════════
#   UTILITY — CHECK IF ITEM IS THE SWORD
# ══════════════════════════════════════════════

function isSeasonsEdge(i: item) :: boolean:
    if {_i} is not set:
        return false
    if {_i} is air:
        return false
    set {_nbt} to nbt compound of {_i}
    if nbt tag "{@sword_nbt_key}" of {_nbt} is "{@sword_nbt_value}":
        return true
    return false

# ══════════════════════════════════════════════
#   UTILITY — CHECK IF PLAYER HAS SWORD IN INVENTORY
# ══════════════════════════════════════════════

function hasSwordInInventory(p: player) :: boolean:
    loop items in inventory of {_p}:
        if isSeasonsEdge(loop-item) is true:
            return true
    return false

# ══════════════════════════════════════════════
#   UTILITY — GET SWORD SLOT INDEX
# ══════════════════════════════════════════════

function getSwordSlot(p: player) :: integer:
    loop 36 times:
        set {_slot} to loop-number - 1
        set {_item} to slot {_slot} of inventory of {_p}
        if isSeasonsEdge({_item}) is true:
            return {_slot}
    return -1

# ══════════════════════════════════════════════
#   PASSIVE EFFECTS LOOP
# ══════════════════════════════════════════════

every {@effect_check_interval} seconds:
    loop all players:
        if hasSwordInInventory(loop-player) is true:
            apply speed {@speed_level} to loop-player for 10 seconds
            apply strength {@strength_level} to loop-player for 10 seconds
            apply resistance {@resistance_level} to loop-player for 10 seconds
            apply glowing {@glowing_level} to loop-player for 10 seconds
            delete {sword.effects.removed::%loop-player%}
        else:
            if {sword.effects.removed::%loop-player%} is not set:
                remove speed from loop-player
                remove strength from loop-player
                remove resistance from loop-player
                remove glowing from loop-player
                set {sword.effects.removed::%loop-player%} to true

# ══════════════════════════════════════════════
#   RECONNECT — REAPPLY EFFECTS
# ══════════════════════════════════════════════

on join:
    wait 1 second
    if hasSwordInInventory(player) is true:
        apply speed {@speed_level} to player for 10 seconds
        apply strength {@strength_level} to player for 10 seconds
        apply resistance {@resistance_level} to player for 10 seconds
        apply glowing {@glowing_level} to player for 10 seconds
        send "{@prefix}&aSeason's Edge detected. Passive effects applied." to player

# ══════════════════════════════════════════════
#   SWORD PROTECTION — LAVA / VOID WARNING
# ══════════════════════════════════════════════

every 2 seconds:
    loop all players:
        if hasSwordInInventory(loop-player) is true:
            if y-coordinate of loop-player < -64:
                send "{@prefix}&cVoid detected! Protect your sword." to loop-player
            if loop-player is in lava:
                send "{@prefix}&cYou are in lava with Season's Edge! Get out!" to loop-player

# ══════════════════════════════════════════════
#   GROUND ITEM PROTECTION — NEVER DESPAWN
# ══════════════════════════════════════════════

on item despawn:
    if isSeasonsEdge(event-item) is true:
        cancel event

# ══════════════════════════════════════════════
#   TRACK DROP & PICKUP
# ══════════════════════════════════════════════

on drop of netherite sword:
    wait 1 tick
    if isSeasonsEdge(event-item) is true:
        set {sword.ground.owner} to player
        delete {sword.owner}
        send "{@prefix}&eYou dropped &c&lSeason's Edge&e! It will never despawn." to player

on pickup of netherite sword:
    if isSeasonsEdge(event-item) is true:
        set {sword.owner} to player
        delete {sword.ground.owner}
        send "{@prefix}&aYou picked up &c&lSeason's Edge&a!" to player

# ══════════════════════════════════════════════
#   GROUND PROTECTION — LAVA / VOID RETURN
# ══════════════════════════════════════════════

every 2 seconds:
    loop all dropped items in all worlds: