I'm not really sure but I think that you're using skript tuske, if so you should change to skript-gui and do this:
Code:
command /enchanter:
permission: enchanter.use
permission message: &cSomething broke...
trigger:
create gui with id "enchanter" with virtual chest inventory with 1 row named "&e&k&lAA&r &7&lENCHANTER &e&k&lAA&r":
make gui 2 with nether star with name "&eRandom Custom Enchantment" with lore "&7Costs &eDiamond Block&7!":
if player has a diamond block:
set {custom.enchant} to random integer between 1 and 5
if {custom.enchant} is 1:
remove diamond block from player
set {_book} to enchanted book named "&7Blindness"
set line 1 of lore of {_book} to "&7Chance to apply &eblindess effect &7on the enemy!"
set line 2 of lore of {_book} to "&eSword Enchantment"
give player {_book}
if {custom.enchant} is 2:
remove diamond block from player
set {_book} to enchanted book named "&7Speed"
set line 1 of lore of {_book} to "&7Applies &espeed effect &7to the user!"
set line 2 of lore of {_book} to "&eBoots Enchantment"
give player {_book}
if {custom.enchant} is 3:
remove diamond block from player
set {_book} to enchanted book named "&7Shock"
set line 1 of lore of {_book} to "&7Chance to &estrike lightning &7 on the enemy!"
set line 2 of lore of {_book} to "&eChestplate Enchantment"
give player {_book}
if {custom.enchant} is 4:
remove diamond block from player
set {_book} to enchanted book named "&7Afterlife"
set line 1 of lore of {_book} to "&7Restores one heart and applies &einvisibility effect &7to the user on death!"
set line 2 of lore of {_book} to "&eHelmet Enchantment"
give player {_book}
if {custom.enchant} is 5:
remove diamond block from player
set {_book} to enchanted book named "&7PLACEHOLDER"
set line 1 of lore of {_book} to "PLACEHOLDER"
set line 2 of lore of {_book} to "PLACEHOLDER"
give player {_book}
close player's inventory
show last gui to player
on damage:
#Blindess
if lore of attacker's weapon contains "&7Blindness":
chance of 10%:
apply blindess 1 to victim for 2 seconds
#Shock
if lore of victim's chestplate contains "&7Shock":
chance of 5%
apply nausea 1 to victim for 2 seconds
strike lightning effect at the attacker
damage attacker by 1 heart
#Afterlife
on death:
if lore of victim's helmet contains "&7Afterlife":
apply instant_health 1 to victim for 1 seconds
apply invisibility 1 to victom for 5 seconds
every second:
loop all players:
#Speed
if lore of loop-player's boots contains "&7Speed":
apply speed 1 to loop-player for 1 seconds
I didn't test this so I don't know if it works or not but try it. (Uninstall skript-tuske and use skript-gui first, if you are using it because I don't remember how skript-tuske works as I used to use that but realized that it has too many bugs so changed to skript-gui)
Edit: I forgot something so I edited it, still not tested though.