on right click:
if target block is an ender chest:
cancel event
open virtual chest inventory with size 6 named "&7Vaults (Page 1)" for player
set {_n} to 0
loop 25 times:
if {_n} is 10 or 19 or 28 or 37:
add 7 to {_n}
format gui slot {_n} of player with black stained glass pane named "&f"
add 1 to {_n}
format gui slot 53 of player with paper named "&c&lNext »" to run function page2(player)
set {_n} to 10
set {_n2} to 1
loop 28 times:
if {_n} is 17 or 26 or 35:
add 2 to {_n}
format gui slot {_n} of player with ender chest named "&7Vault %{_n2}%" to run player command "/vault %{_n2}%"
add 1 to {_n}
add 1 to {_n2}
function page2(p: player):
open virtual chest inventory with size 6 named "&7Vaults (Page 2)" for {_p}
set {_n} to 0
loop 25 times:
if {_n} is 10 or 19 or 28 or 37:
add 7 to {_n}
format gui slot {_n} of {_p} with black stained glass pane named "&f"
add 1 to {_n}
set {_n} to 10
set {_n2} to 29
loop 28 times:
if {_n} is 17 or 26 or 35:
add 2 to {_n}
format gui slot {_n} of {_p} with ender chest named "&7Vault %{_n2}%" to run {_p} command "/vault %{_n2}%"
add 1 to {_n}
add 1 to {_n2}
format gui slot 53 of {_p} with paper named "&c&l« Back" to run function back({_p})
command /vault [<integer>]:
trigger:
if argument 1 is not set:
send "&cIncorrect Usage."
else:
if player has the permission "vault.%arg-1%":
open chest with 6 rows named "&7%player% &8- &7%arg-1%" to player
set {_n} to 0
loop 36 times:
add {bp::%player's UUID%::%{_n}%::%arg-1%} to the current inventory of player
add 1 to {_n}
format gui slot 45 of player with paper named "&c&l« Back" to run function back(player)
set {_n} to 45
loop 8 times:
add 1 to {_n}
format gui slot {_n} of player with barrier named "&f"
set {_n} to 36
loop 9 times:
format gui slot {_n} of player with black stained glass pane named "&f"
add 1 to {_n}
else:
send "&cInsufficient Permissions."
function back(p: player):
open virtual chest inventory with size 6 named "&7Vaults (Page 1)" for {_p}
set {_n} to 0
loop 25 times:
if {_n} is 10 or 19 or 28 or 37:
add 7 to {_n}
format gui slot {_n} of {_p} with black stained glass pane named "&f"
add 1 to {_n}
format gui slot 53 of {_p} with paper named "&c&lNext »" to run function page2({_p})
set {_n} to 10
set {_n2} to 1
loop 28 times:
if {_n} is 17 or 26 or 35:
add 2 to {_n}
format gui slot {_n} of {_p} with ender chest named "&7Vault %{_n2}%" to run {_p} command "/vault %{_n2}%"
add 1 to {_n}
add 1 to {_n2}
on inventory close:
if name of player's current inventory does not contain "%player%":
stop
else:
loop 56 times:
if name of player's current inventory is "%player% &8- %loop-value%":
set {v.%player%} to loop-value
loop 36 times:
set {bp::%player's U
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}