Advertisement
Cool_Colton

Untitled

Jul 22nd, 2020
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.83 KB | None | 0 0
  1. on right click on chest:
  2. cancel event
  3. set {_coords} to event-block's location
  4. set {_coords} to "%{_coords}%"
  5. replace all "x: " with "" in {_coords}
  6. replace all "y: " with "" in {_coords}
  7. replace all "z: " with "" in {_coords}
  8. send "%{chest}%"
  9. send "%{_coords}%"
  10. if {_coords} is the same as {chest}:
  11. create new gui with id "loot" with virtual chest named " >=LOOT CHEST=<"
  12. open gui with id "loot" to player
  13. loop all integers from 1 to 27:
  14. format gui slot loop-integer of player with air
  15. set {_test} to stone sword named "&3Prisoner Sword"
  16. enchant {_test} with sharpness 2
  17. enchant {_test} with unbreaking 1
  18.  
  19. set {_helmet} to leather helmet named "&aPrisoner+ Helmet"
  20. enchant {_helmet} with protection 1
  21. enchant {_helmet} with unbreaking 1
  22. set {_chestplate} to leather chestplate named "&aPrisoner+ Chestplate"
  23. enchant {_chestplate} with protection 1
  24. enchant {_chestplate} with unbreaking 1
  25. set {_legs} to leather leggings named "&aPrisoner+ Leggings"
  26. enchant {_legs} with protection 1
  27. enchant {_legs} with unbreaking 1
  28. set {_boots} to leather boots named "&aPrisoner+ Boots"
  29. enchant {_boots} with protection 1
  30. enchant {_boots} with unbreaking 1
  31.  
  32. set {_number} to a random integer between 1 and 5
  33. format gui slot {_number} of player with {_test}
  34. set {_number2} to a random integer between 6 and 19
  35. format gui slot {_number2} of player with {_chestplate}
  36. set {_number3} to {_number2} + 2
  37. format gui slot {_number3} of player with {_boots}
  38. set {_number4} to {_number3} + 3
  39. format gui slot {_number4} of player with {_legs}
  40. set {_number5} to a random integer between -2 and 3
  41. if {_number5} is 0:
  42. set {_number5} to -1
  43. set {_number6} to {_number4} + {_number5}
  44. format gui slot {_number6} of player with {_helmet}
  45. set {_number7} to random integer between 1 and 27
  46. wait 1 tick
  47. if {_number7} is not {_number}:
  48. if {_number7} is not {_number2}:
  49. if {_number7} is not {_number3}:
  50. if {_number7} is not {_number4}:
  51. if {_number7} is not {_number6}:
  52. format gui slot {_number7} of player with 5 sunflower named "&6&lCoin"
  53. else:
  54. add 1 to {_number7}
  55. format gui slot {_number7} of player with 5 sunflower named "&6&lCoin"
  56. else:
  57. add 1 to {_number7}
  58. if {_number7} is not {_number6}:
  59. format gui slot {_number7} of player with 5 sunflower named "&6&lCoin"
  60. else:
  61. add 1 to {_number6}
  62. format gui slot {_number7} of player with 5 sunflower named "&6&lCoin"
  63. else:
  64. add 1 to {_number7}
  65. format gui slot {_number7} of player with 5 sunflower named "&6&lCoin"
  66. else:
  67. add 1 to {_number7}
  68. format gui slot {_number7} of player with 5 sunflower named "&6&lCoin"
  69. else:
  70. add 1 to {_number7}
  71. format gui slot {_number7} of player with 5 sunflower named "&6&lCoin"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement