Replacing stuff

So i have a quesction if i whant to replace a wepon lets say i created a low polly weapong and i did some coding to it and i whant to replace it will i have to recode everything or is there a simple way to replace and item ?

Create a prefab for the weapon. Assign your low poly model and create your code. Later, you can assign the model of the prefab to a new one. The model will change but everything else should be the same.