Just define thing == true as a separate if statement before the other if statements.
if thing == true then --> moved to a new if statement before the next if statements
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
end
end
local acceptedInput = {
[Enum.UserInputType.MouseButton1] = true,
[Enum.UserInputType.Touch] = true,
}
local function MyCoolFunction(input)
if thing == false then return end
if acceptedInput[input.UserInputType] == nil then return end
print("thing == true and input == MouseButton1 or Touch")
end