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