SaneOffCoffee

One In A Chamber MC Skript

Jul 11th, 2020
50
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. command /joinchamber <text>:
  2. trigger:
  3. if {chambermaps::*} contains arg-1:
  4. if {chambergamerunning} is set:
  5. if {chambergamerunning} contains arg-1:
  6. set {chamberingame::%player%} to true
  7. clear player's inventory
  8. set {chamber.%player%} to true
  9. set {spawn} to a random element out of {chambermapspawns.%arg-1%::*}
  10. teleport player to {spawn}
  11. give player {chamberkit::*}
  12. message "&b&lYour in one in a chamber! Run &6&l/quitchamber&b&l to leave" to player
  13. delete {spawn}
  14. loop all players:
  15. if {chamber.%loop-player%} is true:
  16. message "&a&l%player%&f&l has joined One In A Chamber" to loop-player
  17. else:
  18. message "&c&lA game is already running in the map &6&l%{chambergamerunning}%&c&l!"
  19. else:
  20. set {chambergamerunning} to arg 1
  21. broadcast "One in a chamber game created for map %{chambergamerunning}%!"
  22. set {chamberingame::%player%} to true
  23. clear player's inventory
  24. set {chamber.%player%} to true
  25. set {spawn} to a random element out of {chambermapspawns.%arg-1%::*}
  26. teleport player to {spawn}
  27. give player {chamberkit::*}
  28. message "&b&lYour in one in a chamber! Run &6&l/quitchamber&b&l to leave" to player
  29. delete {spawn}
  30.  
  31. command /chamberlist:
  32. trigger:
  33. message "%{chambermaps::*}%" to player
  34.  
  35. command /quitchamber:
  36. trigger:
  37. delete {chambergamekills::%player%}
  38. set {chamber.%player%} to false
  39. clear player's inventory
  40. set {chamberingame::%player%} to false
  41. teleport player to {chamberlobby}
  42.  
  43. #Above are coms a player would care abt=========================
  44. command /chambermap <text>:
  45. trigger:
  46. if player has permission "stable.chamberadmin":
  47. add arg-1 to {chambermaps::*}
  48.  
  49. command /chamberspawn <text>:
  50. trigger:
  51. if player has permission "stable.chamberadmin":
  52. if {chambermaps::*} contains arg-1:
  53. add location of player to {chambermapspawns.%arg-1%::*}
  54. message "Chamber spawn added to %arg-1%" to player
  55.  
  56. command /deletechamber <text>:
  57. trigger:
  58. if player has permission "stable.chamberadmin":
  59. if {chambermaps::*} contains arg-1:
  60. delete {chambermapspawns.%arg-1%::*}
  61. remove arg-1 from {chambermaps::*}
  62. message "Deleted the map %arg-1%" to player
  63.  
  64. command /chamberkitsave:
  65. trigger:
  66. if player has permission "stable.chamberadmin":
  67. add player's tool to {chamberkit::*}
  68.  
  69. command /chamberbullet:
  70. trigger:
  71. if player has permission "stable.chamberadmin":
  72. add player's tool to {bullet}
  73.  
  74.  
  75. command /chamberkittest:
  76. trigger:
  77. if player has permission "stable.chamberadmin":
  78. give player {chamberkit::*}
  79.  
  80. command /chambersetlobby:
  81. trigger:
  82. if player has permission "stable.chamberadmin":
  83. set {chamberlobby} to player's location
  84. message "Lobby set!" to player
  85.  
  86. command /chamberdelkit:
  87. trigger:
  88. delete {chamberkit::*}
  89.  
  90. command /chamberendgame:
  91. trigger:
  92. if player has permission "stable.chamberadmin":
  93. loop all players:
  94. if {chamberingame::%loop-player%} is true:
  95. delete {chambergamekills::*}
  96. clear player's inventory
  97. clear loop-player's inventory
  98. delete {chambergamerunning}
  99. set {chamber.%loop-players%} to false
  100. set {chamber.%loop-player%} to false
  101. set {chamberingame::%loop-player%} to false
  102. teleport loop-players to {chamberlobby}
  103.  
  104. #Above are coms a admin would care abt================================================
  105.  
  106. on death of a player:
  107. if {chamber.%player%} is true:
  108. if attacker is a player:
  109. clear player's inventory
  110. give attacker 1 ghast tear
  111. give attacker 4 steak
  112. give attacker 1 tripwire hook named "&4Stimpack"
  113. add 1 to {chambergamekills::%attacker%}
  114. if {chambergamekills::%attacker%} is 10:
  115. broadcast "&6&l%attacker% &b&lhas won one in a chamber!"
  116. loop all players:
  117. if {chamberingame::%loop-player%} is true:
  118. delete {chambergamekills::*}
  119. clear player's inventory
  120. clear loop-player's inventory
  121. delete {chambergamerunning}
  122. set {chamberingame::%player%} to false
  123. teleport loop-players to {chamberlobby}
  124. message "&b&lYou now have &4&l%{chambergamekills::%attacker%}%&b&l kill(s)!" to attacker
  125.  
  126. on right click holding tripwire hook:
  127. if name of event-item is "&4Stimpack":
  128. cancel event
  129. apply regeneration 2 to the player for 10 seconds
  130. apply absorption 5 to the player for 2 seconds
  131. apply saturation 2 to the player for 10 seconds
  132. apply speed 1 to the player for 3 seconds
  133. remove 1 of tool from tool
  134.  
  135. #General Game Rules======================
  136.  
  137. on command "spawn":
  138. if {chamber.%player%} is true:
  139. message "&c&lYou need to run &6&l/quitchamber&c&l before running this, this is to avoid issues I apologize."
  140. cancel event
  141.  
  142. on command "duel":
  143. if {chamber.%player%} is true:
  144. message "&c&lYou need to run &6&l/quitchamber&c&l before running this, this is to avoid issues I apologize."
  145. cancel event
  146.  
  147. #Disabling commands above============================
RAW Paste Data