I'm trying to make a minimal recoil AK47 CSGO script but I can't seem to get the script to stop pulling down. I want it so that after 900ms it stops pulling down and starts pulling left/right. I only have the pull down script atm because I only know the very basics of LUA, mind you, I'm 15. At the moment it just pulls infinitely down, so any help would be appreciated. This is a Logitech Gaming Software script.
Code:
--CSGO_AK47
i = 1
do
i = i + 1
function OnEvent(event, arg)
if IsMouseButtonPressed(3) then
if (event == "MOUSE_BUTTON_PRESSED" and arg == 1) then
repeat
ReleaseMouseButton(1)
Sleep(10)
MoveMouseRelative(0,15)
until i > 900
end
end
end
end