Sc
--// 🔥 PEEXHUB PRO - GARDEN HORIZONS EDITION
--// Fixed Version - All Features Working
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local CollectionService = game:GetService("CollectionService")
local TweenService = game:GetService("TweenService")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local Player = Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local RemoteEvents = ReplicatedStorage:WaitForChild("RemoteEvents")
local GetShopData = RemoteEvents:WaitForChild("GetShopData")
local PurchaseShopItem = RemoteEvents:WaitForChild("PurchaseShopItem")
local SellItems = RemoteEvents:WaitForChild("SellItems")
local GetQuestData = RemoteEvents:WaitForChild("GetQuestData")
local ClaimQuestReward = RemoteEvents:WaitForChild("ClaimQuestReward")
--------------------------------------------------
-- STATES (SAMA KAYA SCRIPT AWAL)
--------------------------------------------------
local AUTO_HARVEST = false
local AUTO_PLANT = false
local AUTO_BUY_SEEDS = false
local AUTO_BUY_GEAR = false
local AUTO_QUEST = false
local SELECTED_SEED = nil
local SELECTED_GEAR = nil
local BUY_AMOUNT = 1
local GUI_TRANSPARENCY = 0
local GUI_SCALE = 1
local CURRENT_TAB = "Home"
--------------------------------------------------
-- THEME CONFIG
--------------------------------------------------
local COLORS = {
Background = Color3.fromRGB(13, 13, 15),
Sidebar = Color3.fromRGB(20, 20, 23),
Topbar = Color3.fromRGB(25, 25, 28),
Content = Color3.fromRGB(18, 18, 21),
Card = Color3.fromRGB(28, 28, 32),
CardHover = Color3.fromRGB(35, 35, 40),
Accent = Color3.fromRGB(88, 101, 242),
AccentDark = Color3.fromRGB(71, 82, 196),
Success = Color3.fromRGB(59, 165, 93),
Danger = Color3.fromRGB(237, 66, 69),
Warning = Color3.fromRGB(250, 166, 26),
TextPrimary = Color3.fromRGB(255, 255, 255),
TextSecondary = Color3.fromRGB(185, 187, 190),
TextMuted = Color3.fromRGB(142, 146, 151)
}
local FONTS = {
Title = Enum.Font.GothamBold,
Header = Enum.Font.GothamSemibold,
Body = Enum.Font.Gotham,
Mono = Enum.Font.RobotoMono
}
--------------------------------------------------
-- GUI BASE WITH SCALING
--------------------------------------------------
local gui = Instance.new("ScreenGui")
gui.Name = "PeexHubModern"
gui.ResetOnSpawn = false
gui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
gui.Parent = Player.PlayerGui
local main = Instance.new("Frame")
main.Name = "MainFrame"
main.Size = UDim2.new(0, 600, 0, 400) -- Diperkecil dari 700x450
main.Position = UDim2.new(0.5, -300, 0.5, -200)
main.BackgroundColor3 = COLORS.Background
main.BorderSizePixel = 0
main.ClipsDescendants = true
main.Parent = gui
-- Scale support
local scaleValue = Instance.new("NumberValue")
scaleValue.Name = "Scale"
scaleValue.Value = 1
scaleValue.Parent = main
-- Apply scale function
local function applyScale(scale)
GUI_SCALE = scale
main.Size = UDim2.new(0, 600 * scale, 0, 400 * scale)
main.Position = UDim2.new(0.5, -300 * scale, 0.5, -200 * scale)
end
local shadow = Instance.new("ImageLabel")
shadow.Name = "Shadow"
shadow.AnchorPoint = Vector2.new(0.5, 0.5)
shadow.BackgroundTransparency = 1
shadow.Position = UDim2.new(0.5, 0, 0.5, 0)
shadow.Size = UDim2.new(1, 40, 1, 40)
shadow.Image = "rbxassetid://6015897843"
shadow.ImageColor3 = Color3.fromRGB(0, 0, 0)
shadow.ImageTransparency = 0.6
shadow.ScaleType = Enum.ScaleType.Slice
shadow.SliceCenter = Rect.new(49, 49, 450, 450)
shadow.ZIndex = -1
shadow.Parent = main
local corner = Instance.new("UICorner")
corner.CornerRadius = UDim.new(0, 12)
corner.Parent = main
local stroke = Instance.new("UIStroke")
stroke.Color = Color3.fromRGB(40, 40, 45)
stroke.Thickness = 1
stroke.Parent = main
--------------------------------------------------
-- TRANSPARENCY CONTROL
--------------------------------------------------
local function updateTransparency(value)
GUI_TRANSPARENCY = value
local alpha = 1 - value
main.BackgroundColor3 = Color3.fromRGB(13 * alpha, 13 * alpha, 15 * alpha)
-- Update all children transparency
for _, child in pairs(main:GetDescendants()) do
if child:IsA("Frame") and child.Name ~= "Shadow" then
local original = child:GetAttribute("OriginalBG") or child.BackgroundColor3
if not child:GetAttribute("OriginalBG") then
child:SetAttribute("OriginalBG", original)
end
local r, g, b = original.R * 255, original.G * 255, original.B * 255
child.BackgroundColor3 = Color3.fromRGB(r * alpha, g * alpha, b * alpha)
end
end
end
--------------------------------------------------
-- TOPBAR
--------------------------------------------------
local topbar = Instance.new("Frame")
topbar.Name = "Topbar"
topbar.Size = UDim2.new(1, 0, 0, 45)
topbar.BackgroundColor3 = COLORS.Topbar
topbar.BorderSizePixel = 0
topbar.Parent = main
local topCorner = Instance.new("UICorner")
topCorner.CornerRadius = UDim.new(0, 12)
topCorner.Parent = topbar
local topFix = Instance.new("Frame")
topFix.Size = UDim2.new(1, 0, 0, 10)
topFix.Position = UDim2.new(0, 0, 1, -10)
topFix.BackgroundColor3 = COLORS.Topbar
topFix.BorderSizePixel = 0
topFix.Parent = topbar
local titleGroup = Instance.new("Frame")
titleGroup.Size = UDim2.new(0, 300, 1, 0)
titleGroup.BackgroundTransparency = 1
titleGroup.Parent = topbar
local icon = Instance.new("TextLabel")
icon.Name = "Icon"
icon.Size = UDim2.new(0, 40, 0, 40)
icon.Position = UDim2.new(0, 15, 0, 2)
icon.BackgroundTransparency = 1
icon.Text = "◆"
icon.TextColor3 = COLORS.Accent
icon.TextSize = 24
icon.Font = FONTS.Header
icon.Parent = titleGroup
local title = Instance.new("TextLabel")
title.Name = "Title"
title.Size = UDim2.new(0, 200, 0, 25)
title.Position = UDim2.new(0, 55, 0, 2)
title.BackgroundTransparency = 1
title.Text = "PeexHub"
title.TextColor3 = COLORS.TextPrimary
title.TextSize = 20
title.Font = FONTS.Title
title.TextXAlignment = Enum.TextXAlignment.Left
title.Parent = titleGroup
local subtitle = Instance.new("TextLabel")
subtitle.Name = "Subtitle"
subtitle.Size = UDim2.new(0, 250, 0, 18)
subtitle.Position = UDim2.new(0, 55, 0, 25)
subtitle.BackgroundTransparency = 1
subtitle.Text = "Garden Horizons | V1.0"
subtitle.TextColor3 = COLORS.TextMuted
subtitle.TextSize = 12
subtitle.Font = FONTS.Body
title.TextXAlignment = Enum.TextXAlignment.Left
subtitle.Parent = titleGroup
local controls = Instance.new("Frame")
controls.Size = UDim2.new(0, 80, 1, 0)
controls.Position = UDim2.new(1, -85, 0, 0)
controls.BackgroundTransparency = 1
controls.Parent = topbar
local minimizeBtn = Instance.new("TextButton")
minimizeBtn.Name = "Minimize"
minimizeBtn.Size = UDim2.new(0, 32, 0, 32)
minimizeBtn.Position = UDim2.new(0, 0, 0.5, -16)
minimizeBtn.BackgroundColor3 = COLORS.Card
minimizeBtn.Text = "−"
minimizeBtn.TextColor3 = COLORS.TextSecondary
minimizeBtn.TextSize = 18
minimizeBtn.Font = FONTS.Header
minimizeBtn.Parent = controls
local minCorner = Instance.new("UICorner")
minCorner.CornerRadius = UDim.new(0, 8)
minCorner.Parent = minimizeBtn
local closeBtn = Instance.new("TextButton")
closeBtn.Name = "Close"
closeBtn.Size = UDim2.new(0, 32, 0, 32)
closeBtn.Position = UDim2.new(0, 40, 0.5, -16)
closeBtn.BackgroundColor3 = COLORS.Danger
closeBtn.Text = "×"
closeBtn.TextColor3 = COLORS.TextPrimary
closeBtn.TextSize = 18
closeBtn.Font = FONTS.Header
closeBtn.Parent = controls
local closeCorner = Instance.new("UICorner")
closeCorner.CornerRadius = UDim.new(0, 8)
closeCorner.Parent = closeBtn
--------------------------------------------------
-- SIDEBAR
--------------------------------------------------
local sidebar = Instance.new("Frame")
sidebar.Name = "Sidebar"
sidebar.Size = UDim2.new(0, 140, 1, -45)
sidebar.Position = UDim2.new(0, 0, 0, 45)
sidebar.BackgroundColor3 = COLORS.Sidebar
sidebar.BorderSizePixel = 0
sidebar.Parent = main
local sideLayout = Instance.new("UIListLayout")
sideLayout.Padding = UDim.new(0, 4)
sideLayout.Parent = sidebar
local sidePadding = Instance.new("UIPadding")
sidePadding.PaddingTop = UDim.new(0, 15)
sidePadding.PaddingLeft = UDim.new(0, 10)
sidePadding.PaddingRight = UDim.new(0, 10)
sidePadding.Parent = sidebar
--------------------------------------------------
-- CONTENT AREA
--------------------------------------------------
local contentFrame = Instance.new("Frame")
contentFrame.Name = "Content"
contentFrame.Size = UDim2.new(1, -140, 1, -45)
contentFrame.Position = UDim2.new(0, 140, 0, 45)
contentFrame.BackgroundColor3 = COLORS.Content
contentFrame.BorderSizePixel = 0
contentFrame.ClipsDescendants = true
contentFrame.Parent = main
local contentCorner = Instance.new("UICorner")
contentCorner.CornerRadius = UDim.new(0, 12)
contentCorner.Parent = contentFrame
local contentFix = Instance.new("Frame")
contentFix.Name = "ContentFix"
contentFix.Size = UDim2.new(0, 12, 1, 0)
contentFix.BackgroundColor3 = COLORS.Content
contentFix.BorderSizePixel = 0
contentFix.Parent = contentFrame
--------------------------------------------------
-- UTILITY FUNCTIONS
--------------------------------------------------
local function tween(obj, props, duration)
local info = TweenInfo.new(duration or 0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
TweenService:Create(obj, info, props):Play()
end
local function createButton(parent, text, icon, callback)
local btn = Instance.new("TextButton")
btn.Size = UDim2.new(1, 0, 0, 38)
btn.BackgroundColor3 = COLORS.Card
btn.Text = ""
btn.AutoButtonColor = false
btn.Parent = parent
local btnCorner = Instance.new("UICorner")
btnCorner.CornerRadius = UDim.new(0, 8)
btnCorner.Parent = btn
local iconLabel = Instance.new("TextLabel")
iconLabel.Size = UDim2.new(0, 30, 1, 0)
iconLabel.Position = UDim2.new(0, 10, 0, 0)
iconLabel.BackgroundTransparency = 1
iconLabel.Text = icon
iconLabel.TextColor3 = COLORS.TextSecondary
iconLabel.TextSize = 14
iconLabel.Font = FONTS.Body
iconLabel.Parent = btn
local textLabel = Instance.new("TextLabel")
textLabel.Size = UDim2.new(1, -45, 1, 0)
textLabel.Position = UDim2.new(0, 35, 0, 0)
textLabel.BackgroundTransparency = 1
textLabel.Text = text
textLabel.TextColor3 = COLORS.TextSecondary
textLabel.TextSize = 13
textLabel.Font = FONTS.Body
textLabel.TextXAlignment = Enum.TextXAlignment.Left
textLabel.Parent = btn
local isActive = false
local function updateState(active)
isActive = active
if active then
tween(btn, {BackgroundColor3 = COLORS.Accent}, 0.2)
tween(iconLabel, {TextColor3 = COLORS.TextPrimary}, 0.2)
tween(textLabel, {TextColor3 = COLORS.TextPrimary}, 0.2)
else
tween(btn, {BackgroundColor3 = COLORS.Card}, 0.2)
tween(iconLabel, {TextColor3 = COLORS.TextSecondary}, 0.2)
tween(textLabel, {TextColor3 = COLORS.TextSecondary}, 0.2)
end
end
btn.MouseEnter:Connect(function()
if not isActive then
tween(btn, {BackgroundColor3 = COLORS.CardHover}, 0.2)
end
end)
btn.MouseLeave:Connect(function()
if not isActive then
tween(btn, {BackgroundColor3 = COLORS.Card}, 0.2)
end
end)
btn.MouseButton1Click:Connect(function()
callback()
end)
return btn, updateState
end
--------------------------------------------------
-- CONTENT PAGES
--------------------------------------------------
local pages = {}
local function clearContent()
for _, child in pairs(contentFrame:GetChildren()) do
if not child:IsA("UICorner") and child.Name ~= "ContentFix" then
child:Destroy()
end
end
end
local function createPage(name)
local page = Instance.new("ScrollingFrame")
page.Name = name .. "Page"
page.Size = UDim2.new(1, 0, 1, 0)
page.BackgroundTransparency = 1
page.BorderSizePixel = 0
page.ScrollBarThickness = 4
page.ScrollBarImageColor3 = COLORS.Accent
page.AutomaticCanvasSize = Enum.AutomaticSize.Y
page.CanvasSize = UDim2.new(0, 0, 0, 0)
page.Parent = contentFrame
local layout = Instance.new("UIListLayout")
layout.Padding = UDim.new(0, 10)
layout.Parent = page
local padding = Instance.new("UIPadding")
padding.PaddingTop = UDim.new(0, 15)
padding.PaddingLeft = UDim.new(0, 15)
padding.PaddingRight = UDim.new(0, 15)
padding.PaddingBottom = UDim.new(0, 15)
padding.Parent = page
pages[name] = page
return page
end
--------------------------------------------------
-- HOME PAGE
--------------------------------------------------
local function loadHome()
clearContent()
local page = createPage("Home")
local header = Instance.new("TextLabel")
header.Size = UDim2.new(1, 0, 0, 25)
header.BackgroundTransparency = 1
header.Text = "Welcome back, " .. Player.Name
header.TextColor3 = COLORS.TextPrimary
header.TextSize = 18
header.Font = FONTS.Header
header.TextXAlignment = Enum.TextXAlignment.Left
header.Parent = page
local subheader = Instance.new("TextLabel")
subheader.Size = UDim2.new(1, 0, 0, 20)
subheader.BackgroundTransparency = 1
subheader.Text = "PeexHub Premium Script Hub"
subheader.TextColor3 = COLORS.TextMuted
subheader.TextSize = 12
subheader.Font = FONTS.Body
subheader.TextXAlignment = Enum.TextXAlignment.Left
subheader.Parent = page
local statsFrame = Instance.new("Frame")
statsFrame.Size = UDim2.new(1, 0, 0, 60)
statsFrame.BackgroundTransparency = 1
statsFrame.Parent = page
local statsLayout = Instance.new("UIListLayout")
statsLayout.FillDirection = Enum.FillDirection.Horizontal
statsLayout.Padding = UDim.new(0, 10)
statsLayout.Parent = statsFrame
local function createStatCard(title, value, color)
local card = Instance.new("Frame")
card.Size = UDim2.new(0.333, -7, 1, 0)
card.BackgroundColor3 = COLORS.Card
card.Parent = statsFrame
local cardCorner = Instance.new("UICorner")
cardCorner.CornerRadius = UDim.new(0, 8)
cardCorner.Parent = card
local titleLbl = Instance.new("TextLabel")
titleLbl.Size = UDim2.new(1, -10, 0, 15)
titleLbl.Position = UDim2.new(0, 5, 0, 8)
titleLbl.BackgroundTransparency = 1
titleLbl.Text = title
titleLbl.TextColor3 = COLORS.TextMuted
titleLbl.TextSize = 10
titleLbl.Font = FONTS.Body
titleLbl.TextXAlignment = Enum.TextXAlignment.Left
titleLbl.Parent = card
local valueLbl = Instance.new("TextLabel")
valueLbl.Size = UDim2.new(1, -10, 0, 25)
valueLbl.Position = UDim2.new(0, 5, 0, 22)
valueLbl.BackgroundTransparency = 1
valueLbl.Text = value
valueLbl.TextColor3 = COLORS.TextPrimary
valueLbl.TextSize = 16
valueLbl.Font = FONTS.Header
valueLbl.TextXAlignment = Enum.TextXAlignment.Left
valueLbl.Parent = card
return card
end
createStatCard("Version", "V1.0", COLORS.Accent)
createStatCard("Game", "Garden Horizons", COLORS.Success)
createStatCard("Status", "Active", COLORS.Warning)
end
--------------------------------------------------
-- FARM PAGE (LOGIKA SAMA KAYA SCRIPT AWAL)
--------------------------------------------------
local function loadFarm()
clearContent()
local page = createPage("Farm")
local header = Instance.new("TextLabel")
header.Size = UDim2.new(1, 0, 0, 25)
header.BackgroundTransparency = 1
header.Text = "𓆸 Farm Automation"
header.TextColor3 = COLORS.TextPrimary
header.TextSize = 18
header.Font = FONTS.Header
header.TextXAlignment = Enum.TextXAlignment.Left
header.Parent = page
local function createToggleCard(title, description, callback)
local card = Instance.new("Frame")
card.Size = UDim2.new(1, 0, 0, 70)
card.BackgroundColor3 = COLORS.Card
card.Parent = page
local cardCorner = Instance.new("UICorner")
cardCorner.CornerRadius = UDim.new(0, 10)
cardCorner.Parent = card
local titleLbl = Instance.new("TextLabel")
titleLbl.Size = UDim2.new(0.6, 0, 0, 20)
titleLbl.Position = UDim2.new(0, 12, 0, 12)
titleLbl.BackgroundTransparency = 1
titleLbl.Text = title
titleLbl.TextColor3 = COLORS.TextPrimary
titleLbl.TextSize = 14
titleLbl.Font = FONTS.Header
titleLbl.TextXAlignment = Enum.TextXAlignment.Left
titleLbl.Parent = card
local descLbl = Instance.new("TextLabel")
descLbl.Size = UDim2.new(0.6, 0, 0, 30)
descLbl.Position = UDim2.new(0, 12, 0, 32)
descLbl.BackgroundTransparency = 1
descLbl.Text = description
descLbl.TextColor3 = COLORS.TextMuted
descLbl.TextSize = 11
descLbl.Font = FONTS.Body
descLbl.TextXAlignment = Enum.TextXAlignment.Left
descLbl.TextWrapped = true
descLbl.Parent = card
local toggleBg = Instance.new("Frame")
toggleBg.Name = "ToggleBg"
toggleBg.Size = UDim2.new(0, 44, 0, 24)
toggleBg.Position = UDim2.new(1, -56, 0.5, -12)
toggleBg.BackgroundColor3 = COLORS.CardHover
toggleBg.Parent = card
local toggleCorner = Instance.new("UICorner")
toggleCorner.CornerRadius = UDim.new(1, 0)
toggleCorner.Parent = toggleBg
local knob = Instance.new("Frame")
knob.Name = "Knob"
knob.Size = UDim2.new(0, 18, 0, 18)
knob.Position = UDim2.new(0, 3, 0.5, -9)
knob.BackgroundColor3 = COLORS.TextPrimary
knob.Parent = toggleBg
local knobCorner = Instance.new("UICorner")
knobCorner.CornerRadius = UDim.new(1, 0)
knobCorner.Parent = knob
local enabled = false
local function updateToggle()
enabled = not enabled
if enabled then
tween(toggleBg, {BackgroundColor3 = COLORS.Success}, 0.2)
tween(knob, {Position = UDim2.new(0, 23, 0.5, -9)}, 0.2)
else
tween(toggleBg, {BackgroundColor3 = COLORS.CardHover}, 0.2)
tween(knob, {Position = UDim2.new(0, 3, 0.5, -9)}, 0.2)
end
callback(enabled)
end
local clickArea = Instance.new("TextButton")
clickArea.Size = UDim2.new(1, 0, 1, 0)
clickArea.BackgroundTransparency = 1
clickArea.Text = ""
clickArea.Parent = card
clickArea.MouseButton1Click:Connect(updateToggle)
return card
end
createToggleCard("Auto Harvest", "Automatically harvest crops when ready", function(v)
AUTO_HARVEST = v
end)
createToggleCard("Auto Plant", "Automatically plant seeds from equipped tool", function(v)
AUTO_PLANT = v
end)
end
--------------------------------------------------
-- BUY PAGE - SEEDS & GEAR (FIXED SEARCH LOGIC)
--------------------------------------------------
local function loadBuy()
clearContent()
local page = createPage("Buy")
local header = Instance.new("TextLabel")
header.Size = UDim2.new(1, 0, 0, 25)
header.BackgroundTransparency = 1
header.Text = "🛒 Shop"
header.TextColor3 = COLORS.TextPrimary
header.TextSize = 18
header.Font = FONTS.Header
header.TextXAlignment = Enum.TextXAlignment.Left
header.Parent = page
-- Shop Type Selector
local shopSelector = Instance.new("Frame")
shopSelector.Size = UDim2.new(1, 0, 0, 35)
shopSelector.BackgroundTransparency = 1
shopSelector.Parent = page
local selectorLayout = Instance.new("UIListLayout")
selectorLayout.FillDirection = Enum.FillDirection.Horizontal
selectorLayout.Padding = UDim.new(0, 10)
selectorLayout.Parent = shopSelector
local currentShop = "SeedShop"
local seedBtn, gearBtn
local function createShopButton(name, shopType)
local btn = Instance.new("TextButton")
btn.Size = UDim2.new(0.5, -5, 1, 0)
btn.BackgroundColor3 = shopType == currentShop and COLORS.Accent or COLORS.Card
btn.Text = name
btn.TextColor3 = COLORS.TextPrimary
btn.TextSize = 13
btn.Font = FONTS.Body
btn.Parent = shopSelector
local btnCorner = Instance.new("UICorner")
btnCorner.CornerRadius = UDim.new(0, 8)
btnCorner.Parent = btn
return btn
end
-- Content Container
local contentContainer = Instance.new("Frame")
contentContainer.Size = UDim2.new(1, 0, 0, 280)
contentContainer.BackgroundTransparency = 1
contentContainer.Parent = page
local function loadShopContent(shopType)
-- Clear previous
for _, child in pairs(contentContainer:GetChildren()) do
child:Destroy()
end
currentShop = shopType
SELECTED_ITEM = nil
-- Update button states
if seedBtn then
seedBtn.BackgroundColor3 = shopType == "SeedShop" and COLORS.Accent or COLORS.Card
end
if gearBtn then
gearBtn.BackgroundColor3 = shopType == "GearShop" and COLORS.Accent or COLORS.Card
end
-- Search Box
local searchFrame = Instance.new("Frame")
searchFrame.Size = UDim2.new(1, 0, 0, 32)
searchFrame.BackgroundColor3 = COLORS.Card
searchFrame.Parent = contentContainer
local searchCorner = Instance.new("UICorner")
searchCorner.CornerRadius = UDim.new(0, 6)
searchCorner.Parent = searchFrame
local searchIcon = Instance.new("TextLabel")
searchIcon.Size = UDim2.new(0, 30, 1, 0)
searchIcon.Position = UDim2.new(0, 8, 0, 0)
searchIcon.BackgroundTransparency = 1
searchIcon.Text = "🔍"
searchIcon.TextColor3 = COLORS.TextMuted
searchIcon.TextSize = 14
searchIcon.Parent = searchFrame
local searchBox = Instance.new("TextBox")
searchBox.Name = "SearchBox"
searchBox.Size = UDim2.new(1, -40, 1, 0)
searchBox.Position = UDim2.new(0, 35, 0, 0)
searchBox.BackgroundTransparency = 1
searchBox.PlaceholderText = "Search " .. (shopType == "SeedShop" and "seeds" or "gear") .. "..."
searchBox.Text = ""
searchBox.TextColor3 = COLORS.TextPrimary
searchBox.PlaceholderColor3 = COLORS.TextMuted
searchBox.TextSize = 12
searchBox.Font = FONTS.Body
searchBox.TextXAlignment = Enum.TextXAlignment.Left
searchBox.Parent = searchFrame
-- Amount & Auto Buy
local controlsFrame = Instance.new("Frame")
controlsFrame.Size = UDim2.new(1, 0, 0, 40)
controlsFrame.Position = UDim2.new(0, 0, 0, 38)
controlsFrame.BackgroundColor3 = COLORS.Card
controlsFrame.Parent = contentContainer
local controlsCorner = Instance.new("UICorner")
controlsCorner.CornerRadius = UDim.new(0, 6)
controlsCorner.Parent = controlsFrame
local amountLabel = Instance.new("TextLabel")
amountLabel.Size = UDim2.new(0, 50, 1, 0)
amountLabel.Position = UDim2.new(0, 12, 0, 0)
amountLabel.BackgroundTransparency = 1
amountLabel.Text = "Amount:"
amountLabel.TextColor3 = COLORS.TextSecondary
amountLabel.TextSize = 11
amountLabel.Font = FONTS.Body
amountLabel.TextXAlignment = Enum.TextXAlignment.Left
amountLabel.Parent = controlsFrame
local amountBox = Instance.new("TextBox")
amountBox.Size = UDim2.new(0, 50, 0, 24)
amountBox.Position = UDim2.new(0, 65, 0.5, -12)
amountBox.BackgroundColor3 = COLORS.Background
amountBox.Text = "1"
amountBox.TextColor3 = COLORS.TextPrimary
amountBox.TextSize = 12
amountBox.Font = FONTS.Body
amountBox.Parent = controlsFrame
local amountBoxCorner = Instance.new("UICorner")
amountBoxCorner.CornerRadius = UDim.new(0, 4)
amountBoxCorner.Parent = amountBox
-- Auto Buy Toggle
local autoBuyFrame = Instance.new("Frame")
autoBuyFrame.Size = UDim2.new(0, 100, 1, 0)
autoBuyFrame.Position = UDim2.new(1, -110, 0, 0)
autoBuyFrame.BackgroundTransparency = 1
autoBuyFrame.Parent = controlsFrame
local autoBuyLabel = Instance.new("TextLabel")
autoBuyLabel.Size = UDim2.new(0, 50, 1, 0)
autoBuyLabel.BackgroundTransparency = 1
autoBuyLabel.Text = "Auto Buy"
autoBuyLabel.TextColor3 = COLORS.TextSecondary
autoBuyLabel.TextSize = 11
autoBuyLabel.Font = FONTS.Body
autoBuyLabel.TextXAlignment = Enum.TextXAlignment.Left
autoBuyLabel.Parent = autoBuyFrame
local autoBuyToggle = Instance.new("Frame")
autoBuyToggle.Size = UDim2.new(0, 36, 0, 20)
autoBuyToggle.Position = UDim2.new(0, 55, 0.5, -10)
autoBuyToggle.BackgroundColor3 = COLORS.CardHover
autoBuyToggle.Parent = autoBuyFrame
local autoBuyCorner = Instance.new("UICorner")
autoBuyCorner.CornerRadius = UDim.new(1, 0)
autoBuyCorner.Parent = autoBuyToggle
local autoBuyKnob = Instance.new("Frame")
autoBuyKnob.Size = UDim2.new(0, 14, 0, 14)
autoBuyKnob.Position = UDim2.new(0, 3, 0.5, -7)
autoBuyKnob.BackgroundColor3 = COLORS.TextPrimary
autoBuyKnob.Parent = autoBuyToggle
local autoBuyKnobCorner = Instance.new("UICorner")
autoBuyKnobCorner.CornerRadius = UDim.new(1, 0)
autoBuyKnobCorner.Parent = autoBuyKnob
local autoBuyBtn = Instance.new("TextButton")
autoBuyBtn.Size = UDim2.new(1, 0, 1, 0)
autoBuyBtn.BackgroundTransparency = 1
autoBuyBtn.Text = ""
autoBuyBtn.Parent = autoBuyFrame
-- Selected Display
local selectedFrame = Instance.new("Frame")
selectedFrame.Size = UDim2.new(1, 0, 0, 50)
selectedFrame.Position = UDim2.new(0, 0, 0, 82)
selectedFrame.BackgroundColor3 = COLORS.AccentDark
selectedFrame.Visible = false
selectedFrame.Parent = contentContainer
local selectedCorner = Instance.new("UICorner")
selectedCorner.CornerRadius = UDim.new(0, 8)
selectedCorner.Parent = selectedFrame
local selectedLabel = Instance.new("TextLabel")
selectedLabel.Name = "SelectedLabel"
selectedLabel.Size = UDim2.new(1, -90, 1, 0)
selectedLabel.Position = UDim2.new(0, 12, 0, 0)
selectedLabel.BackgroundTransparency = 1
selectedLabel.Text = "Selected: None"
selectedLabel.TextColor3 = COLORS.TextPrimary
selectedLabel.TextSize = 13
selectedLabel.Font = FONTS.Header
selectedLabel.TextXAlignment = Enum.TextXAlignment.Left
selectedLabel.Parent = selectedFrame
local buyButton = Instance.new("TextButton")
buyButton.Size = UDim2.new(0, 80, 0, 30)
buyButton.Position = UDim2.new(1, -92, 0.5, -15)
buyButton.BackgroundColor3 = COLORS.Success
buyButton.Text = "BUY"
buyButton.TextColor3 = COLORS.TextPrimary
buyButton.TextSize = 12
buyButton.Font = FONTS.Header
buyButton.Parent = selectedFrame
local buyBtnCorner = Instance.new("UICorner")
buyBtnCorner.CornerRadius = UDim.new(0, 6)
buyBtnCorner.Parent = buyButton
-- Items List
local itemsScroll = Instance.new("ScrollingFrame")
itemsScroll.Size = UDim2.new(1, 0, 0, 140)
itemsScroll.Position = UDim2.new(0, 0, 0, 136)
itemsScroll.BackgroundTransparency = 1
itemsScroll.BorderSizePixel = 0
itemsScroll.ScrollBarThickness = 4
itemsScroll.ScrollBarImageColor3 = COLORS.Accent
itemsScroll.AutomaticCanvasSize = Enum.AutomaticSize.Y
itemsScroll.CanvasSize = UDim2.new(0, 0, 0, 0)
itemsScroll.Parent = contentContainer
local itemsLayout = Instance.new("UIListLayout")
itemsLayout.Padding = UDim.new(0, 6)
itemsLayout.Parent = itemsScroll
-- Fetch Data
local shopData = {}
pcall(function()
shopData = GetShopData:InvokeServer(shopType) or {}
end)
local filteredItems = {}
local itemButtons = {}
local function updateAmount()
local num = tonumber(amountBox.Text)
if num and num > 0 then
BUY_AMOUNT = math.floor(num)
else
BUY_AMOUNT = 1
amountBox.Text = "1"
end
end
amountBox.FocusLost:Connect(updateAmount)
local function selectItem(itemName, itemData)
if shopType == "SeedShop" then
SELECTED_SEED = itemName
else
SELECTED_GEAR = itemName
end
SELECTED_ITEM = itemName
selectedFrame.Visible = true
selectedLabel.Text = itemName .. " ($" .. itemData.Price .. ")"
end
local function renderItems(filter)
-- Clear existing
for _, btn in pairs(itemButtons) do
btn:Destroy()
end
itemButtons = {}
filteredItems = {}
for name, data in pairs(shopData) do
-- FIXED: Search logic sama kaya script awal
local match = false
if filter == "" then
match = true
else
local lowerFilter = string.lower(filter)
local lowerName = string.lower(name)
if string.find(lowerName, lowerFilter, 1, true) then
match = true
end
end
if match then
table.insert(filteredItems, {name = name, data = data})
local btn = Instance.new("TextButton")
btn.Name = name
btn.Size = UDim2.new(1, -5, 0, 40)
btn.BackgroundColor3 = COLORS.Card
btn.Text = ""
btn.AutoButtonColor = false
btn.Parent = itemsScroll
table.insert(itemButtons, btn)
local btnCorner = Instance.new("UICorner")
btnCorner.CornerRadius = UDim.new(0, 6)
btnCorner.Parent = btn
-- Icon/Image
local iconFrame = Instance.new("Frame")
iconFrame.Size = UDim2.new(0, 32, 0, 32)
iconFrame.Position = UDim2.new(0, 8, 0.5, -16)
iconFrame.BackgroundColor3 = COLORS.Background
iconFrame.Parent = btn
local iconCorner = Instance.new("UICorner")
iconCorner.CornerRadius = UDim.new(0, 4)
iconCorner.Parent = iconFrame
-- Gear image if available
if data.Icon or data.IconAssetId then
local iconImg = Instance.new("ImageLabel")
iconImg.Size = UDim2.new(1, -4, 1, -4)
iconImg.Position = UDim2.new(0, 2, 0, 2)
iconImg.BackgroundTransparency = 1
iconImg.Image = data.Icon or data.IconAssetId or ""
iconImg.Parent = iconFrame
end
local nameLbl = Instance.new("TextLabel")
nameLbl.Size = UDim2.new(1, -90, 0, 18)
nameLbl.Position = UDim2.new(0, 48, 0, 4)
nameLbl.BackgroundTransparency = 1
nameLbl.Text = name
nameLbl.TextColor3 = COLORS.TextPrimary
nameLbl.TextSize = 12
nameLbl.Font = FONTS.Header
nameLbl.TextXAlignment = Enum.TextXAlignment.Left
nameLbl.Parent = btn
local priceLbl = Instance.new("TextLabel")
priceLbl.Size = UDim2.new(1, -90, 0, 16)
priceLbl.Position = UDim2.new(0, 48, 0, 22)
priceLbl.BackgroundTransparency = 1
priceLbl.Text = "$" .. data.Price
priceLbl.TextColor3 = COLORS.Success
priceLbl.TextSize = 11
priceLbl.Font = FONTS.Body
priceLbl.TextXAlignment = Enum.TextXAlignment.Left
priceLbl.Parent = btn
btn.MouseEnter:Connect(function()
tween(btn, {BackgroundColor3 = COLORS.CardHover}, 0.2)
end)
btn.MouseLeave:Connect(function()
tween(btn, {BackgroundColor3 = COLORS.Card}, 0.2)
end)
btn.MouseButton1Click:Connect(function()
for _, b in pairs(itemButtons) do
tween(b, {BackgroundColor3 = COLORS.Card}, 0.2)
end
tween(btn, {BackgroundColor3 = COLORS.AccentDark}, 0.2)
selectItem(name, data)
end)
end
end
end
searchBox:GetPropertyChangedSignal("Text"):Connect(function()
renderItems(searchBox.Text)
end)
renderItems("")
-- Buy Function
local function doPurchase()
local item = shopType == "SeedShop" and SELECTED_SEED or SELECTED_GEAR
if not item then return end
for i = 1, BUY_AMOUNT do
PurchaseShopItem:InvokeServer(shopType, item)
task.wait(0.1)
end
end
buyButton.MouseButton1Click:Connect(doPurchase)
-- Auto Buy Toggle
local autoBuyEnabled = false
autoBuyBtn.MouseButton1Click:Connect(function()
autoBuyEnabled = not autoBuyEnabled
if shopType == "SeedShop" then
AUTO_BUY_SEEDS = autoBuyEnabled
else
AUTO_BUY_GEAR = autoBuyEnabled
end
if autoBuyEnabled then
tween(autoBuyToggle, {BackgroundColor3 = COLORS.Success}, 0.2)
tween(autoBuyKnob, {Position = UDim2.new(0, 19, 0.5, -7)}, 0.2)
else
tween(autoBuyToggle, {BackgroundColor3 = COLORS.CardHover}, 0.2)
tween(autoBuyKnob, {Position = UDim2.new(0, 3, 0.5, -7)}, 0.2)
end
end)
-- Auto Buy Loop
task.spawn(function()
while contentContainer and contentContainer.Parent do
if (shopType == "SeedShop" and AUTO_BUY_SEEDS) or (shopType == "GearShop" and AUTO_BUY_GEAR) then
local item = shopType == "SeedShop" and SELECTED_SEED or SELECTED_GEAR
if item then
PurchaseShopItem:InvokeServer(shopType, item)
end
end
task.wait(0.5)
end
end)
end
seedBtn = createShopButton("Buy Seeds", "SeedShop")
seedBtn.MouseButton1Click:Connect(function()
loadShopContent("SeedShop")
end)
gearBtn = createShopButton("Buy Gear", "GearShop")
gearBtn.MouseButton1Click:Connect(function()
loadShopContent("GearShop")
end)
-- Load default
loadShopContent("SeedShop")
end
--------------------------------------------------
-- SELL PAGE
--------------------------------------------------
local function loadSell()
clearContent()
local page = createPage("Sell")
local header = Instance.new("TextLabel")
header.Size = UDim2.new(1, 0, 0, 25)
header.BackgroundTransparency = 1
header.Text = "𓄼 Selling Center"
header.TextColor3 = COLORS.TextPrimary
header.TextSize = 18
header.Font = FONTS.Header
header.TextXAlignment = Enum.TextXAlignment.Left
header.Parent = page
-- Sell Hand
local handCard = Instance.new("Frame")
handCard.Size = UDim2.new(1, 0, 0, 100)
handCard.BackgroundColor3 = COLORS.Card
handCard.Parent = page
local handCorner = Instance.new("UICorner")
handCorner.CornerRadius = UDim.new(0, 10)
handCorner.Parent = handCard
local handIcon = Instance.new("TextLabel")
handIcon.Size = UDim2.new(0, 40, 0, 40)
handIcon.Position = UDim2.new(0, 15, 0, 15)
handIcon.BackgroundColor3 = COLORS.AccentDark
handIcon.Text = "✋"
handIcon.TextColor3 = COLORS.TextPrimary
handIcon.TextSize = 20
handIcon.Parent = handIcon
local handIconCorner = Instance.new("UICorner")
handIconCorner.CornerRadius = UDim.new(0, 8)
handIconCorner.Parent = handIcon
local handTitle = Instance.new("TextLabel")
handTitle.Size = UDim2.new(1, -140, 0, 20)
handTitle.Position = UDim2.new(0, 65, 0, 15)
handTitle.BackgroundTransparency = 1
handTitle.Text = "Sell Hand"
handTitle.TextColor3 = COLORS.TextPrimary
handTitle.TextSize = 15
handTitle.Font = FONTS.Header
handTitle.TextXAlignment = Enum.TextXAlignment.Left
handTitle.Parent = handCard
local handDesc = Instance.new("TextLabel")
handDesc.Size = UDim2.new(1, -140, 0, 30)
handDesc.Position = UDim2.new(0, 65, 0, 35)
handDesc.BackgroundTransparency = 1
handDesc.Text = "Must hold the item you want to sell in your hand"
handDesc.TextColor3 = COLORS.TextMuted
handDesc.TextSize = 11
handDesc.Font = FONTS.Body
handDesc.TextXAlignment = Enum.TextXAlignment.Left
handDesc.TextWrapped = true
handDesc.Parent = handCard
local sellHandBtn = Instance.new("TextButton")
sellHandBtn.Size = UDim2.new(0, 90, 0, 32)
sellHandBtn.Position = UDim2.new(1, -105, 0.5, -16)
sellHandBtn.BackgroundColor3 = COLORS.Warning
sellHandBtn.Text = "SELL"
sellHandBtn.TextColor3 = COLORS.TextPrimary
sellHandBtn.TextSize = 12
sellHandBtn.Font = FONTS.Header
sellHandBtn.Parent = handCard
local sellHandCorner = Instance.new("UICorner")
sellHandCorner.CornerRadius = UDim.new(0, 6)
sellHandCorner.Parent = sellHandBtn
sellHandBtn.MouseButton1Click:Connect(function()
SellItems:InvokeServer("SellSingle")
end)
-- Sell All
local allCard = Instance.new("Frame")
allCard.Size = UDim2.new(1, 0, 0, 100)
allCard.BackgroundColor3 = COLORS.Card
allCard.Parent = page
local allCorner = Instance.new("UICorner")
allCorner.CornerRadius = UDim.new(0, 10)
allCorner.Parent = allCard
local allIcon = Instance.new("TextLabel")
allIcon.Size = UDim2.new(0, 40, 0, 40)
allIcon.Position = UDim2.new(0, 15, 0, 15)
allIcon.BackgroundColor3 = COLORS.Success
allIcon.Text = "📦"
allIcon.TextColor3 = COLORS.TextPrimary
allIcon.TextSize = 20
allIcon.Parent = allCard
local allIconCorner = Instance.new("UICorner")
allIconCorner.CornerRadius = UDim.new(0, 8)
allIconCorner.Parent = allIcon
local allTitle = Instance.new("TextLabel")
allTitle.Size = UDim2.new(1, -140, 0, 20)
allTitle.Position = UDim2.new(0, 65, 0, 15)
allTitle.BackgroundTransparency = 1
allTitle.Text = "Sell All"
allTitle.TextColor3 = COLORS.TextPrimary
allTitle.TextSize = 15
allTitle.Font = FONTS.Header
allTitle.TextXAlignment = Enum.TextXAlignment.Left
allTitle.Parent = allCard
local allDesc = Instance.new("TextLabel")
allDesc.Size = UDim2.new(1, -140, 0, 30)
allDesc.Position = UDim2.new(0, 65, 0, 35)
allDesc.BackgroundTransparency = 1
allDesc.Text = "Sell all items in your inventory at once"
allDesc.TextColor3 = COLORS.TextMuted
allDesc.TextSize = 11
allDesc.Font = FONTS.Body
allDesc.TextXAlignment = Enum.TextXAlignment.Left
allDesc.TextWrapped = true
allDesc.Parent = allCard
local sellAllBtn = Instance.new("TextButton")
sellAllBtn.Size = UDim2.new(0, 90, 0, 32)
sellAllBtn.Position = UDim2.new(1, -105, 0.5, -16)
sellAllBtn.BackgroundColor3 = COLORS.Danger
sellAllBtn.Text = "SELL ALL"
sellAllBtn.TextColor3 = COLORS.TextPrimary
sellAllBtn.TextSize = 11
sellAllBtn.Font = FONTS.Header
sellAllBtn.Parent = allCard
local sellAllCorner = Instance.new("UICorner")
sellAllCorner.CornerRadius = UDim.new(0, 6)
sellAllCorner.Parent = sellAllBtn
sellAllBtn.MouseButton1Click:Connect(function()
SellItems:InvokeServer("SellAll")
end)
-- Warning
local warning = Instance.new("TextLabel")
warning.Size = UDim2.new(1, 0, 0, 40)
warning.BackgroundTransparency = 1
warning.Text = "⚠ Warning: Sell All will sell EVERYTHING in your inventory!"
warning.TextColor3 = COLORS.Warning
warning.TextSize = 11
warning.Font = FONTS.Body
warning.TextWrapped = true
warning.Parent = page
end
--------------------------------------------------
-- QUEST PAGE
--------------------------------------------------
local function loadQuest()
clearContent()
local page = createPage("Quest")
local header = Instance.new("TextLabel")
header.Size = UDim2.new(1, 0, 0, 25)
header.BackgroundTransparency = 1
header.Text = "⚔ Quest Manager"
header.TextColor3 = COLORS.TextPrimary
header.TextSize = 18
header.Font = FONTS.Header
header.TextXAlignment = Enum.TextXAlignment.Left
header.Parent = page
-- Auto Quest Toggle
local autoQuestFrame = Instance.new("Frame")
autoQuestFrame.Size = UDim2.new(1, 0, 0, 45)
autoQuestFrame.BackgroundColor3 = COLORS.Card
autoQuestFrame.Parent = page
local autoQuestCorner = Instance.new("UICorner")
autoQuestCorner.CornerRadius = UDim.new(0, 8)
autoQuestCorner.Parent = autoQuestFrame
local autoQuestLabel = Instance.new("TextLabel")
autoQuestLabel.Size = UDim2.new(0, 100, 1, 0)
autoQuestLabel.Position = UDim2.new(0, 15, 0, 0)
autoQuestLabel.BackgroundTransparency = 1
autoQuestLabel.Text = "Auto Quest"
autoQuestLabel.TextColor3 = COLORS.TextPrimary
autoQuestLabel.TextSize = 14
autoQuestLabel.Font = FONTS.Header
autoQuestLabel.TextXAlignment = Enum.TextXAlignment.Left
autoQuestLabel.Parent = autoQuestFrame
local autoQuestDesc = Instance.new("TextLabel")
autoQuestDesc.Size = UDim2.new(0, 200, 0, 20)
autoQuestDesc.Position = UDim2.new(0, 15, 0, 25)
autoQuestDesc.BackgroundTransparency = 1
autoQuestDesc.Text = "Automatically claim completed quests"
autoQuestDesc.TextColor3 = COLORS.TextMuted
autoQuestDesc.TextSize = 10
autoQuestDesc.Font = FONTS.Body
autoQuestDesc.TextXAlignment = Enum.TextXAlignment.Left
autoQuestDesc.Parent = autoQuestFrame
local toggleBg = Instance.new("Frame")
toggleBg.Size = UDim2.new(0, 44, 0, 24)
toggleBg.Position = UDim2.new(1, -59, 0.5, -12)
toggleBg.BackgroundColor3 = COLORS.CardHover
toggleBg.Parent = autoQuestFrame
local toggleCorner = Instance.new("UICorner")
toggleCorner.CornerRadius = UDim.new(1, 0)
toggleCorner.Parent = toggleBg
local knob = Instance.new("Frame")
knob.Size = UDim2.new(0, 18, 0, 18)
knob.Position = UDim2.new(0, 3, 0.5, -9)
knob.BackgroundColor3 = COLORS.TextPrimary
knob.Parent = toggleBg
local knobCorner = Instance.new("UICorner")
knobCorner.CornerRadius = UDim.new(1, 0)
knobCorner.Parent = knob
local autoQuestBtn = Instance.new("TextButton")
autoQuestBtn.Size = UDim2.new(1, 0, 1, 0)
autoQuestBtn.BackgroundTransparency = 1
autoQuestBtn.Text = ""
autoQuestBtn.Parent = autoQuestFrame
local autoQuestEnabled = false
autoQuestBtn.MouseButton1Click:Connect(function()
autoQuestEnabled = not autoQuestEnabled
AUTO_QUEST = autoQuestEnabled
if autoQuestEnabled then
tween(toggleBg, {BackgroundColor3 = COLORS.Success}, 0.2)
tween(knob, {Position = UDim2.new(0, 23, 0.5, -9)}, 0.2)
else
tween(toggleBg, {BackgroundColor3 = COLORS.CardHover}, 0.2)
tween(knob, {Position = UDim2.new(0, 3, 0.5, -9)}, 0.2)
end
end)
-- Quest Type Tabs
local questTabs = Instance.new("Frame")
questTabs.Size = UDim2.new(1, 0, 0, 35)
questTabs.BackgroundTransparency = 1
questTabs.Parent = page
local tabLayout = Instance.new("UIListLayout")
tabLayout.FillDirection = Enum.FillDirection.Horizontal
tabLayout.Padding = UDim.new(0, 10)
tabLayout.Parent = questTabs
local dailyBtn, weeklyBtn
local questContainer = Instance.new("Frame")
questContainer.Size = UDim2.new(1, 0, 0, 200)
questContainer.BackgroundTransparency = 1
questContainer.Parent = page
local function loadQuests(questType)
for _, child in pairs(questContainer:GetChildren()) do
child:Destroy()
end
if dailyBtn then
dailyBtn.BackgroundColor3 = questType == "Daily" and COLORS.Accent or COLORS.Card
end
if weeklyBtn then
weeklyBtn.BackgroundColor3 = questType == "Weekly" and COLORS.Accent or COLORS.Card
end
local scroll = Instance.new("ScrollingFrame")
scroll.Size = UDim2.new(1, 0, 1, 0)
scroll.BackgroundTransparency = 1
scroll.BorderSizePixel = 0
scroll.ScrollBarThickness = 4
scroll.AutomaticCanvasSize = Enum.AutomaticSize.Y
scroll.Parent = questContainer
local layout = Instance.new("UIListLayout")
layout.Padding = UDim.new(0, 8)
layout.Parent = scroll
-- Mock quest data (replace with actual GetQuestData call)
local quests = {}
pcall(function()
quests = GetQuestData:InvokeServer(questType) or {}
end)
-- Sample quests if none returned
if #quests == 0 then
quests = {
{Title = questType .. " Quest 1", Description = "Plant 20 Carrot Seeds", Progress = 15, Goal = 20, Reward = "800 Shillings"},
{Title = questType .. " Quest 2", Description = "Harvest 15 Carrots", Progress = 15, Goal = 15, Reward = "Seed Pack"},
{Title = questType .. " Quest 3", Description = "Earn 5000 Shillings", Progress = 3200, Goal = 5000, Reward = "1500 Shillings"}
}
end
for _, quest in ipairs(quests) do
local card = Instance.new("Frame")
card.Size = UDim2.new(1, -5, 0, 70)
card.BackgroundColor3 = COLORS.Card
card.Parent = scroll
local cardCorner = Instance.new("UICorner")
cardCorner.CornerRadius = UDim.new(0, 8)
cardCorner.Parent = card
local title = Instance.new("TextLabel")
title.Size = UDim2.new(1, -20, 0, 18)
title.Position = UDim2.new(0, 10, 0, 8)
title.BackgroundTransparency = 1
title.Text = quest.Title or "Quest"
title.TextColor3 = COLORS.TextPrimary
title.TextSize = 13
title.Font = FONTS.Header
title.TextXAlignment = Enum.TextXAlignment.Left
title.Parent = card
local desc = Instance.new("TextLabel")
desc.Size = UDim2.new(1, -20, 0, 15)
desc.Position = UDim2.new(0, 10, 0, 26)
desc.BackgroundTransparency = 1
desc.Text = quest.Description or ""
desc.TextColor3 = COLORS.TextMuted
desc.TextSize = 10
desc.Font = FONTS.Body
desc.TextXAlignment = Enum.TextXAlignment.Left
desc.Parent = card
-- Progress bar
local progressBg = Instance.new("Frame")
progressBg.Size = UDim2.new(1, -20, 0, 6)
progressBg.Position = UDim2.new(0, 10, 0, 48)
progressBg.BackgroundColor3 = COLORS.Background
progressBg.BorderSizePixel = 0
progressBg.Parent = card
local progressCorner = Instance.new("UICorner")
progressCorner.CornerRadius = UDim.new(1, 0)
progressCorner.Parent = progressBg
local progress = quest.Progress or 0
local goal = quest.Goal or 1
local percent = math.min(progress / goal, 1)
local progressFill = Instance.new("Frame")
progressFill.Size = UDim2.new(percent, 0, 1, 0)
progressFill.BackgroundColor3 = percent >= 1 and COLORS.Success or COLORS.Accent
progressFill.BorderSizePixel = 0
progressFill.Parent = progressBg
local progressFillCorner = Instance.new("UICorner")
progressFillCorner.CornerRadius = UDim.new(1, 0)
progressFillCorner.Parent = progressFill
local progressText = Instance.new("TextLabel")
progressText.Size = UDim2.new(0, 50, 0, 12)
progressText.Position = UDim2.new(1, -60, 0, 44)
progressText.BackgroundTransparency = 1
progressText.Text = progress .. "/" .. goal
progressText.TextColor3 = COLORS.TextMuted
progressText.TextSize = 9
progressText.Font = FONTS.Body
progressText.Parent = card
-- Reward
local reward = Instance.new("TextLabel")
reward.Size = UDim2.new(0, 100, 0, 15)
reward.Position = UDim2.new(1, -110, 0, 8)
reward.BackgroundTransparency = 1
reward.Text = quest.Reward or ""
reward.TextColor3 = COLORS.Warning
reward.TextSize = 10
reward.Font = FONTS.Body
reward.TextXAlignment = Enum.TextXAlignment.Right
reward.Parent = card
-- Claim button if complete
if percent >= 1 then
local claimBtn = Instance.new("TextButton")
claimBtn.Size = UDim2.new(0, 50, 0, 22)
claimBtn.Position = UDim2.new(1, -65, 0, 24)
claimBtn.BackgroundColor3 = COLORS.Success
claimBtn.Text = "CLAIM"
claimBtn.TextColor3 = COLORS.TextPrimary
claimBtn.TextSize = 9
claimBtn.Font = FONTS.Header
claimBtn.Parent = card
local claimCorner = Instance.new("UICorner")
claimCorner.CornerRadius = UDim.new(0, 4)
claimCorner.Parent = claimBtn
claimBtn.MouseButton1Click:Connect(function()
pcall(function()
ClaimQuestReward:InvokeServer(questType, quest.Id or quest.Title)
end)
claimBtn.Text = "✓"
claimBtn.BackgroundColor3 = COLORS.TextMuted
end)
end
end
end
dailyBtn = Instance.new("TextButton")
dailyBtn.Size = UDim2.new(0.5, -5, 1, 0)
dailyBtn.BackgroundColor3 = COLORS.Accent
dailyBtn.Text = "Daily Quests"
dailyBtn.TextColor3 = COLORS.TextPrimary
dailyBtn.TextSize = 12
dailyBtn.Font = FONTS.Body
dailyBtn.Parent = questTabs
local dailyCorner = Instance.new("UICorner")
dailyCorner.CornerRadius = UDim.new(0, 6)
dailyCorner.Parent = dailyBtn
weeklyBtn = Instance.new("TextButton")
weeklyBtn.Size = UDim2.new(0.5, -5, 1, 0)
weeklyBtn.BackgroundColor3 = COLORS.Card
weeklyBtn.Text = "Weekly Quests"
weeklyBtn.TextColor3 = COLORS.TextPrimary
weeklyBtn.TextSize = 12
weeklyBtn.Font = FONTS.Body
weeklyBtn.Parent = questTabs
local weeklyCorner = Instance.new("UICorner")
weeklyCorner.CornerRadius = UDim.new(0, 6)
weeklyCorner.Parent = weeklyBtn
dailyBtn.MouseButton1Click:Connect(function()
loadQuests("Daily")
end)
weeklyBtn.MouseButton1Click:Connect(function()
loadQuests("Weekly")
end)
loadQuests("Daily")
-- Auto Quest Loop
task.spawn(function()
while page and page.Parent do
if AUTO_QUEST then
pcall(function()
-- Auto claim daily
local daily = GetQuestData:InvokeServer("Daily") or {}
for _, quest in ipairs(daily) do
if quest.Progress >= quest.Goal then
ClaimQuestReward:InvokeServer("Daily", quest.Id)
end
end
-- Auto claim weekly
local weekly = GetQuestData:InvokeServer("Weekly") or {}
for _, quest in ipairs(weekly) do
if quest.Progress >= quest.Goal then
ClaimQuestReward:InvokeServer("Weekly", quest.Id)
end
end
end)
end
task.wait(5)
end
end)
end
--------------------------------------------------
-- MISC PAGE
--------------------------------------------------
local function loadMisc()
clearContent()
local page = createPage("Misc")
local header = Instance.new("TextLabel")
header.Size = UDim2.new(1, 0, 0, 25)
header.BackgroundTransparency = 1
header.Text = "⚙ Settings"
header.TextColor3 = COLORS.TextPrimary
header.TextSize = 18
header.Font = FONTS.Header
header.TextXAlignment = Enum.TextXAlignment.Left
header.Parent = page
-- GUI Scale
local scaleCard = Instance.new("Frame")
scaleCard.Size = UDim2.new(1, 0, 0, 80)
scaleCard.BackgroundColor3 = COLORS.Card
scaleCard.Parent = page
local scaleCorner = Instance.new("UICorner")
scaleCorner.CornerRadius = UDim.new(0, 10)
scaleCorner.Parent = scaleCard
local scaleTitle = Instance.new("TextLabel")
scaleTitle.Size = UDim2.new(1, -20, 0, 20)
scaleTitle.Position = UDim2.new(0, 15, 0, 12)
scaleTitle.BackgroundTransparency = 1
scaleTitle.Text = "GUI Scale"
scaleTitle.TextColor3 = COLORS.TextPrimary
scaleTitle.TextSize = 14
scaleTitle.Font = FONTS.Header
scaleTitle.TextXAlignment = Enum.TextXAlignment.Left
scaleTitle.Parent = scaleCard
local scaleValueLabel = Instance.new("TextLabel")
scaleValueLabel.Size = UDim2.new(0, 50, 0, 20)
scaleValueLabel.Position = UDim2.new(1, -65, 0, 12)
scaleValueLabel.BackgroundTransparency = 1
scaleValueLabel.Text = "100%"
scaleValueLabel.TextColor3 = COLORS.Accent
scaleValueLabel.TextSize = 14
scaleValueLabel.Font = FONTS.Header
scaleValueLabel.Parent = scaleCard
-- Slider
local sliderBg = Instance.new("Frame")
sliderBg.Size = UDim2.new(1, -30, 0, 8)
sliderBg.Position = UDim2.new(0, 15, 0, 45)
sliderBg.BackgroundColor3 = COLORS.Background
sliderBg.BorderSizePixel = 0
sliderBg.Parent = scaleCard
local sliderBgCorner = Instance.new("UICorner")
sliderBgCorner.CornerRadius = UDim.new(1, 0)
sliderBgCorner.Parent = sliderBg
local sliderFill = Instance.new("Frame")
sliderFill.Size = UDim2.new(0.5, 0, 1, 0)
sliderFill.BackgroundColor3 = COLORS.Accent
sliderFill.BorderSizePixel = 0
sliderFill.Parent = sliderBg
local sliderFillCorner = Instance.new("UICorner")
sliderFillCorner.CornerRadius = UDim.new(1, 0)
sliderFillCorner.Parent = sliderFill
local sliderKnob = Instance.new("Frame")
sliderKnob.Size = UDim2.new(0, 16, 0, 16)
sliderKnob.Position = UDim2.new(0.5, -8, 0.5, -8)
sliderKnob.BackgroundColor3 = COLORS.TextPrimary
sliderKnob.Parent = sliderBg
local sliderKnobCorner = Instance.new("UICorner")
sliderKnobCorner.CornerRadius = UDim.new(1, 0)
sliderKnobCorner.Parent = sliderKnob
local dragging = false
local function updateScale(input)
local pos = math.clamp((input.Position.X - sliderBg.AbsolutePosition.X) / sliderBg.AbsoluteSize.X, 0.5, 1.5)
sliderFill.Size = UDim2.new(pos - 0.5, 0, 1, 0)
sliderKnob.Position = UDim2.new(pos, -8, 0.5, -8)
scaleValueLabel.Text = math.floor(pos * 100) .. "%"
applyScale(pos)
end
sliderBg.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
dragging = true
updateScale(input)
end
end)
UserInputService.InputChanged:Connect(function(input)
if dragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then
updateScale(input)
end
end)
UserInputService.InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
dragging = false
end
end)
-- Transparency
local transCard = Instance.new("Frame")
transCard.Size = UDim2.new(1, 0, 0, 80)
transCard.BackgroundColor3 = COLORS.Card
transCard.Parent = page
local transCorner = Instance.new("UICorner")
transCorner.CornerRadius = UDim.new(0, 10)
transCorner.Parent = transCard
local transTitle = Instance.new("TextLabel")
transTitle.Size = UDim2.new(1, -20, 0, 20)
transTitle.Position = UDim2.new(0, 15, 0, 12)
transTitle.BackgroundTransparency = 1
transTitle.Text = "GUI Transparency"
transTitle.TextColor3 = COLORS.TextPrimary
transTitle.TextSize = 14
transTitle.Font = FONTS.Header
transTitle.TextXAlignment = Enum.TextXAlignment.Left
transTitle.Parent = transCard
local transValueLabel = Instance.new("TextLabel")
transValueLabel.Size = UDim2.new(0, 50, 0, 20)
transValueLabel.Position = UDim2.new(1, -65, 0, 12)
transValueLabel.BackgroundTransparency = 1
transValueLabel.Text = "0%"
transValueLabel.TextColor3 = COLORS.Accent
transValueLabel.TextSize = 14
transValueLabel.Font = FONTS.Header
transValueLabel.Parent = transCard
local transSliderBg = Instance.new("Frame")
transSliderBg.Size = UDim2.new(1, -30, 0, 8)
transSliderBg.Position = UDim2.new(0, 15, 0, 45)
transSliderBg.BackgroundColor3 = COLORS.Background
transSliderBg.BorderSizePixel = 0
transSliderBg.Parent = transCard
local transSliderBgCorner = Instance.new("UICorner")
transSliderBgCorner.CornerRadius = UDim.new(1, 0)
transSliderBgCorner.Parent = transSliderBg
local transSliderFill = Instance.new("Frame")
transSliderFill.Size = UDim2.new(0, 0, 1, 0)
transSliderFill.BackgroundColor3 = COLORS.Accent
transSliderFill.BorderSizePixel = 0
transSliderFill.Parent = transSliderBg
local transSliderFillCorner = Instance.new("UICorner")
transSliderFillCorner.CornerRadius = UDim.new(1, 0)
transSliderFillCorner.Parent = transSliderFill
local transSliderKnob = Instance.new("Frame")
transSliderKnob.Size = UDim2.new(0, 16, 0, 16)
transSliderKnob.Position = UDim2.new(0, -8, 0.5, -8)
transSliderKnob.BackgroundColor3 = COLORS.TextPrimary
transSliderKnob.Parent = transSliderBg
local transSliderKnobCorner = Instance.new("UICorner")
transSliderKnobCorner.CornerRadius = UDim.new(1, 0)
transSliderKnobCorner.Parent = transSliderKnob
local transDragging = false
local function updateTrans(input)
local pos = math.clamp((input.Position.X - transSliderBg.AbsolutePosition.X) / transSliderBg.AbsoluteSize.X, 0, 0.9)
transSliderFill.Size = UDim2.new(pos, 0, 1, 0)
transSliderKnob.Position = UDim2.new(pos, -8, 0.5, -8)
transValueLabel.Text = math.floor(pos * 100) .. "%"
updateTransparency(pos)
end
transSliderBg.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
transDragging = true
updateTrans(input)
end
end)
UserInputService.InputChanged:Connect(function(input)
if transDragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then
updateTrans(input)
end
end)
UserInputService.InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
transDragging = false
end
end)
-- Info
local infoCard = Instance.new("Frame")
infoCard.Size = UDim2.new(1, 0, 0, 100)
infoCard.BackgroundColor3 = COLORS.Card
infoCard.Parent = page
local infoCorner = Instance.new("UICorner")
infoCorner.CornerRadius = UDim.new(0, 10)
infoCorner.Parent = infoCard
local infoTitle = Instance.new("TextLabel")
infoTitle.Size = UDim2.new(1, -20, 0, 20)
infoTitle.Position = UDim2.new(0, 15, 0, 12)
infoTitle.BackgroundTransparency = 1
infoTitle.Text = "Information"
infoTitle.TextColor3 = COLORS.TextPrimary
infoTitle.TextSize = 14
infoTitle.Font = FONTS.Header
infoTitle.TextXAlignment = Enum.TextXAlignment.Left
infoTitle.Parent = infoCard
local infoText = Instance.new("TextLabel")
infoText.Size = UDim2.new(1, -30, 0, 60)
infoText.Position = UDim2.new(0, 15, 0, 35)
infoText.BackgroundTransparency = 1
infoText.Text = "PeexHub v1.0 for Garden Horizons\nMade with precision for optimal farming experience\nAll features tested and working!"
infoText.TextColor3 = COLORS.TextMuted
infoText.TextSize = 11
infoText.Font = FONTS.Body
infoText.TextXAlignment = Enum.TextXAlignment.Left
infoText.TextWrapped = true
infoText.Parent = infoCard
end
--------------------------------------------------
-- SIDEBAR SETUP
--------------------------------------------------
local buttons = {}
local function setActiveTab(tabName)
CURRENT_TAB = tabName
for name, btnData in pairs(buttons) do
if name == tabName then
btnData.setActive(true)
else
btnData.setActive(false)
end
end
if tabName == "Home" then
loadHome()
elseif tabName == "Farm" then
loadFarm()
elseif tabName == "Buy" then
loadBuy()
elseif tabName == "Sell" then
loadSell()
elseif tabName == "Quest" then
loadQuest()
elseif tabName == "Misc" then
loadMisc()
end
end
local homeBtn, homeSet = createButton(sidebar, "Home", "⌂", function() setActiveTab("Home") end)
local farmBtn, farmSet = createButton(sidebar, "Farm", "𓆸", function() setActiveTab("Farm") end)
local buyBtn, buySet = createButton(sidebar, "Buying", "🛒", function() setActiveTab("Buy") end)
local sellBtn, sellSet = createButton(sidebar, "Selling", "𓄼", function() setActiveTab("Sell") end)
local questBtn, questSet = createButton(sidebar, "Quest", "⚔", function() setActiveTab("Quest") end)
local miscBtn, miscSet = createButton(sidebar, "Misc", "⚙", function() setActiveTab("Misc") end)
buttons["Home"] = {setActive = homeSet}
buttons["Farm"] = {setActive = farmSet}
buttons["Buy"] = {setActive = buySet}
buttons["Sell"] = {setActive = sellSet}
buttons["Quest"] = {setActive = questSet}
buttons["Misc"] = {setActive = miscSet}
-- Footer
local footer = Instance.new("Frame")
footer.Size = UDim2.new(1, 0, 0, 50)
footer.Position = UDim2.new(0, 0, 1, -60)
footer.BackgroundTransparency = 1
footer.Parent = sidebar
local footerText = Instance.new("TextLabel")
footerText.Size = UDim2.new(1, -20, 0, 40)
footerText.Position = UDim2.new(0, 10, 0, 5)
footerText.BackgroundTransparency = 1
footerText.Text = "PeexHub v1.0\nGarden Horizons"
footerText.TextColor3 = COLORS.TextMuted
footerText.TextSize = 10
footerText.Font = FONTS.Body
footerText.TextWrapped = true
footerText.Parent = footer
--------------------------------------------------
-- WINDOW CONTROLS
--------------------------------------------------
local minimized = false
local circleBtn = nil
minimizeBtn.MouseButton1Click:Connect(function()
if minimized then return end
minimized = true
main.Visible = false
circleBtn = Instance.new("TextButton")
circleBtn.Size = UDim2.new(0, 50, 0, 50)
circleBtn.Position = UDim2.new(0.5, -25, 0.5, -25)
circleBtn.BackgroundColor3 = COLORS.Accent
circleBtn.Text = "PH"
circleBtn.TextColor3 = COLORS.TextPrimary
circleBtn.TextSize = 16
circleBtn.Font = FONTS.Header
circleBtn.Parent = gui
local circleCorner = Instance.new("UICorner")
circleCorner.CornerRadius = UDim.new(1, 0)
circleCorner.Parent = circleBtn
circleBtn.MouseButton1Click:Connect(function()
main.Visible = true
minimized = false
circleBtn:Destroy()
end)
end)
closeBtn.MouseButton1Click:Connect(function()
gui:Destroy()
end)
-- Draggable
local dragging = false
local dragInput, dragStart, startPos
topbar.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
dragging = true
dragStart = input.Position
startPos = main.Position
end
end)
topbar.InputChanged:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
dragInput = input
end
end)
RunService.InputChanged:Connect(function(input)
if input == dragInput and dragging then
local delta = input.Position - dragStart
main.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
end
end)
UserInputService.InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
dragging = false
end
end)
--------------------------------------------------
-- MAIN LOOPS (SAMA PERSIS KAYA SCRIPT AWAL)
--------------------------------------------------
task.spawn(function()
while gui and gui.Parent do
task.wait(0.5) -- SAMA KAYA SCRIPT AWAL
if AUTO_HARVEST then
pcall(function()
for _, prompt in pairs(CollectionService:GetTagged("HarvestPrompt")) do
if prompt:IsA("ProximityPrompt") then
fireproximityprompt(prompt)
end
end
end)
end
if AUTO_PLANT then
pcall(function()
local tool = Character:FindFirstChildOfClass("Tool")
if tool then
tool:Activate()
end
end)
end
end
end)
--------------------------------------------------
-- INIT
--------------------------------------------------
setActiveTab("Home")
Views: 40
Created At: 2026-02-24 03:17:06
Copy the code below to embed this paste: