Okay, so today I wanted to mess around with making one of those “check-in” things, but with a scratch-off effect, you know, like a lottery ticket. I’ve seen these around and always thought they were kinda neat. So, I decided to try building one myself.

Getting Started
First, I needed to figure out the basic structure. I decided to keep it simple – just a few boxes that would reveal a message or prize when “scratched.”
I started by sketching out a rough design on paper, playing around with the number of boxes and the placement of text. It was important for it not to look to complex to the user.
Building the Base
Next, I fired up Scratch. I created a new project and started with a plain backdrop. Then, I created a sprite for the boxes. I went with a simple, rectangular shape and duplicated it a few times to create a grid.
I played a little with the colors, and add the text under the boxes, which would represent the “prize” or result of checking in that day.
The Scratch-Off Magic
Now for the fun part – the scratch-off effect! I added a new sprite, this time using the paint editor to create a sort of “scratchable” layer. I chose a silvery color, like on a real scratch card, and made sure it covered one of the boxes completely.
I duplicated that silver layer to cover all of my boxes.
Coding the Interaction
Okay, time for some code. I wanted the silver layer to disappear when I “scratched” it with the mouse. So, I went to the “Events” blocks and grabbed a “when this sprite clicked” block. Then, under “Looks,” I found the “hide” block and snapped it in.
I tested it out, and, clicked on the silver layer, and… poof! It vanished, revealing the message underneath! I did this for each of the silver layers I created. It’s always a fun moment when you click something and it works as expected.

Polishing and Sharing
Finally, I added a little title above my scratch-off grid, like “Daily Check-In.” I wanted it to be clear what it was for, and maybe add a little sense of reward.
And that’s pretty much it! It was a super simple project, but a fun way to play with sprites, costumes, and basic event handling in Scratch. I think I might use this as a template for other interactive things in the future. Maybe a little reward system for chores, or a fun way to reveal surprises. Lots of possibilities!