Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[ Edited Version
- ====================================================================================================
- Weapons and Tools Pack 2016's Gun by SuperEvilAzmil and edited by thienbao2109
- Features:
- - FilteringEnabled support
- - Easy to edit with a bunch of settings
- - No delays between Mouse Click and Gun Fire
- ====================================================================================================
- ]]
- local Module = {
- -- ====================
- -- BASIC
- -- A basic settings for the gun
- -- ====================
- Auto = true;
- BaseDamage = 20;
- FireRate = 0.09; --In second
- ReloadTime = 3.5; --In second
- AmmoPerMag = 999999999999999999999999999999999999999999999; --Put "math.huge" to make this gun has infinite ammo and never reload
- Spread = 4; --In degree
- Range = 5000; --The furthest distance the bullet can travel
- HeadshotEnabled = true; --Enable the gun to do extra damage on headshot
- HeadshotDamageMultiplier = 2;
- EquipTime = 0; --In second
- IdleAnimationID = 740934097; --Set to "nil" if you don't want to animate
- IdleAnimationSpeed = 1;
- FireAnimationID = 740938913; --Set to "nil" if you don't want to animate
- FireAnimationSpeed = 1;
- ReloadAnimationID = 740975980; --Set to "nil" if you don't want to animate
- ReloadAnimationSpeed = 0.35;
- EquippedAnimationID = nil; --Set to "nil" if you don't want to animate
- EquippedAnimationSpeed = 1;
- --Enable the user to play second animation. Useful for dual wield
- SecondaryFireAnimationEnabled = false; --You need an animation ID in order to enable it
- SecondaryFireAnimationID = nil; --Set to "nil" if you don't want to animate
- SecondaryFireAnimationSpeed = 1;
- --Enable the user to play aim animations
- AimAnimationsEnabled = false;
- AimIdleAnimationID = nil; --Set to "nil" if you don't want to animate
- AimIdleAnimationSpeed = 1;
- AimFireAnimationID = nil; --Set to "nil" if you don't want to animate
- AimFireAnimationSpeed = 1;
- AimSecondaryFireAnimationID = nil; --Set to "nil" if you don't want to animate. NOTE: Make sure "SecondaryFireAnimation" setting is enabled
- AimSecondaryFireAnimationSpeed = 1;
- -- ====================
- -- DAMAGE DROPOFF
- -- Calculate how the damage of a single shot decreases when the target hit is at a distance away from the gun shot. NOTE: This setting won't apply with "ExplosiveEnabled"
- -- ====================
- DamageDropOffEnabled = false;
- ZeroDamageDistance = 10000; --Anything hit at or beyond this distance will receive no damage; default is 10000
- FullDamageDistance = 1000; --Maximum distance that shots will do full damage. Default is 1000 and anything hit beyond this distance will receive less and less damage as the distance nears "ZeroDamageDistance"
- -- ====================
- -- GORE VISUALIZER
- -- Create gore effect when humanoid died
- -- ====================
- GoreEffectEnabled = false;
- GoreSoundIDs = {1930359546};
- GoreSoundPitchMin = 1; --Minimum pitch factor you will acquire
- GoreSoundPitchMax = 1.5; --Maximum pitch factor you will acquire
- GoreSoundVolume = 1;
- -- ====================
- -- CRITICAL DAMAGE
- -- Damage critically within its chance
- -- ====================
- CriticalDamageEnabled = false;
- CriticalBaseChance = 5; --In percent
- CriticalDamageMultiplier = 3;
- -- ====================
- -- FIRE SOUND EFFECTS
- -- Special effects for fire sound
- -- ====================
- SilenceEffect = false; --Lower volume
- EchoEffect = true; --Create echo effect from distance
- -- ====================
- -- WALK SPEED REDUTION
- -- Nerf chraracter's walk speed when equip the gun
- -- ====================
- WalkSpeedRedutionEnabled = false;
- WalkSpeedRedution = 6;
- -- ====================
- -- TACTICAL RELOAD ANIMATION
- -- Reload the gun that has only fired a few rounds out of its magazine
- -- ====================
- TacticalReloadAnimationEnabled = false;
- TacticalReloadAnimationID = nil; --Set to "nil" if you don't want to animate
- TacticalReloadAnimationSpeed = 1;
- -- ====================
- -- HOLD DOWN ANIMATION
- -- Character won't fire if hold down the gun
- -- ====================
- HoldDownEnabled = true;
- HoldDownAnimationID = 1637489010;
- HoldDownAnimationSpeed = 0.5;
- -- ====================
- -- BULLET HOLE VISUALIZER
- -- Create a bullet hole when a bullet hit something but not character
- -- ====================
- BulletHoleEnabled = true;
- BulletHoleSize = 0.5;
- BulletHoleTexture = {2078626}; --You can insert more IDs
- BulletHoleVisibleTime = 3; --In second
- BulletHoleFadeTime = 1; --In second
- PartColor = true; --Set to hit object color
- -- ====================
- -- HIT VISUALIZER
- -- Create hit effect when a bullet hit something but not character(And hit sound, too)
- -- ====================
- HitEffectEnabled = true;
- HitSoundIDs = {186809061, 186809249, 186809250, 186809252};
- HitSoundPitchMin = 1; --Minimum pitch factor you will acquire
- HitSoundPitchMax = 1.5; --Maximum pitch factor you will acquire
- HitSoundVolume = 1;
- CustomHitEffect = false; --Emits your custom hit effect. NOTE: If you this setting disabled, hit effect will set to default(material tracker included)
- AlignHitEffectToNormal = true; --Make effect face straight out from surface where projectile hit. Good for things like arrows if it disabled
- -- ====================
- -- BLOOD VISUALIZER
- -- Create blood when a bullet hit character(And hit character sound, too)
- -- ====================
- BloodEnabled = true;
- HitCharSndIDs = {3802437008, 3802437361, 3802437696, 3802440043, 3802440388, 3802442962};
- HitCharSndPitchMin = 1; --Minimum pitch factor you will acquire
- HitCharSndPitchMax = 1; --Maximum pitch factor you will acquire
- HitCharSndVolume = 1;
- AlignBloodEffectToNormal = true; --Make effect face straight out from surface where projectile hit. Good for things like arrows if it disabled
- -- ====================
- -- TWEEN SETTING
- -- Part of ironsight and sniper aim
- -- ====================
- TweenLength = 0.8; --In second
- EasingStyle = Enum.EasingStyle.Quint; --Linear, Sine, Back, Quad, Quart, Quint, Bounce or Elastic?
- EasingDirection = Enum.EasingDirection.Out; --In, Out or InOut?
- -- ====================
- -- TWEEN SETTING(NO AIM DOWN)
- -- Part of ironsight and sniper aim
- -- ====================
- TweenLengthNAD = 0.8; --In second
- EasingStyleNAD = Enum.EasingStyle.Quint; --Linear, Sine, Back, Quad, Quart, Quint, Bounce or Elastic?
- EasingDirectionNAD = Enum.EasingDirection.Out; --In, Out or InOut?
- -- ====================
- -- BULLET WHIZZING SOUND
- -- Create a sound when a bullet travelling through character
- -- ====================
- WhizSoundEnabled = true;
- WhizSoundID = {3809084884, 3809085250, 3809085650, 3809085996, 3809086455};
- WhizSoundVolume = 1;
- WhizSoundPitchMin = 1; --Minimum pitch factor you will acquire
- WhizSoundPitchMax = 1; --Maximum pitch factor you will acquire
- WhizDistance = 25;
- -- Make sure "CanMovePart" is enabled. Otherwise, it won't work
- -- ====================
- -- HITMARKER
- -- Mark on somewhere when a bullet hit character
- -- ====================
- HitmarkerEnabled = true;
- HitmarkerSoundID = {3748776946, 3748777642, 3748780065};
- --Normal
- HitmarkerColor = Color3.fromRGB(255, 255, 255);
- HitmarkerFadeTime = 0.4;
- HitmarkerSoundPitch = 1;
- --Headshot
- HitmarkerColorHS = Color3.fromRGB(255, 0, 0);
- HitmarkerFadeTimeHS = 0.4;
- HitmarkerSoundPitchHS = 1;
- -- ====================
- -- CROSSHAIR
- -- A gun cursor
- -- ====================
- CrossSize = 5;
- CrossExpansion = 50;
- CrossSpeed = 15;
- CrossDamper = 0.8;
- -- ====================
- -- MUZZLE
- -- Create a muzzle flash when firing
- -- ====================
- MuzzleFlashEnabled = true;
- MuzzleLightEnabled = true;
- LightBrightness = 4;
- LightColor = Color3.new(255/255, 283/255, 0/255);
- LightRange = 15;
- LightShadows = true;
- VisibleTime = 0.01; --In second
- -- ====================
- -- BULLET SHELL EJECTION
- -- Eject bullet shells when firing
- -- ====================
- BulletShellEnabled = true;
- BulletShellOffset = Vector3.new(0, 0.4, -1);
- ShellSize = Vector3.new(0.2, 0.2, 0.62); --Scale the part
- AllowCollide = false; --If false, a bullet shell will go through any parts
- ShellScale = Vector3.new(4, 4, 4); --Scale mesh
- ShellMeshID = 94295100;
- ShellTextureID = 94287792;
- DisappearTime = 5; --In second
- -- You can edit velocity by go to GunScript_Local, and scroll down until you see "function EjectShell(ShootingHandle)"
- -- ====================
- -- IRONSIGHT
- -- Allow user to ironsighting
- -- ====================
- IronsightEnabled = true; --NOTE: If "SniperEnabled" is enabled, this setting is not work
- FieldOfViewIS = 50;
- MouseSensitiveIS = 0.2; --In percent
- SpreadRedutionIS = 0.6; --In percent. NOTE: Must be the same value as "SpreadRedutionS"
- CrossScaleIS = 0.6;
- -- ====================
- -- LIMITED AMMO
- -- Make a gun has a limit ammo
- -- ====================
- LimitedAmmoEnabled = true;
- Ammo = 120;
- MaxAmmo = 120; --Put "math.huge" to allow user to carry unlimited ammo
- -- ====================
- -- SHOTGUN
- -- Enable the gun to fire multiple bullet in one shot
- -- ====================
- ShotgunEnabled = false;
- BulletPerShot = 8;
- ShotgunPump = false; --Make user pumping like Shotgun after firing
- ShotgunPumpinAnimationID = nil; --Set to "nil" if you don't want to animate
- ShotgunPumpinAnimationSpeed = 1;
- ShotgunPumpinSpeed = 0.5; --In second
- SecondaryShotgunPump = false; --Only for dual wield
- SecondaryShotgunPumpinAnimationID = nil; --Set to "nil" if you don't want to animate
- SecondaryShotgunPumpinAnimationSpeed = 1;
- SecondaryShotgunPumpinSpeed = 0.5; --In second
- ShotgunReload = false; --Make user reloading like Shotgun, which user clipin shell one by one
- ShotgunClipinAnimationID = nil; --Set to "nil" if you don't want to animate
- ShotgunClipinAnimationSpeed = 1;
- ShellClipinSpeed = 0.5; --In second
- ShotgunPattern = false;
- SpreadPattern = { --{x, y}. This should be the same as "BulletPerShot"
- -- inner 3
- {0, -0.4};
- {-0.35, 0.2};
- {0.35, 0.2};
- -- outer five
- {0, 1};
- {0.95, 0.31};
- {0.59, -0.81};
- {-0.59, -0.81};
- {-0.95, 0.31};
- };
- -- How "ShotgunPump" works [Example 1]:
- -- Fire a (shot)gun
- -- >>>
- -- After "FireRate", user will pump it, creates pumpin delay + "PumpSound"
- -- How "ShotgunReload" works [Example 2]:
- -- Play "ShotgunClipinAnimation" + Play "ShotgunClipin" Audio
- -- >>>
- -- Wait "ShellClipinSpeed" second(s)
- -- >>>
- -- Repeat "AmmoPerClip" - "Current Ammo" times
- -- >>>
- -- Play "ReloadAnimation" + Play "ReloadSound"
- -- >>>
- -- Wait "ReloadTime"
- -- ====================
- -- BURST FIRE
- -- Enable the gun to do burst firing like Assault Rifle
- -- ====================
- BurstFireEnabled = false;
- BulletPerBurst = 3;
- BurstRate = 0.075; --In second
- -- ====================
- -- SNIPER
- -- Enable user to use scope
- -- ====================
- SniperEnabled = false; --NOTE: If "IronsightEnabled" is enabled, this setting is not work
- FieldOfViewS = 12.5;
- MouseSensitiveS = 0.2; --In percent
- SpreadRedutionS = 0.6; --In percent. NOTE: Must be the same value as "SpreadRedutionOS"
- CrossScaleS = 0;
- ScopeSensitive = 0.25;
- ScopeKnockbackSpeed = 7;
- ScopeKnockbackDamper = 0.65;
- ScopeSwaySpeed = 10;
- ScopeSwayDamper = 0.4;
- -- You can edit knockback offset by go to GunScript_Local, and scroll down until you reach line 421 and 486
- -- ====================
- -- CAMERA RECOILING
- -- Make user's camera recoiling when shooting
- -- ====================
- CameraRecoilingEnabled = true;
- Recoil = 30;
- AngleX_Min = 1; --In degree
- AngleX_Max = 1; --In degree
- AngleY_Min = -.5; --In degree
- AngleY_Max = .5; --In degree
- AngleZ_Min = -1; --In degree
- AngleZ_Max = 1; --In degree
- Accuracy = 0.1; --In percent. For example: 0.5 is 50%
- RecoilSpeed = 18;
- RecoilDamper = 0.65;
- RecoilRedution = 0.5; --In percent.
- -- ====================
- -- EXPLOSIVE
- -- Make a bullet explosive so user can deal a damage to multiple enemy in single shot. NOTE: Explosion won't break joints
- -- ====================
- ExplosiveEnabled = false;
- ExplosionSoundEnabled = true;
- ExplosionSoundIDs = {163064102};
- ExplosionSoundVolume = 1;
- ExplosionSoundPitchMin = 1; --Minimum pitch factor you will acquire
- ExplosionSoundPitchMax = 1.5; --Maximum pitch factor you will acquire
- ExplosionRadius = 8;
- DamageBasedOnDistance = false;
- CustomExplosion = false;
- AlignCustomExplosionToNormal = true; --Make effect face straight out from surface where projectile hit. Good for things like arrows if it disabled
- -- ====================
- -- PROJECTILE VISUALIZER
- -- Display a travelling projectile
- -- ====================
- ProjectileType = "NewBullet";
- BeamWidth0 = 0.4;
- BeamWidth1 = 0.4;
- BeamFadeTime = nil;
- BulletSpeed = 4000;
- GravityFactor = 0;
- TrailLength = nil;
- TrailLengthFactor = 1;
- ShowEntireTrailUntilHit = false;
- CanMovePart = true;
- CanSpinPart = false;
- SpinX = 3;
- SpinY = 0;
- SpinZ = 0;
- -- ====================
- -- CHARGED SHOT
- -- Make a gun charging before firing. Useful for a gun like "Railgun" or "Laser Cannon"
- -- ====================
- ChargedShotEnabled = false;
- ChargingTime = 1;
- -- ====================
- -- MINIGUN
- -- Make a gun delay before/after firing
- -- ====================
- MinigunEnabled = false;
- DelayBeforeFiring = 1;
- DelayAfterFiring = 1;
- -- ====================
- -- MISCELLANEOUS
- -- Etc. settings for the gun
- -- ====================
- Knockback = 0; --Setting above 0 will enabling the gun to push enemy back.
- Lifesteal = 0; --In percent - Setting above 0 will allow user to steal enemy's health by dealing a damage to them.
- FlamingBullet = false; --Enable the bullet to set enemy on fire. Its DPS and Duration can be edited inside "IgniteScript"
- IgniteChance = 100;
- FreezingBullet = false; --Enable the bullet to freeze enemy. Its Duration can be edited inside "IcifyScript"
- IcifyChance = 100;
- DualEnabled = false; --Enable the user to hold two guns instead one. In order to make this setting work, you must clone its Handle and name it to "Handle2". Enabling this setting will override Idle Animation ID.
- --Piercing = 0; --Setting above 0 will enabling the gun to penetrate up to XX victim(s). Cannot penetrate wall. NOTE: It doesn't work with "ExplosiveEnabled"
- -- ====================
- -- END OF SETTING
- -- ====================
- }
- return Module
Add Comment
Please, Sign In to add comment