Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Full GUI Script with 1-Minute Loading Screen and Minimize Toggle
- local player = game:GetService("Players").LocalPlayer
- local gui = Instance.new("ScreenGui", player:WaitForChild("PlayerGui"))
- gui.Name = "PetSpawnerWithLoading"
- gui.ResetOnSpawn = false
- -- Loading Screen
- local loadingFrame = Instance.new("Frame", gui)
- loadingFrame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- loadingFrame.Size = UDim2.new(1, 0, 1, 0)
- loadingFrame.Position = UDim2.new(0, 0, 0, 0)
- loadingFrame.ZIndex = 10
- -- "Script Loading" Text
- local loadingText = Instance.new("TextLabel", loadingFrame)
- loadingText.Text = "Script Loading"
- loadingText.Font = Enum.Font.GothamBold
- loadingText.TextSize = 28
- loadingText.TextColor3 = Color3.fromRGB(255, 255, 255)
- loadingText.BackgroundTransparency = 1
- loadingText.Size = UDim2.new(1, 0, 0, 50)
- loadingText.Position = UDim2.new(0, 0, 0.3, 0)
- loadingText.ZIndex = 11
- -- Loading Bar Background
- local barBackground = Instance.new("Frame", loadingFrame)
- barBackground.Size = UDim2.new(0.4, 0, 0, 20)
- barBackground.Position = UDim2.new(0.3, 0, 0.45, 0)
- barBackground.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
- barBackground.ZIndex = 11
- Instance.new("UICorner", barBackground).CornerRadius = UDim.new(0, 8)
- -- Loading Bar Fill
- local barFill = Instance.new("Frame", barBackground)
- barFill.BackgroundColor3 = Color3.fromRGB(0, 170, 255)
- barFill.Size = UDim2.new(0, 0, 1, 0)
- barFill.ZIndex = 12
- Instance.new("UICorner", barFill).CornerRadius = UDim.new(0, 8)
- -- Percentage Label
- local percentLabel = Instance.new("TextLabel", loadingFrame)
- percentLabel.Text = "0%"
- percentLabel.Font = Enum.Font.Gotham
- percentLabel.TextSize = 20
- percentLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- percentLabel.BackgroundTransparency = 1
- percentLabel.Size = UDim2.new(1, 0, 0, 30)
- percentLabel.Position = UDim2.new(0, 0, 0.5, 0)
- percentLabel.TextXAlignment = Enum.TextXAlignment.Center
- percentLabel.TextYAlignment = Enum.TextYAlignment.Center
- percentLabel.ZIndex = 11
- -- Loading Animation (1 minute)
- task.spawn(function()
- for i = 0, 100 do
- percentLabel.Text = i .. "%"
- barFill.Size = UDim2.new(i/100, 0, 1, 0)
- wait(0.6) -- Adjusted to achieve 1 minute loading time
- end
- loadingFrame:Destroy()
- -- Pet Spawner GUI Code
- local mainFrame = Instance.new("Frame")
- mainFrame.Size = UDim2.new(0, 300, 0, 200)
- mainFrame.Position = UDim2.new(0.5, -150, 0.5, -100)
- mainFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- mainFrame.BorderSizePixel = 0
- mainFrame.BackgroundTransparency = 0.1
- mainFrame.Parent = gui
- Instance.new("UICorner", mainFrame).CornerRadius = UDim.new(0, 12)
- local title = Instance.new("TextLabel", mainFrame)
- title.Text = "Pet Spawner"
- title.Font = Enum.Font.GothamBold
- title.TextSize = 24
- title.TextColor3 = Color3.fromRGB(255, 255, 255)
- title.BackgroundTransparency = 1
- title.Size = UDim2.new(1, 0, 0, 50)
- local petNameBox = Instance.new("TextBox", mainFrame)
- petNameBox.PlaceholderText = "Enter pet name"
- petNameBox.Text = ""
- petNameBox.Font = Enum.Font.Gotham
- petNameBox.TextSize = 18
- petNameBox.TextColor3 = Color3.fromRGB(255, 255, 255)
- petNameBox.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
- petNameBox.Size = UDim2.new(0.9, 0, 0, 40)
- petNameBox.Position = UDim2.new(0.05, 0, 0.30, 0)
- Instance.new("UICorner", petNameBox).CornerRadius = UDim.new(0, 8)
- local warningLabel = Instance.new("TextLabel", mainFrame)
- warningLabel.Text = "Not a valid pet."
- warningLabel.Font = Enum.Font.GothamBold
- warningLabel.TextSize = 14
- warningLabel.TextColor3 = Color3.fromRGB(255, 0, 0)
- warningLabel.BackgroundTransparency = 1
- warningLabel.Visible = false
- warningLabel.Position = UDim2.new(0.05, 0, 0.52, 0)
- warningLabel.Size = UDim2.new(0.9, 0, 0, 20)
- local spawnButton = Instance.new("TextButton", mainFrame)
- spawnButton.Text = "Spawn Pet"
- spawnButton.Font = Enum.Font.GothamBold
- spawnButton.TextSize = 20
- spawnButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- spawnButton.BackgroundColor3 = Color3.fromRGB(70, 130, 180)
- spawnButton.Size = UDim2.new(0.9, 0, 0, 40)
- spawnButton.Position = UDim2.new(0.05, 0, 0.65, 0)
- Instance.new("UICorner", spawnButton).CornerRadius = UDim.new(0, 8)
- -- Minimize Toggle Button
- local minimizeButton = Instance.new("TextButton", gui)
- minimizeButton.Text = "-"
- minimizeButton.Font = Enum.Font.GothamBold
- minimizeButton.TextSize = 28
- minimizeButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- minimizeButton.BackgroundColor3 = Color3.fromRGB(100, 100, 100)
- minimizeButton.Size = UDim2.new(0, 30, 0, 30)
- minimizeButton.Position = UDim2.new(0.95, -35, 0.05, 0)
- minimizeButton.ZIndex = 12
- Instance.new("UICorner", minimizeButton).CornerRadius = UDim.new(0, 6)
- -- Minimize Toggle Functionality
- local isMinimized = false
- local function toggleMinimize()
- isMinimized = not isMinimized
- mainFrame.Visible = not isMinimized
- end
- minimizeButton.MouseButton1Click:Connect(toggleMinimize)
- -- Draggable Pet Spawner GUI
- local UIS = game:GetService("UserInputService")
- local dragging, dragInput, mousePos, framePos
- local function updateInput(input)
- local delta = input.Position - mousePos
- mainFrame.Position = UDim2.new(
- framePos.X.Scale, framePos.X.Offset + delta.X,
- framePos.Y.Scale, framePos.Y.Offset + delta.Y
- )
- end
- mainFrame.InputBegan:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
- dragging = true
- mousePos = input.Position
- framePos = mainFrame.Position
- input.Changed:Connect(function()
- if input.UserInputState == Enum.UserInputState.End then
- dragging = false
- end
- end)
- end
- end)
- mainFrame.InputChanged:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
- dragInput = input
- end
- end)
- UIS.InputChanged:Connect(function(input)
- if input == dragInput and dragging then
- updateInput(input)
- end
- end)
- -- Spawn Pet Logic
- spawnButton.MouseButton1Click:Connect(function()
- local input = petNameBox.Text:lower():gsub("%s+", "")
- warningLabel.Visible = false
- if input == "nullvoid" then
- local args = {
- [1] = "EquipPet",
- [2] = "20d09af5-5cb5-44cf-919d-357862f57779"
- }
- game:GetService("ReplicatedStorage").Shared.Framework.Network.Remote.Event:FireServer(unpack(args))
- elseif input == "rainbowshock" then
- local args = {
- [1] = "EquipPet",
- [2] = "57084d08-63c6-47e2-8ab3-e38f9f32865c"
- }
- game:GetService("ReplicatedStorage").Shared.Framework.Network.Remote.Event:FireServer(unpack(args))
- else
- warningLabel.Visible = true
- end
- end)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement