Does anyone have/know how to create a foliage script?

use the WindShake module ( High performance wind effect for leaves and foliage )