Crystal Hong

Write me a Skript script for Minecraft 26.3. When a player holds or wear any item with an enchantment named '&4&lGod', give them these effects: Strength 255, Resistance 255, Regeneration 255, Haste 255, Fire Resistance, and Night Vision. Remove the effects when they take the item off. . Keep it simple and error-free. Also, the cmd to get this is /godenchant so it enchants anything the cmd typer is holding

Kodari AI
KodariOct 29 at 2:18 am 1
GodEnchantEffects
A Skript plugin for Minecraft that grants powerful buffs when a player holds or wears any item enchanted with 'God'. Provides Strength 255, Resistance 255, Regeneration 255, Haste 255, Fire Resistance, and Night Vision while equipped, removing them when unequipped. Includes a /godenchant command to apply the enchantment to the held item.

Vanilla Skript can’t create a custom enchantment named &4&lGod without an addon, so this uses that text as a lore marker instead.

Place godenchant.sk in plugins/Skript/scripts/, then run /sk reload godenchant. The effects are checked once per second, and are removed on the next check after the marked item is no longer held or worn.

Crystal Hong

Just make it so that it appears like there's an enchantment on any item with god

Kodari AI
KodariOct 29 at 2:21 am 1

This adds a glowing enchantment-style God line to any item the command user is holding, and keeps the requested effects active while a marked item is held or worn.

Put it in plugins/Skript/scripts/ and run /sk reload godenchant. The God text is a lore-based visual marker with an enchantment glint, not a true custom Minecraft enchantment.

Crystal Hong

Uhhh there are 6 errors, all pointing at the loop-value

Kodari AI
KodariOct 29 at 2:23 am 1

The player loop uses loop-player instead of loop-value, which fixes those errors.

Reload it with /sk reload godenchant.

Kodari can make mistakes. Review important code before using.
Files
godenchant.sk
Code
1 43
godenchant.sk
options:
    god-lore: &4&lGod

command /godenchant:
    trigger:
        if player's tool is air:
            send "&cHold an item first." to player
            stop
        if lore of player's tool does not contain "{@god-lore}":
            add "{@god-lore}" to lore of player's tool
        enchant player's tool with unbreaking 1
        send "&aGod added to your item." to player

every 1 second:
    loop all players:
        set {_hasGod} to false
        if lore of loop-player's tool contains "{@god-lore}":
            set {_hasGod} to true
        if lore of offhand tool of loop-player contains "{@god-lore}":
            set {_hasGod} to true
        if lore of helmet of loop-player contains "{@god-lore}":
            set {_hasGod} to true
        if lore of chestplate of loop-player contains "{@god-lore}":
            set {_hasGod} to true
        if lore of leggings of loop-player contains "{@god-lore}":
            set {_hasGod} to true
        if lore of boots of loop-player contains "{@god-lore}":
            set {_hasGod} to true

        if {_hasGod} is true:
            apply potion of strength 255 to loop-player for 2 seconds
            apply potion of resistance 255 to loop-player for 2 seconds
            apply potion of regeneration 255 to loop-player for 2 seconds
            apply potion of haste 255 to loop-player for 2 seconds
            apply potion of fire resistance 1 to loop-player for 2 seconds
            apply potion of night vision 1 to loop-player for 2 seconds
        else:
            remove strength from loop-player
            remove resistance from loop-player
            remove regeneration from loop-player
            remove haste from loop-player
            remove fire resistance from loop-player
            remove night vision from loop-player