Skip to content

JBL.lua #850

@kafill856-create

Description

@kafill856-create

-- โหลด Fluent UI Library (Library ยอดนิยมสำหรับทำ GUI สี่เหลี่ยมสวยๆ)
local Fluent = loadstring(game:HttpGet("https://github.com/dawid-scripts/Fluent/releases/latest/download/main.lua"))()

-- สร้างหน้าต่างหลัก (เลื่อนได้)
local Window = Fluent:CreateWindow({
Title = "Go A Garden - Ultimate Hub",
SubTitle = "by AI Companion",
TabWidth = 160,
Size = UDim2.fromOffset(580, 460),
Acrylic = true,
Theme = "Dark",
MinimizeKey = Enum.KeyCode.RightControl -- ปุ่มเปิด/ปิด UI (กด Right Control)
})

-- ตัวแปรเก็บสถานะการทำงาน และข้อมูลการเลือก
local State = {
Language = "TH", -- "TH" หรือ "EN"
AutoHarvest = false,
SelectedSeedToBuy = "Apple Seed",
AutoBuySeed = false,
SelectedSeedToSell = "Apple Seed",
AutoSellSeed = false,
AutoRainbow = false,
AutoGold = false,
AutoEvent = false,
AutoPlantMode = "Here", -- "Here" (ตรงที่ยืน) หรือ "All" (ทั่วสวน)
SelectedSeedToPlant = "Apple Seed",
AutoPlant = false
}

-- ข้อมูลภาษาใน UI
local Lang = {
TH = {
MainTab = "ฟังก์ชันหลัก",
ShopTab = "ร้านค้า & ขาย",
PlantTab = "ระบบปลูกผัก",
HarvestToggle = "เก็บผลไม้อัตโนมัติ",
RainbowToggle = "เก็บเมล็ดรุ้งอัตโนมัติ",
GoldToggle = "เก็บเมล็ดทองอัตโนมัติ",
EventToggle = "เก็บเมล็ดอีเว้นท์อัตโนมัติ",
SelectSeedBuy = "เลือกเมล็ดที่จะซื้อ",
AutoBuyBtn = "เปิดระบบซื้ออัตโนมัติ",
SelectSeedSell = "เลือกเมล็ดที่จะขาย",
AutoSellBtn = "เปิดระบบขายอัตโนมัติ",
PlantMode = "โหมดการปลูก",
SelectSeedPlant = "เลือกเมล็ดที่จะปลูก",
AutoPlantBtn = "เปิดระบบปลูกอัตโนมัติ",
},
EN = {
MainTab = "Main Functions",
ShopTab = "Shop & Sell",
PlantTab = "Planting System",
HarvestToggle = "Auto Harvest",
RainbowToggle = "Auto Collect Rainbow Seed",
GoldToggle = "Auto Collect Gold Seed",
EventToggle = "Auto Collect Event Seed",
SelectSeedBuy = "Select Seed to Buy",
AutoBuyBtn = "Toggle Auto Buy",
SelectSeedSell = "Select Seed to Sell",
AutoSellBtn = "Toggle Auto Sell",
PlantMode = "Planting Mode",
SelectSeedPlant = "Select Seed to Plant",
AutoPlantBtn = "Toggle Auto Plant",
}
}

-- รายชื่อเมล็ดพันธุ์ในเกม (ปรับเปลี่ยนชื่อให้ตรงกับในแมพได้เลย)
local SeedList = {"Apple Seed", "Orange Seed", "Watermelon Seed", "Rainbow Seed", "Gold Seed"}

-- สร้าง Tabs
local Tabs = {
Main = Window:AddTab({ Title = "Main", Icon = "home" }),
Shop = Window:AddTab({ Title = "Shop/Sell", Icon = "shopping-cart" }),
Plant = Window:AddTab({ Title = "Planting", Icon = "flower" }),
Settings = Window:AddTab({ Title = "Settings", Icon = "settings" })
}


-- [ TAB 1: MAIN FUNCTIONS (เก็บผลไม้ / เมล็ดพิเศษ) ]

local HarvestToggle = Tabs.Main:AddToggle("HarvestToggle", {Title = Lang.TH.HarvestToggle, Default = false})
HarvestToggle:OnChanged(function(Value) State.AutoHarvest = Value end)

local RainbowToggle = Tabs.Main:AddToggle("RainbowToggle", {Title = Lang.TH.RainbowToggle, Default = false})
RainbowToggle:OnChanged(function(Value) State.AutoRainbow = Value end)

local GoldToggle = Tabs.Main:AddToggle("GoldToggle", {Title = Lang.TH.GoldToggle, Default = false})
GoldToggle:OnChanged(function(Value) State.AutoGold = Value end)

local EventToggle = Tabs.Main:AddToggle("EventToggle", {Title = Lang.TH.EventToggle, Default = false})
EventToggle:OnChanged(function(Value) State.AutoEvent = Value end)


-- [ TAB 2: SHOP & SELL (ซื้อ/ขาย อัตโนมัติ) ]

local BuyDropdown = Tabs.Shop:AddDropdown("BuyDropdown", {
Title = Lang.TH.SelectSeedBuy,
Values = SeedList,
CurrentValue = "Apple Seed",
})
BuyDropdown:OnChanged(function(Value) State.SelectedSeedToBuy = Value end)

local BuyToggle = Tabs.Shop:AddToggle("BuyToggle", {Title = Lang.TH.AutoBuyBtn, Default = false})
BuyToggle:OnChanged(function(Value) State.AutoBuySeed = Value end)

