Well congratulations! Most newcomers to the hobby show up here with 5 goldfish in a goldfish bowl, not a 50 gallon tank! You are at least -closer- to having enough space for them! In fact, perhaps the goldfish folks will come along and deem that 50g would be ok!
The guideline though, as far as I can remember is to have 20 (or is it 30!

gallons) for the first goldfish and then 10 more gallons (US Gallons) for each additional one. This is a minimal thing to keep them alive as they are actually pond fish that will grow to absolutely enormous size.
Now what's probably happened to your fish is quite simple. You probably just haven't had access to the basic information about how aquariums work. Fish give off ammonia from their gills and their waste, excess fishfood and plant debris also contributes ammonia to the tank. Ammonia, even in small amounts is deadly to fish and must be cleared away.
The way we control this in the hobby is via a wonderful thing called the "biofilter" which is one of the main functions of the common aquarium filter. But in your case you may not yet have a working biofilter (we'll need to find that out.)
And so my guess is that you're in an urgent situation where you'll first need to perform water changes. Have you got any conditioner? This is the chemical product from your local aquarium shop that performs the task of taking chlorine or chloramine out of your tap water to make it safe for fish. You need that right away. Good brands are Seachem Prime and API StressCoat+ and there are others. You need to perform 50 to 70% water changes and use conditioner per directions on the return water and it needs to be roughly temperature matched (your hand is good enough) to the tank water. You need to do this maybe twice with at least an hour in-between to quickly get things better, then you need to do it once per day, until you can get a good test kit.
You need a good liquid-reagent-based test kit. Many of us like and use the API Freshwater Master Test Kit. You'll need a good gravel-cleaner-siphon-hose to handle these water changes. Post up how things are going and further questions and the members will join in and help you.
~~waterdrop~~