How to? - Backpack tool first in list

Below is a version of @Shiro75 custom backpack Gui that I have moulded into my own coding; I’m looking for a way to make it so that whenever the Backpack // List is updated specific items are 1st in the list.

It works similar to the default backpack where-in if you were to drop a tool and pick it up later; it’d be back of the list.

I’m looking for a way so items [ for example: “Player1’s Wand” or “Player1’s Staff” ] are #1?

Thank you.

EDIT
Had the idea that if a Child were added to list with the name of: “Wand” or “Player1’s Wand” then all other Values move up a space.
I however have no clue how to implement this.
BUMP.

Code
local inputKeys =
{["One"] = {Text = "1"};
 ["Two"] = {Text = "2"};
 ["Three"] = {Text = "3"};
 ["Four"] = {Text = "4"};
 ["Five"] = {Text = "5"}}

local inputOrder =
{inputKeys["One"]; inputKeys["Two"]; inputKeys["Three"]; inputKeys["Four"]; inputKeys["Five"]}

function System:Enable()
	local PlayerTools = Player["Backpack"]:GetChildren()
	for i = 1, #PlayerTools do wait()
		if PlayerTools[i]:IsA("Tool") then
			for i = 1, #inputOrder do wait()
				local Value = inputOrder[i]
				if not Value["Tool"] then
					Value["Tool"] = PlayerTools[i]
					break
				end
			end
		end
	end
	Create()
	UserInputService.InputBegan:Connect(onKeyPress)
	Player.Character.ChildAdded:Connect(ChildAdded)
	Player.Character.ChildRemoved:Connect(ChildRemoved)
	Player["Backpack"].ChildAdded:Connect(ChildAdded)
	Player["Backpack"].ChildRemoved:Connect(ChildRemoved)
end

function Create()
	for i = 1, #inputOrder do wait()
		local Value = inputOrder[i]
		local Template = script["Template"]:Clone()
		Template.Parent = Gui["Frame"]
		Template["TextLabel"].Text = Value["Text"]
		Template.Name = Value["Text"]
		
		local Tool = Value["Tool"]
		if Tool then
			Template["Item"].Image = Tool.TextureId
			Template.Visible = true
		end
		
		Template["Item"].MouseButton1Down:Connect(function()
			for i, Value in pairs(inputKeys) do
				if Value["Text"] == Template.Name then
					EquipTool(Value["Tool"]) 
				end 
			end
		end)
	end
end

function onKeyPress(inputObject)
	local Key = inputObject.KeyCode.Name
	local Value = inputKeys[Key]
	if Value and UserInputService:GetFocusedTextBox() == nil then
		EquipTool(Value["Tool"])
	end 
end

function EquipTool(Tool)
	if Tool then
		if Tool.Parent ~= Player.Character then
			Player.Character:WaitForChild("Humanoid"):EquipTool(Tool)
		else
			Player.Character:WaitForChild("Humanoid"):UnequipTools()
		end
	end
end

function ChildAdded(Child)
	if Child:IsA("Tool") then
		local isNew = true
		for _, Value in pairs(inputKeys) do
			local Tool = Value["Tool"]
			if Tool then
				if Tool == Child then
					isNew = false
				end
			end
		end
		if isNew == true then
			for i = 1, #inputOrder do wait()
				local Tool = inputOrder[i]["Tool"]
				if not Tool then
					inputOrder[i]["Tool"] = Child
					break
				end
			end
		end
		Configure()
	end
end

function ChildRemoved(Child)
	if Child:IsA("Tool") then
		if Child.Parent ~= Player.Character and Child.Parent ~= Player["Backpack"] then
			for i = 1, #inputOrder do wait()
				if inputOrder[i]["Tool"] == Child then
					inputOrder[i]["Tool"] = nil
					break
				end
			end
		end
		Configure()
	end
end

function Configure()
	for _, Value in pairs (inputKeys) do
		local Tool = Value["Tool"]
		local Item = Gui["Frame"]:FindFirstChild(Value["Text"])
		if Tool then
			Item.Visible = true
			Item["Item"].Image = Tool.TextureId
			if Tool.Parent == Player.Character then
				Item.ImageTransparency = .5
			else
				Item.ImageTransparency = .75
			end
		else
			Item.Visible = false
			Item["Item"].Image = ""
		end
	end
end

EDIT2:

Found a somewhat solution as displayed below:
Is there anyway I could potentially simplify this rather than having constant chunks referring back to themselves?

for i = 1, #inputOrder do wait()
  local Tool = inputOrder[i]["Tool"]
  if Tool then
    if Child.Name == Player.Name .. "'s Wand" or Child.Name == "Wand" then
    local SavediO1 = inputOrder[1]["Tool"]
    local SavediO2 = inputOrder[2]["Tool"]
    local SavediO3 = inputOrder[3]["Tool"]
    local SavediO4 = inputOrder[4]["Tool"]
                            
    inputOrder[1]["Tool"] = Child
    inputOrder[2]["Tool"] = SavediO1
    inputOrder[3]["Tool"] = SavediO2
    break
end
else
  inputOrder[i]["Tool"] = Child
  break
  end
end