Please Help the toggle Inventory menu!


function ClientKeyPress()	
	if (!LocalPlayer():IsTyping() and input.IsButtonDown(KEY_Q) == true) then
		if (!Cpress) then
			cantUse = false
		else
			cantUse = true		
		end
		Qpress = true
		
	    if cantUse then return end
		if dFrame_Main_Menu and dFrame_Main_Menu:IsValid() then
			dFrame_Main_Menu:Remove()
			dFrame_Main_Menu = nil
		else
			MainMenu()
		end
		
		Qpress = false
		end
end

CODE IS MY DAYZ GAMEMODE

and this. not toggle inventory .

Q press ? Tic disorder meme… ( JUST KIDDING )
help.