Guest User

Hydra Anticheat Version 1.3

a guest
Nov 5th, 2020
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.37 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, SelfHurt, NoFall and AirWalk (More Coming Soon)
  3. # Main Developer: _LkZ
  4. # Developer: xXPureLifeXx
  5. # find our terms of use and more updates at: https://hydra-anticheat.carrd.co
  6. # the guy who like fixed all the lag and added 3 new epic detections: dnadany (https://discord.gg/6RFZYxt)
  7.  
  8. options:
  9. version: 1.3
  10. NoPermission: &c&lHydra &8>> &4Invalid Permission!
  11. chat_cooldown_seconds: 3
  12. eula: false
  13. kick_10_alerts: true
  14.  
  15.  
  16. command /hydra [<text>] [<offline player>]:
  17. permission: hydra.command.command
  18. permission message: {@NoPermission}
  19. trigger:
  20. if arg 1 is not set:
  21. send "&c&lHydra &8>> &c/hydra help"
  22. if arg 1 is "help":
  23. send "&c&lHydra AntiCheat. &fMade by _LkZ, and xXPureLifeXx"
  24. send "&c/hydra help"
  25. send "&c/hydra freeze <player>"
  26. send "&c/hydra alerts <player>"
  27. send "&c/addbannedword <word>"
  28. send "&c/bannedwords"
  29. if arg 1 is "freeze":
  30. if arg 2 is set:
  31. if player has permission "hydra.command.freeze":
  32. if {freezed::%arg 2%} is false:
  33. set {freezed.%arg 2%} to true
  34. send "&c&lHydra &8>> &c%arg 2%&f is now frozen!"
  35. else:
  36. set {freezed::%arg 2%} to false
  37. send "&c&lHydra &8>> &c%arg 2% is no longer frozen!"
  38. else:
  39. send "{@NoPermission}"
  40. if arg 1 is "alerts":
  41. if arg 2 is set:
  42. if player has permission "hydra.command.logs":
  43. send "&cAuto Clicker Logs: %{autoclickerlogs::%arg 2%}%"
  44. send "&cFlight / AirWalk / NoFall Logs: %{flightlogs::%arg 2%}%"
  45. send "&cKillaura logs: %{killauralogs::%arg 2%}%"
  46. send "&cSpeed / Flight Logs: %{speedalerts::%arg 2%}%"
  47. send "&cReach Logs: %{reachalerts::%arg 2%}%"
  48. send "&cAnti Knockback Logs: %{antikbalerts::%arg 2%}%"
  49. send "&cFast Bow Logs: %{fastbowalerts::%arg 2%}%"
  50. send "&cWaterwalk Logs: %{waterwalk::%arg 2%}%"
  51. send "&cHigh Jump Logs: %{highjumplogs::%arg 2%}%"
  52. else:
  53. send "{@NoPermission}"
  54. else:
  55. send "&c&lHydra &8>> &cPlease specify a player!"
  56.  
  57.  
  58. every 30 seconds:
  59. delete {alerts::*}
  60.  
  61. on left click:
  62. if {@eula} is true:
  63. player does not have permission "hydra.bypass.autoclicker":
  64. add 1 to {killaura::%player%}
  65. if {killaura::%player%} >= 20:
  66. set {_ping} to player's ping
  67. send "&c&lHydra &8>> &c%player%&f has failed Auto Clicking (&c%{_ping}%&c MS&f) (%{killaura::%player%}%&c&l CPS" to all players where [player input has permission "hydra.logs"]
  68. add 1 to {autoclickerlogs::%player%}
  69. execute console command "auratest %player%"
  70. add 1 to {alerts::%player%}
  71. if {alerts::%player%} >= 10:
  72. if {kick_10_alerts} is true:
  73. kick player due to "&c&lHydra &8>> &cCheating"
  74.  
  75. on left click:
  76. if {@eula} is true:
  77. add 1 to {clickauratest::%player%}
  78. player does not have permission "hydra.bypass.killaura"
  79. if {clickauratest::%player%} >= 13:
  80. execute console command "auratest %player%"
  81.  
  82. every 1 second:
  83. delete {clickauratest::*}
  84. delete {killaura::*}
  85.  
  86.  
  87. on damage:
  88. attacker is a player:
  89. if attacker's targeted entity is not set:
  90. if {@eula} is true:
  91. if attacker does not have permission "hydra.bypass.invalidtarget":
  92. set {_ping} to attacker's ping
  93. send "&c&lHydra &8>> &c%attacker% has failed &cInvalid Target&f. (&c%{_ping}%&f)" to all players where [player input has permission "hydra.logs"]
  94. add 1 to {killauralogs::%attacker%}
  95. add 1 to {alerts::%attacker%}
  96. if {alerts::%attacker%} >= 10:
  97. if {kick_10_alerts} is true:
  98. kick attacker due to "&c&lHydra &8>> &cCheating"
  99.  
  100.  
  101. on damage:
  102. add 1 to {hits::%attacker%}
  103.  
  104. on left click:
  105. add 1 to {leftclicks::%player%}
  106.  
  107. on death:
  108. if {@eula} is true:
  109. if player does not have permission "hydra.bypass.killaura":
  110. if {hits::%attacker%} = {leftclicks::%attacker%}:
  111. execute console command "auratest %attacker%"
  112.  
  113. command /auratest [<player>]:
  114. permission: hydra.command.auratest
  115. permission message: &c&lHydra >> No Permissions
  116. trigger:
  117. if {auratest.%arg 1%} is false:
  118. set {loc} to location behind arg 1
  119. set {attacker} to arg 1
  120. set {auratest.%arg 1%} to true
  121. spawn a zombie at {loc}
  122. set {bot} to last spawned entity
  123. wait 5 ticks
  124. set {auratest.%arg 1%} to false
  125. delete last spawned entity
  126.  
  127. on damage:
  128. if attacker is {attacker}:
  129. if victim is {bot}:
  130. delete {bot}
  131. set {_ping} to attacker's ping
  132. send "&c&lHydra &r&8>> &c%attacker%&f has failed KillAura. (&c%{_ping}%&c MS&f)" to all players where [player input has permission "hydra.logs"]
  133. add 1 to {killauralogs::%attacker%}
  134. add 1 to {alerts::%attacker%}
  135. if {alerts::%attacker%} >= 10:
  136. if {kick_10_alerts} is true:
  137. kick attacker due to "&c&lHydra &8>> &cCheating"
  138. else:
  139. if victim is {bot}:
  140. cancel event
  141.  
  142. on any move:
  143. player's gamemode is not creative
  144. player is not flying
  145. block below player is air
  146. block north below player is air
  147. block south below player is air
  148. block west below player is air
  149. block east below player is air
  150. block north east below player is air
  151. block south east below player is air
  152. block north west below player is air
  153. block south west below player is air
  154. the gliding state of player is true:
  155. player's chestplate is elytra:
  156. stop
  157. else:
  158. block under player is air
  159. player is on ground
  160. set {_y} to player's y coordinate
  161. set {flysetback::%player%} to player's location
  162. wait 1 tick
  163. set {_ping} to player's ping
  164. set {_y.2} to player's y coordinate
  165. if {_y} > {_y.2}:
  166. player does not have permission "hydra.bypass.fly":
  167. if {@eula} is true:
  168. send "&c&lHydra &8>> &c%player%&f has failed Fly. (&c%{_ping}%&c MS&f)" to all players where [player input has permission "hydra.logs"]
  169. add 1 to {alerts::%player%}
  170. add 1 to {flightlogs::%player%}
  171. if {alerts::%player%} >= 10:
  172. if {kick_10_alerts} is true:
  173. kick player due to "&c&lHydra &8>> &cCheating"
  174. else if {_y} < {_y.2}:
  175. player does not have permission "hydra.bypass.fly":
  176. if {@eula} is true:
  177. send "&c&lHydra &8>> &c%player%&f has failed Fly. (&c%{_ping}%&c MS&f)" to all players where [player input has permission "hydra.logs"]
  178. add 1 to {alerts::%player%}
  179. add 1 to {flightlogs::%player%}
  180. if {alerts::%player%} >= 10:
  181. if {kick_10_alerts} is true:
  182. kick player due to "&c&lHydra &8>> &cCheating"
  183. else if {_y} = {_y.2}:
  184. player does not have permission "hydra.bypass.airwalk":
  185. if {@eula} is true:
  186. send "&c&lHydra &8>> &c%player%&f has failed AirWalk. (&c%{_ping}%&c MS&f)" to all players where [player input has permission "hydra.logs"]
  187. add 1 to {alerts::%player%}
  188. add 1 to {flightlogs::%player%}
  189. if {alerts::%player%} >= 10:
  190. if {kick_10_alerts} is true:
  191. kick player due to "&c&lHydra &8>> &cCheating"
  192. teleport player to {flysetback::%player%}
  193.  
  194. every 2 seconds:
  195. delete {fly::*}
  196.  
  197. on flight toggle:
  198. if {speedcheck::%player%} is true:
  199. set {speedcheck::%player%} to false
  200. else:
  201. wait 15 seconds
  202. set {speedcheck::%player%} to true
  203.  
  204. on any move:
  205. player does not have permission "hydra.bypass.speed":
  206. if {@eula} is true:
  207. player doesn't have speed
  208. if {speedcheck::%player%} is true:
  209. set {_loc::%player%} to the x location of player
  210. set {speedsetback::%player%} to location of the player
  211. wait 5 ticks
  212. set {_loc1::%player%} to the x location of player
  213. wait 1 tick
  214. set {_diffyx::%player%} to difference between {_loc::%player%} and {_loc1::%player%}
  215. if difference between {_loc::%player%} and {_loc1::%player%} >= 3.7:
  216. player's gamemode is not creative
  217. player is not flying
  218. add 1 to {speed::%player%}
  219. if {speed::%player%} >= 3:
  220. teleport player to {speedsetback::%player%}
  221. set {_ping} to player's ping
  222. send "&c&lHydra &8>> &c%player% &fhas failed Speed. (&c%{_ping}%&c MS&f) (&c%{_diffyx::%player%}% Blocks Per Second)." to all players where [player input has permission "hydra.logs"]
  223. add 1 to {speedalerts::%player%}
  224. add 1 to {alerts::%player%}
  225. if {alerts::%player%} >= 10:
  226. if {kick_10_alerts} is true:
  227. kick player due to "&c&lHydra &8>> &cCheating"
  228.  
  229. on any move:
  230. player does not have permission "hydra.bypass.speed":
  231. if {@eula} is true:
  232. player doesn't have speed
  233. if {speedcheck::%player%} is true:
  234. set {_locz::%player%} to the z location of player
  235. set {speedsetback::%player%} to location of the player
  236. wait 5 ticks
  237. set {_loc1z::%player%} to the z location of player
  238. wait 1 tick
  239. set {_diffy::%player%} to difference between {_locz::%player%} and {_loc1z::%player%}
  240. if difference between {_locz::%player%} and {_loc1z::%player%} >= 3.7:
  241. player's gamemode is not creative
  242. player is not flying
  243. add 1 to {speed::%player%}
  244. if {speed::%player%} >= 3:
  245. teleport player to {speedsetback::%player%}
  246. set {_ping} to player's ping
  247. send "&c&lHydra &8>> &c%player% &fhas failed Speed. (&c%{_ping}%&c MS&f) (&c%{_diffy::%player%}%&c Blocks Per Second&f)." to all players where [player input has permission "hydra.logs"]
  248. add 1 to {speedalerts::%player%}
  249. add 1 to {alerts::%player%}
  250. if {alerts::%player%} >= 10:
  251. if {kick_10_alerts} is true:
  252. kick player due to "&c&lHydra &8>> &cCheating"
  253.  
  254. on damage:
  255. attacker does not have permission "hydra.bypass.reach":
  256. if {@eula} is true:
  257. attacker is a player
  258. set {_reach} to distance between attacker and victim
  259. if {_reach} > 4:
  260. if damage cause is not a projectile:
  261. attacker's gamemode is not creative:
  262. cancel event
  263. set {_ping} to attacker's ping
  264. send "&c&lHydra &8>> &c%attacker% &fhas failed &cReach&f. (&c%{_ping}%&c MS&f)." to all players where [player input has permission "hydra.logs"]
  265. add 1 to {reachalerts::%attacker%}
  266. add 1 to {alerts::%attacker%}
  267. if {alerts::%attacker%} >= 10:
  268. if {kick_10_alerts} is true:
  269. kick attacker due to "&c&lHydra &8>> &cCheating"
  270.  
  271.  
  272. on damage:
  273. attacker does not have permission "hydra.bypass.selfhurt":
  274. if {@eula} is true:
  275. if attacker is victim:
  276. if damage cause is not a projectile:
  277. cancel event
  278. set {_ping} to attacker's ping
  279. send "&c&lHydra &8>> &c%attacker% &fhas failed SelfHurt. (&c%{_ping}%&c MS)" to all players where [player input has permission "hydra.logs"]
  280.  
  281.  
  282. on damage of a player:
  283. victim is not flying
  284. damage wasn't caused by fall, potion, lava, burning, fire, poison or wither
  285. victim is not burning
  286. victim doesn't have poison
  287. victim doesn't have wither:
  288. set {antikb::%victim%} to location of victim
  289. wait 10 ticks
  290. set {antikb2::%victim%} to location of victim
  291. block at victim is not cobweb:
  292. block at victim is not water:
  293. victim is not riding:
  294. if {antikb::%victim%} = {antikb2::%victim%}:
  295. set {_ping} to victim's ping
  296. attacker does not have permission "hydra.bypass.antiknockback":
  297. if {@eula} is true:
  298. send "&c&lHydra &8>> &c%victim% has been detected using &cAnti Knockback&f. (&c%{_ping}%&c MS&f)." to all players where [player input has permission "hydra.logs"]
  299. add 1 to {alerts::%victim%}
  300. add 1 to {antikbalerts::%victim%}
  301. if {alerts::%victim%} >= 10:
  302. if {kick_10_alerts} is true:
  303. kick victim due to "&c&lHydra &8>> &cCheating"
  304.  
  305. on chat:
  306. wait 1 tick
  307. set {chatcooldown::%player%} to true
  308. wait {@chat_cooldown_seconds} seconds
  309. delete {chatcooldown::%player%}
  310.  
  311. on chat:
  312. if {@eula} is true:
  313. if {chatcooldown::%player%} is true:
  314. player does not have permission "hydra.bypass.chatcooldown":
  315. send "&cThere is a {@chat_cooldown_seconds}&c second chat cooldown!"
  316. cancel event
  317.  
  318. on shoot:
  319. if projectile is an arrow:
  320. if difference between {bow::%shooter%} and now is less than 2 ticks:
  321. cancel event
  322. set {_ping} to shooter's ping
  323. shooter does not have permission "hydra.bypass.fastbow":
  324. if {@eula} is true:
  325. loop all players:
  326. loop-player has permission "hydra.logs":
  327. send "&c&lHydra &8>> &c%shooter% has failed &cFast Bow&f. (&c%{_ping}%&c MS&f)."
  328. add 1 to {alerts::%shooter%}
  329. add 1 to {fastbowalerts::%shooter%}
  330. if {alerts::%shooter%} >= 10:
  331. if {kick_10_alerts} is true:
  332. kick shooter due to "&c&lHydra &8>> &cCheating"
  333.  
  334. on walk on water:
  335. player's gamemode is not creative
  336. player is not riding
  337. player is not sneaking
  338. block below player is water
  339. block south below player is water
  340. block east below player is water
  341. block west below player is water
  342. block north below player is water
  343. block south player is air
  344. block north player is air
  345. block west player is air
  346. block east player is air
  347. player does not have permission "hydra.bypass.waterwalk":
  348. if {@eula} is true:
  349. cancel event
  350. set {_ping} to player's ping
  351. add 1 to {alerts::%player%}
  352. add 1 to {waterwalk::%player%}
  353. send "&c&lHydra &8>> &c%player%&f has failed &cWaterWalk&f. (&c%{_ping}%&c MS&f)." to all players where [player input has permission "hydra.logs"]
  354. if {alerts::%player%} >= 10:
  355. if {kick_10_alerts} is true:
  356. kick player due to "&c&lHydra &8>> &cCheating"
  357.  
  358. on jump:
  359. if {@eula} is true:
  360. player does not have permission "hydra.bypass.highjump":
  361. player's gamemode is not creative
  362. player is not flying
  363. player is not riding
  364. set {loc::%player%} to player's y coordinate
  365. wait 7 ticks
  366. set {loc1::%player%} to player's y coordinate
  367. difference between {loc::%player%} and {loc1::%player%} >= 1.8:
  368. teleport player to {loc::%player%}
  369. add 1 to {highjumplogs::%player%}
  370. add 1 to {alerts::%player%}
  371. set {_ping} to player's ping
  372. send "&c&lHydra &8>> &c%player%&f has failed &cHigh Jump&f. (&c%{_ping}%&c MS&f)." to all players where [player input has permission "hydra.logs"]
  373. if {alerts::%player%} >= 10:
  374. if {kick_10_alerts} is true:
  375. kick player due to "&c&lHydra &8>> &cCheating"
  376.  
  377. command /addbannedword [<text>]:
  378. permission: hydra.words.addbanned
  379. permission message: {@NoPermission}
  380. trigger:
  381. if {bannedwords::*} contains {bannedword::%arg 1%}:
  382. send "&c&lHydra &8>> &cThat word is already added to the banned word list! Check all of the banned words with /bannedwords"
  383. else:
  384. set {bannedword::%arg 1%} to arg 1
  385. add {bannedword::%arg 1%} to {bannedwords::*}
  386. send "&cAdded the word &d%arg 1%&c to the banned word list"
  387.  
  388. command /clearbannedwords:
  389. permission: hydra.words.clearbanned
  390. permission message: {@NoPermission}
  391. trigger:
  392. delete {bannedword::*}
  393. delete {bannedwords::*}
  394. send "&cCleared all banned words!"
  395.  
  396. command /bannedwords:
  397. permission: hydra.words.listbanned
  398. permission message: {@NoPermission}
  399. trigger:
  400. set {e} to 1
  401. loop 1000 times:
  402. if {bannedwords::%{e}%} is set:
  403. send "%{bannedwords::%{e}%}%"
  404. add 1 to {e}
  405.  
  406. on chat:
  407. loop {bannedwords::*}:
  408. if message contains loop-value:
  409. if player does not have permission "hydra.bypass.bannedwords":
  410. send "&c&lHydra &8>> &c%player% has tried to type a &cBanned Word&f. The word they typed was &c%loop-value%" to all players where [player input has permission "hydra.logs"]
  411. send "&c&lHydra &8>> &cOriginal Message: &f%message%"
  412. replace all "%loop-value%" with "" in message
Add Comment
Please, Sign In to add comment