function OnEvent(event, arg) --Any input device if(event == "PROFILE_ACTIVATED") then --profile has been activated end if(event == "PROFILE_DEACTIVATED") then --profile has been deactivated end if(event == "G_PRESSED" and arg == 18) then --check if G18 is pressed --You have to make the beginning by yourself ingame i.e. make a simple stair and a the first roof. --The rest is automatically done by the script. PressAndReleaseKey(47) --Stair Sleep(60) PressAndReleaseMouseButton(1) Sleep(10) PressAndReleaseKey(48) --Roof Sleep(60) PressAndReleaseMouseButton(1) Sleep(10) PressAndReleaseKey(45) --Wall Sleep(50) PressAndReleaseMouseButton(1) Sleep(10) PressAndReleaseKey(46) --Floor Sleep(50) PressAndReleaseMouseButton(1) Sleep(10) PressAndReleaseKey (47) --Stair Sleep(20) PressAndReleaseMouseButton(1) end end --Use the G-Series LUA-API Docs to understand what's going on. --Link: https://douile.******.io/logitech-toggle-keys/APIDocs.pdf