Avoiding long "if" statements

The title says it, there’s any way to avoid doing this?

local function TsRequest(input, gameProcessed)
	local TimeStopEnabled = nil
	
	if input.UserInputType == Enum.UserInputType.Keyboard and not gameProcessed and not DEBOUNCE and not TimeStopEnabled 
	and Humanoid:GetState() ~= Enum.HumanoidStateType.Dead and Character and Humanoid then

		end
	end
end

You can use variables and then call the name of a variable inside of a condition.

2 Likes

i usually do:

if
    condition1 and
    condition2 and
    condition3
then
    print("yo")
end
2 Likes