in reply to Can someone help me make this script more efficient

Some quick comments: