Scratch, 10 Scratch bytes
Raw script JSON:
"scripts": [[115,
68,
[["whenGreenFlag"],
["penColor:", -16777216],
["doForever",
[["doIf", ["mousePressed"], [["gotoSpriteOrMouse:", "_mouse_"], ["putPenDown"], ["putPenUp"]]]]]]]]