adding on to this, you can also add an id of an accessory as a value inside the script so you don’t need to get several instances
local shirt = --add shirt id
local pants = --add pants id
local cost = 50 --expense
script.Parent.Parent.ProximityPrompt.Triggered:Connect(function(plr)
local leaderstats = plr.leaderstats --get leaderstats
if leaderstats then -- if true then
if leaderstats.Money.Value >= cost then -- if player has enough money to buy
leaderstats.Money.Value -= cost -- subtract
plr.Character.Shirt.ShirtTemplate = shirt --get id + get player + paste to player's shirts
plr.Character.Pants.PantsTemplate = pants
else -- if agurement is not met
print("not enough dollars") -- print to output
end
end
end)