Help with inventory system gui scripting

Hey! so I’m trying to make an inventory system GUI.
I’ve already made the necessary things but the only thing missing is to make it so when you have
clicked on an item, it will enable the description gui but if you click on another item while the description gui is enabled, it will switch to that item instead, I have tried the “if not” method already. I use boolvalues and string values to detect if the description gui is being used by another item.

If you don’t understand then just watch this:https://gyazo.com/fe24bc13a5e76ba996bc7fde9b8ec261
This is my button script (Don’t worry about the --[[ ]]-- part, I was testing if it would destroy the parent of the script when u click on another button.):

local plr = game.Players.LocalPlayer
local about = script.Parent.Parent.Parent:FindFirstChild("About")
local aboutshadow = script.Parent.Parent.Parent:FindFirstChild("back")
local name = about.Frame["Item Name"]
local desc = about.Frame["Item Info"]
local rarity = about.Frame["Rarity"]
local viewportabout = about.Frame.ItemView
local itemdisplayed = about.Frame.ItemDisplayed

local opened = about.Enabled.Value
local opened2 = false

local viewport = script.Parent:FindFirstChildOfClass("ViewportFrame")
local model = viewport:FindFirstChildOfClass("Model")
local handle = model:FindFirstChildOfClass("MeshPart") or model:FindFirstChildOfClass("Part")

script.Parent.MouseButton1Click:Connect(function()
	if #itemdisplayed.Value == 0 and opened == false then
		if about.Visible == false then
			about.Visible = true
			aboutshadow.Visible = true
		end
		name.Text = script.Parent["Item Name"].Value
		desc.Text = script.Parent["Item Description"].Value
		rarity.Text = script.Parent["Item Rarity"].Value
		local clone = model:Clone()
		clone.Parent = viewportabout
		itemdisplayed.Value = script.Parent["Item Name"].Value
		opened = true
	elseif not itemdisplayed.Value == script.Parent["Item Name"].Value and opened == true then
		script.Parent:Destroy()
		--[[ local imao = viewportabout:FindFirstChildOfClass("Model")
		imao:Destroy()
		name.Text = script.Parent["Item Name"].Value
		desc.Text = script.Parent["Item Description"].Value
		rarity.Text = script.Parent["Item Rarity"].Value
		local clone = model:Clone()
		clone.Parent = viewportabout
		itemdisplayed.Value = script.Parent["Item Name"].Value --]]
	elseif #itemdisplayed.Value > 0 and opened == true and itemdisplayed.Value == script.Parent["Item Name"].Value then
		if viewportabout:FindFirstChildOfClass("Model") then
			local imao = viewportabout:FindFirstChildOfClass("Model")
			imao:Destroy()
		end
		name.Text = ""
		desc.Text = ""
		rarity.Text = ""
		itemdisplayed.Value = ""
		about.Visible = false
		aboutshadow.Visible = false
		opened = false
	end
end)

This is my screengui, do not worry about the localscript being disabled, that’s disabled so that the manager script will work and make it enabled as soon as an item is added.