Gear Datastoring Issue

Hello, I’m Omari, and I’d appreciate if you could help me with my data storing issue.

I have this problem where when players open their NPCs backpacks, they can store gears and tools in it. But when the player rejoins, they have that tool or gear, along with the one inside of the backpack making it a duplicate glitch. How would I solve this issue?

Untitled video - Made with Clipchamp
I’ve tried to use OpenAi with this issue, but that could not be solved.

Here is the the script:
local DataStoreService = game:GetService(“DataStoreService”)
local PlayerData = DataStoreService:GetDataStore(“StorageData001”)
local RunService = game:GetService(“RunService”)

game.Players.PlayerAdded:Connect(function(Plr)

local Storage = Instance.new("Folder", Plr)
Storage.Name = "Storage"

local Slot1 = Instance.new("StringValue", Storage)
Slot1.Name = "Slot1"
Slot1.Value = "None"

local Slot2 = Instance.new("StringValue", Storage)
Slot2.Name = "Slot2"
Slot2.Value = "None"

local Slot3 = Instance.new("StringValue", Storage)
Slot3.Name = "Slot3"
Slot3.Value = "None"

local PlrUserId = "Player_"..Plr.UserId
local StoreData = PlayerData:GetAsync(PlrUserId)

if StoreData then
	Slot1.Value = StoreData['Slot1']
	Slot2.Value = StoreData['Slot2']
	Slot3.Value = StoreData['Slot3']
end

end)

local function CreateTable(Plr)
local PlrStats = {}
for _,V in pairs(Plr.Storage:GetChildren()) do
PlrStats[V.Name] = V.Value
end
return PlrStats
end

local function Save(Plr)
local PlrStats = CreateTable(Plr)
local Sucess, Error = pcall(function()
local PlrUserId = “Player_”…Plr.UserId
PlayerData:SetAsync(PlrUserId, PlrStats)
end)
if not Sucess then
warn(“Couldn’t save data!”)
end
end

game.Players.PlayerRemoving:Connect(function(Plr)
Save(Plr)
end)

game:BindToClose(function()
for _,Player in pairs(game.Players:GetPlayers()) do
wait()
Save(Player)
end
end)