Advertisement
Guest User

Hydra AntiCheat Code

a guest
Aug 5th, 2020
749
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.20 KB | None | 0 0
  1. # Hydra AntiCheat from the developers of WASP AntiCheat know as xXPureLifeXx#4033, _LkZ#9628
  2. # Detections: Killaura, Fly, Speed, Reach, Self Hurt (More Coming Soon)
  3. # Main Developer: _LkZ
  4. # Developer: xXPureLifeXx
  5.  
  6. options: # DO NOT CHANGE (COULD HURT ANTICHEAT)
  7. version: 1.0
  8. noPermission: &c&lHydra &8>> &4No Permissions
  9.  
  10. command /hydra [<text>] [<offline player>]:
  11. permission: hydra.command.command
  12. permission message: {@noPermission}
  13. trigger:
  14. if arg 1 is not set:
  15. send "&c&lHydra &8>> &c/hydra help"
  16. if arg 1 is "help":
  17. send "&c&lHydra AntiCheat. &fMade by _LkZ, and xXPureLifeXx"
  18. send "&c/hydra help"
  19. send "&c/hydra freeze <player>"
  20. send "&c/hydra alerts <player>"
  21. if arg 1 is "freeze":
  22. if arg 2 is set:
  23. if arg 2 is a player:
  24. if player has permission "hydra.command.freeze":
  25. if {freezed.%arg 1%} is false:
  26. set {freezed.%arg 1%} to true
  27. send "&c&lHydra &8>> &c%arg 1%&f is now frozen!"
  28. else:
  29. set {freezed.%arg 1%} to false
  30. send "&c&lHydra &8>> &c%arg 2% is no longer frozen!"
  31. else:
  32. send "{@noPermission}"
  33. else:
  34. send "&c&lHydra &8>> &cThat player does not exist!"
  35. if arg 1 is "alerts":
  36. if arg 2 is set:
  37. if arg 2 is a player:
  38. if player has permission "hydra.command.logs":
  39. send "&cAuto Clicker Logs: %{autoclickerlogs.%arg 2%}%"
  40. send "&cKillaura logs: %{killauralogs.%arg 2%}%"
  41. send "&cSpeed / Flight Logs: %{speedalerts.%arg 2%}%"
  42. send "&cReach Logs: %{reachalerts.%arg 2%}%"
  43. else:
  44. send "{@noPermission}"
  45. else:
  46. send "&c&lHydra &8>> &cThat person does not exist!"
  47. else:
  48. send "&c&lHydra &8>> &cPlease specify a player!"
  49.  
  50.  
  51. every 30 seconds:
  52. loop all players:
  53. clear {alerts.%loop-player%}
  54.  
  55.  
  56. on left click:
  57. add 1 to {killaura.%player%}
  58. if {killaura.%player%} >= 20:
  59. set {_ping} to player's ping
  60. loop all players:
  61. loop-player has permission "hydra.logs":
  62. send "&c&lHydra &8>> &c%player%&f has failed Auto Clicking (&c%{_ping}%&c MS&f) (%{killaura.%player%}%&c&l CPS" to loop-player
  63. add 1 to {autoclickerlogs.%player%}
  64. execute console command "auratest %player%"
  65. add 1 to {alerts.%player%}
  66. if {alerts.%player%} >= 10:
  67. execute console command "kick %player% &c&lHydra &8>> &cCheating"
  68.  
  69. on left click:
  70. add 1 to {clickauratest.%player%}
  71. if {clickauratest.%player%} >= 13:
  72. execute console command "auratest %player%"
  73.  
  74. every 1 second:
  75. loop all players:
  76. clear {clickauratest.%loop-player%}
  77.  
  78.  
  79. every 1 second:
  80. loop all players:
  81. clear {killaura.%loop-player%}
  82.  
  83.  
  84. command /ka [<player>]:
  85. trigger:
  86. if {invtget.%player%} is true:
  87. if arg 1 is "<none>":
  88. set {_ping} to player's ping
  89. loop all players:
  90. loop-player has permission "hydra.logs":
  91. send "&c&lHydra &8>> &c%player% has failed &cInvalid Target&f. (&c%{_ping}%&f)"
  92. add 1 to {killauralogs.%player%}
  93. add 1 to {alerts.%player%}
  94. if {alerts.%player%} >= 10:
  95. execute console command "kick %player% &c&lHydra &8>> &cCheating"
  96. execute console command "auratest %player%"
  97. else:
  98. stop
  99.  
  100. on damage:
  101. set {invtget.%attacker%} to true
  102. wait 2 ticks
  103. set {invtget.%attacker%} to false
  104.  
  105. on left click:
  106. if {invtget.%player%} is true:
  107. make player execute command "ka %targeted entity%"
  108.  
  109.  
  110. on damage:
  111. add 1 to {hits.%attacker%}
  112.  
  113. on left click:
  114. add 1 to {leftclicks.%player%}
  115.  
  116. on death:
  117. if {hits.%attacker%} = {leftclicks.%attacker%}:
  118. execute console command "auratest %attacker%"
  119.  
  120. command /auratest [<player>]:
  121. permission: hydra.command.auratest
  122. permission message: &c&lHydra >> No Permissions
  123. trigger:
  124. set {loc} to location behind arg 1
  125. set {attacker} to arg 1
  126. spawn a zombie at {loc}
  127. set {bot} to last spawned entity
  128. wait 5 ticks
  129. delete last spawned entity
  130.  
  131. on damage:
  132. if attacker is {attacker}:
  133. if victim is {bot}:
  134. delete {bot}
  135. loop all players:
  136. loop-player has permission "hydra.logs":
  137. set {_ping} to attacker's ping
  138. send "&c&lHydra &r&8>> &c%attacker%&f has failed KillAura. (&c%{_ping}%&c MS&f)" to loop-player
  139. add 1 to {killauralogs.%attacker%}
  140. add 1 to {alerts.%attacker%}
  141. if {alerts.%attacker%} >= 10:
  142. execute console command "kick %attacker% &c&lHydra &8>> &cCheating"
  143. else:
  144. if victim is {bot}:
  145. cancel event
  146.  
  147.  
  148. on any move:
  149. player is not flying
  150. player's gamemode is not creative
  151. block below player is not air:
  152. set {fly.%player%} to 0
  153. stop
  154. else:
  155. block north below player is air
  156. block south below player is air
  157. block west below player is air
  158. block east below player is air
  159. block north east below player is air
  160. block south east below player is air
  161. block north west below player is air
  162. block south west below player is air
  163. the gliding state of player is true:
  164. player's chestplate is elytra:
  165. stop
  166. set {fly.%player%} to 0
  167. else:
  168. set {ylocation.%player%} to the y location of player
  169. wait 2 seconds
  170. set {ylocation2.%player%} to the y location of player
  171. wait 1 tick
  172. if difference between {ylocation.%player%} and {ylocation2.%player%} = 0:
  173. teleport player to {ylocation.%player%}
  174. set {_ping} to player's ping
  175. loop all players:
  176. loop-player has permission "hydra.logs":
  177. send "&c&lHydra &8>> &c%player%&f has failed Flight. (&c%{_ping}%&c MS&f)"
  178. add 1 to {speedalerts.%player%}
  179. add 1 to {alerts.%player%}
  180. if {alerts.%player%} >= 10:
  181. execute console command "kick %player% &c&lHydra &8>> &cCheating"
  182.  
  183. on any move:
  184. set {_loc.%player%} to the x location of player
  185. set {speedsetback.%player%} to location of the player
  186. wait 5 ticks
  187. set {_loc1.%player%} to the x location of player
  188. wait 1 tick
  189. if difference between {_loc.%player%} and {_loc1.%player%} >= 3.5:
  190. player's gamemode is not creative
  191. player is not flying
  192. add 1 to {speed.%player%}
  193. if {speed.%player%} >= 3:
  194. teleport player to {speedsetback.%player%}
  195. set {_ping} to player's ping
  196. send "&c&lHydra &8>> &c%player% &fhas failed Speed Hacks. (&c%{_ping}%&c MS&f)"
  197. add 1 to {speedalerts.%player%}
  198. add 1 to {alerts.%player%}
  199. if {alerts.%player%} >= 10:
  200. execute console command "kick %player% &c&lHydra &8>> &cCheating"
  201.  
  202. on any move:
  203. set {_locz.%player%} to the z location of player
  204. set {speedsetback.%player%} to location of the player
  205. wait 5 ticks
  206. set {_loc1z.%player%} to the z location of player
  207. wait 1 tick
  208. if difference between {_locz.%player%} and {_loc1z.%player%} >= 3.5:
  209. player's gamemode is not creative
  210. player is not flying
  211. add 1 to {speed.%player%}
  212. if {speed.%player%} >= 3:
  213. teleport player to {speedsetback.%player%}
  214. set {_ping} to player's ping
  215. send "&c&lHydra &8>> &c%player% &fhas failed Speed Hacks. (&c%{_ping}%&c MS&f)"
  216. add 1 to {speedalerts.%player%}
  217. add 1 to {alerts.%player%}
  218. if {alerts.%player%} >= 10:
  219. execute console command "kick %player% &c&lHydra &8>> &cCheating"
  220.  
  221. on damage:
  222. set {_reach} to distance between attacker and victim
  223. if {_reach} > 4:
  224. if damage cause is not a projectile:
  225. attacker's gamemode is not creative:
  226. cancel event
  227. set {_ping} to attacker's ping
  228. loop all players:
  229. loop-player has permission "hydra.logs":
  230. send "&c&lHydra &8>> &c%attacker% &fhas failed Reach. (&c%{_ping}%&c MS&f)"
  231. add 1 to {reachalerts.%attacker%}
  232.  
  233.  
  234. on damage:
  235. if attacker is victim:
  236. damage cause was not a projectile:
  237. cancel event
  238. set {_ping} to attacker's ping
  239. loop all players:
  240. loop-player has permission "hydra.logs":
  241. send "&c&lHydra &8>> &c%player% &fhas failed Self Hurt. (&c%{_ping}%&c MS)"
  242.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement