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