CCCPaste

Grow A Garden Script

-- Grow A Garden Script by JayRBLX Scripts
-- Advanced automation and optimization features

local Rayfield = loadstring(game:HttpGet('https://sirius.menu/rayfield'))()

local Window = Rayfield:CreateWindow({
   Name = "Grow A Garden | JayRBLX Scripts",
   LoadingTitle = "Loading Grow A Garden Script",
   LoadingSubtitle = "by JayRBLX Scripts",
   ConfigurationSaving = {
      Enabled = true,
      FolderName = nil,
      FileName = "GrowAGarden_Config"
   },
   Discord = {
      Enabled = false,
      Invite = "noinvitelink",
      RememberJoins = true
   },
   KeySystem = false
})

-- Services
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")

local Player = Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")

-- Script Variables
local ScriptSettings = {
    AutoOptimizePlants = false,
    AutoRemoveOtherPets = false,
    RemoveOtherFarms = false,
    AutoBuySeeds = false,
    AutoCollectGroundSeeds = false,
    AutoPlantSeeds = false,
    AutoHarvestPlants = false,
    SelectedPlant = "Carrot",
    AutoBuyGears = false,
    AutoUseWateringCan = false,
    AutoUseSprinklers = false,
    AutoPlantEggs = false,
    AutoHatchEggs = false,
    AutoBuyEggs = false,
    AutoFeedPets = false,
    AutoPutPetsInGarden = false,
    AutoSellPets = false,
    WalkSpeed = 16,
    JumpPower = 50,
    NoClip = false,
    WhiteScreen = false
}

-- Plant List (All 30 plants in Grow A Garden)
local PlantList = {
    "Carrot",
    "Strawberry",
    "Blueberry",
    "Buttercup",
    "Tomato",
    "Corn",
    "Daffodil",
    "Watermelon",
    "Pumpkin",
    "Apple",
    "Bamboo",
    "Coconut",
    "Cactus",
    "Dragon Fruit",
    "Mango",
    "Grape",
    "Mushroom",
    "Pepper",
    "Cacao",
    "Sunflower",
    "Beanstalk",
    "Ember Lily",
    "Sugar Apple",
    "Burning Bud",
    "Giant Pinecone",
    "Elder Strawberry",
    "Romanesco",
    "Crimson Thorn",
    "Zebrazinkle",
    "Octobloom"
}

local Stats = {
    GardenValue = 0,
    BackpackValue = 0,
    InHandValue = 0
}

-- Helper Functions
local function UpdateStats()
    -- Update garden value
    local gardenValue = 0
    -- Add your game-specific logic to calculate garden value
    Stats.GardenValue = gardenValue
    
    -- Update backpack value
    local backpackValue = 0
    -- Add your game-specific logic to calculate backpack value
    Stats.BackpackValue = backpackValue
    
    -- Update in-hand item value
    local inHandValue = 0
    -- Add your game-specific logic to calculate in-hand value
    Stats.InHandValue = inHandValue
end

local function FireRemote(remoteName, ...)
    local remote = ReplicatedStorage:FindFirstChild(remoteName, true)
    if remote then
        if remote:IsA("RemoteEvent") then
            remote:FireServer(...)
        elseif remote:IsA("RemoteFunction") then
            return remote:InvokeServer(...)
        end
    end
end

-- Home Tab
local HomeTab = Window:CreateTab("🏠 Home", nil)

local HomeSection = HomeTab:CreateSection("Welcome!")

HomeTab:CreateParagraph({
    Title = "Welcome to Grow A Garden Script!",
    Content = "This script provides comprehensive automation for Grow A Garden. Navigate through the tabs to enable different features. Made by JayRBLX Scripts."
})

HomeTab:CreateParagraph({
    Title = "Plant Information",
    Content = "This script supports all 30 plants in the game: From basic crops like Carrot and Strawberry to rare plants like Octobloom and Zebrazinkle. Select your desired plant in the Garden tab!"
})

-- Main Tab
local MainTab = Window:CreateTab("⭐ Main", nil)

local MainSection = MainTab:CreateSection("Optimization")

