Would what be legal? You haven't articulated anything.
You're asking people here to provide you with legal advice, while providing no criteria to evaluate the legality of your actions.
Not to mention, you are effectively asking randoms on the internet for legal advice. While some of us are rather knowledgeable, & would try not to give you incorrect information.
The fact remains that intellectual property laws can be highly nuanced & labyrinthine in nature. & any advice we can give, would not negate or mitigate your liability; whether our "errors" were due to ignorance or malice.
like say if i wanted to make a juke box that played differnt songs
That would depend entirely upon the audio assets in question, & your method of acquiring them.
does any one know the rules on music and being ingame
Yes, follow the engines EULA agreement, along with any other applicable EULA from any other audio asset you acquire, or the terms & conditions established by any other audio asset provider that you agree to by using their IP.
I.e. refer to the documentation provided by the source for the correct course of action; rather than relying upon the magnanimity of random internet commenters, forced to make a determination without any available data; due to the ambiguity of your request.