Toggle animation script