MainTab:CreateToggle({
    Name = "Auto Optimize Plants",
    CurrentValue = false,
    Flag = "AutoOptimizePlants",
    Callback = function(Value)
        ScriptSettings.AutoOptimizePlants = Value
    end,
})

MainTab:CreateToggle({
    Name = "Auto Remove Other Pets",
    CurrentValue = false,
    Flag = "AutoRemoveOtherPets",
    Callback = function(Value)
        ScriptSettings.AutoRemoveOtherPets = Value
    end,
})

MainTab:CreateButton({
    Name = "Remove Other Farms",
    Callback = function()
        -- Add logic to remove other farms
        Rayfield:Notify({
            Title = "Farms Removed",
            Content = "Other farms have been removed from view",
            Duration = 3,
            Image = 4483362458,
        })
    end,
})

local StatsSection = MainTab:CreateSection("Statistics")

local GardenValueLabel = MainTab:CreateLabel("Garden Value: $" .. Stats.GardenValue)
local BackpackValueLabel = MainTab:CreateLabel("Backpack Value: $" .. Stats.BackpackValue)
local InHandValueLabel = MainTab:CreateLabel("In-Hand Item Value: $" .. Stats.InHandValue)

-- Garden Tab
local GardenTab = Window:CreateTab("🌱 Garden", nil)

local GardenSection = GardenTab:CreateSection("Garden Automation")

GardenTab:CreateDropdown({
    Name = "Select Plant Type",
    Options = PlantList,
    CurrentOption = "Carrot",
    Flag = "SelectedPlant",
    Callback = function(Option)
        ScriptSettings.SelectedPlant = Option
        Rayfield:Notify({
            Title = "Plant Selected",
            Content = "Now using: " .. Option,
            Duration = 2,
            Image = 4483362458,
        })
    end,
})

GardenTab:CreateToggle({
    Name = "Auto Buy Seeds",
    CurrentValue = false,
    Flag = "AutoBuySeeds",
    Callback = function(Value)
        ScriptSettings.AutoBuySeeds = Value
        if Value then
            Rayfield:Notify({
                Title = "Auto Buy Seeds",
                Content = "Buying " .. ScriptSettings.SelectedPlant .. " seeds",
                Duration = 2,
                Image = 4483362458,
            })
        end
    end,
})

GardenTab:CreateToggle({
    Name = "Auto Collect Ground Seeds",
    CurrentValue = false,
    Flag = "AutoCollectGroundSeeds",
    Callback = function(Value)
        ScriptSettings.AutoCollectGroundSeeds = Value
    end,
})

GardenTab:CreateToggle({
    Name = "Auto Plant Seeds",
    CurrentValue = false,
    Flag = "AutoPlantSeeds",
    Callback = function(Value)
        ScriptSettings.AutoPlantSeeds = Value
        if Value then
            Rayfield:Notify({
                Title = "Auto Plant Seeds",
                Content = "Planting " .. ScriptSettings.SelectedPlant .. " seeds",
                Duration = 2,
                Image = 4483362458,
            })
        end
    end,
})

GardenTab:CreateToggle({
    Name = "Auto Harvest Plants",
    CurrentValue = false,
    Flag = "AutoHarvestPlants",
    Callback = function(Value)
        ScriptSettings.AutoHarvestPlants = Value
    end,
})

GardenTab:CreateButton({
    Name = "Plant All Seeds in Inventory",
    Callback = function()
        -- Add logic to plant all seeds at once
        Rayfield:Notify({
            Title = "Planting Seeds",
            Content = "Planting all " .. ScriptSettings.SelectedPlant .. " seeds in inventory",
            Duration = 3,
            Image = 4483362458,
        })
    end,
})

GardenTab:CreateButton({
    Name = "Harvest All Plants",
    Callback = function()
        -- Add logic to harvest all plants at once
        Rayfield:Notify({
            Title = "Harvesting",
            Content = "Harvesting all ready plants in garden",
            Duration = 3,
            Image = 4483362458,
        })
    end,
})

-- Gears Tab
local GearsTab = Window:CreateTab("⚙️ Gears", nil)

local GearsSection = GearsTab:CreateSection("Gear Automation")

