Advertisement
Mxgamer

Minecraft Skript Shop gui & more

Sep 23rd, 2020
1,065
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.44 KB | None | 0 0
  1. options:
  2.  
  3. #----====#Message Prefix#====----#
  4.  
  5. p: &2&lSHOP&7 >>&r
  6. p2: &2&lBALANCE&7 >>&r
  7.  
  8.  
  9. #----====#Message Prefix#====----#
  10.  
  11. #----====#Prices Buy#====----#
  12.  
  13.  
  14. 1xSteakPrice: 4
  15.  
  16. 64xSteakPrice: 256
  17.  
  18. 1xWheatSeedsPrice: 15
  19.  
  20. 32xWheatSeedsPrice: 480
  21.  
  22. 1xWaterBucketPrice: 500
  23.  
  24.  
  25.  
  26. #----====#Prices Buy#====----#
  27.  
  28. #----====#Prices SELL#====----#
  29.  
  30.  
  31. SellWheatSeedsPrice: 10
  32.  
  33. SellSteakPrice: 2
  34.  
  35. SellWheatPrice: 20
  36.  
  37. SellWaterBucketPrice: 250
  38.  
  39.  
  40.  
  41. #----====#Prices SELL#====----#
  42.  
  43.  
  44. on join:
  45. if {balance.%player%} is not set:
  46. set {balance.%player%} to 0
  47.  
  48.  
  49.  
  50.  
  51. command /bal:
  52. trigger:
  53. send "{@p2} Balance: $%{balance.%player%}%" to player
  54.  
  55.  
  56. command /balance:
  57. trigger:
  58. send "{@p2} Balance: $%{balance.%player%}%" to player
  59.  
  60. command /balanceedit <text> <player> [<integer>]:
  61. permission: shop.balance.edit
  62. usage: {@p2} Usage &a/balanceedit <Add | Reset | Remove | Set> <player> <Integer>
  63. trigger:
  64. if arg-1 is "add":
  65. add arg-3 to {balance.%arg 2%}
  66. send "{@p2} Added $%arg 3% To %arg 2%'s Balance. %arg 2%'s Balance Is Now $%{balance.%arg 2%}%"
  67. else if arg-1 is "reset":
  68. set {balance.%arg 2%} to 0
  69. send "{@p2} %arg 2%'s Balance Is Now $0"
  70. else if arg-1 is "remove":
  71. subtract arg-3 from {balance.%arg 2%}
  72. send "{@p2} Removed $%arg 3% From %arg 2%'s Balance. %arg 2%'s Balance Is Now $%{balance.%arg 2%}%"
  73. else if arg-1 is "Set":
  74. set {balance.%arg 2%} to arg-3
  75. send "{@p2} Set %arg 2%'s Balance To $%{balance.%arg 2%}%"
  76.  
  77. command /pay <player> <integer>:
  78. cooldown: 10 seconds
  79. cooldown message: {@p2} You Need To Wait 10 Seconds To Use That Command Again.
  80. trigger:
  81. if {balance.%player%} is greater or equal to arg-2:
  82. if arg-2 is greater than 0:
  83. remove arg-2 from {balance.%player%}
  84. add arg-2 to {balance.%arg 1%}
  85. send "{@p2} You Payed %arg 1% $%arg 2%" to player
  86. send "{@p2} %player% Payed You $%arg 2%" to arg-1
  87. else:
  88. send "{@p2} You Can't Pay Anyone Less Than $1"
  89. else:
  90. send "{@p2} You Dont Have Enough Money To Do That" to player
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98. command /shop:
  99. trigger:
  100. open chest with 1 rows named "&2&lSHOP" to player
  101. set slot 0 of player's current inventory to wheat seeds named "&2Seeds" with lore "&6Open The Seeds Section"
  102. set slot 1 of player's current inventory to melon slice named "&2Food" with lore "&6Open The Food Section"
  103. set slot 2 of player's current inventory to water bucket named "&2Misc" with lore "&6Open The Misc Section"
  104.  
  105.  
  106. on inventory click:
  107. if inventory name of player's current inventory is "&2&lSHOP":
  108. cancel event
  109. if clicked slot is 0:
  110. open chest with 2 rows named "&2&lSHOP &7&l| &2&lSEEDS" to player
  111. set slot 0 of player's current inventory to Barrier named "&2Back"
  112. set slot 1 of player's current inventory to wheat seeds named "&21x Wheat Seeds" with lore "&6Price: {@1xWheatSeedsPrice}"
  113. set slot 2 of player's current inventory to wheat seeds named "&232x Wheat Seeds" with lore "&6Price: {@32xWheatSeedsPrice}"
  114. else if clicked slot is 1:
  115. open chest with 2 rows named "&2&lSHOP &7&l| &2&lFOOD" to player
  116. set slot 0 of player's current inventory to Barrier named "&2Back"
  117. set slot 1 of player's current inventory to cooked beef named "&264x Steak" with lore "&6Price: {@64xSteakPrice}"
  118. else if clicked slot is 2:
  119. open chest with 2 rows named "&2&lSHOP &7&l| &2&lMISC" to player
  120. set slot 0 of player's current inventory to Barrier named "&2Back"
  121. set slot 1 of player's current inventory to water bucket named "&21x Water Bucket" with lore "&6Price: {@1xWaterBucketPrice}"
  122.  
  123.  
  124.  
  125.  
  126.  
  127. #SEEDS SECTION#
  128.  
  129. on inventory click:
  130. if inventory name of player's current inventory is "&2&lSHOP &7&l| &2&lSEEDS":
  131. cancel event
  132. if clicked slot is 0:
  133. make player say "/shop"
  134. else if clicked slot is 1:
  135. if {balance.%player%} is greater or equal to {@1xWheatSeedsPrice}:
  136. remove {@1xWheatSeedsPrice} from {balance.%player%}
  137. give player 1 wheat seeds
  138. send "{@p} You Bought 1x Wheat Seeds For ${@1xWheatSeedsPrice} Your New Balance Is $%{balance.%player%}%" to player
  139. else:
  140. send "{@p} You Dont Have Enough Money. Your Balance Is $%{balance.%player%}%" to player
  141. else if clicked slot is 2:
  142. if {balance.%player%} is greater or equal to {@32xWheatSeedsPrice}:
  143. remove {@32xWheatSeedsPrice} from {balance.%player%}
  144. give player 32 wheat seeds
  145. send "{@p} You Bought 32x Wheat Seeds For ${@32xWheatSeedsPrice} Your New Balance Is $%{balance.%player%}%" to player
  146. else:
  147. send "{@p} You Dont Have Enough Money. Your Balance Is $%{balance.%player%}%" to player
  148.  
  149.  
  150.  
  151.  
  152.  
  153. #SEEDS SECTION#
  154.  
  155. #FOOD SECTION#
  156.  
  157. on inventory click:
  158. if inventory name of player's current inventory is "&2&lSHOP &7&l| &2&lFOOD":
  159. cancel event
  160. if clicked slot is 0:
  161. make player say "/shop"
  162. else if clicked slot is 1:
  163. if {balance.%player%} is greater or equal to {@64xSteakPrice}:
  164. remove {@64xSteakPrice} from {balance.%player%}
  165. give player 64 cooked beef
  166. send "{@p} You Bought 64x Steak For ${@64xSteakPrice} Your New Balance Is $%{balance.%player%}%" to player
  167. else:
  168. send "{@p} You Dont Have Enough Money. Your Balance Is $%{balance.%player%}%" to player
  169.  
  170.  
  171. #FOOD SECTION#
  172.  
  173. #MISC SECTION#
  174.  
  175. on inventory click:
  176. if inventory name of player's current inventory is "&2&lSHOP &7&l| &2&lMISC":
  177. cancel event
  178. if clicked slot is 0:
  179. make player say "/shop"
  180. else if clicked slot is 1:
  181. if {balance.%player%} is greater or equal to {@1xWaterBucketPrice}:
  182. remove {@1xWaterBucketPrice} from {balance.%player%}
  183. give player 1 water bucket
  184. send "{@p} You Bought 1x Water Bucket For ${@1xWaterBucketPrice} Your New Balance Is $%{balance.%player%}%" to player
  185. else:
  186. send "{@p} You Dont Have Enough Money. Your Balance Is $%{balance.%player%}%" to player
  187.  
  188.  
  189. command /sell:
  190. trigger:
  191. send "&a" to player
  192. send "{@p2} Sold All Sellable Items In Your Inventory." to player
  193. if player's inventory contains wheat seeds:
  194. set {_wheatseedsamount} to amount of wheat seeds in player's inventory
  195. set {_profit} to {@SellWheatSeedsPrice}*{_wheatseedsamount}
  196. add {_profit} to {balance.%player%}
  197. remove all wheat seeds from player's inventory
  198. send "Wheat Seeds Sold: %{_wheatseedsamount}% Pieces "
  199. if player's inventory contains wheat:
  200. set {_wheatamount} to amount of wheat in player's inventory
  201. set {_profit} to {@SellWheatSeedsPrice}*{_wheatamount}
  202. add {_profit} to {balance.%player%}
  203. remove all wheat from player's inventory
  204. send "Wheat Sold: %{_wheatamount}% Pieces"
  205.  
  206. send "{@p2} You Earned $%{_profit}% In Total" to player
  207. send "&a" to player
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216. command /clearchat:
  217. permission: shop.clearchat
  218. trigger:
  219. loop 300 times:
  220. broadcast "&a"
  221. broadcast "&2The Chat Has Been Cleared By %player%"
  222. broadcast "&a"
  223.  
  224.  
  225. on chat:
  226. if player has permission "shop.rank.owner":
  227. set the chat format to "&7[&c&lOWNER&7]&r %player%: %message%"
  228. else if player has permission "shop.rank.admin":
  229. set the chat format to "&7[&e&lADMIN&7]&r %player%: %message%"
  230. else if player has permission "shop.rank.Helper":
  231. set the chat format to "&7[&9&lHELPER&7]&r %player%: %message%"
  232. else if player has permission "shop.rank.vip":
  233. set the chat format to "&7[&6&lVIP&7]&r %player%: %message%"
  234. else:
  235. set the chat format to "&r%player%: %message%"
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement