Advertisement
Phe0X

Fly

Dec 1st, 2018
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.32 KB | None | 0 0
  1. function Detect(p: player, r: text):
  2. add 1 to {alertl::%{_p}%}
  3. loop-player all players:
  4. loop-player has permission "essentials.fly":
  5. send "&8[&6&l!&8] &bAntiCheat &8» &6%{_p}% &7a été détecté pour: &c%{_r}% &6(%{alertl::%{_p}%}%)'" to loop-player
  6. play sound "LEVEL_UP" to loop-player with volume 1 and pitch 2
  7. on damage:
  8. set {cooldown.%victim%} to now
  9.  
  10.  
  11. on any move:
  12. player is not riding
  13. set {_diffy} to difference between y location of player and {yloc.%player%}
  14. set {yloc.%player%} to y location of player
  15. if {_diffy} != 0:
  16. if "%{_diffy}%" = "%{lasposy.%player%}%":
  17. if "%{_diffy}%" != "0.08":
  18. {vl08.%player%} is set
  19. clear {vl08.%player%}
  20. if "%{_diffy}%" != "0.16":
  21. {vl16.%player%} is set
  22. clear {vl16.%player%}
  23. if "%{_diffy}%" != "0.42":
  24. {vl42.%player%} is set
  25. clear {vl42.%player%}
  26.  
  27. if "%{_diffy}%" != "0.23":
  28. {vl23.%player%} is set
  29. clear {vl23.%player%}
  30. if "%{_diffy}%" != "0.65":
  31. {vl65.%player%} is set
  32. clear {vl65.%player%}
  33. if "%{_diffy}%" != "0.12":
  34. {vl12.%player%} is set
  35. clear {vl12.%player%}
  36. if "%{_diffy}%" != "0.4":
  37. {vl04.%player%} is set
  38. clear {vl04.%player%}
  39. player's gamemode is not creative
  40. if block at player is ladder or vines:
  41. stop
  42. loop blocks in radius 3 around player:
  43. loop-block is snow layer or carpet or water or lava or cobweb or anvil or vines or ladder or stairs or slab or 165
  44. clear {vlsame.%player%}
  45. stop
  46. wait 3 ticks
  47. if {cooldown.%player%} is set:
  48. difference between {cooldown.%player%} and now < 0.3 seconds
  49. clear {vlsame.%player%}
  50. stop
  51. if "%{_diffy}%" = "0.08":
  52.  
  53. add 1 to {vl08.%player%}
  54. {vl08.%player%} > 12
  55. Detect(player, "Fly V1 &e%{_diffy}%")
  56. if "%{_diffy}%" = "0.16":
  57.  
  58. add 1 to {vl16.%player%}
  59. {vl16.%player%} > 2
  60. Detect(player, "Fly V1 &e%{_diffy}%")
  61. if "%{_diffy}%" = "0.42":
  62.  
  63. add 1 to {vl42.%player%}
  64. {vl42.%player%} > 2
  65. Detect(player, "Fly V1 &e%{_diffy}%")
  66. if "%{_diffy}%" = "0.23":
  67.  
  68. add 1 to {vl23.%player%}
  69. {vl23.%player%} > 2
  70. Detect(player, "Fly V1 &a %{_diffy}%")
  71. if "%{_diffy}%" = "0.12":
  72. set {_pos} to block 1 north 1 west of block 2 above player
  73. set {_pos2} to block 1 south 1 east of block above player
  74. loop blocks within {_pos} to {_pos2}:
  75. loop-block is not air
  76. set {lasypos.%player%} to {_diffy}
  77. stop
  78. add 1 to {vl12.%player%}
  79. {vl12.%player%} > 2
  80. Detect(player, "Fly v1 &d 0.12")
  81. if "%{_diffy}%" = "0.4":
  82. set {_pos} to block 1 north 1 west of block 2 above player
  83. set {_pos2} to block 1 south 1 east of block above player
  84. loop blocks within {_pos} to {_pos2}:
  85. loop-block is not air
  86. stop
  87. add 1 to {vl04.%player%}
  88. {vl04.%player%} > 2
  89. Detect(player, "Fly v1 &d 0.4")
  90. if "%{_diffy}%" = "0.65":
  91.  
  92. add 1 to {vl65.%player%}
  93. {vl65.%player%} > 2
  94. Detect(player, "Fly V1 &1 %{_diffy}%")
  95. if "%{_diffy}%" = "0.42" or "0.23" or "0.12" or "0.65" or "0.08" or "0.16" or "0.4":
  96. stop
  97. add 1 to {vlsame.%player%}
  98. if {_diffy} >= 0.8:
  99. set {_maxvl} to 1
  100. else:
  101. set {_maxvl} to 3
  102. {vlsame.%player%} > {_maxvl}
  103. Detect(player, "Fly v1 &a%{_diffy}%")
  104. else:
  105. set {lasposy.%player%} to {_diffy}
  106. clear {vlsame.%player%}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement