options: tag: &7[&aH2P&eLife&7] variables: {katb::%player%} = false on npc right click: if citizen is named "&aSamochody": if player has permission "npccar": open virtual chest inventory with size 5 named "&aSamochody" to player add 1 and 10 and 19 and 28 and 37 to {_glass::*} loop {_glass::*}: format gui slot loop-value of player with 1 of black stained glass named " " format gui slot 18 of player with skull of player named "&7ยป &aWitamy %player%" format gui slot 22 of player with minecart item named "&6Samochod" with lore "&aKliknij, aby przejsc dalej" to run player command "/sklepzautami" format gui slot 24 of player with book named "&6Prawo jazdy Kat. B" with lore "&aCena: &73000$" to close then run player command "/katb" command /kupauto []: trigger: if player has permission "npccar": if arg 1 is 1: if {katb::%player%} is true: if player's balance >= 20000: remove 20000 from player's balance execute player command "getcar BLACK" send "{@tag} &aKupiles Czarne Auto! Twoj nowy stan konta to %player's money%" else: send "&6Nie posiadasz kasy!" else: send "{@tag} &cNie masz Prawa Jazdy! Pierw musisz kupic Prawo Jazdy &nKat. B" if arg 1 is 2: if {katb::%player%} is true: if player's balance >= 20000: remove 20000 from player's balance execute player command "getcar YELLOW" send "{@tag} &aKupiles Zolte Auto! Twoj nowy stan konta to %player's money%" else: send "{@tag} &6Nie posiadasz kasy!" else: send "{@tag} &cNie masz pozwolenia! Pierw musisz kupic Prawo Jazdy &nKat. B" if arg 1 is 3: if {katb::%player%} is true: if player's balance >= 20000: remove 20000 from player's balance execute player command "getcar MAGENTA" send "{@tag} &aKupiles Rozowe Auto! Twoj nowy stan konta to %player's money%" else: send "{@tag} &6Nie posiadasz kasy!" else: send "{@tag} &cNie masz pozwolenia! Pierw musisz kupic Prawo Jazdy &nKat. B" command /katb []: trigger: if player has permission "npccar": if {katb::%player%} is false: if player's balance >= 3000: remove 3000 from player's balance chance of 40%: send "{@tag} &aZdales! Otrzymales Prawo Jazdy &a&nKat. B!" set {katb::%player%} to true else: send "{@tag} &6OBLALES!" else: send "{@tag} &6Nie posiadasz kasy!" else: send "{@tag} &6Zdales juz kiedys!" command /sklepzautami []: trigger: if player has permission "npccar": open virtual chest inventory with size 5 named "&aSamochody" to player add 1 and 10 and 19 and 28 and 37 to {_glass::*} loop {_glass::*}: format gui slot loop-value of player with black stained glass named " " format gui slot 20 of player with minecart item named "&aCzarny Samochod" with lore "&aKoszt auta:&f 20000$" to close then run player command "/kupauto 1" format gui slot 22 of player with minecart item named "&eZolty Samochod" with lore "&aKoszt auta: &f20000$" to close then run player command "/kupauto 2" format gui slot 24 of player with minecart item named "&5Rozowy Samochod" with lore "&aKoszt auta: &f20000$" to close then run player command "/kupauto 3"