Advertisement
Guest User

Untitled

a guest
Dec 14th, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.14 KB | None | 0 0
  1. #Requries "Skript", "TuSKe", "EssentialsX", "Vault (for economy)" and "SkRayFall".
  2.  
  3. #sell command
  4. command /sh:
  5. trigger:
  6. execute player command "/sell hand"
  7. variables:
  8. {world.shop} = "world" #put the name of your world in the ""'s where it says skyworld
  9.  
  10. #coding for the shop (DO NOT EDIT IF YOU DON'T KNOW WHAT YOUR DOING!)
  11.  
  12. #function(s)
  13. function i(t: text, p: player): #creates a function
  14. make {_p} execute command "/shop %{_t}%" #tell's the player to execute "/shop {_t}"
  15. function buy(i: item, n: number, p: player):
  16. if {_p}'s money > {_n}:
  17. remove {_n} from {_p}'s money
  18. give {_i} to {_p}
  19. send "&7[&eSHOP&7] &8Bought &f&a%{_i}% &8for &7$%{_n}%&6!" to {_p}
  20. stop
  21. else:
  22. send "&7[&eSHOP&7] &cYou do not have enough money!" to {_p}
  23.  
  24. #command /shop command
  25. command /shop [<text>]:
  26. trigger:
  27. if arg-1 is not set:
  28. open virtual chest with 3 rows named "&7[&eSHOP&7]" to player
  29. 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:
  30. close player's inventory
  31. wait 1 tick
  32. execute player command "/shop"
  33. format gui slot 11 of player with stone block named "&aBlocks" to run:
  34. close player's inventory
  35. wait 1 tick
  36. execute player command "/shop blocks"
  37. format gui slot 13 of player with seeds named "&9Farming" to run:
  38. close player's inventory
  39. wait 1 tick
  40. execute player command "/shop farming"
  41. format gui slot 15 of player with seeds named "&Tools" to run:
  42. close player's inventory
  43. wait 1 tick
  44. execute player command "/shop tools"
  45. format gui slot 15 of player with spawner named "&Spawners" to run:
  46. close player's inventory
  47. wait 1 tick
  48. execute player command "/shop spawners"
  49. format gui slot 19 of player with player's skull named "&a%player%" with lore "&aBalance:" and "&e%player's balance%" to run:
  50. close player's inventory
  51. wait 1 tick
  52. execute player command "/shop"
  53. format gui slot 23 of player with book named "&9Exit" to run:
  54. close player's inventory
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement