Just so you know, we don't know the file format for every file. If it's just a bunch of random characters, it's probably a .zip or .jar.
#ENCHANTMENTGUI
options:
prefix: TPP
perm: enc.user
on rightclick on enchantment table:
cancel event
if player has permission "@perm":
if player's held item is sword:
open chest with 3 row named "&4&lSword enchantment" to player
wait 1 tick
format slot 10 of player with book named "&2&lSHARPNESS" with lore "&aApply &2&lSharpness &ato your sword" to close then run "sudo %player% swordsharpgui"
command /swordsharpgui:
trigger:
open chest with 3 row named "&4&lSword enchantment" to player
wait 1 tick
format slot 10 of player with enchanted book named "&5Sharpness &d&lI" with lore "&dRequires &510 &dXP" to close then run "sudo %player% enchant apply Sharpness 1 %player%"
format slot 13 of player with enchanted book named "&5Sharpness &d&lII" with lore "&dRequires &520 &dXP" to close then run "sudo %player% enchant apply Sharpness 2 %player%"
format slot 16 of player with enchanted book named "&5Sharpness &d&lIII" with lore "&dRequires &525 &dXP" to close then run "sudo %player% enchant apply Sharpness 3 %player%"
format slot 20 of player with enchanted book named "&5Sharpness &d&lIV" with lore "&dRequires &530 &dXP" to close then run "sudo %player% enchant apply Sharpness 4 %player%"
format slot 24 of player with enchanted book named "&eSharpness &6&lV" with lore "&dRequires &535 &dXP" to close then run "sudo %player% enchant apply Sharpness 5 %player%"
command /enchant [<text>] [<text>] [<text>] [<player>]:
trigger:
if arg 1 is "apply":
if arg 2 is "Sharpness":
if arg 3 is "1":
if player-argument's level is less than 10:
send "&4&lERROR! &5&n(Sharpness &b&lI&b&o) &cYou must have 10 Levels to use this enchant&l!" to arg-4
else:
reduce the player-argument's level by 10
enchant the player-argument's tool with sharpness 1
send "&c&l{@prefix} &8» &dSuccessfully applied &5Sharpness &lI &6to your sword!." to arg-4
if arg 3 is "2":
if player-argument's level is less than 20:
send "&4&lERROR! &5&n(Sharpness &b&lII&b&o) &cYou must have 20 Levels to use this enchant&l!" to arg-4
else:
reduce the player-argument's level by 20
enchant the player-argument's tool with sharpness 2
send "&c&l{@prefix} &8» &dSuccessfully applied &5Sharpness &lII &6to your sword!." to arg-4
if arg 3 is "3":
if player-argument's level is less than 25:
send "&4&lERROR! &5&n(Sharpness &b&lIII&b&o) &cYou must have 25 Levels to use this enchant&l!" to arg-4
else:
reduce the player-argument's level by 25
enchant the player-argument's tool with sharpness 3
send "&c&l{@prefix} &8» &dSuccessfully applied &5Sharpness &lIII &6to your sword!." to arg-4
if arg 3 is "4":
if player-argument's level is less than 30:
send "&4&lERROR! &5&n(Sharpness &b&lIV&b&o) &cYou must have 30 Levels to use this enchant&l!" to arg-4
else:
reduce the player-argument's level by 30
enchant the player-argument's tool with sharpness 4
send "&c&l{@prefix} &8» &dSuccessfully applied &5Sharpness &lIV &6to your sword!." to arg-4
if arg 3 is "5":
if player-argument's level is less than 35:
send "&4&lERROR! &5&n(Sharpness &b&lV&b&o) &cYou must have 35 Levels to use this enchant&l!" to arg-4
else:
reduce the player-argument's level by 35
enchant the player-argument's tool with sharpness 5
send "&c&l{@prefix} &8» &dSuccessfully applied &5Sharpness &lV &6to your sword!." to arg-4