Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on damage:
- attacker is a player
- damage was caused by attack
- {nosweepcooltime::%UUID of victim%} is not set
- if distance between attacker and victim > 4.6:
- cancel event
- stop
- if tag "HurtTime" of nbt of victim >= 1:
- cancel event
- stop
- else if tag "HurtTime" of nbt of victim is 0:
- cancel event
- set {nosweepcooltime::%UUID of victim%} to 2
- wait 1 tick
- make attacker damage victim by damage*2
- if attacker's gamemode is survival or adventure:
- if attacker's tool is enchanted with Unbreaking:
- set {_damagechance} to level of Unbreaking of the attacker's tool
- if {_damagechance} >= 1:
- set {_damagechance} to {_damagechance}+1
- set {_damagechance} to 100/{_damagechance}
- chance of {_damagechance}%:
- damage attacker's tool by 1
- else:
- damage attacker's tool by 1
- if tag "FallDistance" of nbt of attacker >= 0.01:
- execute console command "execute %UUID of victim% ~ ~ ~ particle crit ~ ~1 ~ 0.3 0.4 0.3 0.3 50"
- if attacker's tool is enchanted with Sharpness:
- execute console command "execute %UUID of victim% ~ ~ ~ particle magicCrit ~ ~1 ~ 0.3 0.4 0.3 0.3 50"
- every tick:
- loop {nosweepcooltime::*}:
- if {nosweepcooltime::%loop-index%} >= 1:
- remove 1 from {nosweepcooltime::%loop-index%}
- if {nosweepcooltime::%loop-index%} is 0:
- delete {nosweepcooltime::%loop-index%}
- on packet recieve:
- if event-string is "PacketPlayOutNamedSoundEffect":
- set {_fielda} to "%packet field ""a""%"
- send "%{_fielda}%" to event-player
Advertisement
Add Comment
Please, Sign In to add comment