Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Integer) As Integer
Dim hotkey As Boolean
hotkey = GetAsyncKeyState(Keys.Space)
If hotkey = True Then
'/ your source code for afkbot here
End If
