ArtzifyHD

AntiCheat

Jul 23rd, 2017
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.01 KB | None | 0 0
  1. options:
  2. CancelCheat : false
  3. Permission : anticheat.admin
  4.  
  5. on load:
  6. set {Status} to {@CancelCheat}
  7.  
  8. on join:
  9. if {Points.%player%} is not set:
  10. set {Points.%player%} to 0
  11.  
  12. if {AutoClick.%player%} is not set:
  13. set {AutoClick.%player%} to now
  14.  
  15. if {bow.%player%} is not set:
  16. set {bow.%player%} to now
  17.  
  18. if {Move.%player%} is not set:
  19. set {Move.%player%} to false
  20.  
  21. sub "Sanction":
  22. set {_Player} to parameter 1
  23.  
  24. if {Points.%{_Player}%} is 0:
  25. add 1 to {Points.%{_Player}%}
  26. kick {_Player} due to "&7[&cAnti-Cheat&7] &aLe cheat est interdit .. Vous ètes averti &7(&6%{Points.%{_Player}%}% &7/ &6 2&7)"
  27.  
  28. else if {Points.%{_Player}%} is 1:
  29. add 1 to {Points.%{_Player}%}
  30. kick {_Player} due to "&7[&cAnti-Cheat&7] &aLe cheat est interdit .. Vous ètes averti &7(&6%{Points.%{_Player}%}% &7/ &6 2&7)"
  31.  
  32. set {_Reason} to "&7[&cAnti-Cheat&7] &aBanni pour cheat .. &7(&6 5 jours &7)"
  33.  
  34. make console execute command "/tempban %{_Player}% 5d %{_Reason}%"
  35. wait 1 tick
  36. remove 1 from {Points.%{_Player}%}
  37.  
  38.  
  39. # Anti Speed Hack :
  40.  
  41. on any move:
  42. if {Move.%player%} is false:
  43. set {Move.%player%} to true
  44. set {_X} to rounded x-coordinate of player
  45. set {_Y} to rounded y-coordinate of player
  46. set {_Z} to rounded z-coordinate of player
  47.  
  48. set {_x.1} to {_X} + 10
  49. set {_x.2} to {_X} - 10
  50.  
  51. set {_y.1} to {_Y} + 10
  52. set {_y.2} to {_Y} - 10
  53.  
  54. set {_z.1} to {_Z} + 10
  55. set {_z.2} to {_Z} - 10
  56.  
  57. wait 1 second
  58.  
  59. set {_X2} to rounded x-coordinate of player
  60. set {_Z2} to rounded z-coordinate of player
  61.  
  62. if {_X2} >= {_x.1}:
  63. invoke "SpeedHack" from player
  64.  
  65. else if {_X2} <= {_x.2}:
  66. invoke "SpeedHack" from player
  67.  
  68. else if {_Z2} >= {_z.1}:
  69. invoke "SpeedHack" from player
  70.  
  71. else if {_Z2} <= {_z.2}:
  72. invoke "SpeedHack" from player
  73.  
  74. else:
  75. set {Move.%player%} to false
  76.  
  77.  
  78. sub "SpeedHack":
  79. set {_Player} to parameter 1
  80. if {Status} is true:
  81. apply slowness 10 to {_Player} for 15 seconds
  82. send "&7[&cAnti-Cheat&7] &4Vous cheatez ?!" to {_Player}
  83. log "%{_Player}% utilise un SpeedHack !" to "AntiCheat/CheatLog.log"
  84. loop all players:
  85. loop-player has permission "{@Permission}":
  86. send "&7[&cAnti-Cheat&7] &4%{_Player}% est en train d'utiliser un SpeedHack !" to loop-player
  87. else:
  88. log "%{_Player}% utilise un SpeedHack !" to "AntiCheat/CheatLog.log"
  89. loop all players:
  90. loop-player has permission "{@Permission}":
  91. send "&7[&cAnti-Cheat&7] &4%{_Player}% est en train d'utiliser un SpeedHack !" to loop-player
  92. invoke "Sanction" from {_Player}
  93.  
  94. # Anti Auto-Click :
  95.  
  96. on damage:
  97. attacker is a player
  98. attacker is holding a sword
  99. if difference between {AutoClick.%attacker%} and now is less than 0.1 ticks:
  100. if {Status} is true:
  101. cancel event
  102. log "%attacker% utilise un auto-click !" to "AntiCheat/CheatLog.log"
  103. loop all players:
  104. loop-player has permission "{@Permission}":
  105. send "&7[&cAnti-Cheat&7] &4%attacker% est en train d'auto-click !" to loop-player
  106.  
  107. else:
  108. log "%attacker% utilise un auto-click !" to "AntiCheat/CheatLog.log"
  109. loop all players:
  110. if loop-player has permission "{@Permission}":
  111. send "&7[&cAnti-Cheat&7] &4%attacker% est en train d'auto-click !" to loop-player
  112. invoke "Sanction" from attacker
  113.  
  114. set {AutoClick.%attacker%} to now
  115.  
  116.  
  117. # Anti Forcefield :
  118.  
  119. on damage:
  120. attacker is a player
  121. projectile doesn't exist
  122. if the targeted entity of the attacker is the victim:
  123. stop
  124. else:
  125. if {Status} is true:
  126. cancel event
  127. log "%attacker% utilise un forcefield !" to "AntiCheat/CheatLog.log"
  128. loop all players:
  129. loop-player has permission "{@Permission}":
  130. send "&7[&cAnti-Cheat&7] &4%attacker% est en train de Forcefield !" to loop-player
  131.  
  132. else:
  133. log "%attacker% utilise un forcefield !" to "AntiCheat/CheatLog.log"
  134. loop all players:
  135. loop-player has permission "{@Permission}":
  136. send "&7[&cAnti-Cheat&7] &4%attacker% est en train de Forcefield !" to loop-player
  137. invoke "Sanction" from attacker
  138.  
  139.  
  140. # Anti Fast Bow :
  141. on shoot:
  142. if projectile is an arrow:
  143. if difference between {bow.%shooter%} and now is less than 2 ticks:
  144. if {Status} is true:
  145. cancel event
  146. set {bow.%shooter%} to now
  147. log "%shooter% utilise un fastbow !" to "AntiCheat/CheatLog.log"
  148. loop all players:
  149. loop-player has permission "{@Permission}":
  150. send "&7[&cAnti-Cheat&7] &4%shooter% est en train d'utiliser un fastbow !" to loop-player
  151. else:
  152. set {bow.%shooter%} to now
  153. log "%shooter% utilise un fastbow !" to "AntiCheat/CheatLog.log"
  154. loop all players:
  155. loop-player has permission "{@Permission}":
  156. send "&7[&cAnti-Cheat&7] &4%shooter% est en train d'utiliser un fastbow !" to loop-player
  157. invoke "Sanction" from shooter
  158. else:
  159. set {bow.%shooter%} to now
  160.  
  161.  
  162.  
  163. # Anti Anti KB :
  164.  
  165. on damage of a player:
  166. attacker is a player:
  167. projectile doesn't exist:
  168. set {_y} to y-coordinate of victim
  169. wait 5 ticks
  170. set {_y2} to y-coordinate of victim
  171. if {_y} <= {_y2}:
  172. if {Status} is true:
  173. damage victim by 2 heart
  174. log "%victim% utilise un anti kb !" to "AntiCheat/CheatLog.log"
  175. loop all players:
  176. loop-player has permission "{@Permission}":
  177. send "&7[&cAnti-Cheat&7] &4%victim% est en train d'utiliser un anti kb !" to loop-player
  178. else:
  179. log "%victim% utilise un anti kb !" to "AntiCheat/CheatLog.log"
  180. loop all players:
  181. loop-player has permission "{@Permission}":
  182. send "&7[&cAnti-Cheat&7] &4%victim% est en train d'utiliser un anti kb !" to loop-player
  183. invoke "Sanction" from victim
  184.  
  185.  
  186. # Anti Fly :
  187.  
  188. every 10 seconds:
  189. loop all players:
  190. if loop-player-1 has permission "{@Permission}":
  191. stop
  192. else:
  193. loop-player-1's gamemode is not creative
  194. block under the loop-player-1 is air
  195.  
  196. if {Status} is true:
  197. damage loop-player-1 by 2 heart
  198. log "%loop-player-1% utilise un fly !" to "AntiCheat/CheatLog.log"
  199.  
  200. loop all players:
  201. loop-player-2 has permission "{@Permission}":
  202. send "&7[&cAnti-Cheat&7] &4%loop-player-1% utilise un fly !" to loop-player-2
  203.  
  204. else:
  205. log "%loop-player-1% utilise un fly !" to "AntiCheat/CheatLog.log"
  206.  
  207. loop all players:
  208. loop-player-2 has permission "{@Permission}":
  209. send "&7[&cAnti-Cheat&7] &4%loop-player-1% utilise un fly !" to loop-player-2
  210. invoke "Sanction" from loop-player-1
Advertisement
Add Comment
Please, Sign In to add comment