> For the complete documentation index, see [llms.txt](https://docs.streamavatars.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.streamavatars.com/lua-scripting-api/api-reference-and-tips/global-functions/getscriptableblocks.md).

# getScriptableBlocks

```lua
return function()
    local level = getBackground();
     
    --give an array of all blocks on the current level
    local scriptBlocks = getScriptableBlocks(); 
    
    log('the list of blocks on ' .. level .. ' are:');
    for i,block in pairs(scriptBlocks) do
        log(block.id);
        log(block.position.x .. ' ' .. block.position.y);
    end
end
```

{% content-ref url="/pages/3oadk0TJ34uvXx8tK4cN" %}
[ScriptableBlock](/lua-scripting-api/api-reference-and-tips/classes/scriptableblock.md)
{% endcontent-ref %}
