Why does a script constantly run which makes saving and editing so slow?