Guest User

Untitled

a guest
Jul 12th, 2025
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.60 KB | None | 0 0
  1. -- Grow a Garden Raccoon Spawner Script with GUI
  2. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  3. local Players = game:GetService("Players")
  4. local LocalPlayer = Players.LocalPlayer
  5. local UserInterfaceService = game:GetService("UserInterfaceService")
  6.  
  7. -- Create GUI
  8. local ScreenGui = Instance.new("ScreenGui")
  9. ScreenGui.Parent = LocalPlayer:WaitForChild("PlayerGui")
  10. ScreenGui.Name = "RaccoonSpawner"
  11.  
  12. local Frame = Instance.new("Frame")
  13. Frame.Size = UDim2.new(0, 300, 0, 200)
  14. Frame.Position = UDim2.new(0.5, -150, 0.5, -100)
  15. Frame.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
  16. Frame.BorderSizePixel = 2
  17. Frame.Parent = ScreenGui
  18.  
  19. local Title = Instance.new("TextLabel")
  20. Title.Size = UDim2.new(1, 0, 0, 30)
  21. Title.Position = UDim2.new(0, 0, 0, 0)
  22. Title.Text = "Raccoon Spawner"
  23. Title.TextColor3 = Color3.new(1, 1, 1)
  24. Title.BackgroundColor3 = Color3.new(0, 0, 0)
  25. Title.TextScaled = true
  26. Title.Parent = Frame
  27.  
  28. local WeightLabel = Instance.new("TextLabel")
  29. WeightLabel.Size = UDim2.new(1, 0, 0, 30)
  30. WeightLabel.Position = UDim2.new(0, 0, 0, 40)
  31. WeightLabel.Text = "Weight (e.g., 45000):"
  32. WeightLabel.TextColor3 = Color3.new(1, 1, 1)
  33. WeightLabel.BackgroundColor3 = Color3.new(0.3, 0.3, 0.3)
  34. WeightLabel.TextScaled = true
  35. WeightLabel.Parent = Frame
  36.  
  37. local WeightInput = Instance.new("TextBox")
  38. WeightInput.Size = UDim2.new(1, -20, 0, 30)
  39. WeightInput.Position = UDim2.new(0, 10, 0, 70)
  40. WeightInput.Text = "45000" -- Default weight (Raccoon’s hunger is 45,000 per fandom)
  41. WeightInput.TextColor3 = Color3.new(1, 1, 1)
  42. WeightInput.BackgroundColor3 = Color3.new(0.4, 0.4, 0.4)
  43. WeightInput.TextScaled = true
  44. WeightInput.Parent = Frame
  45.  
  46. local AgeLabel = Instance.new("TextLabel")
  47. AgeLabel.Size = UDim2.new(1, 0, 0, 30)
  48. AgeLabel.Position = UDim2.new(0, 0, 0, 100)
  49. AgeLabel.Text = "Age (Baby/Adult):"
  50. AgeLabel.TextColor3 = Color3.new(1, 1, 1)
  51. AgeLabel.BackgroundColor3 = Color3.new(0.3, 0.3, 0.3)
  52. AgeLabel.TextScaled = true
  53. AgeLabel.Parent = Frame
  54.  
  55. local AgeDropdown = Instance.new("TextButton")
  56. AgeDropdown.Size = UDim2.new(1, -20, 0, 30)
  57. AgeDropdown.Position = UDim2.new(0, 10, 0, 130)
  58. AgeDropdown.Text = "Baby" -- Default age
  59. AgeDropdown.TextColor3 = Color3.new(1, 1, 1)
  60. AgeDropdown.BackgroundColor3 = Color3.new(0.4, 0.4, 0.4)
  61. AgeDropdown.TextScaled = true
  62. AgeDropdown.Parent = Frame
  63.  
  64. local SpawnButton = Instance.new("TextButton")
  65. SpawnButton.Size = UDim2.new(1, -20, 0, 30)
  66. SpawnButton.Position = UDim2.new(0, 10, 0, 160)
  67. SpawnButton.Text = "Spawn Raccoon"
  68. SpawnButton.TextColor3 = Color3.new(1, 1, 1)
  69. SpawnButton.BackgroundColor3 = Color3.new(0, 0.7, 0)
  70. SpawnButton.TextScaled = true
  71. SpawnButton.Parent = Frame
  72.  
  73. -- Age dropdown logic (toggle between Baby and Adult)
  74. local ageOptions = {"Baby", "Adult"}
  75. local currentAgeIndex = 1
  76. AgeDropdown.MouseButton1Click:Connect(function()
  77. currentAgeIndex = currentAgeIndex % #ageOptions + 1
  78. AgeDropdown.Text = ageOptions[currentAgeIndex]
  79. end)
  80.  
  81. -- Spawn function
  82. local function spawnRaccoon()
  83. local petRemote = ReplicatedStorage:FindFirstChild("GameEvents") and ReplicatedStorage.GameEvents:FindFirstChild("SpawnPet")
  84. if petRemote then
  85. local weight = tonumber(WeightInput.Text) or 45000
  86. local age = AgeDropdown.Text
  87. pcall(function()
  88. petRemote:FireServer("Raccoon", weight, age) -- Attempt to spawn with weight and age
  89. end)
  90. print("Attempted to spawn Raccoon with weight: " .. weight .. ", age: " .. age)
  91. else
  92. warn("Pet spawn remote not found. Check remote name using Dex Explorer.")
  93. end
  94. end
  95.  
  96. -- Connect spawn button
  97. SpawnButton.MouseButton1Click:Connect(spawnRaccoon)
Advertisement
Add Comment
Please, Sign In to add comment