Advertisement
Guest User

AntiCheat Skript FlyA

a guest
Mar 29th, 2020
697
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.24 KB | None | 0 0
  1. on join:
  2. set {AntiCheat::%player%::alerte::*} to 0
  3. set {AntiCheat::%player%::vl.FlyA} to 0
  4.  
  5.  
  6.  
  7. command /AntiCheat [<text>]:
  8. aliases: ac
  9. trigger:
  10. if arg-1 is "alerte" or "alertes":
  11. if {AntiCheat::staff::alerte::*} contains player:
  12. remove player from {AntiCheat::staff::alerte::*}
  13. send "&8[&c!&8] &7Mode alerte: &cdésactivé" to player
  14. stop
  15. else:
  16. add player to {AntiCheat::staff::alerte::*}
  17. send "&8[&c!&8] &7Mode alerte: &aactivé" to player
  18. stop
  19.  
  20.  
  21. on anymove:
  22. if player's gamemode isn't adventure or survival:
  23. stop
  24. if player's flight mode is true:
  25. stop
  26.  
  27. set {_p1} to location 0.5 west 0.5 south of 0.65 below player
  28. set {_p2} to location 0.5 east 0.5 north of player's location
  29. loop blocks within {_p1} to {_p2}:
  30. if loop-block isn't air:
  31. set {AntiCheat::%player%::is.in.Air} to false
  32. exit loop
  33. else:
  34. set {AntiCheat::%player%::is.in.Air} to true
  35.  
  36.  
  37. set {_YDiff} to y-location of player - {AntiCheat::%player%::last.y}
  38. #send "&fState: &7%{AntiCheat::%player%::is.in.Air}% &8; &fYDiff: &7%{_YDiff}% &8; &fLastYDiff: &7%{AntiCheat::%player%::last.diffy}%" to player
  39.  
  40. if {AntiCheat::%player%::is.in.Air} is true:
  41. if "%{_YDiff}%" = "%{AntiCheat::%player%::last.diffy}%": # Je les ai mit en texte pour éviter des erreurs
  42. add 1 to {AntiCheat::%player%::vl.FlyA}
  43. if {AntiCheat::%player%::vl.FlyA} >= 2:
  44. Alerte(player, "Fly (A)", "&fState: &7%{AntiCheat::%player%::is.in.Air}% &8; &fYDiff: &7%{_YDiff}% &8; &fLastYDiff: &7%{AntiCheat::%player%::last.diffy}%")
  45. else:
  46. if {AntiCheat::%player%::vl.FlyA} >= 0.2:
  47. remove 0.2 from {AntiCheat::%player%::vl.FlyA}
  48. else:
  49. if {AntiCheat::%player%::vl.FlyA} >= 0.5:
  50. remove 0.5 from {AntiCheat::%player%::vl.FlyA}
  51.  
  52. set {AntiCheat::%player%::last.diffy} to {_YDiff}
  53. set {AntiCheat::%player%::last.y} to y-location of player
  54.  
  55.  
  56. #━━━━━━━━━━━━━━━━━━━━━━ Alerte ━━━━━━━━━━━━━━━━━━━━━━#
  57. function Alerte(p: player, cheat: text, info: text):
  58. add 1 to {AntiCheat::%{_p}%::alerte::%{_cheat}%}
  59. send "&8[&c!&8] &f%{_p}% &7utilise un &f%{_cheat}% &c(%{AntiCheat::%{_p}%::alerte::%{_cheat}%}%) &8[%{_info}%&8]" to {AntiCheat::staff::alerte::*}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement