Podboostowalem też ten twój kod, było w nim troche rzeczy jakich nie powinno być
function inv1(p: player):
set {_} to chest inventory with 2 rows named "Przepustka sezonowa"
set slot (integers between 0 and 27) of {_} to black stained glass pane named "&8*"
set slot 0 of {_} to paper with custom model data 3 named "&cWstecz"
set slot 4 of {_} to paper with custom model data 11 named "§x§c§1§3§d§6§c§lPrzepustka sezonowa" with lore "&7Aby odblokowac nagrody konieczne jest zakupienie" and "&7rangi &6Premium" and "" and "&7Aktualny poziom: &f%{poziom::%{_p}%}%"
set slot 14 of {_} to paper with custom model data 13 named "&7Kolejna strona"
open {_} to {_p}
command /przepustka:
trigger:
inv1(player)
on inventory click:
clicked inventory is not player's inventory
if name of event-inventory is "Przepustka sezonowa":
cancel event
if clicked slot is 0:
close player's inventory
play sound "ui.loom.select_pattern" to player
execute player command "/panel"
if clicked slot is 16:
play sound "ui.loom.select_pattern" to player
set {_} to chest inventory with 2 row named "Przepustka sezonowa &82 strona"
set slot 0 of {_} to paper with custom model data 3 named "&cWstecz"
set slot 10 of {_} to paper with custom model data 12 named "&7Poprzednia strona"
set slot 16 of {_} to paper with custom model data 13 named "&7Kolejna strona"
open {_} to player
if name of event-inventory is "Przepustka sezonowa &82 strona":
cancel event
if clicked slot is 12:
inv1(player)
Stworzyć warunek w funkcji, jeżeli odebranie nagrody w formie zmiennej bedzie na true to ustawisz slot na kamien, a jezeli bedzie na false to na diament
Np tak
if {v::%{_p}%} = true:
set slot 13 of {_} to stone
else:
set slot 13 of {_} to diamond
Taki przypisek do twojego kodu
Nie używaj
if warunek = true:
stop
zamiast tego użyj płaskiego warunku, czyli bez : i ifa, charakteryzuję się tym, że w przypadku gdy się nie spełni to kod się zatrzymuje
np tak
player's has 10 diamond
#kod
oraz nie uzywaj player's current inventory, a event-inventory, przez current inventory konsola spami bledem