rendered paste body--Thanks SteveUK for the scope tutorial.if ( SERVER ) then AddCSLuaFile( "shared.lua" ) SWEP.HoldType = "ar2" endif ( CLIENT ) then SWEP.PrintName = "LR300" SWEP.Author = "Sanuska" SWEP.Slot = 3 SWEP.SlotPos = 1 SWEP.DrawCrosshair = true SWEP.IconLetter = "e" killicon.AddFont( "weapon_aug", "CSKillIcons", SWEP.IconLetter, Color( 255, 80, 0, 255 ) ) endSWEP.Base = "weapon_cs_base"SWEP.Spawnable = trueSWEP.AdminSpawnable = trueSWEP.ViewModel = "models/weapons/v_rif_lr3.mdl"SWEP.WorldModel = "models/weapons/w_rif_lr3.mdl"SWEP.Weight = 5SWEP.AutoSwitchTo = falseSWEP.AutoSwitchFrom = falseSWEP.Primary.Sound = Sound( "Weapon_Aug.Single" )SWEP.Primary.Recoil = 1SWEP.Primary.Damage = 15SWEP.Primary.NumShots = 1SWEP.Primary.Cone = 0.01SWEP.Primary.ClipSize = 30SWEP.Primary.Delay = 0.1SWEP.Primary.DefaultClip = 50SWEP.Primary.Automatic = trueSWEP.Primary.Ammo = "smg1"SWEP.Secondary.ClipSize = -1SWEP.Secondary.DefaultClip = -1SWEP.Secondary.Automatic = falseSWEP.Secondary.Ammo = "none"ScopeLevel = 0/*--------------------------------------------------------- PrimaryAttack---------------------------------------------------------/*function SWEP:PrimaryAttack() if ( ScopeLevel == 0 ) then self.Primary.Recoil = 1 self.Primary.Cone = 0.1 self.Primary.Delay = 0.1 else self.Primary.Automatic = false self.Primary.Recoil = 0.0 self.Primary.Cone = 0.0001 self.Primary.Delay = 0.9 end self.Weapon:SetNextSecondaryFire( CurTime() + self.Primary.Delay ) self.Weapon:SetNextPrimaryFire( CurTime() + self.Primary.Delay ) if ( !self:CanPrimaryAttack() ) then return end // Play shoot sound self.Weapon:EmitSound( self.Primary.Sound ) // Shoot the bullet self:CSShootBullet( self.Primary.Damage, self.Primary.Recoil, self.Primary.NumShots, self.Primary.Cone ) // Remove 1 bullet from our clip self:TakePrimaryAmmo( 1 ) // Punch the player's view self.Owner:ViewPunch( Angle( math.Rand(-0.2,-0.1) * self.Primary.Recoil, math.Rand(-0.1,0.1) *self.Primary.Recoil, 0 ) ) end/*--------------------------------------------------------- SecondaryAttack---------------------------------------------------------*/function SWEP:SecondaryAttack() if(ScopeLevel == 0) then if (SERVER) then self.Owner:SetFOV( 45, 0 ) end ScopeLevel = 1 else if (ScopeLevel == 1) then if (SERVER) then self.Owner:SetFOV( 25, 0 ) end ScopeLevel = 2 else if (SERVER) then self.Owner:SetFOV( 0, 0 ) end ScopeLevel = 0 endend/*--------------------------------------------------------- Holster---------------------------------------------------------*/function SWEP:Holster() self.Owner:SetFOV( 0, 0 ) ScopeLevel = 0 return trueend