Intro
There is no current workaround method (or cheat code) to obtain the rail gun, other than the legitimate methods stated below.

Returning Player Requirement
You can obtain the Railgun in both GTA 5 story mode as well as GTA Online.
However, to get it in story mode, you must be a returning GTA player. A returning GTA player is someone who played the PS3 or Xbox 360 version of the game and moved their account to the PS4 or Xbox One.
In GTA Online you can access the Railgun regardless of whether you are a returning player not. However, you can only access it in certain missions, since it is too powerful and would otherwise give you an unfair advantage over other players. In story mode you can use it whenever you want.
Story Mode
There are several locations where you can find the Railgun in GTA 5's story mode, which are as follows:
Minor Turbulence
In Story Mode, if you are a returning player, you can easily buy the Railgun through any Ammu-Nation after completing the main story mission 'Minor Turbulence'. It will be available to purchase for $250,000.
Once you complete Minor Turbulence, head over to the crash site of the airplane from the mission at Alamo Sea. You will find a Railgun in the cockpit section of the wrecked plane. It is highly recommended that you first obtain a Scuba Diving Gear and then head over to the location, as the wreckage is deep underwater.
GTA BOOM now has its own community discussion forum! Chat directly with our guide creators, ask questions, & get tips and advice.
Shooting Range Method
If you haven't completed the mission yet, and accordingly the gun is not available to buy at the Ammu-Nation, then you can head over to the shooting range and select the "Bonus" challenge. This will let you choose a challenge that utilizes the Railgun. Then simply at your feet and shoot to kill yourself, which will spawn you back into the open world with the Railgun.
GTA Online
The easiest way to get the Rail Gun in GTA Online is to find the Gun Van and purchase it from that vendor.
The Rail Gun can also be used in a set number of Adversary Modes and Bunker Missions in GTA Online. Note that, in contrast to story mode, you can access the Railgun whether you are a returning player or not. In Adversary Modes, the railgun is part of different loadouts such as the Assault class setup in Beast vs. Slasher, Juggernaut's class in Power Mad, etc.
You will also find some of the Merryweather guards using it during Doomsday Heist missions.
dose it work in 2019???
Hello my name is Charlie Edwards schrouder to get the the rail gun for free in gta5
is it for plase dashion 3 cus if it is i dammed
What the hell does your comment say, also what the hell is a plase dashion 3, I thought it was a Playstation 3
Lol
i love this game.
Are you Alex adams
DAMIT I COUD OF DID THAT $HIT
to complete the game or hack.
It doesn't say bonus on my screen
The bonus selection wasn't there for me
you earn it buy beating the game
Ya how
rob a bank doofus
The video is no longer available. WTF?
Yaa
`what job do you download
http://socialclub.rockstargames.com/member/carloscodhd/games/gtav/ps4/jobs
what is this job name ?
This one http://socialclub.rockstargames.com/member/carloscodhd/games/gtav/ps4/jobs
There arint a railgun cheat didn't u read the manual ?
its only on ps4 and xbox one
wwwwwwwwwwwooooooooooooooooowwwwwwwww thats awesome bros
hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm. i gust maybe.
how do you get millon's of dollers
Go to the ocean.
And swim???????
or finish the game... 36 million
who knows the railgun cheat
From Cameron