A Hat Block, is a block that is designed to start a script. This makes them essential for making projects. All hat blocks are either Control blocks, Events blocks.
Hat blocks are useful in Event Based Programming.
As Hat blocks are designed to start a script, they are shaped so no blocks can go on top of them — this is done by rounding the blocks’ top. The bottom of Hat blocks are the same as Stack blocks.
Without Hat blocks, scripts could only be activated manually, and not at all online. Each Hat block has a different method for getting activated — this is so different scripts can be started at different times.
There are four different ways to activate a script :
Hat block are also used to make arduino programs in mblock.