Advertisement
AanWarbhe

Blueprint wall

Apr 22nd, 2019
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.52 KB | None | 0 0
  1. -- Objects
  2.  
  3. local WallMaker = Instance.new("ScreenGui")
  4. local Main = Instance.new("Frame")
  5. local Bar = Instance.new("Frame")
  6. local title = Instance.new("TextLabel")
  7. local title_2 = Instance.new("TextLabel")
  8. local Height = Instance.new("ImageLabel")
  9. local Hval = Instance.new("TextBox")
  10. local MakeWall = Instance.new("ImageLabel")
  11. local Make = Instance.new("TextButton")
  12. local Woodt = Instance.new("ImageLabel")
  13. local Wval = Instance.new("TextBox")
  14. local Clearb = Instance.new("ImageLabel")
  15. local Cb = Instance.new("TextButton")
  16. local Bluet = Instance.new("ImageLabel")
  17. local Bval = Instance.new("TextBox")
  18. local height = Hval.Text
  19. local wtype = Wval.Text
  20. local btype = Bval.Text
  21. local newtween = function(obj,props,speed,...)
  22. local info = TweenInfo.new(speed,...);
  23. local tween = game:GetService("TweenService"):Create(obj,info,props);
  24. return tween:Play();
  25. end;
  26.  
  27. -- Properties
  28.  
  29. WallMaker.Name = "WallMaker"
  30. WallMaker.Parent = game.CoreGui
  31.  
  32. Main.Name = "Main"
  33. Main.Parent = WallMaker
  34. Main.BackgroundColor3 = Color3.new(0.137255, 0.137255, 0.137255)
  35. Main.BorderSizePixel = 0
  36. Main.Position = UDim2.new(0.659811497, 0, 0.248062015, 0)
  37. Main.Size = UDim2.new(0, 200, 0, 159)
  38. Main.Active = true
  39. Main.Draggable = true
  40.  
  41. Bar.Name = "Bar"
  42. Bar.Parent = Main
  43. Bar.BackgroundColor3 = Color3.new(0.121569, 0.121569, 0.121569)
  44. Bar.BorderSizePixel = 0
  45. Bar.Position = UDim2.new(-0.000244140625, 0, -0.00297152926, 0)
  46. Bar.Size = UDim2.new(0, 200, 0, 38)
  47.  
  48. title.Name = "title"
  49. title.Parent = Bar
  50. title.BackgroundColor3 = Color3.new(1, 1, 1)
  51. title.BackgroundTransparency = 1
  52. title.Position = UDim2.new(0.284999996, 0, 0, 0)
  53. title.Size = UDim2.new(0, 37, 0, 38)
  54. title.Font = Enum.Font.GothamSemibold
  55. title.Text = "Wall"
  56. title.TextColor3 = Color3.new(1, 1, 1)
  57. title.TextSize = 16
  58. title.TextXAlignment = Enum.TextXAlignment.Left
  59.  
  60. title_2.Name = "title"
  61. title_2.Parent = Bar
  62. title_2.BackgroundColor3 = Color3.new(1, 1, 1)
  63. title_2.BackgroundTransparency = 1
  64. title_2.Position = UDim2.new(0.469999969, 0, 0, 0)
  65. title_2.Size = UDim2.new(0, 49, 0, 38)
  66. title_2.Font = Enum.Font.GothamSemibold
  67. title_2.Text = "Maker"
  68. title_2.TextColor3 = Color3.new(1, 0.988235, 1)
  69. title_2.TextSize = 16
  70. title_2.TextXAlignment = Enum.TextXAlignment.Left
  71.  
  72. Height.Name = "Height"
  73. Height.Parent = Main
  74. Height.Active = true
  75. Height.BackgroundColor3 = Color3.new(0.0627451, 0.945098, 0.341176)
  76. Height.BackgroundTransparency = 1
  77. Height.BorderSizePixel = 0
  78. Height.Position = UDim2.new(1.05200005, -106, 0.809000015, -86)
  79. Height.Size = UDim2.new(0, 86, 0, 34)
  80. Height.Image = "rbxassetid://2877881750"
  81. Height.ImageColor3 = Color3.new(0.129412, 0.129412, 0.129412)
  82. Height.ScaleType = Enum.ScaleType.Slice
  83. Height.SliceCenter = Rect.new(6, 6, 494, 494)
  84.  
  85. Hval.Name = "Hval"
  86. Hval.Parent = Height
  87. Hval.BackgroundColor3 = Color3.new(1, 1, 1)
  88. Hval.BackgroundTransparency = 1
  89. Hval.Size = UDim2.new(0, 86, 0, 34)
  90. Hval.Font = Enum.Font.GothamSemibold
  91. Hval.Text = "Height"
  92. Hval.TextColor3 = Color3.new(1, 1, 1)
  93. Hval.TextSize = 11
  94. Hval.PlaceholderText = "Height"
  95. Hval.PlaceholderColor3 = Color3.fromRGB(255,255,255)
  96.  
  97. MakeWall.Name = "MakeWall"
  98. MakeWall.Parent = Main
  99. MakeWall.Active = true
  100. MakeWall.BackgroundColor3 = Color3.new(0.0627451, 0.945098, 0.341176)
  101. MakeWall.BackgroundTransparency = 1
  102. MakeWall.BorderSizePixel = 0
  103. MakeWall.Position = UDim2.new(0.574999988, -106, 0.764999986, -81)
  104. MakeWall.Size = UDim2.new(0, 88, 0, 56)
  105. MakeWall.Image = "rbxassetid://2877881750"
  106. MakeWall.ImageColor3 = Color3.new(0.121569, 0.121569, 0.121569)
  107. MakeWall.ScaleType = Enum.ScaleType.Slice
  108. MakeWall.SliceCenter = Rect.new(6, 6, 494, 494)
  109.  
  110. Make.Name = "Make"
  111. Make.Parent = MakeWall
  112. Make.BackgroundColor3 = Color3.new(1, 1, 1)
  113. Make.BackgroundTransparency = 1
  114. Make.Position = UDim2.new(-0.0153836338, 0, 0, 0)
  115. Make.Size = UDim2.new(0, 89, 0, 56)
  116. Make.Font = Enum.Font.GothamSemibold
  117. Make.Text = "MAKE WALL"
  118. Make.TextColor3 = Color3.new(1, 1, 1)
  119. Make.TextSize = 11
  120. Make.TextWrapped = true
  121.  
  122. Woodt.Name = "Woodt"
  123. Woodt.Parent = Main
  124. Woodt.Active = true
  125. Woodt.BackgroundColor3 = Color3.new(0.0627451, 0.945098, 0.341176)
  126. Woodt.BackgroundTransparency = 1
  127. Woodt.BorderSizePixel = 0
  128. Woodt.Position = UDim2.new(1.05200005, -106, 1.03600001, -84)
  129. Woodt.Size = UDim2.new(0, 86, 0, 34)
  130. Woodt.Image = "rbxassetid://2877881750"
  131. Woodt.ImageColor3 = Color3.new(0.129412, 0.129412, 0.129412)
  132. Woodt.ScaleType = Enum.ScaleType.Slice
  133. Woodt.SliceCenter = Rect.new(6, 6, 494, 494)
  134.  
  135. Wval.Name = "Wval"
  136. Wval.Parent = Woodt
  137. Wval.BackgroundColor3 = Color3.new(1, 1, 1)
  138. Wval.BackgroundTransparency = 1
  139. Wval.Size = UDim2.new(0, 86, 0, 34)
  140. Wval.Font = Enum.Font.GothamSemibold
  141. Wval.Text = "Wood Type"
  142. Wval.TextColor3 = Color3.new(1, 1, 1)
  143. Wval.TextSize = 11
  144. Wval.PlaceholderText = "Wood Type"
  145. Wval.PlaceholderColor3 = Color3.fromRGB(255,255,255)
  146.  
  147. Clearb.Name = "Clearb"
  148. Clearb.Parent = Main
  149. Clearb.Active = true
  150. Clearb.BackgroundColor3 = Color3.new(0.0627451, 0.945098, 0.341176)
  151. Clearb.BackgroundTransparency = 1
  152. Clearb.BorderSizePixel = 0
  153. Clearb.Position = UDim2.new(0.582000017, -106, 1.11500001, -78)
  154. Clearb.Size = UDim2.new(0, 86, 0, 56)
  155. Clearb.Image = "rbxassetid://2877881750"
  156. Clearb.ImageColor3 = Color3.new(0.121569, 0.121569, 0.121569)
  157. Clearb.ScaleType = Enum.ScaleType.Slice
  158. Clearb.SliceCenter = Rect.new(6, 6, 494, 494)
  159.  
  160. Cb.Name = "Cb"
  161. Cb.Parent = Clearb
  162. Cb.BackgroundColor3 = Color3.new(1, 1, 1)
  163. Cb.BackgroundTransparency = 1
  164. Cb.Size = UDim2.new(0, 86, 0, 56)
  165. Cb.Font = Enum.Font.GothamSemibold
  166. Cb.Text = "Clear Base"
  167. Cb.TextColor3 = Color3.new(1, 1, 1)
  168. Cb.TextSize = 11
  169.  
  170. Bluet.Name = "Bluet"
  171. Bluet.Parent = Main
  172. Bluet.Active = true
  173. Bluet.BackgroundColor3 = Color3.new(0.0627451, 0.945098, 0.341176)
  174. Bluet.BackgroundTransparency = 1
  175. Bluet.BorderSizePixel = 0
  176. Bluet.Position = UDim2.new(1.05200005, -106, 1.26800001, -83)
  177. Bluet.Size = UDim2.new(0, 86, 0, 34)
  178. Bluet.Image = "rbxassetid://2877881750"
  179. Bluet.ImageColor3 = Color3.new(0.129412, 0.129412, 0.129412)
  180. Bluet.ScaleType = Enum.ScaleType.Slice
  181. Bluet.SliceCenter = Rect.new(6, 6, 494, 494)
  182.  
  183. Bval.Name = "Bval"
  184. Bval.Parent = Bluet
  185. Bval.BackgroundColor3 = Color3.new(1, 1, 1)
  186. Bval.BackgroundTransparency = 1
  187. Bval.Size = UDim2.new(0, 86, 0, 34)
  188. Bval.Font = Enum.Font.GothamSemibold
  189. Bval.Text = "Blueprint Type"
  190. Bval.TextColor3 = Color3.new(1, 1, 1)
  191. Bval.TextSize = 11
  192. Bval.PlaceholderText = "Blueprint Type"
  193. Bval.PlaceholderColor3 = Color3.fromRGB(255,255,255)
  194.  
  195. Cb.MouseButton1Down:connect(function()
  196. for i, e in pairs(game.Workspace.PlayerModels:GetChildren()) do
  197. if e:FindFirstChild("Owner") and e.Owner.Value ~= nil and e.Owner.Value == game.Players[game.Players.LocalPlayer.Name] and e:FindFirstChild("ItemName") and e:FindFirstChild("Type") and (e.PrimaryPart ~= nil or e:FindFirstChild("MainCFrame")) then
  198. game.ReplicatedStorage.Interaction.DestroyStructure:FireServer(e)
  199. end
  200. end
  201. end)
  202.  
  203. Make.MouseButton1Down:connect(function()
  204. if Bval.Text == "Ladder1" or "Wall2" or "Door1" then
  205. local height = Hval.Text
  206. local btype = Bval.Text
  207. for i = 1, 50 do
  208. for e = 1, height do
  209. local A_1 = btype
  210. local A_2 = CFrame.new(170 - (i*4), -8.199999809 + (e*4), -89.5, -1, -7.99715849e-08, -9.61688102e-07, -9.48740535e-08, 1, -1.51793438e-06, -9.61688102e-07, 1.34308857e-06, -1)
  211. local A_3 = game:GetService("Players").LocalPlayer
  212. local Event = game:GetService("ReplicatedStorage").PlaceStructure.ClientPlacedBlueprint
  213. Event:FireServer(A_1, A_2, A_3)
  214. wait ()
  215. end
  216. end
  217. wait(4)
  218. for i,v in next,workspace.PlayerModels:GetChildren() do
  219. if v:FindFirstChild("Type") and v.Type.Value == "Blueprint" and (v.Owner.Value == game.Players.LocalPlayer or game.ReplicatedStorage.Interaction.ClientIsWhitelisted:InvokeServer(v.Owner.Value)) then
  220. game.ReplicatedStorage.PlaceStructure.ClientPlacedStructure:FireServer(v.ItemName.Value, v.Main.CFrame, game.Players.LocalPlayer, Wval.Text, v, false)
  221. --break
  222. end;
  223. end;
  224. for i = 1, 50 do
  225. for e = 1, height do
  226. local A_1 = btype
  227. local A_2 = CFrame.new(-31.5, -8.199999809 + (e*4), -87 - (i*4), -4.37113883e-08, 0, -1, 0, 1, 0, 1, 0, -4.37113883e-08)
  228. local A_3 = game:GetService("Players").LocalPlayer
  229. local Event = game:GetService("ReplicatedStorage").PlaceStructure.ClientPlacedBlueprint
  230. Event:FireServer(A_1, A_2, A_3)
  231. wait ()
  232. end
  233. end
  234. wait(4)
  235. for i,v in next,workspace.PlayerModels:GetChildren() do
  236. if v:FindFirstChild("Type") and v.Type.Value == "Blueprint" and (v.Owner.Value == game.Players.LocalPlayer or game.ReplicatedStorage.Interaction.ClientIsWhitelisted:InvokeServer(v.Owner.Value)) then
  237. game.ReplicatedStorage.PlaceStructure.ClientPlacedStructure:FireServer(v.ItemName.Value, v.Main.CFrame, game.Players.LocalPlayer, Wval.Text, v, false)
  238. --break
  239. end;
  240. end;
  241. for i = 1, 50 do
  242. for e = 1, height do
  243. local A_1 = btype
  244. local A_2 = CFrame.new(-34 + (i*4), -8.199999809 + (e*4), -288.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  245. local A_3 = game:GetService("Players").LocalPlayer
  246. local Event = game:GetService("ReplicatedStorage").PlaceStructure.ClientPlacedBlueprint
  247. Event:FireServer(A_1, A_2, A_3)
  248. wait ()
  249. end
  250. end
  251. wait(4)
  252. for i,v in next,workspace.PlayerModels:GetChildren() do
  253. if v:FindFirstChild("Type") and v.Type.Value == "Blueprint" and (v.Owner.Value == game.Players.LocalPlayer or game.ReplicatedStorage.Interaction.ClientIsWhitelisted:InvokeServer(v.Owner.Value)) then
  254. game.ReplicatedStorage.PlaceStructure.ClientPlacedStructure:FireServer(v.ItemName.Value, v.Main.CFrame, game.Players.LocalPlayer, Wval.Text, v, false)
  255. --break
  256. end;
  257. end;
  258. for i = 1, 50 do
  259. for e = 1, height do
  260. local A_1 = btype
  261. local A_2 = CFrame.new(167.5, -8.199999809 + (e*4), -291 + (i*4), -4.37113883e-08, 0, 1, 0, 1, 0, -1, 0, -4.37113883e-08)
  262. local A_3 = game:GetService("Players").LocalPlayer
  263. local Event = game:GetService("ReplicatedStorage").PlaceStructure.ClientPlacedBlueprint
  264. Event:FireServer(A_1, A_2, A_3)
  265. wait ()
  266. end
  267. end
  268. wait(4)
  269. for i,v in next,workspace.PlayerModels:GetChildren() do
  270. if v:FindFirstChild("Type") and v.Type.Value == "Blueprint" and (v.Owner.Value == game.Players.LocalPlayer or game.ReplicatedStorage.Interaction.ClientIsWhitelisted:InvokeServer(v.Owner.Value)) then
  271. game.ReplicatedStorage.PlaceStructure.ClientPlacedStructure:FireServer(v.ItemName.Value, v.Main.CFrame, game.Players.LocalPlayer, Wval.Text, v, false)
  272. --break
  273. end;
  274. end;
  275. else
  276. if Bval.Text ~= "Ladder1" or "Wall2" then
  277. local height = Hval.Text
  278. local btype = Bval.Text
  279. for i = 1, 50 do
  280. for e = 1, height do
  281. local A_1 = btype
  282. local A_2 = CFrame.new(170 - (i*4), -8.199999809 + (e*8), -89.5, -1, -7.99715849e-08, -9.61688102e-07, -9.48740535e-08, 1, -1.51793438e-06, -9.61688102e-07, 1.34308857e-06, -1)
  283. local A_3 = game:GetService("Players").LocalPlayer
  284. local Event = game:GetService("ReplicatedStorage").PlaceStructure.ClientPlacedBlueprint
  285. Event:FireServer(A_1, A_2, A_3)
  286. wait ()
  287. end
  288. end
  289. wait(4)
  290. for i,v in next,workspace.PlayerModels:GetChildren() do
  291. if v:FindFirstChild("Type") and v.Type.Value == "Blueprint" and (v.Owner.Value == game.Players.LocalPlayer or game.ReplicatedStorage.Interaction.ClientIsWhitelisted:InvokeServer(v.Owner.Value)) then
  292. game.ReplicatedStorage.PlaceStructure.ClientPlacedStructure:FireServer(v.ItemName.Value, v.Main.CFrame, game.Players.LocalPlayer, Wval.Text, v, false)
  293. --break
  294. end;
  295. end;
  296. for i = 1, 50 do
  297. for e = 1, height do
  298. local A_1 = btype
  299. local A_2 = CFrame.new(-31.5, -8.199999809 + (e*8), -87 - (i*4), -4.37113883e-08, 0, -1, 0, 1, 0, 1, 0, -4.37113883e-08)
  300. local A_3 = game:GetService("Players").LocalPlayer
  301. local Event = game:GetService("ReplicatedStorage").PlaceStructure.ClientPlacedBlueprint
  302. Event:FireServer(A_1, A_2, A_3)
  303. wait ()
  304. end
  305. end
  306. wait(4)
  307. for i,v in next,workspace.PlayerModels:GetChildren() do
  308. if v:FindFirstChild("Type") and v.Type.Value == "Blueprint" and (v.Owner.Value == game.Players.LocalPlayer or game.ReplicatedStorage.Interaction.ClientIsWhitelisted:InvokeServer(v.Owner.Value)) then
  309. game.ReplicatedStorage.PlaceStructure.ClientPlacedStructure:FireServer(v.ItemName.Value, v.Main.CFrame, game.Players.LocalPlayer, Wval.Text, v, false)
  310. --break
  311. end;
  312. end;
  313. for i = 1, 50 do
  314. for e = 1, height do
  315. local A_1 = btype
  316. local A_2 = CFrame.new(-34 + (i*4), -8.199999809 + (e*8), -288.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  317. local A_3 = game:GetService("Players").LocalPlayer
  318. local Event = game:GetService("ReplicatedStorage").PlaceStructure.ClientPlacedBlueprint
  319. Event:FireServer(A_1, A_2, A_3)
  320. wait ()
  321. end
  322. end
  323. wait(4)
  324. for i,v in next,workspace.PlayerModels:GetChildren() do
  325. if v:FindFirstChild("Type") and v.Type.Value == "Blueprint" and (v.Owner.Value == game.Players.LocalPlayer or game.ReplicatedStorage.Interaction.ClientIsWhitelisted:InvokeServer(v.Owner.Value)) then
  326. game.ReplicatedStorage.PlaceStructure.ClientPlacedStructure:FireServer(v.ItemName.Value, v.Main.CFrame, game.Players.LocalPlayer, Wval.Text, v, false)
  327. --break
  328. end;
  329. end;
  330. for i = 1, 50 do
  331. for e = 1, height do
  332. local A_1 = btype
  333. local A_2 = CFrame.new(167.5, -8.199999809 + (e*8), -291 + (i*4), -4.37113883e-08, 0, 1, 0, 1, 0, -1, 0, -4.37113883e-08)
  334. local A_3 = game:GetService("Players").LocalPlayer
  335. local Event = game:GetService("ReplicatedStorage").PlaceStructure.ClientPlacedBlueprint
  336. Event:FireServer(A_1, A_2, A_3)
  337. wait ()
  338. end
  339. end
  340. wait(4)
  341. for i,v in next,workspace.PlayerModels:GetChildren() do
  342. if v:FindFirstChild("Type") and v.Type.Value == "Blueprint" and (v.Owner.Value == game.Players.LocalPlayer or game.ReplicatedStorage.Interaction.ClientIsWhitelisted:InvokeServer(v.Owner.Value)) then
  343. game.ReplicatedStorage.PlaceStructure.ClientPlacedStructure:FireServer(v.ItemName.Value, v.Main.CFrame, game.Players.LocalPlayer, Wval.Text, v, false)
  344. --break
  345. end;
  346. end;
  347. end;
  348. end;
  349. end)
  350.  
  351. Cb.MouseEnter:connect(function()
  352. newtween(Clearb,{ImageColor3 = Color3.fromRGB(255,255,255)},0.3,Enum.EasingStyle.Sine,Enum.EasingDirection.In);
  353. newtween(Cb,{TextColor3 = Color3.fromRGB(31,31,31)},0.3,Enum.EasingStyle.Sine,Enum.EasingDirection.In);
  354. end)
  355. Make.MouseEnter:connect(function()
  356. newtween(MakeWall,{ImageColor3 = Color3.fromRGB(255,255,255)},0.3,Enum.EasingStyle.Sine,Enum.EasingDirection.In);
  357. newtween(Make,{TextColor3 = Color3.fromRGB(31,31,31)},0.3,Enum.EasingStyle.Sine,Enum.EasingDirection.In);
  358. end)
  359. Cb.MouseButton1Down:connect(function()
  360. newtween(Clearb,{ImageColor3 = Color3.fromRGB(185,185,185)},0.3,Enum.EasingStyle.Sine,Enum.EasingDirection.In);
  361. newtween(Cb,{TextColor3 = Color3.fromRGB(31,31,31)},0.3,Enum.EasingStyle.Sine,Enum.EasingDirection.In);
  362. end)
  363. Make.MouseButton1Down:connect(function()
  364. newtween(MakeWall,{ImageColor3 = Color3.fromRGB(185,185,185)},0.3,Enum.EasingStyle.Sine,Enum.EasingDirection.In);
  365. newtween(Make,{TextColor3 = Color3.fromRGB(31,31,31)},0.3,Enum.EasingStyle.Sine,Enum.EasingDirection.In);
  366. end)
  367. Cb.MouseButton1Up:connect(function()
  368. newtween(Clearb,{ImageColor3 = Color3.fromRGB(255,255,255)},0.3,Enum.EasingStyle.Sine,Enum.EasingDirection.In);
  369. newtween(Cb,{TextColor3 = Color3.fromRGB(31,31,31)},0.3,Enum.EasingStyle.Sine,Enum.EasingDirection.In);
  370. end)
  371. Make.MouseButton1Up:connect(function()
  372. newtween(MakeWall,{ImageColor3 = Color3.fromRGB(255,255,255)},0.3,Enum.EasingStyle.Sine,Enum.EasingDirection.In);
  373. newtween(Make,{TextColor3 = Color3.fromRGB(31,31,31)},0.3,Enum.EasingStyle.Sine,Enum.EasingDirection.In);
  374. end)
  375. Cb.MouseLeave:connect(function()
  376. newtween(Clearb,{ImageColor3 = Color3.fromRGB(31,31,31)},0.3,Enum.EasingStyle.Sine,Enum.EasingDirection.In);
  377. newtween(Cb,{TextColor3 = Color3.fromRGB(255,255,255)},0.3,Enum.EasingStyle.Sine,Enum.EasingDirection.In);
  378. end)
  379. Make.MouseLeave:connect(function()
  380. newtween(MakeWall,{ImageColor3 = Color3.fromRGB(31,31,31)},0.3,Enum.EasingStyle.Sine,Enum.EasingDirection.In);
  381. newtween(Make,{TextColor3 = Color3.fromRGB(255,255,255)},0.3,Enum.EasingStyle.Sine,Enum.EasingDirection.In);
  382. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement