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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

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

Solved AutoClicker check problem

Discussion in 'Skript' started by Deleted member 6377, May 17, 2018.

Thread Status:
Not open for further replies.
  1. Skript Version: 2.1.2
    Minecraft Version: 1.8.9

    ---
    Full Code:
    Code (Skript):
    1. # AntiAutoClicker by D0XY. https://www.youtube.com/c/d0xyyt
    2.  
    3.  
    4. options:
    5.  
    6. # Change the number after "clickmax" to set what CPS the player gets kicked at!
    7.  
    8.  
    9.     clickmax: 5
    10.  
    11. # DO NOT CHANGE ANYTHING BELOW THIS LINE!!!
    12.  
    13.     prefix: &6[&eAntiAutoClick&6]&r
    14.  
    15.  
    16.  
    17. command /autoclickcheck [<Text>]:
    18.     permission: autoclickcheck.use
    19.     permission message :&cNo permission!
    20.     trigger:
    21.         if arg 1 is not set:
    22.             message "{@prefix} &cUsage: /autoclickcheck (true/false)"
    23.         if arg 1 is "true":
    24.             loop all players:
    25.                 set {clickcheck.%loop-player%} to true
    26.             message "{@prefix} &aAutoClicker check enabled."
    27.         if arg 1 is "false":
    28.             loop all players:
    29.                 set {clickcheck.%loop-player%} to false
    30.             message "{@prefix} &cAutoClicker check disabled."
    31.  
    32. on join:
    33.         clear {clicks.%player%}
    34.  
    35. on left click:
    36.         {clickcheck} is true
    37.         add 1 to {clicks.%player%}
    38.         {clicks.%player%} > {@clickmax}
    39.         kick the player due to "&d%{clicks.%player%}%&c+ CPS, AutoClicker?"
    40.         broadcast "&d%player%&b has been kicked for clicking &d%{clicks.%player%}%&b+ CPS!"
    41.  
    42. every 5 seconds:
    43.         set {clickcheck} to true
    44.         wait 0.5 second
    45.         set {clickcheck} to false
    46.         loop all players:      
    47.                 delete {clicks.%loop-player%}
    48.  
    Errors on reload:
    No errors on reload.

    Problem:

    When I enable the AutoClicker check (/autoclickercheck true), it only enabled the check for the player that wrote the command. Of course, I don't want that so I try to fix it using the LoopPlayer thing but now it just sends me the message that it Enabled but the click check doesn't work anymore, I don't get kicked



    Have you tried searching the docs?
    Yes
    Have you tried searching the forums?
    No
    What other methods have you tried to fix it?
    None, don't know any other method.
     
  2. MusicManSK

    MusicManSK Active Member

    Joined:
    Nov 30, 2017
    Messages:
    230
    Likes Received:
    11
    Code (Skript):
    1. command /autoclickcheck [<Text>]:
    2.     permission: autoclickcheck.use
    3.     permission message :&cNo permission!
    4.     trigger:
    5.         if arg 1 is not set:
    6.             message "{@prefix} &cUsage: /autoclickcheck (true/false)"
    7.         if arg 1 is "true":
    8.             set {clickcheck.enabled} to true
    9.             message "{@prefix} &aAutoClicker check enabled."
    10.         if arg 1 is "false":
    11.             set {clickcheck.enabled} to false
    12.             message "{@prefix} &cAutoClicker check disabled."
    13.          
    14. every 1 seconds:
    15.     if {clickcheck.enabled} is true:
    16.         loop all players:
    17.             if {clicks.%loop-player%} is more than {@clickmax}:
    18.                 kick the loop-player due to "&d%{clicks.%loop-player%}%&c CPS, AutoClicker?"
    19.                 broadcast "&d%loop-player%&b has been kicked for clicking &d%{clicks.%loop-player%}%&b CPS!"
    20.             delete {clicks.%loop-player%}
    21.      
    22.      
    23. on click:
    24.     if {clickcheck.enabled} is true:
    25.          add 1 to {clicks.%player%}
    26.  
    27. on quit:
    28.     wait 1 tick
    29.     delete {clicks.%player%}
    --- Double Post Merged, May 17, 2018, Original Post Date: May 17, 2018 ---
    And... i would change max click rate to higher value because i can click over 10 cps...
    upload_2018-5-17_12-11-6.png
     
  3. I was just testing it out lol and ty
     
  4. MusicManSK

    MusicManSK Active Member

    Joined:
    Nov 30, 2017
    Messages:
    230
    Likes Received:
    11
Thread Status:
Not open for further replies.

Share This Page

Loading...