Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local SESpawn = Instance.new("ScreenGui")
- local Main = Instance.new("Frame")
- local A1 = Instance.new("Frame")
- local Spawn1 = Instance.new("TextButton")
- local Item1 = Instance.new("TextBox")
- local Amount = Instance.new("TextBox")
- SESpawn.Name = "SESpawn"
- SESpawn.Parent = game.CoreGui
- SESpawn.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- Main.Name = "Main"
- Main.Parent = SESpawn
- Main.BackgroundColor3 = Color3.new(0.168627, 0.168627, 0.168627)
- Main.BorderSizePixel = 0
- Main.Position = UDim2.new(0.375394374, 0, 0.611445785, 0)
- Main.Size = UDim2.new(0, 30, 0, 100)
- A1.Name = "A1"
- A1.Parent = Main
- A1.BackgroundColor3 = Color3.new(0.196078, 0.196078, 0.196078)
- A1.BorderSizePixel = 0
- A1.Position = UDim2.new(0.999000013, 0, -0, 0)
- A1.Size = UDim2.new(0, 184, 0, 100)
- Spawn1.Name = "Spawn1"
- Spawn1.Parent = A1
- Spawn1.BackgroundColor3 = Color3.new(0.235294, 0.235294, 0.235294)
- Spawn1.BorderSizePixel = 0
- Spawn1.Position = UDim2.new(0.163043484, 0, 0.660000026, 0)
- Spawn1.Size = UDim2.new(0, 124, 0, 22)
- Spawn1.Font = Enum.Font.GothamBold
- Spawn1.Text = "SPAWN"
- Spawn1.TextColor3 = Color3.new(1, 1, 1)
- Spawn1.TextSize = 17
- Spawn1.TextWrapped = true
- Item1.Name = "Item1"
- Item1.Parent = A1
- Item1.BackgroundColor3 = Color3.new(0.235294, 0.235294, 0.235294)
- Item1.BorderSizePixel = 0
- Item1.Position = UDim2.new(0.114130437, 0, 0.0700000003, 0)
- Item1.Size = UDim2.new(0, 141, 0, 23)
- Item1.Font = Enum.Font.GothamBold
- Item1.PlaceholderColor3 = Color3.new(1, 1, 1)
- Item1.PlaceholderText = "ITEM"
- Item1.Text = ""
- Item1.TextColor3 = Color3.new(1, 1, 1)
- Item1.TextSize = 14
- Amount.Name = "Amount"
- Amount.Parent = A1
- Amount.BackgroundColor3 = Color3.new(0.235294, 0.235294, 0.235294)
- Amount.BorderSizePixel = 0
- Amount.Position = UDim2.new(0.114130437, 0, 0.370000005, 0)
- Amount.Size = UDim2.new(0, 141, 0, 23)
- Amount.Font = Enum.Font.GothamBold
- Amount.PlaceholderColor3 = Color3.new(1, 1, 1)
- Amount.PlaceholderText = "AMOUNT"
- Amount.Text = ""
- Amount.TextColor3 = Color3.new(1, 1, 1)
- Amount.TextSize = 14
- Spawn1.MouseButton1Click:Connect(function()
- local Item = Item1.Text
- local Quantity = Amount.Text
- local Land = nil
- for i,v in pairs(game.Workspace.Properties:GetChildren()) do
- if v.Owner.Value == game.Players.LocalPlayer then
- Land = v
- break
- end
- end
- if not Land then
- for i,v in pairs(game.Workspace.Properties:GetChildren()) do
- if v.Owner.Value == game.Players.LocalPlayer or v.Owner.Value == nil then
- Land = v
- game.ReplicatedStorage.Interaction.ClientIsDragging:FireServer(v)
- break
- end
- end
- end
- function Spawn(Item)
- local Info = {}
- Info.Name = Item.Name
- Info.Type = game.ReplicatedStorage.Purchasables.Structures.HardStructures.Sawmill2.Type
- Info.OtherInfo = game.ReplicatedStorage.Purchasables.WireObjects.Wire.OtherInfo
- local Points = {Land.OriginSquare.Position + Vector3.new(0,5,0), Land.OriginSquare.Position + Vector3.new(0,5,0)}
- game.ReplicatedStorage.PlaceStructure.ClientPlacedWire:FireServer(Info, Points)
- end
- for i=1, Quantity do
- Spawn(game.ReplicatedStorage.Purchasables:FindFirstChild(Item, true))
- end
- end)
- Main.Active = true
- Main.Draggable = true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement