-- Serviços
local Players = game:GetService("Players")
local TweenService = game:GetService("TweenService")
local RunService = game:GetService("RunService")
local CoreGui = game:GetService("CoreGui")
local player = [Link]
-- Função para pegar CoreGui ou PlayerGui (fallback)
local function getGui()
local success, result = pcall(function()
return CoreGui
end)
if success and result then
return result
else
return player:WaitForChild("PlayerGui")
end
end
local parentGui = getGui()
-- Carregar receitas via Pastebin com proteção
local success, recipes = pcall(function()
return loadstring(game:HttpGet("[Link]
end)
if not success or type(recipes) ~= "table" then
error("❌ Falha ao carregar receitas do Pastebin.")
end
-- Cores para raridades
local rarityColors = {
["Common"] = [Link](155, 155, 155),
["Uncommon"] = [Link](85, 255, 85),
["Rare"] = [Link](85, 170, 255),
["Legendary"] = [Link](255, 170, 0),
["Mythical"] = [Link](255, 85, 255),
["Divine"] = [Link](255, 255, 85),
["Prismatic"] = [Link](170, 255, 255)
}
-- Variáveis globais
local isEnabled = false
local currentFood = nil -- vai setar pelo porco
local currentRarity = nil -- vai setar automaticamente
local currentCraving = "Aguardando..."
local gui = nil
local monitorConnection = nil
-- Destruir GUI antiga (se houver)
local function destroyExistingGui()
if gui then
gui:Destroy()
gui = nil
end
if monitorConnection then
monitorConnection:Disconnect()
monitorConnection = nil
end
-- Limpar GUIs antigas também
local oldGuis = {}
pcall(function()
for _, child in pairs(CoreGui:GetChildren()) do
if [Link] == "CookingInterface" then
[Link](oldGuis, child)
end
end
end)
pcall(function()
for _, child in pairs([Link]:GetChildren()) do
if [Link] == "CookingInterface" then
[Link](oldGuis, child)
end
end
end)
for _, oldGui in pairs(oldGuis) do
oldGui:Destroy()
end
end
-- Pegar texto do porco (craving) no workspace (compatível)
local function getCravingText()
local success, result = pcall(function()
local path = {
"Interaction",
"UpdateItems",
"CookingEvent",
"CookingEventModel",
"PigChefFolder",
"PigChef",
"Cravings",
"CravingThoughtBubblePart",
"CravingBillboard",
"BG",
"CravingTextLabel"
}
local current = workspace
for _, childName in pairs(path) do
current = current:FindFirstChild(childName)
if not current then
return nil
end
end
if current and current:IsA("TextLabel") then
local text = [Link]
local extracted = [Link](text, ">([^<]+)<") or [Link](text,
"([%w%s]+)")
return extracted
end
return nil
end)
if success and result then
return result
else
return nil
end
end
-- Atualizar comida e raridade de acordo com o que o porco pediu
local function updateCurrentFoodAndRarity(cravingText)
if not cravingText then return end
-- Verifica se a comida existe na tabela de receitas
for foodName, rarities in pairs(recipes) do
-- O texto do porco geralmente tem o nome da comida, então verifica se o
texto contém o nome da comida (case insensitive)
if [Link]([Link](cravingText), [Link](foodName)) then
currentFood = foodName
-- Escolher a raridade com mais chances (ex: prismatic se tiver, senão
legendary, etc)
-- Prioridade para raridades mais raras para mostrar melhor a receita
local rarityOrder = {"Prismatic", "Divine", "Legendary", "Mythical",
"Rare", "Uncommon", "Common"}
for _, rarity in ipairs(rarityOrder) do
if rarities[rarity] then
currentRarity = rarity
break
end
end
return
end
end
-- Se não encontrou, zera
currentFood = nil
currentRarity = nil
end
-- Criar interface
local function createInterface()
destroyExistingGui()
gui = [Link]("ScreenGui")
[Link] = "CookingInterface"
[Link] = false
[Link] = parentGui
pcall(function()
[Link] = true
end)
local mainFrame = [Link]("Frame")
[Link] = "MainFrame"
[Link] = [Link](0, 320, 0, 420)
[Link] = [Link](0, 50, 0, 50)
mainFrame.BackgroundColor3 = [Link](45, 45, 45)
[Link] = 0
[Link] = true
[Link] = true
[Link] = gui
local corner = [Link]("UICorner")
[Link] = [Link](0, 15)
[Link] = mainFrame
-- Título
local titleLabel = [Link]("TextLabel")
[Link] = "TitleLabel"
[Link] = [Link](1, -20, 0, 30)
[Link] = [Link](0, 10, 0, 5)
[Link] = 1
[Link] = "🍳 Cooking Assistant"
titleLabel.TextColor3 = [Link](255, 255, 255)
[Link] = true
[Link] = [Link]
[Link] = mainFrame
-- Label do que o porco está pedindo
local cravingLabel = [Link]("TextLabel")
[Link] = "CravingLabel"
[Link] = [Link](1, -20, 0, 50)
[Link] = [Link](0, 10, 0, 40)
cravingLabel.BackgroundColor3 = [Link](35, 35, 35)
[Link] = 0
[Link] = currentCraving
cravingLabel.TextColor3 = [Link](255, 255, 255)
[Link] = true
[Link] = [Link]
[Link] = mainFrame
local cravingCorner = [Link]("UICorner")
[Link] = [Link](0, 8)
[Link] = cravingLabel
-- Dropdown para comidas
local foodFrame = [Link]("Frame")
[Link] = "FoodFrame"
[Link] = [Link](1, -20, 0, 40)
[Link] = [Link](0, 10, 0, 100)
foodFrame.BackgroundColor3 = [Link](35, 35, 35)
[Link] = 0
[Link] = mainFrame
local foodCorner = [Link]("UICorner")
[Link] = [Link](0, 8)
[Link] = foodFrame
local foodButton = [Link]("TextButton")
[Link] = "FoodButton"
[Link] = [Link](1, 0, 1, 0)
[Link] = [Link](0, 0, 0, 0)
[Link] = 1
[Link] = "Selecione a comida ▼"
foodButton.TextColor3 = [Link](255, 255, 255)
[Link] = true
[Link] = [Link]
[Link] = foodFrame
-- Dropdown para raridades
local rarityFrame = [Link]("Frame")
[Link] = "RarityFrame"
[Link] = [Link](1, -20, 0, 40)
[Link] = [Link](0, 10, 0, 150)
rarityFrame.BackgroundColor3 = [Link](35, 35, 35)
[Link] = 0
[Link] = mainFrame
local rarityCorner = [Link]("UICorner")
[Link] = [Link](0, 8)
[Link] = rarityFrame
local rarityButton = [Link]("TextButton")
[Link] = "RarityButton"
[Link] = [Link](1, 0, 1, 0)
[Link] = [Link](0, 0, 0, 0)
[Link] = 1
[Link] = "Selecione a raridade ▼"
rarityButton.TextColor3 = [Link](255, 255, 255)
[Link] = true
[Link] = [Link]
[Link] = rarityFrame
-- Frame para mostrar ingredientes
local ingredientsFrame = [Link]("Frame")
[Link] = "IngredientsFrame"
[Link] = [Link](1, -20, 0, 100)
[Link] = [Link](0, 10, 0, 200)
ingredientsFrame.BackgroundColor3 = [Link](35, 35, 35)
[Link] = 0
[Link] = mainFrame
local ingredientsCorner = [Link]("UICorner")
[Link] = [Link](0, 8)
[Link] = ingredientsFrame
local ingredientsLabel = [Link]("TextLabel")
[Link] = "IngredientsLabel"
[Link] = [Link](1, -10, 1, -10)
[Link] = [Link](0, 5, 0, 5)
[Link] = 1
[Link] = "Aguardando seleção..."
ingredientsLabel.TextColor3 = [Link](255, 255, 255)
[Link] = true
[Link] = [Link]
[Link] = true
[Link] = ingredientsFrame
-- Botão ON/OFF
local toggleFrame = [Link]("Frame")
[Link] = "ToggleFrame"
[Link] = [Link](1, -20, 0, 50)
[Link] = [Link](0, 10, 0, 310)
toggleFrame.BackgroundColor3 = [Link](200, 50, 50)
[Link] = 0
[Link] = mainFrame
local toggleCorner = [Link]("UICorner")
[Link] = [Link](0, 25)
[Link] = toggleFrame
local toggleButton = [Link]("TextButton")
[Link] = "ToggleButton"
[Link] = [Link](1, 0, 1, 0)
[Link] = [Link](0, 0, 0, 0)
[Link] = 1
[Link] = "OFF"
toggleButton.TextColor3 = [Link](255, 255, 255)
[Link] = true
[Link] = [Link]
[Link] = toggleFrame
-- Botão fechar
local closeButton = [Link]("TextButton")
[Link] = "CloseButton"
[Link] = [Link](0, 30, 0, 30)
[Link] = [Link](1, -35, 0, 5)
closeButton.BackgroundColor3 = [Link](255, 50, 50)
[Link] = 0
[Link] = "✕"
closeButton.TextColor3 = [Link](255, 255, 255)
[Link] = true
[Link] = [Link]
[Link] = mainFrame
local closeCorner = [Link]("UICorner")
[Link] = [Link](0, 15)
[Link] = closeButton
-- Atualizar ingredientes mostrado
local function updateIngredients()
if currentFood and currentRarity and recipes[currentFood] and
recipes[currentFood][currentRarity] then
local ingredients = recipes[currentFood][currentRarity]
if #ingredients > 0 then
[Link] = ingredients[1]
else
[Link] = "Nenhuma receita encontrada"
end
else
[Link] = "Aguardando seleção..."
end
end
-- Atualizar texto e cor do toggle ON/OFF
local function updateToggle()
if isEnabled then
toggleFrame.BackgroundColor3 = [Link](50, 200, 50)
[Link] = "ON"
else
toggleFrame.BackgroundColor3 = [Link](200, 50, 50)
[Link] = "OFF"
end
end
-- Criar dropdown comida
local function createFoodDropdown()
local dropdown = [Link]("Frame")
[Link] = "FoodDropdown"
[Link] = [Link](1, 0, 0, 200)
[Link] = [Link](0, 0, 1, 5)
dropdown.BackgroundColor3 = [Link](25, 25, 25)
[Link] = 1
dropdown.BorderColor3 = [Link](100, 100, 100)
[Link] = false
[Link] = 10
[Link] = foodFrame
local dropdownCorner = [Link]("UICorner")
[Link] = [Link](0, 8)
[Link] = dropdown
local scrollFrame = [Link]("ScrollingFrame")
[Link] = "ScrollFrame"
[Link] = [Link](1, -10, 1, -10)
[Link] = [Link](0, 5, 0, 5)
[Link] = 1
[Link] = 6
scrollFrame.ScrollBarImageColor3 = [Link](100, 100, 100)
[Link] = dropdown
local layout = [Link]("UIListLayout")
[Link] = [Link]
[Link] = [Link](0, 2)
[Link] = scrollFrame
for foodName, _ in pairs(recipes) do
local button = [Link]("TextButton")
[Link] = foodName
[Link] = [Link](1, -12, 0, 30)
button.BackgroundColor3 = [Link](35, 35, 35)
[Link] = 0
[Link] = foodName
button.TextColor3 = [Link](255, 255, 255)
[Link] = true
[Link] = [Link]
[Link] = scrollFrame
local buttonCorner = [Link]("UICorner")
[Link] = [Link](0, 4)
[Link] = button
button.MouseButton1Click:Connect(function()
currentFood = foodName
[Link] = currentFood .. " ▼"
[Link] = false
-- Reset rarity if not available
if not recipes[currentFood][currentRarity] then
for rarity, _ in pairs(recipes[currentFood]) do
currentRarity = rarity
break
end
[Link] = currentRarity .. " ▼"
rarityButton.TextColor3 = rarityColors[currentRarity] or
[Link](255, 255, 255)
end
updateIngredients()
end)
[Link]:Connect(function()
button.BackgroundColor3 = [Link](50, 50, 50)
end)
[Link]:Connect(function()
button.BackgroundColor3 = [Link](35, 35, 35)
end)
end
[Link] = [Link](0, 0, 0, [Link].Y)
layout:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function()
[Link] = [Link](0, 0, 0,
[Link].Y)
end)
return dropdown
end
local function createRarityDropdown()
local dropdown = [Link]("Frame")
[Link] = "RarityDropdown"
[Link] = [Link](1, 0, 0, 150)
[Link] = [Link](0, 0, 1, 5)
dropdown.BackgroundColor3 = [Link](25, 25, 25)
[Link] = 1
dropdown.BorderColor3 = [Link](100, 100, 100)
[Link] = false
[Link] = 10
[Link] = rarityFrame
local dropdownCorner = [Link]("UICorner")
[Link] = [Link](0, 8)
[Link] = dropdown
local scrollFrame = [Link]("ScrollingFrame")
[Link] = "ScrollFrame"
[Link] = [Link](1, -10, 1, -10)
[Link] = [Link](0, 5, 0, 5)
[Link] = 1
[Link] = 6
scrollFrame.ScrollBarImageColor3 = [Link](100, 100, 100)
[Link] = dropdown
local layout = [Link]("UIListLayout")
[Link] = [Link]
[Link] = [Link](0, 2)
[Link] = scrollFrame
local function updateRarityDropdown()
for _, child in pairs(scrollFrame:GetChildren()) do
if child:IsA("TextButton") then
child:Destroy()
end
end
if recipes[currentFood] then
for rarity, _ in pairs(recipes[currentFood]) do
local button = [Link]("TextButton")
[Link] = rarity
[Link] = [Link](1, -12, 0, 30)
button.BackgroundColor3 = [Link](35, 35, 35)
[Link] = 0
[Link] = rarity
button.TextColor3 = rarityColors[rarity] or [Link](255,
255, 255)
[Link] = true
[Link] = [Link]
[Link] = scrollFrame
local buttonCorner = [Link]("UICorner")
[Link] = [Link](0, 4)
[Link] = button
button.MouseButton1Click:Connect(function()
currentRarity = rarity
[Link] = currentRarity .. " ▼"
rarityButton.TextColor3 = rarityColors[currentRarity] or
[Link](255, 255, 255)
[Link] = false
updateIngredients()
end)
[Link]:Connect(function()
button.BackgroundColor3 = [Link](50, 50, 50)
end)
[Link]:Connect(function()
button.BackgroundColor3 = [Link](35, 35, 35)
end)
end
end
[Link] = [Link](0, 0, 0,
[Link].Y)
end
updateRarityDropdown()
return dropdown, updateRarityDropdown
end
local foodDropdown = createFoodDropdown()
local rarityDropdown, updateRarityDropdownFunc = createRarityDropdown()
-- Eventos para abrir e fechar dropdowns
foodButton.MouseButton1Click:Connect(function()
[Link] = not [Link]
[Link] = false
end)
rarityButton.MouseButton1Click:Connect(function()
updateRarityDropdownFunc()
[Link] = not [Link]
[Link] = false
end)
-- Toggle ON/OFF
toggleButton.MouseButton1Click:Connect(function()
isEnabled = not isEnabled
updateToggle()
if isEnabled then
print("🍳 [COOKING] Sistema ativado!")
else
print("🍳 [COOKING] Sistema desativado!")
end
end)
-- Botão fechar GUI
closeButton.MouseButton1Click:Connect(function()
destroyExistingGui()
end)
-- Atualiza ingredientes mostrado
local function updateIngredients()
if recipes[currentFood] and recipes[currentFood][currentRarity] then
local ingredients = recipes[currentFood][currentRarity]
if #ingredients > 0 then
[Link] = ingredients[1]
else
[Link] = "Nenhuma receita encontrada"
end
else
[Link] = "Receita não disponível"
end
end
-- Atualiza botão toggle
local function updateToggle()
if isEnabled then
toggleFrame.BackgroundColor3 = [Link](50, 200, 50)
[Link] = "ON"
else
toggleFrame.BackgroundColor3 = [Link](200, 50, 50)
[Link] = "OFF"
end
end
-- Atualiza comida atual para o que o porco está pedindo
local function updateCurrentFoodFromCraving(cravingText)
-- Busca qual comida corresponde ao texto do porco
-- Vamos procurar em todas receitas se algum nome está contido no texto
pedido pelo porco
for foodName, rarities in pairs(recipes) do
-- Para cada raridade da comida
for rarity, ingredients in pairs(rarities) do
for _, ingredientText in ipairs(ingredients) do
-- Se o texto do porco contém o nome da comida (simplificado)
if [Link](cravingText:lower(), foodName:lower()) then
currentFood = foodName
currentRarity = rarity
[Link] = currentFood .. " ▼"
[Link] = currentRarity .. " ▼"
rarityButton.TextColor3 = rarityColors[currentRarity] or
[Link](255, 255, 255)
updateIngredients()
return
end
end
end
end
end
-- Loop para monitorar o porco e atualizar interface automaticamente
monitorConnection = spawn(function()
while gui and [Link] do
if isEnabled then
local craving = getCravingText()
if craving and craving ~= "" then
currentCraving = craving
[Link] = "🐷 " .. craving
cravingLabel.TextColor3 = [Link](85, 255, 85)
-- Atualiza comida e raridade baseada no pedido do porco
updateCurrentFoodFromCraving(craving)
else
currentCraving = "Aguardando..."
[Link] = "🐷 Aguardando..."
cravingLabel.TextColor3 = [Link](255, 255, 255)
end
else
[Link] = "🔴 Sistema Desativado"
cravingLabel.TextColor3 = [Link](255, 85, 85)
end
wait(1)
end
end)
-- Inicializa interface
updateIngredients()
updateToggle()
-- Fecha dropdowns ao clicar fora
gui.MouseButton1Click:Connect(function()
[Link] = false
[Link] = false
end)
return gui
end
print("🍳 Carregando Cooking Assistant...")
createInterface()
print("🍳 Interface criada com sucesso!")
print("🍳 Monitora automaticamente o que o porco está pedindo")
print("🍳 Use o botão ON/OFF para ativar/desativar o sistema")
print("🍳 Arraste a interface para mover")