Advertisement
Guest User

Hydra Anticheat version 1.1

a guest
Oct 23rd, 2020
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.69 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 player has permission "hydra.command.freeze":
  24. if {freezed.%arg 2%} is false:
  25. set {freezed.%arg 2%} to true
  26. send "&c&lHydra &8>> &c%arg 2%&f is now frozen!"
  27. else:
  28. set {freezed.%arg 2%} to false
  29. send "&c&lHydra &8>> &c%arg 2% is no longer frozen!"
  30. else:
  31. send "{@noPermission}"
  32. if arg 1 is "alerts":
  33. if arg 2 is set:
  34. if player has permission "hydra.command.logs":
  35. send "&cAuto Clicker Logs: %{autoclickerlogs.%arg 2%}%"
  36. send "&cKillaura logs: %{killauralogs.%arg 2%}%"
  37. send "&cSpeed / Flight Logs: %{speedalerts.%arg 2%}%"
  38. send "&cReach Logs: %{reachalerts.%arg 2%}%"
  39. send "&cAnti Knockback Logs: %{antikbalerts.%arg 2%}%"
  40. else:
  41. send "{@noPermission}"
  42. else:
  43. send "&c&lHydra &8>> &cPlease specify a player!"
  44.  
  45. on load:
  46. if {chatcooldown} is not set:
  47. set {chatcooldown} to 3
  48.  
  49. every 30 seconds:
  50. loop all players:
  51. delete {alerts.%loop-player%}
  52.  
  53.  
  54. on left click:
  55. add 1 to {killaura.%player%}
  56. if {killaura.%player%} >= 20:
  57. set {_ping} to player's ping
  58. loop all players:
  59. loop-player has permission "hydra.logs":
  60. send "&c&lHydra &8>> &c%player%&f has failed Auto Clicking (&c%{_ping}%&c MS&f) (%{killaura.%player%}%&c&l CPS" to loop-player
  61. add 1 to {autoclickerlogs.%player%}
  62. execute console command "auratest %player%"
  63. add 1 to {alerts.%player%}
  64. if {alerts.%player%} >= 10:
  65. execute console command "kick %player% &c&lHydra &8>> &cCheating"
  66.  
  67. on left click:
  68. add 1 to {clickauratest.%player%}
  69. if {clickauratest.%player%} >= 13:
  70. execute console command "auratest %player%"
  71.  
  72. every 1 second:
  73. loop all players:
  74. clear {clickauratest.%loop-player%}
  75.  
  76.  
  77. every 1 second:
  78. loop all players:
  79. clear {killaura.%loop-player%}
  80.  
  81.  
  82. command /ka [<text>]:
  83. trigger:
  84. if {invtget.%player%} is true:
  85. if arg 1 is "<none>":
  86. add 1 to {invt.%player%}
  87. if {invt.%player%} > 3:
  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. if {auratest.%arg 1%} is false:
  125. set {loc} to location behind arg 1
  126. set {attacker} to arg 1
  127. set {auratest.%arg 1%} to true
  128. spawn a zombie at {loc}
  129. set {bot} to last spawned entity
  130. wait 5 ticks
  131. set {auratest.%arg 1%} to false
  132. delete last spawned entity
  133.  
  134. on damage:
  135. if attacker is {attacker}:
  136. if victim is {bot}:
  137. delete {bot}
  138. loop all players:
  139. loop-player has permission "hydra.logs":
  140. set {_ping} to attacker's ping
  141. send "&c&lHydra &r&8>> &c%attacker%&f has failed KillAura. (&c%{_ping}%&c MS&f)" to loop-player
  142. add 1 to {killauralogs.%attacker%}
  143. add 1 to {alerts.%attacker%}
  144. if {alerts.%attacker%} >= 10:
  145. execute console command "kick %attacker% &c&lHydra &8>> &cCheating"
  146. else:
  147. if victim is {bot}:
  148. cancel event
  149.  
  150.  
  151. on any move:
  152. player is not flying
  153. player's gamemode is not creative
  154. block below player is air
  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. set {flysetback.%player%} to location of the player
  170. wait 10 ticks seconds
  171. set {ylocation2.%player%} to the y location of player
  172. wait 1 tick
  173. if difference between {ylocation.%player%} and {ylocation2.%player%} = 0:
  174. add 1 to {fly.%player%}
  175. if {fly.%player%} > 4:
  176. teleport player to {flysetback.%player%}
  177. set {_ping} to player's ping
  178. loop all players:
  179. loop-player has permission "hydra.logs":
  180. send "&c&lHydra &8>> &c%player%&f has failed Flight. (&c%{_ping}%&c MS&f)" to loop-player
  181. add 1 to {speedalerts.%player%}
  182. add 1 to {alerts.%player%}
  183. if {alerts.%player%} >= 10:
  184. execute console command "kick %player% &c&lHydra &8>> &cCheating"
  185.  
  186. every 2 seconds:
  187. loop all players:
  188. delete {fly.%loop-player%}
  189.  
  190. on flight toggle:
  191. if {speedcheck.%player%} is true:
  192. set {speedcheck.%player%} to false
  193. else:
  194. wait 15 seconds
  195. set {speedcheck.%player%} to true
  196.  
  197. on any move:
  198. player's gamemode is not creative
  199. player is not flying
  200. set {y.%player%} to the y location of player
  201. set {ysetback.%player%} to location of the player
  202. wait 5 ticks
  203. set {y1.%player%} to the y location of player
  204. wait 1 tick
  205. set {_diffyy.%player%} to difference between {y.%player%} and {y1.%player%}
  206. wait 1 tick
  207. if {_diffyy.%player%} >= 2:
  208. set {_ping} to player's ping
  209. teleport player to {ysetback.%player%}
  210. loop all players:
  211. loop-player has permission "hydra.logs":
  212. send "&c&lHydra &8>> &c%player% has failed Y-Fly. (&c%{_ping}%&c MS&f)." to loop-player
  213.  
  214. on any move:
  215. player doesn't have speed
  216. if {speedcheck.%player%} is true:
  217. set {_loc.%player%} to the x location of player
  218. set {speedsetback.%player%} to location of the player
  219. wait 5 ticks
  220. set {_loc1.%player%} to the x location of player
  221. wait 1 tick
  222. set {_diffyx.%player%} to difference between {_loc.%player%} and {_loc1.%player%}
  223. if difference between {_loc.%player%} and {_loc1.%player%} >= 3.85:
  224. player's gamemode is not creative
  225. player is not flying
  226. add 1 to {speed.%player%}
  227. if {speed.%player%} >= 3:
  228. teleport player to {speedsetback.%player%}
  229. set {_ping} to player's ping
  230. loop all players:
  231. loop-player has permission "hydra.logs":
  232. send "&c&lHydra &8>> &c%player% &fhas failed Speed Hacks. (&c%{_ping}%&c MS&f) (&c%{_diffyx.%player%}% Blocks Per Second)." to loop-player
  233. add 1 to {speedalerts.%player%}
  234. add 1 to {alerts.%player%}
  235. if {alerts.%player%} >= 10:
  236. execute console command "kick %player% &c&lHydra &8>> &cCheating"
  237.  
  238. on any move:
  239. player doesn't have speed
  240. if {speedcheck.%player%} is true:
  241. set {_locz.%player%} to the z location of player
  242. set {speedsetback.%player%} to location of the player
  243. wait 5 ticks
  244. set {_loc1z.%player%} to the z location of player
  245. wait 1 tick
  246. set {_diffy.%player%} to difference between {_locz.%player%} and {_loc1z.%player%}
  247. if difference between {_locz.%player%} and {_loc1z.%player%} >= 3.85:
  248. player's gamemode is not creative
  249. player is not flying
  250. add 1 to {speed.%player%}
  251. if {speed.%player%} >= 3:
  252. teleport player to {speedsetback.%player%}
  253. set {_ping} to player's ping
  254. loop all players:
  255. loop-player has permission "hydra.logs":
  256. send "&c&lHydra &8>> &c%player% &fhas failed Speed Hacks. (&c%{_ping}%&c MS&f) (&c%{_diffy.%player%}%&c Blocks Per Second&f)." to loop-player
  257. add 1 to {speedalerts.%player%}
  258. add 1 to {alerts.%player%}
  259. if {alerts.%player%} >= 10:
  260. execute console command "kick %player% &c&lHydra &8>> &cCheating"
  261.  
  262. on damage:
  263. set {_reach} to distance between attacker and victim
  264. if {_reach} > 4:
  265. if damage cause is not a projectile:
  266. attacker's gamemode is not creative:
  267. cancel event
  268. set {_ping} to attacker's ping
  269. loop all players:
  270. loop-player has permission "hydra.logs":
  271. send "&c&lHydra &8>> &c%attacker% &fhas failed &cReach&f. (&c%{_ping}%&c MS&f)." to loop-player
  272. add 1 to {reachalerts.%attacker%}
  273.  
  274.  
  275. on damage:
  276. if attacker is victim:
  277. if damage cause is not a projectile:
  278. cancel event
  279. set {_ping} to attacker's ping
  280. loop all players:
  281. loop-player has permission "hydra.logs":
  282. send "&c&lHydra &8>> &c%attacker% &fhas failed Self Hurt. (&c%{_ping}%&c MS)" to loop-player
  283.  
  284.  
  285. on damage of a player:
  286. victim is not flying
  287. damage wasn't caused by fall, potion, lava, burning, fire, poison or wither
  288. victim is not burning
  289. victim doesn't have poison
  290. victim doesn't have wither:
  291. set {antikb.%victim%} to location of victim
  292. wait 10 ticks
  293. set {antikb2.%victim%} to location of victim
  294. block at victim is not cobweb:
  295. block at victim is not water:
  296. victim is not riding:
  297. if {antikb.%victim%} = {antikb2.%victim%}:
  298. set {_ping} to victim's ping
  299. loop all players:
  300. loop-player has permission "hydra.logs":
  301. send "&c&lHydra &8>> &c%victim% has been detected using &cAnti Knockback&f. (&c%{_ping}%&c MS&f)." to loop-player
  302. add 1 to {alerts.%victim%}
  303. add 1 to {antikbalerts.%victim%}
  304. if {alerts.%victim%} >= 10:
  305. execute console command "kick %victim% &c&lHydra &8>> &cCheating"
  306.  
  307. on chat:
  308. wait 1 tick
  309. set {chatcooldown.%player%} to true
  310. wait 3 seconds
  311. set {chatcooldown.%player%} to false
  312.  
  313. on chat:
  314. if {chatcooldown.%player%} is true:
  315. if player does not have permission "hydra.chat.cooldown.bypass":
  316. cancel event
  317. send "&cThere is a 3 second delay between chatting!"
  318.  
  319. on shoot:
  320. if projectile is an arrow:
  321. if difference between {bow.%shooter%} and now is less than 2 ticks:
  322. cancel event
  323. set {_ping} to shooters ping
  324. loop all players:
  325. loop-player has permission "hydra.logs":
  326. send "&c&lHydra &8>> &c%shooter% has been detected using &cFast Bow&f. (&c%{_ping%}% &cMS&f)." to loop-player
  327. add 1 to {alerts.%shooter%}
  328. add 1 to {fastbowalerts.%shooter%}
  329. if {alerts.%victim%} >= 10:
  330. execute console command "kick %shooter% &c&lHydra &8>> &cCheating"
  331.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement