Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local weapons = game.ReplicatedStorage:WaitForChild("Weapons")
- local re = game.ReplicatedStorage:WaitForChild("EquipWeaponRE")
- re.OnServerEvent:Connect(function(plr, gun)
- if gun and gun.Parent.Parent == weapons then
- local gunType = gun.Parent
- for i, child in pairs(plr.Backpack:GetChildren()) do
- if gunType:FindFirstChild(child.Name) then
- child:Destroy()
- end
- end
- for i, child in pairs(plr.Character:GetChildren()) do
- if gunType:FindFirstChild(child.Name) then
- child:Destroy()
- end
- end
- local gunClone = gun:Clone()
- gunClone.Parent = plr.Backpack
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement