What would be the best components for a cheap server?

The primary purpose is for it to be a garry's mod and/or minecraft server for around 6 people. But I may also use it as a media server.

I have sourced a old case which can house a micro atx motherboard and I also have an old GTX 770 to put in though I understand it will be unnecessary.

I have been looking at an Anniversary edition Pentium to be overclocked with some standard crucial RAM. Would a Pentium be okay for my needs or would it be better to have a quad core i5 or a hyperthreaded i3? I picked a more pricey motherboard (Z87M) for the overclocking though this may not be necessary for another processor? Or even the Pentium

The G3258 is great for a media server. You probably won't be able to transcode more then 1 video at a time, but should be able to stream a few instances as long as the device naively supports the file type or are DLNA complaint device. (if it doesn't you have to transcode the video which is costly).

running a few low spec game servers require almost nothing in terms of cpu/memory usage.

You can overclock the pentiums on an H81/H87 motherbaord just fine. (i think almost all of the asus boards support it and some msi do aswell. Think even some gigabyte do too. Just google H81/H87 motherboard overclocking)

A gtx770 would quite literally do nothing in a media server. It would just be wasting power lol