could be allot of factor. poly counts of all those entitys or taking an afult lot of other resources ( big skins? all using stencil shadows?).
your script, you may have allot of redundant loops or overt ammount of calclations repetivly happening
try your scripts with less entities. if still noticable slowdown, start ripping yrou scripts apart.