Advertisement
SlyHades66

DeadZone SpawnGui

Jun 15th, 2016
3,943
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.08 KB | None | 0 0
  1. --[[
  2. for i,v in pairs(game.ReplicatedStorage.assets.items:GetChildren()) do
  3. if string.match(v.Name, "Uni") then
  4. print(v.Name)
  5. end
  6. end
  7. ]]
  8.  
  9. --I'm just gonna start releasing all my stuff on here people tend to find their way here even without me linking them. ¯\_(ツ)_/¯ -------Scapters
  10.  
  11. local s = Instance.new("ScreenGui", game.CoreGui)
  12. s.Name = "Scaps Deadzone ItemSpawner"
  13. local sf = Instance.new("ScrollingFrame", s)
  14. sf.Position = UDim2.new(0.03,0,0.6,0)
  15. sf.Size = UDim2.new(0,200,0,250)
  16. sf.BackgroundColor3 = Color3.new(66, 66, 66)
  17. sf.BackgroundTransparency = 0.3
  18. sf.CanvasSize = UDim2.new(0,0,18,178)
  19. local f = Instance.new("Frame", s)
  20. f.Position = UDim2.new(0.03,0,0.551,0)
  21. f.Size = UDim2.new(0,200,0,35)
  22. local label = Instance.new("TextButton", sf)
  23. label.Name = "1"
  24. label.Text = "Item List:"
  25. label.Size = UDim2.new(1,0,0,25)
  26. label.Position = UDim2.new(0,0,0,0)
  27. local ItemBox = Instance.new("TextBox", f)
  28. ItemBox.Size = UDim2.new(0,75,0,35)
  29. ItemBox.Position = UDim2.new(0,0,0,0)
  30. ItemBox.TextScaled = true
  31. ItemBox.Text = "Item"
  32. local SlotBox = Instance.new("TextBox", f)
  33. SlotBox.Size = UDim2.new(0,75,0,35)
  34. SlotBox.Position = UDim2.new(0,75,0,0)
  35. SlotBox.TextScaled = true
  36. SlotBox.Text = "Slot"
  37. local Spawn = Instance.new("TextButton", f)
  38. Spawn.Size = UDim2.new(0,50,0,35)
  39. Spawn.Position = UDim2.new(0.75,0,0,0)
  40. Spawn.TextScaled = true
  41. Spawn.Text = "Spawn"
  42.  
  43. local e = 2
  44. local previousvalue = 1
  45. for i,v in pairs(game.ReplicatedStorage.assets.items:GetChildren()) do
  46. if sf:FindFirstChild('1') then
  47. local q = Instance.new("TextButton", sf)
  48. q.Size = UDim2.new(1,0,0,25)
  49. q.TextScaled = true
  50. q.Name = e
  51. q.Text = v.Name
  52. q.Font = "SourceSansBold"
  53. q.FontSize = "Size24"
  54. q.Position = sf[previousvalue].Position+UDim2.new(0,0,0,28)
  55. previousvalue = e
  56. e = e+1
  57. end
  58. end
  59.  
  60. for i,v in pairs(sf:GetChildren()) do
  61. if v:IsA("TextButton") then
  62. v.MouseButton1Down:connect(function()
  63. ItemBox.Text = v.Text
  64. end)
  65. end
  66. end
  67.  
  68. Spawn.MouseButton1Down:connect(function()
  69. game.Players.LocalPlayer.PlayerGui.GUI.inventory.localItems["item".." ("..SlotBox.Text..")"].item.Value = ItemBox.Text
  70. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement