local act = false
function main()
if not isSampfuncsLoaded() or not isSampLoaded() then return end
while not isSampAvailable() do wait(100) end
sampRegisterChatCommand("lkm", function()
act = true sampAddChatMessage("On", -1)
end)
while true do wait(0)
if act then
setGameKeyState(1, 256)
wait(10)
setGameKeyState(1, 0)
end
if wasKeyPressed(2) then
act = false sampAddChatMessage("Off", -1)
end
end
end