Create a text document on your powder toy directory, name it autorun.lua , and put the code on this link http://pastebin.com/DpKTCywE inside the autorun.lua. then create a folder called script, create a text document inside the scripts folder with the name you want and .lua (for example ROCK.lua )
and put the code on my comment above on it. then run powder toy.
I tried that but just worked if it was a powder, and it was affected by gravity, which i didn't want.