Advertisement
Zeldaboy111

Stands ]|[ Skript #330

Jul 20th, 2020
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.48 KB | None | 0 0
  1. #multiblock structure
  2. #rename function
  3.  
  4. options:
  5. logo: &6&lBS&8:&7
  6.  
  7. function gui(p: Player):
  8. open chest with 6 rows named "&8Anvil" to {_p}
  9. wait 2 ticks
  10. loop 9 times:
  11. set slot loop-value - 1 of {_p}'s current inventory to gray stained glass pane named "&8"
  12. set slot 54-loop-value of {_p}'s current inventory to gray stained glass pane named "&8"
  13.  
  14. loop 5 times:
  15. set slot loop-value * 9 of {_p}'s current inventory to gray stained glass pane named "&8"
  16. set slot loop-value * 9-1 of {_p}'s current inventory to gray stained glass pane named "&8"
  17.  
  18. on rightclick on smooth stone:
  19. if player is not sneaking:
  20. if {anvil.%location of clicked block%} is true:
  21. gui(player)
  22. cancel event
  23.  
  24. on rightclick holding stone axe:
  25. if clicked block is smooth stone or iron block or diamond block:
  26. if {anvil.%location of event-block%} is not true:
  27. set {anvil.%location of event-block%} to true
  28. set {_tier} to "Tier I"
  29. if clicked block is smooth stone:
  30. set {anvil.%location of event-block%.tier} to 1
  31. else if clicked block is iron block:
  32. set {anvil.%location of event-block%.tier} to 2
  33. set {_tier} to "Tier II"
  34. else:
  35. set {anvil.%location of event-block%.tier} to 3
  36. set {_tier} to "Tier III"
  37.  
  38. set {_s} to 6
  39. loop all players in radius 6 around event-block:
  40. set {_v} to ({_s} - distance between loop-player and event-block)
  41. play sound "block.anvil.place" with volume {_v} and pitch 0 to loop-player
  42.  
  43. send "{@logo} Successfully created an anvil of %{_tier}%."
  44. summon armor stand at location 0.7 meters below event-block
  45. set name of last spawned armor stand to "&7%{_tier}%"
  46. add "{Invisible:1b,NoGravity:1b,NoAI:1b,CustomNameVisible:1}" to NBT of last spawned armor stand
  47.  
  48. on break of smooth stone or iron block or diamond block:
  49. if {anvil.%location of event-block%} is true:
  50. set {_s} to 6
  51. loop all players in radius 6 around event-block:
  52. set {_v} to ({_s} - distance between loop-player and event-block)
  53. play sound "block.anvil.place" with volume {_v} and pitch 0 to loop-player
  54. delete {anvil.%location of event-block%}
  55. delete {anvil.%location of event-block%.tier}
  56. loop entities in radius 1 around event-block:
  57. if type of loop-entity is armor stand:
  58. kill loop-entity
  59.  
  60.  
  61. on inventory click:
  62. if type of clicked inventory is chest inventory:
  63. if inventory name of player's current inventory is "&8Anvil":
  64. cancel event
  65.  
  66. command /stair:
  67. trigger:
  68. send "%block 1 meters below player%"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement