AdamLam

Untitled

Feb 8th, 2020
429
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.18 KB | None | 0 0
  1. function GuiFillForge(p: player,s: number,m: material):
  2. set {_times} to {_s}
  3. set {_slot} to 0
  4. loop {_times} times:
  5. create gui slot {_slot} of {_p} with {_m} named " " with lore " " to do nothing
  6. set {_slot} to {_slot}+1
  7. if {_m} is red stained glass pane:
  8. create gui slot {_s}-5 of {_p} with barrier block named "&4&lEXIT" with lore " " to run:
  9. play raw sound "note.hat" at player with pitch 1 volume 1
  10. close player's inventory
  11. on craft:
  12. if event-item is helmet or chestplate or leggings or boots or sword or pickaxe or axe or shovel:
  13. send "&6>> &cYou can craft Tools and Sets only in &7&lForge &cstructure."
  14. play raw sound "note.bassattack" at player with pitch 1 volume 1
  15. cancel event
  16. close player's inventory
  17. on rightclick on anvil:
  18. if block below event-block is glowstone:
  19. set {_loc} to location of event-block
  20. if event-block is very damaged anvil:
  21. cancel event
  22. if {%{_loc}%.ForgeInProgress} is true:
  23. if now is greater than {%{_loc}%.ForgeTime}:
  24. if player has enough space for 1 stone:
  25. play raw sound "note.hat" at player with pitch 1 volume 1
  26. give {%{_loc}%.ForgeItem} to player
  27. send "&6>> Here is your freshly forged %{%{_loc}%.ForgeItemName}%"
  28. delete {%{_loc}%.ForgeItem}
  29. delete {%{_loc}%.ForgeTime}
  30. delete {%{_loc}%.ForgeItemName}
  31. set {%{_loc}%.ForgeInProgress} to false
  32. set block at location of event-block to anvil
  33. else:
  34. send "&6>> &cYou don't have space to receive forged item."
  35. else:
  36. send "&6>> &cThe item will be forged at %{%{_loc}%.ForgeTime}% &6&l(GMT+1)"
  37. else:
  38. cancel event
  39. if {%{_loc}%.ForgeInProgress} is not set:
  40. set {%{_loc}%.ForgeInProgress} to false
  41. else:
  42. set {_loc} to location of event-block
  43. open virtual chest with size 4 named "Forge" to player
  44. wait 2 ticks
  45. GuiFillForge(player,36,red stained glass pane)
  46. wait 2 ticks
  47. GuiFillForge(player,27,black stained glass pane)
  48. wait 2 ticks
  49. create gui slot 13 of player with anvil named "&f&lRepair" with lore "&6>> &7Repair item you're currently holding||&6>> &7Price: &a100$" to run:
  50. if player's balance is greater than or equal to 100:
  51. if player's tool is boots or sword or axe or pickaxe or leggings or chestplate or helmet:
  52. play raw sound "note.hat" at player with pitch 1 volume 1
  53. remove 100 from player's balance
  54. repair tool of player
  55. send "&6>> &aYou repaired an item"
  56. else:
  57. play raw sound "note.bassattack" at player with pitch 1 volume 1
  58. send "&6>> &cYou can't repair this item"
  59. else:
  60. play raw sound "note.bassattack" at player with pitch 1 volume 1
  61. send "&6>> &cYou have insufficient funds to repair"
  62. create gui slot 11 of player with iron ingot named "&7&lForge Iron Items" with lore "&6>> &bClick to forge iron items" to run:
  63. play raw sound "note.hat" at player with pitch 1 volume 1
  64. close player's inventory
  65. wait 2 ticks
  66. open virtual chest with size 5 named "Forge Iron Items" to player
  67. wait 2 ticks
  68. GuiFillForge(player,45,red stained glass pane)
  69. GuiFillForge(player,36,black stained glass pane)
  70. wait 2 ticks
  71. create gui slot 1 of player with iron helmet named "&7&lIron &f&lHelmet" with lore "Price: $100 and 5 iron ingots" to run:
  72. if player's balance is greater than or equal to 100:
  73. if player has 5 iron ingots:
  74. remove 5 iron ingots from player's inventory
  75. remove 100 from player's balance
  76. play raw sound "note.hat" at player with pitch 1 volume 1
  77. close player's inventory
  78. set {%{_loc}%.ForgeInProgress} to true
  79. set {_cooldown} to 30 minutes
  80. set {%{_loc}%.ForgeTime} to now
  81. add {_cooldown} to {%{_loc}%.ForgeTime}
  82. set {%{_loc}%.ForgeItem} to iron helmet
  83. set block at {_loc} to very damaged anvil
  84. set {%{_loc}%.ForgeItemName} to "&7&lIron &f&lHelmet"
  85. else:
  86. play raw sound "note.bassattack" at player with pitch 1 volume 1
  87. send "&6>> &cYou don't have enough iron ingots to craft this"
  88. else:
  89. play raw sound "note.bassattack" at player with pitch 1 volume 1
  90. send "&6>> &cYou have insufficient funds to craft this"
  91. create gui slot 10 of player with iron chestplate named "&7&lIron &f&lChestplate" with lore "Price: $100 and 5 iron ingots" to run:
  92. if player's balance is greater than or equal to 100:
  93. if player has 5 iron ingots:
  94. remove 5 iron ingots from player's inventory
  95. remove 100 from player's balance
  96. play raw sound "note.hat" at player with pitch 1 volume 1
  97. close player's inventory
  98. set {%{_loc}%.ForgeInProgress} to true
  99. set {_cooldown} to 30 minutes
  100. set {%{_loc}%.ForgeTime} to now
  101. add {_cooldown} to {%{_loc}%.ForgeTime}
  102. set {%{_loc}%.ForgeItem} to iron chestplate
  103. set block at {_loc} to very damaged anvil
  104. set {%{_loc}%.ForgeItemName} to "&7&lIron &f&lChestplate"
  105. else:
  106. play raw sound "note.bassattack" at player with pitch 1 volume 1
  107. send "&6>> &cYou don't have enough iron ingots to craft this"
  108. else:
  109. play raw sound "note.bassattack" at player with pitch 1 volume 1
  110. send "&6>> &cYou have insufficient funds to craft this"
  111. create gui slot 19 of player with iron Leggings named "&7&lIron &f&lLeggings" with lore "Price: $100 and 5 iron ingots" to run:
  112. if player's balance is greater than or equal to 100:
  113. if player has 5 iron ingots:
  114. remove 5 iron ingots from player's inventory
  115. remove 100 from player's balance
  116. play raw sound "note.hat" at player with pitch 1 volume 1
  117. close player's inventory
  118. set {%{_loc}%.ForgeInProgress} to true
  119. set {_cooldown} to 30 minutes
  120. set {%{_loc}%.ForgeTime} to now
  121. add {_cooldown} to {%{_loc}%.ForgeTime}
  122. set {%{_loc}%.ForgeItem} to iron leggings
  123. set block at {_loc} to very damaged anvil
  124. set {%{_loc}%.ForgeItemName} to "&7&lIron &f&lLeggings"
  125. else:
  126. play raw sound "note.bassattack" at player with pitch 1 volume 1
  127. send "&6>> &cYou don't have enough iron ingots to craft this"
  128. else:
  129. play raw sound "note.bassattack" at player with pitch 1 volume 1
  130. send "&6>> &cYou have insufficient funds to craft this"
  131. create gui slot 28 of player with iron boots named "&7&lIron &f&lBoots" with lore "Price: $100 and 5 iron ingots" to run:
  132. if player's balance is greater than or equal to 100:
  133. if player has 5 iron ingots:
  134. remove 5 iron ingots from player's inventory
  135. remove 100 from player's balance
  136. play raw sound "note.hat" at player with pitch 1 volume 1
  137. close player's inventory
  138. set {%{_loc}%.ForgeInProgress} to true
  139. set {_cooldown} to 30 minutes
  140. set {%{_loc}%.ForgeTime} to now
  141. add {_cooldown} to {%{_loc}%.ForgeTime}
  142. set {%{_loc}%.ForgeItem} to iron boots
  143. set block at {_loc} to very damaged anvil
  144. set {%{_loc}%.ForgeItemName} to "&7&lIron &f&lBoots"
  145. else:
  146. play raw sound "note.bassattack" at player with pitch 1 volume 1
  147. send "&6>> &cYou don't have enough iron ingots to craft this"
  148. else:
  149. play raw sound "note.bassattack" at player with pitch 1 volume 1
  150. send "&6>> &cYou have insufficient funds to craft this"
  151. create gui slot 7 of player with iron sword named "&7&lIron &f&lSword" with lore "Price: $100 and 5 iron ingots" to run:
  152. if player's balance is greater than or equal to 100:
  153. if player has 5 iron ingots:
  154. remove 5 iron ingots from player's inventory
  155. remove 100 from player's balance
  156. play raw sound "note.hat" at player with pitch 1 volume 1
  157. close player's inventory
  158. set {%{_loc}%.ForgeInProgress} to true
  159. set {_cooldown} to 30 minutes
  160. set {%{_loc}%.ForgeTime} to now
  161. add {_cooldown} to {%{_loc}%.ForgeTime}
  162. set {%{_loc}%.ForgeItem} to iron sword
  163. set block at {_loc} to very damaged anvil
  164. set {%{_loc}%.ForgeItemName} to "&7&lIron &f&lSword"
  165. else:
  166. play raw sound "note.bassattack" at player with pitch 1 volume 1
  167. send "&6>> &cYou don't have enough iron ingots to craft this"
  168. else:
  169. play raw sound "note.bassattack" at player with pitch 1 volume 1
  170. send "&6>> &cYou have insufficient funds to craft this"
  171. create gui slot 16 of player with iron pickaxe named "&7&lIron &f&lPickaxe" with lore "Price: $100 and 5 iron ingots" to run:
  172. if player's balance is greater than or equal to 100:
  173. if player has 5 iron ingots:
  174. remove 5 iron ingots from player's inventory
  175. remove 100 from player's balance
  176. play raw sound "note.hat" at player with pitch 1 volume 1
  177. close player's inventory
  178. set {%{_loc}%.ForgeInProgress} to true
  179. set {_cooldown} to 30 minutes
  180. set {%{_loc}%.ForgeTime} to now
  181. add {_cooldown} to {%{_loc}%.ForgeTime}
  182. set {%{_loc}%.ForgeItem} to iron pickaxe
  183. set block at {_loc} to very damaged anvil
  184. set {%{_loc}%.ForgeItemName} to "&7&lIron &f&lPickaxe"
  185. else:
  186. play raw sound "note.bassattack" at player with pitch 1 volume 1
  187. send "&6>> &cYou don't have enough iron ingots to craft this"
  188. else:
  189. play raw sound "note.bassattack" at player with pitch 1 volume 1
  190. send "&6>> &cYou have insufficient funds to craft this"
  191. create gui slot 25 of player with iron axe named "&7&lIron &f&lAxe" with lore "Price: $100 and 5 iron ingots" to run:
  192. if player's balance is greater than or equal to 100:
  193. if player has 5 iron ingots:
  194. remove 5 iron ingots from player's inventory
  195. remove 100 from player's balance
  196. play raw sound "note.hat" at player with pitch 1 volume 1
  197. close player's inventory
  198. set {%{_loc}%.ForgeInProgress} to true
  199. set {_cooldown} to 30 minutes
  200. set {%{_loc}%.ForgeTime} to now
  201. add {_cooldown} to {%{_loc}%.ForgeTime}
  202. set {%{_loc}%.ForgeItem} to iron axe
  203. set block at {_loc} to very damaged anvil
  204. set {%{_loc}%.ForgeItemName} to "&7&lIron &f&lAxe"
  205. else:
  206. play raw sound "note.bassattack" at player with pitch 1 volume 1
  207. send "&6>> &cYou don't have enough iron ingots to craft this"
  208. else:
  209. play raw sound "note.bassattack" at player with pitch 1 volume 1
  210. send "&6>> &cYou have insufficient funds to craft this"
  211. create gui slot 34 of player with iron shovel named "&7&lIron &f&lShovel" with lore "Price: $100 and 5 iron ingots" to run:
  212. if player's balance is greater than or equal to 100:
  213. if player has 5 iron ingots:
  214. remove 5 iron ingots from player's inventory
  215. remove 100 from player's balance
  216. play raw sound "note.hat" at player with pitch 1 volume 1
  217. close player's inventory
  218. set {%{_loc}%.ForgeInProgress} to true
  219. set {_cooldown} to 30 minutes
  220. set {%{_loc}%.ForgeTime} to now
  221. add {_cooldown} to {%{_loc}%.ForgeTime}
  222. set {%{_loc}%.ForgeItem} to iron shovel
  223. set block at {_loc} to very damaged anvil
  224. set {%{_loc}%.ForgeItemName} to "&7&lIron &f&lShovel"
  225. else:
  226. play raw sound "note.bassattack" at player with pitch 1 volume 1
  227. send "&6>> &cYou don't have enough iron ingots to craft this"
  228. else:
  229. play raw sound "note.bassattack" at player with pitch 1 volume 1
  230. send "&6>> &cYou have insufficient funds to craft this"
  231. if block 2 below event-block is emerald block:
  232. create gui slot 15 of event-player with light blue stained glass pane named "&b&lForge Diamond Items" with lore "&6>> &cTo unlock upgrade &7&lForge &cto level &a&lII" to run:
  233. play raw sound "note.bassattack" at player with pitch 1 volume 1
  234. send "&6>> &cTo unlock forging diamond tools and sets, upgrade &7&lForge&c."
  235. close player's inventory
  236. else:
  237. create gui slot 15 of event-player with diamond named "&b&lForge Diamond Items" with lore "&6>> &bClick to forge diamond items" to run:
  238. play raw sound "note.hat" at player with pitch 1 volume 1
  239. close player's inventory
  240. wait 2 ticks
  241. open virtual chest with size 5 named "Forge Diamond Items" to player
  242. wait 2 ticks
  243. GuiFillForge(player,45,red stained glass pane)
  244. GuiFillForge(player,36,black stained glass pane)
  245. wait 2 ticks
  246. create gui slot 1 of player with diamond helmet named "&b&lDiamond &f&lHelmet" with lore "Price: $100 and 10 diamonds" to run:
  247. if player's balance is greater than or equal to 100:
  248. if player has 10 diamonds:
  249. remove 10 diamonds from player's inventory
  250. remove 100 from player's balance
  251. play raw sound "note.hat" at player with pitch 1 volume 1
  252. close player's inventory
  253. set {%{_loc}%.ForgeInProgress} to true
  254. set {_cooldown} to 30 minutes
  255. set {%{_loc}%.ForgeTime} to now
  256. add {_cooldown} to {%{_loc}%.ForgeTime}
  257. set {%{_loc}%.ForgeItem} to diamond helmet
  258. set block at {_loc} to very damaged anvil
  259. set {%{_loc}%.ForgeItemName} to "&b&lDiamond &f&lHelmet"
  260. else:
  261. play raw sound "note.bassattack" at player with pitch 1 volume 1
  262. send "&6>> &cYou don't have enough diamonds to craft this"
  263. else:
  264. play raw sound "note.bassattack" at player with pitch 1 volume 1
  265. send "&6>> &cYou have insufficient funds to craft this"
  266. create gui slot 10 of player with diamond chestplate named "&b&lDiamond &f&lChestplate" with lore "Price: $100 and 10 diamonds" to run:
  267. if player's balance is greater than or equal to 100:
  268. if player has 10 diamonds:
  269. remove 10 diamonds from player's inventory
  270. remove 100 from player's balance
  271. play raw sound "note.hat" at player with pitch 1 volume 1
  272. close player's inventory
  273. set {%{_loc}%.ForgeInProgress} to true
  274. set {_cooldown} to 30 minutes
  275. set {%{_loc}%.ForgeTime} to now
  276. add {_cooldown} to {%{_loc}%.ForgeTime}
  277. set {%{_loc}%.ForgeItem} to diamond chestplate
  278. set block at {_loc} to very damaged anvil
  279. set {%{_loc}%.ForgeItemName} to "&b&lDiamond &f&lChestplate"
  280. else:
  281. play raw sound "note.bassattack" at player with pitch 1 volume 1
  282. send "&6>> &cYou don't have enough diamonds to craft this"
  283. else:
  284. play raw sound "note.bassattack" at player with pitch 1 volume 1
  285. send "&6>> &cYou have insufficient funds to craft this"
  286. create gui slot 19 of player with diamond Leggings named "&b&lDiamond &f&lLeggings" with lore "Price: $100 and 10 diamonds" to run:
  287. if player's balance is greater than or equal to 100:
  288. if player has 10 diamonds:
  289. remove 10 diamonds from player's inventory
  290. remove 100 from player's balance
  291. play raw sound "note.hat" at player with pitch 1 volume 1
  292. close player's inventory
  293. set {%{_loc}%.ForgeInProgress} to true
  294. set {_cooldown} to 30 minutes
  295. set {%{_loc}%.ForgeTime} to now
  296. add {_cooldown} to {%{_loc}%.ForgeTime}
  297. set {%{_loc}%.ForgeItem} to diamond leggings
  298. set block at {_loc} to very damaged anvil
  299. set {%{_loc}%.ForgeItemName} to "&b&lDiamond &f&lLeggings"
  300. else:
  301. play raw sound "note.bassattack" at player with pitch 1 volume 1
  302. send "&6>> &cYou don't have enough diamonds to craft this"
  303. else:
  304. play raw sound "note.bassattack" at player with pitch 1 volume 1
  305. send "&6>> &cYou have insufficient funds to craft this"
  306. create gui slot 28 of player with diamond boots named "&b&lDiamond &f&lBoots" with lore "Price: $100 and 10 diamonds" to run:
  307. if player's balance is greater than or equal to 100:
  308. if player has 10 diamonds:
  309. remove 10 diamonds from player's inventory
  310. remove 100 from player's balance
  311. play raw sound "note.hat" at player with pitch 1 volume 1
  312. close player's inventory
  313. set {%{_loc}%.ForgeInProgress} to true
  314. set {_cooldown} to 30 minutes
  315. set {%{_loc}%.ForgeTime} to now
  316. add {_cooldown} to {%{_loc}%.ForgeTime}
  317. set {%{_loc}%.ForgeItem} to diamond boots
  318. set block at {_loc} to very damaged anvil
  319. set {%{_loc}%.ForgeItemName} to "&b&lDiamond &f&lBoots"
  320. else:
  321. play raw sound "note.bassattack" at player with pitch 1 volume 1
  322. send "&6>> &cYou don't have enough diamonds to craft this"
  323. else:
  324. play raw sound "note.bassattack" at player with pitch 1 volume 1
  325. send "&6>> &cYou have insufficient funds to craft this"
  326. create gui slot 7 of player with diamond sword named "&b&lDiamond &f&lSword" with lore "Price: $100 and 10 diamonds" to run:
  327. if player's balance is greater than or equal to 100:
  328. if player has 10 diamonds:
  329. remove 10 diamonds from player's inventory
  330. remove 100 from player's balance
  331. play raw sound "note.hat" at player with pitch 1 volume 1
  332. close player's inventory
  333. set {%{_loc}%.ForgeInProgress} to true
  334. set {_cooldown} to 30 minutes
  335. set {%{_loc}%.ForgeTime} to now
  336. add {_cooldown} to {%{_loc}%.ForgeTime}
  337. set {%{_loc}%.ForgeItem} to diamond sword
  338. set block at {_loc} to very damaged anvil
  339. set {%{_loc}%.ForgeItemName} to "&b&lDiamond &f&lSword"
  340. else:
  341. play raw sound "note.bassattack" at player with pitch 1 volume 1
  342. send "&6>> &cYou don't have enough diamonds to craft this"
  343. else:
  344. play raw sound "note.bassattack" at player with pitch 1 volume 1
  345. send "&6>> &cYou have insufficient funds to craft this"
  346. create gui slot 16 of player with diamond pickaxe named "&b&lDiamond &f&lPickaxe" with lore "Price: $100 and 10 diamonds" to run:
  347. if player's balance is greater than or equal to 100:
  348. if player has 10 diamonds:
  349. remove 10 diamonds from player's inventory
  350. remove 100 from player's balance
  351. play raw sound "note.hat" at player with pitch 1 volume 1
  352. close player's inventory
  353. set {%{_loc}%.ForgeInProgress} to true
  354. set {_cooldown} to 30 minutes
  355. set {%{_loc}%.ForgeTime} to now
  356. add {_cooldown} to {%{_loc}%.ForgeTime}
  357. set {%{_loc}%.ForgeItem} to diamond pickaxe
  358. set block at {_loc} to very damaged anvil
  359. set {%{_loc}%.ForgeItemName} to "&b&lDiamond &f&lPickaxe"
  360. else:
  361. play raw sound "note.bassattack" at player with pitch 1 volume 1
  362. send "&6>> &cYou don't have enough diamonds to craft this"
  363. else:
  364. play raw sound "note.bassattack" at player with pitch 1 volume 1
  365. send "&6>> &cYou have insufficient funds to craft this"
  366. create gui slot 25 of player with diamond shovel named "&b&lDiamond &f&lShovel" with lore "Price: $100 and 10 diamonds" to run:
  367. if player's balance is greater than or equal to 100:
  368. if player has 10 diamonds:
  369. remove 10 diamonds from player's inventory
  370. remove 100 from player's balance
  371. play raw sound "note.hat" at player with pitch 1 volume 1
  372. close player's inventory
  373. set {%{_loc}%.ForgeInProgress} to true
  374. set {_cooldown} to 30 minutes
  375. set {%{_loc}%.ForgeTime} to now
  376. add {_cooldown} to {%{_loc}%.ForgeTime}
  377. set {%{_loc}%.ForgeItem} to diamond shovel
  378. set block at {_loc} to very damaged anvil
  379. set {%{_loc}%.ForgeItemName} to "&b&lDiamond &f&lShovel"
  380. else:
  381. play raw sound "note.bassattack" at player with pitch 1 volume 1
  382. send "&6>> &cYou don't have enough diamonds to craft this"
  383. else:
  384. play raw sound "note.bassattack" at player with pitch 1 volume 1
  385. send "&6>> &cYou have insufficient funds to craft this"
  386. create gui slot 34 of player with diamond axe named "&b&lDiamond &f&lAxe" with lore "Price: $100 and 10 diamonds" to run:
  387. if player's balance is greater than or equal to 100:
  388. if player has 10 diamonds:
  389. remove 10 diamonds from player's inventory
  390. remove 100 from player's balance
  391. play raw sound "note.hat" at player with pitch 1 volume 1
  392. close player's inventory
  393. set {%{_loc}%.ForgeInProgress} to true
  394. set {_cooldown} to 30 minutes
  395. set {%{_loc}%.ForgeTime} to now
  396. add {_cooldown} to {%{_loc}%.ForgeTime}
  397. set {%{_loc}%.ForgeItem} to diamond axe
  398. set block at {_loc} to very damaged anvil
  399. set {%{_loc}%.ForgeItemName} to "&b&lDiamond &f&lAxe"
  400. else:
  401. play raw sound "note.bassattack" at player with pitch 1 volume 1
  402. send "&6>> &cYou don't have enough diamonds to craft this"
  403. else:
  404. play raw sound "note.bassattack" at player with pitch 1 volume 1
  405. send "&6>> &cYou have insufficient funds to craft this"
  406. delete {_loc}
  407. else:
  408. cancel event
  409. on drop:
  410. if event-item is iron boots named "&7&lIron &f&lBoots":
  411. cancel event
Advertisement
Add Comment
Please, Sign In to add comment