Advertisement
Guest User

Untitled

a guest
Jan 20th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.90 KB | None | 0 0
  1. function GUI(block: item, slot: number, player: player):
  2. close {_player}'s inventory
  3. open chest with 6 rows named "Shop" to {_player}
  4. wait 1 tick
  5. set {_yrow1} to 2
  6. set {_yrow2} to 1
  7. set {_yrow3} to 8
  8. set {_xrow1} to 3
  9. set {_xrow2} to 48
  10. loop 5 times:
  11. format slot {_xrow1} of {_player} with {_block} named "" to be unstealable
  12. add 1 to {_xrow1}
  13. loop 5 times:
  14. format slot {_xrow2} of {_player} with {_block} named "" to be unstealable
  15. add 1 to {_xrow2}
  16. loop 6 times:
  17. format slot {_yrow1} of {_player} with {_block} named "" to be unstealable
  18. add 9 to {_yrow1}
  19. loop 6 times:
  20. format slot {_yrow3} of {_player} with {_block} named "" to be unstealable
  21. add 9 to {_yrow3}
  22. loop 6 times:
  23. format slot {_yrow2} of {_player} with black glass named "" to be unstealable
  24. add 9 to {_yrow2}
  25. format slot {_slot} of {_player} with {_block} named "" to be unstealable
  26.  
  27. on right click on entity:
  28. if entity is a villager:
  29. player is in world "Empty"
  30. execute player command "/buy roomn1"
  31.  
  32. command /buy [<text>]:
  33. trigger:
  34. if arg-1 is "roomn1":
  35. close the player's inventory
  36. set {_p} to player
  37. GUI((white glass), (1), (player))
  38. wait 2 tick
  39. format slot 0 of player with oak planks named "&6Blocks." to be unstealable
  40. format slot 9 of player with wood sword named "&6Tools." to run [execute player command "/buy roomn2"]
  41. format slot 18 of player with apple named "&6Utilities." to run [execute player command "/buy roomn3"]
  42. format slot 27 of player with leather chestplate named "&6Armor." to run [execute player command "/buy roomn4"]
  43. format slot 36 of player with crafting table named "&6Block Upgrades." to run [execute player command "/buy roomn5"]
  44. wait 1 tick
  45. format slot 22 of player with white wool block named "&6Wool." with lore "&7Costs &8>> &63x Brick.||&7Amount &8>> &616x" to run [execute player command "/buy wool"]
  46. format slot 23 of player with oak planks named "&6Planks." with lore "&7Costs &8>> &68x Brick.||&7Amount &8>> &68x" to run [execute player command "/buy planks"]
  47. if arg-1 is "roomn2":
  48. set {_p} to player
  49. GUI((red glass), (10), (player))
  50. wait 2 tick
  51. format slot 0 of player with oak planks named "&6Blocks." to run [execute player command "/buy roomn1"]
  52. format slot 9 of player with wood sword named "&6Tools." to be unstealable
  53. format slot 18 of player with apple named "&6Utilities." to run [execute player command "/buy roomn3"]
  54. format slot 27 of player with leather chestplate named "&6Armor." to run [execute player command "/buy roomn4"]
  55. format slot 36 of player with crafting table named "&6Block Upgrades." to run [execute player command "/buy roomn5"]
  56. wait 1 tick
  57. format slot 22 of player with stone sword named "&6Stone Sword." with lore "&7Costs &8>> &68x Brick.||&7Amount &8>> &61x" to run [execute player command "/buy stonesword"]
  58. format slot 23 of player with iron sword named "&6Iron Sword." with lore "&7Costs &8>> &624x Brick.||&7Amount &8>> &61x" to run [execute player command "/buy ironsword"]
  59. format slot 31 of player with stone axe named "&6Stone Axe." with lore "&7Costs &8>> &68x Brick.||&7Amount &8>> &61x" to run [execute player command "/buy stoneaxe"]
  60. format slot 32 of player with iron axe named "&6Iron Axe." with lore "&7Costs &8>> &616x Brick.||&7Amount &8>> &61x" to run [execute player command "/buy ironaxe"]
  61. format slot 40 of player with stone pickaxe named "&6Stone Pick-Axe." with lore "&7Costs &8>> &616x Brick.||&7Amount &8>> &61x" to run [execute player command "/buy stonepick"]
  62. format slot 41 of player with iron pickaxe named "&6Iron Pick-Axe." with lore "&7Costs &8>> &624x Brick.||&7Amount &8>> &61x" to run [execute player command "/buy ironpick"]
  63. if arg-1 is "roomn3":
  64. set {_p} to player
  65. GUI((green glass), (19), (player))
  66. wait 2 tick
  67. format slot 0 of player with oak planks named "&6Blocks." to run [execute player command "/buy roomn1"]
  68. format slot 9 of player with wood sword named "&6Tools." to run [execute player command "/buy roomn2"]
  69. format slot 18 of player with apple named "&6Utilities." to be unstealable
  70. format slot 27 of player with leather chestplate named "&6Armor." to run [execute player command "/buy roomn4"]
  71. format slot 36 of player with crafting table named "&6Block Upgrades." to run [execute player command "/buy roomn5"]
  72. wait 1 tick
  73. format slot 22 of player with golden apple:1 named "&6Golden Apple." with lore "&7Costs &8>> &68x Brick.||&7Amount &8>> &61x" to run [execute player command "/buy gapple"]
  74. if arg-1 is "roomn4":
  75. set {_p} to player
  76. GUI((blue glass), (28), (player))
  77. wait 2 tick
  78. format slot 0 of player with oak planks named "&6Blocks." to run [execute player command "/buy roomn1"]
  79. format slot 9 of player with wood sword named "&6Tools." to run [execute player command "/buy roomn2"]
  80. format slot 18 of player with apple named "&6Utilities." to run [execute player command "/buy roomn3"]
  81. format slot 27 of player with leather chestplate named "&6Armor." to be unstealable
  82. format slot 36 of player with crafting table named "&6Block Upgrades." to run [execute player command "/buy roomn5"]
  83. wait 1 tick
  84. format slot 22 of player with iron boots named "&6Iron Boots." with lore "&7Costs &8>> &68x Brick.||&7Amount &8>> &61x" to run [execute player command "/buy ironboots"]
  85. format slot 23 of player with iron leggings named "&6Iron Leggings." with lore "&7Costs &8>> &612x Brick.||&7Amount &8>> &61x" to run [execute player command "/buy ironleggings"]
  86. format slot 24 of player with iron chestplate named "&6Iron Chestplate." with lore "&7Costs &8>> &616x Brick.||&7Amount &8>> &61x" to run [execute player command "/buy ironchestplate"]
  87. if arg-1 is "roomn5":
  88. set {_p} to player
  89. GUI((yellow glass), (37), (player))
  90. wait 2 tick
  91. format slot 0 of player with oak planks named "&6Blocks." to run [execute player command "/buy roomn1"]
  92. format slot 9 of player with wood sword named "&6Tools." to run [execute player command "/buy roomn2"]
  93. format slot 18 of player with apple named "&6Utilities." to run [execute player command "/buy roomn3"]
  94. format slot 27 of player with leather chestplate named "&6Armor." to run [execute player command "/buy roomn4"]
  95. format slot 36 of player with crafting table named "&6Block Upgrades." to be unstealable
  96. wait 1 tick
  97. format slot 22 of player with a non-burning furnace named "&6Upgrade ##1" with lore "&7Costs &8>> &632x Brick.||&7Amount &8>> &61x" to run [execute player command "/buy upgrade1"]
  98. if arg-1 is "upgrade1":
  99. set {_cs} to 0
  100. loop 4 times:
  101. add 1 to {_cs}
  102. if {BW.Player1::Arena%{_cs}%} or {BW.Player3::Arena%{_cs}%} is player:
  103. if block at location of {BW.blockspot1::Arena%{_cs}%} is a furnace:
  104. send " {@Skript} >> &7You have already used this upgrade!"
  105. else:
  106. player has 32 bricks named "&6Brick"
  107. remove 32 bricks from player
  108. set block at location of {BW.blockspot1::Arena%{_cs}%} to furnace
  109. send " {@Skript} >> &7You have now upgraded the Block to a furnace!"
  110. if {BW.Player2::Arena%{_cs}%} or {BW.Player4::Arena%{_cs}%} is player:
  111. if block at location of {BW.blockspot2::Arena%{_cs}%} is a furnace:
  112. send " {@Skript} >> &7You have already used this upgrade!"
  113. else:
  114. player has 32 bricks named "&6Brick"
  115. remove 32 bricks from player
  116. set block at location of {BW.blockspot2::Arena%{_cs}%} to furnace
  117. send " {@Skript} >> &7You have now upgraded the Block to a furnace!"
  118. if arg-1 is "wool":
  119. player has 3 bricks named "&6Brick"
  120. remove 3 bricks from player
  121. set {_cs} to 0
  122. loop 4 times:
  123. add 1 to {_cs}
  124. if {BW.Player1::Arena%{_cs}%} or {BW.Player3::Arena%{_cs}%} is player:
  125. give player 8 red wool
  126. if {BW.Player2::Arena%{_cs}%} or {BW.Player4::Arena%{_cs}%} is player:
  127. give player 8 blue wool
  128. if arg-1 is "planks":
  129. player has 8 bricks named "&6Brick"
  130. remove 8 bricks from player
  131. set {_cs} to 0
  132. loop 4 times:
  133. add 1 to {_cs}
  134. if {BW.Player1::Arena%{_cs}%} or {BW.Player3::Arena%{_cs}%} is player:
  135. give player 8 oak planks
  136. if {BW.Player2::Arena%{_cs}%} or {BW.Player4::Arena%{_cs}%} is player:
  137. give player 8 oak planks
  138. if arg-1 is "gapple":
  139. player has 8 bricks named "&6Brick"
  140. remove 8 bricks from player
  141. set {_cs} to 0
  142. loop 4 times:
  143. add 1 to {_cs}
  144. if {BW.Player1::Arena%{_cs}%}, {BW.Player2::Arena%{_cs}%}, {BW.Player3::Arena%{_cs}%} or {BW.Player4::Arena%{_cs}%} is player:
  145. give player 1 golden apple
  146. if arg-1 is "stoneaxe":
  147. set {_cs} to 0
  148. loop 4 times:
  149. add 1 to {_cs}
  150. if {BW.Player1::Arena%{_cs}%}, {BW.Player2::Arena%{_cs}%}, {BW.Player3::Arena%{_cs}%} or {BW.Player4::Arena%{_cs}%} is player:
  151. if player has an stone axe:
  152. send " {@Skript} >> &7You already have a stone axe!"
  153. else:
  154. player has 8 bricks named "&6Brick"
  155. remove 8 bricks from player
  156. give player 1 stone axe
  157. if arg-1 is "stonepick":
  158. set {_cs} to 0
  159. loop 4 times:
  160. add 1 to {_cs}
  161. if {BW.Player1::Arena%{_cs}%}, {BW.Player2::Arena%{_cs}%}, {BW.Player3::Arena%{_cs}%} or {BW.Player4::Arena%{_cs}%} is player:
  162. if player has an stone pickaxe:
  163. send " {@Skript} >> &7You already have a stone pickaxe!"
  164. else:
  165. player has 16 bricks named "&6Brick"
  166. remove 16 bricks from player
  167. give player 1 stone pickaxe
  168. if arg-1 is "ironpick":
  169. set {_cs} to 0
  170. loop 4 times:
  171. add 1 to {_cs}
  172. if {BW.Player1::Arena%{_cs}%}, {BW.Player2::Arena%{_cs}%}, {BW.Player3::Arena%{_cs}%} or {BW.Player4::Arena%{_cs}%} is player:
  173. if player has an iron pickaxe:
  174. send " {@Skript} >> &7You already have a iron pickaxe!"
  175. else:
  176. player has 24 bricks named "&6Brick"
  177. remove 24 bricks named "&6Brick" from player
  178. give player 1 iron pickaxe
  179. if arg-1 is "ironaxe":
  180. set {_cs} to 0
  181. loop 4 times:
  182. add 1 to {_cs}
  183. if {BW.Player1::Arena%{_cs}%}, {BW.Player2::Arena%{_cs}%}, {BW.Player3::Arena%{_cs}%} or {BW.Player4::Arena%{_cs}%} is player:
  184. if player has an iron axe:
  185. send " {@Skript} >> &7You already have a iron axe!"
  186. else:
  187. player has 16 bricks named "&6Brick"
  188. remove 16 bricks from player
  189. give player 1 iron axe
  190. if arg-1 is "stonesword":
  191. set {_cs} to 0
  192. loop 4 times:
  193. add 1 to {_cs}
  194. if {BW.Player1::Arena%{_cs}%} or {BW.Player3::Arena%{_cs}%} is player:
  195. if player has an stone sword:
  196. send " {@Skript} >> &7You already have a stone sword!"
  197. else:
  198. player has 8 bricks named "&6Brick"
  199. remove 8 bricks from player
  200. remove wooden sword from player
  201. give player 1 stone sword
  202. if {BW.Player2::Arena%{_cs}%} or {BW.Player4::Arena%{_cs}%} is player:
  203. if player has an stone sword:
  204. send " {@Skript} >> &7You already have a stone sword!"
  205. else:
  206. player has 8 bricks named "&6Brick"
  207. remove 8 bricks from player
  208. remove wooden sword from player
  209. give player 1 stone sword
  210. if arg-1 is "ironsword":
  211. set {_cs} to 0
  212. loop 4 times:
  213. add 1 to {_cs}
  214. if {BW.Player1::Arena%{_cs}%} or {BW.Player3::Arena%{_cs}%} is player:
  215. if player has an iron sword:
  216. send " {@Skript} >> &7You already have a iron sword!"
  217. else:
  218. player has 24 bricks named "&6Brick"
  219. remove 24 bricks from player
  220. remove wooden sword from player
  221. remove stone sword from player
  222. give player 1 iron sword
  223. if {BW.Player2::Arena%{_cs}%} or {BW.Player4::Arena%{_cs}%} is player:
  224. if player has an iron sword:
  225. send " {@Skript} >> &7You already have a iron sword!"
  226. else:
  227. player has 24 bricks named "&6Brick"
  228. remove 24 bricks from player
  229. remove wooden sword from player
  230. remove stone sword from player
  231. give player 1 iron sword
  232. if arg-1 is "ironboots":
  233. set {_cs} to 0
  234. loop 4 times:
  235. add 1 to {_cs}
  236. if {BW.Player1::Arena%{_cs}%} or {BW.Player3::Arena%{_cs}%} is player:
  237. if player has an iron boots:
  238. send " {@Skript} >> &7You already have a iron boots!"
  239. else:
  240. player has 8 bricks named "&6Brick"
  241. remove 8 bricks from player
  242. set player's boots slot to an iron boots
  243. if {BW.Player2::Arena%{_cs}%} or {BW.Player4::Arena%{_cs}%} is player:
  244. if player has an iron helmet:
  245. send " {@Skript} >> &7You already have a iron boots!"
  246. else:
  247. player has 8 bricks named "&6Brick"
  248. remove 8 bricks from player
  249. set player's boots slot to an iron boots
  250. if arg-1 is "ironchestplate":
  251. set {_cs} to 0
  252. loop 4 times:
  253. add 1 to {_cs}
  254. if {BW.Player1::Arena%{_cs}%} or {BW.Player3::Arena%{_cs}%} is player:
  255. if player has an iron chestplate:
  256. send " {@Skript} >> &7You already have a iron chestplate!"
  257. else:
  258. player has 18 bricks named "&6Brick"
  259. remove 18 bricks from player
  260. set player's chestplate slot to an iron chestplate
  261. if {BW.Player2::Arena%{_cs}%} or {BW.Player4::Arena%{_cs}%} is player:
  262. if player has an iron chestplate:
  263. send " {@Skript} >> &7You already have a iron chestplate!"
  264. else:
  265. player has 18 bricks named "&6Brick"
  266. remove 18 bricks from player
  267. set player's chestplate slot to an iron chestplate
  268. if arg-1 is "ironleggings":
  269. set {_cs} to 0
  270. loop 4 times:
  271. add 1 to {_cs}
  272. if {BW.Player1::Arena%{_cs}%} or {BW.Player3::Arena%{_cs}%} is player:
  273. if player has an iron leggings:
  274. send " {@Skript} >> &7You already have a iron leggings!"
  275. else:
  276. player has 12 bricks named "&6Brick"
  277. remove 12 bricks from player
  278. set player's leggings slot to an iron leggings
  279. if {BW.Player2::Arena%{_cs}%} or {BW.Player4::Arena%{_cs}%} is player:
  280. if player has an iron leggings:
  281. send " {@Skript} >> &7You already have a iron leggings!"
  282. else:
  283. player has 12 bricks named "&6Brick"
  284. remove 12 bricks from player
  285. set player's leggings slot to an iron leggings
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement