on right click with book: if name of player's tool is "&fVoucher na rangę &a&lVIP": remove 1 book named "&fVoucher na rangę &a&lVIP" from player execute console command "lp user %player% parent addtemp vip 1d" send "Pomyślnie aktywowano voucher na rangę :vip:" to player if name of player's tool is "&fVoucher na rangę &e&lSVIP": remove 1 book named "&fVoucher na rangę &e&lSVIP" from player execute console command "lp user %player% parent addtemp svip 1d" send "Pomyślnie aktywowano voucher na rangę :svip:" to player if name of player's tool is "&fVoucher na rangę &1&lSPONSOR": remove 1 book named "&fVoucher na rangę &1&lSPONSOR" from player execute console command "lp user %player% parent addtemp sponsor 1d" send "Pomyślnie aktywowano voucher na rangę :sponsor:" to player command /voucher []: permission: voucher permission message: &cNie masz dostępu do tej komendy! usage: &6&lᴠᴏᴜᴄʜᴇʀ &7» &fPoprawne użycie: &e/voucher [] trigger: if arg 1 is "vip" or "svip" or "sponsor": if arg 2 is set: giveVoucher(arg-2, arg-1) else: giveVoucher(player, arg-1) else: send "&6&lᴠᴏᴜᴄʜᴇʀ &7» &fPoprawne użycie: &e/voucher &9 &5[]" to player function giveVoucher(p: player, type: text): if {_type} is "vip": give 1 book named "&fVoucher na rangę &a&lVIP" with custom model data 20 to {_p} send "Pomyślnie nadano voucher na rangę :vip:" to {_p} if {_type} is "svip": give 1 book named "&fVoucher na rangę &e&lSVIP" with custom model data 25 to {_p} send "Pomyślnie nadano voucher na rangę :svip:" to {_p} if {_type} is "sponsor": give 1 book named "&fVoucher na rangę &1&lSPONSOR" with custom model data 30 to {_p} send "Pomyślnie nadano voucher na rangę :sponsor:" to {_p}