GearsTab:CreateToggle({
    Name = "Auto Buy Gears",
    CurrentValue = false,
    Flag = "AutoBuyGears",
    Callback = function(Value)
        ScriptSettings.AutoBuyGears = Value
    end,
})

GearsTab:CreateToggle({
    Name = "Auto Use Watering Can",
    CurrentValue = false,
    Flag = "AutoUseWateringCan",
    Callback = function(Value)
        ScriptSettings.AutoUseWateringCan = Value
    end,
})

GearsTab:CreateToggle({
    Name = "Auto Use Sprinklers",
    CurrentValue = false,
    Flag = "AutoUseSprinklers",
    Callback = function(Value)
        ScriptSettings.AutoUseSprinklers = Value
    end,
})

-- Eggs Tab
local EggsTab = Window:CreateTab("🥚 Eggs", nil)

local EggsSection = EggsTab:CreateSection("Egg Automation")

EggsTab:CreateToggle({
    Name = "Auto Plant Eggs",
    CurrentValue = false,
    Flag = "AutoPlantEggs",
    Callback = function(Value)
        ScriptSettings.AutoPlantEggs = Value
    end,
})

EggsTab:CreateToggle({
    Name = "Auto Hatch Eggs",
    CurrentValue = false,
    Flag = "AutoHatchEggs",
    Callback = function(Value)
        ScriptSettings.AutoHatchEggs = Value
    end,
})

EggsTab:CreateToggle({
    Name = "Auto Buy Eggs",
    CurrentValue = false,
    Flag = "AutoBuyEggs",
    Callback = function(Value)
        ScriptSettings.AutoBuyEggs = Value
    end,
})

-- Pets Tab
local PetsTab = Window:CreateTab("🐾 Pets", nil)

local PetsSection = PetsTab:CreateSection("Pet Automation")

PetsTab:CreateToggle({
    Name = "Auto Feed Pets",
    CurrentValue = false,
    Flag = "AutoFeedPets",
    Callback = function(Value)
        ScriptSettings.AutoFeedPets = Value
    end,
})

PetsTab:CreateToggle({
    Name = "Auto Put Pets In Garden",
    CurrentValue = false,
    Flag = "AutoPutPetsInGarden",
    Callback = function(Value)
        ScriptSettings.AutoPutPetsInGarden = Value
    end,
})

PetsTab:CreateToggle({
    Name = "Auto Sell Pets",
    CurrentValue = false,
    Flag = "AutoSellPets",
    Callback = function(Value)
        ScriptSettings.AutoSellPets = Value
    end,
})

-- Player Tab
local PlayerTab = Window:CreateTab("👤 Player", nil)

local PlayerSection = PlayerTab:CreateSection("Player Modifications")

PlayerTab:CreateSlider({
    Name = "Walk Speed",
    Range = {16, 200},
    Increment = 1,
    CurrentValue = 16,
    Flag = "WalkSpeed",
    Callback = function(Value)
        ScriptSettings.WalkSpeed = Value
        Humanoid.WalkSpeed = Value
    end,
})

PlayerTab:CreateSlider({
    Name = "Jump Power",
    Range = {50, 300},
    Increment = 1,
    CurrentValue = 50,
    Flag = "JumpPower",
    Callback = function(Value)
        ScriptSettings.JumpPower = Value
        Humanoid.JumpPower = Value
    end,
})

PlayerTab:CreateToggle({
    Name = "No Clip",
    CurrentValue = false,
    Flag = "NoClip",
    Callback = function(Value)
        ScriptSettings.NoClip = Value
    end,
})

-- Misc Tab
local MiscTab = Window:CreateTab("🔧 Misc", nil)

local MiscSection = MiscTab:CreateSection("Miscellaneous")

