Temporarily block input?

I’ve been making custom HUD for gmod and when switching to camera by pressing +attack(Left mouse button), It takes a picture as soon as it’s being switched to it
so is there a way to temporarily block input? or atleast a way to not make it take a picture when switching to it

This is a super bad hack that will break the game:

local stopInput = false

hook.Add( "Think", "StupidHack", function()
    if stopInput then
end )

I don’t know why the camera tool would take a picture when you switch to it though.

Can you show us your weapon selection code? Blocking input is a bad way to solve this problem.

This works for me

function BindPressed( ply, bind, pressed )
	if(bind == "+attack") then
		if(isIvnOpen) then
			return true

I need to read the examples more often ._.