Well since I cant seem to figure out how to post a release, I will just post it here, Credit goes back to [Release] Weapons On Back however this script is broke hard. So i took it from there and basically re-wrote it and it works.
Use the Z Key to sling and unsling your long guns.
This is a NON ESX item, It may work but who knows I know it works with FiveM on a vMenu based server.
You can download it here: https://github.com/deserted1/FiveM-Scripts/tree/master/weaponsonback