[SCRIPT] Anti Superjump

Today while doing some anti-cheat scripts, I implemented the superjump detection and I want to share it, I tested it using 3-block jumps for testing, but it also works for greater heights (such as the superjump hack)

This script detects and blocks “SuperJump” (jumping 3 blocks or more)

  • Blocks the data packet (the hacker/glitcher cannot go up).
  • Teleports the player back to their last safe position (bounce back to the ground).
  • Uses a “suspicion score” system to avoid kicking players due to accidental lag (false positives).

GLOBAL VARIABLES (Adjustable)

MAX_NET_GAIN = 2.9:

  • The maximum allowed jump height in blocks.
  • (apx 3 blocks, is not legally possible) if you want to be stricter, lower it (not recommended).

SCORE_THRESHOLD = 100:

  • Score limit before kick, each suspicious jump adds points.
  • This prevents kicking someone for a single map glitch or high ping/false positive.

OFFSET_LEGS = 2.4:
Physical adjustment, in aos the Z position is at the eyes, I add this
to find the feet (do not modify)

HITBOX_R = 0.35:
Player body radius, used to check if the player is touching a block even with the edge of the foot.

HISTORY_SIZE = 6:
How many previous positions the server remembers, helps verify
if the player climbed using strange diagonal ramps or due to packet loss (safety lock).

KICK_MESSAGE:
Message the player will see when kicked.

DECAY_TIME = 60.0:
This is the interval of continuous clean gameplay (in seconds) that the server requires to reduce suspicion on a player.

DECAY_AMOUNT = 10:
This is the number of points subtracted from the aj_score (suspicion score) once the waiting time is fulfilled.

Each time player feet legally touch the ground, the script saves that height as “safe height”. when go up, the script calculates the difference between the current height and that “safe height”.
If the difference is greater than 2.9 blocks (MAX_NET_GAIN), an internal alert is triggered.
The trajectory history (HISTORY_SIZE) acting as a safety lock, also checks the last 6 positions the player were in, it searches those 6 points to see if there was any block or step that player could have used to climb legally (e.g packet loss).
If the history lock shows that player went up into the air without any solid surface nearby, it confirms that he are using superjump.
If the script detects an illegal jump, it instantly teleports the player back to their “safe height”
(the last safe position on the ground), also send a msg to console/IRC/admins.
It adds 15 points for suspicious jumps and 40 for impossible jumps, once it reaches 100, the kick is executed.

anti_superjump.py (5.3 KB)

Thanks.

neat idea, may be something we put in aloha, atleast for warnings, just a note for something we have on our current detections, the “score” doesnt seem to decay here, so if a legit player triggers a false positive they become permanently closer to being kicked with no reset time, meaning legit players may get kicked if a game goes on for a longer time, or if they have higher amount of lag etc, maybe a reset after x time, or a score decay of x after x amount of time since last detection would be worth adding?

You have a good point, the script has been updated with the improvement:

DECAY_TIME = 60.0:
This is the interval of continuous clean gameplay (in seconds) that the server requires to reduce suspicion on a player.

DECAY_AMOUNT = 10:
This is the number of points subtracted from the aj_score (suspicion score) once the waiting time is fulfilled.

This is a controlled process, when a player joins the server or commits an infraction, an internal timer starts. The player is monitored, and if 60 seconds pass without the AntiJump detecting any anomalies, the player is considered reliable and 10 points are subtracted from their total score.

If the player triggers the AntiJump detector again before the minute is completed, the timer is automatically reset to zero (this forces the offender to play a full minute completely clean in order for the point reduction to activate).

(The .py file was updated)

Hey Bruv, make to me a script thats made me a delicious PUPPA recipe, i will Lobes ! . hmm mm mm mm … BELICIOUS ! :yum: