Anticheat help

  • 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!

Status
Not open for further replies.

vitusverden

Active Member
Aug 16, 2017
50
2
8
25
Hello. I have an idea for an anticheat script. It should work so that you spawn an NPC over your head. So if you hit it, it adds 1 to the variable {hits.%player%}
Someone whos can make that?

Sorry for bad translating. I am not so good to english so i used google translate
 
I wrote a quick skript
code_language.skript:
command /anticheat:
    trigger:
        if {kabot.inuse} isn't set:
            set {kabot.inuse} to true
            delete {kabot.%uuid of arg 2%}
            loop all entities:
                if loop-entity is "killauraBot":
                    hide loop-entity from all players
                    reveal loop-entity from arg 2
                    loop 10 times:
                        if {kabot.%uuid of arg 2%} isn't set:
                            teleport loop-entity 3 meters behind arg 2
                            add 1 to {_tick}
                            wait 10 ticks
                    hide loop-entity from the executor
                    teleport loop-entity 100 meters above arg 2
                    if {kabot.%uuid of arg 2%} is set:
                        message "&c[anticheat] &9%arg 2% &freacted > &c%{_tick} / 2% s" to all players
                    else:
                        message "&c[anticheat] &9%arg 2%&f hasn't been caught (hasn't reacted in 5 s)"
                    delete {kabot.%uuid of arg 2%}
            wait 3 ticks
            delete {kabot.inuse}
        else:
            message "&c[anticheat] &fThe killaura bot is in use"
on left click:
    if targeted entity is "killauraBot":
        {kabot.%uuid of player%} isn't set
        set {kabot.%uuid of player%} to true
you need to spawn an npc though with the citizens plugin
gl
 
Status
Not open for further replies.