Стандартная форма

Поток управления / Условные операторы / Операторы if/else

local latitude = -42

-- Checked top down: the first true branch runs
local location
if latitude == 0 then
  location = "Equator"
elseif latitude < 0 then
  location = "Southern Hemisphere"
else
  location = "Northern Hemisphere"
end
-- location = Southern Hemisphere

print("location = " .. location)