What you describe is almost certainly illegal. Taking money from people to place bets for them, including on the lottery, would meet the definition of providing a  gambling service and/or place of gambling in every jurisdiction with which I am familiar. However, you may not do this without a license from the state, which is VERY difficult to get. Providing gambling services without authorization or a license is a crime, so you are advised to not do this.