Here is the script from a button titled appropriately enough "Draw Colorful Lines at Random":
global varX, varY, varXprev, varYprev, varRGB1, varRGB2, varRGB3
choose brush tool
set the brush to 32
set the dragSpeed to 0
put 250 into varXprev
put 250 into varYprev
repeat until the mouseclick
hide button "Draw Random Colorful Lines"
hide button "Erase"
put round(random(500)) into varX
put round(random(500)) into varY
put round(random(255)) into varRGB1
put round(random(255)) into varRGB2
put round(random(255)) into varRGB3
set the brushColor to varRGB1, varRGB2, varRGB3
drag from varXprev, varYprev to varX, varY
put varX into varXprev
put varY into varYprev
choose browse tool
show button "Erase"
I hope you can quickly see that it is nothing more than a quickly revised script of the button "Draw Lines" from my previous post.
Here is a screenshot of the program after running for 60 seconds: