FREE Live Master Session: Code Your AI Companion for Kids

    Register for Free →
    Free Worksheet · Advanced

    Scratch My Blocks (Functions)Build Custom Reusable Code Modules for Kids

    Master custom function blocks in Scratch! Learn how to define My Blocks, pass parameters & inputs, eliminate duplicated code, and build clean, professional game architectures.

    🧩

    What are My Blocks?

    As your Scratch projects grow bigger and more exciting, you'll often find yourself repeating the same group of blocks over and over again — like jumping, flashing red when hit, or drawing shapes.

    💡 What is a Function?

    In computer science, a Function is a reusable block of code that performs a specific task. In Scratch, custom functions are called My Blocks!

    Without My Blocks (Duplicated Code)

    Copying 10 blocks into 5 different places makes your project messy, hard to read, and difficult to fix when there's a bug!

    With My Blocks (Clean Code)

    Define the action ONCE under a pink define [Jump] hat block, then call Jump anywhere!

    ⭐ The DRY Principle

    Professional programmers follow DRY (Don't Repeat Yourself). If you use a script more than once, turn it into a function!

    Interactive Custom Block Creator

    Scratch Custom Block Builder

    Live Generator

    Generated Scratch Blocks:

    define [Jump (height)]
    change y by (height)

    Block in Palette:

    Jump50
    1 of 7