Why doesn't my script show the cookies in text?

You must explain what you expect to happen versus what really happens. It’s impossible to tell what you want this script to do.