Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Requries "Skript", "TuSKe", "EssentialsX", "Vault (for economy)" and "SkRayFall".
- #sell command
- command /sh:
- trigger:
- execute player command "/sell hand"
- variables:
- {world.shop} = "world" #put the name of your world in the ""'s where it says skyworld
- #coding for the shop (DO NOT EDIT IF YOU DON'T KNOW WHAT YOUR DOING!)
- #function(s)
- function i(t: text, p: player): #creates a function
- make {_p} execute command "/shop %{_t}%" #tell's the player to execute "/shop {_t}"
- function buy(i: item, n: number, p: player):
- if {_p}'s money > {_n}:
- remove {_n} from {_p}'s money
- give {_i} to {_p}
- send "&7[&eSHOP&7] &8Bought &f&a%{_i}% &8for &7$%{_n}%&6!" to {_p}
- stop
- else:
- send "&7[&eSHOP&7] &cYou do not have enough money!" to {_p}
- #command /shop command
- command /shop [<text>]:
- trigger:
- if arg-1 is not set:
- open virtual chest with 3 rows named "&7[&eSHOP&7]" to player
- format gui slot 1,2,3,4,5,6,7,8,9,20,21,22,24,25,26,27 of player with black glass pane named "&1" to run:
- close player's inventory
- wait 1 tick
- execute player command "/shop"
- format gui slot 11 of player with stone block named "&aBlocks" to run:
- close player's inventory
- wait 1 tick
- execute player command "/shop blocks"
- format gui slot 13 of player with seeds named "&9Farming" to run:
- close player's inventory
- wait 1 tick
- execute player command "/shop farming"
- format gui slot 15 of player with seeds named "&Tools" to run:
- close player's inventory
- wait 1 tick
- execute player command "/shop tools"
- format gui slot 15 of player with spawner named "&Spawners" to run:
- close player's inventory
- wait 1 tick
- execute player command "/shop spawners"
- format gui slot 19 of player with player's skull named "&a%player%" with lore "&aBalance:" and "&e%player's balance%" to run:
- close player's inventory
- wait 1 tick
- execute player command "/shop"
- format gui slot 23 of player with book named "&9Exit" to run:
- close player's inventory
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement