Guest User

Safebot

a guest
Sep 17th, 2020
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.84 KB | None | 0 0
  1. on load:
  2. loop all players:
  3. if loop-player has permission "op":
  4. send "&8(&b!&8)&aSafeBot&8(&b!&8) &2is now enabled &6(v1.1)" to loop-player
  5.  
  6. on unload:
  7. loop all players:
  8. if loop-player has permission "op":
  9. send "&8(&b!&8)&aSafeBot&8(&b!&8) &4is now disabled &6(v1.1)" to loop-player
  10.  
  11. every 4 seconds:
  12. set {check} to true
  13. wait 1 second
  14. set {check} to false
  15. loop all players:
  16. delete {click.%loop-player%}
  17. on left click:
  18. {check} is true
  19. add 1 to {click.%player%}
  20. {click.%player%} > 20000
  21. kick the player due to "&8(&b!&8)&aSafeBot&8(&b!&8)&c : %{click.%player%}% cps"
  22. on join:
  23. clear {click.%player%}
  24. on shoot:
  25. if projectile is an arrow:
  26. if difference between {shoot.%shooter%} and now is less than 2 ticks:
  27. add 1 to {fastbow.%shooter%}
  28. if {fastbow.%shooter%} is greater than 5:
  29. kick shooter due to "&8(&b!&8)&aSafeBot&8(&b!&8)&c : FastBow"
  30. set {shoot.%shooter%} to now
  31. wait 5 seconds
  32. clear {fastbow.%shooter%}
  33. stop
  34. set {shoot.%shooter%} to now
  35. on join:
  36. clear {fastbow.%player%}
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47. every 3 seconds:
  48. loop all players:
  49. loop-player is not flying
  50. loop-player's gamemode is not creative
  51. set {y.%loop-player%} to the y location of loop-player
  52. wait 1 seconds
  53. set {y2.%loop-player%} to the y location of loop-player
  54. wait 1 ticks
  55. if difference between {y.%loop-player%} and {y2.%loop-player%} is greater than 5:
  56. loop all players:
  57. loop-player-2 is op:
  58. send "&8(&b!&8)&aSafeBot&8(&b!&8)&0: &c%loop-player-1% flagged speed/flight check" to loop-player-2
  59. every 3 seconds:
  60. loop all players:
  61. loop-player is not flying
  62. loop-player's gamemode is not creative
  63. set {z.%loop-player%} to the z location of loop-player
  64. wait 1 seconds
  65. set {z2.%loop-player%} to the z location of loop-player
  66. wait 1 ticks
  67. if difference between {z.%loop-player%} and {z2.%loop-player%} is greater than 8:
  68. loop all players:
  69. loop-player-2 is op:
  70. send "&8(&b!&8)&aSafeBot&8(&b!&8)&0: &c%loop-player-1% flagged speed/flight check" to loop-player-2
  71. every 3 seconds:
  72. loop all players:
  73. loop-player is not flying
  74. loop-player's gamemode is not creative
  75. set {x.%loop-player%} to the x location of loop-player
  76. wait 1 seconds
  77. set {x2.%loop-player%} to the x location of loop-player
  78. wait 1 ticks
  79. if difference between {x.%loop-player%} and {x2.%loop-player%} is greater than 8:
  80. loop all players:
  81. loop-player-2 is op:
  82. send "&8(&b!&8)&aSafeBot&8(&b!&8)&0: &c%loop-player-1% flagged speed/flight check" to loop-player-2
  83. on flight toggle:
  84. if player's gamemode is not creative:
  85. loop all players:
  86. loop-player is op:
  87. send "&8(&b!&8)&aSafeBot&8(&b!&8)&0: &c%loop-player-1% flagged speed/flight check" to loop-player
  88. every 1.5 second:
  89. clear {_blockbelow}
  90. clear {_alerte2}
  91. clear {_alerte}
  92. clear {_arround}
  93. clear {_loopair}
  94. clear {_below}
  95. loop all players:
  96. loop-player's gamemode is not creative
  97. set {_blockbelow} to the block below loop-player
  98. while {_blockbelow} is air :
  99. set {_blockbelow} to the block below {_blockbelow}
  100. add 1 to {_alerte}
  101. wait 1 second
  102. set {_blockbelow} to the block below loop-player
  103. while {_blockbelow} is air :
  104. set {_blockbelow} to the block below {_blockbelow}
  105. add 1 to {_alerte2}
  106. if block west below loop-player is not air :
  107. add 1 to {_below}
  108. if block north below loop-player is not air :
  109. add 1 to {_below}
  110. if block south below loop-player is not air :
  111. add 1 to {_below}
  112. if block east below loop-player is not air :
  113. add 1 to {_below}
  114. if block south loop-player is not air :
  115. add 1 to {_arround}
  116. if block north loop-player is not air :
  117. add 1 to {_arround}
  118. if block west loop-player is not air :
  119. add 1 to {_arround}
  120. if block east loop-player is not air :
  121. add 1 to {_arround}
  122. if block below loop-player is not air:
  123. add 1 to {_arround}
  124. loop blocks in radius 2 around the loop-player:
  125. loop-block is air:
  126. add 1 to {_loopair}
  127. if {_alerte2} >= {_alerte}:
  128. {_alerte} > 6
  129. if {_below} is not set :
  130. loop all players:
  131. loop-player-2 is op:
  132. send "&8(&b!&8)&aSafeBot&8(&b!&8)&0: &c%loop-player-1% flagged flight check" to loop-player-2
  133. if {_arround} is not set:
  134. loop all players:
  135. loop-player-2 is op:
  136. send "&8(&b!&8)&aSafeBot&8(&b!&8)&0: &c%loop-player-1% flagged flight check" to loop-player-2
  137. if {_loopair} > 34:
  138. loop all players:
  139. loop-player-2 is op:
  140. send "&8(&b!&8)&aSafeBot&8(&b!&8)&0: &c%loop-player-1% flagged flight check" to loop-player-2
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149. on damage:
  150. if attacker is a player:
  151. if victim is a player:
  152. attacker's gamemode is not creative
  153. set {_distance} to distance between attacker and victim
  154. if {_distance} > 4:
  155. set {_ping} to attacker's ping
  156. if damage cause is not a projectile:
  157. loop all players:
  158. loop-player is op:
  159. send "&8(&b!&8)&aSafeBot&8(&b!&8) &c%attacker% &9seems to have reach of &c(%{_distance}%) &6Ping: %{_ping}%" to loop-player
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167. on walk on water:
  168. player's gamemode is not creative
  169. player is not riding
  170. player is not sneaking
  171. if block below player is water:
  172. if block south below player is water:
  173. if block north below player is water:
  174. if block west below player is water:
  175. if block east below player is water:
  176. if block south player is air:
  177. if block north player is air:
  178. if block west player is air:
  179. block east player is air
  180. add 2 to {Alerte.Jesus.%player%}
  181. if {Alerte.Jesus.%player%} > 25:
  182. loop all players:
  183. loop-player is op:
  184. send "&8(&b!&8)&aSafeBot&8(&b!&8) &f%player% &cis hacking: &fWaterWalk/Jesus &4(%{Alerte.Jesus.%player%}% alerts)"
  185. stop
  186. if {Alerte.Jesus.%player%} > 19:
  187. loop all players:
  188. loop-player is op:
  189. send "&8(&b!&8)&aSafeBot&8(&b!&8) &f%player% &cis hacking: &fWaterWalk/Jesus &c(%{Alerte.Jesus.%player%}% alerts)"
  190. stop
  191. if {Alerte.Jesus.%player%} > 14:
  192. loop all players:
  193. loop-player is op:
  194. send "&8(&b!&8)&aSafeBot&8(&b!&8) &f%player% &cis hacking: &fWaterWalk/Jesus &6(%{Alerte.Jesus.%player%}% alerts)"
  195.  
  196.  
  197. command /clearjesus:
  198. trigger:
  199. clear {Alerte.Jesus.%player%}
  200. on any move:
  201. if player's gamemode is not creative:
  202. if player is sneaking:
  203. stop
  204. else:
  205. if block below player is water:
  206. if block south below player is water:
  207. if block north below player is water:
  208. if block west below player is water:
  209. if block east below player is water:
  210. if block south player is air:
  211. if block north player is air:
  212. if block west player is air:
  213. block east player is air
  214. add 1 to {Alerte.Jesus.%player%}
  215. if {Alerte.Jesus.%player%} > 25:
  216. loop all players:
  217. loop-player is op:
  218. send "&8(&b!&8)&aSafeBot&8(&b!&8) &f%player% &cis hacking: &fWaterWalk/Jesus &4(%{Alerte.Jesus.%player%}% alerts)"
  219. stop
  220. if {Alerte.Jesus.%player%} > 19:
  221. loop all players:
  222. loop-player is op:
  223. send "&8(&b!&8)&aSafeBot&8(&b!&8) &f%player% &cis hacking: &fWaterWalk/Jesus &c(%{Alerte.Jesus.%player%}% alerts)"
  224. stop
  225. if {Alerte.Jesus.%player%} > 14:
  226. loop all players:
  227. loop-player is op:
  228. send "&8(&b!&8)&aSafeBot&8(&b!&8) &f%player% &cis hacking: &fWaterWalk/Jesus &6(%{Alerte.Jesus.%player%}% alerts)"
  229. every 1 second:
  230. loop all players:
  231. clear {Alerte.Jesus.%loop-player%}
  232. on jump:
  233. if block below player is water:
  234. if block south below player is water:
  235. if block north below player is water:
  236. if block west below player is water:
  237. if block east below player is water:
  238. if block south player is air:
  239. if block north player is air:
  240. if block west player is air:
  241. block east player is air
  242. add 3 to {Alerte.Jesus.%player%}
  243. if {Alerte.Jesus.%player%} > 25:
  244. loop all players:
  245. loop-player is op:
  246. send "&8(&b!&8)&aSafeBot&8(&b!&8) &f%player% &cis hacking: &fWaterWalk/Jesus &4(%{Alerte.Jesus.%player%}% alerts)"
  247. stop
  248. if {Alerte.Jesus.%player%} > 19:
  249. loop all players:
  250. loop-player is op:
  251. send "&8(&b!&8)&aSafeBot&8(&b!&8) &f%player% &cis hacking: &fWaterWalk/Jesus &c(%{Alerte.Jesus.%player%}% alerts)"
  252. stop
  253. if {Alerte.Jesus.%player%} > 14:
  254. loop all players:
  255. loop-player is op:
  256. send "&8(&b!&8)&aSafeBot&8(&b!&8) &f%player% &cis hacking: &fWaterWalk/Jesus &6(%{Alerte.Jesus.%player%}% alerts)"
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269. on damage:
  270. victim is a player
  271. block at victim is not cobweb
  272. victim is not riding
  273. damage wasn't caused by lava, fire, burning, fall, poison or wither
  274. victim doesn't have poison
  275. victim doesn't have wither
  276. victim isn't burning
  277. if victim's ping < 100:
  278. set {location1.%victim%} to victim's location
  279. wait 5 ticks
  280. set {location2.%victim%} to victim's location
  281. if {location1.%victim%} = {location2.%victim%}:
  282. loop all players:
  283. loop-player has permission "op":
  284. message "&8(&b!&8)&aSafeBot&8(&b!&8) &f%victim% &cis hacking: &fAntiKnockBack &6(%ping of victim% ms)" to loop-player
  285. on damage:
  286. if {kb.test.%victim%} is true:
  287. damage was caused by fall
  288. cancel event
  289. command /kb [<player>]:
  290. permission: op
  291. permission message: &cTu ne peux pas executer de test de KnockBack
  292. aliases: /knockbacktest, /kbtest, /antiKnockback, /antikb
  293. Usage: &c/kb [<player>]
  294. trigger:
  295. if arg 1 is not set:
  296. message "&cUsage: /kb [<player>]"
  297. stop
  298. if arg 1 is set:
  299. set {location1.check.%arg 1%} to argument-player's location
  300. set {kb.test.%argument-player%} to true
  301. push the argument-player upwards at speed 2
  302. wait 5 ticks
  303. set {location2.check.%arg 1%} to argument-player's location
  304. if {location1.check.%arg 1%} = {location2.check.%arg 1%}:
  305. send "&8(&b!&8)&aSafeBot&8(&b!&8) &f%argument-player% &cis hacking: &fAntiKnockBack &4{Check} &6(%argument-player's ping% ms)" to sender
  306. else:
  307. send "&8(&b!&8)&aSafeBot&8(&b!&8) &f%argument-player% &ais not hacking: &fAntiKnockBack &4{Check} &6(%argument-player's ping% ms)" to sender
  308. wait 4 seconds
  309. set {kb.test.%argument-player%} to false
  310. on quit:
  311. clear {location1.%player%}
  312. clear {location2.%player%}
  313.  
  314. on join:
  315. clear {location1.%player%}
  316. clear {location2.%player%}
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326. on any move:
  327. {time.%player%} is not set
  328. player's gamemode is Adventure or Survival
  329. player is on ground
  330. block at player is air
  331. block under player is air
  332. set {_nofallcount} to 0
  333. loop all blocks in radius 3 around player:
  334. if loop-block is stairs:
  335. stop
  336. if loop-block is slab:
  337. stop
  338. loop all blocks in radius 2 around player:
  339. if loop-block is not air:
  340. add 1 to {_nofallcount}
  341. if {_nofallcount} < 1:
  342. loop all players:
  343. loop-player is op:
  344. send "&8(&b!&8)&aSafeBot&8(&b!&8) %player% is hacking: &fNofall &9(V 1.1)"
  345. stop
  346. if {_nofallcount} > 0:
  347. stop
  348.  
  349. every 1 second:
  350. loop all players:
  351. loop-player's gamemode is Adventure or Survival
  352. loop-player is on ground
  353. block under loop-player is air
  354. set {_y} to loop-player's y-location
  355. wait 0.5 second
  356. loop-player is on ground
  357. set {_y2} to loop-player's y-location
  358. set {_yresult} to {_y} - {_y2}
  359. if {_yresult} > 1:
  360. loop all players:
  361. loop-player-2 is op:
  362. send "&8(&b!&8)&aSafeBot&8(&b!&8) %loop-player-1% is hacking: &fNofall &9(V 1.2)" to loop-player-2
  363.  
  364. on walk on slab:
  365. if {time.%player%} is not set:
  366. set {time.%player%} to true
  367. wait 2 seconds
  368. clear {time.%player%}
  369. on walk on stairs:
  370. if {time.%player%} is not set:
  371. set {time.%player%} to true
  372. wait 2 seconds
  373. clear {time.%player%}
  374. on break:
  375. if {time.%player%} is not set:
  376. set {time.%player%} to true
  377. wait 0.5 seconds
  378. clear {time.%player%}
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390. command /aimbot [<text>] [<player>]:
  391. permission : aimbot.create
  392. trigger:
  393. if arg 1 is not set :
  394. send "&c/aimbot invoke"
  395. send "&c/aimbot check [<player>]"
  396. stop
  397. if arg 1 is not "invoque" or "check":
  398. send "&c/aimbot invoke"
  399. send "&c/aimbot check [<player>]"
  400. stop
  401. if arg 1 is "invoque":
  402. loop all entities :
  403. "%uncoloured name of loop-entity%" is "AntiAimbot"
  404. send "&cAntiAimbot already invoked!"
  405. stop
  406. set {AntiAimbot.loc} to the player's location
  407. create a citizen named "AntiAimbot" at location of player
  408. set citizen 0 nametag invisible
  409. send "&cAntiAimbot invoke!"
  410. if arg 1 is "check" :
  411. if arg 2 is not set :
  412. send "&cAnd the target?"
  413. send "Usage: /aimbot check [<player>]"
  414. stop
  415. if arg 2 is set:
  416. if {InCheck} is set:
  417. send "&8(&b!&8)&aSafeBot&8(&b!&8) &cCheck in progress!"
  418. stop
  419. if sender is console:
  420. set {_sender} to console
  421. send "Automatic launch of the check aimbot" to console
  422. else:
  423. set {_sender} to sender
  424. send "Launch of the Aimbot checkbot by %{_sender}%"
  425. loop all entities :
  426. "%uncoloured name of loop-entity%" is "AntiAimbot"
  427. hide loop-entity to all players
  428. set {InCheck} to true
  429. teleport loop-entity 10 meters above arg 2
  430. wait 0.5 seconds
  431. teleport loop-entity 1 meters east arg 2
  432. wait 5 ticks
  433. reveal loop-entity to all players
  434. wait 2.5 ticks
  435. if target of arg 2 is loop-entity:
  436. add 1 to {_aimbotcheck}
  437. set {_aimbot1} to true
  438. wait 0.1 ticks
  439. hide loop-entity to all players
  440. teleport loop-entity 4.5 meters above arg 2
  441. wait 5 ticks
  442. reveal loop-entity to all players
  443. wait 5 ticks
  444. if target of arg 2 is loop-entity:
  445. add 1 to {_aimbotcheck}
  446. set {_aimbot2} to true
  447. wait 0.1 ticks
  448. hide loop-entity to all players
  449. teleport loop-entity 1.5 meter behind arg 2
  450. wait 5 ticks
  451. reveal loop-entity to all players
  452. wait 5 ticks
  453. if target of arg 2 is loop-entity:
  454. add 1 to {_aimbotcheck}
  455. set {_aimbot3} to true
  456. wait 0.1 ticks
  457. hide loop-entity to all players
  458. teleport loop-entity 1.5 meters west arg 2
  459. wait 5 ticks
  460. reveal loop-entity to all players
  461. wait 5 ticks
  462. if target of arg 2 is loop-entity:
  463. add 1 to {_aimbotcheck}
  464. set {_aimbot4} to true
  465. wait 0.1 tick
  466. if {_aimbot1} is not set:
  467. loop all players:
  468. loop-player has permission "Aimbot.view":
  469. send "&8(&b!&8)&aSafeBot&8(&b!&8) &6Aimbot &cBot 1 not watched &9(launched by %{_sender}%)" to loop-player
  470. else if {_aimbot1} is true:
  471. loop all players:
  472. loop-player has permission "Aimbot.view":
  473. send "&8(&b!&8)&aSafeBot&8(&b!&8) &6Aimbot &aBot 1 watched &9(launched by %{_sender}%)" to loop-player
  474. if {_aimbot2} is not set:
  475. loop all players:
  476. loop-player has permission "Aimbot.view":
  477. send "&8(&b!&8)&aSafeBot&8(&b!&8) &6Aimbot &cBot 2 not watched &9(launched by %{_sender}%)" to loop-player
  478. else if {_aimbot2} is true:
  479. loop all players:
  480. loop-player has permission "Aimbot.view":
  481. send "&8(&b!&8)&aSafeBot&8(&b!&8) &6Aimbot &aBot 2 watched &9(launched by %{_sender}%)" to loop-player
  482. if {_aimbot3} is not set:
  483. loop all players:
  484. loop-player has permission "Aimbot.view":
  485. send "&8(&b!&8)&aSafeBot&8(&b!&8) &6Aimbot &cBot 3 not watched &9(launched by %{_sender}%)" to loop-player
  486. else if {_aimbot3} is true:
  487. loop all players:
  488. loop-player has permission "Aimbot.view":
  489. send "&8(&b!&8)&aSafeBot&8(&b!&8) &6Aimbot &aBot 3 watched &9(launched by %{_sender}%)" to loop-player
  490. if {_aimbot4} is not set:
  491. loop all players:
  492. loop-player has permission "Aimbot.view":
  493. send "&8(&b!&8)&aSafeBot&8(&b!&8) &6Aimbot &cBot 4 not watched &9(launched by %{_sender}%)" to loop-player
  494. else if {_aimbot4} is true:
  495. loop all players:
  496. loop-player has permission "Aimbot.view":
  497. send "&8(&b!&8)&aSafeBot&8(&b!&8) &6Aimbot &aBot 4 watched &9(launched by %{_sender}%)" to loop-player
  498. wait 0.1 seconds
  499. teleport loop-entity to {AntiAimbot.loc}
  500. clear {InCheck}
Add Comment
Please, Sign In to add comment