MiscTab:CreateToggle({
    Name = "White Screen",
    CurrentValue = false,
    Flag = "WhiteScreen",
    Callback = function(Value)
        ScriptSettings.WhiteScreen = Value
        if Value then
            local whiteScreen = Instance.new("Frame")
            whiteScreen.Name = "WhiteScreen"
            whiteScreen.Size = UDim2.new(1, 0, 1, 0)
            whiteScreen.Position = UDim2.new(0, 0, 0, 0)
            whiteScreen.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
            whiteScreen.BorderSizePixel = 0
            whiteScreen.ZIndex = 999999
            whiteScreen.Parent = Player.PlayerGui:WaitForChild("ScreenGui") or Instance.new("ScreenGui", Player.PlayerGui)
        else
            local screenGui = Player.PlayerGui:FindFirstChild("ScreenGui")
            if screenGui then
                local whiteScreen = screenGui:FindFirstChild("WhiteScreen")
                if whiteScreen then
                    whiteScreen:Destroy()
                end
            end
        end
    end,
})

-- Main Loop
RunService.Heartbeat:Connect(function()
    -- Auto Optimize Plants
    if ScriptSettings.AutoOptimizePlants then
        -- Add logic to optimize plants
    end
    
    -- Auto Remove Other Pets
    if ScriptSettings.AutoRemoveOtherPets then
        -- Add logic to remove other pets
    end
    
    -- Auto Buy Seeds
    if ScriptSettings.AutoBuySeeds then
        -- Add logic to buy selected plant seeds
        -- FireRemote("BuySeeds", ScriptSettings.SelectedPlant, amount)
    end
    
    -- Auto Collect Ground Seeds
    if ScriptSettings.AutoCollectGroundSeeds then
        -- Add logic to collect ground seeds
        -- Loop through workspace for seed drops
    end
    
    -- Auto Plant Seeds
    if ScriptSettings.AutoPlantSeeds then
        -- Add logic to plant selected seeds
        -- FireRemote("PlantSeed", ScriptSettings.SelectedPlant, position)
    end
    
    -- Auto Harvest Plants
    if ScriptSettings.AutoHarvestPlants then
        -- Add logic to harvest ready plants
        -- Check plant growth stage and harvest when ready
    end
    
    -- Auto Buy Gears
    if ScriptSettings.AutoBuyGears then
        -- Add logic to buy gears
    end
    
    -- Auto Use Watering Can
    if ScriptSettings.AutoUseWateringCan then
        -- Add logic to use watering can
    end
    
    -- Auto Use Sprinklers
    if ScriptSettings.AutoUseSprinklers then
        -- Add logic to use sprinklers
    end
    
    -- Auto Plant Eggs
    if ScriptSettings.AutoPlantEggs then
        -- Add logic to plant eggs
    end
    
    -- Auto Hatch Eggs
    if ScriptSettings.AutoHatchEggs then
        -- Add logic to hatch eggs
    end
    
    -- Auto Buy Eggs
    if ScriptSettings.AutoBuyEggs then
        -- Add logic to buy eggs
    end
    
    -- Auto Feed Pets
    if ScriptSettings.AutoFeedPets then
        -- Add logic to feed pets
    end
    
    -- Auto Put Pets In Garden
    if ScriptSettings.AutoPutPetsInGarden then
        -- Add logic to put pets in garden
    end
    
    -- Auto Sell Pets
    if ScriptSettings.AutoSellPets then
        -- Add logic to sell pets
    end
    
    -- No Clip
    if ScriptSettings.NoClip then
        for _, part in pairs(Character:GetDescendants()) do
            if part:IsA("BasePart") then
                part.CanCollide = false
            end
        end
    end
    
    -- Update Stats
    UpdateStats()
    GardenValueLabel:Set("Garden Value: $" .. Stats.GardenValue)
    BackpackValueLabel:Set("Backpack Value: $" .. Stats.BackpackValue)
    InHandValueLabel:Set("In-Hand Item Value: $" .. Stats.InHandValue)
end)

-- Character respawn handler
Player.CharacterAdded:Connect(function(char)
    Character = char
    Humanoid = Character:WaitForChild("Humanoid")
    HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")
    
    Humanoid.WalkSpeed = ScriptSettings.WalkSpeed
    Humanoid.JumpPower = ScriptSettings.JumpPower
end)

Rayfield:Notify({
    Title = "Script Loaded!",
    Content = "Grow A Garden script by JayRBLX Scripts has been loaded successfully!",
    Duration = 5,
    Image = 4483362458,
})

print("Grow A Garden Script by JayRBLX Scripts - Loaded Successfully!")