Attempting to code your own whole weapon might be a little difficult without any scripting background. The best you could probably do is find-replace the name of previous weapons. Try other simple scripts that dont involve datablocks for a start. Once you get used to it, and learn how things work come back and attempt this. Fixing your previous mistakes with new knowledge you gained is one of the best ways to learn how things work