clickdetector.MouseClick:Connect(function(player)
local backpack = player:FindFirstChild("Backpack")
if backpack then
local weaponsFG = RS:WaitForChild("WeaponsFG")
local weapon = weaponsFG:FindFirstChild("AK-74")
if weaponsFG and weapon then
if not backpack:FindFirstChild(
weapon.Name ) then
weapon = weapon:Clone()
weapon.Parent = player.Backpack
return true
else
warn("already have")
end
end
end
return false
end)
local RS = game:GetService("ReplicatedStorage")
clickdetector.MouseClick:Connect(function(player)
local backpack = player:FindFirstChild("Backpack")
if backpack then
local weaponsFG = RS:WaitForChild("WeaponsFG")
local weapon = weaponsFG["AK-74"]:Clone(1) -- ПИШЕШЬ НАЗВАНИЕ ОРУЖИЯ ВМЕСТО ГЛОКА
weapon.Parent = player.Backpack
end
end)