local rs = game:GetService("ReplicatedStorage")
local rf = game:GetService("ReplicatedFirst")
local event = rs.Events.UI.MainMenu.AddElementsBSP
event.OnServerEvent:Connect(function(plr)
local char = plr.Character
local currentRankFromDB = plr.FromDB.Rank
local accessories = rf.Morphs.BSP:FindFirstChild(currentRankFromDB.Value)
if accessories then
for k, obj in pairs(accessories:GetChildren()) do
local o = obj:Clone()
o.Parent = char
local weld = Instance.new("Weld", o)
weld.Part0 = o.Handle
if o.Name == "Gilet" then
weld.Part1 = char.UpperTorso
elseif o.Name == "Etiquette" then
weld.Part1 = char.UpperTorso
elseif o.Name == "Casquette" then
weld.Part1 = char.Head
elseif o.Name == "GlassesEyes" then
weld.Part1 = char.Head
elseif o.Name == "GlreenEyes" then
weld.Part1 = char.Head
elseif o.Name == "Helmet" then
weld.Part1 = char.Head
end
end
end
end)