The Shop GUI doesn't work at all

So,I’m using UTMM kit 2.1,and i wanted to add a new value, called “Kromer”,so it would be more difficult to get better weapons,but,when i finished doing that,the menu wouldn’t open at all,and it didn’t give me any errors too.Here’s the code:

if game.Players.LocalPlayer:FindFirstChild("_loadeddata") then
	function LoadShop(Shop)
		local VisibleOptions = {"Weapon","Food","Armor","SOULs"}
		local function Check(to)
			for i=1,#VisibleOptions do
				if VisibleOptions[i] == to then
					return i
				end
			end
			return false
		end
		script.Parent.ArmorArmoring:ClearAllChildren()
		script.Parent.FoodMarket:ClearAllChildren()
		script.Parent.WeaponStore:ClearAllChildren()
		script.Parent.SoulCraft:ClearAllChildren()
		local c = game.Lighting.Weapons:GetChildren()
		local counter = 0
		local place = 0
		local row = 0
		script.Parent.WeaponStore.CanvasSize = UDim2.new(0,0,0,200*#c/5)
		for i=1,#c do
			if c[i].Onsale.Value and c[i].Shop.Value == Shop then
				counter = counter + 1
				local frame = Instance.new("Frame")
				local gar = script.Parent.Base:Clone()
				gar.Parent = frame
				frame.Size = UDim2.new(0.2,0 , 0,200)
				frame.BackgroundColor3 = Color3.new(0,0,0)
				frame.Position = UDim2.new(0.2*place,0,0,200*row)
				place = place + 1
				if place == 5 then
					place = 0
					row = row + 1
				end
				frame.BorderSizePixel = 5
				frame.BorderColor3 = Color3.new(1,1,1)
				frame.Name = c[i].Name
				local name = Instance.new("TextLabel")
				local gar = script.Parent.Base:Clone()
				gar.Parent = frame
				name.Name = "WeaponName"
				name.Text = c[i].WeaponName.Value
				name.BackgroundTransparency = 1
				name.Size = UDim2.new(1,0,0.25,0)
				name.Font = Enum.Font.Arcade
				name.TextColor3 = Color3.new(1,1,1)
				name.TextScaled = true
				name.TextWrapped =  true
				name.Parent = frame
				local cost = Instance.new("TextLabel")
				local gar = script.Parent.Base:Clone()
				gar.Parent = name
				cost.Name = "Cost"
				cost.Text = "Costs: "..tostring(tonumber(c[i].Cost.Value)).." Gold, and"..tostring(tonumber(c[i].Cost1.Value)).." Kromer"
				cost.BackgroundTransparency = 1
				cost.Size = UDim2.new(1,0,0.25,0)
				cost.Font = Enum.Font.Arcade
				cost.TextColor3 = Color3.new(1,1,1)
				cost.TextScaled = true
				cost.TextWrapped =  true
				cost.Position = UDim2.new(0,0,0.25,0)
				cost.Parent = frame
				local buy = Instance.new("TextButton")
				local gar = script.Parent.Base:Clone()
				gar.Parent = buy
				buy.Name = "Buy"
				buy.BackgroundColor3 = Color3.new(0,0,0)
				buy.BorderSizePixel = 5
				buy.BorderColor3 = Color3.new(1,1,1)
				buy.Size = UDim2.new(1,0,0.5,0)
				buy.Font = Enum.Font.Arcade
				buy.TextColor3 = Color3.new(1,1,1)
				buy.TextScaled = true
				buy.TextWrapped =  true
				buy.Position = UDim2.new(0,0,0.5,0)
				buy.Parent = frame
				if game.Players.LocalPlayer.Gold.Value >= c[i].Cost.Value and game.Players.LocalPlayer.Kromer.Value >= c[i].Cost1.Value and game.Players.LocalPlayer.Weapons:FindFirstChild(c[i].Name).Value == false then
					buy.Text = "Buy"
				elseif  game.Players.LocalPlayer.Weapons:FindFirstChild(c[i].Name).Value == false then
					buy.Text = "(Can't Afford)"
				else
					buy.Text = "(Purchased)"
				end
				local function Select()
					script.Parent.Image.ImageColor3 = Color3.new(1,1,1)
					script.Parent.Image.Image = c[i].Tool:FindFirstChildOfClass("Tool").TextureId
					script.Parent.ItemName.Text = c[i].WeaponName.Value
					script.Parent.Description.Text = c[i].Description.Value
					if c[i].Tool:FindFirstChildOfClass("Tool"):FindFirstChild("Damage") then
						script.Parent.Stat.Text = "Damage: "..tostring(c[i].Tool:FindFirstChildOfClass("Tool"):FindFirstChild("Damage").Value+(c[i].Tool:FindFirstChildOfClass("Tool"):FindFirstChild("DamageModify").Value*(game.Players.LocalPlayer.LOVE.Value-1))).." (at your LV)"
					else
						script.Parent.Stat.Text = ""
					end
				end
				frame.MouseEnter:Connect(Select)
				frame.SelectionGained:Connect(Select)
				buy.SelectionGained:Connect(Select)
				game.Players.LocalPlayer.Gold.Changed:Connect(function()
					 game.Players.LocalPlayer.Kromer.Changed:Connect(function()
					wait(0.08)
					if game.Players.LocalPlayer.Gold.Value >= c[i].Cost.Value and game.Players.LocalPlayer.Kromer.Value >= c[i].Cost1.Value and game.Players.LocalPlayer.Weapons:FindFirstChild(c[i].Name).Value == false then
						buy.Text = "Buy"
					elseif  game.Players.LocalPlayer.Weapons:FindFirstChild(c[i].Name).Value == false then
						buy.Text = "(Can't Afford)"
					else
						buy.Text = "(Purchased)"
					end
				end)
				game.Players.LocalPlayer.Weapons:FindFirstChild(c[i].Name).Changed:connect(function()
					wait(0.08)
					if game.Players.LocalPlayer.Gold.Value >= c[i].Cost.Value and game.Players.LocalPlayer.Weapons:FindFirstChild(c[i].Name).Value == false then
						buy.Text = "Buy"
					elseif  game.Players.LocalPlayer.Weapons:FindFirstChild(c[i].Name).Value == false then
						buy.Text = "(Can't Afford)"
					else
						buy.Text = "(Purchased)"
						script.Parent.Parent.Sound:Play()
					end
				end)
				buy.MouseButton1Click:connect(function()
					if buy.Text == "Buy" then
						game.Lighting.Buy:FireServer(c[i],"Weapon")
					end
				end)
				frame.Parent = script.Parent.WeaponStore
			end)
		end
		if counter == 0 then
			table.remove(VisibleOptions,Check("Weapon"))
		end


		local c = game.Lighting.Food:GetChildren()
		local counter = 0

		local place = 0
		local row = 0
		script.Parent.FoodMarket.CanvasSize = UDim2.new(0,0,0,250*math.floor(#c/5))
		for i=1,#c do
			if c[i].Onsale.Value and c[i].Shop.Value == Shop then
				counter = counter + 1
				local frame = Instance.new("Frame")
				local gar = script.Parent.Base:Clone()
				gar.Parent = frame
				frame.Size = UDim2.new(0.2,0 , 0,200)
				frame.BackgroundColor3 = Color3.new(0,0,0)
				frame.Position = UDim2.new(0.2*place,0,0,200*row)
				place = place + 1
				if place == 5 then
					place = 0
					row = row + 1
				end
				frame.BorderSizePixel = 5
				frame.BorderColor3 = Color3.new(1,1,1)
				frame.Name = c[i].Name
				local name = Instance.new("TextLabel")
				local gar = script.Parent.Base:Clone()
				gar.Parent = name
				name.Name = "FoodName"
				name.Text = c[i].FoodName.Value
				name.BackgroundTransparency = 1
				name.Size = UDim2.new(1,0,0.25,0)
				name.Font = Enum.Font.Arcade
				name.TextColor3 = Color3.new(1,1,1)
				name.TextScaled = true
				name.TextWrapped =  true
				name.Parent = frame
				local cost = Instance.new("TextLabel")
				local gar = script.Parent.Base:Clone()
				gar.Parent = cost
				cost.Name = "Cost"
				cost.Text = "Costs: "..tostring(tonumber(c[i].Cost.Value)).." Gold, and"..tostring(tonumber(c[i].Cost1.Value)).." Kromer"
				cost.BackgroundTransparency = 1
				cost.Size = UDim2.new(1,0,0.25,0)
				cost.Font = Enum.Font.Arcade
				cost.TextColor3 = Color3.new(1,1,1)
				cost.TextScaled = true
				cost.TextWrapped =  true
				cost.Position = UDim2.new(0,0,0.25,0)
				cost.Parent = frame
				local buy = Instance.new("TextButton")
				local gar = script.Parent.Base:Clone()
				gar.Parent = buy
				buy.Name = "Buy"
				buy.BackgroundColor3 = Color3.new(0,0,0)
				buy.BorderSizePixel = 5
				buy.BorderColor3 = Color3.new(1,1,1)
				buy.Size = UDim2.new(1,0,0.5,0)
				buy.Font = Enum.Font.Arcade
				buy.TextColor3 = Color3.new(1,1,1)
				buy.TextScaled = true
				buy.TextWrapped =  true
				buy.Position = UDim2.new(0,0,0.5,0)
				buy.Parent = frame
				local Food = 0 --Carrying capacity is 8
				for a=1,#c do
					for b=1,game.Players.LocalPlayer.Food:FindFirstChild(c[a].Name).Value do
						Food = Food + 1
					end
				end
					if game.Players.LocalPlayer.Gold.Value >= c[i].Cost.Value and game.Players.LocalPlayer.Kromer.Value >= c[i].Cost1.Value and Food < 8 and game.Players.LocalPlayer.Food:FindFirstChild(c[i].Name).Value < c[i].Max.Value then
					if c[i].Max.Value == 8 then
						buy.Text = "Buy ("..game.Players.LocalPlayer.Food:FindFirstChild(c[i].Name).Value..")"
					else
						buy.Text = "Buy ("..game.Players.LocalPlayer.Food:FindFirstChild(c[i].Name).Value.."/"..c[i].Max.Value..")"
					end
					elseif Food < 8 and game.Players.LocalPlayer.Gold.Value < c[i].Cost.Value and game.Players.LocalPlayer.Kromer.Value >= c[i].Cost1.Value then
					if c[i].Max.Value == 8 then
						buy.Text = "(Can't Afford) ("..game.Players.LocalPlayer.Food:FindFirstChild(c[i].Name).Value..")"
					else
						buy.Text = "(Can't Afford) ("..game.Players.LocalPlayer.Food:FindFirstChild(c[i].Name).Value.."/"..c[i].Max.Value..")"
					end
				elseif Food == 8 then
					buy.Text = "(You are carrying too much)"
				elseif c[i].Max.Value < 8 then	
					buy.Text = "(You are carrying too much of this food)"	
				end
				local function Select()
					script.Parent.Image.ImageColor3 = Color3.new(1,1,1)
					script.Parent.Image.Image = c[i].Tool:FindFirstChildOfClass("Tool").TextureId
					script.Parent.ItemName.Text = c[i].FoodName.Value
					script.Parent.Description.Text = c[i].Description.Value
					if c[i].Tool:FindFirstChildOfClass("Tool"):FindFirstChild("Heal") then
						script.Parent.Stat.Text = "Heals: "..tostring(c[i].Tool:FindFirstChildOfClass("Tool"):FindFirstChild("Heal").Value).." HP"
					else
						script.Parent.Stat.Text = ""
					end
				end
				frame.MouseEnter:Connect(Select)
				frame.SelectionGained:Connect(Select)
				buy.SelectionGained:Connect(Select)
				game.Players.LocalPlayer.Gold.Changed:Connect(function()
					game.Players.LocalPlayer.Kromer.Changed:Connect(function()
					wait(0.34)
					Food = 0 --Carrying capacity is 8
					for a=1,#c do
						for b=1,game.Players.LocalPlayer.Food:FindFirstChild(c[a].Name).Value do
							Food = Food + 1
						end
					end
							if game.Players.LocalPlayer.Gold.Value >= c[i].Cost.Value and game.Players.LocalPlayer.Kromer.Value >= c[i].Cost1.Value and Food < 8 and game.Players.LocalPlayer.Food:FindFirstChild(c[i].Name).Value < c[i].Max.Value then
						if c[i].Max.Value == 8 then
							buy.Text = "Buy ("..game.Players.LocalPlayer.Food:FindFirstChild(c[i].Name).Value..")"
						else
							buy.Text = "Buy ("..game.Players.LocalPlayer.Food:FindFirstChild(c[i].Name).Value.."/"..c[i].Max.Value..")"
						end
							elseif Food < 8 and game.Players.LocalPlayer.Gold.Value < c[i].Cost.Value and game.Players.LocalPlayer.Kromer.Value >= c[i].Cost1.Value then
						if c[i].Max.Value == 8 then
							buy.Text = "(Can't Afford) ("..game.Players.LocalPlayer.Food:FindFirstChild(c[i].Name).Value..")"
						else
							buy.Text = "(Can't Afford) ("..game.Players.LocalPlayer.Food:FindFirstChild(c[i].Name).Value.."/"..c[i].Max.Value..")"
						end
					elseif Food == 8 then
						buy.Text = "(You are carrying too much)"
					elseif c[i].Max.Value < 8 then	
						buy.Text = "(You are carrying too much of this food)"	
					end
				end)
				local amount = game.Players.LocalPlayer.Food:FindFirstChild(c[i].Name).Value
				game.Players.LocalPlayer.Food:FindFirstChild(c[i].Name).Changed:connect(function()
					if amount < game.Players.LocalPlayer.Food:FindFirstChild(c[i].Name).Value then
						script.Parent.Parent.Sound:Play()
					end
					amount = game.Players.LocalPlayer.Food:FindFirstChild(c[i].Name).Value
				end)
				buy.MouseButton1Click:connect(function()
					if string.sub(buy.Text,0,3) == "Buy" then
						game.Lighting.Buy:FireServer(c[i],"Food")
					end
				end)
				frame.Parent = script.Parent.FoodMarket
			end)
		end

		if counter == 0 then
			table.remove(VisibleOptions,Check("Food"))
		end



		local c = game.Lighting.Armor:GetChildren()
		local counter = 0
		local place = 0
		local row = 0
		script.Parent.ArmorArmoring.CanvasSize = UDim2.new(0,0,0,200*math.floor(#c/5))
		for i=1,#c do
			if c[i].Onsale.Value and c[i].Shop.Value == Shop then
				counter = counter + 1
				local frame = Instance.new("Frame")
				local gar = script.Parent.Base:Clone()
				gar.Parent = frame
				frame.Size = UDim2.new(0.2,0 , 0,200)
				frame.BackgroundColor3 = Color3.new(0,0,0)
				frame.Position = UDim2.new(0.2*place,0,0,200*row)
				place = place + 1
				if place == 5 then
					place = 0
					row = row + 1
				end
				frame.BorderSizePixel = 5
				frame.BorderColor3 = Color3.new(1,1,1)
				frame.Name = c[i].Name
				local name = Instance.new("TextLabel")
				local gar = script.Parent.Base:Clone()
				gar.Parent = name
				name.Name = "ArmorName"
				name.Text = c[i].ArmorName.Value
				name.BackgroundTransparency = 1
				name.Size = UDim2.new(1,0,0.25,0)
				name.Font = Enum.Font.Arcade
				name.TextColor3 = Color3.new(1,1,1)
				name.TextScaled = true
				name.TextWrapped =  true
				name.Parent = frame
				local cost = Instance.new("TextLabel")
				local gar = script.Parent.Base:Clone()
				gar.Parent = cost
				cost.Name = "Cost"
				cost.Text = "Costs: "..tostring(tonumber(c[i].Cost.Value)).." Gold and" ..tostring(tonumber(c[i].Cost1.Value)).." Kromer"
				cost.BackgroundTransparency = 1
				cost.Size = UDim2.new(1,0,0.25,0)
				cost.Font = Enum.Font.Arcade
				cost.TextColor3 = Color3.new(1,1,1)
				cost.TextScaled = true
				cost.TextWrapped =  true
				cost.Position = UDim2.new(0,0,0.25,0)
				cost.Parent = frame
				local buy = Instance.new("TextButton")
				local gar = script.Parent.Base:Clone()
				gar.Parent = cost
				buy.Name = "Buy"
				buy.BackgroundColor3 = Color3.new(0,0,0)
				buy.BorderSizePixel = 5
				buy.BorderColor3 = Color3.new(1,1,1)
				buy.Size = UDim2.new(1,0,0.5,0)
				buy.Font = Enum.Font.Arcade
				buy.TextColor3 = Color3.new(1,1,1)
				buy.TextScaled = true
				buy.TextWrapped =  true
				buy.Position = UDim2.new(0,0,0.5,0)
				buy.Parent = frame
						if game.Players.LocalPlayer.Gold.Value >= c[i].Cost.Value and  game.Players.LocalPlayer.Kromer.Value >= c[i].Cost1.Value and game.Players.LocalPlayer.Armor:FindFirstChild(c[i].Name).Value == false then
					buy.Text = "Buy"
				elseif  game.Players.LocalPlayer.Armor:FindFirstChild(c[i].Name).Value == false then
					buy.Text = "(Can't Afford)"
				else
					buy.Text = "(Purchased)"
				end
				local function Select()
					script.Parent.Image.ImageColor3 = Color3.new(1,1,1)
					script.Parent.Image.Image = "rbxassetid://"..c[i].Icon.Value
					script.Parent.ItemName.Text = c[i].ArmorName.Value
					script.Parent.Description.Text = c[i].Description.Value
					script.Parent.Stat.Text = "HP Bonus: "..c[i].HPBonus.Value
				end
				frame.MouseEnter:Connect(Select)
				frame.SelectionGained:Connect(Select)
				buy.SelectionGained:Connect(Select)
				game.Players.LocalPlayer.Gold.Changed:Connect(function()
					game.Players.LocalPlayer.Kromer.Changed:Connect(function()
					wait(0.08)
					if game.Players.LocalPlayer.Gold.Value >= c[i].Cost.Value and game.Players.LocalPlayer.Kromer.Value >= c[i].Cost1.Value and game.Players.LocalPlayer.Armor:FindFirstChild(c[i].Name).Value == false then
						buy.Text = "Buy"
					elseif  game.Players.LocalPlayer.Armor:FindFirstChild(c[i].Name).Value == false then
						buy.Text = "(Can't Afford)"
					else
						buy.Text = "(Purchased)"
					end
				end)
				game.Players.LocalPlayer.Armor:FindFirstChild(c[i].Name).Changed:connect(function()
					wait(0.08)
								if game.Players.LocalPlayer.Gold.Value >= c[i].Cost.Value and  game.Players.LocalPlayer.Kromer.Value >= c[i].Cost1.Value and game.Players.LocalPlayer.Armor:FindFirstChild(c[i].Name).Value == false then
						buy.Text = "Buy"
					elseif  game.Players.LocalPlayer.Armor:FindFirstChild(c[i].Name).Value == false then
						buy.Text = "(Can't Afford)"
					else
						buy.Text = "(Purchased)"
						script.Parent.Parent.Sound:Play()
					end
				end)
				buy.MouseButton1Click:connect(function()
					if buy.Text == "Buy" then
						game.Lighting.Buy:FireServer(c[i],"Armor")
					end
				end)
				frame.Parent = script.Parent.ArmorArmoring
			end)
		end
		if counter == 0 then
			table.remove(VisibleOptions,Check("Armor"))
		end

		local c = game.Lighting.SOULs:GetChildren()
		local counter = 0
		local place = 0
		local row = 0
		script.Parent.SoulCraft.CanvasSize = UDim2.new(0,0,0,200*math.floor(#c/5))
		for i=1,#c do
			if c[i].Onsale.Value and c[i].Shop.Value == Shop then
				counter = counter + 1
				local frame = Instance.new("Frame")
				local gar = script.Parent.Base:Clone()
				gar.Parent = frame
				frame.Size = UDim2.new(0.2,0 , 0,200)
				frame.BackgroundColor3 = Color3.new(0,0,0)
				frame.Position = UDim2.new(0.2*place,0,0,200*row)
				place = place + 1
				if place == 5 then
					place = 0
					row = row + 1
				end
				frame.BorderSizePixel = 5
				frame.BorderColor3 = Color3.new(1,1,1)
				frame.Name = c[i].Name
				local name = Instance.new("TextLabel")
				local gar = script.Parent.Base:Clone()
				gar.Parent = name
				name.Name = "SoulName"
				name.Text = c[i].SoulName.Value
				name.BackgroundTransparency = 1
				name.Size = UDim2.new(1,0,0.25,0)
				name.Font = Enum.Font.Arcade
				name.TextColor3 = Color3.new(1,1,1)
				name.TextScaled = true
				name.TextWrapped =  true
				name.Parent = frame
				local cost = Instance.new("TextLabel")
				local gar = script.Parent.Base:Clone()
				gar.Parent = cost
				cost.Name = "Cost"
				cost.Text = "Required: "..c[i].Fragments.Value.." SOUL Fragments "..tostring(tonumber(c[i].Cost.Value)).." Gold and"..tostring(tonumber(c[i].Cost1.Value)).." Kromer"
				cost.BackgroundTransparency = 1
				cost.Size = UDim2.new(1,0,0.25,0)
				cost.Font = Enum.Font.Arcade
				cost.TextColor3 = Color3.new(1,1,1)
				cost.TextScaled = true
				cost.TextWrapped =  true
				cost.Position = UDim2.new(0,0,0.25,0)
				cost.Parent = frame
				local buy = Instance.new("TextButton")
				local gar = script.Parent.Base:Clone()
				gar.Parent = buy
				buy.Name = "Craft"
				buy.BackgroundColor3 = Color3.new(0,0,0)
				buy.BorderSizePixel = 5
				buy.BorderColor3 = Color3.new(1,1,1)
				buy.Size = UDim2.new(1,0,0.5,0)
				buy.Font = Enum.Font.Arcade
				buy.TextColor3 = Color3.new(1,1,1)
				buy.TextScaled = true
				buy.TextWrapped =  true
				buy.Position = UDim2.new(0,0,0.5,0)
				buy.Parent = frame
				if  game.Players.LocalPlayer.SOULs:FindFirstChild(c[i].Name).Value == false and game.Players.LocalPlayer.Gold.Value >= c[i].Cost.Value and game.Players.LocalPlayer.Kromer.Value >= c[i].Cost1.Value and game.Players.LocalPlayer.SoulFragments:FindFirstChild(c[i].Name).Value >= c[i].Fragments.Value  then
					buy.Text = "Craft"
				elseif  game.Players.LocalPlayer.SOULs:FindFirstChild(c[i].Name).Value == false then
					buy.Text = "(Not enough materials) ("..game.Players.LocalPlayer.SoulFragments:FindFirstChild(c[i].Name).Value.." SOUL Fragments)"
				else
					buy.Text = "(Crafted)"
				end
				game.Players.LocalPlayer.Gold.Changed:Connect(function()
					game.Players.LocalPlayer.Kromer.Changed:Connect(function()
					wait(0.05)
					if  game.Players.LocalPlayer.SOULs:FindFirstChild(c[i].Name).Value == false and game.Players.LocalPlayer.Gold.Value >= c[i].Cost.Value and game.Players.LocalPlayer.Kromer.Value >= c[i].Cost1.Value and game.Players.LocalPlayer.SoulFragments:FindFirstChild(c[i].Name).Value >= c[i].Fragments.Value  then
						buy.Text = "Craft"
					elseif  game.Players.LocalPlayer.SOULs:FindFirstChild(c[i].Name).Value == false then
						buy.Text = "(Not enough materials) ("..game.Players.LocalPlayer.SoulFragments:FindFirstChild(c[i].Name).Value.." SOUL Fragments)"
					else
						buy.Text = "(Crafted)"
					end
				end)
				local function Select()
					if c[i]:FindFirstChild("CustomImage") == nil then
						script.Parent.Image.Image = "rbxassetid://2098055065"
						script.Parent.Image.ImageColor3 = c[i].Color.Value
					else
						script.Parent.Image:Destroy()
						local img = c[i].CustomImage:Clone()
						img.Name = "Image"
						img.Parent = script.Parent
					end
					script.Parent.ItemName.Text = c[i].SoulName.Value
					script.Parent.Description.Text = c[i].Description.Value
					script.Parent.Stat.Text = ""
				end
				frame.MouseEnter:Connect(Select)
				frame.SelectionGained:Connect(Select)
				buy.SelectionGained:Connect(Select)
				game.Players.LocalPlayer.SOULs:FindFirstChild(c[i].Name).Changed:connect(function()
					wait(0.05)
					if game.Players.LocalPlayer.SOULs:FindFirstChild(c[i].Name).Value == true then
						script.Parent.Parent.Crafting:Play()
					end
					if  game.Players.LocalPlayer.SOULs:FindFirstChild(c[i].Name).Value == false and game.Players.LocalPlayer.Gold.Value >= c[i].Cost.Value and game.Players.LocalPlayer.Kromer.Value >= c[i].Cost1.Value and game.Players.LocalPlayer.SoulFragments:FindFirstChild(c[i].Name).Value >= c[i].Fragments.Value  then
						buy.Text = "Craft"
					elseif  game.Players.LocalPlayer.SOULs:FindFirstChild(c[i].Name).Value == false then
						buy.Text = "(Not enough materials) ("..game.Players.LocalPlayer.SoulFragments:FindFirstChild(c[i].Name).Value.." SOUL Fragments)"
					else
						buy.Text = "(Crafted)"
					end
				end)
				game.Players.LocalPlayer.SoulFragments:FindFirstChild(c[i].Name).Changed:connect(function()
					wait(0.05)
					if  game.Players.LocalPlayer.SOULs:FindFirstChild(c[i].Name).Value == false and game.Players.LocalPlayer.Gold.Value >= c[i].Cost.Value and game.Players.LocalPlayer.Kromer.Value >= c[i].Cost1.Value and game.Players.LocalPlayer.SoulFragments:FindFirstChild(c[i].Name).Value >= c[i].Fragments.Value  then
						buy.Text = "Craft"
					elseif  game.Players.LocalPlayer.SOULs:FindFirstChild(c[i].Name).Value == false then
						buy.Text = "(Not enough materials) ("..game.Players.LocalPlayer.SoulFragments:FindFirstChild(c[i].Name).Value.." SOUL Fragments)"
					else
						buy.Text = "(Crafted)"
					end
				end)
				buy.MouseButton1Click:connect(function()
					if buy.Text == "Craft" then
						game.Lighting.Buy:FireServer(c[i],"SOUL")
					end
				end)
				frame.Parent = script.Parent.SoulCraft
			end)
		end

		if counter == 0 then
			table.remove(VisibleOptions,Check("SOULs"))
		end


		print(#VisibleOptions)
		script.Parent.Weapons.Size = UDim2.new(1/#VisibleOptions,0,.1,0)
		script.Parent.Armor.Size = UDim2.new(1/#VisibleOptions,0,.1,0)
		script.Parent.Food.Size = UDim2.new(1/#VisibleOptions,0,.1,0)
		script.Parent.SOULs.Size = UDim2.new(1/#VisibleOptions,0,.1,0)

		local count = 0

		if Check("Weapon") == false then
			script.Parent.WeaponStore.Visible = false
			script.Parent.Weapons.Visible = false
		else
			script.Parent.Weapons.Position = UDim2.new(count * (1/#VisibleOptions) ,0,0,0)
			count = count + 1
			script.Parent.Weapons.Visible = true
		end
		if Check("Food") == false then
			script.Parent.FoodMarket.Visible = false
			script.Parent.Food.Visible = false
		else
			script.Parent.Food.Position = UDim2.new(count * (1/#VisibleOptions) ,0,0,0)
			count = count + 1
			script.Parent.Food.Visible = true
		end
		if Check("Armor") == false then
			script.Parent.ArmorArmoring.Visible = false
			script.Parent.Armor.Visible = false
		else
			script.Parent.Armor.Position = UDim2.new(count * (1/#VisibleOptions) ,0,0,0)
			count = count + 1
			script.Parent.Armor.Visible = true
		end
		if Check("SOULs") == false then
			script.Parent.SoulCraft.Visible = false
			script.Parent.SOULs.Visible = false
		else
			script.Parent.SOULs.Position = UDim2.new(count * (1/#VisibleOptions) ,0,0,0)
			count = count + 1
			script.Parent.SOULs.Visible = true
		end

		print(tostring(script.Parent.Weapons.Position),tostring(script.Parent.Food.Position),tostring(script.Parent.Armor.Position))
		print(tostring(script.Parent.Weapons.Visible),tostring(script.Parent.Food.Visible),tostring(script.Parent.Armor.Visible))
		if script.Parent.WeaponStore.Visible == false and script.Parent.FoodMarket.Visible == false and script.Parent.ArmorArmoring.Visible == false then
			if Check("Weapon") ~= false then
				script.Parent.WeaponStore.Visible = true
			elseif Check("Food") ~= false then
				script.Parent.FoodMarket.Visible = true
			elseif Check("Armor") ~= false then
				script.Parent.ArmorArmoring.Visible = true
			elseif Check("SOULs") ~= false then
				script.Parent.SoulCraft.Visible = true
			end
		end
	end


	script.Parent.Weapons.MouseButton1Click:connect(function()
		script.Parent.FoodMarket.Visible = false
		script.Parent.WeaponStore.Visible = true
		script.Parent.ArmorArmoring.Visible = false
		script.Parent.SoulCraft.Visible = false
	end)
	script.Parent.Food.MouseButton1Click:connect(function()
		script.Parent.FoodMarket.Visible = true
		script.Parent.WeaponStore.Visible = false
		script.Parent.ArmorArmoring.Visible = false
		script.Parent.SoulCraft.Visible = false
	end)
	script.Parent.Armor.MouseButton1Click:connect(function()
		script.Parent.FoodMarket.Visible = false
		script.Parent.WeaponStore.Visible = false
		script.Parent.ArmorArmoring.Visible = true
		script.Parent.SoulCraft.Visible = false
	end)
	script.Parent.SOULs.MouseButton1Click:connect(function()
		script.Parent.FoodMarket.Visible = false
		script.Parent.WeaponStore.Visible = false
		script.Parent.ArmorArmoring.Visible = false
		script.Parent.SoulCraft.Visible = true
	end)


	local c = workspace.Shops:GetChildren()
	local OpenCD = false
	for i=1,#c do
		c[i].Touched:Connect(function(h)
			if game.Players.LocalPlayer.Character and h == game.Players.LocalPlayer.Character.HumanoidRootPart then
				if OpenCD == false then
				else
					repeat 
						task.wait()
					until OpenCD == false
				end
				LoadShop(c[i].Name)
				OpenCD = true
				script.Parent.Parent.Enabled = true
				game.TweenService:Create(script.Parent, TweenInfo.new(1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut),{Size = UDim2.new(0.8, 0, 0.75, 0),Position = UDim2.new(0.12, 0, 0.15, 0)}):Play()
				wait(1.1)
				OpenCD = false
			end
		end)
		c[i].TouchEnded:Connect(function(h)
			if game.Players.LocalPlayer.Character and h == game.Players.LocalPlayer.Character.HumanoidRootPart then
				if OpenCD == false then
				else
					repeat 
						task.wait()
					until OpenCD == false
				end
				OpenCD = true
				game.TweenService:Create(script.Parent, TweenInfo.new(1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut),{Size = UDim2.new(0, 0, 0, 0),Position = UDim2.new(0.5, 0,-1, 0)}):Play()
				wait(1.1)
				script.Parent.Parent.Enabled = false
				OpenCD = false
			end
		end)
	end
		end
		end
		end
	end
end