Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Grow A Garden Script by JayRBLX Scripts
- -- Load Rayfield UI Library
- local Rayfield = loadstring(game:HttpGet('https://sirius.menu/rayfield'))()
- -- Create the main window
- local Window = Rayfield:CreateWindow({
- Name = "Grow A Garden - JayRBLX Scripts",
- LoadingTitle = "Rayfield Interface Suite",
- LoadingSubtitle = "by Sirius",
- ConfigurationSaving = {
- Enabled = true,
- FolderName = nil,
- FileName = "GrowAGardenHub"
- },
- Discord = {
- Enabled = false,
- Invite = "noinvitelink",
- RememberJoins = true
- },
- KeySystem = false
- })
- -- Home Tab
- local HomeTab = Window:CreateTab("Home", 4483362458)
- local HomeSection = HomeTab:CreateSection("Welcome Message")
- HomeTab:CreateLabel("Welcome to Grow A Garden Script!")
- HomeTab:CreateLabel("Spawn your favorite pets visually on the client-side.")
- HomeTab:CreateLabel("Others will see your holding animation but no pet model.")
- HomeTab:CreateLabel("By JayRBLX Scripts - Enjoy gardening!")
- -- Spawn Pets Tab
- local PetsTab = Window:CreateTab("Spawn Pets")
- local PetsSection = PetsTab:CreateSection("Pet Spawner")
- local SelectedPet = ""
- local PetInput = PetsTab:CreateInput({
- Name = "Enter Pet Name",
- PlaceholderText = "e.g., Bunny, Dog, Capybara, Red Fox",
- RemoveTextAfterFocusLost = false,
- Callback = function(Text)
- SelectedPet = Text
- end,
- })
- local SpawnButton = PetsTab:CreateButton({
- Name = "Spawn Pet (Client-Side Visual)",
- Callback = function()
- if SelectedPet == "" then
- Rayfield:Notify({
- Title = "Error",
- Content = "Please enter a pet name!",
- Duration = 3,
- Image = 4483362458,
- })
- return
- end
- local Players = game:GetService("Players")
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local player = Players.LocalPlayer
- local char = player.Character or player.CharacterAdded:Wait()
- local humanoidRoot = char:WaitForChild("HumanoidRootPart")
- -- Assume pets are stored in ReplicatedStorage.Pets (common in Roblox pet games)
- local petsFolder = ReplicatedStorage:FindFirstChild("Pets")
- if not petsFolder then
- -- Fallback: Try other common locations like ReplicatedStorage.PetModels
- petsFolder = ReplicatedStorage:FindFirstChild("PetModels") or ReplicatedStorage:FindFirstChild("Animals")
- if not petsFolder then
- Rayfield:Notify({
- Title = "Error",
- Content = "Could not find pets folder in ReplicatedStorage!",
- Duration = 5,
- Image = 4483362458,
- })
- return
- end
- end
- local petModel = petsFolder:FindFirstChild(SelectedPet)
- if not petModel or not petModel:IsA("Model") then
- Rayfield:Notify({
- Title = "Error",
- Content = SelectedPet .. " model not found! Check spelling or availability.",
- Duration = 5,
- Image = 4483362458,
- })
- return
- end
- -- Clone the pet model locally
- local newPet = petModel:Clone()
- newPet.Parent = workspace
- -- Attach to player (weld to HumanoidRootPart for following)
- local petRoot = newPet.PrimaryPart or newPet:FindFirstChild("HumanoidRootPart") or newPet:FindFirstChild("Torso")
- if petRoot then
- local weld = Instance.new("WeldConstraint")
- weld.Part0 = humanoidRoot
- weld.Part1 = petRoot
- weld.Parent = newPet
- -- Offset position (e.g., to the side)
- petRoot.CFrame = humanoidRoot.CFrame * CFrame.new(3, 0, 0) * CFrame.Angles(0, math.rad(90), 0)
- else
- -- Fallback: Use BodyPosition to follow player
- local bodyPos = Instance.new("BodyPosition")
- bodyPos.MaxForce = Vector3.new(4000, 4000, 4000)
- bodyPos.Position = humanoidRoot.Position + Vector3.new(3, 0, 0)
- bodyPos.Parent = newPet.PrimaryPart or newPet:FindFirstChildOfClass("Part")
- -- Update position loop (client-side)
- spawn(function()
- while newPet.Parent and char.Parent do
- bodyPos.Position = humanoidRoot.Position + humanoidRoot.CFrame.LookVector * 3
- wait(0.1)
- end
- end)
- end
- -- Notify success
- Rayfield:Notify({
- Title = "Success",
- Content = SelectedPet .. " spawned visually (client-side only)!",
- Duration = 3,
- Image = 4483362458,
- })
- end,
- })
- local ClearButton = PetsTab:CreateButton({
- Name = "Clear Input",
- Callback = function()
- SelectedPet = ""
- PetInput:Set(" ")
- end,
- })
- PetsTab:CreateLabel("Note: Use exact pet names from the game (e.g., Bunny, Capybara, Red Fox).")
- PetsTab:CreateLabel("This is purely visual - no server changes or inventory updates.")
- -- Optional: Add a list of example pets as labels
- PetsTab:CreateLabel("Example Pets: Bunny, Dog, Golden Lab, Cat, Pig, Capybara, Scarlet Macaw, Red Fox, Tiger, Lion")
Advertisement
Add Comment
Please, Sign In to add comment