local waiting = 3
local active = false
function main()
while not isSampAvailable() do wait(0) end
sampRegisterChatCommand('on', function()
active = not active
sampAddChatMessage("I onion")
end)
while true do
wait(0)
while active do
wait(100)
setGameKeyState(78, 256)
wait(1000)
setGameKeyState(78, 0)
wait(waiting * 60000)
end
end
end