Tabs.Shop:AddParagraph({Title = "---", Content = ""})

local SellDropdown = Tabs.Shop:AddDropdown("SellDropdown", {
Title = Lang.TH.SelectSeedSell,
Values = SeedList,
CurrentValue = "Apple Seed",
})
SellDropdown:OnChanged(function(Value) State.SelectedSeedToSell = Value end)

local SellToggle = Tabs.Shop:AddToggle("SellToggle", {Title = Lang.TH.AutoSellBtn, Default = false})
SellToggle:OnChanged(function(Value) State.AutoSellSeed = Value end)


-- [ TAB 3: PLANTING (ระบบปลูกผักอัตโนมัติ) ]

local ModeDropdown = Tabs.Plant:AddDropdown("ModeDropdown", {
Title = Lang.TH.PlantMode,
Values = {"Here (ตรงที่ยืน)", "All (ทั่วสวน)"},
CurrentValue = "Here (ตรงที่ยืน)",
})
ModeDropdown:OnChanged(function(Value)
State.AutoPlantMode = string.find(Value, "Here") and "Here" or "All"
end)

local PlantDropdown = Tabs.Plant:AddDropdown("PlantDropdown", {
Title = Lang.TH.SelectSeedPlant,
Values = SeedList,
CurrentValue = "Apple Seed",
})
PlantDropdown:OnChanged(function(Value) State.SelectedSeedToPlant = Value end)

local PlantToggle = Tabs.Plant:AddToggle("PlantToggle", {Title = Lang.TH.AutoPlantBtn, Default = false})
PlantToggle:OnChanged(function(Value) State.AutoPlant = Value end)


-- [ TAB 4: SETTINGS (เปลี่ยนภาษา) ]

local LangDropdown = Tabs.Settings:AddDropdown("LangDropdown", {
Title = "Language / ภาษา",
Values = {"ไทย (TH)", "English (EN)"},
CurrentValue = "ไทย (TH)",
})
LangDropdown:OnChanged(function(Value)
local chosen = string.find(Value, "ไทย") and "TH" or "EN"
State.Language = chosen

-- อัปเดตข้อความใน UI ตามภาษาที่เลือก
HarvestToggle:SetTitle(Lang[chosen].HarvestToggle)
RainbowToggle:SetTitle(Lang[chosen].RainbowToggle)
GoldToggle:SetTitle(Lang[chosen].GoldToggle)
EventToggle:SetTitle(Lang[chosen].EventToggle)
BuyDropdown:SetTitle(Lang[chosen].SelectSeedBuy)
BuyToggle:SetTitle(Lang[chosen].AutoBuyBtn)
SellDropdown:SetTitle(Lang[chosen].SelectSeedSell)
SellToggle:SetTitle(Lang[chosen].AutoSellBtn)
ModeDropdown:SetTitle(Lang[chosen].PlantMode)
PlantDropdown:SetTitle(Lang[chosen].SelectSeedPlant)
PlantToggle:SetTitle(Lang[chosen].AutoPlantBtn)

end)


-- [ LOOP LOGIC: ส่วนการทำงานเบื้องหลัง (Background Logic) ]

-- หมายเหตุ: คุณจำเป็นต้องแก้ไขคำสั่งภายใน 'Remotes' ให้ตรงกับระบบของตัวเกมจริง

task.spawn(function()
while task.wait(1) do
-- 1. เก็บผลไม้อัตโนมัติ
if State.AutoHarvest then
-- ใส่โค้ดส่งสัญญาณเก็บผลไม้ของตัวเกมตรงนี้
-- ตัวอย่าง: game:GetService("ReplicatedStorage").Remotes.Harvest:FireServer()
end

    -- 2. เก็บเมล็ดพิเศษ (รุ้ง / ทอง / อีเว้นท์)
    if State.AutoRainbow then
        -- โค้ดเก็บเมล็ดรุ้ง เช่น ตรวจสอบไอเทมบนพื้นแล้วเดินไปเก็บหรือ FireServer
    end
    if State.AutoGold then
        -- โค้ดเก็บเมล็ดทอง
    end
    if State.AutoEvent then
        -- โค้ดเก็บเมล็ดอีเว้นท์
    end

    -- 3. ซื้อเมล็ดอัตโนมัติ ตามที่เลือกไว้ใน Dropdown
    if State.AutoBuySeed then
        -- ตัวอย่าง: game:GetService("ReplicatedStorage").Remotes.BuySeed:FireServer(State.SelectedSeedToBuy)
    end

    -- 4. ขายเมล็ดอัตโนมัติ ตามที่เลือกไว้ใน Dropdown
    if State.AutoSellSeed then
        -- ตัวอย่าง: game:GetService("ReplicatedStorage").Remotes.SellSeed:FireServer(State.SelectedSeedToSell)
    end

    -- 5. ปลูกผักอัตโนมัติ
    if State.AutoPlant then
        if State.AutoPlantMode == "Here" then
            -- โค้ดสั่งปลูกตรงพิกัดที่ตัวละครยืนอยู่
        elseif State.AutoPlantMode == "All" then
            -- โค้ดวนลูปปลูกตามแปลงผักทั้งหมดในแปลงของคุณ
        end
    end
end

end)

-- แจ้งเตือนเมื่อรันสคริปต์สำเร็จ
Fluent:Notify({
Title = "Go A Garden Hub",
Content = "สคริปต์พร้อมใช้งานแล้ว! กด Right Control เพื่อเปิด/ปิดหน้าต่าง UI",
Duration = 5
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions