Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function shop(p: player):
- set {_u} to uuid of {_p}
- open virtual chest inventory with size 3 named "&8Main Shop" to {_p}
- set {_n} to 0
- loop 27 times:
- format gui slot {_n} of {_p} with black stained glass pane to do nothing
- add 1 to {_n}
- set {_n} to 21
- loop 3 times:
- format gui slot {_n} of {_p} with lime stained glass pane named " " with lore " ", "&7Created by:", "&4BreakfastDeliqht", and " " to do nothing
- add 1 to {_n}
- format gui slot 10 of {_p} with spruce log named "&8Blocks Shop" with lore " ", "&cClick here to open the blocks category!", and " " to run:
- blocks(player)
- function Buy(p: player, I: Item, x: number):
- set {_u} to uuid of {_p}
- if {_p}'s balance >= {_x}:
- give {_p} {_I}
- remove {_x} from {_p}'s balance
- send "&5&lSHOP &8» &7Thank you for your purchase!" to {_p}
- else if {_p}'s balance < {_x}:
- send "&5&lSHOP &8» &7Insufficient Balance!" to {_p}
- function blocks(p: player):
- set {_u} to uuid of {_p}
- open virtual chest inventory with size 6 named "&8Blocks Shop" to {_p}
- set {_n} to 0
- loop 6 times:
- format gui slot {_n} of {_p} with red stained glass pane named "&4&lBACK" with lore " ", and "&cClick to go back to main shop!" to run:
- shop(player)
- add 9 to {_n}
- format gui slot 1 of {_p} with oak log named "&6Oak Log" with lore " ", "&6Amount: &e4", "&6Price: &e$15", and " " to run:
- Buy(player,4 oak log,15)
- format gui slot 2 of {_p} with spruce log named "&6Spruce Log" with lore " ", "&6Amount: &e4", "&6Price: &e$15", and " " to run:
- Buy(player,4 spruce log,15)
- format gui slot 3 of {_p} with dark oak log named "&6Dark Oak Log" with lore " ", "&6Amount: &e4", "&6Price: &e$15", and " " to run:
- Buy(player,4 dark oak log,15)
- format gui slot 4 of {_p} with birch log named "&6Birch Log" with lore " ", "&6Amount: &e4", "&6Price: &e$15", and " " to run:
- Buy(player,4 birch log,15)
- command /shop:
- trigger:
- shop(player)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement