The package looks for LuaTeX regardless of its mode and
provides the switch \ifluatex; it works with Plain TeX or
LaTeX. The package is part of the oberdiek bundle.

Homepage:
https://ctan.org/pkg/ifluatex
