Melee weapon help

How do I make a melee weapon. I just want an example in lua.

[lua]function SWEP:PrimaryAttack()
self.Weapon:SetNextPrimaryFire(CurTime() + .4)

local trace = self.Owner:GetEyeTrace()

if trace.HitPos:Distance(self.Owner:GetShootPos()) <= 75 then
self.Weapon:SendWeaponAnim(ACT_VM_HITCENTER)
bullet = {}
bullet.Num = 1
bullet.Src = self.Owner:GetShootPos()
bullet.Dir = self.Owner:GetAimVector()
bullet.Spread = Vector(0, 0, 0)
bullet.Tracer = 0
bullet.Force = 1
bullet.Damage = 25
self.Owner:FireBullets(bullet)
self.Weapon:EmitSound("")
else
self.Weapon:EmitSound("" … math.random( 1, 4 ) … “.wav”)
self.Weapon:SendWeaponAnim(ACT_VM_MISSCENTER)
end

end[/lua]

Took this from someone’s random axe thing.