1. 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!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Python Anticheat (Skript)

Discussion in 'Scripts' started by Nolan Laake, Jul 13, 2021.

  1. Nolan Laake

    Nolan Laake New Member

    May 26, 2021
    Likes Received:
    Python Anticheat is a lightweight Skripted Anticheat. What is different about our anticheat? Ill be honest here, not much. Python Anticheat strives to have less false positives rather than new features. Suggestions are always accepted; leave them in the review section.


    - Highly Customizable
    - Lightweight
    - Free
    - Warns if player is lagging
    - Less false positives


    - Alts
    - Autoclicker (can cause false positives)
    - Sneak
    - Flight
    - Speed
    - Aura
    - Multiaura
    - Reach
    - Jesus
    - Nuker (Beta)
    - High Jump
    - NoClip (Works really good)
    - Clickaura
    - Scaffold
    - Chest Stealer
    - Off Hand Exploit (Crash)
    - Anti Knockback
    - No Fall
    - Command Spam


  2. TheRealUnderscore

    Mar 31, 2019
    Likes Received:
    (I accidentally clicked post before this was finished, oops...)

    Hi! I've briefly looked at the code, and can see you really know what you're doing! Although, there are some things you should change. Also, this isn't that in-depth, so some things may be wrong.
    Also, ignore any backslashes in this, skUnity automatically formats some things like :\P when it's undesired.

    Lines like:
    Code (Text):
    1.     if {@IncludePingInAlerts} is true:
    2.         send "&c&lPython &8» &c%{_player}% &7[Ping: %{_player}'s ping%&7] attempted to %{_cheat}% &7[&c%{_proof}%&7]" to all players where [input has permission "{@AlertsPermission}"] if {_proof} is not "none"
    3.         send "&c&lPython &8» &c%{_player}% &7[Ping: %{_player}'s ping%&7] attempted to %{_cheat}%" to all players where [input has permission "{@AlertsPermission}"] if {_proof} is "none"
    4.     else:
    5.         send "&c&lPython &8» &c%{_player}% &7attempted to %{_cheat}% &7[&c%{_proof}%&7]" to all players where [input has permission "{@AlertsPermission}"] if {_proof} is not "none"
    6.         send "&c&lPython &8» &c%{_player}% &7attempted to %{_cheat}%" to all players where [input has permission "{@AlertsPermission}"] if {_proof} is "none"
    Unnecessarily do 2 checks, when you could simple use ternary or even just normal if-else blocks.

    This isn't a biggie, but
    Code (Text):
    1.             loop {ip::%{_ip}%::*}:
    2.                 add "%loop-value%" parsed as offlineplayer to {_alts::*}
    you shouldn't add to a list, it's pretty performance-heavy. Rather,
    Code (Text):
    1. add 1 to {_i}
    2. set {_alts::%{_i}%} to loop-value # No need to parse it since you're just using it as a string right after
    would be faster. The same goes for when you add {_u} a few lines before, and for other lines similar to this.

    There's also this line:
    Code (Text):
    1. set {%player%::ip} to ip of player
    Please do not use a dynamic value as a root. There's no way to clear that afterwards unless you loop all offline players...
    This also goes for everything else, use your own root list. Something like {anticheat::, which I see you already use in other pieces of the script, but different for different uses. Stuff like {anticheat::\persistent for persistent values, etc. This way you can just do delete {anticheat::\persistent::%player%::*} (pseudo-code, don't actually use).

    There are a lot of lines like this:
    Code (Text):
    1. send "" and "" and "" to {_player}
    2. # ...
    3.             send "&8------------------------------", "&cPython Anticheat", "", "&7Developed by &cNolan_UwU" and "&7Python Version: &c1.2" and ""
    4.             send "&cFeatures" and "&7Alts, Autoclickers, Sneak, Flight, Speed, Killaura, Multiaura, Reach, Jesus, Nuker, Highjump, NoClip, Clickaura, Scaffold, Chest Steal, Offhand Crash, Anti Knockback, Nofall, Command Spam" and "&8------------------------------"
    5. # ...
    6.             send "&8------------------------------" and "&cPython Anticheat" and "&7Help:"
    7.             send ""
    8.             send "&c/python &cinfo &7Shows info about Aqua Anticheat"
    9.             send "&c/python &ckick &7Toggles if the anticheat should kick players."
    10.             send "&c/python &ccps <player> &7Shows a player's highest cps."
    11.             send "&c/python &calts <player> &7Shows any known alts of a player."
    12.             send "&c/python &chelp &7Shows this message."
    13.             send "&8------------------------------"
    This is good for readability, but there's no need for so many send lines. That's not the part I'm worried about though, it's the excessive use of and. Lists are best chained with commas. If you use and so much, Skript sees each %objects% and %objects% as a whole new list, hurting the parser and runtime speed as well (not that much for runtime speed, yes that much for the parser).
    Use lists like
    Code (Text):
    1. send "hi", "how are you", "today" and "sir?"
    This goes for other times you excessively use and too, not just for send lines.
    #2 TheRealUnderscore, Jul 13, 2021
    Last edited: Jul 13, 2021
    • Informative Informative x 1
  3. GamerProPlaysYT

    Jul 16, 2020
    Likes Received:
    Do not make anticheats in Skript. It will always result that theres many false flags. Skript can NOT replace good and well-made java plugins, so I do not recommend using anticheat with Skript.

Share This Page