require "lib.moonloader"
local keys = require "vkeys"
function main()
if not isSampLoaded() or not isSampfuncsLoaded() then return end
while not isSampAvailable() do wait(100) end
while true do
wait(0)
if isKeyJustPressed(VK_1) and -- вместо vk_1 пишешь нужную клавишу
not sampIsCursorActive() then -- проверка на курсор
sampSendChat('text') end -- отправка текста
end
end