Advertisement
Guest User

Hydra Anticheat - Version 1.5

a guest
Nov 17th, 2020
1,764
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 33.34 KB | None | 0 0
  1. # Hydra AntiCheat from the developers of WASP AntiCheat know as _LkZ#9628
  2. # Detections: Killaura, Fly, Speed, Reach, SelfHurt, NoFall and AirWalk, WaterWalk, HighJump, FastBow, XRay, AntiSpam (More Coming Soon)
  3. # Main Developer: _LkZ
  4. # Other Developers: MikkelOnTop
  5. # Join our discord for updates when we make a new version, or to report bugs and add suggestions! https://discord.gg/Ff76XSj
  6. # find our terms of use and more updates at: https://hydra-anticheat.carrd.co
  7. # the guy who like fixed all the lag and added 3 new epic detections: dnadany (https://discord.gg/6RFZYxt)
  8.  
  9. options:
  10. version: 1.4
  11. NoPermission: &c&lHydra &8>> &4Invalid Permission!
  12. chat_cooldown_seconds: 3
  13. eula: false
  14. kick_10_alerts: true
  15. KickMessage: &C&lHydra &8>> &cCheating
  16. FileName: Enter the anticheat file name here!
  17.  
  18. command /hydra [<text>] [<offline player>]:
  19. permission: hydra.command.command
  20. permission message: {@NoPermission}
  21. trigger:
  22. if arg 1 is not set:
  23. send "&c&lHydra &8>> &c/hydra help"
  24. if arg 1 is "discord":
  25. send "&cJoin our discord by clicking &n<link:ttps://discord.gg/Ff76XSj>here<reset>"
  26. if arg 1 is "help":
  27. send "&c&lHydra AntiCheat. &fMade by _LkZ, and MikkelOnTop"
  28. send "&c/hydra help"
  29. send "&c/hydra freeze <player>"
  30. send "&c/hydra alerts <player>"
  31. send "&c/hydra addons"
  32. send "&c/addbannedword <word>"
  33. send "&c/bannedwords"
  34. send "&c/clearbannedwords"
  35. send "&c/report <player> <reason>"
  36. send "&c/reports <player>"
  37. send "&c/clearreports <player>"
  38. send "&c/hydra gui"
  39. send "&c/hydra xray"
  40. if arg 1 is "addons":
  41. {hydrApi::addons::*} is set:
  42. send "&c&lHydra AntiCheat Loaded Addons."
  43. send "&c&l--------------------------------"
  44. loop {hydrApi::addons::*}:
  45. send "&c%loop-value%"
  46. send "&c&l--------------------------------"
  47. stop
  48. send "&4&lERROR &cNo addons loaded"
  49. if arg 1 is "freeze":
  50. if arg 2 is set:
  51. if player has permission "hydra.command.freeze":
  52. if {freezed::%arg 2%} is false:
  53. set {freezed.%arg 2%} to true
  54. send "&c&lHydra &8>> &c%arg 2%&f is now frozen!"
  55. else:
  56. set {freezed::%arg 2%} to false
  57. send "&c&lHydra &8>> &c%arg 2% is no longer frozen!"
  58. else:
  59. send "{@NoPermission}"
  60. if arg 1 is "alerts" or "logs":
  61. if arg 2 is set:
  62. if player has permission "hydra.command.logs":
  63. send "&cAuto Clicker Logs: %{autoclickerlogs::%arg 2%}%"
  64. send "&cFlight / AirWalk / NoFall Logs: %{flightlogs::%arg 2%}%"
  65. send "&cKillaura logs: %{killauralogs::%arg 2%}%"
  66. send "&cSpeed / Flight Logs: %{speedalerts::%arg 2%}%"
  67. send "&cReach Logs: %{reachalerts::%arg 2%}%"
  68. send "&cAnti Knockback Logs: %{antikbalerts::%arg 2%}%"
  69. send "&cFast Bow Logs: %{fastbowalerts::%arg 2%}%"
  70. send "&cWaterwalk Logs: %{waterwalk::%arg 2%}%"
  71. send "&cHigh Jump Logs: %{highjumplogs::%arg 2%}%"
  72. send "&Spider Logs: %{spiderlogs::%arg 2%}%"
  73. else:
  74. send "{@NoPermission}"
  75. else:
  76. send "&c&lHydra &8>> &cPlease specify a player!"
  77. if arg 1 is "gui":
  78. if player has permission "hydra.gui":
  79. gui(player)
  80. if arg 1 is "xray":
  81. if player has permission "hydra.xray":
  82. xray(player)
  83. if arg 1 is "reload":
  84. if player has permission "hydra.reload":
  85. set {FileName} to "{@FileName}"
  86. if {FileName} != "Enter the anticheat file name here!":
  87. execute console command "sk reload {@FileName}"
  88. send "&4&lSUCCESS &8| &cAnticheat has been reloaded"
  89. else:
  90. send "&4&lERROR &8| &cPlease enter your skript file name in the options section of the anticheat!"
  91.  
  92. command /report [<offline player>] [<text>]:
  93. permission: hydra.report.use
  94. permission message: {@NoPermission}
  95. trigger:
  96. if arg 1 is set:
  97. if arg 2 is set:
  98. if arg 1 does not have permission "hydra.report.bypass":
  99. "%arg 1%" != "%player%":
  100. add 1 to {reports::%arg 1%}
  101. set {report::%arg 1%::%{reports::%arg 1%}%} to arg 2
  102. add {report::%arg 1%::%{reports::%arg 1%}%} to {reports::%arg 1%::*}
  103. send "&c&lHydra &8>> &fYou have reported &c%arg 1%&f for the reason &c%arg 2%."
  104. send "&c&lHydra &8>> &c%player% has reported &c%arg 1% for the reason &c%arg 2%." to all players where [player input has permission "hydra.logs"]
  105. else:
  106. send "&c&lHydra &8>> &fYou cant report yourself, silly!"
  107. else:
  108. send "&c&lHydra &8>> &fYou cannot report that player!"
  109. else:
  110. send "&c&lHydra &8>> &f/report <player> <reason>"
  111. else:
  112. send "&c&lHydra &8>> &f/report <player> <reason>"
  113.  
  114. command /reports [<offline player>]:
  115. permission: hydra.report.see
  116. permission message: {@NoPermission}
  117. trigger:
  118. if arg 1 is set:
  119. set {_e} to 1
  120. send "&a---------------------"
  121. loop 20 times:
  122. if {reports::%arg 1%::%{_e}%} is set:
  123. send "%{reports::%arg 1%::%{_e}%}%"
  124. add 1 to {_e}
  125. send "&a---------------------"
  126.  
  127. command /clearreports [<offline player>]:
  128. permission: hydra.report.clear
  129. permission message: {@NoPermission}
  130. trigger:
  131. delete {reports::%arg 1%::*}
  132. delete {reports::%arg 1%}
  133. delete {report::%arg 1%::*}
  134.  
  135.  
  136. every 30 seconds:
  137. delete {alerts::*}
  138.  
  139. on left click:
  140. if {@eula} is true:
  141. player does not have permission "hydra.bypass.autoclicker":
  142. if {autoclicker} is true:
  143. add 1 to {killaura::%player%}
  144. if {killaura::%player%} >= 20:
  145. set {_ping} to player's ping
  146. alert(player, "Auto Clicker")
  147. add 1 to {autoclickerlogs::%player%}
  148. execute console command "auratest %player%"
  149. add 1 to {alerts::%player%}
  150. if {alerts::%player%} >= 10:
  151. if {kick_10_alerts} is true:
  152. hydrApi_kickPlayer(player)
  153.  
  154. on left click:
  155. if {@eula} is true:
  156. if {killaura} is true:
  157. add 1 to {clickauratest::%player%}
  158. player does not have permission "hydra.bypass.killaura"
  159. if {clickauratest::%player%} >= 13:
  160. execute console command "auratest %player%"
  161.  
  162. every 1 second:
  163. delete {clickauratest::*}
  164. delete {killaura::*}
  165.  
  166.  
  167. on damage:
  168. attacker is a player:
  169. if attacker's targeted entity is not set:
  170. if {@eula} is true:
  171. if attacker does not have permission "hydra.bypass.invalidtarget":
  172. if {killaura} is true:
  173. set {_ping} to attacker's ping
  174. alert(attacker, "Invalid Target")
  175. add 1 to {killauralogs::%attacker%}
  176. add 1 to {alerts::%attacker%}
  177. if {alerts::%attacker%} >= 10:
  178. if {kick_10_alerts} is true:
  179. hydrApi_kickPlayer(attacker)
  180.  
  181.  
  182. on damage:
  183. add 1 to {hits::%attacker%}
  184.  
  185. on left click:
  186. add 1 to {leftclicks::%player%}
  187.  
  188. on death:
  189. if {@eula} is true:
  190. if player does not have permission "hydra.bypass.killaura":
  191. if {killaura} is true:
  192. if {hits::%attacker%} = {leftclicks::%attacker%}:
  193. execute console command "auratest %attacker%"
  194.  
  195. command /auratest [<player>]:
  196. permission: hydra.command.auratest
  197. permission message: &c&lHydra >> No Permissions
  198. trigger:
  199. if {killaura} is true:
  200. set {loc} to location behind arg 1
  201. set {attacker} to arg 1
  202. set {auratest.%arg 1%} to true
  203. spawn a zombie at {loc}
  204. set {bot} to last spawned entity
  205. wait 5 ticks
  206. delete last spawned entity
  207.  
  208. on damage:
  209. if attacker is {attacker}:
  210. if {killaura} is true:
  211. if victim is {bot}:
  212. delete {bot}
  213. alert(attacker, "Killaura")
  214. add 1 to {killauralogs::%attacker%}
  215. add 1 to {alerts::%attacker%}
  216. if {alerts::%attacker%} >= 10:
  217. if {kick_10_alerts} is true:
  218. hydrApi_kickPlayer(attacker)
  219. else:
  220. if victim is {bot}:
  221. cancel event
  222.  
  223.  
  224.  
  225.  
  226.  
  227. on any move:
  228. {@eula} is true
  229. player's gamemode is not creative
  230. player does not have permission "hydra.bypass.fly"
  231. difference between {log.%player%} and now is more than 0.3 seconds
  232. player is on ground
  233. block below player is air
  234. block north below player is air
  235. block south below player is air
  236. block west below player is air
  237. block east below player is air
  238. block north east below player is air
  239. block south east below player is air
  240. block north west below player is air
  241. block south west below player is air
  242. if {fly} is true:
  243. add 1 to {fly::%player%}
  244. if {fly::%player%} >= 3:
  245. alert(player, "Groundspoof")
  246. teleport player to {rubberband.%player%}
  247. add 1 to {alerts::%player%}
  248. add 1 to {flightlogs::%player%}
  249. if {alerts::%player%} >= 10:
  250. if {kick_10_alerts} is true:
  251. hydrApi_kickPlayer(player)
  252.  
  253.  
  254.  
  255. on any move:
  256. player does not have permission "hydra.bypass.fly"
  257. player's gamemode is survival or adventure
  258. player's flight mode is false
  259. set {_y1} to y pos of player
  260. wait 2 ticks
  261. set {_y2} to y pos of player
  262. difference between {_y1} and {_y2} is less than 0.4
  263. difference between {log.%player%} and now is more than 0.5 seconds
  264. difference between {reload.%player%} and now is more than 5 seconds
  265. add 1 to {fly::%player%}
  266. if {fly} is true:
  267. if {fly::%player%} >= 3:
  268. alert(player, "AirWalk")
  269. teleport player to {rubberband.%player%}
  270. add 1 to {alerts::%player%}
  271. add 1 to {flightlogs::%player%}
  272. if {alerts::%player%} >= 10:
  273. if {kick_10_alerts} is true:
  274. hydrApi_kickPlayer(player)
  275.  
  276. on any move:
  277. player does not have permission "hydra.bypass.fly"
  278. player's gamemode is survival or adventure
  279. player's flight mode is false
  280. set {_y1} to y pos of player
  281. wait 2 ticks
  282. set {_y2} to y pos of player
  283. difference between {_y1} and {_y2} is more than 0.3
  284. {_y1} < {_y2}
  285. difference between {log.%player%} and now is more than 0.5 seconds
  286. difference between {reload.%player%} and now is more than 5 seconds
  287. if {fly} is true:
  288. add 1 to {fly::%player%}
  289. if {fly::%player%} >= 3:
  290. alert(player, "Fly")
  291. teleport player to {rubberband.%player%}
  292. add 1 to {alerts::%player%}
  293. add 1 to {flightlogs::%player%}
  294. if {alerts::%player%} >= 10:
  295. if {kick_10_alerts} is true:
  296. hydrApi_kickPlayer(player)
  297.  
  298.  
  299.  
  300. on any move:
  301. player does not have permission "hydra.bypass.fly"
  302. player's gamemode is survival or adventure
  303. player's flight mode is false
  304. set {_y1} to y pos of player
  305. wait 2 ticks
  306. set {_y2} to y pos of player
  307. wait 2 ticks
  308. set {_y3} to y pos of player
  309. difference between {_y1} and {_y2} > difference between {_y1} and {_y3}
  310. difference between {log.%player%} and now is more than 0.7 seconds
  311. difference between {reload.%player%} and now is more than 5 seconds
  312. player's flight mode is false
  313. if {fly} is true:
  314. add 1 to {fly::%player%}
  315. if {fly::%player%} >= 3:
  316. alert(player, "Glide")
  317. teleport player to {rubberband.%player%}
  318. add 1 to {alerts::%player%}
  319. add 1 to {flightlogs::%player%}
  320. if {alerts::%player%} >= 10:
  321. if {kick_10_alerts} is true:
  322. hydrApi_kickPlayer(player)
  323.  
  324. on any move:
  325. if {@eula} is true:
  326. #player does not have permission "hydra.bypass.highjump":
  327. player is not flying
  328. player is not riding
  329. set {_pos} to player's location
  330. set {_loc} to player's y coordinate
  331. wait 1 ticks
  332. set {_loc1} to player's y coordinate
  333. wait 1 ticks
  334. set {_loc2} to player's y coordinate
  335. wait 2 ticks
  336. set {_loc3} to player's y coordinate
  337. wait 2 ticks
  338. set {_loc4} to player's y coordinate
  339. difference between {_loc} and {_loc1} > 0.2
  340. difference between {_loc} and {_loc1} = difference between {_loc1} and {_loc2}
  341. #difference between {_loc1} and {_loc2} = difference between {_loc2} and {_loc3}
  342. #difference between {_loc2} and {_loc3} = difference between {_loc3} and {_loc4}
  343. block below player is not a stair
  344. block south below player is not a stair
  345. block east below player is not a stair
  346. block west below player is not a stair
  347. block north below player is not a stair
  348. block below player is not a slab
  349. block south below player is not a slab
  350. block east below player is not a slab
  351. block west below player is not a slab
  352. block north below player is not a slab
  353. if {fly} is true:
  354. teleport player to {_pos}
  355. add 1 to {spiderlogs::%player%}
  356. add 1 to {alerts::%player%}
  357. alert(player, "Fly")
  358.  
  359.  
  360. on unload:
  361. loop all players:
  362. set {reload.%loop-player%} to now
  363.  
  364. every 5 ticks:
  365. loop all players:
  366. set {_loc} to location of loop-player
  367. loop all blocks in radius 2.5 around {_loc}:
  368. if loop-block is not air:
  369. set {log.%loop-player%} to now
  370. set {rubberband.%loop-player%} to location of loop-player
  371.  
  372. the gliding state of loop-player is true:
  373. loop-player's chestplate is elytra:
  374. set {log.%loop-player%} to now
  375.  
  376. loop-player is flying:
  377. set {lastflying::%loop-player%} to now
  378.  
  379.  
  380.  
  381.  
  382.  
  383. on any move:
  384. player does not have permission "hydra.bypass.speed":
  385. if {@eula} is true:
  386. player doesn't have speed
  387. set {_loc::%player%} to the x location of player
  388. set {speedsetback::%player%} to location of the player
  389. wait 5 ticks
  390. set {_loc1::%player%} to the x location of player
  391. wait 1 tick
  392. set {_diffyx::%player%} to difference between {_loc::%player%} and {_loc1::%player%}
  393. if difference between {_loc::%player%} and {_loc1::%player%} >= 3.7:
  394. player's gamemode is not creative
  395. player is not flying
  396. if {speed} is true:
  397. add 1 to {speed::%player%}
  398. if {speed::%player%} >= 3:
  399. teleport player to {speedsetback::%player%}
  400. alert(player, "Speed")
  401. add 1 to {speedalerts::%player%}
  402. add 1 to {alerts::%player%}
  403. if {alerts::%player%} >= 10:
  404. if {kick_10_alerts} is true:
  405. hydrApi_kickPlayer(player)
  406.  
  407. on any move:
  408. player does not have permission "hydra.bypass.speed":
  409. if {@eula} is true:
  410. player doesn't have speed
  411. set {_locz::%player%} to the z location of player
  412. set {speedsetback::%player%} to location of the player
  413. wait 5 ticks
  414. set {_loc1z::%player%} to the z location of player
  415. wait 1 tick
  416. set {_diffy::%player%} to difference between {_locz::%player%} and {_loc1z::%player%}
  417. if difference between {_locz::%player%} and {_loc1z::%player%} >= 3.7:
  418. player's gamemode is not creative
  419. player is not flying
  420. if {speed} is true:
  421. add 1 to {speed::%player%}
  422. if {speed::%player%} >= 3:
  423. teleport player to {speedsetback::%player%}
  424. alert(player, "Speed")
  425. add 1 to {speedalerts::%player%}
  426. add 1 to {alerts::%player%}
  427. if {alerts::%player%} >= 10:
  428. if {kick_10_alerts} is true:
  429. hydrApi_kickPlayer(player)
  430.  
  431. on damage:
  432. attacker does not have permission "hydra.bypass.reach":
  433. if {@eula} is true:
  434. attacker is a player
  435. set {_reach} to distance between attacker and victim
  436. if {_reach} > 4.5:
  437. if damage cause is not a projectile:
  438. attacker's gamemode is not creative:
  439. if {reach} is true:
  440. cancel event
  441. alert(attacker, "Reach")
  442. add 1 to {reachalerts::%attacker%}
  443. add 1 to {alerts::%attacker%}
  444. if {alerts::%attacker%} >= 10:
  445. if {kick_10_alerts} is true:
  446. hydrApi_kickPlayer(attacker)
  447.  
  448.  
  449. on damage:
  450. attacker does not have permission "hydra.bypass.selfhurt":
  451. if {@eula} is true:
  452. if attacker is victim:
  453. if damage cause is not a projectile:
  454. if {selfhurt} is true:
  455. cancel event
  456. set {_ping} to attacker's ping
  457. alert(attacker, "SelfHurt")
  458.  
  459.  
  460. on damage of a player:
  461. victim is not flying
  462. damage wasn't caused by fall, potion, lava, burning, fire, poison or wither
  463. victim is not burning
  464. victim doesn't have poison
  465. victim doesn't have wither:
  466. set {antikb::%victim%} to location of victim
  467. wait 10 ticks
  468. set {antikb2::%victim%} to location of victim
  469. block at victim is not cobweb:
  470. block at victim is not water:
  471. victim is not riding:
  472. if {antikb::%victim%} = {antikb2::%victim%}:
  473. attacker does not have permission "hydra.bypass.antiknockback":
  474. if {@eula} is true:
  475. if {antiknockback} is true:
  476. alert(victim, "AntiKnockback")
  477. add 1 to {alerts::%victim%}
  478. add 1 to {antikbalerts::%victim%}
  479. if {alerts::%victim%} >= 10:
  480. if {kick_10_alerts} is true:
  481. hydrApi_kickPlayer(victim)
  482.  
  483. on chat:
  484. wait 1 tick
  485. set {chatcooldown::%player%} to true
  486. wait {@chat_cooldown_seconds} seconds
  487. delete {chatcooldown::%player%}
  488.  
  489. on chat:
  490. if {@eula} is true:
  491. if {chatcooldown::%player%} is true:
  492. if {chatcooldown} is true:
  493. player does not have permission "hydra.bypass.chatcooldown":
  494. send "&cThere is a {@chat_cooldown_seconds}&c second chat cooldown!"
  495. cancel event
  496.  
  497. on shoot:
  498. if projectile is an arrow:
  499. if difference between {bow::%shooter%} and now is less than 2 ticks:
  500. cancel event
  501. shooter does not have permission "hydra.bypass.fastbow":
  502. if {@eula} is true:
  503. if {fastbow} is true:
  504. alert(shooter, "FastBow")
  505. add 1 to {alerts::%shooter%}
  506. add 1 to {fastbowalerts::%shooter%}
  507. if {alerts::%shooter%} >= 10:
  508. if {kick_10_alerts} is true:
  509. hydrApi_kickPlayer(shooter)
  510. set {bow::%shooter%} to now
  511.  
  512.  
  513. on walk on water:
  514. player is on ground
  515. player's gamemode is not creative
  516. player is not riding
  517. player is not sneaking
  518. block below player is water
  519. block south below player is water
  520. block east below player is water
  521. block west below player is water
  522. block north below player is water
  523. block south player is air
  524. block north player is air
  525. block west player is air
  526. block east player is air
  527. player does not have permission "hydra.bypass.waterwalk"
  528. if {@eula} is true:
  529. if {waterwalk} is true:
  530. cancel event
  531. add 1 to {alerts::%player%}
  532. add 1 to {waterwalk::%player%}
  533. alert(player, "Waterwalk")
  534.  
  535. on jump:
  536. if {@eula} is true:
  537. player does not have permission "hydra.bypass.highjump":
  538. player's gamemode is not creative
  539. player is not flying
  540. player is not riding
  541. set {_loc} to player's y coordinate
  542. set {_pos} to player's location
  543. wait 7 ticks
  544. set {_loc1} to player's y coordinate
  545. difference between {_loc} and {_loc1} >= 1.8:
  546. block below player is not a stair
  547. block south below player is not a stair
  548. block east below player is not a stair
  549. block west below player is not a stair
  550. block north below player is not a stair
  551. block below player is not a slab
  552. block south below player is not a slab
  553. block east below player is not a slab
  554. block west below player is not a slab
  555. block north below player is not a slab
  556. teleport player to {_pos}
  557. add 1 to {highjumplogs::%player%}
  558. add 1 to {alerts::%player%}
  559. alert(player, "High Jump")
  560.  
  561.  
  562.  
  563. command /addbannedword [<text>]:
  564. permission: hydra.words.addbanned
  565. permission message: {@NoPermission}
  566. trigger:
  567. if {bannedwords::*} contains {bannedword::%arg 1%}:
  568. send "&c&lHydra &8>> &cThat word is already added to the banned word list! Check all of the banned words with /bannedwords"
  569. else:
  570. set {bannedword::%arg 1%} to arg 1
  571. add {bannedword::%arg 1%} to {bannedwords::*}
  572. send "&cAdded the word &d%arg 1%&c to the banned word list"
  573.  
  574. command /clearbannedwords:
  575. permission: hydra.words.clearbanned
  576. permission message: {@NoPermission}
  577. trigger:
  578. delete {bannedword::*}
  579. delete {bannedwords::*}
  580. send "&cCleared all banned words!"
  581.  
  582. command /bannedwords:
  583. permission: hydra.words.listbanned
  584. permission message: {@NoPermission}
  585. trigger:
  586. set {e} to 1
  587. loop 1000 times:
  588. if {bannedwords::%{e}%} is set:
  589. send "%{bannedwords::%{e}%}%"
  590. add 1 to {e}
  591.  
  592. on chat:
  593. loop {bannedwords::*}:
  594. if message contains loop-value:
  595. if player does not have permission "hydra.bypass.bannedwords":
  596. 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"]
  597. send "&c&lHydra &8>> &cOriginal Message: &f%message%"
  598. replace all "%loop-value%" with "" in message
  599.  
  600.  
  601. function alert(p: player, cheat: text):
  602. set {_ping} to {_p}'s ping
  603. send "&c&lHydra &8>> &c%{_p}% has failed &c%{_cheat}%. (&c%{_ping}%&c MS&f)" to all players where [player input has permission "hydra.logs"]
  604. send "&c&lHydra &8>> &c%{_p}% has failed &c%{_cheat}%. (&c%{_ping}%&c MS&f)" to console
  605.  
  606.  
  607. command /alert [<player>] [<text>]:
  608. permission: hydra.alert
  609. permission message: {@NoPermission}
  610. trigger:
  611. if arg 1 is set:
  612. if arg 2 is set:
  613. alert(arg 1, "%arg 2%")
  614. else:
  615. send "/alert <player> <reason>"
  616. else:
  617. send "/alert <player> <reason>"
  618.  
  619. #-----------------------------------------------------------------------------------------------------------------------
  620.  
  621. #API Docs:
  622.  
  623. #Making a Hydra Addon (Guide)
  624. #hydrAPI allows for custom hydra addons coded in skript using simple functions
  625. #BE SURE THE ADDON NAME IN THE SERVER FILES IS WRITTEN WITH LOWERCASE OR IT WILL NOT BE AUTOLOADED OR HOOKED INTO HYDRA.
  626.  
  627.  
  628.  
  629.  
  630. #The most basic thing of a hydra addon is registering it, we have made it as simple as possible.
  631. #When a On Load is called be sure to use the "hydrApi_registerAddon" function.
  632. #The first argument (ADDON NAME) Indicates your addon's name (Allowed to be uppercase).
  633. #The second argument (EXTRA TEXT) Indicates anything following your addons name, like a version number or your name.
  634. #The third argument (script) is to tell hydrAPI what the scripts name is in your server files. DO NOT CHANGE.
  635.  
  636. #on load:
  637. #hydrApi_registerAddon("ADDON NAME", "EXTRA TEXT", script)
  638.  
  639.  
  640.  
  641.  
  642. #Other things you may need
  643.  
  644.  
  645. #Returns the players violations, this can be used as a variable like "if hydrApi_getVL(player) is more than 5:"
  646. #Change ARGUMENT to the player name, player doesnt need to be online.
  647. #Will return 0 if the player hasnt had any VL's or if the player doesnt exist.
  648. #hydrApi_getVL(ARGUMENT)
  649.  
  650.  
  651. #Adds ARGUMENT2 violations to ARGUMENT1.
  652. #Change ARGUMENT1 to the player name, player doesnt need to be online.
  653. #Change ARGUMENT2 to the to the amount of violations to add.
  654. #hydrApi_addVL(ARGUMENT1, ARGUMENT2)
  655.  
  656.  
  657. #Sets ARGUMENT1's violations to ARGUMENT2.
  658. #Change ARGUMENT1 to the player name, player doesnt need to be online.
  659. #Change ARGUMENT2 to the to the amount of violations to set to.
  660. #hydrApi_setVL(ARGUMENT1, ARGUMENT2)
  661.  
  662.  
  663. #Makes a violation and announces it to all staff.
  664. #Change ARGUMENT1 to the player name.
  665. #Change ARGUMENT2 to the chat they were flagged for.
  666. #hydrApi_alert(ARGUMENT1, "ARGUMENT2")
  667.  
  668.  
  669. #That is the Hydra API documentation. Happy Coding!
  670.  
  671. #-----------------------------------------------------------------------------------------------------------------------
  672.  
  673. on load:
  674. set {kick_10_alerts} to {@kick_10_alerts}
  675. set {hydra::action::alert} to true
  676. set {hydra::action::alertFunc} to false
  677. loop {hydrApi::addons::*}:
  678. delete {hydrApi::addons::%loop-index%}
  679. execute console command "sk reload %loop-index%"
  680.  
  681. function hydrApi_registerAddon(p: text, v: text, n: text):
  682. set {hydrApi::addons::%{_n}%} to "%{_p}% - %{_v}%"
  683. send "&cLoaded Hydra Addon %{_p}% - %{_v}%" to console
  684.  
  685. function hydrApi_getVL(p: offlineplayer) :: number:
  686. {alerts::%{_p}%} is not set:
  687. set {alerts::%{_p}%} to 0
  688. return {alerts::%{_p}%}
  689.  
  690. function hydrApi_reportPlayer(p: offline player, r: text):
  691. add 1 to {reports::%{_p}%}
  692. set {report::%{_p}%::%{reports::%{_p}%}%} to {_r}
  693. add {report::%{_p}%::%{reports::%{_p}%}%} to {reports::%{_p}%::*}
  694.  
  695. function hydrApi_clearReportsPlayer(p: offline player):
  696. delete {reports::%{_p}%}
  697. delete {report::%{_p}%::*}
  698. delete {reports::%{_p}%::*}
  699.  
  700. function hydrApi_addVL(p: offlineplayer, vl: number):
  701. add {_vl} to {alerts::%{_p}%}
  702.  
  703. function hydrApi_setVL(p: offlineplayer, vl: number):
  704. set {alerts::%{_p}%} to {_vl}
  705.  
  706. function hydrApi_alert(p: offlineplayer, h: text):
  707. alert({_p}, {_h})
  708.  
  709. function hydrApi_setKick(b: boolean):
  710. set {kick_10_alerts} to {_b}
  711.  
  712. function hydrApi_setAlertBool(b: boolean):
  713. set {hydra::action::alert} to {_b}
  714.  
  715. function hydrApi_setAlertCallFunc(f: boolean):
  716. set {hydra::action::alertFunc} to {_f}
  717.  
  718. function hydrApi_kickPlayer(p: player):
  719. kick {_p} due to "{@KickMessage}"
  720.  
  721. on load:
  722. set {autoclicker} to true
  723. set {killaura} to true
  724. set {fly} to true
  725. set {speed} to true
  726. set {reach} to true
  727. set {antiknockback} to true
  728. set {chatcooldown} to true
  729. set {fastbow} to true
  730. set {waterwalk} to true
  731. set {highjump} to true
  732.  
  733. function xrayalert(p: player, t: text):
  734. loop all players:
  735. if {%{_t}%::%{_p}%} is true:
  736. send "&c&lHydra &8>> &c%{_p}% has mined &c%{_t}%" to loop-player
  737.  
  738. function gui(p: player):
  739. close {_p}'s inventory
  740. wait 1 tick
  741. open virtual chest inventory with size 2 named "&cHydra Anticheat Checks" to {_p}
  742. if {autoclicker} is true:
  743. format gui slot 0 of {_p} with redstone torch named "&cDisable Auto Clicker Check" to run:
  744. set {autoclicker} to false
  745. wait 5 ticks
  746. gui({_p})
  747. if {autoclicker} is false:
  748. format gui slot 0 of {_p} with redstone torch named "&cEnable Auto Clicker Check" to run:
  749. set {autoclicker} to true
  750. wait 5 ticks
  751. gui({_p})
  752. if {killaura} is true:
  753. format gui slot 1 of {_p} with diamond sword named "&cDisable Killaura Check" to run:
  754. set {killaura} to false
  755. wait 5 ticks
  756. gui({_p})
  757. if {killaura} is false:
  758. format gui slot 1 of {_p} with diamond sword named "&cEnable Killaura Check" to run:
  759. set {killaura} to true
  760. wait 5 ticks
  761. gui({_p})
  762. if {fly} is true:
  763. format gui slot 2 of {_p} with feather named "&cDisable Flight Check" to run:
  764. set {fly} to false
  765. wait 5 ticks
  766. gui({_p})
  767. if {fly} is false:
  768. format gui slot 2 of {_p} with feather named "&cEnable Flight Check" to run:
  769. set {fly} to true
  770. wait 5 ticks
  771. gui({_p})
  772. if {speed} is true:
  773. format gui slot 3 of {_p} with diamond boots named "&cDisable Speed Check" to run:
  774. set {speed} to false
  775. wait 5 ticks
  776. gui({_p})
  777. if {speed} is false:
  778. format gui slot 3 of {_p} with diamond boots named "&cEnable Speed Check" to run:
  779. set {speed} to true
  780. wait 5 ticks
  781. gui({_p})
  782. if {reach} is true:
  783. format gui slot 4 of {_p} with iron sword named "&cDisable Reach Check" to run:
  784. set {reach} to false
  785. wait 5 ticks
  786. gui({_p})
  787. if {reach} is false:
  788. format gui slot 4 of {_p} with iron sword named "&cEnable Reach Check" to run:
  789. set {reach} to true
  790. wait 5 ticks
  791. gui({_p})
  792. if {antiknockback} is true:
  793. format gui slot 5 of {_p} with diamond chestplate named "&cDisable AntiKnockback Check" to run:
  794. set {antiknockback} to false
  795. wait 5 ticks
  796. gui({_p})
  797. if {antiknockback} is false:
  798. format gui slot 5 of {_p} with diamond chestplate named "&cEnable AntKnockback Check" to run:
  799. set {antiknockback} to true
  800. wait 5 ticks
  801. gui({_p})
  802. if {chatcooldown} is true:
  803. format gui slot 6 of {_p} with paper named "&cDisable Chat Cooldown ({@chat_cooldown_seconds} Seconds)" to run:
  804. set {chatcooldown} to false
  805. wait 5 ticks
  806. gui({_p})
  807. if {chatcooldown} is false:
  808. format gui slot 6 of {_p} with paper named "&cEnable Chatcooldown ({@chat_cooldown_seconds} Seconds)" to run:
  809. set {chatcooldown} to true
  810. wait 5 ticks
  811. gui({_p})
  812. if {fastbow} is true:
  813. format gui slot 7 of {_p} with bow named "&cDisable FastBow Check" to run:
  814. set {fastbow} to false
  815. wait 5 ticks
  816. gui({_p})
  817. if {fastbow} is false:
  818. format gui slot 7 of {_p} with bow named "&cEnable FastBow Check" to run:
  819. set {FastBow} to true
  820. wait 5 ticks
  821. gui({_p})
  822. if {waterwalk} is true:
  823. format gui slot 8 of {_p} with water bucket named "&cDisable Waterwalk Check" to run:
  824. set {waterwalk} to false
  825. wait 5 ticks
  826. gui({_p})
  827. if {waterwalk} is false:
  828. format gui slot 8 of {_p} with water bucket named "&cEnable Waterwalk Check" to run:
  829. set {waterwalk} to true
  830. wait 5 ticks
  831. gui({_p})
  832. if {highjump} is true:
  833. format gui slot 9 of {_p} with slime block named "&cDisable High Jump Check" to run:
  834. set {highjump} to false
  835. wait 5 ticks
  836. gui({_p})
  837. if {highjump} is false:
  838. format gui slot 9 of {_p} with slime block named "&cEnable High Jump Check" to run:
  839. set {highjump} to true
  840. wait 5 ticks
  841. gui({_p})
  842. format gui slot 10 of {_p} with redstone dust named "&cEnable All Checks" to run:
  843. set {autoclicker} to true
  844. set {killaura} to true
  845. set {fly} to true
  846. set {speed} to true
  847. set {reach} to true
  848. set {antiknockback} to true
  849. set {chatcooldown} to true
  850. set {fastbow} to true
  851. set {waterwalk} to true
  852. set {highjump} to true
  853. wait 5 ticks
  854. gui({_p})
  855. format gui slot 11 of {_p} with glowstone dust named "&cDisable All Checks" to run:
  856. set {autoclicker} to false
  857. set {killaura} to false
  858. set {fly} to false
  859. set {speed} to false
  860. set {reach} to false
  861. set {antiknockback} to false
  862. set {chatcooldown} to false
  863. set {fastbow} to false
  864. set {waterwalk} to false
  865. set {highjump} to false
  866. gui({_p})
  867.  
  868. function xray(p: player):
  869. close {_p}'s inventory
  870. open virtual chest inventory with size 1 named "&cXRay Ores" to {_p}
  871. if {Coal::%{_p}%} is true:
  872. format gui slot 0 of {_p} with coal named "&8Disable Coal Alerts" to run:
  873. set {Coal::%{_p}%} to false
  874. wait 1 tick
  875. xray({_p})
  876. if {Coal::%{_p}%} is false:
  877. format gui slot 0 of {_p} with coal named "&8Enable Coal Alerts" to run:
  878. set {Coal::%{_p}%} to true
  879. wait 1 tick
  880. xray({_p})
  881. if {Iron::%{_p}%} is true:
  882. format gui slot 1 of {_p} with iron ingot named "&fDisable Iron Alerts" to run:
  883. set {Iron::%{_p}%} to false
  884. wait 1 tick
  885. xray({_p})
  886. if {Iron::%{_p}%} is false:
  887. format gui slot 1 of {_p} with iron ingot named "&8Enable Iron Alerts" to run:
  888. set {Iron::%{_p}%} to true
  889. wait 1 tick
  890. xray({_p})
  891. if {Gold::%{_p}%} is true:
  892. format gui slot 2 of {_p} with gold ingot named "&6Disable Gold Alerts" to run:
  893. set {Gold::%{_p}%} to false
  894. wait 1 tick
  895. xray({_p})
  896. if {Gold::%{_p}%} is false:
  897. format gui slot 2 of {_p} with gold ingot named "&6Enable Gold Alerts" to run:
  898. set {Gold::%{_p}%} to true
  899. wait 1 tick
  900. xray({_p})
  901. if {Quartz::%{_p}%} is true:
  902. format gui slot 3 of {_p} with quartz named "&fDisable Quartz Alerts" to run:
  903. set {Quartz::%{_p}%} to false
  904. wait 1 tick
  905. xray({_p})
  906. if {Quartz::%{_p}%} is false:
  907. format gui slot 3 of {_p} with quartz named "&fEnable Quartz Alerts" to run:
  908. set {Quartz::%{_p}%} to true
  909. wait 1 tick
  910. xray({_p})
  911. if {Lapis::%{_p}%} is true:
  912. format gui slot 4 of {_p} with lapis lazuli named "&9Disable Lapis Alerts" to run:
  913. set {Luartz::%{_p}%} to false
  914. wait 1 tick
  915. xray({_p})
  916. if {Lapis::%{_p}%} is false:
  917. format gui slot 4 of {_p} with lapis lazuli named "&9Enable Lapis Alerts" to run:
  918. set {Lapis::%{_p}%} to true
  919. wait 1 tick
  920. xray({_p})
  921. if {Redstone::%{_p}%} is true:
  922. format gui slot 5 of {_p} with redstone named "&cDisable Redstone Alerts" to run:
  923. set {Redstone::%{_p}%} to false
  924. wait 1 tick
  925. xray({_p})
  926. if {Redstone::%{_p}%} is false:
  927. format gui slot 5 of {_p} with redstone named "&cEnable Redstone Alerts" to run:
  928. set {Redstone::%{_p}%} to true
  929. wait 1 tick
  930. xray({_p})
  931. if {Diamond::%{_p}%} is true:
  932. format gui slot 6 of {_p} with diamond named "&bDisable Diamond Alerts" to run:
  933. set {Diamond::%{_p}%} to false
  934. wait 1 tick
  935. xray({_p})
  936. if {Diamond::%{_p}%} is false:
  937. format gui slot 6 of {_p} with diamond named "&bEnable Diamond Alerts" to run:
  938. set {Diamond::%{_p}%} to true
  939. wait 1 tick
  940. xray({_p})
  941. if {Emerald::%{_p}%} is true:
  942. format gui slot 7 of {_p} with emerald named "&aDisable Emerald Alerts" to run:
  943. set {Emerald::%{_p}%} to false
  944. wait 1 tick
  945. xray({_p})
  946. if {Emerald::%{_p}%} is false:
  947. format gui slot 7 of {_p} with emerald named "&aEnable Emerald Alerts" to run:
  948. set {Emerald::%{_p}%} to true
  949. wait 1 tick
  950. xray({_p})
  951. if {Netherite::%{_p}%} is true:
  952. format gui slot 8 of {_p} with ancient debris named "&fDisable Ancient Debris Alerts" to run:
  953. set {Netherite::%{_p}%} to false
  954. wait 1 tick
  955. xray({_p})
  956. if {Netherite::%{_p}%} is false:
  957. format gui slot 8 of {_p} with ancient debris named "&fEnable Ancient Debris Alerts" to run:
  958. set {Netherite::%{_p}%} to true
  959. wait 1 tick
  960. xray({_p})
  961.  
  962. on mine of coal ore:
  963. if player does not have permission "hydra.bypass.xray.coal":
  964. xrayalert(player, "Coal")
  965.  
  966. on mine of iron ore:
  967. if player does not have permission "hydra.bypass.xray.iron":
  968. xrayalert(player, "Iron")
  969.  
  970. on mine of gold ore:
  971. if player does not have permission "hydra.bypass.xray.gold":
  972. xrayalert(player, "Gold")
  973.  
  974. on mine of quartz ore:
  975. if player does not have permission "hydra.bypass.xray.quartz":
  976. xrayalert(player, "Quartz")
  977.  
  978. on mine of lapis ore:
  979. if player does not have permission "hydra.bypass.xray.lapis":
  980. xrayalert(player, "Lapis")
  981.  
  982. on mine of redstone ore:
  983. if player does not have permission "hydra.bypass.xray.redstone":
  984. xrayalert(player, "Redstone")
  985.  
  986. on mine of diamond ore:
  987. if player does not have permission "hydra.bypass.xray.diamond":
  988. xrayalert(player, "Diamond")
  989.  
  990. on mine of emerald ore:
  991. if player does not have permission "hydra.bypass.xray.emerald":
  992. xrayalert(player, "Emerald")
  993.  
  994. on mine of ancient debris:
  995. if player does not have permission "hydra.bypass.xray.netherite":
  996. xrayalert(player, "Netherite")
  997.  
  998. on join:
  999. player has permission "hydra.xray":
  1000. if {Coal::%player%} is not set:
  1001. set {Coal::%player%} to true
  1002. if {Iron::%player%} is not set:
  1003. set {Iron::%player%} to true
  1004. if {Gold::%player%} is not set:
  1005. set {Gold::%player%} to true
  1006. if {Lapis::%player%} is not set:
  1007. set {Lapis::%player%} to true
  1008. if {Redstone::%player%} is not set:
  1009. set {Redstone::%player%} to true
  1010. if {Quartz::%player%} is not set:
  1011. set {Quartz::%player%} to true
  1012. if {Emerald::%player%} is not set:
  1013. set {Emerald::%player%} to true
  1014. if {Diamond::%player%} is not set:
  1015. set {Diamond::%player%} to true
  1016. if {Netherite::%player%} is not set:
  1017. set {Netherite::%player%} to true
  1018.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement