hey, i'm trying to make an anti cheat, for my server and maybe to help other servers with an anticheat with my skript, 20 errors :( reach check

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

funpvp

Member
Oct 7, 2023
47
1
8
23
command /funwatcher <text>
permission: funwatcher.all
permission message: &4Only Players with permission funwatcher.all have access to this command!
trigger:
if arg 1 is "help":
send "&4[FUNWATCHER] &c/funwatcher alerts - enabled alerts (this is a placeholder command)"
send "&4[FUNWATCHER] &c/funwatcher help - shows this page"
send "&4[FUNWATCHER] &c/funwatcherpunish [player] - bans a player "
if arg 1 is "alerts":
send "&4[FUNWATCHER] &aAlerts Toggled!

command /funwatcherpunish <offlineplayer>
permission: funwatcher.all
permission message: &4Only Players with permission funwatcher.all have access to this command!
trigger:
ban player for "Funwatcher ban for client modifications! Appeal at funwatcher.example.com!

on Skript start:
loop all players:
if loop-player has permission "funwatcher.alerts":
message "&4[FUNWATCHER] &cFunwatcher loaded, alerts are enabled!"

# REACH CHECK

on damage of player:
if attacker's gamemode is survival:
if attacker is a player:
if the distance between the attacker and victim is higher than 3.01:
loop all players:
if loop-player has permission "funwatcher.alerts":
send "&4[FUNWATCHER] &c%attacker% has failed reach!
if the distance between the attacker and victim is higher than 3.5:
execute console command "ban %attacker% &4[FUNWATCHER] &cCHEAT DETECTION [REACH]
 
sorry the spacing didnt show on here, but the spacing seemed to be the main error
 
What errors are you encountering (possibly send a screenshot of what errors you see when you run /sk reload scripts, and what skript addons are you using?
 
skquery is the only addon i have, this is just a few of the errors, they are so far all to do with spacing though, every time i try fix the spacing errors, it messes with all the other fixed spacing errors
 

Attachments

  • 2023-10-07 (2).png
    2023-10-07 (2).png
    615 KB · Views: 120
Try this. Just telling you that using Skript to make an anticheat is not a good idea at all.

code_language.skript:
command /funwatcher <text>:
    permission: funwatcher.all
    permission message: &4Only Players with permission funwatcher.all have access to this command!
    trigger:
        if arg 1 is "help":
            send "&4[FUNWATCHER] &c/funwatcher alerts - enabled alerts (this is a placeholder command)"
            send "&4[FUNWATCHER] &c/funwatcher help - shows this page"
            send "&4[FUNWATCHER] &c/funwatcherpunish [player] - bans a player "
        if arg 1 is "alerts":
            send "&4[FUNWATCHER] &aAlerts Toggled!

command /funwatcherpunish <offline player>:
    permission: funwatcher.all
    permission message: &4Only Players with permission funwatcher.all have access to this command!
    trigger:
        ban player for "Funwatcher ban for client modifications! Appeal at funwatcher.example.com!

on load:
    loop all players:
        if loop-player has permission "funwatcher.alerts":
            message "&4[FUNWATCHER] &cFunwatcher loaded, alerts are enabled!"

on damage of player:
    if attacker's gamemode is survival:
        if attacker is a player:
            if the distance between the attacker and victim is higher than 3.01:
                loop all players:
                    if loop-player has permission "funwatcher.alerts":
                        send "&4[FUNWATCHER] &c%attacker% has failed reach!
            if the distance between the attacker and victim is higher than 3.5:
                execute console command "ban %attacker% &4[FUNWATCHER] &cCHEAT DETECTION [REACH]
 
hey, again,
command /funwatcher <text>:
permission: funwatcher.all
permission message: &4Only Players with permission funwatcher.all have access to this command!
trigger:
if arg 1 is "help":
send "&4[FUNWATCHER] &c/funwatcher alerts - enabled alerts (this is a placeholder command)"
send "&4[FUNWATCHER] &c/funwatcher help - shows this page"
send "&4[FUNWATCHER] &c/funwatcherpunish [player] - bans a player"
if arg 1 is "alerts":
send "&4[FUNWATCHER] &aAlerts Toggled!"

command /funwatcherpunish <offline player>:
permission: funwatcher.all
permission message: &4Only Players with permission funwatcher.all have access to this command!
trigger:
ban %player% Funwatcher ban for client modifications!

on join:
loop all players:
if loop-player has permission "funwatcher.alerts":
message "&4[FUNWATCHER] &cAn Admin has joined the server!"

on damage of player:
if attacker's gamemode is survival:
if attacker is a player:
if the distance between the attacker and victim is higher than 3.01:
loop all players:
if loop-player has permission "funwatcher.alerts":
send "&4[FUNWATCHER] &c%attacker% has failed reach!"
if the distance between the attacker and victim is higher than 3.5:
execute console command ban %attacker% &4[FUNWATCHER] &cCHEAT DETECTION [REACH]

still two errors idk how to fix tho
 

Attachments

  • 2023-10-07 (5).png
    2023-10-07 (5).png
    1.6 MB · Views: 124
hey, again,
command /funwatcher <text>:
permission: funwatcher.all
permission message: &4Only Players with permission funwatcher.all have access to this command!
trigger:
if arg 1 is "help":
send "&4[FUNWATCHER] &c/funwatcher alerts - enabled alerts (this is a placeholder command)"
send "&4[FUNWATCHER] &c/funwatcher help - shows this page"
send "&4[FUNWATCHER] &c/funwatcherpunish [player] - bans a player"
if arg 1 is "alerts":
send "&4[FUNWATCHER] &aAlerts Toggled!"

command /funwatcherpunish <offline player>:
permission: funwatcher.all
permission message: &4Only Players with permission funwatcher.all have access to this command!
trigger:
ban %player% Funwatcher ban for client modifications!

on join:
loop all players:
if loop-player has permission "funwatcher.alerts":
message "&4[FUNWATCHER] &cAn Admin has joined the server!"

on damage of player:
if attacker's gamemode is survival:
if attacker is a player:
if the distance between the attacker and victim is higher than 3.01:
loop all players:
if loop-player has permission "funwatcher.alerts":
send "&4[FUNWATCHER] &c%attacker% has failed reach!"
if the distance between the attacker and victim is higher than 3.5:
execute console command ban %attacker% &4[FUNWATCHER] &cCHEAT DETECTION [REACH]

still two errors idk how to fix tho
Add quotes before and after the command in execute console command
 
Hello,
you made now two other threads talking about your anticheat.

Sadly, you can't post your file in here and someone will fix it (you can but no one will fix your code).
How everyone is saying if you really want to go through the pain of
- thinking about a check
- thinking of how you could make the check
- making the check
- fixing false positives
- testing
then i wish you the most but uploading your anticheat here and hoping that someone fixes it, won't make it.