local lightEntity = FindLight("flicker")
local flicker = 0.01
local minIntensity = 0.1
local maxIntensity = 3.0
function FlickerLight()
    if lightEntity then
        local intensity = minIntensity + math.random() * (maxIntensity - minIntensity)
        SetLightIntensity(lightEntity, intensity)
    end
end
local elapsedTime = 0
function tick(dt)
    elapsedTime = elapsedTime + dt
    if elapsedTime >= flicker then
        FlickerLight()
        elapsedTime = 0
    end
end