Advertisement
Zescantt

Grow A Garden Script

Apr 19th, 2025
996
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.17 KB | None | 0 0
  1. -- Destroy any previous GUI
  2. if game.CoreGui:FindFirstChild("GrowAGarden") then
  3. game.CoreGui.GrowAGarden:Destroy()
  4. end
  5.  
  6. -- Create ScreenGui
  7. local gui = Instance.new("ScreenGui")
  8. gui.Name = "GrowAGarden"
  9. gui.ResetOnSpawn = false
  10. gui.Parent = game.CoreGui
  11.  
  12. -- Create Main Frame
  13. local Frame = Instance.new("Frame")
  14. Frame.Size = UDim2.new(0, 400, 0, 300)
  15. Frame.Position = UDim2.new(0.5, -200, 0.5, -150)
  16. Frame.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  17. Frame.Active = true
  18. Frame.Draggable = true
  19. Frame.Parent = gui
  20.  
  21. local frameCorner = Instance.new("UICorner", Frame)
  22. frameCorner.CornerRadius = UDim.new(0, 12)
  23.  
  24. -- Header Label
  25. local TextLabel = Instance.new("TextLabel")
  26. TextLabel.Size = UDim2.new(1, 0, 0, 40)
  27. TextLabel.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
  28. TextLabel.Text = "Grow A Garden"
  29. TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  30. TextLabel.Font = Enum.Font.GothamBold
  31. TextLabel.TextSize = 20
  32. TextLabel.Parent = Frame
  33.  
  34. local labelCorner = Instance.new("UICorner", TextLabel)
  35. labelCorner.CornerRadius = UDim.new(0, 12)
  36.  
  37. -- Keybind Toggle (RightControl)
  38. local guiVisible = true
  39. game:GetService("UserInputService").InputBegan:Connect(function(input, gameProcessed)
  40. if gameProcessed then return end
  41. if input.KeyCode == Enum.KeyCode.RightControl then
  42. guiVisible = not guiVisible
  43. gui.Enabled = guiVisible
  44. end
  45. end)
  46.  
  47. -- Tabs Frame
  48. local TabsFrame = Instance.new("Frame")
  49. TabsFrame.Size = UDim2.new(0, 100, 1, -40)
  50. TabsFrame.Position = UDim2.new(0, 0, 0, 40)
  51. TabsFrame.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  52. TabsFrame.Parent = Frame
  53.  
  54. local tabsCorner = Instance.new("UICorner", TabsFrame)
  55. tabsCorner.CornerRadius = UDim.new(0, 12)
  56.  
  57. -- Tab Buttons
  58. local mainTabButton = Instance.new("TextButton")
  59. mainTabButton.Size = UDim2.new(1, 0, 0, 30)
  60. mainTabButton.Position = UDim2.new(0, 0, 0, 10)
  61. mainTabButton.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
  62. mainTabButton.Text = "Main"
  63. mainTabButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  64. mainTabButton.Font = Enum.Font.Gotham
  65. mainTabButton.TextSize = 14
  66. mainTabButton.Parent = TabsFrame
  67.  
  68. Instance.new("UICorner", mainTabButton).CornerRadius = UDim.new(0, 12)
  69.  
  70. local miscTabButton = mainTabButton:Clone()
  71. miscTabButton.Text = "Misc"
  72. miscTabButton.Position = UDim2.new(0, 0, 0, 50)
  73. miscTabButton.Parent = TabsFrame
  74.  
  75. -- Main Tab Content
  76. local MainFrame = Instance.new("Frame")
  77. MainFrame.Size = UDim2.new(1, -110, 1, -50)
  78. MainFrame.Position = UDim2.new(0, 110, 0, 50)
  79. MainFrame.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  80. MainFrame.Visible = true
  81. MainFrame.Parent = Frame
  82.  
  83. Instance.new("UICorner", MainFrame).CornerRadius = UDim.new(0, 12)
  84.  
  85. -- Scrollable List inside Main Tab
  86. local ScrollingFrameMain = Instance.new("ScrollingFrame")
  87. ScrollingFrameMain.Size = UDim2.new(1, -10, 1, -10)
  88. ScrollingFrameMain.Position = UDim2.new(0, 5, 0, 5)
  89. ScrollingFrameMain.CanvasSize = UDim2.new(0, 0, 0, 0)
  90. ScrollingFrameMain.ScrollBarThickness = 6
  91. ScrollingFrameMain.BackgroundTransparency = 1
  92. ScrollingFrameMain.Parent = MainFrame
  93.  
  94. Instance.new("UICorner", ScrollingFrameMain).CornerRadius = UDim.new(0, 12)
  95.  
  96. -- Layout for scroll content
  97. local layout = Instance.new("UIListLayout", ScrollingFrameMain)
  98. layout.Padding = UDim.new(0, 6)
  99. layout.SortOrder = Enum.SortOrder.LayoutOrder
  100.  
  101. -- TP Tool Button (only in Main tab)
  102. local tpButton = Instance.new("TextButton")
  103. tpButton.Size = UDim2.new(1, -10, 0, 40)
  104. tpButton.BackgroundColor3 = Color3.fromRGB(100, 100, 100)
  105. tpButton.Text = "TP Tool"
  106. tpButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  107. tpButton.Font = Enum.Font.Gotham
  108. tpButton.TextSize = 16
  109. tpButton.Parent = ScrollingFrameMain
  110.  
  111. Instance.new("UICorner", tpButton).CornerRadius = UDim.new(0, 12)
  112.  
  113. tpButton.MouseButton1Click:Connect(function()
  114. -- Remove existing TP Tool if present
  115. local backpack = game.Players.LocalPlayer:FindFirstChild("Backpack")
  116. if backpack then
  117. local existingTool = backpack:FindFirstChild("TP Tool")
  118. if existingTool then
  119. existingTool:Destroy()
  120. end
  121. end
  122.  
  123. -- Create new TP Tool
  124. local tool = Instance.new("Tool")
  125. tool.Name = "TP Tool"
  126. tool.RequiresHandle = false
  127.  
  128. -- Define the teleportation behavior
  129. tool.Activated:Connect(function()
  130. local player = game.Players.LocalPlayer
  131. local mouse = player:GetMouse()
  132. local targetPosition = mouse.Hit + Vector3.new(0, 2.5, 0)
  133. player.Character.HumanoidRootPart.CFrame = CFrame.new(targetPosition.X, targetPosition.Y, targetPosition.Z)
  134. end)
  135.  
  136. -- Add the tool to the player's backpack
  137. tool.Parent = backpack
  138. end)
  139.  
  140. -- Misc Tab Content (clean)
  141. local MiscFrame = Instance.new("Frame")
  142. MiscFrame.Size = UDim2.new(1, -110, 1, -50)
  143. MiscFrame.Position = UDim2.new(0, 110, 0, 50)
  144. MiscFrame.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  145. MiscFrame.Visible = false
  146. MiscFrame.Parent = Frame
  147.  
  148. Instance.new("UICorner", MiscFrame).CornerRadius = UDim.new(0, 12)
  149.  
  150. -- Tab switching logic
  151. mainTabButton.MouseButton1Click:Connect(function()
  152. MainFrame.Visible = true
  153. MiscFrame.Visible = false
  154. end)
  155.  
  156. miscTabButton.MouseButton1Click:Connect(function()
  157. MainFrame.Visible = false
  158. MiscFrame.Visible = true
  159. end)
  160.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement