(EYES HURT WARNING)
for _,Frame in playergui.SwordInventory.Grid:GetChildren() do
if Frame:IsA("Frame") then debris:AddItem(Frame,0) end end
for _,event in connectedEvents do
event:Disconnect() end local profile = remotes.GetDataStore:InvokeServer(player) if not profile then return end local swords = profile.Swords local newTable = swords table.sort(newTable, function(a, b) if a.Equipped == b.Equipped then return gameData.Swords[a.Name].Power > gameData.Swords[b.Name].Power end return a.Equipped and not b.Equipped end) if #newTable > 0 then for _,Sword in newTable do local Frame = template:Clone()