Yhehewgq

Grow A Garden Script

Nov 23rd, 2025 (edited)
383
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 27.64 KB | None | 0 0
  1. -- Grow A Garden Script by JayRBLX Scripts
  2. -- Fully functional automation and optimization features
  3.  
  4. local Rayfield = loadstring(game:HttpGet('https://sirius.menu/rayfield'))()
  5.  
  6. local Window = Rayfield:CreateWindow({
  7.    Name = "Grow A Garden | JayRBLX Scripts",
  8.    LoadingTitle = "Loading Grow A Garden Script",
  9.    LoadingSubtitle = "by JayRBLX Scripts",
  10.    ConfigurationSaving = {
  11.       Enabled = true,
  12.       FolderName = nil,
  13.       FileName = "GrowAGarden_Config"
  14.    },
  15.    Discord = {
  16.       Enabled = false,
  17.       Invite = "noinvitelink",
  18.       RememberJoins = true
  19.    },
  20.    KeySystem = false
  21. })
  22.  
  23. -- Services
  24. local Players = game:GetService("Players")
  25. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  26. local RunService = game:GetService("RunService")
  27. local Workspace = game:GetService("Workspace")
  28.  
  29. local Player = Players.LocalPlayer
  30. local Character = Player.Character or Player.CharacterAdded:Wait()
  31. local Humanoid = Character:WaitForChild("Humanoid")
  32. local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")
  33.  
  34. -- Get game remotes
  35. local Remotes = ReplicatedStorage:WaitForChild("Remotes")
  36.  
  37. -- Script Variables
  38. local ScriptSettings = {
  39.     AutoOptimizePlants = false,
  40.     AutoRemoveOtherPets = false,
  41.     RemoveOtherFarms = false,
  42.     AutoBuySeeds = false,
  43.     SelectedPlant = "Carrot",
  44.     AutoCollectGroundSeeds = false,
  45.     AutoPlantSeeds = false,
  46.     AutoHarvestPlants = false,
  47.     AutoBuyGears = false,
  48.     SelectedGear = "Watering Can",
  49.     AutoUseWateringCan = false,
  50.     AutoUseSprinklers = false,
  51.     SelectedSprinkler = "Basic Sprinkler",
  52.     AutoPlantEggs = false,
  53.     AutoHatchEggs = false,
  54.     AutoBuyEggs = false,
  55.     SelectedEgg = "Basic Egg",
  56.     AutoFeedPets = false,
  57.     SelectedPetFood = "Carrot",
  58.     AutoPutPetsInGarden = false,
  59.     AutoSellPets = false,
  60.     WalkSpeed = 16,
  61.     JumpPower = 50,
  62.     NoClip = false,
  63.     WhiteScreen = false
  64. }
  65.  
  66. -- Plant List (All 30 plants in Grow A Garden)
  67. local PlantList = {
  68.     "Carrot",
  69.     "Strawberry",
  70.     "Blueberry",
  71.     "Buttercup",
  72.     "Tomato",
  73.     "Corn",
  74.     "Daffodil",
  75.     "Watermelon",
  76.     "Pumpkin",
  77.     "Apple",
  78.     "Bamboo",
  79.     "Coconut",
  80.     "Cactus",
  81.     "Dragon Fruit",
  82.     "Mango",
  83.     "Grape",
  84.     "Mushroom",
  85.     "Pepper",
  86.     "Cacao",
  87.     "Sunflower",
  88.     "Beanstalk",
  89.     "Ember Lily",
  90.     "Sugar Apple",
  91.     "Burning Bud",
  92.     "Giant Pinecone",
  93.     "Elder Strawberry",
  94.     "Romanesco",
  95.     "Crimson Thorn",
  96.     "Zebrazinkle",
  97.     "Octobloom"
  98. }
  99.  
  100. -- Gear List
  101. local GearList = {
  102.     "Watering Can",
  103.     "Basic Watering Can",
  104.     "Advanced Watering Can",
  105.     "Golden Watering Can",
  106.     "Shovel",
  107.     "Hoe",
  108.     "Fertilizer"
  109. }
  110.  
  111. -- Sprinkler List
  112. local SprinklerList = {
  113.     "Basic Sprinkler",
  114.     "Advanced Sprinkler",
  115.     "Golden Sprinkler",
  116.     "Rainbow Sprinkler",
  117.     "Legendary Sprinkler"
  118. }
  119.  
  120. -- Egg List
  121. local EggList = {
  122.     "Basic Egg",
  123.     "Common Egg",
  124.     "Uncommon Egg",
  125.     "Rare Egg",
  126.     "Epic Egg",
  127.     "Legendary Egg",
  128.     "Mythical Egg",
  129.     "Dragon Egg",
  130.     "Phoenix Egg",
  131.     "Galaxy Egg"
  132. }
  133.  
  134. local Stats = {
  135.     GardenValue = 0,
  136.     BackpackValue = 0,
  137.     InHandValue = 0
  138. }
  139.  
  140. -- Helper Functions
  141. local function GetPlayerGarden()
  142.     local gardens = Workspace:FindFirstChild("Gardens")
  143.     if gardens then
  144.         return gardens:FindFirstChild(Player.Name)
  145.     end
  146.     return nil
  147. end
  148.  
  149. local function GetPlots()
  150.     local garden = GetPlayerGarden()
  151.     if garden then
  152.         local plots = garden:FindFirstChild("Plots")
  153.         if plots then
  154.             return plots:GetChildren()
  155.         end
  156.     end
  157.     return {}
  158. end
  159.  
  160. local function GetEmptyPlot()
  161.     for _, plot in pairs(GetPlots()) do
  162.         if plot:FindFirstChild("Plant") == nil or plot.Plant.Value == nil then
  163.             return plot
  164.         end
  165.     end
  166.     return nil
  167. end
  168.  
  169. local function GetReadyPlants()
  170.     local readyPlants = {}
  171.     for _, plot in pairs(GetPlots()) do
  172.         if plot:FindFirstChild("Plant") and plot.Plant.Value then
  173.             local plant = plot.Plant.Value
  174.             if plant:FindFirstChild("Stage") and plant.Stage.Value >= plant:FindFirstChild("MaxStage").Value then
  175.                 table.insert(readyPlants, plot)
  176.             end
  177.         end
  178.     end
  179.     return readyPlants
  180. end
  181.  
  182. local function UpdateStats()
  183.     -- Calculate garden value
  184.     local gardenValue = 0
  185.     for _, plot in pairs(GetPlots()) do
  186.         if plot:FindFirstChild("Plant") and plot.Plant.Value then
  187.             local plant = plot.Plant.Value
  188.             if plant:FindFirstChild("Value") then
  189.                 gardenValue = gardenValue + plant.Value.Value
  190.             end
  191.         end
  192.     end
  193.     Stats.GardenValue = gardenValue
  194.    
  195.     -- Calculate backpack value
  196.     local backpackValue = 0
  197.     local backpack = Player:FindFirstChild("Backpack")
  198.     if backpack then
  199.         for _, item in pairs(backpack:GetChildren()) do
  200.             if item:FindFirstChild("Value") then
  201.                 backpackValue = backpackValue + item.Value.Value
  202.             end
  203.         end
  204.     end
  205.     Stats.BackpackValue = backpackValue
  206.    
  207.     -- Calculate in-hand value
  208.     local inHandValue = 0
  209.     if Character:FindFirstChildOfClass("Tool") then
  210.         local tool = Character:FindFirstChildOfClass("Tool")
  211.         if tool:FindFirstChild("Value") then
  212.             inHandValue = tool.Value.Value
  213.         end
  214.     end
  215.     Stats.InHandValue = inHandValue
  216. end
  217.  
  218. -- Home Tab
  219. local HomeTab = Window:CreateTab("๐Ÿ  Home", nil)
  220.  
  221. HomeTab:CreateSection("Welcome!")
  222.  
  223. HomeTab:CreateParagraph({
  224.     Title = "Welcome to Grow A Garden Script!",
  225.     Content = "This script provides comprehensive automation for Grow A Garden. Navigate through the tabs to enable different features. Made by JayRBLX Scripts."
  226. })
  227.  
  228. HomeTab:CreateParagraph({
  229.     Title = "Plant Information",
  230.     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!"
  231. })
  232.  
  233. HomeTab:CreateParagraph({
  234.     Title = "How to Use",
  235.     Content = "1. Select your plants, gears, eggs, and sprinklers from dropdowns. 2. Toggle automation features on/off. 3. Monitor your stats in the Main tab. 4. Adjust player settings as needed. Enjoy!"
  236. })
  237.  
  238. -- Main Tab
  239. local MainTab = Window:CreateTab("โญ Main", nil)
  240.  
  241. MainTab:CreateSection("Optimization")
  242.  
  243. MainTab:CreateToggle({
  244.     Name = "Auto Optimize Plants",
  245.     CurrentValue = false,
  246.     Flag = "AutoOptimizePlants",
  247.     Callback = function(Value)
  248.         ScriptSettings.AutoOptimizePlants = Value
  249.         if Value then
  250.             spawn(function()
  251.                 while ScriptSettings.AutoOptimizePlants do
  252.                     wait(1)
  253.                     -- Auto water plants that need water
  254.                     for _, plot in pairs(GetPlots()) do
  255.                         if plot:FindFirstChild("Plant") and plot.Plant.Value then
  256.                             local plant = plot.Plant.Value
  257.                             if plant:FindFirstChild("NeedsWater") and plant.NeedsWater.Value then
  258.                                 local args = {plot}
  259.                                 Remotes:FindFirstChild("WaterPlant"):FireServer(unpack(args))
  260.                             end
  261.                         end
  262.                     end
  263.                 end
  264.             end)
  265.         end
  266.     end,
  267. })
  268.  
  269. MainTab:CreateToggle({
  270.     Name = "Auto Remove Other Pets",
  271.     CurrentValue = false,
  272.     Flag = "AutoRemoveOtherPets",
  273.     Callback = function(Value)
  274.         ScriptSettings.AutoRemoveOtherPets = Value
  275.         if Value then
  276.             local pets = Workspace:FindFirstChild("Pets")
  277.             if pets then
  278.                 for _, pet in pairs(pets:GetChildren()) do
  279.                     if pet:FindFirstChild("Owner") and pet.Owner.Value ~= Player then
  280.                         pet:Destroy()
  281.                     end
  282.                 end
  283.             end
  284.         end
  285.     end,
  286. })
  287.  
  288. MainTab:CreateButton({
  289.     Name = "Remove Other Farms",
  290.     Callback = function()
  291.         local gardens = Workspace:FindFirstChild("Gardens")
  292.         if gardens then
  293.             for _, garden in pairs(gardens:GetChildren()) do
  294.                 if garden.Name ~= Player.Name then
  295.                     garden.Parent = nil
  296.                 end
  297.             end
  298.         end
  299.         Rayfield:Notify({
  300.             Title = "Farms Removed",
  301.             Content = "Other farms have been hidden from view",
  302.             Duration = 3,
  303.             Image = 4483362458,
  304.         })
  305.     end,
  306. })
  307.  
  308. MainTab:CreateSection("Statistics")
  309.  
  310. local GardenValueLabel = MainTab:CreateLabel("Garden Value: $" .. Stats.GardenValue)
  311. local BackpackValueLabel = MainTab:CreateLabel("Backpack Value: $" .. Stats.BackpackValue)
  312. local InHandValueLabel = MainTab:CreateLabel("In-Hand Item Value: $" .. Stats.InHandValue)
  313.  
  314. MainTab:CreateButton({
  315.     Name = "Refresh Stats",
  316.     Callback = function()
  317.         UpdateStats()
  318.         Rayfield:Notify({
  319.             Title = "Stats Refreshed",
  320.             Content = "All statistics updated",
  321.             Duration = 2,
  322.             Image = 4483362458,
  323.         })
  324.     end,
  325. })
  326.  
  327. -- Garden Tab
  328. local GardenTab = Window:CreateTab("๐ŸŒฑ Garden", nil)
  329.  
  330. GardenTab:CreateSection("Garden Automation")
  331.  
  332. GardenTab:CreateDropdown({
  333.     Name = "Select Plant Type",
  334.     Options = PlantList,
  335.     CurrentOption = "Carrot",
  336.     Flag = "SelectedPlant",
  337.     Callback = function(Option)
  338.         ScriptSettings.SelectedPlant = Option
  339.         Rayfield:Notify({
  340.             Title = "Plant Selected",
  341.             Content = "Now using: " .. Option,
  342.             Duration = 2,
  343.             Image = 4483362458,
  344.         })
  345.     end,
  346. })
  347.  
  348. GardenTab:CreateToggle({
  349.     Name = "Auto Buy Seeds",
  350.     CurrentValue = false,
  351.     Flag = "AutoBuySeeds",
  352.     Callback = function(Value)
  353.         ScriptSettings.AutoBuySeeds = Value
  354.         if Value then
  355.             spawn(function()
  356.                 while ScriptSettings.AutoBuySeeds do
  357.                     wait(0.5)
  358.                     local args = {
  359.                         [1] = ScriptSettings.SelectedPlant,
  360.                         [2] = 1
  361.                     }
  362.                     Remotes:FindFirstChild("BuySeeds"):FireServer(unpack(args))
  363.                 end
  364.             end)
  365.         end
  366.     end,
  367. })
  368.  
  369. GardenTab:CreateToggle({
  370.     Name = "Auto Collect Ground Seeds",
  371.     CurrentValue = false,
  372.     Flag = "AutoCollectGroundSeeds",
  373.     Callback = function(Value)
  374.         ScriptSettings.AutoCollectGroundSeeds = Value
  375.         if Value then
  376.             spawn(function()
  377.                 while ScriptSettings.AutoCollectGroundSeeds do
  378.                     wait(0.3)
  379.                     local seeds = Workspace:FindFirstChild("Seeds")
  380.                     if seeds then
  381.                         for _, seed in pairs(seeds:GetChildren()) do
  382.                             if seed:IsA("Model") or seed:IsA("Part") then
  383.                                 local args = {seed}
  384.                                 Remotes:FindFirstChild("CollectSeed"):FireServer(unpack(args))
  385.                             end
  386.                         end
  387.                     end
  388.                 end
  389.             end)
  390.         end
  391.     end,
  392. })
  393.  
  394. GardenTab:CreateToggle({
  395.     Name = "Auto Plant Seeds",
  396.     CurrentValue = false,
  397.     Flag = "AutoPlantSeeds",
  398.     Callback = function(Value)
  399.         ScriptSettings.AutoPlantSeeds = Value
  400.         if Value then
  401.             spawn(function()
  402.                 while ScriptSettings.AutoPlantSeeds do
  403.                     wait(0.5)
  404.                     local emptyPlot = GetEmptyPlot()
  405.                     if emptyPlot then
  406.                         local args = {
  407.                             [1] = ScriptSettings.SelectedPlant,
  408.                             [2] = emptyPlot
  409.                         }
  410.                         Remotes:FindFirstChild("PlantSeed"):FireServer(unpack(args))
  411.                     end
  412.                 end
  413.             end)
  414.         end
  415.     end,
  416. })
  417.  
  418. GardenTab:CreateToggle({
  419.     Name = "Auto Harvest Plants",
  420.     CurrentValue = false,
  421.     Flag = "AutoHarvestPlants",
  422.     Callback = function(Value)
  423.         ScriptSettings.AutoHarvestPlants = Value
  424.         if Value then
  425.             spawn(function()
  426.                 while ScriptSettings.AutoHarvestPlants do
  427.                     wait(0.5)
  428.                     local readyPlants = GetReadyPlants()
  429.                     for _, plot in pairs(readyPlants) do
  430.                         local args = {plot}
  431.                         Remotes:FindFirstChild("HarvestPlant"):FireServer(unpack(args))
  432.                         wait(0.1)
  433.                     end
  434.                 end
  435.             end)
  436.         end
  437.     end,
  438. })
  439.  
  440. GardenTab:CreateButton({
  441.     Name = "Plant All Seeds in Inventory",
  442.     Callback = function()
  443.         for _, plot in pairs(GetPlots()) do
  444.             if plot:FindFirstChild("Plant") == nil or plot.Plant.Value == nil then
  445.                 local args = {
  446.                     [1] = ScriptSettings.SelectedPlant,
  447.                     [2] = plot
  448.                 }
  449.                 Remotes:FindFirstChild("PlantSeed"):FireServer(unpack(args))
  450.                 wait(0.1)
  451.             end
  452.         end
  453.         Rayfield:Notify({
  454.             Title = "Planting Complete",
  455.             Content = "All available plots planted",
  456.             Duration = 3,
  457.             Image = 4483362458,
  458.         })
  459.     end,
  460. })
  461.  
  462. GardenTab:CreateButton({
  463.     Name = "Harvest All Plants",
  464.     Callback = function()
  465.         local readyPlants = GetReadyPlants()
  466.         for _, plot in pairs(readyPlants) do
  467.             local args = {plot}
  468.             Remotes:FindFirstChild("HarvestPlant"):FireServer(unpack(args))
  469.             wait(0.1)
  470.         end
  471.         Rayfield:Notify({
  472.             Title = "Harvesting Complete",
  473.             Content = "All ready plants harvested",
  474.             Duration = 3,
  475.             Image = 4483362458,
  476.         })
  477.     end,
  478. })
  479.  
  480. -- Gears Tab
  481. local GearsTab = Window:CreateTab("โš™๏ธ Gears", nil)
  482.  
  483. GearsTab:CreateSection("Gear Automation")
  484.  
  485. GearsTab:CreateDropdown({
  486.     Name = "Select Gear Type",
  487.     Options = GearList,
  488.     CurrentOption = "Watering Can",
  489.     Flag = "SelectedGear",
  490.     Callback = function(Option)
  491.         ScriptSettings.SelectedGear = Option
  492.         Rayfield:Notify({
  493.             Title = "Gear Selected",
  494.             Content = "Now using: " .. Option,
  495.             Duration = 2,
  496.             Image = 4483362458,
  497.         })
  498.     end,
  499. })
  500.  
  501. GearsTab:CreateToggle({
  502.     Name = "Auto Buy Gears",
  503.     CurrentValue = false,
  504.     Flag = "AutoBuyGears",
  505.     Callback = function(Value)
  506.         ScriptSettings.AutoBuyGears = Value
  507.         if Value then
  508.             spawn(function()
  509.                 while ScriptSettings.AutoBuyGears do
  510.                     wait(1)
  511.                     local args = {
  512.                         [1] = ScriptSettings.SelectedGear,
  513.                         [2] = 1
  514.                     }
  515.                     Remotes:FindFirstChild("BuyGear"):FireServer(unpack(args))
  516.                 end
  517.             end)
  518.         end
  519.     end,
  520. })
  521.  
  522. GearsTab:CreateToggle({
  523.     Name = "Auto Use Watering Can",
  524.     CurrentValue = false,
  525.     Flag = "AutoUseWateringCan",
  526.     Callback = function(Value)
  527.         ScriptSettings.AutoUseWateringCan = Value
  528.         if Value then
  529.             spawn(function()
  530.                 while ScriptSettings.AutoUseWateringCan do
  531.                     wait(0.5)
  532.                     for _, plot in pairs(GetPlots()) do
  533.                         if plot:FindFirstChild("Plant") and plot.Plant.Value then
  534.                             local plant = plot.Plant.Value
  535.                             if plant:FindFirstChild("NeedsWater") and plant.NeedsWater.Value then
  536.                                 local args = {plot}
  537.                                 Remotes:FindFirstChild("WaterPlant"):FireServer(unpack(args))
  538.                             end
  539.                         end
  540.                     end
  541.                 end
  542.             end)
  543.         end
  544.     end,
  545. })
  546.  
  547. GearsTab:CreateSection("Sprinkler Automation")
  548.  
  549. GearsTab:CreateDropdown({
  550.     Name = "Select Sprinkler Type",
  551.     Options = SprinklerList,
  552.     CurrentOption = "Basic Sprinkler",
  553.     Flag = "SelectedSprinkler",
  554.     Callback = function(Option)
  555.         ScriptSettings.SelectedSprinkler = Option
  556.         Rayfield:Notify({
  557.             Title = "Sprinkler Selected",
  558.             Content = "Now using: " .. Option,
  559.             Duration = 2,
  560.             Image = 4483362458,
  561.         })
  562.     end,
  563. })
  564.  
  565. GearsTab:CreateToggle({
  566.     Name = "Auto Use Sprinklers",
  567.     CurrentValue = false,
  568.     Flag = "AutoUseSprinklers",
  569.     Callback = function(Value)
  570.         ScriptSettings.AutoUseSprinklers = Value
  571.         if Value then
  572.             spawn(function()
  573.                 while ScriptSettings.AutoUseSprinklers do
  574.                     wait(2)
  575.                     local args = {
  576.                         [1] = ScriptSettings.SelectedSprinkler,
  577.                         [2] = GetPlayerGarden()
  578.                     }
  579.                     Remotes:FindFirstChild("UseSprinkler"):FireServer(unpack(args))
  580.                 end
  581.             end)
  582.         end
  583.     end,
  584. })
  585.  
  586. -- Eggs Tab
  587. local EggsTab = Window:CreateTab("๐Ÿฅš Eggs", nil)
  588.  
  589. EggsTab:CreateSection("Egg Automation")
  590.  
  591. EggsTab:CreateDropdown({
  592.     Name = "Select Egg Type",
  593.     Options = EggList,
  594.     CurrentOption = "Basic Egg",
  595.     Flag = "SelectedEgg",
  596.     Callback = function(Option)
  597.         ScriptSettings.SelectedEgg = Option
  598.         Rayfield:Notify({
  599.             Title = "Egg Selected",
  600.             Content = "Now using: " .. Option,
  601.             Duration = 2,
  602.             Image = 4483362458,
  603.         })
  604.     end,
  605. })
  606.  
  607. EggsTab:CreateToggle({
  608.     Name = "Auto Buy Eggs",
  609.     CurrentValue = false,
  610.     Flag = "AutoBuyEggs",
  611.     Callback = function(Value)
  612.         ScriptSettings.AutoBuyEggs = Value
  613.         if Value then
  614.             spawn(function()
  615.                 while ScriptSettings.AutoBuyEggs do
  616.                     wait(1)
  617.                     local args = {
  618.                         [1] = ScriptSettings.SelectedEgg,
  619.                         [2] = 1
  620.                     }
  621.                     Remotes:FindFirstChild("BuyEgg"):FireServer(unpack(args))
  622.                 end
  623.             end)
  624.         end
  625.     end,
  626. })
  627.  
  628. EggsTab:CreateToggle({
  629.     Name = "Auto Plant Eggs",
  630.     CurrentValue = false,
  631.     Flag = "AutoPlantEggs",
  632.     Callback = function(Value)
  633.         ScriptSettings.AutoPlantEggs = Value
  634.         if Value then
  635.             spawn(function()
  636.                 while ScriptSettings.AutoPlantEggs do
  637.                     wait(0.5)
  638.                     local args = {
  639.                         [1] = ScriptSettings.SelectedEgg,
  640.                         [2] = GetPlayerGarden()
  641.                     }
  642.                     Remotes:FindFirstChild("PlantEgg"):FireServer(unpack(args))
  643.                 end
  644.             end)
  645.         end
  646.     end,
  647. })
  648.  
  649. EggsTab:CreateToggle({
  650.     Name = "Auto Hatch Eggs",
  651.     CurrentValue = false,
  652.     Flag = "AutoHatchEggs",
  653.     Callback = function(Value)
  654.         ScriptSettings.AutoHatchEggs = Value
  655.         if Value then
  656.             spawn(function()
  657.                 while ScriptSettings.AutoHatchEggs do
  658.                     wait(0.5)
  659.                     local garden = GetPlayerGarden()
  660.                     if garden then
  661.                         local eggs = garden:FindFirstChild("Eggs")
  662.                         if eggs then
  663.                             for _, egg in pairs(eggs:GetChildren()) do
  664.                                 if egg:FindFirstChild("Ready") and egg.Ready.Value then
  665.                                     local args = {egg}
  666.                                     Remotes:FindFirstChild("HatchEgg"):FireServer(unpack(args))
  667.                                     wait(0.1)
  668.                                 end
  669.                             end
  670.                         end
  671.                     end
  672.                 end
  673.             end)
  674.         end
  675.     end,
  676. })
  677.  
  678. -- Pets Tab
  679. local PetsTab = Window:CreateTab("๐Ÿพ Pets", nil)
  680.  
  681. PetsTab:CreateSection("Pet Automation")
  682.  
  683. PetsTab:CreateDropdown({
  684.     Name = "Select Pet Food",
  685.     Options = PlantList,
  686.     CurrentOption = "Carrot",
  687.     Flag = "SelectedPetFood",
  688.     Callback = function(Option)
  689.         ScriptSettings.SelectedPetFood = Option
  690.         Rayfield:Notify({
  691.             Title = "Pet Food Selected",
  692.             Content = "Feeding pets with: " .. Option,
  693.             Duration = 2,
  694.             Image = 4483362458,
  695.         })
  696.     end,
  697. })
  698.  
  699. PetsTab:CreateToggle({
  700.     Name = "Auto Feed Pets",
  701.     CurrentValue = false,
  702.     Flag = "AutoFeedPets",
  703.     Callback = function(Value)
  704.         ScriptSettings.AutoFeedPets = Value
  705.         if Value then
  706.             spawn(function()
  707.                 while ScriptSettings.AutoFeedPets do
  708.                     wait(1)
  709.                     local pets = Player:FindFirstChild("Pets")
  710.                     if pets then
  711.                         for _, pet in pairs(pets:GetChildren()) do
  712.                             if pet:FindFirstChild("Hunger") and pet.Hunger.Value < 100 then
  713.                                 local args = {
  714.                                     [1] = pet,
  715.                                     [2] = ScriptSettings.SelectedPetFood
  716.                                 }
  717.                                 Remotes:FindFirstChild("FeedPet"):FireServer(unpack(args))
  718.                             end
  719.                         end
  720.                     end
  721.                 end
  722.             end)
  723.         end
  724.     end,
  725. })
  726.  
  727. PetsTab:CreateToggle({
  728.     Name = "Auto Put Pets In Garden",
  729.     CurrentValue = false,
  730.     Flag = "AutoPutPetsInGarden",
  731.     Callback = function(Value)
  732.         ScriptSettings.AutoPutPetsInGarden = Value
  733.         if Value then
  734.             spawn(function()
  735.                 while ScriptSettings.AutoPutPetsInGarden do
  736.                     wait(2)
  737.                     local pets = Player:FindFirstChild("Pets")
  738.                     if pets then
  739.                         for _, pet in pairs(pets:GetChildren()) do
  740.                             local args = {
  741.                                 [1] = pet,
  742.                                 [2] = GetPlayerGarden()
  743.                             }
  744.                             Remotes:FindFirstChild("PlacePet"):FireServer(unpack(args))
  745.                         end
  746.                     end
  747.                 end
  748.             end)
  749.         end
  750.     end,
  751. })
  752.  
  753. PetsTab:CreateToggle({
  754.     Name = "Auto Sell Pets",
  755.     CurrentValue = false,
  756.     Flag = "AutoSellPets",
  757.     Callback = function(Value)
  758.         ScriptSettings.AutoSellPets = Value
  759.         if Value then
  760.             spawn(function()
  761.                 while ScriptSettings.AutoSellPets do
  762.                     wait(1)
  763.                     local pets = Player:FindFirstChild("Pets")
  764.                     if pets then
  765.                         for _, pet in pairs(pets:GetChildren()) do
  766.                             if pet:FindFirstChild("Rarity") and pet.Rarity.Value == "Common" then
  767.                                 local args = {pet}
  768.                                 Remotes:FindFirstChild("SellPet"):FireServer(unpack(args))
  769.                             end
  770.                         end
  771.                     end
  772.                 end
  773.             end)
  774.         end
  775.     end,
  776. })
  777.  
  778. PetsTab:CreateButton({
  779.     Name = "Collect All Pets",
  780.     Callback = function()
  781.         local garden = GetPlayerGarden()
  782.         if garden then
  783.             local pets = garden:FindFirstChild("Pets")
  784.             if pets then
  785.                 for _, pet in pairs(pets:GetChildren()) do
  786.                     local args = {pet}
  787.                     Remotes:FindFirstChild("CollectPet"):FireServer(unpack(args))
  788.                     wait(0.1)
  789.                 end
  790.             end
  791.         end
  792.         Rayfield:Notify({
  793.             Title = "Pets Collected",
  794.             Content = "All pets collected from garden",
  795.             Duration = 3,
  796.             Image = 4483362458,
  797.         })
  798.     end,
  799. })
  800.  
  801. -- Player Tab
  802. local PlayerTab = Window:CreateTab("๐Ÿ‘ค Player", nil)
  803.  
  804. PlayerTab:CreateSection("Player Modifications")
  805.  
  806. PlayerTab:CreateSlider({
  807.     Name = "Walk Speed",
  808.     Range = {16, 200},
  809.     Increment = 1,
  810.     CurrentValue = 16,
  811.     Flag = "WalkSpeed",
  812.     Callback = function(Value)
  813.         ScriptSettings.WalkSpeed = Value
  814.         Humanoid.WalkSpeed = Value
  815.     end,
  816. })
  817.  
  818. PlayerTab:CreateSlider({
  819.     Name = "Jump Power",
  820.     Range = {50, 300},
  821.     Increment = 1,
  822.     CurrentValue = 50,
  823.     Flag = "JumpPower",
  824.     Callback = function(Value)
  825.         ScriptSettings.JumpPower = Value
  826.         Humanoid.JumpPower = Value
  827.     end,
  828. })
  829.  
  830. PlayerTab:CreateToggle({
  831.     Name = "No Clip",
  832.     CurrentValue = false,
  833.     Flag = "NoClip",
  834.     Callback = function(Value)
  835.         ScriptSettings.NoClip = Value
  836.     end,
  837. })
  838.  
  839. PlayerTab:CreateButton({
  840.     Name = "Reset Character",
  841.     Callback = function()
  842.         Character:BreakJoints()
  843.     end,
  844. })
  845.  
  846. -- Misc Tab
  847. local MiscTab = Window:CreateTab("๐Ÿ”ง Misc", nil)
  848.  
  849. MiscTab:CreateSection("Miscellaneous")
  850.  
  851. MiscTab:CreateToggle({
  852.     Name = "White Screen",
  853.     CurrentValue = false,
  854.     Flag = "WhiteScreen",
  855.     Callback = function(Value)
  856.         ScriptSettings.WhiteScreen = Value
  857.         if Value then
  858.             local screenGui = Player.PlayerGui:FindFirstChild("ScreenGui") or Instance.new("ScreenGui", Player.PlayerGui)
  859.             local whiteScreen = Instance.new("Frame")
  860.             whiteScreen.Name = "WhiteScreen"
  861.             whiteScreen.Size = UDim2.new(1, 0, 1, 0)
  862.             whiteScreen.Position = UDim2.new(0, 0, 0, 0)
  863.             whiteScreen.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  864.             whiteScreen.BorderSizePixel = 0
  865.             whiteScreen.ZIndex = 999999
  866.             whiteScreen.Parent = screenGui
  867.         else
  868.             local screenGui = Player.PlayerGui:FindFirstChild("ScreenGui")
  869.             if screenGui then
  870.                 local whiteScreen = screenGui:FindFirstChild("WhiteScreen")
  871.                 if whiteScreen then
  872.                     whiteScreen:Destroy()
  873.                 end
  874.             end
  875.         end
  876.     end,
  877. })
  878.  
  879. MiscTab:CreateButton({
  880.     Name = "Rejoin Server",
  881.     Callback = function()
  882.         game:GetService("TeleportService"):TeleportToPlaceInstance(game.PlaceId, game.JobId, Player)
  883.     end,
  884. })
  885.  
  886. MiscTab:CreateButton({
  887.     Name = "Server Hop",
  888.     Callback = function()
  889.         local TeleportService = game:GetService("TeleportService")
  890.         TeleportService:Teleport(game.PlaceId, Player)
  891.     end,
  892. })
  893.  
  894. -- Main Loop
  895. RunService.Heartbeat:Connect(function()
  896.     -- No Clip
  897.     if ScriptSettings.NoClip then
  898.         for _, part in pairs(Character:GetDescendants()) do
  899.             if part:IsA("BasePart") then
  900.                 part.CanCollide = false
  901.             end
  902.         end
  903.     end
  904.    
  905.     -- Update Stats every 2 seconds
  906.     if tick() % 2 < 0.016 then
  907.         UpdateStats()
  908.         GardenValueLabel:Set("Garden Value: $" .. math.floor(Stats.GardenValue))
  909.         BackpackValueLabel:Set("Backpack Value: $" .. math.floor(Stats.BackpackValue))
  910.         InHandValueLabel:Set("In-Hand Item Value: $" .. math.floor(Stats.InHandValue))
  911.     end
  912. end)
  913.  
  914. -- Character respawn handler
  915. Player.CharacterAdded:Connect(function(char)
  916.     Character = char
  917.     Humanoid = Character:WaitForChild("Humanoid")
  918.     HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")
  919.    
  920.     wait(1)
  921.     Humanoid.WalkSpeed = ScriptSettings.WalkSpeed
  922.     Humanoid.JumpPower = ScriptSettings.JumpPower
  923. end)
  924.  
  925. Rayfield:Notify({
  926.     Title = "Script Loaded!",
  927.     Content = "Grow A Garden script by JayRBLX Scripts has been loaded successfully!",
  928.     Duration = 5,
  929.     Image = 4483362458,
  930. })
  931.  
  932. print("Grow A Garden Script by JayRBLX Scripts - Loaded Successfully!")
Advertisement
Add Comment
Please, Sign In to add comment