--[[ UPDATED CHOP TREE GUI UI/UX Improvements by Assistant ]] -- 1. CLEANUP OLD INSTANCES if getgenv().ChopYourTree then pcall(function() getgenv().ChopYourTree.Unload() end) task.wait(0.3) end -- 2. SERVICES local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local RunService = game:GetService("RunService") local Workspace = game:GetService("Workspace") local VirtualInputManager = game:GetService("VirtualInputManager") local UserInputService = game:GetService("UserInputService") local TweenService = game:GetService("TweenService") local CoreGui = game:GetService("CoreGui") local LocalPlayer = Players.LocalPlayer local Remotes = ReplicatedStorage:WaitForChild("Remotes", 10) if not Remotes then warn("[ChopTree] Remotes folder not found") return end -- 3. REMOTE REFERENCES local TapButtonClick = Remotes:FindFirstChild("TapButtonClick") local TreeClick = Remotes:FindFirstChild("TreeClick") local AxeSwing = Remotes:FindFirstChild("AxeSwing") local CollectCoin = Remotes:FindFirstChild("CollectCoin") local Prestige = Remotes:FindFirstChild("Prestige") local ClickWateringCan = Remotes:FindFirstChild("ClickWateringCan") local ClaimWaterPurifier = Remotes:FindFirstChild("ClaimWaterPurifier") local WaterPurifier = Remotes:FindFirstChild("WaterPurifier") -- 4. TIMING & CONFIG local TIMING = { TAP_SPEED = 0.01, MUTATION_HIT_DELAY = 0.02, MUTATION_LOOP_DELAY = 0.05, COIN_COLLECT_DELAY = 0.03, COIN_LOOP_DELAY = 0.2, PRESTIGE_INTERVAL = 5, USE_CANS_KEY_DELAY = 0.3, USE_CANS_CLICK_DELAY = 0.4, USE_CANS_INTERVAL = 5, PICKUP_CANS_DELAY = 0.3, PICKUP_CANS_INTERVAL = 8, CLAIM_PURIFIER_INTERVAL = 10, FILL_PURIFIER_INTERVAL = 5, FILL_PURIFIER_DELAY = 2, STATS_UPDATE_INTERVAL = 1, KEY_PRESS_DURATION = 0.05, CLICK_DURATION = 0.05, STEAL_DELAY = 0.5, STEAL_LOOP_INTERVAL = 3, } local Config = { AutoTap = false, TapThreads = 5, AutoMutations = false, AutoCollectCoins = false, AutoPrestige = false, SpeedHack = false, SpeedAmount = 100, AutoUseCans = false, AutoPickupCans = false, AutoClaimPurifier = false, AutoFillPurifier = false, AutoSteal = false, WaterLevelThreshold = 3, } local State = { Running = true, Tapping = false, HittingTrees = false, CollectingCoins = false, UsingCans = false, PickingUpCans = false, Prestiging = false, ClaimingPurifier = false, FillingPurifier = false, Stealing = false, } local Connections = {} local Threads = {} local ScreenGui = nil -- 5. HELPERS (Logic only, UI helpers are below) local function SafeDisconnect(name) if Connections[name] then pcall(function() Connections[name]:Disconnect() end) Connections[name] = nil end end local function SafeCancel(name) if Threads[name] then pcall(function() task.cancel(Threads[name]) end) Threads[name] = nil end end local function DisconnectAll() for name in pairs(Connections) do SafeDisconnect(name) end end local function CancelAllThreads() for name in pairs(Threads) do SafeCancel(name) end end local function Unload() State.Running = false -- Reset Configs for k, v in pairs(Config) do if type(v) == "boolean" then Config[k] = false end end -- Reset State for k, v in pairs(State) do if type(v) == "boolean" and k ~= "Running" then State[k] = false end end task.wait(0.1) DisconnectAll() CancelAllThreads() if ScreenGui then pcall(function() ScreenGui:Destroy() end) ScreenGui = nil end getgenv().ChopYourTree = nil end -- ========================================== -- GAME LOGIC FUNCTIONS (Unchanged logic) -- ========================================== local function GetPlayerPlot() local plotVal = LocalPlayer:FindFirstChild("Plot") if plotVal and plotVal:IsA("ObjectValue") and plotVal.Value then return plotVal.Value end local plots = Workspace:FindFirstChild("Plots") if plots then for _, plot in ipairs(plots:GetChildren()) do if plot:GetAttribute("Plr") == LocalPlayer.Name then return plot end end end return nil end local function GetMutations() local mutations = {} local seen = {} local plot = GetPlayerPlot() if plot then for _, child in ipairs(plot:GetChildren()) do if child.Name == "TreeValue" and child:IsA("ObjectValue") then local tree = child.Value if tree and tree.Parent and not seen[tree] then seen[tree] = true table.insert(mutations, tree) end end end end return mutations end local function GetWateringCans() local cans = {} local seen = {} local plot = GetPlayerPlot() if plot then for _, desc in ipairs(plot:GetDescendants()) do if desc.Name == "WateringCanValue" and desc:IsA("ObjectValue") then local can = desc.Value if can and can.Parent and not seen[can] then seen[can] = true table.insert(cans, can) end end end end return cans end local function GetStealableCans() local stealable = {} local myPlot = GetPlayerPlot() local plots = Workspace:FindFirstChild("Plots") if not plots then return stealable end for _, plot in ipairs(plots:GetChildren()) do if plot ~= myPlot then for _, desc in ipairs(plot:GetDescendants()) do -- Logic check logic if desc.Name == "WateringCanValue" and desc:IsA("ObjectValue") then local can = desc.Value if can and can.Parent then local canSteal = can:GetAttribute("CanSteal") or can:GetAttribute("Stealable") if canSteal == nil or canSteal == true then table.insert(stealable, can) end end end if desc:IsA("Model") or desc:IsA("BasePart") then local name = desc.Name:lower() if name:find("water") and name:find("can") then local canSteal = desc:GetAttribute("CanSteal") or desc:GetAttribute("Stealable") if canSteal == nil or canSteal == true then table.insert(stealable, desc) end end end end end end return stealable end local function StealCan(can) if not can or not can.Parent then return end if ClickWateringCan then pcall(function() ClickWateringCan:FireServer(can) end) end end local function StealAllCans() local cans = GetStealableCans() for _, can in ipairs(cans) do if not Config.AutoSteal or not State.Running then break end StealCan(can) task.wait(TIMING.STEAL_DELAY) end return #cans end local function GetMainTree() local plot = GetPlayerPlot() if plot then local contents = plot:FindFirstChild("PlotContents") if contents then return contents:FindFirstChild("Tree") end end return nil end local function GetWateringCanLevels() local levels = {} local data = LocalPlayer:FindFirstChild("Data") if data then local tapCans = data:FindFirstChild("TapWateringCans") if tapCans then for _, slot in ipairs(tapCans:GetChildren()) do local levelVal = slot:FindFirstChild("Level") if levelVal then levels[slot.Name] = levelVal.Value end end end end return levels end local function GetHighestWaterLevel() local highest = 0 for _, level in pairs(GetWateringCanLevels()) do if level > highest then highest = level end end return highest end local function ShouldAutoWater() return GetHighestWaterLevel() >= Config.WaterLevelThreshold end local function GetLowestLevelCanSlot() local lowestSlot, lowestLevel = nil, 999 local data = LocalPlayer:FindFirstChild("Data") if data then local tapCans = data:FindFirstChild("TapWateringCans") if tapCans then for _, slot in ipairs(tapCans:GetChildren()) do local levelVal = slot:FindFirstChild("Level") if levelVal and levelVal.Value < lowestLevel then lowestLevel = levelVal.Value lowestSlot = tonumber(slot.Name) end end end end return lowestSlot, lowestLevel end local function IsPurifierEmpty() local plot = GetPlayerPlot() if plot then local contents = plot:FindFirstChild("PlotContents") if contents then local purifier = contents:FindFirstChild("Water Purifier") if purifier then return not (purifier:FindFirstChild("WateringCan") or purifier:FindFirstChild("Can")) end end end return true end local function GetCoinsValue() local ls = LocalPlayer:FindFirstChild("leaderstats") if ls then local coins = ls:FindFirstChild("šŸ’µ Coins") if coins then return tostring(coins.Value) end end return "0" end local function GetPrestigesValue() local ls = LocalPlayer:FindFirstChild("leaderstats") if ls then local prestiges = ls:FindFirstChild("šŸ‘‘ Prestiges") if prestiges then return prestiges.Value end end return 0 end local function HasWateringCans() local backpack = LocalPlayer:FindFirstChild("Backpack") local char = LocalPlayer.Character if backpack then for _, item in ipairs(backpack:GetChildren()) do local name = item.Name:lower() if name:find("water") or name:find("can") then return true end end end if char then for _, item in ipairs(char:GetChildren()) do if item:IsA("Tool") then local name = item.Name:lower() if name:find("water") or name:find("can") then return true end end end end return false end local function PressKey(keyCode) pcall(function() VirtualInputManager:SendKeyEvent(true, keyCode, false, game) task.wait(TIMING.KEY_PRESS_DURATION) VirtualInputManager:SendKeyEvent(false, keyCode, false, game) end) end local function ClickMouse() pcall(function() VirtualInputManager:SendMouseButtonEvent(0, 0, 0, true, game, 1) task.wait(TIMING.CLICK_DURATION) VirtualInputManager:SendMouseButtonEvent(0, 0, 0, false, game, 1) end) end local HotbarKeys = {Enum.KeyCode.Two, Enum.KeyCode.Three, Enum.KeyCode.Four, Enum.KeyCode.Five, Enum.KeyCode.Six, Enum.KeyCode.Seven, Enum.KeyCode.Eight, Enum.KeyCode.Nine} local function TapTree() if not TapButtonClick then return end local plot = GetPlayerPlot() if plot then pcall(function() TapButtonClick:FireServer(plot) end) end end local function HitMutation(mutation) if not mutation or not mutation.Parent then return end if TreeClick then pcall(function() TreeClick:InvokeServer(mutation) end) end if AxeSwing then pcall(function() AxeSwing:FireServer() end) end end local function HitAllMutations() local mutations = GetMutations() for _, mutation in ipairs(mutations) do if not Config.AutoMutations or not State.Running then break end HitMutation(mutation) task.wait(TIMING.MUTATION_HIT_DELAY) end end local function CollectAllCoins() local char = LocalPlayer.Character local root = char and char:FindFirstChild("HumanoidRootPart") if not root then return end local originalCFrame = root.CFrame local orbsFolder = Workspace:FindFirstChild("Orbs") if orbsFolder then for _, coin in ipairs(orbsFolder:GetChildren()) do if not Config.AutoCollectCoins or not State.Running then break end if coin and coin.Parent and coin:IsA("BasePart") and coin:GetAttribute("CanCollect") then pcall(function() root.CFrame = coin.CFrame end) if firetouchinterest then pcall(function() firetouchinterest(root, coin, 0); firetouchinterest(root, coin, 1) end) end if CollectCoin then pcall(function() CollectCoin:FireServer(coin) end) end task.wait(TIMING.COIN_COLLECT_DELAY) end end end pcall(function() root.CFrame = originalCFrame end) end local function UseCans() if State.UsingCans then return end State.UsingCans = true if not HasWateringCans() then PressKey(Enum.KeyCode.One) State.UsingCans = false return end for _, keyCode in ipairs(HotbarKeys) do if not Config.AutoUseCans or not State.Running then break end PressKey(keyCode) task.wait(TIMING.USE_CANS_KEY_DELAY) ClickMouse() task.wait(TIMING.USE_CANS_CLICK_DELAY) end PressKey(Enum.KeyCode.One) State.UsingCans = false end local function PickupCans() if State.PickingUpCans then return end State.PickingUpCans = true local cans = GetWateringCans() if #cans == 0 then PressKey(Enum.KeyCode.One) State.PickingUpCans = false return end for _, can in ipairs(cans) do if not Config.AutoPickupCans or not State.Running then break end if ClickWateringCan then pcall(function() ClickWateringCan:FireServer(can) end) end task.wait(TIMING.PICKUP_CANS_DELAY) end local tree = GetMainTree() if tree and ClickWateringCan then pcall(function() ClickWateringCan:FireServer(tree) end) end local plot = GetPlayerPlot() if plot and ClickWateringCan then pcall(function() ClickWateringCan:FireServer(plot) end) end PressKey(Enum.KeyCode.One) State.PickingUpCans = false end local function ClaimPurifier() if ClaimWaterPurifier then pcall(function() ClaimWaterPurifier:InvokeServer() end) end end local function FillPurifier() local slot, level = GetLowestLevelCanSlot() if slot and level < 100 and WaterPurifier then pcall(function() WaterPurifier:InvokeServer(slot) end) end end local function DoPrestige() if Prestige then pcall(function() Prestige:InvokeServer() end) end end local function SetSpeed(speed) local char = LocalPlayer.Character if char then local humanoid = char:FindFirstChildOfClass("Humanoid") if humanoid then pcall(function() humanoid.WalkSpeed = speed end) end end end -- ========================================== -- TOGGLE / LOOP MANAGERS -- ========================================== local function StartAutoTap() if State.Tapping then return end State.Tapping = true for i = 1, Config.TapThreads do Threads["Tap_" .. i] = task.spawn(function() while Config.AutoTap and State.Running do TapTree(); task.wait(TIMING.TAP_SPEED) end end) end Threads["TapMonitor"] = task.spawn(function() while Config.AutoTap and State.Running do task.wait(0.1) end State.Tapping = false end) end local function StopAutoTap() Config.AutoTap = false for i = 1, Config.TapThreads do SafeCancel("Tap_" .. i) end SafeCancel("TapMonitor") State.Tapping = false end local function StartAutoMutations() if State.HittingTrees then return end State.HittingTrees = true Threads["Mutations"] = task.spawn(function() while Config.AutoMutations and State.Running do HitAllMutations(); task.wait(TIMING.MUTATION_LOOP_DELAY) end State.HittingTrees = false end) end local function StopAutoMutations() Config.AutoMutations = false SafeCancel("Mutations") State.HittingTrees = false end local function StartAutoCollect() if State.CollectingCoins then return end State.CollectingCoins = true Threads["Collect"] = task.spawn(function() while Config.AutoCollectCoins and State.Running do CollectAllCoins(); task.wait(TIMING.COIN_LOOP_DELAY) end State.CollectingCoins = false end) end local function StopAutoCollect() Config.AutoCollectCoins = false SafeCancel("Collect") State.CollectingCoins = false end local function StartAutoPrestige() if State.Prestiging then return end State.Prestiging = true Threads["Prestige"] = task.spawn(function() while Config.AutoPrestige and State.Running do DoPrestige(); task.wait(TIMING.PRESTIGE_INTERVAL) end State.Prestiging = false end) end local function StopAutoPrestige() Config.AutoPrestige = false SafeCancel("Prestige") State.Prestiging = false end local function StartAutoUseCans() Threads["UseCans"] = task.spawn(function() while Config.AutoUseCans and State.Running do if ShouldAutoWater() then task.spawn(UseCans) end task.wait(TIMING.USE_CANS_INTERVAL) end end) end local function StopAutoUseCans() Config.AutoUseCans = false; SafeCancel("UseCans") end local function StartAutoPickupCans() Threads["PickupCans"] = task.spawn(function() while Config.AutoPickupCans and State.Running do if ShouldAutoWater() then task.spawn(PickupCans) end task.wait(TIMING.PICKUP_CANS_INTERVAL) end end) end local function StopAutoPickupCans() Config.AutoPickupCans = false; SafeCancel("PickupCans") end local function StartAutoClaimPurifier() Threads["ClaimPurifier"] = task.spawn(function() while Config.AutoClaimPurifier and State.Running do ClaimPurifier(); task.wait(TIMING.CLAIM_PURIFIER_INTERVAL) end end) end local function StopAutoClaimPurifier() Config.AutoClaimPurifier = false; SafeCancel("ClaimPurifier") end local function StartAutoFillPurifier() Threads["FillPurifier"] = task.spawn(function() while Config.AutoFillPurifier and State.Running do if IsPurifierEmpty() then FillPurifier(); task.wait(TIMING.FILL_PURIFIER_DELAY) end task.wait(TIMING.FILL_PURIFIER_INTERVAL) end end) end local function StopAutoFillPurifier() Config.AutoFillPurifier = false; SafeCancel("FillPurifier") end local function StartAutoSteal() if State.Stealing then return end State.Stealing = true Threads["Steal"] = task.spawn(function() while Config.AutoSteal and State.Running do StealAllCans(); task.wait(TIMING.STEAL_LOOP_INTERVAL) end State.Stealing = false end) end local function StopAutoSteal() Config.AutoSteal = false; SafeCancel("Steal"); State.Stealing = false end local function StartSpeedHack() SafeDisconnect("SpeedHack") Connections.SpeedHack = RunService.Heartbeat:Connect(function() if Config.SpeedHack and State.Running then SetSpeed(Config.SpeedAmount) end end) end local function StopSpeedHack() Config.SpeedHack = false; SafeDisconnect("SpeedHack"); SetSpeed(16) end -- ========================================== -- UI / UX SECTION -- Rebuilt from scratch using Modern "Fluent" Design Principles -- ========================================== local function CreateGUI() -- :: Initialization & Protections ScreenGui = Instance.new("ScreenGui") ScreenGui.Name = "ChopTreeHub_" .. tostring(math.random(1000, 9999)) ScreenGui.ResetOnSpawn = false ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling ScreenGui.IgnoreGuiInset = true -- Safe Parent (GetHui for Exploits, CoreGui/PlayerGui for Regular) if gethui then ScreenGui.Parent = gethui() elseif syn and syn.protect_gui then syn.protect_gui(ScreenGui) ScreenGui.Parent = CoreGui else ScreenGui.Parent = LocalPlayer:WaitForChild("PlayerGui") end -- :: Theme Palette local Theme = { Background = Color3.fromRGB(15, 15, 20), Sidebar = Color3.fromRGB(25, 25, 30), Section = Color3.fromRGB(30, 30, 36), Accent = Color3.fromRGB(0, 162, 255), AccentGlow = Color3.fromRGB(0, 200, 255), TextLight = Color3.fromRGB(240, 240, 240), TextDim = Color3.fromRGB(160, 160, 160), Red = Color3.fromRGB(230, 70, 70), Green = Color3.fromRGB(70, 230, 120), } local isMobile = UserInputService.TouchEnabled and not UserInputService.MouseEnabled -- :: UTILITY: Drag Functionality local function MakeDraggable(frame, handle) handle = handle or frame local dragging, dragInput, dragStart, startPos handle.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = true dragStart = input.Position startPos = frame.Position input.Changed:Connect(function() if input.UserInputState == Enum.UserInputState.End then dragging = false end end) end end) handle.InputChanged:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then dragInput = input end end) UserInputService.InputChanged:Connect(function(input) if input == dragInput and dragging then local delta = input.Position - dragStart local speed = TweenInfo.new(0.08, Enum.EasingStyle.Quad, Enum.EasingDirection.Out) TweenService:Create(frame, speed, { Position = UDim2.new( startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y ) }):Play() end end) end -- :: MAIN WINDOW local MainFrame = Instance.new("Frame") MainFrame.Name = "MainFrame" MainFrame.Size = isMobile and UDim2.new(0.85, 0, 0, 350) or UDim2.new(0, 500, 0, 320) MainFrame.Position = UDim2.new(0.5, 0, 0.5, 0) MainFrame.AnchorPoint = Vector2.new(0.5, 0.5) MainFrame.BackgroundColor3 = Theme.Background MainFrame.BackgroundTransparency = 0.1 -- Slight see-through MainFrame.Parent = ScreenGui -- Main Window Styling local MC = Instance.new("UICorner", MainFrame) MC.CornerRadius = UDim.new(0, 8) local MS = Instance.new("UIStroke", MainFrame) MS.Thickness = 1.5 MS.Transparency = 0.6 MS.Color = Theme.Accent local MainGradient = Instance.new("UIGradient", MainFrame) MainGradient.Rotation = 45 MainGradient.Color = ColorSequence.new({ ColorSequenceKeypoint.new(0, Color3.fromRGB(20,20,25)), ColorSequenceKeypoint.new(1, Color3.fromRGB(30,30,40)) }) -- :: HEADER / TOPBAR local Header = Instance.new("Frame", MainFrame) Header.Name = "Header" Header.Size = UDim2.new(1, 0, 0, 36) Header.BackgroundTransparency = 1 local Title = Instance.new("TextLabel", Header) Title.Size = UDim2.new(0, 200, 1, 0) Title.Position = UDim2.new(0, 12, 0, 0) Title.BackgroundTransparency = 1 Title.Text = "CHOP TREE AUTO" Title.RichText = true Title.Font = Enum.Font.GothamBlack Title.TextSize = 14 Title.TextColor3 = Theme.TextLight Title.TextXAlignment = Enum.TextXAlignment.Left local CloseBtn = Instance.new("TextButton", Header) CloseBtn.Size = UDim2.new(0, 24, 0, 24) CloseBtn.AnchorPoint = Vector2.new(1, 0.5) CloseBtn.Position = UDim2.new(1, -8, 0.5, 0) CloseBtn.BackgroundColor3 = Theme.Red CloseBtn.BackgroundTransparency = 0.2 CloseBtn.Text = "Ɨ" CloseBtn.Font = Enum.Font.GothamMedium CloseBtn.TextSize = 18 CloseBtn.TextColor3 = Theme.TextLight Instance.new("UICorner", CloseBtn).CornerRadius = UDim.new(0, 4) CloseBtn.MouseButton1Click:Connect(Unload) local MinBtn = Instance.new("TextButton", Header) MinBtn.Size = UDim2.new(0, 24, 0, 24) MinBtn.AnchorPoint = Vector2.new(1, 0.5) MinBtn.Position = UDim2.new(1, -38, 0.5, 0) MinBtn.BackgroundColor3 = Theme.Sidebar MinBtn.Text = "-" MinBtn.Font = Enum.Font.GothamMedium MinBtn.TextSize = 18 MinBtn.TextColor3 = Theme.TextLight Instance.new("UICorner", MinBtn).CornerRadius = UDim.new(0, 4) MakeDraggable(MainFrame, Header) -- :: CONTENT AREA & TAB SYSTEM local TabContainer = Instance.new("Frame", MainFrame) TabContainer.Name = "TabContainer" TabContainer.Size = UDim2.new(1, -16, 0, 32) TabContainer.Position = UDim2.new(0, 8, 0, 40) TabContainer.BackgroundTransparency = 1 local ContentContainer = Instance.new("Frame", MainFrame) ContentContainer.Name = "Content" ContentContainer.Size = UDim2.new(1, -16, 1, -84) ContentContainer.Position = UDim2.new(0, 8, 0, 80) ContentContainer.BackgroundColor3 = Theme.Sidebar ContentContainer.BackgroundTransparency = 0.5 Instance.new("UICorner", ContentContainer).CornerRadius = UDim.new(0, 6) local Tabs = {} local CurrentTab = nil local function SwitchTab(tabId) for id, objs in pairs(Tabs) do if id == tabId then objs.Button.TextColor3 = Theme.Accent objs.Indicator.BackgroundTransparency = 0 objs.Page.Visible = true else objs.Button.TextColor3 = Theme.TextDim objs.Indicator.BackgroundTransparency = 1 objs.Page.Visible = false end end CurrentTab = tabId end local TabListLayout = Instance.new("UIListLayout", TabContainer) TabListLayout.FillDirection = Enum.FillDirection.Horizontal TabListLayout.SortOrder = Enum.SortOrder.LayoutOrder TabListLayout.Padding = UDim.new(0, 6) local function CreateTab(id, name) -- Page Frame local Page = Instance.new("ScrollingFrame", ContentContainer) Page.Name = id Page.Size = UDim2.new(1, -4, 1, -4) Page.Position = UDim2.new(0, 2, 0, 2) Page.BackgroundTransparency = 1 Page.ScrollBarThickness = 2 Page.ScrollBarImageColor3 = Theme.Accent Page.CanvasSize = UDim2.new(0, 0, 0, 0) Page.AutomaticCanvasSize = Enum.AutomaticSize.Y Page.Visible = false local Layout = Instance.new("UIGridLayout", Page) Layout.CellSize = isMobile and UDim2.new(1, 0, 0, 40) or UDim2.new(0.48, 0, 0, 40) Layout.FillDirectionMaxCells = isMobile and 1 or 2 Layout.CellPadding = UDim2.new(0, 8, 0, 8) local Padding = Instance.new("UIPadding", Page) Padding.PaddingTop = UDim.new(0, 6) Padding.PaddingBottom = UDim.new(0, 6) Padding.PaddingLeft = UDim.new(0, 6) Padding.PaddingRight = UDim.new(0, 6) -- Tab Button local Btn = Instance.new("TextButton", TabContainer) Btn.Text = name Btn.Size = UDim2.new(0, 80, 1, 0) Btn.BackgroundTransparency = 1 Btn.Font = Enum.Font.GothamBold Btn.TextSize = 13 Btn.TextColor3 = Theme.TextDim local Ind = Instance.new("Frame", Btn) Ind.Size = UDim2.new(1, 0, 0, 2) Ind.Position = UDim2.new(0, 0, 1, -2) Ind.BackgroundColor3 = Theme.Accent Ind.BorderSizePixel = 0 Ind.BackgroundTransparency = 1 Btn.MouseButton1Click:Connect(function() SwitchTab(id) end) Tabs[id] = {Button = Btn, Page = Page, Indicator = Ind} return Page end -- :: UI COMPONENTS GENERATORS local function AddToggle(parent, text, default, callback) local Container = Instance.new("Frame", parent) Container.BackgroundColor3 = Theme.Section Container.BackgroundTransparency = 0.3 Instance.new("UICorner", Container).CornerRadius = UDim.new(0, 6) local Label = Instance.new("TextLabel", Container) Label.Size = UDim2.new(1, -50, 1, 0) Label.Position = UDim2.new(0, 10, 0, 0) Label.BackgroundTransparency = 1 Label.Text = text Label.Font = Enum.Font.GothamSemibold Label.TextColor3 = Theme.TextLight Label.TextSize = 12 Label.TextXAlignment = Enum.TextXAlignment.Left local SwitchBg = Instance.new("Frame", Container) SwitchBg.Size = UDim2.new(0, 36, 0, 18) SwitchBg.AnchorPoint = Vector2.new(1, 0.5) SwitchBg.Position = UDim2.new(1, -10, 0.5, 0) SwitchBg.BackgroundColor3 = default and Theme.Accent or Theme.Sidebar Instance.new("UICorner", SwitchBg).CornerRadius = UDim.new(1, 0) local Knob = Instance.new("Frame", SwitchBg) Knob.Size = UDim2.new(0, 14, 0, 14) Knob.Position = default and UDim2.new(1, -16, 0.5, -7) or UDim2.new(0, 2, 0.5, -7) Knob.BackgroundColor3 = Theme.TextLight Instance.new("UICorner", Knob).CornerRadius = UDim.new(1, 0) local Button = Instance.new("TextButton", Container) Button.Size = UDim2.new(1,0,1,0) Button.BackgroundTransparency = 1 Button.Text = "" local active = default Button.MouseButton1Click:Connect(function() active = not active TweenService:Create(SwitchBg, TweenInfo.new(0.2), { BackgroundColor3 = active and Theme.Accent or Theme.Sidebar }):Play() TweenService:Create(Knob, TweenInfo.new(0.25, Enum.EasingStyle.Back, Enum.EasingDirection.Out), { Position = active and UDim2.new(1, -16, 0.5, -7) or UDim2.new(0, 2, 0.5, -7) }):Play() task.spawn(function() callback(active) end) end) end local function AddSlider(parent, text, min, max, default, callback) local Container = Instance.new("Frame", parent) Container.BackgroundColor3 = Theme.Section Container.BackgroundTransparency = 0.3 Instance.new("UICorner", Container).CornerRadius = UDim.new(0, 6) local Label = Instance.new("TextLabel", Container) Label.Size = UDim2.new(0, 100, 0, 20) Label.Position = UDim2.new(0, 10, 0, 0) Label.BackgroundTransparency = 1 Label.Text = text Label.Font = Enum.Font.GothamSemibold Label.TextColor3 = Theme.TextLight Label.TextSize = 12 Label.TextXAlignment = Enum.TextXAlignment.Left local ValueLabel = Instance.new("TextLabel", Container) ValueLabel.Size = UDim2.new(0, 40, 0, 20) ValueLabel.Position = UDim2.new(1, -50, 0, 0) ValueLabel.BackgroundTransparency = 1 ValueLabel.Text = tostring(default) ValueLabel.Font = Enum.Font.GothamBold ValueLabel.TextColor3 = Theme.Accent ValueLabel.TextSize = 12 ValueLabel.TextXAlignment = Enum.TextXAlignment.Right local SliderBar = Instance.new("Frame", Container) SliderBar.Size = UDim2.new(1, -20, 0, 4) SliderBar.Position = UDim2.new(0, 10, 0, 28) SliderBar.BackgroundColor3 = Theme.Sidebar Instance.new("UICorner", SliderBar).CornerRadius = UDim.new(1, 0) local Fill = Instance.new("Frame", SliderBar) local pct = (math.clamp(default, min, max) - min) / (max - min) Fill.Size = UDim2.new(pct, 0, 1, 0) Fill.BackgroundColor3 = Theme.Accent Instance.new("UICorner", Fill).CornerRadius = UDim.new(1, 0) local Trigger = Instance.new("TextButton", Container) Trigger.Size = UDim2.new(1, 0, 0, 20) Trigger.Position = UDim2.new(0, 0, 0, 20) Trigger.BackgroundTransparency = 1 Trigger.Text = "" local function Update(inputX) local barAbsX = SliderBar.AbsolutePosition.X local barWidth = SliderBar.AbsoluteSize.X local p = math.clamp((inputX - barAbsX) / barWidth, 0, 1) local newVal = math.floor(min + ((max - min) * p)) TweenService:Create(Fill, TweenInfo.new(0.05), {Size = UDim2.new(p, 0, 1, 0)}):Play() ValueLabel.Text = tostring(newVal) callback(newVal) end local sliding = false Trigger.InputBegan:Connect(function(inp) if inp.UserInputType == Enum.UserInputType.MouseButton1 or inp.UserInputType == Enum.UserInputType.Touch then sliding = true Update(inp.Position.X) end end) UserInputService.InputEnded:Connect(function(inp) if inp.UserInputType == Enum.UserInputType.MouseButton1 or inp.UserInputType == Enum.UserInputType.Touch then sliding = false end end) UserInputService.InputChanged:Connect(function(inp) if sliding and (inp.UserInputType == Enum.UserInputType.MouseMovement or inp.UserInputType == Enum.UserInputType.Touch) then Update(inp.Position.X) end end) end local function AddButton(parent, text, callback) local Btn = Instance.new("TextButton", parent) Btn.Size = UDim2.new(1, 0, 0, 36) Btn.BackgroundColor3 = Theme.Accent Btn.Text = text Btn.Font = Enum.Font.GothamBold Btn.TextColor3 = Theme.TextLight Btn.TextSize = 13 Btn.AutoButtonColor = false Instance.new("UICorner", Btn).CornerRadius = UDim.new(0, 6) Btn.MouseEnter:Connect(function() TweenService:Create(Btn, TweenInfo.new(0.2), {BackgroundColor3 = Theme.AccentGlow}):Play() end) Btn.MouseLeave:Connect(function() TweenService:Create(Btn, TweenInfo.new(0.2), {BackgroundColor3 = Theme.Accent}):Play() end) Btn.MouseButton1Click:Connect(callback) end -- :: CONSTRUCT TABS local Farming = CreateTab("Farming", "Farming") local PlayerTab = CreateTab("Player", "Player") local Credits = CreateTab("Info", "Info") SwitchTab("Farming") -- Default -- Farming Tab Controls AddToggle(Farming, "Auto Tap", Config.AutoTap, function(v) Config.AutoTap = v; if v then StartAutoTap() else StopAutoTap() end end) AddToggle(Farming, "Hit Mutations", Config.AutoMutations, function(v) Config.AutoMutations = v; if v then StartAutoMutations() else StopAutoMutations() end end) AddToggle(Farming, "Collect Coins", Config.AutoCollectCoins, function(v) Config.AutoCollectCoins = v; if v then StartAutoCollect() else StopAutoCollect() end end) AddToggle(Farming, "Fill Purifier", Config.AutoFillPurifier, function(v) Config.AutoFillPurifier = v; Config.AutoClaimPurifier = v if v then StartAutoFillPurifier(); StartAutoClaimPurifier() else StopAutoFillPurifier(); StopAutoClaimPurifier() end end) AddToggle(Farming, "Auto Use Cans", Config.AutoUseCans, function(v) Config.AutoUseCans = v; if v then StartAutoUseCans() else StopAutoUseCans() end end) AddToggle(Farming, "Auto Pickup Cans", Config.AutoPickupCans, function(v) Config.AutoPickupCans = v; if v then StartAutoPickupCans() else StopAutoPickupCans() end end) AddToggle(Farming, "Steal Cans (GP)", Config.AutoSteal, function(v) Config.AutoSteal = v; if v then StartAutoSteal() else StopAutoSteal() end end) AddSlider(Farming, "Min Can Level", 1, 100, Config.WaterLevelThreshold, function(v) Config.WaterLevelThreshold = v end) -- Player Tab Controls AddToggle(PlayerTab, "Speed Hack", Config.SpeedHack, function(v) Config.SpeedHack = v; if v then StartSpeedHack() else StopSpeedHack() end end) AddToggle(PlayerTab, "Auto Prestige", Config.AutoPrestige, function(v) Config.AutoPrestige = v; if v then StartAutoPrestige() else StopAutoPrestige() end end) local StatsFrame = Instance.new("Frame", PlayerTab) StatsFrame.BackgroundColor3 = Theme.Section StatsFrame.BackgroundTransparency = 0.5 StatsFrame.Size = UDim2.new(1, 0, 0, 60) Instance.new("UICorner", StatsFrame).CornerRadius = UDim.new(0, 6) local StatLabel = Instance.new("TextLabel", StatsFrame) StatLabel.Size = UDim2.new(1, -20, 1, 0) StatLabel.Position = UDim2.new(0, 10, 0, 0) StatLabel.BackgroundTransparency = 1 StatLabel.TextColor3 = Theme.TextDim StatLabel.TextSize = 12 StatLabel.Font = Enum.Font.GothamMedium StatLabel.TextXAlignment = Enum.TextXAlignment.Left StatLabel.Text = "Coins: ...\nWater Lvl: ...\nPrestige: ..." AddButton(PlayerTab, "DO PRESTIGE NOW", function() DoPrestige() end) -- Info Tab local CreditLabel = Instance.new("TextLabel", Credits) CreditLabel.Size = UDim2.new(1, 0, 0, 60) CreditLabel.BackgroundTransparency = 1 CreditLabel.Text = "Created by Assistant\nRemade GUI & Optimization" CreditLabel.Font = Enum.Font.Gotham CreditLabel.TextColor3 = Theme.TextDim CreditLabel.TextSize = 12 -- :: MINIMIZE / MOBILE LOGIC local Minimized = false local OldSize = MainFrame.Size MinBtn.MouseButton1Click:Connect(function() Minimized = not Minimized if Minimized then ContentContainer.Visible = false TabContainer.Visible = false TweenService:Create(MainFrame, TweenInfo.new(0.3, Enum.EasingStyle.Quart), { Size = UDim2.new(0, 200, 0, 36), BackgroundTransparency = 0 }):Play() MinBtn.Text = "+" else ContentContainer.Visible = true TabContainer.Visible = true TweenService:Create(MainFrame, TweenInfo.new(0.3, Enum.EasingStyle.Quart), { Size = OldSize, BackgroundTransparency = 0.1 }):Play() MinBtn.Text = "-" end end) if isMobile then local MobileBtn = Instance.new("TextButton", ScreenGui) MobileBtn.Size = UDim2.new(0, 40, 0, 40) MobileBtn.Position = UDim2.new(0.9, 0, 0.2, 0) MobileBtn.BackgroundColor3 = Theme.Sidebar MobileBtn.Text = "🌳" MobileBtn.TextSize = 20 Instance.new("UICorner", MobileBtn).CornerRadius = UDim.new(1,0) Instance.new("UIStroke", MobileBtn).Color = Theme.Accent Instance.new("UIStroke", MobileBtn).Thickness = 2 MakeDraggable(MobileBtn) MobileBtn.MouseButton1Click:Connect(function() MainFrame.Visible = not MainFrame.Visible end) end -- :: LIVE STATS UPDATE Threads["StatsUI"] = task.spawn(function() while State.Running do pcall(function() local coins = GetCoinsValue() local water = GetHighestWaterLevel() local pres = GetPrestigesValue() StatLabel.Text = string.format( "šŸ’° Coins: %s\nšŸ’§ Water: %d (Target: %d)\nšŸ‘‘ Prestige: %s", coins, water, Config.WaterLevelThreshold, tostring(pres) ) end) task.wait(1) end end) end -- ========================================== -- STARTUP -- ========================================== CreateGUI() StartSpeedHack() -- EXPORT GLOBAL getgenv().ChopYourTree = { Config = Config, State = State, TIMING = TIMING, Unload = Unload, -- ... functions export if needed elsewhere ... UpdateGUI = CreateGUI -- Allows re-opening }