local Y=require(Tool:WaitForChild("\083\101\116\116\105\110\103"))local Q=script:WaitForChild("\067\104\097\110\103\101\077\097\103\065\110\100\065\109\109\111")local J local p if Y.DualEnabled then p=Tool:WaitForChild("\072\097\110\100\108\101\050",1)if p==nil and Y.DualEnabled then error("\"\068\117\097\108\" \115\101\116\116\105\110\103 \105\115 \101\110\097\098\108\101\100 \098\117\116 \"\072\097\110\100\108\101\050\" \105\115 \109\105\115\115\105\110\103\033")end end local H=script:FindFirstChild("\077\097\103")or Instance.new("\078\117\109\098\101\114\086\097\108\117\101",script)H.Name="\077\097\103"H.Value=Y.AmmoPerMag local V=script:FindFirstChild("\065\109\109\111")or Instance.new("\078\117\109\098\101\114\086\097\108\117\101",script)V.Name="\065\109\109\111"V.Value=Y.LimitedAmmoEnabled and Y.Ammo or 0 if Y.IdleAnimationID~=nil or Y.DualEnabled then local Q=Instance.new("\065\110\105\109\097\116\105\111\110",Tool)Q.Name="\073\100\108\101\065\110\105\109"Q.AnimationId="\114\098\120\097\115\115\101\116\105\100\058\047\047"..(Y.DualEnabled and 53610688 or Y.IdleAnimationID)end if Y.FireAnimationID~=nil then local Q=Instance.new("\065\110\105\109\097\116\105\111\110",Tool)Q.Name="\070\105\114\101\065\110\105\109"Q.AnimationId="\114\098\120\097\115\115\101\116\105\100\058\047\047"..Y.FireAnimationID end if Y.ReloadAnimationID~=nil then local Q=Instance.new("\065\110\105\109\097\116\105\111\110",Tool)Q.Name="\082\101\108\111\097\100\065\110\105\109"Q.AnimationId="\114\098\120\097\115\115\101\116\105\100\058\047\047"..Y.ReloadAnimationID end if Y.ShotgunClipinAnimationID~=nil then local Q=Instance.new("\065\110\105\109\097\116\105\111\110",Tool)Q.Name="\083\104\111\116\103\117\110\067\108\105\112\105\110\065\110\105\109"Q.AnimationId="\114\098\120\097\115\115\101\116\105\100\058\047\047"..Y.ShotgunClipinAnimationID end if Y.ShotgunPumpinAnimationID~=nil then local Q=Instance.new("\065\110\105\109\097\116\105\111\110",Tool)Q.Name="\083\104\111\116\103\117\110\080\117\109\112\105\110\065\110\105\109"Q.AnimationId="\114\098\120\097\115\115\101\116\105\100\058\047\047"..Y.ShotgunPumpinAnimationID end if Y.HoldDownAnimationID~=nil then local Q=Instance.new("\065\110\105\109\097\116\105\111\110",Tool)Q.Name="\072\111\108\100\068\111\119\110\065\110\105\109"Q.AnimationId="\114\098\120\097\115\115\101\116\105\100\058\047\047"..Y.HoldDownAnimationID end if Y.EquippedAnimationID~=nil then local Q=Instance.new("\065\110\105\109\097\116\105\111\110",Tool)Q.Name="\069\113\117\105\112\112\101\100\065\110\105\109"Q.AnimationId="\114\098\120\097\115\115\101\116\105\100\058\047\047"..Y.EquippedAnimationID end if Y.SecondaryFireAnimationEnabled and Y.SecondaryFireAnimationID~=nil then local Q=Instance.new("\065\110\105\109\097\116\105\111\110",Tool)Q.Name="\083\101\099\111\110\100\097\114\121\070\105\114\101\065\110\105\109"Q.AnimationId="\114\098\120\097\115\115\101\116\105\100\058\047\047"..Y.SecondaryFireAnimationID end if Y.SecondaryShotgunPump and Y.SecondaryShotgunPumpinAnimationID~=nil then local Q=Instance.new("\065\110\105\109\097\116\105\111\110",Tool)Q.Name="\083\101\099\111\110\100\097\114\121\083\104\111\116\103\117\110\080\117\109\112\105\110\065\110\105\109"Q.AnimationId="\114\098\120\097\115\115\101\116\105\100\058\047\047"..Y.SecondaryShotgunPumpinAnimationID end if Y.AimAnimationsEnabled and Y.AimIdleAnimationID~=nil then local Q=Instance.new("\065\110\105\109\097\116\105\111\110",Tool)Q.Name="\065\105\109\073\100\108\101\065\110\105\109"Q.AnimationId="\114\098\120\097\115\115\101\116\105\100\058\047\047"..Y.AimIdleAnimationID end if Y.AimAnimationsEnabled and Y.AimFireAnimationID~=nil then local Q=Instance.new("\065\110\105\109\097\116\105\111\110",Tool)Q.Name="\065\105\109\070\105\114\101\065\110\105\109"Q.AnimationId="\114\098\120\097\115\115\101\116\105\100\058\047\047"..Y.AimFireAnimationID end if Y.AimAnimationsEnabled and Y.AimSecondaryFireAnimationID~=nil then local Q=Instance.new("\065\110\105\109\097\116\105\111\110",Tool)Q.Name="\065\105\109\083\101\099\111\110\100\097\114\121\070\105\114\101\065\110\105\109"Q.AnimationId="\114\098\120\097\115\115\101\116\105\100\058\047\047"..Y.AimSecondaryFireAnimationID end if Y.TacticalReloadAnimationEnabled and Y.TacticalReloadAnimationID~=nil then local Q=Instance.new("\065\110\105\109\097\116\105\111\110",Tool)Q.Name="\084\097\099\116\105\099\097\108\082\101\108\111\097\100\065\110\105\109"Q.AnimationId="\114\098\120\097\115\115\101\116\105\100\058\047\047"..Y.TacticalReloadAnimationID end if Y.InspectAnimationEnabled and Y.InspectAnimationID~=nil then local Q=Instance.new("\065\110\105\109\097\116\105\111\110",Tool)Q.Name="\073\110\115\112\101\099\116\065\110\105\109"Q.AnimationId="\114\098\120\097\115\115\101\116\105\100\058\047\047"..Y.InspectAnimationID end

local Module = require(Tool:WaitForChild("Setting"))
local ChangeMagAndAmmo = script:WaitForChild("ChangeMagAndAmmo")
local Grip2
local Handle2

if Module.DualEnabled then
	Handle2 = Tool:WaitForChild("Handle2",1)
	if Handle2 == nil and Module.DualEnabled then error("\"Dual\" setting is enabled but \"Handle2\" is missing!") end
end

local MagValue = script:FindFirstChild("Mag") or Instance.new("NumberValue",script)
MagValue.Name = "Mag"
MagValue.Value = Module.AmmoPerMag
local AmmoValue = script:FindFirstChild("Ammo") or Instance.new("NumberValue",script)
AmmoValue.Name = "Ammo"
AmmoValue.Value = Module.LimitedAmmoEnabled and Module.Ammo or 0

if Module.IdleAnimationID ~= nil or Module.DualEnabled then
	local IdleAnim = Instance.new("Animation",Tool)
	IdleAnim.Name = "IdleAnim"
	IdleAnim.AnimationId = "rbxassetid://"..(Module.DualEnabled and 53610688 or Module.IdleAnimationID)
end
if Module.FireAnimationID ~= nil then
	local FireAnim = Instance.new("Animation",Tool)
	FireAnim.Name = "FireAnim"
	FireAnim.AnimationId = "rbxassetid://"..Module.FireAnimationID
end
if Module.ReloadAnimationID ~= nil then
	local ReloadAnim = Instance.new("Animation",Tool)
	ReloadAnim.Name = "ReloadAnim"
	ReloadAnim.AnimationId = "rbxassetid://"..Module.ReloadAnimationID
end
if Module.ShotgunClipinAnimationID ~= nil then
	local ShotgunClipinAnim = Instance.new("Animation",Tool)
	ShotgunClipinAnim.Name = "ShotgunClipinAnim"
	ShotgunClipinAnim.AnimationId = "rbxassetid://"..Module.ShotgunClipinAnimationID
end
if Module.ShotgunPumpinAnimationID ~= nil then
	local ShotgunPumpinAnim = Instance.new("Animation",Tool)
	ShotgunPumpinAnim.Name = "ShotgunPumpinAnim"
	ShotgunPumpinAnim.AnimationId = "rbxassetid://"..Module.ShotgunPumpinAnimationID
end
if Module.HoldDownAnimationID ~= nil then
	local HoldDownAnim = Instance.new("Animation",Tool)
	HoldDownAnim.Name = "HoldDownAnim"
	HoldDownAnim.AnimationId = "rbxassetid://"..Module.HoldDownAnimationID
end
if Module.EquippedAnimationID ~= nil then
	local EquippedAnim = Instance.new("Animation",Tool)
	EquippedAnim.Name = "EquippedAnim"
	EquippedAnim.AnimationId = "rbxassetid://"..Module.EquippedAnimationID
end
if Module.SecondaryFireAnimationEnabled and Module.SecondaryFireAnimationID ~= nil then
	local SecondaryFireAnim = Instance.new("Animation",Tool)
	SecondaryFireAnim.Name = "SecondaryFireAnim"
	SecondaryFireAnim.AnimationId = "rbxassetid://"..Module.SecondaryFireAnimationID
end
if Module.SecondaryShotgunPump and Module.SecondaryShotgunPumpinAnimationID ~= nil then
	local SecondaryShotgunPumpinAnim = Instance.new("Animation",Tool)
	SecondaryShotgunPumpinAnim.Name = "SecondaryShotgunPumpinAnim"
	SecondaryShotgunPumpinAnim.AnimationId = "rbxassetid://"..Module.SecondaryShotgunPumpinAnimationID
end
if Module.AimAnimationsEnabled and Module.AimIdleAnimationID ~= nil then
	local AimIdleAnim = Instance.new("Animation",Tool)
	AimIdleAnim.Name = "AimIdleAnim"
	AimIdleAnim.AnimationId = "rbxassetid://"..Module.AimIdleAnimationID
end
if Module.AimAnimationsEnabled and Module.AimFireAnimationID ~= nil then
	local AimFireAnim = Instance.new("Animation",Tool)
	AimFireAnim.Name = "AimFireAnim"
	AimFireAnim.AnimationId = "rbxassetid://"..Module.AimFireAnimationID
end
if Module.AimAnimationsEnabled and Module.AimSecondaryFireAnimationID ~= nil then
	local AimSecondaryFireAnim = Instance.new("Animation",Tool)
	AimSecondaryFireAnim.Name = "AimSecondaryFireAnim"
	AimSecondaryFireAnim.AnimationId = "rbxassetid://"..Module.AimSecondaryFireAnimationID
end
if Module.TacticalReloadAnimationEnabled and Module.TacticalReloadAnimationID ~= nil then
	local TacticalReloadAnim = Instance.new("Animation",Tool)
	TacticalReloadAnim.Name = "TacticalReloadAnim"
	TacticalReloadAnim.AnimationId = "rbxassetid://"..Module.TacticalReloadAnimationID
end
if Module.InspectAnimationEnabled and Module.InspectAnimationID ~= nil then
	local InspectAnim = Instance.new("Animation",Tool)
	InspectAnim.Name = "InspectAnim"
	InspectAnim.AnimationId = "rbxassetid://"..Module.InspectAnimationID
end
