Skript AntiCheat Speed Help

Discussion in 'Skript' started by dj777, May 5, 2020.

Thread Status:
Not open for further replies.
  1. Ok, so about yesterday I decided to make a anticheat for my server. The first check I coded was a speed check. However, when I sprint up stairs, I get a false flag. Here are some screenshots: Here is my code
    Code (Text):

    on connect:
       set {speed.currenthax.%player%} to 0
    on any movement:
       set {speed.setback.%player%} to location of player
       send {speed.setback.%player%}
       wait 3 ticks
       set {speed.current.%player%} to location of player
       if distance between {speed.setback.%player%} and {speed.current.%player%} > 0.75:
           if block is not air:
               if block under player is not air:
                   if player is not flying:
                       add 1 to {speed.currenthax.%player%}
                       teleport player to {speed.setback.%player%}
                       send "§8[§3NolHax§8] §4%player% §ffailed Speed §8(§6%{speed.currenthax.%player%}%§8/§68§8)"
                       if {speed.currenthax.%player%} is 8:
                           kick player due to "§8[§3NolHax§8] §fYou were kicked!%newline%Reason: §4Speed!"
    Please help. Thank you!
  2. you're overusing global variables like crazy, this won't be of good performance at all
    on any move isn't the way to detect speedhack also

    I recommend to not make anticheat if you don't know how to do it, you've done nearly every mistake possible in this script
    • Agree Agree x 1
  3. I wouldn't make an anti-cheat using Script. If you want to make an anti-cheat learn Java and make a plugin.
    • Agree Agree x 2
  4. Ok, I'll start learning java thanks for the advice I know some java know just to make an anticheat. Thanks.
Thread Status:
Not open for further replies.