Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on load:
- delete {NoClean::*}
- on quit:
- if {NoClean::%player%} is set:
- delete {NoClean::%player%}
- command /noclean [<text>]:
- permission: skript.host
- trigger:
- if arg-1 is set:
- if arg-1 is "toggle" or "t":
- if {scenario::NoClean} is set:
- delete {scenario::NoClean}
- delete {NoClean::*}
- send "&7NoClean has been &cDisabled"
- else:
- set {scenario::NoClean} to true
- send "&7NoClean has been &aEnabled"
- else if arg-1 is "on" or "enabled":
- if {scenario::NoClean} is set:
- send "&7NoClean is already &aEnabled"
- else:
- set {scenario::NoClean} to true
- send "&7NoClean has been &aEnabled"
- else if arg-1 is "off" or "disable":
- if {scenario::NoClean} is not set:
- send "&7NoClean is already &cDisabled"
- else:
- delete {scenario::NoClean}
- delete {NoClean::*}
- send "&7NoClean has been &cDisabled"
- else if arg-1 is "help" or "h":
- send "&7/noclean &aon&7/&coff&7/&etoggle"
- else:
- make command sender execute command "/noclean help"
- on death:
- {scenario::NoClean} is set
- victim is a player
- attacker is a player
- victim is not attacker
- set {_p} to attacker
- delete {NoClean::%victim%}
- delete {NoClean::%{_p}%}
- wait 15 ticks
- set {NoClean::%{_p}%} to 15
- loop 15 times:
- if {NoClean::%{_p}%} is not set:
- stop
- if {NoClean::%{_p}%} <= 0:
- delete {NoClean::%{_p}%}
- send "&7You are no longer protected by &cNoClean&7!" to {_p}
- stop
- remove 1 from {NoClean::%{_p}%}
- {NoClean::%{_p}%} is set
- wait 20 ticks
- delete {NoClean::%{_p}%}
- send "&7You are no longer protected by &cNoClean&7!" to {_p}
- on damage:
- {scenario::NoClean} is set
- attacker is player
- victim is player
- attacker is not victim
- if {NoClean::%attacker%} is set:
- delete {NoClean::%attacker%}
- send "&7You are no longer protected by &cNoClean&7!" to attacker
- stop
- else if {NoClean::%victim%} is set:
- cancel event
- send "&c%victim% &7is protected by &cNoClean&7!" to attacker
- send "&cSomeone &7tried to attack you. You have %{NoClean::%victim%}% seconds left" to victim
Advertisement
Add Comment
Please, Sign In to add comment