Advertisement
psxscripter778

Bgsi pet spawner

Apr 21st, 2025
333
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.66 KB | None | 0 0
  1. -- Full GUI Script with 1-Minute Loading Screen and Minimize Toggle
  2.  
  3. local player = game:GetService("Players").LocalPlayer
  4. local gui = Instance.new("ScreenGui", player:WaitForChild("PlayerGui"))
  5. gui.Name = "PetSpawnerWithLoading"
  6. gui.ResetOnSpawn = false
  7.  
  8. -- Loading Screen
  9. local loadingFrame = Instance.new("Frame", gui)
  10. loadingFrame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  11. loadingFrame.Size = UDim2.new(1, 0, 1, 0)
  12. loadingFrame.Position = UDim2.new(0, 0, 0, 0)
  13. loadingFrame.ZIndex = 10
  14.  
  15. -- "Script Loading" Text
  16. local loadingText = Instance.new("TextLabel", loadingFrame)
  17. loadingText.Text = "Script Loading"
  18. loadingText.Font = Enum.Font.GothamBold
  19. loadingText.TextSize = 28
  20. loadingText.TextColor3 = Color3.fromRGB(255, 255, 255)
  21. loadingText.BackgroundTransparency = 1
  22. loadingText.Size = UDim2.new(1, 0, 0, 50)
  23. loadingText.Position = UDim2.new(0, 0, 0.3, 0)
  24. loadingText.ZIndex = 11
  25.  
  26. -- Loading Bar Background
  27. local barBackground = Instance.new("Frame", loadingFrame)
  28. barBackground.Size = UDim2.new(0.4, 0, 0, 20)
  29. barBackground.Position = UDim2.new(0.3, 0, 0.45, 0)
  30. barBackground.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
  31. barBackground.ZIndex = 11
  32. Instance.new("UICorner", barBackground).CornerRadius = UDim.new(0, 8)
  33.  
  34. -- Loading Bar Fill
  35. local barFill = Instance.new("Frame", barBackground)
  36. barFill.BackgroundColor3 = Color3.fromRGB(0, 170, 255)
  37. barFill.Size = UDim2.new(0, 0, 1, 0)
  38. barFill.ZIndex = 12
  39. Instance.new("UICorner", barFill).CornerRadius = UDim.new(0, 8)
  40.  
  41. -- Percentage Label
  42. local percentLabel = Instance.new("TextLabel", loadingFrame)
  43. percentLabel.Text = "0%"
  44. percentLabel.Font = Enum.Font.Gotham
  45. percentLabel.TextSize = 20
  46. percentLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  47. percentLabel.BackgroundTransparency = 1
  48. percentLabel.Size = UDim2.new(1, 0, 0, 30)
  49. percentLabel.Position = UDim2.new(0, 0, 0.5, 0)
  50. percentLabel.TextXAlignment = Enum.TextXAlignment.Center
  51. percentLabel.TextYAlignment = Enum.TextYAlignment.Center
  52. percentLabel.ZIndex = 11
  53.  
  54. -- Loading Animation (1 minute)
  55. task.spawn(function()
  56. for i = 0, 100 do
  57. percentLabel.Text = i .. "%"
  58. barFill.Size = UDim2.new(i/100, 0, 1, 0)
  59. wait(0.6) -- Adjusted to achieve 1 minute loading time
  60. end
  61. loadingFrame:Destroy()
  62.  
  63. -- Pet Spawner GUI Code
  64.  
  65. local mainFrame = Instance.new("Frame")
  66. mainFrame.Size = UDim2.new(0, 300, 0, 200)
  67. mainFrame.Position = UDim2.new(0.5, -150, 0.5, -100)
  68. mainFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  69. mainFrame.BorderSizePixel = 0
  70. mainFrame.BackgroundTransparency = 0.1
  71. mainFrame.Parent = gui
  72.  
  73. Instance.new("UICorner", mainFrame).CornerRadius = UDim.new(0, 12)
  74.  
  75. local title = Instance.new("TextLabel", mainFrame)
  76. title.Text = "Pet Spawner"
  77. title.Font = Enum.Font.GothamBold
  78. title.TextSize = 24
  79. title.TextColor3 = Color3.fromRGB(255, 255, 255)
  80. title.BackgroundTransparency = 1
  81. title.Size = UDim2.new(1, 0, 0, 50)
  82.  
  83. local petNameBox = Instance.new("TextBox", mainFrame)
  84. petNameBox.PlaceholderText = "Enter pet name"
  85. petNameBox.Text = ""
  86. petNameBox.Font = Enum.Font.Gotham
  87. petNameBox.TextSize = 18
  88. petNameBox.TextColor3 = Color3.fromRGB(255, 255, 255)
  89. petNameBox.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  90. petNameBox.Size = UDim2.new(0.9, 0, 0, 40)
  91. petNameBox.Position = UDim2.new(0.05, 0, 0.30, 0)
  92. Instance.new("UICorner", petNameBox).CornerRadius = UDim.new(0, 8)
  93.  
  94. local warningLabel = Instance.new("TextLabel", mainFrame)
  95. warningLabel.Text = "Not a valid pet."
  96. warningLabel.Font = Enum.Font.GothamBold
  97. warningLabel.TextSize = 14
  98. warningLabel.TextColor3 = Color3.fromRGB(255, 0, 0)
  99. warningLabel.BackgroundTransparency = 1
  100. warningLabel.Visible = false
  101. warningLabel.Position = UDim2.new(0.05, 0, 0.52, 0)
  102. warningLabel.Size = UDim2.new(0.9, 0, 0, 20)
  103.  
  104. local spawnButton = Instance.new("TextButton", mainFrame)
  105. spawnButton.Text = "Spawn Pet"
  106. spawnButton.Font = Enum.Font.GothamBold
  107. spawnButton.TextSize = 20
  108. spawnButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  109. spawnButton.BackgroundColor3 = Color3.fromRGB(70, 130, 180)
  110. spawnButton.Size = UDim2.new(0.9, 0, 0, 40)
  111. spawnButton.Position = UDim2.new(0.05, 0, 0.65, 0)
  112. Instance.new("UICorner", spawnButton).CornerRadius = UDim.new(0, 8)
  113.  
  114. -- Minimize Toggle Button
  115. local minimizeButton = Instance.new("TextButton", gui)
  116. minimizeButton.Text = "-"
  117. minimizeButton.Font = Enum.Font.GothamBold
  118. minimizeButton.TextSize = 28
  119. minimizeButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  120. minimizeButton.BackgroundColor3 = Color3.fromRGB(100, 100, 100)
  121. minimizeButton.Size = UDim2.new(0, 30, 0, 30)
  122. minimizeButton.Position = UDim2.new(0.95, -35, 0.05, 0)
  123. minimizeButton.ZIndex = 12
  124. Instance.new("UICorner", minimizeButton).CornerRadius = UDim.new(0, 6)
  125.  
  126. -- Minimize Toggle Functionality
  127. local isMinimized = false
  128. local function toggleMinimize()
  129. isMinimized = not isMinimized
  130. mainFrame.Visible = not isMinimized
  131. end
  132.  
  133. minimizeButton.MouseButton1Click:Connect(toggleMinimize)
  134.  
  135. -- Draggable Pet Spawner GUI
  136. local UIS = game:GetService("UserInputService")
  137. local dragging, dragInput, mousePos, framePos
  138.  
  139. local function updateInput(input)
  140. local delta = input.Position - mousePos
  141. mainFrame.Position = UDim2.new(
  142. framePos.X.Scale, framePos.X.Offset + delta.X,
  143. framePos.Y.Scale, framePos.Y.Offset + delta.Y
  144. )
  145. end
  146.  
  147. mainFrame.InputBegan:Connect(function(input)
  148. if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  149. dragging = true
  150. mousePos = input.Position
  151. framePos = mainFrame.Position
  152.  
  153. input.Changed:Connect(function()
  154. if input.UserInputState == Enum.UserInputState.End then
  155. dragging = false
  156. end
  157. end)
  158. end
  159. end)
  160.  
  161. mainFrame.InputChanged:Connect(function(input)
  162. if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
  163. dragInput = input
  164. end
  165. end)
  166.  
  167. UIS.InputChanged:Connect(function(input)
  168. if input == dragInput and dragging then
  169. updateInput(input)
  170. end
  171. end)
  172.  
  173. -- Spawn Pet Logic
  174. spawnButton.MouseButton1Click:Connect(function()
  175. local input = petNameBox.Text:lower():gsub("%s+", "")
  176. warningLabel.Visible = false
  177.  
  178. if input == "nullvoid" then
  179. local args = {
  180. [1] = "EquipPet",
  181. [2] = "20d09af5-5cb5-44cf-919d-357862f57779"
  182. }
  183. game:GetService("ReplicatedStorage").Shared.Framework.Network.Remote.Event:FireServer(unpack(args))
  184. elseif input == "rainbowshock" then
  185. local args = {
  186. [1] = "EquipPet",
  187. [2] = "57084d08-63c6-47e2-8ab3-e38f9f32865c"
  188. }
  189. game:GetService("ReplicatedStorage").Shared.Framework.Network.Remote.Event:FireServer(unpack(args))
  190. else
  191. warningLabel.Visible = true
  192. end
  193. end)
  194. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement