Guest User

Grow a Garden Script [Open Source]

a guest
May 2nd, 2025
8,249
0
Never
8
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.36 KB | Gaming | 0 0
  1. game:GetService("StarterGui"):SetCore("SendNotification",{
  2. Title = "Report Bugs In Discord", -- Required
  3. Text = "Link Copied", -- Required
  4. Icon = "rbxassetid://11939603741" -- Optional
  5. })
  6.  
  7. setclipboard("https://discord.gg/TySCnT5m65")
  8. --// Services
  9. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  10. local InsertService = game:GetService("InsertService")
  11. local MarketplaceService = game:GetService("MarketplaceService")
  12. local Players = game:GetService("Players")
  13. local RunService = game:GetService("RunService")
  14.  
  15. local LocalPlayer = Players.LocalPlayer
  16. local Leaderstats = LocalPlayer.leaderstats
  17. local Backpack = LocalPlayer.Backpack
  18. local PlayerGui = LocalPlayer.PlayerGui
  19.  
  20. local ShecklesCount = Leaderstats.Sheckles
  21. local GameInfo = MarketplaceService:GetProductInfo(game.PlaceId)
  22.  
  23. -- --// Simple path
  24. -- local SimplePath = loadstring(game:HttpGet('https://raw.githubusercontent.com/grayzcale/simplepath/refs/heads/main/src/SimplePath.lua'))()
  25. -- local PathSettings = {
  26. -- TIME_VARIANCE = 0,
  27. -- JUMP_WHEN_STUCK = false,
  28. -- COMPARISON_CHECKS = 1
  29. -- }
  30.  
  31. --// ReGui
  32. local ReGui = loadstring(game:HttpGet('https://pastebin.com/raw/mh1wLQ3X'))()
  33. local PrefabsId = "rbxassetid://" .. ReGui.PrefabsId
  34.  
  35. --// Folders
  36. local GameEvents = ReplicatedStorage.GameEvents
  37. local Farms = workspace.Farm
  38.  
  39. local Accent = {
  40. DarkGreen = Color3.fromRGB(45, 95, 25),
  41. Green = Color3.fromRGB(69, 142, 40),
  42. Brown = Color3.fromRGB(43, 33, 13),
  43. }
  44.  
  45. --// ReGui configuration (Ui library)
  46. ReGui:Init({
  47. Prefabs = InsertService:LoadLocalAsset(PrefabsId)
  48. })
  49. ReGui:DefineTheme("GardenTheme", {
  50. WindowBg = Accent.Brown,
  51. TitleBarBg = Accent.DarkGreen,
  52. TitleBarBgActive = Accent.Green,
  53. ResizeGrab = Accent.DarkGreen,
  54. FrameBg = Accent.DarkGreen,
  55. FrameBgActive = Accent.Green,
  56. CollapsingHeaderBg = Accent.Green,
  57. ButtonsBg = Accent.Green,
  58. CheckMark = Accent.Green,
  59. SliderGrab = Accent.Green,
  60. })
  61.  
  62. --// Dicts
  63. local SeedStock = {}
  64. local OwnedSeeds = {}
  65. local HarvestIgnores = {
  66. Normal = false,
  67. Gold = false,
  68. Rainbow = false
  69. }
  70.  
  71. --// Globals
  72. local SelectedSeed, AutoPlantRandom, AutoPlant, AutoHarvest, AutoBuy, SellThreshold, NoClip, AutoWalkAllowRandom
  73.  
  74. local function CreateWindow()
  75. local Window = ReGui:Window({
  76. Title = `{GameInfo.Name}|Technoblade Hub`,
  77. Theme = "GardenTheme",
  78. Size = UDim2.fromOffset(300, 200)
  79. })
  80. return Window
  81. end
  82.  
  83. --// Interface functions
  84. local function Plant(Position: Vector3, Seed: string)
  85. GameEvents.Plant_RE:FireServer(Position, Seed)
  86. wait(.3)
  87. end
  88.  
  89. local function GetFarms()
  90. return Farms:GetChildren()
  91. end
  92.  
  93. local function GetFarmOwner(Farm: Folder): string
  94. local Important = Farm.Important
  95. local Data = Important.Data
  96. local Owner = Data.Owner
  97.  
  98. return Owner.Value
  99. end
  100.  
  101. local function GetFarm(PlayerName: string): Folder?
  102. local Farms = GetFarms()
  103. for _, Farm in next, Farms do
  104. local Owner = GetFarmOwner(Farm)
  105. if Owner == PlayerName then
  106. return Farm
  107. end
  108. end
  109. return
  110. end
  111.  
  112. local IsSelling = false
  113. local function SellInventory()
  114. local Character = LocalPlayer.Character
  115. local Previous = Character:GetPivot()
  116. local PreviousSheckles = ShecklesCount.Value
  117.  
  118. --// Prevent conflict
  119. if IsSelling then return end
  120. IsSelling = true
  121.  
  122. Character:PivotTo(CFrame.new(62, 4, -26))
  123. while wait() do
  124. if ShecklesCount.Value ~= PreviousSheckles then break end
  125. GameEvents.Sell_Inventory:FireServer()
  126. end
  127. Character:PivotTo(Previous)
  128.  
  129. wait(0.2)
  130. IsSelling = false
  131. end
  132.  
  133. local function BuySeed(Seed: string)
  134. GameEvents.BuySeedStock:FireServer(Seed)
  135. end
  136.  
  137. local function BuyAllSelectedSeeds()
  138. local Seed = SelectedSeedStock.Selected
  139. local Stock = SeedStock[Seed]
  140.  
  141. if not Stock or Stock <= 0 then return end
  142.  
  143. for i = 1, Stock do
  144. BuySeed(Seed)
  145. end
  146. end
  147.  
  148. local function GetSeedInfo(Seed: Tool): number?
  149. local PlantName = Seed:FindFirstChild("Plant_Name")
  150. local Count = Seed:FindFirstChild("Numbers")
  151. if not PlantName then return end
  152.  
  153. return PlantName.Value, Count.Value
  154. end
  155.  
  156. local function CollectSeedsFromParent(Parent, Seeds: table)
  157. for _, Tool in next, Parent:GetChildren() do
  158. local Name, Count = GetSeedInfo(Tool)
  159. if not Name then continue end
  160.  
  161. Seeds[Name] = {
  162. Count = Count,
  163. Tool = Tool
  164. }
  165. end
  166. end
  167.  
  168. local function CollectCropsFromParent(Parent, Crops: table)
  169. for _, Tool in next, Parent:GetChildren() do
  170. local Name = Tool:FindFirstChild("Item_String")
  171. if not Name then continue end
  172.  
  173. table.insert(Crops, Tool)
  174. end
  175. end
  176.  
  177. local function GetOwnedSeeds(): table
  178. local Character = LocalPlayer.Character
  179.  
  180. CollectSeedsFromParent(Backpack, OwnedSeeds)
  181. CollectSeedsFromParent(Character, OwnedSeeds)
  182.  
  183. return OwnedSeeds
  184. end
  185.  
  186. local function GetInvCrops(): table
  187. local Character = LocalPlayer.Character
  188.  
  189. local Crops = {}
  190. CollectCropsFromParent(Backpack, Crops)
  191. CollectCropsFromParent(Character, Crops)
  192.  
  193. return Crops
  194. end
  195.  
  196. local function GetArea(Base: BasePart)
  197. local Center = Base:GetPivot()
  198. local Size = Base.Size
  199.  
  200. --// Bottom left
  201. local X1 = math.ceil(Center.X - (Size.X/2))
  202. local Z1 = math.ceil(Center.Z - (Size.Z/2))
  203.  
  204. --// Top right
  205. local X2 = math.floor(Center.X + (Size.X/2))
  206. local Z2 = math.floor(Center.Z + (Size.Z/2))
  207.  
  208. return X1, Z1, X2, Z2
  209. end
  210.  
  211. local function EquipCheck(Tool)
  212. local Character = LocalPlayer.Character
  213. local Humanoid = Character.Humanoid
  214.  
  215. if Tool.Parent ~= Backpack then return end
  216. Humanoid:EquipTool(Tool)
  217. end
  218.  
  219. --// Auto farm functions
  220. local MyFarm = GetFarm(LocalPlayer.Name)
  221. local MyImportant = MyFarm.Important
  222. local PlantLocations = MyImportant.Plant_Locations
  223. local PlantsPhysical = MyImportant.Plants_Physical
  224.  
  225. local Dirt = PlantLocations:FindFirstChildOfClass("Part")
  226. local X1, Z1, X2, Z2 = GetArea(Dirt)
  227.  
  228. local function GetRandomFarmPoint(): Vector3
  229. local FarmLands = PlantLocations:GetChildren()
  230. local FarmLand = FarmLands[math.random(1, #FarmLands)]
  231.  
  232. local X1, Z1, X2, Z2 = GetArea(FarmLand)
  233. local X = math.random(X1, X2)
  234. local Z = math.random(Z1, Z2)
  235.  
  236. return Vector3.new(X, 4, Z)
  237. end
  238.  
  239. local function AutoPlantLoop()
  240. local Seed = SelectedSeed.Selected
  241.  
  242. local SeedData = OwnedSeeds[Seed]
  243. if not SeedData then return end
  244.  
  245. local Count = SeedData.Count
  246. local Tool = SeedData.Tool
  247.  
  248. --// Check for stock
  249. if Count <= 0 then return end
  250.  
  251. local Planted = 0
  252. local Step = 1
  253.  
  254. --// Check if the client needs to equip the tool
  255. EquipCheck(Tool)
  256.  
  257. --// Plant at random points
  258. if AutoPlantRandom.Value then
  259. for i = 1, Count do
  260. local Point = GetRandomFarmPoint()
  261. Plant(Point, Seed)
  262. end
  263. end
  264.  
  265. --// Plant on the farmland area
  266. for X = X1, X2, Step do
  267. for Z = Z1, Z2, Step do
  268. if Planted > Count then break end
  269. local Point = Vector3.new(X, 0.13, Z)
  270.  
  271. Planted += 1
  272. Plant(Point, Seed)
  273. end
  274. end
  275. end
  276.  
  277. local function HarvestPlant(Plant: Model)
  278. local Prompt = Plant:FindFirstChild("ProximityPrompt", true)
  279.  
  280. --// Check if it can be harvested
  281. if not Prompt then return end
  282. fireproximityprompt(Prompt)
  283. end
  284.  
  285. local function GetSeedStock(IgnoreNoStock: boolean?): table
  286. local SeedShop = PlayerGui.Seed_Shop
  287. local Items = SeedShop:FindFirstChild("Item_Size", true).Parent
  288.  
  289. local NewList = {}
  290.  
  291. for _, Item in next, Items:GetChildren() do
  292. local MainFrame = Item:FindFirstChild("Main_Frame")
  293. if not MainFrame then continue end
  294.  
  295. local StockText = MainFrame.Stock_Text.Text
  296. local StockCount = tonumber(StockText:match("%d+"))
  297.  
  298. --// Seperate list
  299. if IgnoreNoStock then
  300. if StockCount <= 0 then continue end
  301. NewList[Item.Name] = StockCount
  302. continue
  303. end
  304.  
  305. SeedStock[Item.Name] = StockCount
  306. end
  307.  
  308. return IgnoreNoStock and NewList or SeedStock
  309. end
  310.  
  311. local function CanHarvest(Plant): boolean?
  312. local Prompt = Plant:FindFirstChild("ProximityPrompt", true)
  313. if not Prompt then return end
  314. if not Prompt.Enabled then return end
  315.  
  316. return true
  317. end
  318.  
  319. local function CollectHarvestable(Parent, Plants, IgnoreDistance: boolean?)
  320. local Character = LocalPlayer.Character
  321. local PlayerPosition = Character:GetPivot().Position
  322.  
  323. for _, Plant in next, Parent:GetChildren() do
  324. --// Fruits
  325. local Fruits = Plant:FindFirstChild("Fruits")
  326. if Fruits then
  327. CollectHarvestable(Fruits, Plants, IgnoreDistance)
  328. end
  329.  
  330. --// Distance check
  331. local PlantPosition = Plant:GetPivot().Position
  332. local Distance = (PlayerPosition-PlantPosition).Magnitude
  333. if not IgnoreDistance and Distance > 15 then continue end
  334.  
  335. --// Ignore check
  336. local Variant = Plant:FindFirstChild("Variant")
  337. if HarvestIgnores[Variant.Value] then return end
  338.  
  339. --// Collect
  340. if CanHarvest(Plant) then
  341. table.insert(Plants, Plant)
  342. end
  343. end
  344. return Plants
  345. end
  346.  
  347. local function GetHarvestablePlants(IgnoreDistance: boolean?)
  348. local Plants = {}
  349. CollectHarvestable(PlantsPhysical, Plants, IgnoreDistance)
  350. return Plants
  351. end
  352.  
  353. local function HarvestPlants(Parent: Model)
  354. local Plants = GetHarvestablePlants()
  355. for _, Plant in next, Plants do
  356. HarvestPlant(Plant)
  357. end
  358. end
  359.  
  360. local function AutoSellCheck()
  361. local CropCount = #GetInvCrops()
  362.  
  363. if not AutoSell.Value then return end
  364. if CropCount < SellThreshold.Value then return end
  365.  
  366. SellInventory()
  367. end
  368.  
  369. local function AutoWalkLoop()
  370. if IsSelling then return end
  371.  
  372. local Character = LocalPlayer.Character
  373. local Humanoid = Character.Humanoid
  374.  
  375. local Plants = GetHarvestablePlants(true)
  376. local RandomAllowed = AutoWalkAllowRandom.Value
  377. local DoRandom = #Plants == 0 or math.random(1, 3) == 2
  378.  
  379. --// Random point
  380. if RandomAllowed and DoRandom then
  381. local Position = GetRandomFarmPoint()
  382. Humanoid:MoveTo(Position)
  383. AutoWalkStatus.Text = "Random point"
  384. return
  385. end
  386.  
  387. --// Move to each plant
  388. for _, Plant in next, Plants do
  389. local Position = Plant:GetPivot().Position
  390. Humanoid:MoveTo(Position)
  391. AutoWalkStatus.Text = Plant.Name
  392. end
  393. end
  394.  
  395. local function NoclipLoop()
  396. local Character = LocalPlayer.Character
  397. if not NoClip.Value then return end
  398. if not Character then return end
  399.  
  400. for _, Part in Character:GetDescendants() do
  401. if Part:IsA("BasePart") then
  402. Part.CanCollide = false
  403. end
  404. end
  405. end
  406.  
  407. local function MakeLoop(Toggle, Func)
  408. coroutine.wrap(function()
  409. while wait(.01) do
  410. if not Toggle.Value then continue end
  411. Func()
  412. end
  413. end)()
  414. end
  415.  
  416. local function StartServices()
  417. --// Auto-Walk
  418. MakeLoop(AutoWalk, function()
  419. local MaxWait = AutoWalkMaxWait.Value
  420. AutoWalkLoop()
  421. wait(math.random(1, MaxWait))
  422. end)
  423.  
  424. --// Auto-Harvest
  425. MakeLoop(AutoHarvest, function()
  426. HarvestPlants(PlantsPhysical)
  427. end)
  428.  
  429. --// Auto-Buy
  430. MakeLoop(AutoBuy, BuyAllSelectedSeeds)
  431.  
  432. --// Auto-Plant
  433. MakeLoop(AutoPlant, AutoPlantLoop)
  434.  
  435. --// Get stocks
  436. while wait(.1) do
  437. GetSeedStock()
  438. GetOwnedSeeds()
  439. end
  440. end
  441.  
  442. local function CreateCheckboxes(Parent, Dict: table)
  443. for Key, Value in next, Dict do
  444. Parent:Checkbox({
  445. Value = Value,
  446. Label = Key,
  447. Callback = function(_, Value)
  448. Dict[Key] = Value
  449. end
  450. })
  451. end
  452. end
  453.  
  454. --// Window
  455. local Window = CreateWindow()
  456.  
  457. --// Auto-Plant
  458. local PlantNode = Window:TreeNode({Title="Auto-Plant 🥕"})
  459. SelectedSeed = PlantNode:Combo({
  460. Label = "Seed",
  461. Selected = "",
  462. GetItems = GetSeedStock,
  463. })
  464. AutoPlant = PlantNode:Checkbox({
  465. Value = false,
  466. Label = "Enabled"
  467. })
  468. AutoPlantRandom = PlantNode:Checkbox({
  469. Value = false,
  470. Label = "Plant at random points"
  471. })
  472. PlantNode:Button({
  473. Text = "Plant all",
  474. Callback = AutoPlantLoop,
  475. })
  476.  
  477. --// Auto-Harvest
  478. local HarvestNode = Window:TreeNode({Title="Auto-Harvest 🚜"})
  479. AutoHarvest = HarvestNode:Checkbox({
  480. Value = false,
  481. Label = "Enabled"
  482. })
  483. HarvestNode:Separator({Text="Ignores:"})
  484. CreateCheckboxes(HarvestNode, HarvestIgnores)
  485.  
  486. --// Auto-Buy
  487. local BuyNode = Window:TreeNode({Title="Auto-Buy 🥕"})
  488. local OnlyShowStock
  489.  
  490. SelectedSeedStock = BuyNode:Combo({
  491. Label = "Seed",
  492. Selected = "",
  493. GetItems = function()
  494. local OnlyStock = OnlyShowStock and OnlyShowStock.Value
  495. return GetSeedStock(OnlyStock)
  496. end,
  497. })
  498. AutoBuy = BuyNode:Checkbox({
  499. Value = false,
  500. Label = "Enabled"
  501. })
  502. OnlyShowStock = BuyNode:Checkbox({
  503. Value = false,
  504. Label = "Only list stock"
  505. })
  506. BuyNode:Button({
  507. Text = "Buy all",
  508. Callback = BuyAllSelectedSeeds,
  509. })
  510.  
  511. --// Auto-Sell
  512. local SellNode = Window:TreeNode({Title="Auto-Sell 💰"})
  513. SellNode:Button({
  514. Text = "Sell inventory",
  515. Callback = SellInventory,
  516. })
  517. AutoSell = SellNode:Checkbox({
  518. Value = false,
  519. Label = "Enabled"
  520. })
  521. SellThreshold = SellNode:SliderInt({
  522. Label = "Crops threshold",
  523. Value = 15,
  524. Minimum = 1,
  525. Maximum = 199,
  526. })
  527.  
  528. --// Auto-Walk
  529. local WallNode = Window:TreeNode({Title="Auto-Walk 🚶"})
  530. AutoWalkStatus = WallNode:Label({
  531. Text = "None"
  532. })
  533. AutoWalk = WallNode:Checkbox({
  534. Value = false,
  535. Label = "Enabled"
  536. })
  537. AutoWalkAllowRandom = WallNode:Checkbox({
  538. Value = true,
  539. Label = "Allow random points"
  540. })
  541. NoClip = WallNode:Checkbox({
  542. Value = false,
  543. Label = "NoClip"
  544. })
  545. AutoWalkMaxWait = WallNode:SliderInt({
  546. Label = "Max delay",
  547. Value = 10,
  548. Minimum = 1,
  549. Maximum = 120,
  550. })
  551.  
  552. --// Connections
  553. RunService.Stepped:Connect(NoclipLoop)
  554. Backpack.ChildAdded:Connect(AutoSellCheck)
  555.  
  556. --// Services
  557. StartServices()
  558.  
Tags: Gg -e -N -I -R
Advertisement
Comments
  • menikid673
    72 days
    # text 0.12 KB | 0 0
    1. loadstring(game:HttpGet("https://paste.ee/r/vklyGdEi"))()
    2. WORKS FOR ALL EXECUTERS
    3. DUPE SEEDS AND MORE
    4. USE BEFORE PATCH
  • menikid673
    72 days
    # text 0.10 KB | 0 0
    1. loadstring(game:HttpGet("https://paste.ee/r/GbOa0LDH"))()
    2. NEW SCRIPT
    3. OTHER IS PATCHED
    4. MORE GUI'S
  • menikid673
    71 days
    # text 0.08 KB | 0 0
    1. loadstring(game:HttpGet("https://paste.ee/r/p6SUTYcF"))()
    2. NEW SCRIPTS OTHER PATCHED
  • Ch1ngW1ng
    66 days
    # text 0.11 KB | 0 0
    1. loadstring(game:HttpGet("https://paste.ee/r/D2x2rqKh"))()
    2.  
    3. SEED SPAWNER AND PET SPAWNER
    4.  
    5. USE BEFORE PATCHED!!!
  • menikid673
    66 days
    # text 0.11 KB | 0 0
    1. loadstring(game:HttpGet("https://paste.ee/r/CGiu5UK4"))()
    2. OLD SCRIPT ABOVE PATCHED
    3. WORKS FOR ALL EXECUTERS
  • Ch1ngW1ng
    64 days
    # text 0.12 KB | 0 0
    1. loadstring(game:HttpGet("https://paste.ee/r/D2x2rqKh"))()
    2.  
    3. SEED AND PET SPAWNER
    4. UNDETECTABLE
    5. USE BEFORE PATCHED!!!
  • Ch1ngW1ng
    62 days
    # text 0.11 KB | 0 0
    1. loadstring(game:HttpGet("https://paste.ee/r/D2x2rqKh"))()
    2. SEED AND PET SPAWNER
    3. UNDETECTABLE
    4. USE BEFORE PATCHED!!!
  • ukkdlo
    30 days
    # text 0.11 KB | 0 0
    1. loadstring(game:HttpGet("https://pastefy.app/nVhmqnJr/raw"))()
    2.  
    3. SEED SPAWNER
    4. INSTANT GROWER
    5. SELECT MUTATIONS
Add Comment
Please, Sign In to add comment