local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local StarterGui = game:GetService("StarterGui") local GuiService = game:GetService("GuiService") local TweenService = game:GetService("TweenService") local player = Players.LocalPlayer local playerGui = player:WaitForChild("PlayerGui") local PickupItem = ReplicatedStorage.PlrMan.Items.PickupItem -- Available items local items = { "Chezburger", "RegenCoil", "SpeedCoil", "Windforce", "Armor", "Disruptor", "BattleArmor", "BreathOfFire", "Cake", "DominoCrown", "Magnet", "Pizza", "VikingHelmet", "Tnt", "Taco", "TeddyBloxpin" } -- Create main GUI local screenGui = Instance.new("ScreenGui") screenGui.Name = "ItemSpawnerGUI" screenGui.Parent = playerGui -- Main frame local mainFrame = Instance.new("Frame") mainFrame.Size = UDim2.new(0, 350, 0, 400) mainFrame.Position = UDim2.new(0.5, -175, 0.5, -200) mainFrame.BackgroundColor3 = Color3.fromRGB(45, 45, 45) mainFrame.BorderSizePixel = 0 mainFrame.Parent = screenGui -- Add corner radius local corner = Instance.new("UICorner") corner.CornerRadius = UDim.new(0, 12) corner.Parent = mainFrame -- Title local title = Instance.new("TextLabel") title.Size = UDim2.new(1, 0, 0, 50) title.Position = UDim2.new(0, 0, 0, 0) title.BackgroundColor3 = Color3.fromRGB(35, 35, 35) title.Text = "Item Spawner" title.TextColor3 = Color3.fromRGB(255, 255, 255) title.TextScaled = true title.Font = Enum.Font.GothamBold title.BorderSizePixel = 0 title.Parent = mainFrame local titleCorner = Instance.new("UICorner") titleCorner.CornerRadius = UDim.new(0, 12) titleCorner.Parent = title -- Item selection label local itemLabel = Instance.new("TextLabel") itemLabel.Size = UDim2.new(1, -20, 0, 30) itemLabel.Position = UDim2.new(0, 10, 0, 70) itemLabel.BackgroundTransparency = 1 itemLabel.Text = "Select Item:" itemLabel.TextColor3 = Color3.fromRGB(255, 255, 255) itemLabel.TextScaled = true itemLabel.Font = Enum.Font.Gotham itemLabel.TextXAlignment = Enum.TextXAlignment.Left itemLabel.Parent = mainFrame -- Dropdown frame local dropdownFrame = Instance.new("Frame") dropdownFrame.Size = UDim2.new(1, -20, 0, 40) dropdownFrame.Position = UDim2.new(0, 10, 0, 105) dropdownFrame.BackgroundColor3 = Color3.fromRGB(60, 60, 60) dropdownFrame.BorderSizePixel = 0 dropdownFrame.Parent = mainFrame local dropdownCorner = Instance.new("UICorner") dropdownCorner.CornerRadius = UDim.new(0, 8) dropdownCorner.Parent = dropdownFrame -- Dropdown button local dropdownButton = Instance.new("TextButton") dropdownButton.Size = UDim2.new(1, 0, 1, 0) dropdownButton.BackgroundTransparency = 1 dropdownButton.Text = "Chezburger ▼" dropdownButton.TextColor3 = Color3.fromRGB(255, 255, 255) dropdownButton.TextScaled = true dropdownButton.Font = Enum.Font.Gotham dropdownButton.Parent = dropdownFrame -- Dropdown list (positioned above other elements with high ZIndex) local dropdownList = Instance.new("ScrollingFrame") dropdownList.Size = UDim2.new(1, 0, 0, 200) dropdownList.Position = UDim2.new(0, 0, 1, 5) dropdownList.BackgroundColor3 = Color3.fromRGB(50, 50, 50) dropdownList.BorderSizePixel = 0 dropdownList.Visible = false dropdownList.ScrollBarThickness = 8 dropdownList.ZIndex = 10 -- High ZIndex to appear on top dropdownList.Parent = dropdownFrame local listCorner = Instance.new("UICorner") listCorner.CornerRadius = UDim.new(0, 8) listCorner.Parent = dropdownList local listLayout = Instance.new("UIListLayout") listLayout.SortOrder = Enum.SortOrder.LayoutOrder listLayout.Parent = dropdownList -- Current selected item local selectedItem = "Chezburger" -- Create dropdown items for i, itemName in ipairs(items) do local itemButton = Instance.new("TextButton") itemButton.Size = UDim2.new(1, 0, 0, 30) itemButton.BackgroundColor3 = Color3.fromRGB(50, 50, 50) itemButton.BorderSizePixel = 0 itemButton.Text = itemName itemButton.TextColor3 = Color3.fromRGB(255, 255, 255) itemButton.TextScaled = true itemButton.Font = Enum.Font.Gotham itemButton.ZIndex = 11 itemButton.Parent = dropdownList itemButton.MouseButton1Click:Connect(function() selectedItem = itemName dropdownButton.Text = itemName .. " ▼" dropdownList.Visible = false end) -- Hover effect itemButton.MouseEnter:Connect(function() itemButton.BackgroundColor3 = Color3.fromRGB(70, 70, 70) end) itemButton.MouseLeave:Connect(function() itemButton.BackgroundColor3 = Color3.fromRGB(50, 50, 50) end) end -- Update canvas size dropdownList.CanvasSize = UDim2.new(0, 0, 0, #items * 30) -- Dropdown toggle dropdownButton.MouseButton1Click:Connect(function() dropdownList.Visible = not dropdownList.Visible end) -- Quantity label local quantityLabel = Instance.new("TextLabel") quantityLabel.Size = UDim2.new(1, -20, 0, 30) quantityLabel.Position = UDim2.new(0, 10, 0, 170) quantityLabel.BackgroundTransparency = 1 quantityLabel.Text = "Quantity:" quantityLabel.TextColor3 = Color3.fromRGB(255, 255, 255) quantityLabel.TextScaled = true quantityLabel.Font = Enum.Font.Gotham quantityLabel.TextXAlignment = Enum.TextXAlignment.Left quantityLabel.Parent = mainFrame -- Quantity input local quantityInput = Instance.new("TextBox") quantityInput.Size = UDim2.new(1, -20, 0, 40) quantityInput.Position = UDim2.new(0, 10, 0, 205) quantityInput.BackgroundColor3 = Color3.fromRGB(60, 60, 60) quantityInput.BorderSizePixel = 0 quantityInput.Text = "500" quantityInput.TextColor3 = Color3.fromRGB(255, 255, 255) quantityInput.TextScaled = true quantityInput.Font = Enum.Font.Gotham quantityInput.PlaceholderText = "Enter quantity..." quantityInput.Parent = mainFrame local inputCorner = Instance.new("UICorner") inputCorner.CornerRadius = UDim.new(0, 8) inputCorner.Parent = quantityInput -- Spawn button local spawnButton = Instance.new("TextButton") spawnButton.Size = UDim2.new(1, -20, 0, 50) spawnButton.Position = UDim2.new(0, 10, 0, 260) spawnButton.BackgroundColor3 = Color3.fromRGB(0, 162, 255) spawnButton.BorderSizePixel = 0 spawnButton.Text = "Spawn Items" spawnButton.TextColor3 = Color3.fromRGB(255, 255, 255) spawnButton.TextScaled = true spawnButton.Font = Enum.Font.GothamBold spawnButton.Parent = mainFrame local buttonCorner = Instance.new("UICorner") buttonCorner.CornerRadius = UDim.new(0, 8) buttonCorner.Parent = spawnButton -- Status label local statusLabel = Instance.new("TextLabel") statusLabel.Size = UDim2.new(1, -20, 0, 30) statusLabel.Position = UDim2.new(0, 10, 0, 325) statusLabel.BackgroundTransparency = 1 statusLabel.Text = "Ready to spawn items" statusLabel.TextColor3 = Color3.fromRGB(200, 200, 200) statusLabel.TextScaled = true statusLabel.Font = Enum.Font.Gotham statusLabel.Parent = mainFrame -- Close button local closeButton = Instance.new("TextButton") closeButton.Size = UDim2.new(0, 30, 0, 30) closeButton.Position = UDim2.new(1, -40, 0, 10) closeButton.BackgroundColor3 = Color3.fromRGB(255, 85, 85) closeButton.BorderSizePixel = 0 closeButton.Text = "×" closeButton.TextColor3 = Color3.fromRGB(255, 255, 255) closeButton.TextScaled = true closeButton.Font = Enum.Font.GothamBold closeButton.Parent = mainFrame local closeCorner = Instance.new("UICorner") closeCorner.CornerRadius = UDim.new(0, 15) closeCorner.Parent = closeButton -- Spawn function local function spawnItems() local quantity = tonumber(quantityInput.Text) or 500 if quantity <= 0 then statusLabel.Text = "Invalid quantity!" statusLabel.TextColor3 = Color3.fromRGB(255, 85, 85) return end statusLabel.Text = "Spawning " .. quantity .. " " .. selectedItem .. "..." statusLabel.TextColor3 = Color3.fromRGB(255, 255, 0) -- Hide dropdown when spawning dropdownList.Visible = false -- Disable UI during spawning StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, false) GuiService.TouchControlsEnabled = false local batchSize = 10 local batchDelay = 0.03 for batch = 1, math.ceil(quantity / batchSize) do local startIndex = (batch - 1) * batchSize + 1 local endIndex = math.min(batch * batchSize, quantity) for i = startIndex, endIndex do PickupItem:FireServer(selectedItem) end if batch < math.ceil(quantity / batchSize) then task.wait(batchDelay) end end -- Re-enable UI StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, true) GuiService.TouchControlsEnabled = true statusLabel.Text = "Successfully spawned " .. quantity .. " items!" statusLabel.TextColor3 = Color3.fromRGB(85, 255, 85) end -- Button connections spawnButton.MouseButton1Click:Connect(spawnItems) closeButton.MouseButton1Click:Connect(function() screenGui:Destroy() end) -- Button hover effects spawnButton.MouseEnter:Connect(function() local tween = TweenService:Create(spawnButton, TweenInfo.new(0.2), {BackgroundColor3 = Color3.fromRGB(0, 140, 220)}) tween:Play() end) spawnButton.MouseLeave:Connect(function() local tween = TweenService:Create(spawnButton, TweenInfo.new(0.2), {BackgroundColor3 = Color3.fromRGB(0, 162, 255)}) tween:Play() end) closeButton.MouseEnter:Connect(function() local tween = TweenService:Create(closeButton, TweenInfo.new(0.2), {BackgroundColor3 = Color3.fromRGB(220, 60, 60)}) tween:Play() end) closeButton.MouseLeave:Connect(function() local tween = TweenService:Create(closeButton, TweenInfo.new(0.2), {BackgroundColor3 = Color3.fromRGB(255, 85, 85)}) tween:Play() end) -- Make frame draggable local dragging = false local dragStart = nil local startPos = nil mainFrame.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then dragging = true dragStart = input.Position startPos = mainFrame.Position end end) mainFrame.InputChanged:Connect(function(input) if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then local delta = input.Position - dragStart mainFrame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y) end end) mainFrame.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then dragging = false end end) print("Item Spawner GUI loaded successfully!")