Level Fi

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 2

command /autocompress:

aliases: /autocomp, /auto


trigger:
set metadata tag "auto" of player to chest inventory with 1 row named
"&d&lAutocompressor"
set slot 0 of metadata tag "auto" of player to oak log named
"§x§6§c§3§a§0§0W§x§6§8§3§a§0§0o§x§6§3§3§9§0§0o§x§5§f§3§9§0§0d" with lore "&dClick
to enable!"
set slot 1 of metadata tag "auto" of player to stone named "&7Stone" with
lore "&dClick to enable!"
set slot 2 of metadata tag "auto" of player to gold ore named "&6Gold" with
lore "&dClick to enable!"
set slot 3 of metadata tag "auto" of player to iron ore named "&8Iron" with
lore "&dClick to enable!"
set slot 4 of metadata tag "auto" of player to diamond ore named
"&bDiamond" with lore "&dClick to enable!"
set slot 5 of metadata tag "auto" of player to ancient debris named
"&0Netherite" with lore "&dClick to enable!"
open (metadata tag "auto" of player) to player

on inventory click:
if event-inventory = (metadata tag "auto" of player):
cancel event
if index of event-slot is 0:
if player has permission "autocompsk":
if {autocomp::wood::%uuid of player%} is not set:
set {autocomp::wood::%uuid of player%} to true
send "&dWood &aAutocompress enabled!"
else:
delete {autocomp::wood::%uuid of player%}
send "&dWood &4Autocompress disabled!"
else if index of event-slot is 1:
if player has permission "autocompsk":
if {autocomp::stone::%uuid of player%} is not set:
set {autocomp::stone::%uuid of player%} to true
send "&dStone &aAutocompress enabled!"
else:
delete {autocomp::stone::%uuid of player%}
send "&dStone &4Autocompress disbled!"
else if index of event-slot is 2:
if player has permission "autocompsk":
if {autocomp::gold::%uuid of player%} is not set:
set {autocomp::gold::%uuid of player%} to true
send "&dGold &aAutocompress enabled!"
else:
delete {autocomp::gold::%uuid of player%}
send "&dGold &4Autocompress disabled!"
else if index of event-slot is 3:
if player has permission "autocompsk":
if {autocomp::iron::%uuid of player%} is not set:
set {autocomp::iron::%uuid of player%} to true
send "&dIron &aAutocompress enabled!"
else:
delete {autocomp::iron::%uuid of player%}
send "&dIron &4Autocompress disabled!"
else if index of event-slot is 4:
if player has permission "autocompsk":
if {autocomp::diamond::%uuid of player%} is not set:
set {autocomp::diamond::%uuid of player%} to true
send "&dDiamond &aAutocompress enabled!"
else:
delete {autocomp::diamond::%uuid of player%}
send "&dDiamond &4Autocompress disabled!"
else if index of event-slot is 5:
if player has permission "autocompsk":
if {autocomp::netherite::%uuid of player%} is not set:
set {autocomp::netherite::%uuid of player%} to true
send "&dNetherite &aAutocompress enabled!"
else:
delete {autocomp::netherite::%uuid of player%}
send "&dNetherite &4Autocompress disabled!"

on break:
if {autocomp::wood::%uuid of player%} is true:
if player's inventory contains 64 oak log:
remove 64 oak log from player
wait 1 tick
give player 1 oak wood of mending named
"§x§8§3§5§6§0§0C§x§8§3§5§6§0§0o§x§8§3§5§6§0§0m§x§8§3§5§6§0§0p§x§8§3§5§6§0§0r§x§8§3§
5§6§0§0e§x§8§3§5§6§0§0s§x§8§3§5§6§0§0s§x§8§3§5§6§0§0e§x§8§3§5§6§0§0d
§x§8§3§5§6§0§0W§x§8§3§5§6§0§0o§x§8§3§5§6§0§0o§x§8§3§5§6§0§0d"
if {autocomp::stone::%uuid of player%} is true:
if player's inventory contains 64 cobblestone:
remove 64 stone from player
wait 1 tick
give player stone of mending named "&8Compressed Stone"
if {autocomp::gold::%uuid of player%} is true:
if player's inventory contains 64 gold ingot:
remove 64 gold ingot from player
wait 1 tick
give player gold block of mending named "&6Compressed Gold"
if {autocomp::iron::%uuid of player%} is true:
if player's inventory contains 64 iron ingot:
remove 64 iron ingot from player
wait 1 tick
give player iron block of mending named "&f&lCompressed Iron"
if {autocomp::diamond::%uuid of player%} is true:
if player's inventory contains 64 diamond:
remove 64 diamond from player
wait 1 tick
give player diamond block of mending named "&b&lCompressed Diamond"
if {autocomp::netherite::%uuid of player%} is true:
if player's inventory contains 64 ancient debris:
remove 64 ancient debris from player
wait 1 tick
give player netherite block of mending named "&8&lCompressed Netherite"

You might also like