Advertisement
yamanohera155233

Build tools

Jun 18th, 2016
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.96 KB | None | 0 0
  1. me = game.Players.Yamanohera15523
  2. if script.Parent.className ~= "HopperBin" then
  3. hop = Instance.new("HopperBin")
  4. hop.Parent = me.Backpack
  5. hop.Name = "Plane"
  6. script.Parent = hop
  7. end
  8.  
  9. guis = {}
  10. colors = {}
  11.  
  12. for i = 1, 1032 do
  13. if BrickColor.new(i) ~= BrickColor.new("Medium stone grey") then
  14. table.insert(colors, tostring(BrickColor.new(i)))
  15. end
  16. end
  17.  
  18. sp = script.Parent
  19. char = me.Character
  20.  
  21. hold = false
  22.  
  23. sc = Instance.new("ScreenGui")
  24. sc.Parent = me.PlayerGui
  25. sc.Name = "BuildGui"
  26.  
  27. fram1 = Instance.new("Frame")
  28. fram1.Parent = sc
  29. fram1.Size = UDim2.new(0,200,0,400)
  30. fram1.Position = UDim2.new(0,4,0,140)
  31. fram1.BorderColor3 = Color3.new(1,1,1)
  32. fram1.BackgroundColor3 = Color3.new(0.1,0.1,0.15)
  33. fram1.Visible = false
  34. table.insert(guis,fram1)
  35.  
  36. fram2 = Instance.new("TextLabel")
  37. fram2.Parent = fram1
  38. fram2.Size = UDim2.new(0,194,0,60)
  39. fram2.Position = UDim2.new(0,4,0,4)
  40. fram2.BorderColor3 = Color3.new(1,1,1)
  41. fram2.TextColor3 = Color3.new(1,1,1)
  42. fram2.FontSize = "Size14"
  43. fram2.BackgroundColor3 = Color3.new(0.1,0.1,0.15)
  44. fram2.Text = "Size"
  45. fram2.TextYAlignment = "Top"
  46. fram2.TextXAlignment = "Left"
  47. table.insert(guis,fram2)
  48.  
  49. fram3 = fram2:clone()
  50. fram3.Parent = fram1
  51. fram3.Text = "Colors"
  52. fram3.Position = UDim2.new(0,4,0,68)
  53. fram3.Size = UDim2.new(0,194,0,184)
  54. table.insert(guis, fram3)
  55.  
  56. fram4 = fram2:clone()
  57. fram4.Parent = fram1
  58. fram4.Size = UDim2.new(0,1,0,1)
  59. fram4.Position = UDim2.new(0,50,0,10)
  60. fram4.Text = "X Y Z"
  61. fram4.BackgroundTransparency = 1
  62.  
  63. sizeguis = {}
  64.  
  65. sizes = {1,1,1}
  66.  
  67. vc = 49
  68. for i=1, 3 do
  69. op = Instance.new("TextBox")
  70. op.Parent = fram1
  71. op.Size = UDim2.new(0,15,0,17)
  72. op.Position = UDim2.new(0,vc,0,30)
  73. op.Text = 1
  74. op.Changed:connect(function()
  75. sizes[i] = op.Text
  76. end)
  77. vc = vc + 56
  78. end
  79.  
  80.  
  81.  
  82. posx = 2
  83. posy = 25
  84.  
  85. topsurf = 0
  86. bottomsurf = 0
  87. rightsurf = 0
  88. leftsurf = 0
  89. backsurf = 0
  90. frontsurf = 0
  91.  
  92. color = "White"
  93.  
  94. for i=1, #colors do
  95. local k = Instance.new("TextButton")
  96. k.Parent = fram3
  97. k.Size = UDim2.new(0,12,0,12)
  98. k.Position = UDim2.new(0,posx,0,posy)
  99. k.BackgroundColor = BrickColor.new(colors[i])
  100. k.BorderColor3 = Color3.new(0,0,0)
  101. k.Text = ""
  102. table.insert(guis,k)
  103. k.MouseButton1Click:connect(function()
  104. color = colors[i]
  105. end)
  106. posx = posx + 14
  107. if posx >= 180 then
  108. posx = 2
  109. posy = posy + 14
  110. end
  111. end
  112.  
  113. function sel(mouse)
  114. fram1.Visible = true
  115. mouse.Button1Down:connect(function()
  116. p = Instance.new("Part")
  117. p.Parent = workspace
  118. p.formFactor = 0
  119. p.Size = Vector3.new(sizes[1],sizes[2],sizes[3])
  120. p.Anchored = true
  121. p.TopSurface = topsurf
  122. p.BottomSurface = bottomsurf
  123. p.FrontSurface = frontsurf
  124. p.BackSurface = backsurf
  125. p.LeftSurface = leftsurf
  126. p.RightSurface = rightsurf
  127. p.BrickColor = BrickColor.new(color)
  128. p.CFrame = CFrame.new(mouse.Hit.p)
  129. p.CFrame = p.CFrame * CFrame.new(0,sizes[2]/2,0)
  130. end)
  131. end
  132.  
  133. function desel()
  134. fram1.Visible = false
  135. end
  136.  
  137. sp.Deselected:connect(desel)
  138. sp.Selected:connect(sel)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement