need lua files for entity

hi, i recently made models which i am going to use for a workshop addon, i tried making a shared.lua, cl_init.lua and an init.lua, so they would play a song when i press e on them ( like the nyan cat radio on ttt_rooftops map ) and i also tried so it would give me a weapon when i press e on it aswell, but it ended in crap, when i clicked it on entities menu, it came up with either a massive error model playing the song, an invisible model or it freezes the game, im asking if anyone can tell me what should i put in my shared.lua, cl_init.lua and init.lua or whatever i am doing wrong

thanks