require "math"
require "os"

local script = {
    name = "hellblocks",
    displayName = "Configure Falling Blocks",
    tooltip = "Do the thing",
}

function script.run(room, args)
    math.randomseed(os.time());
    for _, entity in ipairs(room.entities) do
        if entity._name == "JungleHelper/AutoFallingBlockDelayed" then
            local alpha = (1-((1264-16)-(entity.x-16))/(1264-16));
            local delay = 12*alpha;
            entity.ShakeDelay=delay;
            entity.delay=delay;
--            entity.y = 216-8*(6*math.floor(math.random()*4));
        end
 
    end
end

return script
