function main()
repeat wait(0) until isSampAvailable()
sampRegisterChatCommand("tdc", function() state = not state
if state then
sampAddChatMessage("[Clicker]: {008000}ON", -1)
end
if not state then
sampAddChatMessage("[Clicker]: {FF0000}OFF", -1)
end
end)
while true do
wait(0)
if state then
sampSendClickTextdraw(779)
end
end
end