If it's actually a large piece of code being copied, then it might be somewhat frowned upon.
If you see a menu design you like, I suppose it's not a big deal to use the same, giving credits to the author. I know I wouldn't mind.
Best not to just copy and paste the code though, try and write your own code for the menu, making it look like the one you liked, just to avoid any possible misunderstandings...
That's what I would do I guess...