Files
core.sk
cosmetics.sk
menus.sk
minigames.sk
ranks.sk
settings.sk
shop.sk
Code
7 496
menus.sk
# UltimateLobbyNetwork - Inventory Menus
options:
menu-title: &8Lobby Menu
cosmetics-title: &8Lobby Cosmetics
shop-title: &8Lobby Shop
ranks-title: &8Available Ranks
minigames-title: &8Lobby Minigames
function fillMenu(p: player):
loop 0 to 26:
set slot loop-number of {_p}'s current inventory to gray stained glass pane named " "
function openLobbyMenu(p: player):
open chest with 3 rows named "{@menu-title}" to {_p}
wait 1 tick
fillMenu({_p})
set slot 10 of {_p}'s current inventory to diamond helmet named "&b&lCosmetics" with lore "&7Change your lobby appearance.", "", "&eClick to open"
set slot 12 of {_p}'s current inventory to emerald named "&a&lCoin Shop" with lore "&7Spend coins on lobby rewards.", "", "&eClick to open"
set slot 14 of {_p}'s current inventory to grass block named "&e&lMinigames" with lore "&7Play challenges inside the lobby.", "", "&eClick to open"
set slot 16 of {_p}'s current inventory to gold ingot named "&6&lRanks" with lore "&7Upgrade your lobby rank.", "", "&eClick to open"
set slot 22 of {_p}'s current inventory to barrier named "&c&lClose" with lore "&7Close this menu."
function openCosmeticMenu(p: player):
open chest with 3 rows named "{@cosmetics-title}" to {_p}
wait 1 tick
fillMenu({_p})
set slot 10 of {_p}'s current inventory to diamond helmet named "&b&lHat" with lore "&7Toggle your lobby hat.", "", "&eClick to toggle"
set slot 12 of {_p}'s current inventory to glowstone dust named "&d&lParticle Trail" with lore "&7Toggle your lobby particle trail.", "", "&eClick to toggle"
set slot 14 of {_p}'s current inventory to lava bucket named "&c&lRemove Cosmetics" with lore "&7Disable all active cosmetics.", "", "&eClick to remove"
set slot 22 of {_p}'s current inventory to arrow named "&f&lBack" with lore "&7Return to the lobby menu."
function openShopMenu(p: player):
open chest with 3 rows named "{@shop-title}" to {_p}
wait 1 tick
fillMenu({_p})
set slot 4 of {_p}'s current inventory to emerald named "&a&lYour Balance" with lore "&7Coins: &e%{lobby.coins::%uuid of {_p}%}%"
set slot 10 of {_p}'s current inventory to diamond helmet named "&b&lLobby Hat" with lore "&7Price: &e250 coins", "", "&eClick to purchase"
set slot 12 of {_p}'s current inventory to glowstone dust named "&d&lParticle Trail" with lore "&7Price: &e500 coins", "", "&eClick to purchase"
set slot 14 of {_p}'s current inventory to firework star named "&c&lPremium Trail" with lore "&7Price: &e750 coins", "", "&eClick to purchase"
set slot 22 of {_p}'s current inventory to arrow named "&f&lBack" with lore "&7Return to the lobby menu."
function openRankMenu(p: player):
open chest with 3 rows named "{@ranks-title}" to {_p}
wait 1 tick
fillMenu({_p})
set slot 4 of {_p}'s current inventory to name tag named "&6&lCurrent Rank" with lore "%lobbyRank({_p})%", "&7Coins: &e%{lobby.coins::%uuid of {_p}%}%"
set slot 10 of {_p}'s current inventory to iron ingot named "&a&lVIP Rank" with lore "&7Price: &e1,000 coins", "&7Includes a bright chat prefix.", "", "&eClick to purchase"
set slot 12 of {_p}'s current inventory to gold ingot named "&b&lMVP Rank" with lore "&7Price: &e2,500 coins", "&7Includes a premium chat prefix.", "", "&eClick to purchase"
set slot 14 of {_p}'s current inventory to diamond named "&d&lLEGEND Rank" with lore "&7Price: &e5,000 coins", "&7Includes the legendary prefix.", "", "&eClick to purchase"
set slot 22 of {_p}'s current inventory to arrow named "&f&lBack" with lore "&7Return to the lobby menu."
function openMinigameMenu(p: player):
open chest with 3 rows named "{@minigames-title}" to {_p}
wait 1 tick
fillMenu({_p})
set slot 10 of {_p}'s current inventory to diamond boots named "&e&lParkour Challenge" with lore "&7Race to the finish platform.", "&7Reward: &e%{lobby.settings.parkour-reward}% coins", "", "&eClick to start"
set slot 12 of {_p}'s current inventory to redstone named "&c&lReaction Challenge" with lore "&7Be the first to type the answer.", "&7Reward: &e%{lobby.settings.reaction-reward}% coins", "", "&eClick to start"
set slot 14 of {_p}'s current inventory to book named "&f&lHow To Play" with lore "&7Parkour requires an administrator", "&7to configure start and finish points.", "", "&7Reaction challenges are global."
set slot 22 of {_p}'s current inventory to arrow named "&f&lBack" with lore "&7Return to the lobby menu."
on inventory click:
if name of event-inventory is "{@menu-title}":
cancel event
if clicked slot is 10:
openCosmeticMenu(player)
if clicked slot is 12:
openShopMenu(player)
if clicked slot is 14:
openMinigameMenu(player)
if clicked slot is 16:
openRankMenu(player)
if clicked slot is 22:
close player's inventory
stop
if name of event-inventory is "{@cosmetics-title}":
cancel event
if clicked slot is 10:
toggleCosmetic(player, "hat")
openCosmeticMenu(player)
if clicked slot is 12:
toggleCosmetic(player, "trail")
openCosmeticMenu(player)
if clicked slot is 14:
removeLobbyCosmetics(player)
send "&aAll cosmetics have been removed." to player
openCosmeticMenu(player)
if clicked slot is 22:
openLobbyMenu(player)
stop
if name of event-inventory is "{@shop-title}":
cancel event
if clicked slot is 10:
buyCosmetic(player, "hat", 250)
openShopMenu(player)
if clicked slot is 12:
buyCosmetic(player, "trail", 500)
openShopMenu(player)
if clicked slot is 14:
buyCosmetic(player, "premiumtrail", 750)
openShopMenu(player)
if clicked slot is 22:
openLobbyMenu(player)
stop
if name of event-inventory is "{@ranks-title}":
cancel event
if clicked slot is 10:
purchaseRank(player, "VIP", 1, 1000)
openRankMenu(player)
if clicked slot is 12:
purchaseRank(player, "MVP", 2, 2500)
openRankMenu(player)
if clicked slot is 14:
purchaseRank(player, "LEGEND", 3, 5000)
openRankMenu(player)
if clicked slot is 22:
openLobbyMenu(player)
stop
if name of event-inventory is "{@minigames-title}":
cancel event
if clicked slot is 10:
close player's inventory
startParkour(player)
if clicked slot is 12:
close player's inventory
startReaction(player)
if clicked slot is 22:
openLobbyMenu(player)
stop