akon1248

Untitled

Dec 15th, 2018
298
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.49 KB | None | 0 0
  1. on damage:
  2. attacker is a player
  3. damage was caused by attack
  4. {nosweepcooltime::%UUID of victim%} is not set
  5. if distance between attacker and victim > 4.6:
  6. cancel event
  7. stop
  8. if tag "HurtTime" of nbt of victim >= 1:
  9. cancel event
  10. stop
  11. else if tag "HurtTime" of nbt of victim is 0:
  12. cancel event
  13. set {nosweepcooltime::%UUID of victim%} to 2
  14. wait 1 tick
  15. make attacker damage victim by damage*2
  16. if attacker's gamemode is survival or adventure:
  17. if attacker's tool is enchanted with Unbreaking:
  18. set {_damagechance} to level of Unbreaking of the attacker's tool
  19. if {_damagechance} >= 1:
  20. set {_damagechance} to {_damagechance}+1
  21. set {_damagechance} to 100/{_damagechance}
  22. chance of {_damagechance}%:
  23. damage attacker's tool by 1
  24. else:
  25. damage attacker's tool by 1
  26. if tag "FallDistance" of nbt of attacker >= 0.01:
  27. execute console command "execute %UUID of victim% ~ ~ ~ particle crit ~ ~1 ~ 0.3 0.4 0.3 0.3 50"
  28. if attacker's tool is enchanted with Sharpness:
  29. execute console command "execute %UUID of victim% ~ ~ ~ particle magicCrit ~ ~1 ~ 0.3 0.4 0.3 0.3 50"
  30. every tick:
  31. loop {nosweepcooltime::*}:
  32. if {nosweepcooltime::%loop-index%} >= 1:
  33. remove 1 from {nosweepcooltime::%loop-index%}
  34. if {nosweepcooltime::%loop-index%} is 0:
  35. delete {nosweepcooltime::%loop-index%}
  36. on packet recieve:
  37. if event-string is "PacketPlayOutNamedSoundEffect":
  38. set {_fielda} to "%packet field ""a""%"
  39. send "%{_fielda}%" to event-player
Advertisement
Add Comment
Please, Sign In to add comment