itzhxdes1

Generate a skript for minecraft 1.21.11 that adds a command /godsword that gives the user a netherite sword with unbreaking 3, sharpness 5, fire aspect 2, and upon shift right-clicking it shakes the ground within a 5 block radius of the sword user, that damages every player and mob within said 5 block radius also ignoring protection armor, that does 5 hearts of damage

Kodari AI
KodariJul 6 at 11:16 am 1

I’ll create a GodSword Skript plugin for Minecraft 1.21.11.

GodSword
Adds a legendary God Sword to Minecraft 1.21.11. The /godsword command gives players a Netherite Sword with Sharpness V, Unbreaking III, and Fire Aspect II. Shift-right-clicking the sword shakes the ground within a 5-block radius, damaging all players and mobs for 5 hearts of damage while ignoring protection armor enchantments. Includes a cooldown system to prevent ability spam.

Done. File GodSword.sk is ready.

What it does:

  • /godsword — gives you a named Netherite Sword with Sharpness V, Unbreaking III, Fire Aspect II

  • Shift + Right-click with the sword — shakes the ground in a 5-block radius, damages all players and mobs for 5 hearts (10 half-hearts) ignoring protection armor, with explosion particles and sounds

  • 10-second cooldown per player with a message showing remaining time

Installation:

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

  2. Run /sk reload GodSword

  3. Grant permission godsword.use to players

itzhxdes1

Shift + right-click dosent work while holding the sword for the shake ability, fix it

Kodari AI
KodariJul 6 at 11:35 am 2

The issue is the event header structure. Conditions in event headers need condition: prefix, and the trigger: line was misplaced. Let me fix it properly

Fixed. The problem was two-fold:

  • on rightclick: → changed to on right click: (proper Skript event syntax)

  • Conditions like player is sneaking, player's tool is a netherite sword, etc. were placed in the event header (before trigger:) which doesn’t work in Skript. Moved them all into if statements inside the trigger: block.

Reload with /sk reload GodSword and shift-right-clicking should work now.

itzhxdes1

Fix these errors: " Line 23: (GodSword.sk) Can't understand this condition/effect: name {_s} to "&6&lGOD SWORD" Line: name {_s} to "{@sword-name}"

Line 35: (GodSword.sk) Can't understand this condition: '{godsword::cooldown::%player%} is set and {godsword::cooldown::%player%} >= now' Line: if {godsword::cooldown::%player% is set and {godsword::cooldown::%player%} >= now:

Line 39: (GodSword.sk) addition can't be pperformed on a date and an interger Line: set {godsword::cooldown::%player%} to now + ({@cooldown-seconds} * 1000)

Line 40: (GodSword.sk) Can't understand this condition/effect: play sound "entity.wither.shoot" at player with volume 2 and pitch 0.5 Line: play sound "entity.wither.shot" at player with volume 2 and pitch 0.5

Line 41: (GodSword.sk) Can't understand this condition/effect: spawn 30 particles of "EXPLOSION_NORMAL" at player's location Line: spawn 30 particles of "EXPLOSION_NORMAL" at platers location

Line: 43 (GodSword.sk) Can't understand this condition/effect spawn 20 particles of "explosion_large" at players location Line: spawn 20 particles of "explosion_large" at players location

Line 47: (GodSword.sk) Can't understand this condition.effect: damage loop-entity by 10 ignoring armor Line: damage loop-entity by 10 ignoring armor

Line: 48 (GodSword.sk) There's no loop that matches 'loop entity's' Line: Spawn 15 particles of "explosion_normal" at ;oop entity's location

line 49: (GodSword.sk) There's no loop that matches loop entity with volume 1 and pitch 0.8' Line: play sound "entity.generic.explode" at loop-entity with volume 1 and pitch 0.8

Kodari AI
KodariJul 6 at 11:53 am 2
Kodari can make mistakes. Review important code before using.
Files
GodSword.sk
Code
1 51
GodSword.sk
# GodSword.sk
# Adds a legendary God Sword to Minecraft 1.21.11
# /godsword - Get the sword
# Shift + Right-click with the sword to activate the ground shake ability
#
# Installation:
# 1. Place this file in plugins/Skript/scripts/
# 2. Run /sk reload GodSword
# 3. Give yourself permission: godsword.use

options:
    prefix: &6[GodSword]&r
    sword-name: &6&lGOD SWORD
    sword-lore: &7A legendary weapon of the gods
    damage-amount: 10
    radius: 5
    cooldown-seconds: 10

command /godsword:
    permission: godsword.use
    trigger:
        set {_s} to netherite sword
        name {_s} to "{@sword-name}"
        set lore of {_s} to "{@sword-lore}"
        enchant {_s} with sharpness 5
        enchant {_s} with unbreaking 3
        enchant {_s} with fire aspect 2
        give {_s} to player
        send "{@prefix} &aYou have received the &6&lGOD SWORD&a!" to player

on right click:
    trigger:
        if player is sneaking:
            if player's tool is netherite sword:
                if name of player's tool is "{@sword-name}":
                    if {godsword::cooldown::%player%} is set and {godsword::cooldown::%player%} >= now:
                        set {_remaining} to round(({godsword::cooldown::%player%} - now) / 1000)
                        send "{@prefix} &cAbility on cooldown! &e%{_remaining}% &cseconds remaining." to player
                        stop
                    set {godsword::cooldown::%player%} to now + ({@cooldown-seconds} * 1000)
                    play sound "entity.wither.shoot" at player with volume 2 and pitch 0.5
                    spawn 30 particles of "EXPLOSION_NORMAL" at player's location
                    wait 2 ticks
                    spawn 20 particles of "EXPLOSION_LARGE" at player's location
                    loop all entities in radius {@radius} around player:
                        if loop-entity is not player:
                            if loop-entity is alive:
                                damage loop-entity by {@damage-amount} ignoring armor
                                spawn 15 particles of "EXPLOSION_NORMAL" at loop-entity's location
                                play sound "entity.generic.explode" at loop-entity with volume 1 and pitch 0.8
                    send "{@prefix} &cThe ground shakes violently!" to player