Working of script