Files
combat_tests.sk
config.sk
main.sk
misc_tests.sk
movement_tests.sk
render_tests.sk
results.sk
test_commands.sk
Code
8 1,136
movement_tests.sk
# AntiCheatTestSuite - Movement Hack Simulations
# ================================================
# === FLY TEST ===
function test_movement_fly(p: player):
send "{@prefix} {@highlight}=== FLIGHT TEST ===" to {_p}
send "{@prefix} {@info_color}Simulating survival flight..." to {_p}
send "{@prefix} {@info_color}Expected flag time: &e%{@flight_flag_time}% &7seconds" to {_p}
set {_test_id} to "fly_%random integer between 1000 and 9999%"
set {anticheat::results::%{_test_id}%::type} to "Movement"
set {anticheat::results::%{_test_id}%::name} to "Flight"
set {anticheat::results::%{_test_id}%::start} to now
set {_test_end} to add {_test_duration} seconds to now
# Simulate creative flight in survival mode
set {_p}'s allow flight to true
set {_p}'s flying to true
send "{@prefix} {@info_color}Flight enabled - waiting for anticheat to flag..." to {_p}
set {_flagged} to false
loop {_test_duration} times:
if now is after {_test_end}:
stop
sendActionBar {_p}: "&eFly Test: &f%loop-number%/%{_test_duration}%s" to {_p}
wait 1 second
set {_p}'s allow flight to false
set {_p}'s flying to false
set {anticheat::results::%{_test_id}%::end} to now
set {anticheat::results::%{_test_id}%::status} to "pending_review"
set {anticheat::results::%{_test_id}%::flag_time} to "%{@flight_flag_time}%"
send "{@prefix} {@pass_color}Flight test completed!" to {_p}
send "{@prefix} {@info_color}Test ID: &e%{_test_id}%" to {_p}
send "{@prefix} {@info_color}Check anticheat logs for flight flags within &e%{@flight_flag_time}%s" to {_p}
# === SPEED TEST ===
function test_movement_speed(p: player):
send "{@prefix} {@highlight}=== SPEED TEST ===" to {_p}
send "{@prefix} {@info_color}Simulating speed hack (&e%{@speed_test_multiplier}%x &7multiplier)..." to {_p}
send "{@prefix} {@info_color}Threshold: &e%{@speed_threshold}% &7blocks/s above vanilla" to {_p}
set {_test_id} to "speed_%random integer between 1000 and 9999%"
set {anticheat::results::%{_test_id}%::type} to "Movement"
set {anticheat::results::%{_test_id}%::name} to "Speed"
set {anticheat::results::%{_test_id}%::start} to now
set {_test_end} to add {_test_duration} seconds to now
# Apply speed effect to simulate
apply speed 2 to {_p} for {_test_duration} seconds
send "{@prefix} {@info_color}Speed II applied - running test..." to {_p}
loop {_test_duration} times:
if now is after {_test_end}:
stop
sendActionBar {_p}: "&eSpeed Test: &f%loop-number%/%{_test_duration}%s" to {_p}
wait 1 second
set {anticheat::results::%{_test_id}%::end} to now
set {anticheat::results::%{_test_id}%::status} to "pending_review"
set {anticheat::results::%{_test_id}%::multiplier} to "%{@speed_test_multiplier}%"
send "{@prefix} {@pass_color}Speed test completed!" to {_p}
send "{@prefix} {@info_color}Test ID: &e%{_test_id}%" to {_p}
# === NOFALL TEST ===
function test_movement_nofall(p: player):
send "{@prefix} {@highlight}=== NOFALL TEST ===" to {_p}
send "{@prefix} {@info_color}Simulating NoFall damage negation..." to {_p}
send "{@prefix} {@info_color}Expected flag rate: &e%{@nofall_flag_rate}%" to {_p}
set {_test_id} to "nofall_%random integer between 1000 and 9999%"
set {anticheat::results::%{_test_id}%::type} to "Movement"
set {anticheat::results::%{_test_id}%::name} to "NoFall"
set {anticheat::results::%{_test_id}%::start} to now
set {_test_end} to add {_test_duration} seconds to now
# Jump from height repeatedly
set {_anticheat::test_coords::%{_p}%} to location of {_p}
loop 5 times:
if now is after {_test_end}:
stop
set {_p}'s velocity to vector(0, 5, 0) # Launch upward
wait 3 ticks
sendActionBar {_p}: "&eNoFall: &fDrop %loop-number%/5" to {_p}
wait 1 second
set {anticheat::results::%{_test_id}%::end} to now
set {anticheat::results::%{_test_id}%::status} to "pending_review"
send "{@prefix} {@pass_color}NoFall test completed!" to {_p}
send "{@prefix} {@info_color}Test ID: &e%{_test_id}%" to {_p}
# === STEP TEST ===
function test_movement_step(p: player):
send "{@prefix} {@highlight}=== STEP TEST ===" to {_p}
send "{@prefix} {@info_color}Simulating step height hack..." to {_p}
send "{@prefix} {@info_color}Step height: &e%{@step_test_height}% &7blocks (threshold: %{@step_threshold}%&7)" to {_p}
set {_test_id} to "step_%random integer between 1000 and 9999%"
set {anticheat::results::%{_test_id}%::type} to "Movement"
set {anticheat::results::%{_test_id}%::name} to "Step"
set {anticheat::results::%{_test_id}%::start} to now
set {_test_end} to add {_test_duration} seconds to now
# Build a small step and walk over it
make console execute command "fill ~ ~ ~ ~ ~1 ~1 ~1 minecraft:stone"
make console execute command "fill ~1 ~ ~ ~2 ~1 ~1 minecraft:stone"
make console execute command "fill ~2 ~ ~ ~3 ~1 ~1 minecraft:stone"
send "{@prefix} {@info_color}Walk up the steps - anticheat should flag..." to {_p}
loop {_test_duration} times:
if now is after {_test_end}:
stop
sendActionBar {_p}: "&eStep Test: &f%loop-number%/%{_test_duration}%s" to {_p}
wait 1 second
set {anticheat::results::%{_test_id}%::end} to now
set {anticheat::results::%{_test_id}%::status} to "pending_review"
send "{@prefix} {@pass_color}Step test completed!" to {_p}
send "{@prefix} {@info_color}Test ID: &e%{_test_id}%" to {_p}
# === STRAFE TEST ===
function test_movement_strafe(p: player):
send "{@prefix} {@highlight}=== STRAFE TEST ===" to {_p}
send "{@prefix} {@info_color}Simulating air-strafe movement modifications..." to {_p}
set {_test_id} to "strafe_%random integer between 1000 and 9999%"
set {anticheat::results::%{_test_id}%::type} to "Movement"
set {anticheat::results::%{_test_id}%::name} to "Strafe"
set {anticheat::results::%{_test_id}%::start} to now
set {_test_end} to add {_test_duration} seconds to now
loop {_test_duration} times:
if now is after {_test_end}:
stop
sendActionBar {_p}: "&eStrafe Test: &f%loop-number%/%{_test_duration}%s" to {_p}
wait 1 second
set {anticheat::results::%{_test_id}%::end} to now
set {anticheat::results::%{_test_id}%::status} to "pending_review"
send "{@prefix} {@pass_color}Strafe test completed!" to {_p}
send "{@prefix} {@info_color}Test ID: &e%{_test_id}%" to {_p}
# === BLINK TEST ===
function test_movement_blink(p: player):
send "{@prefix} {@highlight}=== BLINK TEST ===" to {_p}
send "{@prefix} {@info_color}Simulating Blink (lag-switch / packet delay)..." to {_p}
set {_test_id} to "blink_%random integer between 1000 and 9999%"
set {anticheat::results::%{_test_id}%::type} to "Movement"
set {anticheat::results::%{_test_id}%::name} to "Blink"
set {anticheat::results::%{_test_id}%::start} to now
set {_test_end} to add {_test_duration} seconds to now
# Teleport around to simulate blink
set {_origin} to location of {_p}
loop 5 times:
if now is after {_test_end}:
stop
{_p} teleport {_origin} ~ add(~, vector(random integer between -10 and 10, 0, random integer between -10 and 10))
wait 2 ticks
{_p} teleport {_origin}
sendActionBar {_p}: "&eBlink: &fTeleport %loop-number%/5" to {_p}
wait 1 second
set {anticheat::results::%{_test_id}%::end} to now
set {anticheat::results::%{_test_id}%::status} to "pending_review"
send "{@prefix} {@pass_color}Blink test completed!" to {_p}
send "{@prefix} {@info_color}Test ID: &e%{_test_id}%" to {_p}
# === PHASE TEST ===
function test_movement_phase(p: player):
send "{@prefix} {@highlight}=== PHASE TEST ===" to {_p}
send "{@prefix} {@info_color}Simulating phase/wall-clip behavior..." to {_p}
set {_test_id} to "phase_%random integer between 1000 and 9999%"
set {anticheat::results::%{_test_id}%::type} to "Movement"
set {anticheat::results::%{_test_id}%::name} to "Phase"
set {anticheat::results::%{_test_id}%::start} to now
set {_test_end} to add {_test_duration} seconds to now
loop {_test_duration} times:
if now is after {_test_end}:
stop
sendActionBar {_p}: "&ePhase Test: &f%loop-number%/%{_test_duration}%s" to {_p}
wait 1 second
set {anticheat::results::%{_test_id}%::end} to now
set {anticheat::results::%{_test_id}%::status} to "pending_review"
send "{@prefix} {@pass_color}Phase test completed!" to {_p}
send "{@prefix} {@info_color}Test ID: &e%{_test_id}%" to {_p}
# === TIMER TEST ===
function test_movement_timer(p: player):
send "{@prefix} {@highlight}=== TIMER TEST ===" to {_p}
send "{@prefix} {@info_color}Simulating timer speed hack..." to {_p}