From Test-Scratch-Wiki
Trails on sprites create a type of fireworks effect. Here is a photo
Listed below are two ways to make a sprite have a trail
Clone Method
when green flag clicked forever create clone of [myself v] end when I start as a clone repeat (5)//replace this with an estimate of how long you want your trail change [ghost v] effect by (20)//100/the above number end delete this clone
Pen Method
Create a big square the color of the background and put the following code in it:
when green flag clicked go back (1) layers set size to (150) go to x: (0) y: (0) forever set [ghost v] effect to (20) stamp end
and the following code in the sprite to have a trail:
when green flag clicked forever stamp end