I have a script that whenever someone clicks more than 10 times in 0.2 seconds then they get kicked. I'm not sure what I'm doing wrong but I test an autoclicker so it clicks a TextButton to give me points at a very fast speed. My autoclicker is quite agressive but my script isn't kicking me. What is wrong with it?
local maximumLegitClickTime = .20
local successiveClicksBeforeKick = 10
local UIS = game:service"UserInputService"
local player = game.Players.LocalPlayer
local a = 0
local lastClick = 0
local timeSinceLastClick = function(click)
return click-lastClick
end
UIS.InputBegan:connect(function(input, processed)
if not processed then
if input.UserInputType == Enum.UserInputType.MouseButton1 then
local tSLC = timeSinceLastClick(tick())
lastClick = tick()
-- print(tSLC)
if tSLC < maximumLegitClickTime then
a = a + 1
else
a = 0
end
if a > successiveClicksBeforeKick then
player:Kick("Do not exploit to give yourself an unfair advantange | Type: Auto clicker | Contact devs if you believe this is a mistake.")
end
end
end
end)

1 comment
I've noticed that, regardless it still doesn't work