Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local spawner = Instance.new("ScreenGui")
- local Main = Instance.new("Frame")
- local ItemFrame = Instance.new("ScrollingFrame")
- local ItemSearch = Instance.new("TextBox")
- local SpawnButton = Instance.new("TextButton")
- local Title = Instance.new("TextLabel")
- spawner.Name = "spawner"
- spawner.Parent = game.CoreGui
- Main.Name = "Main"
- Main.Parent = spawner
- Main.BackgroundColor3 = Color3.new(0.701961, 0.701961, 0.701961)
- Main.BorderSizePixel = 0
- Main.Position = UDim2.new(0, 667, 0, 228)
- Main.Size = UDim2.new(0, 266, 0, 244)
- Main.Active = true
- Main.Draggable = true
- ItemFrame.Name = "ItemFrame"
- ItemFrame.Parent = Main
- ItemFrame.BackgroundColor3 = Color3.new(0.317647, 0.317647, 0.317647)
- ItemFrame.BorderSizePixel = 0
- ItemFrame.Position = UDim2.new(0, 56, 0, 76)
- ItemFrame.Size = UDim2.new(0, 155, 0, 92)
- ItemFrame.BottomImage = "rbxasset://textures/ui/Scroll/scroll-middle.png"
- ItemFrame.CanvasSize = UDim2.new(0, 0, 0, 0)
- ItemFrame.TopImage = "rbxasset://textures/ui/Scroll/scroll-middle.png"
- ItemSearch.Name = "ItemSearch"
- ItemSearch.Parent = Main
- ItemSearch.BackgroundColor3 = Color3.new(0.533333, 0.533333, 0.533333)
- ItemSearch.BorderSizePixel = 0
- ItemSearch.Position = UDim2.new(0, 56, 0, 53)
- ItemSearch.Size = UDim2.new(0, 155, 0, 25)
- ItemSearch.Font = Enum.Font.SourceSansBold
- ItemSearch.FontSize = Enum.FontSize.Size14
- ItemSearch.Text = "Search for an item!"
- ItemSearch.TextColor3 = Color3.new(1, 1, 1)
- ItemSearch.TextScaled = true
- ItemSearch.TextSize = 14
- ItemSearch.TextWrapped = true
- SpawnButton.Name = "SpawnButton"
- SpawnButton.Parent = Main
- SpawnButton.BackgroundColor3 = Color3.new(0.027451, 1, 0.482353)
- SpawnButton.BorderSizePixel = 0
- SpawnButton.Position = UDim2.new(0, 34, 0, 186)
- SpawnButton.Size = UDim2.new(0, 199, 0, 35)
- SpawnButton.ZIndex = 2
- SpawnButton.AutoButtonColor = false
- SpawnButton.Font = Enum.Font.ArialBold
- SpawnButton.FontSize = Enum.FontSize.Size14
- SpawnButton.Text = "SPAWN"
- SpawnButton.TextColor3 = Color3.new(1, 1, 1)
- SpawnButton.TextScaled = true
- SpawnButton.TextSize = 14
- SpawnButton.TextWrapped = true
- Title.Name = "Title"
- Title.Parent = Main
- Title.BackgroundColor3 = Color3.new(1, 1, 1)
- Title.BackgroundTransparency = 1
- Title.BorderSizePixel = 0
- Title.Size = UDim2.new(0, 266, 0, 30)
- Title.Font = Enum.Font.SourceSansBold
- Title.FontSize = Enum.FontSize.Size14
- Title.Text = " APOC SPAWN GUI"
- Title.TextColor3 = Color3.new(1, 1, 1)
- Title.TextScaled = true
- Title.TextSize = 14
- Title.TextWrapped = true
- local backgroundObjects = Instance.new('Folder', spawner.Main)
- backgroundObjects.Name = 'BackgroundObjects'
- local SpawnButton = Instance.new("TextButton", backgroundObjects)
- SpawnButton.Name = "SpawnButton"
- SpawnButton.Parent = game.CoreGui.spawner.Main.BackgroundObjects
- SpawnButton.BackgroundColor3 = Color3.new(0.0196078, 0.729412, 0.34902)
- SpawnButton.BorderSizePixel = 0
- SpawnButton.Position = UDim2.new(0, 34, 0, 193)
- SpawnButton.Size = UDim2.new(0, 199, 0, 35)
- SpawnButton.AutoButtonColor = false
- SpawnButton.Font = Enum.Font.SourceSans
- SpawnButton.FontSize = Enum.FontSize.Size14
- SpawnButton.Text = ""
- SpawnButton.TextSize = 14
- local gui = spawner.Main
- local box = gui:WaitForChild('ItemSearch')
- local items = gui:WaitForChild('ItemFrame')
- local path = game.Lighting.LootDrops
- local btn = gui:WaitForChild('SpawnButton')
- local pos = gui:WaitForChild('BackgroundObjects').SpawnButton.Position
- local sPos = btn.Position
- local client = game.Players.LocalPlayer
- local function search(text)
- local items = {}
- for i, v in next, path:GetChildren() do
- if text:upper() == v.Name:sub(1, string.len(text)):upper() then
- table.insert(items, v.Name)
- end
- end
- return items
- end
- local function bind(thing, f)
- thing.MouseButton1Click:connect(function()
- f()
- end)
- end
- box.Changed:connect(function()
- local list = search(box.Text)
- if box.Text:gsub("", "") == "" then
- items.CanvasSize = UDim2.new(0, 0, 0, 0)
- items:ClearAllChildren()
- return
- end
- items.CanvasSize = UDim2.new(0, 0, 0, 0)
- items:ClearAllChildren()
- for i, v in next, list do
- local yPos = ((20 * i) - 20)
- local s = Instance.new('TextButton', items)
- s.BorderSizePixel = 0
- s.Font = Enum.Font.ArialBold
- s.TextScaled = true
- s.Text = v
- s.Name = v
- s.BackgroundColor3 = Color3.fromRGB(211, 211, 211)
- s.TextColor3 = Color3.new(0, 0, 0)
- s.Size = UDim2.new(0, 155, 0, 20)
- s.Position = UDim2.new(0, 0, 0, yPos)
- bind(s, function()
- box.Text = s.Text
- items:ClearAllChildren()
- items.CanvasSize = UDim2.new(0, 0, 0, 0)
- end)
- end
- items.CanvasSize = UDim2.new(0, 0, 0, (20 * #list))
- end)
- btn.MouseButton1Click:connect(function()
- local item = path:FindFirstChild(box.Text)
- btn.Position = pos
- wait(1/10)
- btn.Position = sPos
- if item then
- game.Workspace.Remote.PlaceMaterial:FireServer(item, client.Character.Torso.Position - item.PrimaryPart.Position + Vector3.new(math.random(1,10),1,math.random(1,10)))
- else
- client.PlayerGui.MessageSystem.NewMessage.Color.Value = "Blue"
- client.PlayerGui.MessageSystem.NewMessage.Value = "Could not find item."
- end
- end)
Add Comment
Please, Sign In to add comment