2005 Chevy 2500 6.0 4×4

First my speedomater went crazy working to not working, then working, then not working, now not working. Then my oil pressure guage from good to no pressure, good to no, etc. While ildle it reads no pressure. But driving it goes from good to bad, up and down all the time while driving. Alot of times it stops working. And does not start back jumping back and forth till you drive it again the next day. ┬áIf my oil pump is not working, would’nt my valves rattle? Sence my speedomater acked that way, is it safe to say its the guage? Sensor or oil pump? What about the speedomater? What do I need to do to fix this?