I'm trying to make something that'll detect if a player is clicking fast, but even if the player isn't using an autoclicker and just clicking quickly, there's still a chance it'll detect the player using an autoclicker. I doubt the way I'm executing this is the best, but I can't see any other way to do it.
local UIS = game:GetService("UserInputService")
local CanClick = true
local MaxChances = 20
local UsedChances = 0
UIS.InputBegan:Connect(function(Input,Proc)
if Input.UserInputType == Enum.UserInputType.MouseButton1 then
if UsedChances == MaxChances then
warn("Warn player")
UsedChances = 0
end
if not CanClick then
print("Player is using an autoclicker!")
UsedChances = UsedChances + 1
else
print("Player isn't using an autoclicker!")
end
CanClick = false
wait(.07)
CanClick = true
end
end)

3 comments
make a value and everytime a player clicks make that value add 1, each second keep making the value go to 0, detect the max CPS
check if the max cps is beyond a number that is humanly possible. jitter-clickers can click at like 1/60th of a second my man
Thanks for the help, but I've fixed it.