Cool_Colton

Anticheat

Jul 22nd, 2020
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.52 KB | None | 0 0
  1. every 3 seconds in world "world":
  2. loop all players:
  3. if {%loop-player%.bypass} is false:
  4. set {_x} to loop-player's x coord
  5. set {_y} to loop-player's y coord
  6. set {_z} to loop-player's z coord
  7. set {_coords} to "%{_x}% %{_y}% %{_z}%"
  8. if {_coords} is not "-780.525 63 1318.886":
  9. if {_coords} is not "-782.489 59 1377.511":
  10. if {_coords} is not "-780.584 59 1355.633":
  11. if {_coords} is not "-687.580 63 1400.916":
  12. if {_coords} is not "-833.1 65 1364.628":
  13. if {_coords} is not "-780.525 63 1318.886":
  14. if {_coords} is not "-737.519 63 1325.272":
  15. if {_coords} is not "-688.086 63 1326.857":
  16. if {_coords} is not "-772.659 59 1425.845":
  17. set {_doing::tutorial} to true
  18. if {_doing::tutorial} is not set:
  19. if loop-player is not flying:
  20. set {_player} to loop-player
  21. #Z movement
  22. set {_%loop-player%.z2} to loop-player's z-coord
  23. set {%loop-player%.z.move} to ({_%loop-player%.z2} - {%loop-player%.z})
  24. set {%loop-player%.z} to loop-player's z-coord
  25.  
  26. #X movement
  27. set {_%loop-player%.x2} to loop-player's x-coord
  28. set {%loop-player%.x.move} to ({_%loop-player%.x2} - {%loop-player%.x})
  29. set {%loop-player%.x} to loop-player's x-coord
  30.  
  31. #Combine
  32. if {%loop-player%.z.move} is more than 0:
  33. if {%loop-player%.x.move} is more than 0:
  34. set {%loop-player%.move} to {%loop-player%.z.move} + {%loop-player%.x.move}
  35. if {%loop-player%.x.move} is less than 0:
  36. set {%loop-player%.move} to {%loop-player%.z.move} - {%loop-player%.x.move}
  37. if {%loop-player%.z.move} is less than 0:
  38. if {%loop-player%.x.move} is more than 0:
  39. set {%loop-player%.move} to {%loop-player%.x.move} - {%loop-player%.z.move}
  40. if {%loop-player%.x.move} is less than 0:
  41. set {%loop-player%.z.move} to {%loop-player%.z.move} * -1
  42. set {%loop-player%.move} to {%loop-player%.z.move} - {%loop-player%.x.move}
  43. if {%loop-player%.move.2} is the same as {%loop-player%.move}:
  44. set {%loop-player%.move} to 0
  45. set {%loop-player%.move.2} to {%loop-player%.move}
  46. if loop-player is swimming:
  47. else:
  48. if loop-player has speed:
  49. else:
  50.  
  51. #Cheat check
  52. if {%loop-player%.x.move} is less than 6:
  53. if {%loop-player%.x.move} is more than 0:
  54. if {%loop-player%.move} is more than 27:
  55. set {_player} to loop-player
  56. add 1 to {%loop-player%.illegal.move}
  57. if {%loop-player%.illegal.move} is more than 1:
  58. loop all players:
  59. if {%loop-player-2%.anticheat.message} is true:
  60. send "&eSpeed (by ztimhirsch)&7- %{_player}% &clikely has speed! &3Moved %{%loop-player-1%.move}% blocks in 1 second" to loop-player-2
  61. if {%loop-player%.illegal.move} is more than 4:
  62. execute console command "/tempban %loop-player% 30 -s DoggoCheat: You have been caught using speed hacks"
  63. set {%loop-player%.illegal.move} to 0
  64. set {%loop-player%.move} to 0
  65. wait 20 seconds
  66. remove 1 from {%loop-player%.illegal.move}
  67.  
  68.  
  69. if {%loop-player%.move} is less than -27:
  70. set {_player} to loop-player
  71. add 1 to {%loop-player%.illegal.move}
  72. if {%loop-player%.illegal.move} is more than 1:
  73. loop all players:
  74. if {%loop-player-2%.anticheat.message} is true:
  75. send "&eSpeed (by ztimhirsch)&7- %{_player}% &clikely has speed! &3Moved %{%loop-player-1%.move}% blocks in 3 seconds" to loop-player-2
  76. if {%loop-player%.illegal.move} is more than 4:
  77. execute console command "/tempban %loop-player% 30 -s DoggoCheat: You have been caught using speed hacks"
  78. wait 20 seconds
  79. remove 1 from {%loop-player%.illegal.move}
  80.  
  81. if {%loop-player%.x.move} is more than -6:
  82. if {%loop-player%.x.move} is less than 0:
  83. if {%loop-player%.move} is more than 27:
  84. set {_player} to loop-player
  85. add 1 to {%loop-player%.illegal.move}
  86. if {%loop-player%.illegal.move} is more than 1:
  87. loop all players:
  88. if {%loop-player-2%.anticheat.message} is true:
  89. send "&eSpeed (by ztimhirsch)&7- %{_player}% &clikely has speed! &3Moved %{%loop-player-1%.move}% blocks in 3 seconds" to loop-player-2
  90. if {%loop-player%.illegal.move} is more than 4:
  91. execute console command "/tempban %loop-player% 30 -s DoggoCheat: You have been caught using speed hacks"
  92. wait 20 seconds
  93. remove 1 from {%loop-player%.illegal.move}
  94.  
  95. if {%loop-player%.move} is less than -27:
  96. set {_player} to loop-player
  97. add 1 to {%loop-player%.illegal.move}
  98. if {%loop-player%.illegal.move} is more than 1:
  99. loop all players:
  100. if {%loop-player-2%.anticheat.message} is true:
  101. send "&eSpeed (by ztimhirsch)&7- %{_player}% &clikely has speed! &3Moved %{%loop-player-1%.move}% blocks in 3 seconds" to loop-player-2
  102. if {%loop-player%.illegal.move} is more than 4:
  103. execute console command "/tempban %loop-player% 30 DoggoCheat: You have been caught using speed hacks"
  104. wait 20 seconds
  105. remove 1 from {%loop-player%.illegal.move}
  106.  
  107. #Secondary Cheat Check
  108. if {%loop-player%.move} is more than 32.1:
  109. set {_player} to loop-player
  110. add 1 to {%loop-player%.illegal.move}
  111. if {%loop-player%.illegal.move} is more than 1:
  112. loop all players:
  113. if {%loop-player-2%.anticheat.message} is true:
  114. send "&eSpeed (by ztimhirsch)&7- %{_player}% &clikely has speed! &3Moved %{%loop-player-1%.move}% blocks in 3 seconds" to loop-player-2
  115. if {%loop-player%.illegal.move} is more than 4:
  116. execute console command "/tempban %loop-player% 30 DoggoCheat: You have been caught using speed hacks"
  117. wait 20 seconds
  118. remove 1 from {%loop-player%.illegal.move}
  119.  
  120.  
  121. #Reach anticheat
  122.  
  123. on damage:
  124. attacker is a player
  125. victim is a player
  126. damage was caused by projectile:
  127. else:
  128. set {_attacker} to location of attacker
  129. set {_victim} to location of victim
  130. set {_distance} to the distance between {_victim} and {_attacker}
  131. if {_distance} is more than 4:
  132. add 1 to {%attacker%.illegal.reach}
  133. if {%attacker%.illegal.reach} is more than 8:
  134. execute console command "/tempban %attacker% 30 DoggoCheat: You have been caught using reach hacks"
  135. if {%attacker%.illegal.reach} is more than 3:
  136. loop all players:
  137. if {%loop-player%.anticheat.message} is true:
  138. send "&eReach (by ztimhirsch)&7- %attacker% &clikely has reach! &3Hit from %{_distance}% blocks away (Normal is 4 MAX)" to loop-player
  139. wait 20 seconds
  140. remove 1 from {%attacker%.illegal.reach}
  141.  
  142.  
  143. on left click:
  144. add 1 to {%player's uuid%::clicks}
  145. if {%player's uuid%::clicks} is more than 25:
  146. if {%player's uuid%::announce::autoclicker} is not set:
  147. loop all players:
  148. if loop-player has permission "Click.Notify":
  149. send "%player% may be using autoclicker! Clicked 25 times in 1 second" to loop-player
  150. set {%player's uuid%::announce::autoclicker} to true
  151. wait 1 second
  152. delete {%player's uuid%::announce::autoclicker}
  153. add 1 to {%player's uuid%::illegalclicks}
  154. if {%player's uuid%::illegalclicks} is more than 3:
  155. execute console command "/tempban %player% 30 &aDoggoCheat&7: You have been banned for using a autoclicker!"
  156. wait 6 seconds
  157. remove 1 from {%player's uuid%::illegalclicks}
  158. wait 1 second
  159. remove 1 from {%player's uuid%::clicks}
  160.  
  161.  
  162. #COMMANDSSSSS
  163.  
  164. on respawn:
  165. set {%player%.x} to 0
  166. set {%player%.x2} to 0
  167. set {%player%.z} to 0
  168. set {%player%.z2} to 0
  169.  
  170.  
  171. command /sendanticheat:
  172. permission: anticheat.messages
  173. trigger:
  174. if {%player%.anticheat.message} is not set:
  175. set {%player%.anticheat.message} to true
  176. send "Enabled anticheat messages"
  177. else if {%player%.anticheat.message} is false:
  178. set {%player%.anticheat.message} to true
  179. send "Enabled anticheat messages"
  180. else if {%player%.anticheat.message} is true:
  181. set {%player%.anticheat.message} to false
  182. send "Disabled anticheat messages"
  183.  
  184. command /bypass <player>:
  185. permission: bypass.anticheat
  186. trigger:
  187. if {hasrank.%player's uuid%} is true:
  188. send "hi"
  189. if {%arg 1%.bypass} is true:
  190. set {%arg 1%.bypass} to false
  191. send "I have removed %arg 1%'s bypass"
  192. else:
  193. set {%arg 1%.bypass} to true
  194. send "I have given %arg 1% bypass"
  195.  
  196. on join:
  197. if {%player%.bypass} is not set:
  198. set {%player%.bypass} to false
  199. set {%player%.send} to true
Add Comment
Please, Sign In to add comment