-- Recipe Book GUI for Untitled Bakery -- Press B to toggle | Click recipes to highlight ingredients in-game local Players = game:GetService("Players") local UserInputService = game:GetService("UserInputService") local player = Players.LocalPlayer local oldGui = player:WaitForChild("PlayerGui"):FindFirstChild("RecipeBookGUI") if oldGui then oldGui:Destroy() end local ING = workspace:WaitForChild("BreadIngredients") local EQ = workspace:WaitForChild("BreadEquipment") local SKIP_NAMES = { TakePrompt = true, PlacePrompt = true, PlayerPosition = true, Burst = true, Slot = true, Raised = true, Fosset = true, Surface = true, PromtPart = true, } local function getMainPart(obj) if not obj then return nil end if obj:IsA("BasePart") then return obj end if obj:IsA("Model") then local pile = obj:FindFirstChild("Pile") if pile and pile:IsA("BasePart") then return pile end if obj.PrimaryPart then return obj.PrimaryPart end for _, c in ipairs(obj:GetChildren()) do if c:IsA("BasePart") and not SKIP_NAMES[c.Name] then return c end end for _, c in ipairs(obj:GetDescendants()) do if c:IsA("BasePart") and not SKIP_NAMES[c.Name] then return c end end end if obj:IsA("Folder") then for _, c in ipairs(obj:GetChildren()) do local p = getMainPart(c) if p then return p end end end return nil end local function getGiverParts(name) local parts = {} for _, c in ipairs(ING:GetChildren()) do if c.Name == name and c:IsA("Model") then table.insert(parts, c) end end return parts end local function getFlourByType(flourType) for _, c in ipairs(ING:GetChildren()) do if c.Name == "FlourGiver" and c:IsA("Model") then local pile = c:FindFirstChild("Pile") if pile then local prompt = pile:FindFirstChild("ProximityPrompt") if prompt and prompt.ObjectText == flourType then return {c} end end end end return {} end local function getStationParts(name) local obj = EQ:FindFirstChild(name) local p = getMainPart(obj) return p and {p} or {} end local function getAllParts(obj) local parts = {} if not obj then return parts end if obj:IsA("BasePart") then table.insert(parts, obj) return parts end for _, c in ipairs(obj:GetDescendants()) do if c:IsA("BasePart") then table.insert(parts, c) end end return parts end local function getAllGiverParts(name) local parts = {} for _, c in ipairs(ING:GetChildren()) do if c.Name == name and c:IsA("Model") then table.insert(parts, c) end end return parts end local function getVisibleParts(name) local parts = {} for _, c in ipairs(ING:GetChildren()) do if c.Name == name and c:IsA("Model") then for _, d in ipairs(c:GetDescendants()) do if d:IsA("BasePart") and d.Transparency < 1 and d.Size.Y >= 0.05 then table.insert(parts, d) end end end end return parts end local ingredientMap = { Flour = function() return getFlourByType("Flour") end, ["Rye Flour"] = function() return getFlourByType("Rye Flour") end, ["Oat Flour"] = function() return getFlourByType("Oat Flour") end, Yeast = function() return getAllGiverParts("YeastGiver") end, Water = function() local o = ING:FindFirstChild("WaterTank"); local p = getMainPart(o); return p and {p} or {} end, Sugar = function() return getGiverParts("SugarGiver") end, Egg = function() return getGiverParts("EggGiver") end, Eggs = function() return getGiverParts("EggGiver") end, Butter = function() return getGiverParts("ButterPlate") end, Milk = function() return getGiverParts("MilkGiver") end, Vanilla = function() return getGiverParts("VanillaGiver") end, Chocolate = function() return getGiverParts("ChocolateGiver") end, ["Coffee Beans"] = function() local parts = getGiverParts("CoffeeGiver") local dms = EQ:FindFirstChild("DrinkMakingStation") if dms then for _, d in ipairs(dms:GetChildren()) do if d.Name == "beans" and d:IsA("BasePart") and d.Transparency < 1 then table.insert(parts, d) end end end return parts end, Spice = function() return getVisibleParts("SpiceGiver") end, Meat = function() return getGiverParts("MeatBowl") end, Strawberry = function() return getGiverParts("StrawberryGiver") end, Strawberries = function() return getGiverParts("StrawberryGiver") end, Apple = function() return getGiverParts("Apples") end, Pumpkin = function() return getGiverParts("Pumpkin") end, ["Pecan Filling"] = function() return getGiverParts("PecanFiling") end, ["Raspberry Jam"] = function() return getStationParts("Jam") end, Custard = function() return getStationParts("Custard Jars") end, ["Mixing Bowl"] = function() return getStationParts("MixingBowls") end, KneadingTable = function() return getStationParts("KneadingTable") end, Oven = function() return getStationParts("Ovens") end, ["Meat Grinder"] = function() return getStationParts("MeatGrinder") end, Mortar = function() return getStationParts("Mortar") end, ["Cake Station"] = function() return getStationParts("CakeStation") end, ["Drink Making Station"] = function() return getStationParts("DrinkMakingStation") end, ["Drink Pouring"] = function() return getStationParts("DrinkPouring") end, ["Tart Shelf"] = function() local s = EQ:FindFirstChild("ItemShelves") local o = s and s:FindFirstChild("TartShelf") local p = getMainPart(o) return p and {p} or {} end, ["Proofing Shelf"] = function() local s = EQ:FindFirstChild("ProofingSheles") local o = s and s:FindFirstChild("ProofingShelf") local p = getMainPart(o) return p and {p} or {} end, } local Recipes = { {id="bread",name="Bread",category="Bread",kneading=true,ingredients={"Flour","Yeast","Water"},steps={"Mix Flour + Yeast + Water in mixing bowl (gives 3 dough)","Knead at kneading table (5 sec)","Proof on proofing shelf (~2 min)","Bake in oven"},tip="Dough rises in the proofing room — big and round means done",hl={"Flour","Yeast","Water"}}, {id="rye_bread",name="Rye Bread",category="Bread",kneading=true,ingredients={"Rye Flour","Yeast","Water"},steps={"Mix Rye Flour + Yeast + Water in mixing bowl (gives 3 dough)","Knead at kneading table (5 sec)","Proof on proofing shelf (~2 min)","Bake in oven"},tip="Same as bread but with Rye Flour instead",hl={"Rye Flour","Yeast","Water"}}, {id="oat_bread",name="Oat Bread",category="Bread",kneading=true,ingredients={"Oat Flour","Yeast","Water"},steps={"Mix Oat Flour + Yeast + Water in mixing bowl (gives 3 dough)","Knead at kneading table (5 sec)","Proof on proofing shelf (~2 min)","Bake in oven"},tip="Same as bread but with Oat Flour instead",hl={"Oat Flour","Yeast","Water"}}, {id="muffin",name="Muffin",category="Muffin",kneading=false,ingredients={"Flour","Yeast","Sugar","Water"},steps={"Mix Flour + Yeast + Sugar in mixing bowl","Add Water (gives 4 dough balls)","Place dough balls on oven to bake"},tip="Makes 4 muffins at once",hl={"Flour","Yeast","Sugar","Water"}}, {id="choc_muffin",name="Chocolate Muffin",category="Muffin",kneading=false,ingredients={"Flour","Yeast","Sugar","Chocolate","Water"},steps={"Mix Flour + Yeast + Sugar + Chocolate in mixing bowl","Add Water (gives 4 dough balls)","Place dough balls on oven to bake"},tip="Muffin with chocolate",hl={"Flour","Yeast","Sugar","Chocolate","Water"}}, {id="pork_pie",name="British Pork Pie",category="Pie",kneading=false,ingredients={"Flour","Butter","Water","Meat"},steps={"Mix Flour + Butter + Water in mixing bowl (gives 2 pie crusts)","Grind meat at the meat grinder (~10 sec)","Fill pie crusts with ground pork","Bake in oven"},tip="Meat is beside the meat grinder",hl={"Flour","Butter","Water","Meat"}}, {id="manchester_tart",name="Manchester Tart",category="Pie",kneading=false,ingredients={"Flour","Butter","Sugar","Egg","Raspberry Jam","Custard"},steps={"Mix Flour + Butter + Sugar + Egg in mixing bowl (gives 2 crusts)","Bake crusts in oven","Fill at tart shelf: Raspberry Jam first, then Custard"},tip="Tart shelf is near the mixing area. Order: jam then custard.",hl={"Flour","Butter","Sugar","Egg","Raspberry Jam","Custard"}}, {id="apple_pie",name="Apple Pie",category="Pie",kneading=false,ingredients={"Flour","Butter","Milk","Sugar","Egg","Apple"},steps={"Mix Flour + Butter + Milk + Sugar + Egg in mixing bowl","Roll out pie dough at kneading table","Fill with Apple from the crate","Bake in oven"},tip="Apple crate is under the kneading table",hl={"Flour","Butter","Milk","Sugar","Egg","Apple"}}, {id="raspberry_pie",name="Raspberry Pie",category="Pie",kneading=false,ingredients={"Flour","Butter","Milk","Sugar","Egg","Raspberry Jam"},steps={"Mix Flour + Butter + Milk + Sugar + Egg in mixing bowl","Roll out pie dough at kneading table","Fill with Raspberry Jam","Bake in oven"},tip="Uses Raspberry Jam, not fresh raspberries",hl={"Flour","Butter","Milk","Sugar","Egg","Raspberry Jam"}}, {id="pumpkin_pie",name="Pumpkin Pie",category="Pie",kneading=false,ingredients={"Flour","Butter","Milk","Sugar","Egg","Pumpkin"},steps={"Mix Flour + Butter + Milk + Sugar + Egg in mixing bowl","Roll out pie dough at kneading table","Fill with Pumpkin from the crate","Bake in oven"},tip="Pumpkin crate is under the kneading table",hl={"Flour","Butter","Milk","Sugar","Egg","Pumpkin"}}, {id="pecan_pie",name="Pecan Pie",category="Pie",kneading=false,ingredients={"Flour","Butter","Milk","Sugar","Egg","Pecan Filling"},steps={"Mix Flour + Butter + Milk + Sugar + Egg in mixing bowl","Roll out pie dough at kneading table","Fill with Pecan filling from jar near yeast","Bake in oven"},tip="Pecan jar is up near the yeast giver",hl={"Flour","Butter","Milk","Sugar","Egg","Pecan Filling"}}, {id="cake_layer",name="Cake Layer",category="Cake",kneading=false,ingredients={"Butter","Flour","Milk","Sugar","Egg","Vanilla"},steps={"Mix Butter + Flour + Milk + Sugar + Egg + Vanilla in mixing bowl (gives 3 batter)","Bake in oven","Assemble at cake station: stack 3 layers","Hold icing to finish the cake"},tip="Cake station is the table with a cake stand",hl={"Butter","Flour","Milk","Sugar","Egg","Vanilla"}}, {id="choc_cake",name="Chocolate Cake Layer",category="Cake",kneading=false,ingredients={"Butter","Flour","Milk","Sugar","Egg","Chocolate"},steps={"Mix Butter + Flour + Milk + Sugar + Egg + Chocolate in mixing bowl (gives 3 batter)","Bake in oven","Assemble at cake station: stack 3 layers","Hold icing to finish the cake"},tip="Same as Cake Layer but swap Vanilla for Chocolate",hl={"Butter","Flour","Milk","Sugar","Egg","Chocolate"}}, {id="cake_icing",name="Cake Icing",category="Icing",kneading=false,ingredients={"Butter","Sugar","Milk","+ Flavor"},steps={"Mix Butter + Sugar + Milk in mixing bowl (base icing)","Add one flavor: Vanilla, Chocolate, or Strawberries"},tip="3 variants: Vanilla, Chocolate, Strawberry",hl={"Butter","Sugar","Milk","Vanilla","Chocolate","Strawberry"}}, {id="gingerbread",name="Gingerbread Man",category="Cookie",kneading=false,ingredients={"Flour","Sugar","Butter","Eggs","Spice"},steps={"Grind Spice in the Mortar","Mix Flour + Sugar + Butter + Eggs + Ground Spice in mixing bowl","Cut dough at the station","Bake in oven","Apply icing to finish"},tip="Mortar is near the back. Must grind spice first!",hl={"Spice","Flour","Sugar","Butter","Eggs"}}, {id="sugar_cookie",name="Sugar Cookie",category="Cookie",kneading=false,ingredients={"Flour","Sugar","Milk","Eggs","Spice"},steps={"Grind Spice in the Mortar","Mix Flour + Sugar + Milk + Eggs + Ground Spice in mixing bowl","Cut dough at the station","Bake in oven","Apply icing to finish"},tip="Mortar is near the back. Must grind spice first!",hl={"Spice","Flour","Sugar","Milk","Eggs"}}, {id="coffee",name="Coffee",category="Drink",kneading=false,ingredients={"Coffee Beans","Water"},steps={"Grab Coffee Beans from the coffee bean giver","Grab Water from the water keg","Assemble at the drink making station (kitchen side)","Pour at the drink pouring station (cashier side) — gives 3 cups"},tip="Coffee Beans + Water",hl={"Coffee Beans","Water"}}, {id="tea",name="Tea",category="Drink",kneading=false,ingredients={"Spices","Water"},steps={"Grab Spices from the spice giver","Grab Water from the water keg","Assemble at the drink making station (kitchen side)","Pour at the drink pouring station (cashier side) — gives 3 cups"},tip="Spices + Water",hl={"Spice","Water"}}, {id="hot_choc",name="Hot Chocolate",category="Drink",kneading=false,ingredients={"Chocolate","Water"},steps={"Grab Chocolate from the chocolate giver","Grab Water from the water keg","Assemble at the drink making station (kitchen side)","Pour at the drink pouring station (cashier side) — gives 3 cups"},tip="Chocolate + Water",hl={"Chocolate","Water"}}, } local Categories = {"All","Bread","Muffin","Cookie","Pie","Cake","Icing","Drink"} local guiOpen = false local currentCategory = "All" local searchText = "" local highlightedRecipe = nil local highlightObjects = {} local BG = Color3.fromRGB(30,28,26) local CARD = Color3.fromRGB(40,38,35) local ACCENT = Color3.fromRGB(200,160,80) local ACCENT_DIM = Color3.fromRGB(120,100,55) local TEXT = Color3.fromRGB(230,220,200) local TEXT_DIM = Color3.fromRGB(140,135,120) local TEXT_MID = Color3.fromRGB(175,165,145) local TAG_BG = Color3.fromRGB(60,55,48) local GREEN = Color3.fromRGB(80,130,80) local HIGHLIGHT_GREEN = Color3.fromRGB(80,200,80) local function clearHighlights() for _, h in ipairs(highlightObjects) do if h and h.Parent then h:Destroy() end end highlightObjects = {} highlightedRecipe = nil end local function addHighlights(recipe) if highlightedRecipe == recipe.id then clearHighlights(); return end clearHighlights() highlightedRecipe = recipe.id for _, key in ipairs(recipe.hl) do local resolver = ingredientMap[key] if resolver then local parts = resolver() for _, part in ipairs(parts) do local h = Instance.new("Highlight") h.FillColor = HIGHLIGHT_GREEN h.OutlineColor = HIGHLIGHT_GREEN h.FillTransparency = 0.75 h.OutlineTransparency = 0.3 h.Parent = part table.insert(highlightObjects, h) end end end end local screenGui = Instance.new("ScreenGui") screenGui.Name = "RecipeBookGUI" screenGui.ResetOnSpawn = false screenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling local mainFrame = Instance.new("Frame") mainFrame.Name = "MainFrame" mainFrame.Size = UDim2.new(0, 480, 0, 500) mainFrame.Position = UDim2.new(0.5, -240, 0.5, -250) mainFrame.BackgroundColor3 = BG mainFrame.BorderSizePixel = 0 mainFrame.Visible = false mainFrame.Parent = screenGui Instance.new("UICorner", mainFrame).CornerRadius = UDim.new(0, 12) local ms = Instance.new("UIStroke", mainFrame); ms.Color = ACCENT_DIM; ms.Thickness = 1.5 local titleBar = Instance.new("Frame") titleBar.Name = "TitleBar" titleBar.Size = UDim2.new(1, 0, 0, 44) titleBar.BackgroundColor3 = Color3.fromRGB(38, 35, 32) titleBar.BorderSizePixel = 0 titleBar.Parent = mainFrame Instance.new("UICorner", titleBar).CornerRadius = UDim.new(0, 12) local tcv = Instance.new("Frame", titleBar) tcv.Size = UDim2.new(1, 0, 0, 16); tcv.Position = UDim2.new(0, 0, 1, -16) tcv.BackgroundColor3 = Color3.fromRGB(38, 35, 32); tcv.BorderSizePixel = 0 local titleText = Instance.new("TextLabel", titleBar) titleText.Size = UDim2.new(0, 110, 1, 0); titleText.Position = UDim2.new(0, 16, 0, 0) titleText.BackgroundTransparency = 1; titleText.Text = "Recipe Book" titleText.TextColor3 = ACCENT; titleText.TextSize = 18 titleText.Font = Enum.Font.GothamBold; titleText.TextXAlignment = Enum.TextXAlignment.Left local searchBox = Instance.new("TextBox", titleBar) searchBox.Size = UDim2.new(0, 180, 0, 26); searchBox.Position = UDim2.new(0.5, -90, 0.5, -13) searchBox.BackgroundColor3 = Color3.fromRGB(25, 23, 21); searchBox.Text = "" searchBox.PlaceholderText = "Search recipes..."; searchBox.PlaceholderColor3 = TEXT_DIM searchBox.TextColor3 = TEXT; searchBox.TextSize = 12; searchBox.Font = Enum.Font.Gotham searchBox.BorderSizePixel = 0; searchBox.ClearTextOnFocus = false Instance.new("UICorner", searchBox).CornerRadius = UDim.new(0, 6) local sstr = Instance.new("UIStroke", searchBox); sstr.Color = ACCENT_DIM; sstr.Thickness = 1 local closeBtn = Instance.new("TextButton", titleBar) closeBtn.Size = UDim2.new(0, 28, 0, 28); closeBtn.Position = UDim2.new(1, -34, 0, 8) closeBtn.BackgroundColor3 = Color3.fromRGB(140, 45, 45); closeBtn.Text = "X" closeBtn.TextColor3 = Color3.fromRGB(255, 255, 255); closeBtn.TextSize = 14 closeBtn.Font = Enum.Font.GothamBold; closeBtn.BorderSizePixel = 0 Instance.new("UICorner", closeBtn).CornerRadius = UDim.new(0, 6) local dragging, dragStart, startPos titleBar.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then if UserInputService:GetFocusedTextBox() == searchBox then return end dragging = true; dragStart = input.Position; startPos = mainFrame.Position end end) titleBar.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = false end end) UserInputService.InputChanged:Connect(function(input) if dragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then local d = input.Position - dragStart mainFrame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + d.X, startPos.Y.Scale, startPos.Y.Offset + d.Y) end end) local catFrame = Instance.new("Frame", mainFrame) catFrame.Name = "CategoryBar"; catFrame.Size = UDim2.new(1, -24, 0, 26) catFrame.Position = UDim2.new(0, 12, 0, 50); catFrame.BackgroundTransparency = 1 local catLayout = Instance.new("UIListLayout", catFrame) catLayout.FillDirection = Enum.FillDirection.Horizontal; catLayout.Padding = UDim.new(0, 4) catLayout.SortOrder = Enum.SortOrder.LayoutOrder local catButtons = {} local function updateCatButtons() for n, b in pairs(catButtons) do b.BackgroundColor3 = n == currentCategory and ACCENT or TAG_BG b.TextColor3 = n == currentCategory and BG or TEXT_DIM end end local contentScroll = Instance.new("ScrollingFrame", mainFrame) contentScroll.Name = "Scroll"; contentScroll.Size = UDim2.new(1, -24, 1, -86) contentScroll.Position = UDim2.new(0, 12, 0, 82); contentScroll.BackgroundTransparency = 1 contentScroll.ScrollBarThickness = 4; contentScroll.ScrollBarImageColor3 = ACCENT_DIM contentScroll.BorderSizePixel = 0; contentScroll.CanvasSize = UDim2.new(0, 0, 0, 0) contentScroll.AutomaticCanvasSize = Enum.AutomaticSize.Y local cLayout = Instance.new("UIListLayout", contentScroll) cLayout.Padding = UDim.new(0, 6); cLayout.SortOrder = Enum.SortOrder.LayoutOrder local function buildContent() local scrollPos = contentScroll.CanvasPosition.Y for _, child in ipairs(contentScroll:GetChildren()) do if not child:IsA("UIListLayout") then child:Destroy() end end local order = 0 for _, recipe in ipairs(Recipes) do local catMatch = currentCategory == "All" or recipe.category == currentCategory local q = searchText:lower() local sMatch = q == "" or recipe.name:lower():find(q, 1, true) or recipe.category:lower():find(q, 1, true) or table.concat(recipe.ingredients, " "):lower():find(q, 1, true) or recipe.tip:lower():find(q, 1, true) if catMatch and sMatch then order = order + 1 local isActive = highlightedRecipe == recipe.id local card = Instance.new("TextButton") card.Name = "Card_" .. recipe.id card.Size = UDim2.new(1, 0, 0, 0) card.AutomaticSize = Enum.AutomaticSize.Y card.BackgroundColor3 = isActive and Color3.fromRGB(35, 50, 35) or CARD card.BorderSizePixel = 0; card.LayoutOrder = order card.Text = ""; card.AutoButtonColor = false card.Parent = contentScroll Instance.new("UICorner", card).CornerRadius = UDim.new(0, 8) if isActive then local cs = Instance.new("UIStroke", card) cs.Color = HIGHLIGHT_GREEN; cs.Thickness = 1.5; cs.Transparency = 0.3 end local header = Instance.new("Frame", card) header.Size = UDim2.new(1, -16, 0, 22); header.Position = UDim2.new(0, 8, 0, 8) header.BackgroundTransparency = 1 local nl = Instance.new("TextLabel", header) nl.Size = UDim2.new(1, -120, 1, 0); nl.BackgroundTransparency = 1 nl.Text = (isActive and "> " or "") .. recipe.name nl.TextColor3 = isActive and HIGHLIGHT_GREEN or ACCENT nl.TextSize = 14; nl.Font = Enum.Font.GothamBold nl.TextXAlignment = Enum.TextXAlignment.Left local kt = Instance.new("TextLabel", header) kt.Size = UDim2.new(0, 48, 0, 16); kt.Position = UDim2.new(1, -110, 0, 3) kt.BackgroundColor3 = recipe.kneading and GREEN or TAG_BG kt.Text = recipe.kneading and "Knead" or "No Knead" kt.TextColor3 = Color3.fromRGB(200, 200, 190); kt.TextSize = 8 kt.Font = Enum.Font.GothamBold; kt.BorderSizePixel = 0 Instance.new("UICorner", kt).CornerRadius = UDim.new(0, 4) local ct = Instance.new("TextLabel", header) ct.Size = UDim2.new(0, 48, 0, 16); ct.Position = UDim2.new(1, -56, 0, 3) ct.BackgroundColor3 = TAG_BG; ct.Text = recipe.category ct.TextColor3 = TEXT_MID; ct.TextSize = 8 ct.Font = Enum.Font.GothamBold; ct.BorderSizePixel = 0 ct.Visible = currentCategory == "All" Instance.new("UICorner", ct).CornerRadius = UDim.new(0, 4) local ir = Instance.new("TextLabel", card) ir.Size = UDim2.new(1, -16, 0, 0); ir.AutomaticSize = Enum.AutomaticSize.Y ir.Position = UDim2.new(0, 8, 0, 32); ir.BackgroundTransparency = 1 ir.Text = "Ingredients: " .. table.concat(recipe.ingredients, ", ") ir.TextColor3 = TEXT_MID; ir.TextSize = 11; ir.Font = Enum.Font.Gotham ir.TextXAlignment = Enum.TextXAlignment.Left; ir.TextWrapped = true local sy = 32 + ir.AbsoluteSize.Y + 6 for si, step in ipairs(recipe.steps) do local sr = Instance.new("TextLabel", card) sr.Size = UDim2.new(1, -24, 0, 0); sr.AutomaticSize = Enum.AutomaticSize.Y sr.Position = UDim2.new(0, 20, 0, sy); sr.BackgroundTransparency = 1 sr.Text = si .. ". " .. step; sr.TextColor3 = TEXT sr.TextSize = 11; sr.Font = Enum.Font.Gotham sr.TextXAlignment = Enum.TextXAlignment.Left; sr.TextWrapped = true sy = sy + sr.AbsoluteSize.Y + 2 end local tr = Instance.new("Frame", card) tr.Size = UDim2.new(1, -16, 0, 0); tr.AutomaticSize = Enum.AutomaticSize.Y tr.Position = UDim2.new(0, 8, 0, sy + 2) tr.BackgroundColor3 = Color3.fromRGB(35, 32, 28); tr.BorderSizePixel = 0 Instance.new("UICorner", tr).CornerRadius = UDim.new(0, 5) local ti = Instance.new("TextLabel", tr) ti.Size = UDim2.new(0, 16, 0, 16); ti.Position = UDim2.new(0, 6, 0, 4) ti.BackgroundTransparency = 1; ti.Text = "TIP" ti.TextColor3 = Color3.fromRGB(200, 140, 50); ti.TextSize = 8 ti.Font = Enum.Font.GothamBold local tt = Instance.new("TextLabel", tr) tt.Size = UDim2.new(1, -30, 0, 0); tt.AutomaticSize = Enum.AutomaticSize.Y tt.Position = UDim2.new(0, 28, 0, 4); tt.BackgroundTransparency = 1 tt.Text = recipe.tip; tt.TextColor3 = TEXT_DIM; tt.TextSize = 10 tt.Font = Enum.Font.Gotham; tt.TextXAlignment = Enum.TextXAlignment.Left tt.TextWrapped = true local pad = Instance.new("Frame", card) pad.Size = UDim2.new(1, 0, 0, 8) pad.Position = UDim2.new(0, 0, 0, sy + tt.AbsoluteSize.Y + 14) pad.BackgroundTransparency = 1 card.Size = UDim2.new(1, 0, 0, sy + tt.AbsoluteSize.Y + 22) card.MouseButton1Click:Connect(function() addHighlights(recipe) buildContent() end) card.MouseEnter:Connect(function() if not isActive then card.BackgroundColor3 = Color3.fromRGB(48, 45, 40) end end) card.MouseLeave:Connect(function() if not isActive then card.BackgroundColor3 = CARD end end) end end if order == 0 then local e = Instance.new("TextLabel", contentScroll) e.Size = UDim2.new(1, 0, 0, 50); e.BackgroundTransparency = 1 e.Text = "No recipes found"; e.TextColor3 = TEXT_DIM e.TextSize = 14; e.Font = Enum.Font.Gotham end contentScroll.CanvasPosition = Vector2.new(0, scrollPos) end local function buildCategoryButtons() for _, c in ipairs(catFrame:GetChildren()) do if c:IsA("TextButton") then c:Destroy() end end catButtons = {} for idx, cat in ipairs(Categories) do local b = Instance.new("TextButton", catFrame) b.Size = UDim2.new(0, 52, 0, 22) b.BackgroundColor3 = cat == currentCategory and ACCENT or TAG_BG b.Text = cat; b.TextColor3 = cat == currentCategory and BG or TEXT_DIM b.TextSize = 10; b.Font = Enum.Font.GothamBold b.BorderSizePixel = 0; b.LayoutOrder = idx Instance.new("UICorner", b).CornerRadius = UDim.new(0, 5) catButtons[cat] = b b.MouseButton1Click:Connect(function() currentCategory = cat; updateCatButtons(); buildContent() end) end end searchBox:GetPropertyChangedSignal("Text"):Connect(function() searchText = searchBox.Text; buildContent() end) closeBtn.MouseButton1Click:Connect(function() mainFrame.Visible = false; guiOpen = false; clearHighlights() end) local function toggleGUI() guiOpen = not guiOpen mainFrame.Visible = guiOpen if guiOpen then buildCategoryButtons(); buildContent() else clearHighlights() end end UserInputService.InputBegan:Connect(function(input, gp) if gp then return end if input.KeyCode == Enum.KeyCode.B then toggleGUI() end end) screenGui.Parent = player:WaitForChild("PlayerGui") buildCategoryButtons() buildContent()