Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Grow a Garden Raccoon Spawner Script with GUI
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local Players = game:GetService("Players")
- local LocalPlayer = Players.LocalPlayer
- local UserInterfaceService = game:GetService("UserInterfaceService")
- -- Create GUI
- local ScreenGui = Instance.new("ScreenGui")
- ScreenGui.Parent = LocalPlayer:WaitForChild("PlayerGui")
- ScreenGui.Name = "RaccoonSpawner"
- local Frame = Instance.new("Frame")
- Frame.Size = UDim2.new(0, 300, 0, 200)
- Frame.Position = UDim2.new(0.5, -150, 0.5, -100)
- Frame.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
- Frame.BorderSizePixel = 2
- Frame.Parent = ScreenGui
- local Title = Instance.new("TextLabel")
- Title.Size = UDim2.new(1, 0, 0, 30)
- Title.Position = UDim2.new(0, 0, 0, 0)
- Title.Text = "Raccoon Spawner"
- Title.TextColor3 = Color3.new(1, 1, 1)
- Title.BackgroundColor3 = Color3.new(0, 0, 0)
- Title.TextScaled = true
- Title.Parent = Frame
- local WeightLabel = Instance.new("TextLabel")
- WeightLabel.Size = UDim2.new(1, 0, 0, 30)
- WeightLabel.Position = UDim2.new(0, 0, 0, 40)
- WeightLabel.Text = "Weight (e.g., 45000):"
- WeightLabel.TextColor3 = Color3.new(1, 1, 1)
- WeightLabel.BackgroundColor3 = Color3.new(0.3, 0.3, 0.3)
- WeightLabel.TextScaled = true
- WeightLabel.Parent = Frame
- local WeightInput = Instance.new("TextBox")
- WeightInput.Size = UDim2.new(1, -20, 0, 30)
- WeightInput.Position = UDim2.new(0, 10, 0, 70)
- WeightInput.Text = "45000" -- Default weight (Raccoon’s hunger is 45,000 per fandom)
- WeightInput.TextColor3 = Color3.new(1, 1, 1)
- WeightInput.BackgroundColor3 = Color3.new(0.4, 0.4, 0.4)
- WeightInput.TextScaled = true
- WeightInput.Parent = Frame
- local AgeLabel = Instance.new("TextLabel")
- AgeLabel.Size = UDim2.new(1, 0, 0, 30)
- AgeLabel.Position = UDim2.new(0, 0, 0, 100)
- AgeLabel.Text = "Age (Baby/Adult):"
- AgeLabel.TextColor3 = Color3.new(1, 1, 1)
- AgeLabel.BackgroundColor3 = Color3.new(0.3, 0.3, 0.3)
- AgeLabel.TextScaled = true
- AgeLabel.Parent = Frame
- local AgeDropdown = Instance.new("TextButton")
- AgeDropdown.Size = UDim2.new(1, -20, 0, 30)
- AgeDropdown.Position = UDim2.new(0, 10, 0, 130)
- AgeDropdown.Text = "Baby" -- Default age
- AgeDropdown.TextColor3 = Color3.new(1, 1, 1)
- AgeDropdown.BackgroundColor3 = Color3.new(0.4, 0.4, 0.4)
- AgeDropdown.TextScaled = true
- AgeDropdown.Parent = Frame
- local SpawnButton = Instance.new("TextButton")
- SpawnButton.Size = UDim2.new(1, -20, 0, 30)
- SpawnButton.Position = UDim2.new(0, 10, 0, 160)
- SpawnButton.Text = "Spawn Raccoon"
- SpawnButton.TextColor3 = Color3.new(1, 1, 1)
- SpawnButton.BackgroundColor3 = Color3.new(0, 0.7, 0)
- SpawnButton.TextScaled = true
- SpawnButton.Parent = Frame
- -- Age dropdown logic (toggle between Baby and Adult)
- local ageOptions = {"Baby", "Adult"}
- local currentAgeIndex = 1
- AgeDropdown.MouseButton1Click:Connect(function()
- currentAgeIndex = currentAgeIndex % #ageOptions + 1
- AgeDropdown.Text = ageOptions[currentAgeIndex]
- end)
- -- Spawn function
- local function spawnRaccoon()
- local petRemote = ReplicatedStorage:FindFirstChild("GameEvents") and ReplicatedStorage.GameEvents:FindFirstChild("SpawnPet")
- if petRemote then
- local weight = tonumber(WeightInput.Text) or 45000
- local age = AgeDropdown.Text
- pcall(function()
- petRemote:FireServer("Raccoon", weight, age) -- Attempt to spawn with weight and age
- end)
- print("Attempted to spawn Raccoon with weight: " .. weight .. ", age: " .. age)
- else
- warn("Pet spawn remote not found. Check remote name using Dex Explorer.")
- end
- end
- -- Connect spawn button
- SpawnButton.MouseButton1Click:Connect(spawnRaccoon)
Advertisement
Add Comment
Please, Sign In to add comment