An electric moped will not be able to go 40 MPH.
go down hill
To legally make your moped go faster u can do all sorts of things. You can first try taking the baffel in your muffler out. It's the metal plate screwed into the end of your muffler. This might make your moped a little bit louder but it should make it go 5+ mph faster. Another way is to buy another muffler like a racing one. They can be as cheap as $100 brand new. There are also many other ways you could legally make your moped go faster but that's the most common thing to do.
Go downhill
get a gas powered one
Put a car battery in it
A +5 kit from mykwilwin it makes is 5mph faster
Dont ride the basterd
Yes, at least in New Jersey For Moped Laws In Any State, Go Here http://moped2.org/mstates.htm
Yes it will make the scooter go faster, but you could run the chance of blowing parts in the moter if you do so
Depends if its gas or electric, either way a larger motor, in electric you can up the voltage a little
To make an electric dirt bike go faster it is simplest to buy a motor that can support a bigger battery and then get a bigger battery. Now you should lighten it. Also, don't be cheap, buy a dirt bike with a gasoline or diesel engine.