Advertisement
Guest User

LT2 SPAWN YEAHHH

a guest
May 21st, 2019
676
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.21 KB | None | 0 0
  1. local SESpawn = Instance.new("ScreenGui")
  2. local Main = Instance.new("Frame")
  3. local A1 = Instance.new("Frame")
  4. local Spawn1 = Instance.new("TextButton")
  5. local Item1 = Instance.new("TextBox")
  6. local Amount = Instance.new("TextBox")
  7.  
  8. SESpawn.Name = "SESpawn"
  9. SESpawn.Parent = game.CoreGui
  10. SESpawn.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  11.  
  12. Main.Name = "Main"
  13. Main.Parent = SESpawn
  14. Main.BackgroundColor3 = Color3.new(0.168627, 0.168627, 0.168627)
  15. Main.BorderSizePixel = 0
  16. Main.Position = UDim2.new(0.375394374, 0, 0.611445785, 0)
  17. Main.Size = UDim2.new(0, 30, 0, 100)
  18.  
  19. A1.Name = "A1"
  20. A1.Parent = Main
  21. A1.BackgroundColor3 = Color3.new(0.196078, 0.196078, 0.196078)
  22. A1.BorderSizePixel = 0
  23. A1.Position = UDim2.new(0.999000013, 0, -0, 0)
  24. A1.Size = UDim2.new(0, 184, 0, 100)
  25.  
  26. Spawn1.Name = "Spawn1"
  27. Spawn1.Parent = A1
  28. Spawn1.BackgroundColor3 = Color3.new(0.235294, 0.235294, 0.235294)
  29. Spawn1.BorderSizePixel = 0
  30. Spawn1.Position = UDim2.new(0.163043484, 0, 0.660000026, 0)
  31. Spawn1.Size = UDim2.new(0, 124, 0, 22)
  32. Spawn1.Font = Enum.Font.GothamBold
  33. Spawn1.Text = "SPAWN"
  34. Spawn1.TextColor3 = Color3.new(1, 1, 1)
  35. Spawn1.TextSize = 17
  36. Spawn1.TextWrapped = true
  37.  
  38. Item1.Name = "Item1"
  39. Item1.Parent = A1
  40. Item1.BackgroundColor3 = Color3.new(0.235294, 0.235294, 0.235294)
  41. Item1.BorderSizePixel = 0
  42. Item1.Position = UDim2.new(0.114130437, 0, 0.0700000003, 0)
  43. Item1.Size = UDim2.new(0, 141, 0, 23)
  44. Item1.Font = Enum.Font.GothamBold
  45. Item1.PlaceholderColor3 = Color3.new(1, 1, 1)
  46. Item1.PlaceholderText = "ITEM"
  47. Item1.Text = ""
  48. Item1.TextColor3 = Color3.new(1, 1, 1)
  49. Item1.TextSize = 14
  50.  
  51. Amount.Name = "Amount"
  52. Amount.Parent = A1
  53. Amount.BackgroundColor3 = Color3.new(0.235294, 0.235294, 0.235294)
  54. Amount.BorderSizePixel = 0
  55. Amount.Position = UDim2.new(0.114130437, 0, 0.370000005, 0)
  56. Amount.Size = UDim2.new(0, 141, 0, 23)
  57. Amount.Font = Enum.Font.GothamBold
  58. Amount.PlaceholderColor3 = Color3.new(1, 1, 1)
  59. Amount.PlaceholderText = "AMOUNT"
  60. Amount.Text = ""
  61. Amount.TextColor3 = Color3.new(1, 1, 1)
  62. Amount.TextSize = 14
  63.  
  64. Spawn1.MouseButton1Click:Connect(function()
  65. local Item = Item1.Text
  66. local Quantity = Amount.Text
  67.  
  68. local Land = nil
  69. for i,v in pairs(game.Workspace.Properties:GetChildren()) do
  70. if v.Owner.Value == game.Players.LocalPlayer then
  71. Land = v
  72. break
  73. end
  74. end
  75. if not Land then
  76. for i,v in pairs(game.Workspace.Properties:GetChildren()) do
  77. if v.Owner.Value == game.Players.LocalPlayer or v.Owner.Value == nil then
  78. Land = v
  79. game.ReplicatedStorage.Interaction.ClientIsDragging:FireServer(v)
  80. break
  81. end
  82. end
  83. end
  84.  
  85. function Spawn(Item)
  86. local Info = {}
  87. Info.Name = Item.Name
  88. Info.Type = game.ReplicatedStorage.Purchasables.Structures.HardStructures.Sawmill2.Type
  89. Info.OtherInfo = game.ReplicatedStorage.Purchasables.WireObjects.Wire.OtherInfo
  90. local Points = {Land.OriginSquare.Position + Vector3.new(0,5,0), Land.OriginSquare.Position + Vector3.new(0,5,0)}
  91. game.ReplicatedStorage.PlaceStructure.ClientPlacedWire:FireServer(Info, Points)
  92. end
  93.  
  94. for i=1, Quantity do
  95. Spawn(game.ReplicatedStorage.Purchasables:FindFirstChild(Item, true))
  96. end
  97. end)
  98.  
  99. Main.Active = true
  100. Main.Draggable = true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement