Duplicating tools

I need help in making so that my tools do not duplicate I’ve tried for a while and found n no solutions.
Image from studio of the backpack.

.

We can’t help you if you don’t show us your code.

1 Like

let me get a screenshot of the code.

It’s better if you put it in a code block

--Like This

Just put ``` at the start and end of the code

one of the codes of the gun

local Tool = script.Parent
local Settings = {
Range = 600
,Spread = 4
,Damage = {40, 60}
,HeadShotDamage = {100, 1000}
,Bullets = 1
,FireRate = 0.0001
,Automatic = false
,AntiTK = false
,ImpactDuration = 0.1
–Reload
,ReloadKey = “R”
,ReloadTime = 1
,Ammo = 17
,IncludeChamberedBullet = false
,UnloadKey = “Q”
,AutoKey = “F”
,SemiKey = “G”
,DustCoverKey = “E”
,PortArmsKey= “T”
,EaseSpringsKey= “Y”
,SKey= “N”
,FKey= “M”
,BKey= “B”
,VKey= “V”
,PatrolKey= “H”
,CombatKey= “J”
,RightChamKey= “U”
–Gui
,GuiPos = Vector2.new(script.Gui.Frame.Position.X.Scale, script.Gui.Frame.Position.Y.Scale)
–Arms
,OneHanded = false
,FakeArms = false
,FakeArmTransparency = 0
,RightPos = CFrame.new(-0.7, 0.6, 0.6) * CFrame.Angles(math.rad(-90), 0, 0)
,LeftPos = CFrame.new(1, 0.5, 0.6) * CFrame.Angles(math.rad(-90), math.rad(45), 0)
,AimPart = Tool.AimPart
,AimPartOffset = CFrame.new()
,AimGripOffset = Vector3.new(0, 0, 0)
,LeftAimPos = CFrame.new(1, 0.5, 0.5) * CFrame.Angles(math.rad(-100), math.rad(45), 0)
,AimAnim = {
Enabled = false
,Frames = 100
,Time = 0.2
}
,ChangeFOV = {true, 55}
,SpreadReduction = 0
–Weld
,Weld = true
–Mouse
,Icons = {
Idle = “rbxasset://textures/Blank.png”
,Fire1 = “rbxasset://textures/Blank.png”
,Fire2 = “rbxasset://textures/Blank.png”
,Fire3 = “rbxasset://textures/Blank.png”
,Reload = “rbxasset://textures/Blank.png”
,Aim = “rbxasset://textures/Blank.png”
}
,FireMouseAnimTime = 0
–Recoil
,Recoil = math.rad(1)
–Sprint
,Sprint = false
,SprintSpeed = 25
,SprintKey = “0”
,SprintSpreadIncrease = 25
,SprintArmOffset = CFrame.new(0.25, 0.125, 0.25) * CFrame.Angles(math.rad(-30), math.rad(35), 0)
–Other
,DropHats = false
,PatrolArmOffset = CFrame.new(0.25, 0.125, 0.25) * CFrame.Angles(math.rad(-50), math.rad(-50), 0)
,PatrolArmOffset1 = CFrame.new(0.15, 0.7, 0.5) * CFrame.Angles(math.rad(-40), math.rad(-40), 0)
}

–Do not edit below this lign–

local Orig_Spread = Settings.Spread
local Orig_Grip = Tool.GripPos

local Player = game.Players.LocalPlayer
local Character = Player.Character

local Camera = Workspace.CurrentCamera

local Ammo, StoredAmmo = script.Ammo, script.StoredAmmo

local Gui, CanUpdateGui = nil, true

local Sprinting, Equipped

Sprinting = false

function Update_Gui()
if Gui and CanUpdateGui then
Gui.Frame.AmmoDisplay.Text = Ammo.Value … “|” … StoredAmmo.Value
end
end

local Welded
if Settings.Weld then
Delay(0, function()
local weldC0s = {}
for i, v in pairs(Tool:GetChildren()) do
if v:IsA(“BasePart”) and v ~= Tool.Handle then
table.insert(weldC0s, {v, Tool.Handle.CFrame:toObjectSpace(v.CFrame)})
v.Anchored = false
end
end
Tool.Handle.Anchored = false
local welds = {}
Tool.Equipped:connect(function()
for i, v in ipairs(welds) do
v.Part1 = nil
v:Destroy()
end
for i, v in ipairs(weldC0s) do
if v[1] and v[2] then
local w = Instance.new(“Weld”, Tool.Handle)
w.Part0 = Tool.Handle
w.Part1 = v[1]
w.C0 = v[2]
table.insert(welds, w)
end
end
end)
wait()
Welded = true
end)
end

local Left_Weld, Right_Weld

DB = false
Loadable = true
Lid = true
Safety = false
Auto = false
Jammed = false
Rear = false

Ammo.Changed:connect(Update_Gui)
StoredAmmo.Changed:connect(Update_Gui)

Settings.Range = math.min(Settings.Range, 999)

local Ignore_Model = Workspace:FindFirstChild(“Ray_Ignore”) or Instance.new(“Model”, Workspace)
Ignore_Model.Name = “Ray_Ignore”

local Ray_Ignore = {Character, Ignore_Model, Camera}

Character.Humanoid.Died:connect(function()
Tool.Parent = Player.Backpack
end)

function Unload()
MagazineOut()
Tool.Ammo.Value = 0
end

function MagazineIn()
Tool.Mag2.Transparency = 0
Tool.Mag.Transparency = 1
wait(0.05)
Tool.Mag2.Transparency = 1
Tool.Mag.Transparency = 0
Tool.MagRound.Transparency = 0
end

function MagazineOut()
Tool.Mag2.Transparency = 0
Tool.Mag.Transparency = 1
Tool.MagRound.Transparency = 1
wait(0.1)
Tool.Mag2.Transparency = 1
end

function DustCover()
Tool.DustCoverClosed.Transparency = 0
Tool.DustCoverOpen.Transparency = 1
end

function Bolt()
Tool.A1.Transparency = 1
Tool.B1.Transparency = 1
Tool.C1.Transparency = 0
wait(0.0001)
Tool.A1.Transparency = 1
Tool.B1.Transparency = 0
Tool.C1.Transparency = 1
if Tool.Fired.Value == 1 then
Tool.Handle.Shoot:Play()
Tool.Fired.Value = 2
else
Tool.Handle.Shoot2:Play()
Tool.Fired.Value = 1
end
if Tool.Flash.Value > 8000 then
Tool.Muzzle.Flash.Enabled = true
Tool.Muzzle.Smoke.Enabled = true
Tool.Muzzle.Light.Enabled = true
Tool.Muzzle2.Smoke.Enabled = true
wait(0.0001)
round()
Tool.A1.Transparency = 0
Tool.B1.Transparency = 1
Tool.C1.Transparency = 1
Tool.Muzzle.Light.Enabled = false
Tool.Muzzle.Smoke.Enabled = false
Tool.Muzzle2.Smoke.Enabled = false
Tool.Muzzle.Flash.Enabled = false
Tool.Flash.Value = 0
Rear = false
else
Tool.Muzzle.Smoke.Enabled = true
Tool.Muzzle.Light.Enabled = true
Tool.Muzzle2.Smoke.Enabled = true
wait(0.0001)
round()
Tool.A1.Transparency = 0
Tool.B1.Transparency = 1
Tool.Muzzle.Light.Enabled = false
Tool.Muzzle.Smoke.Enabled = false
Tool.Muzzle2.Smoke.Enabled = false
Rear = false
end
end

function Empty()
Tool.A1.Transparency = 1
Tool.B1.Transparency = 1
Tool.C1.Transparency = 0
wait(0.0001)
Tool.A1.Transparency = 1
Tool.B1.Transparency = 0
Tool.C1.Transparency = 1
if Tool.Fired.Value == 1 then
Tool.Handle.Shoot:Play()
Tool.Fired.Value = 2
else
Tool.Handle.Shoot2:Play()
Tool.Fired.Value = 1
end
if Tool.Flash.Value > 8000 then
Tool.Muzzle.Flash.Enabled = true
Tool.Muzzle.Smoke.Enabled = true
Tool.Muzzle.Light.Enabled = true
Tool.Muzzle2.Smoke.Enabled = true
Tool.MagRound.Transparency = 1
wait(0.001)
round()
Tool.Muzzle.Light.Enabled = false
Tool.Muzzle.Smoke.Enabled = false
Tool.Muzzle2.Smoke.Enabled = false
Tool.Muzzle.Flash.Enabled = false
Tool.Flash.Value = 0
DB = false
Rear = true
else
Tool.Muzzle.Smoke.Enabled = true
Tool.Muzzle.Light.Enabled = true
Tool.Muzzle2.Smoke.Enabled = true
Tool.MagRound.Transparency = 1
wait(0.001)
round()
Tool.Muzzle.Light.Enabled = false
Tool.Muzzle.Smoke.Enabled = false
Tool.Muzzle2.Smoke.Enabled = false
DB = false
Rear = true
end
end

function PortArms()
Tool.A1.Transparency = 1
Tool.B1.Transparency = 1
Tool.C1.Transparency = 0
wait(0.0001)
Tool.A1.Transparency = 1
Tool.B1.Transparency = 0
Tool.C1.Transparency = 1
DB = false
Rear = true
end

function EaseSprings()
Tool.A1.Transparency = 1
Tool.B1.Transparency = 1
Tool.C1.Transparency = 0
wait(0.0001)
Tool.A1.Transparency = 0
Tool.B1.Transparency = 1
Tool.C1.Transparency = 1
DB = true
Rear = false
end

function SafetyOn()
Safety = true
Tool.Safe.Transparency = 0
Tool.Fire.Transparency = 1
Tool.Handle.SafetyClick:play()
end

function SafetyOff()
Tool.Handle.SafetyClick:play()
Tool.Safe.Transparency = 1
Tool.Fire.Transparency = 0
Safety = false
end

function BipodDown()
Tool.BipodDown.Transparency = 0
Tool.BipodUp.Transparency = 1
Bipod = true
Settings.Spread = 0
end

function BipodUp()
Tool.BipodDown.Transparency = 1
Tool.BipodUp.Transparency = 0
Bipod = false
Settings.Spread = 8
end

function Auto()
Tool.Handle.SafetyClick:play()
Settings.Automatic = true
Tool.CLRapid.Transparency = 1
Tool.CLAuto.Transparency = 0
end

function Semi()
Tool.Handle.SafetyClick:play()
Settings.Automatic = false
Tool.CLRapid.Transparency = 0
Tool.CLAuto.Transparency = 1
end

function round()
local shell = Tool.Casing:clone()
shell.Transparency = 0
shell.CFrame = Tool.Chamber.CFrame * CFrame.fromEulerAnglesXYZ(0,0,0)
shell.Name = “Shell”
shell.Velocity = Tool.Chamber.CFrame.lookVector * 25 + Vector3.new(math.random(-5,5),5,math.random(-5,5))
shell.RotVelocity = Vector3.new(0,110,0)
shell.CanCollide = false

shell.Parent = game.Workspace
game:GetService("Debris"):addItem(shell,6)	

end

function Fire(Mouse)
if Ammo.Value < 2 then
Empty()
else
Bolt()
end
Tool.Flash.Value = math.random(0,10000)
local Spread = CFrame.Angles(math.rad(math.random(-Settings.Spread, Settings.Spread)/10), math.rad(math.random(-Settings.Spread, Settings.Spread)/10), math.rad(math.random(-Settings.Spread, Settings.Spread)/10))
local Ray = Ray.new(Character.Head.Position, (CFrame.new(Character.Head.Position, Mouse.Hit.p) * Spread).lookVector.unit * Settings.Range)
local Hit, Pos = Workspace:FindPartOnRayWithIgnoreList(Ray, Ray_Ignore)
if Hit and Hit.Parent:FindFirstChild(“Humanoid”) then
local Hit_Player = game.Players:GetPlayerFromCharacter(Hit.Parent)
if Settings.AntiTK and not Hit_Player.Neutral and Hit_Player.TeamColor == Player.TeamColor then
return
end
local Humanoid = Hit.Parent.Humanoid
local c = Instance.new(“ObjectValue”)
c.Name = “creator”
c.Value = Player
game.Debris:AddItem(c, 3)
c.Parent = Humanoid
if Hit.Name == “Head” then
Humanoid.Health = Humanoid.Health - math.random(Settings.HeadShotDamage[1], Settings.HeadShotDamage[2])
else
Humanoid.Health = Humanoid.Health - math.random(Settings.Damage[1], Settings.Damage[2])
end
elseif Hit then
local Hit_Part = Instance.new(“Part”, Ignore_Model)
Hit_Part.FormFactor = “Custom”
Hit_Part.TopSurface = 0
Hit_Part.BottomSurface = 0
Hit_Part.Anchored = true
Hit_Part.CanCollide = false
Hit_Part.Size = Vector3.new()
Hit_Part.CFrame = CFrame.new(Pos) * CFrame.Angles(math.random(0, 360), math.random(0, 360), math.random(0, 360))
Hit_Part.BrickColor = BrickColor.new(“Black”)
Boom = Tool.Handle.Splash:Clone()
Boom.Parent = Hit_Part
Boom.Enabled = true
game.Debris:AddItem(Hit_Part, Settings.ImpactDuration)
local Meta = Instance.new(“Sound”)
Meta.Name = “Crack”
Meta.SoundId = “rbxassetid://151284431”
Meta.Volume = math.random(0.9,1)
Meta.Pitch = math.random(1,1.2)
Meta.Parent = Hit_Part
Meta:play()
if not Hit.Anchored then
local w = Instance.new(“Weld”, Hit_Part)
w.Part0 = Hit
w.Part1 = Hit_Part
w.C0 = Hit.CFrame:toObjectSpace(Hit_Part.CFrame)
Hit_Part.Anchored = false
end
if Hit.Parent:IsA(“Hat”) and Settings.DropHats then
Hit.Parent.Parent = workspace
game.Debris:AddItem(Hit, 3)
end
end
end

local Can_Shoot = false
local Reloading = false

local First_Person = false

local Mouse_Held

Patrol = false

Tool.Equipped:connect(function(Mouse)
Equipped = true
if Settings.Weld and not Welded then
wait()
Tool.Parent = Player.Backpack
end
Character = Player.Character
if Gui then
return
end
Ray_Ignore = {Character, Ignore_Model, Camera}
Mouse.Icon = Settings.Icons.Idle
Gui = script.Gui:Clone()
Gui.Parent = Player.PlayerGui
Gui.Frame.Position = UDim2.new(Settings.GuiPos.X, Gui.Frame.Position.X.Offset, 1.1, Gui.Frame.Position.Y.Offset)
Gui.Frame:TweenPosition(UDim2.new(Settings.GuiPos.X, Gui.Frame.Position.X.Offset, Settings.GuiPos.Y, Gui.Frame.Position.Y.Offset), “Out”, “Bounce”, 1)
CanUpdateGui = true
Update_Gui()
Mouse.Button1Down:connect(function()
if DB==true and Ammo.Value > 0 and Jammed==false and Lid==true and Safety==false and Character.Humanoid.Health > 0 and Mouse_Held==false and Sprinting == false then
Mouse_Held = true
while true do
Can_Shoot = false
Delay(0, function()
local t = math.min(Settings.FireMouseAnimTime/3, Settings.FireRate/3)
if not Aiming then
Mouse.Icon = Settings.Icons.Fire1
end
wait(t)
if not Aiming then
if Reloading then return end
Mouse.Icon = Settings.Icons.Fire2
end
wait(t)
if not Aiming then
if Reloading then return end
Mouse.Icon = Settings.Icons.Fire3
end
wait(t)
if not Aiming then
if Reloading then return end
Mouse.Icon = Settings.Icons.Idle
end
end)
if Settings.Smoke then
for i, v in pairs(Settings.Smokes) do
local s = v[1]:Clone()
s.Parent = Settings.SmokePart
s.Enabled = true
game.Debris:AddItem(s, v[2])
if v[3] then
Delay(v[3], function()
s.Enabled = false
end)
end
end
end
for _ = 1, Settings.Bullets do
pcall(function() Fire(Mouse) end)
end
Camera.CoordinateFrame = CFrame.new(Camera.Focus.p) * (Camera.CoordinateFrame - Camera.CoordinateFrame.p) * CFrame.Angles(0.06, 0, 0) * CFrame.new(0, 0, (Camera.Focus.p - Camera.CoordinateFrame.p).magnitude)
wait(0.0000001)
Camera.CoordinateFrame = CFrame.new(Camera.Focus.p) * (Camera.CoordinateFrame - Camera.CoordinateFrame.p) * CFrame.Angles(-0.02, 0, 0) * CFrame.new(0, 0, (Camera.Focus.p - Camera.CoordinateFrame.p).magnitude)
Ammo.Value = Ammo.Value - 1
if not Settings.Automatic or Ammo.Value <= 0 or Character.Humanoid.Health <= 0 or not Mouse_Held then
break
end
end
Can_Shoot = true
elseif Can_Shoot and Character.Humanoid.Health > 0 and Tool.Handle:FindFirstChild(“Click”) then
Tool.Handle.Click:Play()
end
end)
Mouse.Button1Up:connect(function()
Mouse_Held = false
end)
Mouse.KeyDown:connect(function(Key)
if Key:upper() == Settings.ReloadKey:upper() and Can_Shoot and StoredAmmo.Value > 0 and Loadable == true then
if Settings.IncludeChamberedBullet and Ammo.Value == Settings.Ammo + 1 or not Settings.IncludeChamberedBullet and Ammo.Value == Settings.Ammo then
return
end
Can_Shoot = false
Reloading = true
MagazineOut()
local TextLabel = Gui.Frame.AmmoDisplay
Delay(0, function()
CanUpdateGui = false
TextLabel.Text = “Reloading.”
wait(Settings.ReloadTime/3)
if TextLabel then
TextLabel.Text = “Reloading…”
end
wait(Settings.ReloadTime/3)
if TextLabel then
TextLabel.Text = “Reloading…”
end
end)
if Tool.Handle:FindFirstChild(“Reload”) then
Tool.Handle.Reload:Play()
end
Mouse.Icon = Settings.Icons.Reload
wait(Settings.ReloadTime)
MagazineIn()
Mouse.Icon = Settings.Icons.Idle
CanUpdateGui = true
local m = Settings.Ammo
if Ammo.Value > 0 and Settings.IncludeChamberedBullet then
m = m + 1
end
if (StoredAmmo.Value - (m - Ammo.Value)) <= 0 then
Ammo.Value = Ammo.Value + StoredAmmo.Value
StoredAmmo.Value = 0
else
StoredAmmo.Value = StoredAmmo.Value - (m - Ammo.Value)
Ammo.Value = m
end
Can_Shoot = true
Reloading = false
elseif Key:upper() == Settings.SprintKey:upper() and Settings.Sprint and not Aiming then
Sprinting = true
Character.Humanoid.WalkSpeed = Settings.SprintSpeed
Settings.Spread = Settings.Spread + Settings.SprintSpreadIncrease
end
end)
Mouse.KeyDown:connect(function(Key)
if Key:upper() == Settings.UnloadKey:upper() then
Unload()
wait (0.1)
end
end)
Mouse.KeyDown:connect(function(Key)
if Key:upper() == Settings.PortArmsKey:upper() and Rear==false then
PortArms()
wait (0.1)
end
end)
Mouse.KeyDown:connect(function(Key)
if Key:upper() == Settings.EaseSpringsKey:upper()and Rear==true then
EaseSprings()
wait (0.1)
end
end)
Mouse.KeyUp:connect(function(Key)
if Key:upper() == Settings.SprintKey:upper() and Sprinting then
Sprinting = false
Character.Humanoid.WalkSpeed = 16
Settings.Spread = Settings.Spread - Settings.SprintSpreadIncrease
Right_Weld.C0 = CFrame.new(0, -1.5, 0)
end
end)
Mouse.Button2Down:connect(function()
if not Reloading and not Sprinting and not Aiming and (Camera.Focus.p - Camera.CoordinateFrame.p).magnitude < 1 then
Aiming = true
Mouse.Icon = Settings.Icons.Aim
Right_Weld.C1 = CFrame.new()
Right_Weld.C0 = CFrame.new()
Right_Weld.C1 = Character.Head.CFrame:toObjectSpace(Settings.AimPart.CFrame)
Left_Weld.C1 = Settings.LeftAimPos
if Settings.ChangeFOV[1] then
Camera.FieldOfView = Settings.ChangeFOV[2]
end
_G.MouseSensitivity = 0.65
Tool.GripPos = Orig_Grip + Settings.AimGripOffset
Settings.Spread = Settings.Spread - Settings.SpreadReduction
end
end)
Mouse.Button2Up:connect(function()
if Aiming then
Mouse.Icon = Settings.Icons.Idle
Tool.GripPos = Orig_Grip
Right_Weld.C1 = Settings.RightPos
Right_Weld.C0 = CFrame.new(0, -1.5, 0)
Left_Weld.C1 = Settings.LeftPos
if Settings.ChangeFOV[1] then
Camera.FieldOfView = 70
end
Settings.Spread = Settings.Spread + Settings.SpreadReduction
Character.Torso.Neck.C0 = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
Character.Torso.Neck.C1 = CFrame.new(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
wait(0.25)
Aiming = false
_G.MouseSensitivity = 1
end
end)
wait()
Camera.Changed:connect(function()
if (Camera.Focus.p - Camera.CoordinateFrame.p).magnitude < 1 and Equipped then
Mouse.TargetFilter = workspace
Character.Torso.Neck.C1 = CFrame.new()
Character.Torso.Neck.C0 = CFrame.new(0, 1.5, 0) * CFrame.Angles(math.asin((Mouse.Hit.p - Mouse.Origin.p).unit.y), 0, 0)
end
end)
Mouse.Idle:connect(function()
if (Camera.Focus.p - Camera.CoordinateFrame.p).magnitude < 1 and Equipped then
Mouse.TargetFilter = workspace
Character.Torso.Neck.C1 = CFrame.new()
Character.Torso.Neck.C0 = CFrame.new(0, 1.5, 0) * CFrame.Angles(math.asin((Mouse.Hit.p - Mouse.Origin.p).unit.y), 0, 0)
end
end)
while wait() and Equipped do
if Sprinting then
Right_Weld.C0 = CFrame.new(0, -1.5, 0) * Settings.SprintArmOffset
Left_Weld.C0 = CFrame.new(0, -1.5, 0) * Settings.SprintArmOffset
elseif not Aiming then
Left_Weld.C0 = CFrame.new(0, -1.5, 0)
end
if (Camera.Focus.p - Camera.CoordinateFrame.p).magnitude > 1 and Equipped then
Mouse.TargetFilter = nil
Character.Torso.Neck.C0 = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
Character.Torso.Neck.C1 = CFrame.new(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
end
end
end)

function Stoppage()
Tool.DustCoverClosed.Transparency = 1
Tool.DustCoverOpen.Transparency = 0
Tool.Handle.Shoot:Play()
Tool.DustCoverClosed.Transparency = 1
Tool.DustCoverOpen.Transparency = 0
Tool.A1.Transparency = 1
Tool.C1.Transparency = 0
Tool.C1Brick.Transparency = 0
Tool.B1.Transparency = 1
DB = false
Rear = false
Mouse_Held = false
wait()
end

local Arms_Made
local Fake_Arm_Right, Fake_Arm_Left, Fake_Arm_Model

Tool.Equipped:connect(function(Mouse)
if Character and not Arms_Made then
Arms_Made = true
local Torso = Character.Torso
Torso[“Right Shoulder”].Part1 = nil
Left_Weld = Instance.new(“Weld”, Torso)
Left_Weld.Name = “Left_Weld”
Left_Weld.Part0 = Character.Head
Left_Weld.C0 = CFrame.new(0, -1.5, 0)
if not Settings.OneHanded then
Torso[“Left Shoulder”].Part1 = nil
Left_Weld.Part1 = Character[“Left Arm”]
end
Right_Weld = Instance.new(“Weld”, Torso)
Right_Weld.Name = “Right_Weld”
Right_Weld.Part0 = Character.Head
Right_Weld.Part1 = Character[“Right Arm”]
Right_Weld.C0 = CFrame.new(0, -1.5, 0)
Left_Weld.C1 = Settings.LeftPos
Right_Weld.C1 = Settings.RightPos
end
if Settings.FakeArms and not Fake_Arm_Right then
Fake_Arm_Right, Fake_Arm_Left = Character[“Right Arm”]:Clone(), Character[“Left Arm”]:Clone()
Fake_Arm_Right.FormFactor, Fake_Arm_Left.FormFactor = “Custom”, “Custom”
Fake_Arm_Right.Size, Fake_Arm_Left.Size = Vector3.new(), Vector3.new()
local fakeArms = {Fake_Arm_Right, Fake_Arm_Left}
for i = 1, 2 do
local w = Instance.new(“Weld”, fakeArms[i])
w.Part0 = Character[fakeArms[i].Name]
w.Part1 = fakeArms[i]
fakeArms[i].Transparency = Settings.FakeArmTransparency
end
Fake_Arm_Model = Instance.new(“Model”, Camera)
Fake_Arm_Right.Parent = Fake_Arm_Model
if not Settings.OneHanded then
Fake_Arm_Left.Parent = Fake_Arm_Model
end
Fake_Arm_Model.Name = “FakeArms”
if Settings.CharacterMeshes then
for i, v in pairs(Character:GetChildren()) do
if v:IsA(“CharacterMesh”) and v.BodyPart == Enum.BodyPart.LeftArm or v:IsA(“CharacterMesh”) and v.BodyPart == Enum.BodyPart.RightArm then
v:Clone().Parent = Fake_Arm_Model
end
end
end
if Character:FindFirstChild(“Shirt”) then
Instance.new(“Humanoid”, Fake_Arm_Model)
Character.Shirt:Clone().Parent = Fake_Arm_Model
else
local Arm_Mesh = Instance.new(“SpecialMesh”, Fake_Arm_Right)
local Arm_Mesh2 = Instance.new(“SpecialMesh”, Fake_Arm_Left)
end
end
end)

Tool.Unequipped:connect(function()
Equipped = false
Tool.GripPos = Orig_Grip
Aiming = false
Settings.Spread = Orig_Spread
if Settings.ChangeFOV[1] then
Camera.FieldOfView = 70
end
if Gui then
Gui:Destroy()
Gui = nil
end
for i, v in pairs(Tool.Handle:GetChildren()) do
if v:IsA(“Sound”) then
v:Stop()
end
end
if Fake_Arm_Right and Fake_Arm_Left and Fake_Arm_Model then
Fake_Arm_Model:Destroy()
Fake_Arm_Right, Fake_Arm_Left, Fake_Arm_Model = nil, nil, nil
end
if Character and Left_Weld and Right_Weld then
Arms_Made = false
local Torso = Character.Torso
Torso[“Right Shoulder”].Part1, Torso[“Left Shoulder”].Part1 = Character[“Right Arm”], Character[“Left Arm”]
Left_Weld:Destroy()
Right_Weld:Destroy()
end
Sprinting = false
Character.Torso.Neck.C0 = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
Character.Torso.Neck.C1 = CFrame.new(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
Character.Humanoid.WalkSpeed = 16
end)

Does any part of this code handle giving the player the gun tool?

it gives the gun but two guns.

i did use a free model as i am terrible at making guns

There is a lot of code there for me to really understand the source for the issue. Are you putting the gun tools in the StarterPack folder?

No, im putting it inside of a team in the teams folder as I want it to be a tool for a certain team.

Character.Humanoid.Died:connect(function()
Tool.Parent = Player.Backpack
end)
Tool.Parent = Player.Backpack

These may be your sources for the issue.

How do you put a code block? ””””””””””"”””

I have just deleted a script in serverscriptstorage and now it is working. Also, how can I learn how to code?