Advertisement
sadbnhmsadgsadnhdsav

Block Adder

Oct 16th, 2019
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.86 KB | None | 0 0
  1. -- Farewell Infortality.
  2. -- Version: 2.82
  3. -- Instances:
  4. local BlockAdder = Instance.new("ScreenGui")
  5. local Frame = Instance.new("Frame")
  6. local NameHack = Instance.new("TextLabel")
  7. local Drag = Instance.new("TextButton")
  8. local Insert = Instance.new("TextButton")
  9. local InstanceDropDown = Instance.new("TextButton")
  10. local ParentDropDown = Instance.new("TextButton")
  11. local Title = Instance.new("TextButton")
  12. local Title_2 = Instance.new("TextButton")
  13. --Properties:
  14. BlockAdder.Name = "Block Adder"
  15. BlockAdder.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  16. BlockAdder.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  17.  
  18. Frame.Parent = BlockAdder
  19. Frame.BackgroundColor3 = Color3.new(0.784314, 0.784314, 0.784314)
  20. Frame.Position = UDim2.new(0.197229773, 0, 0.230958238, 0)
  21. Frame.Size = UDim2.new(0, 688, 0, 247)
  22.  
  23. NameHack.Name = "NameHack"
  24. NameHack.Parent = Frame
  25. NameHack.BackgroundColor3 = Color3.new(1, 1, 1)
  26. NameHack.BackgroundTransparency = 3242342
  27. NameHack.Position = UDim2.new(0.1134267, 0, 0.0688142926, 0)
  28. NameHack.Size = UDim2.new(0, 530, 0, 42)
  29. NameHack.Font = Enum.Font.SciFi
  30. NameHack.Text = "Block Adder"
  31. NameHack.TextColor3 = Color3.new(1, 0.278431, 0.0588235)
  32. NameHack.TextSize = 20
  33. NameHack.TextStrokeColor3 = Color3.new(1, 0, 0)
  34.  
  35. Drag.Name = "Drag"
  36. Drag.Parent = Frame
  37. Drag.BackgroundColor3 = Color3.new(1, 0, 0)
  38. Drag.BorderColor3 = Color3.new(0.207843, 0, 0)
  39. Drag.Size = UDim2.new(0, 688, 0, 17)
  40. Drag.Font = Enum.Font.SciFi
  41. Drag.Text = "Drag"
  42. Drag.TextColor3 = Color3.new(0, 0, 0)
  43. Drag.TextSize = 14
  44.  
  45. Insert.Name = "Insert"
  46. Insert.Parent = Frame
  47. Insert.BackgroundColor3 = Color3.new(1, 1, 1)
  48. Insert.BackgroundTransparency = 0.5
  49. Insert.BorderColor3 = Color3.new(1, 1, 1)
  50. Insert.Position = UDim2.new(0, 173, 0, 205)
  51. Insert.Size = UDim2.new(0.534883738, 0, 0.00854562502, 25)
  52. Insert.Text = "Insert"
  53. Insert.TextColor3 = Color3.new(0.372549, 0.372549, 0.372549)
  54. Insert.TextSize = 10
  55.  
  56. InstanceDropDown.Name = "Instance Drop Down"
  57. InstanceDropDown.Parent = Frame
  58. InstanceDropDown.BackgroundColor3 = Color3.new(1, 1, 1)
  59. InstanceDropDown.BackgroundTransparency = 0.5
  60. InstanceDropDown.BorderColor3 = Color3.new(1, 1, 1)
  61. InstanceDropDown.Position = UDim2.new(0, 408, 0, 73)
  62. InstanceDropDown.Size = UDim2.new(0.388359904, 0, 0.00854566321, 25)
  63. InstanceDropDown.Text = "Select"
  64. InstanceDropDown.TextColor3 = Color3.new(0.372549, 0.372549, 0.372549)
  65. InstanceDropDown.TextSize = 10
  66.  
  67. ParentDropDown.Name = "Parent Drop Down"
  68. ParentDropDown.Parent = Frame
  69. ParentDropDown.BackgroundColor3 = Color3.new(1, 1, 1)
  70. ParentDropDown.BackgroundTransparency = 0.5
  71. ParentDropDown.BorderColor3 = Color3.new(1, 1, 1)
  72. ParentDropDown.Position = UDim2.new(0, 29, 0, 74)
  73. ParentDropDown.Size = UDim2.new(0.452034891, 0, 0.00854562502, 25)
  74. ParentDropDown.Text = "Workspace"
  75. ParentDropDown.TextColor3 = Color3.new(0.372549, 0.372549, 0.372549)
  76. ParentDropDown.TextSize = 10
  77.  
  78. Title.Name = "Title"
  79. Title.Parent = Frame
  80. Title.Active = false
  81. Title.BackgroundColor3 = Color3.new(1, 1, 1)
  82. Title.BackgroundTransparency = 1
  83. Title.BorderColor3 = Color3.new(1, 1, 1)
  84. Title.Position = UDim2.new(0, 401, 0, 45)
  85. Title.Size = UDim2.new(0.397080988, 0, 0.00854566321, 25)
  86. Title.AutoButtonColor = false
  87. Title.Text = "What you want:"
  88. Title.TextColor3 = Color3.new(0, 0, 0)
  89. Title.TextSize = 10
  90.  
  91. Title_2.Name = "Title"
  92. Title_2.Parent = Frame
  93. Title_2.Active = false
  94. Title_2.BackgroundColor3 = Color3.new(1, 1, 1)
  95. Title_2.BackgroundTransparency = 1
  96. Title_2.BorderColor3 = Color3.new(1, 1, 1)
  97. Title_2.Position = UDim2.new(0, 44, 0, 46)
  98. Title_2.Size = UDim2.new(0.417151153, 0, 0.00854562502, 25)
  99. Title_2.AutoButtonColor = false
  100. Title_2.Text = "Parent:"
  101. Title_2.TextColor3 = Color3.new(0, 0, 0)
  102. Title_2.TextSize = 10
  103. -- Scripts:
  104. function SCRIPT_ARVU83_FAKESCRIPT() -- Drag.LocalScript
  105. local script = Instance.new('LocalScript')
  106. script.Parent = Drag
  107. wanttobemoved=script.Parent.Parent
  108. X=wanttobemoved.Position.X.Offset
  109. Y=wanttobemoved.Position.Y.Offset
  110. XS=wanttobemoved.Position.X.Scale
  111. YS=wanttobemoved.Position.Y.Scale
  112. function down(posX,posY)--the positions of the mouse
  113. drag=true--activate the drag function
  114. X=wanttobemoved.Position.X.Offset--redefines the value "X"
  115. Y=wanttobemoved.Position.Y.Offset--redefines the value "Y"
  116. XS=wanttobemoved.Position.X.Scale
  117. YS=wanttobemoved.Position.Y.Scale
  118. DposX=posX-X--the mouse's X position offset by the frame's X position.
  119. DposY=posY-Y--the mouse's Y position offset by the frame's Y position.
  120. print(""..DposX..","..DposY.."")--remembers the values DposX and DposY in the output toolbar.
  121. end
  122. function up()
  123. drag=false--deactivate the drag
  124. end
  125. function move(posX,posY)--again, the positions of the mouse
  126. if drag then--if held down then
  127. wanttobemoved.Position=UDim2.new(XS,posX - DposX,YS,posY - DposY)
  128. end
  129. end
  130. script.Parent.MouseButton1Down:connect(down)
  131. script.Parent.MouseButton1Up:connect(up)
  132. script.Parent.MouseLeave:connect(up)
  133. script.Parent.MouseMoved:connect(move)
  134.  
  135. end
  136. coroutine.resume(coroutine.create(SCRIPT_ARVU83_FAKESCRIPT))
  137. function SCRIPT_EHOB88_FAKESCRIPT() -- Frame.NewInstanceScript
  138. local script = Instance.new('Script')
  139. script.Parent = Frame
  140. Idd = script.Parent["Instance Drop Down"]
  141. Pdd = script.Parent["Parent Drop Down"]
  142. player = script.Parent.Parent.Parent.Parent.Parent
  143.  
  144. type = {
  145. "Decal";
  146. "Hint";
  147. "Message";
  148. "Model";
  149. "Part";
  150. "Script";
  151. "Seat";
  152. "SpawnLocation";
  153. "Team";
  154. "TrussPart";
  155. "WedgePart";
  156. }
  157.  
  158. parents = {
  159. "Workspace";
  160. "Lighting";
  161. "StarterGui";
  162. "StarterPack";
  163. "Teams";
  164. "Your Character"
  165. }
  166.  
  167. Ilab = {}
  168. Plab = {}
  169. ctype = nil
  170. cparent = "Workspace"
  171.  
  172. t = Idd:Clone()
  173. t.Text = ""
  174. t.BackgroundTransparency = 0.2
  175. Iy = 25
  176. Py = 25
  177.  
  178. function dropI()
  179. for i, v in pairs(type) do
  180. inew = t:Clone()
  181. inew.Text = v
  182. inew.ZIndex = 3
  183. inew.Position = UDim2.new(0,0,0,Iy)
  184. Iy = Iy + 25
  185. Ilab[#Ilab+1] = inew
  186. inew.Parent = Idd
  187. inew.MouseButton1Click:connect(function() Iclick(v) end)
  188. end
  189. Iy = 25
  190. end
  191.  
  192. function clearI()
  193. for i, v in pairs(Idd:children()) do
  194. v:Remove()
  195. end
  196. end
  197.  
  198. function Iclick(item)
  199. ctype = item
  200. clearI()
  201. Idd.Text = ctype
  202. end
  203.  
  204. function IddClicked()
  205. if Idd:children()[1] then
  206. clearI()
  207. else
  208. dropI()
  209. end
  210. end
  211.  
  212. function dropP()
  213. for i, v in pairs(parents) do
  214. pnew = t:Clone()
  215. pnew.Text = v
  216. pnew.ZIndex = 3
  217. pnew.Position = UDim2.new(0,0,0,Py)
  218. Py = Py + 25
  219. Plab[#Ilab+1] = pnew
  220. pnew.Parent = Pdd
  221. pnew.MouseButton1Click:connect(function() Pclick(v) end)
  222. end
  223. Py = 25
  224. end
  225.  
  226. function clearP()
  227. for i, v in pairs(Pdd:children()) do
  228. v:Remove()
  229. end
  230. end
  231.  
  232. function Pclick(item)
  233. cparent = item
  234. clearP()
  235. Pdd.Text = cparent
  236. end
  237.  
  238. function PddClicked()
  239. if Pdd:children()[1] then
  240. clearP()
  241. else
  242. dropP()
  243. end
  244. end
  245.  
  246. function findParent()
  247. if cparent == "Workspace" then
  248. return Workspace
  249. elseif cparent == "Lighting" then
  250. return game.Lighting
  251. elseif cparent == "StarterGui" then
  252. return game.StarterGui
  253. elseif cparent == "StarterPack" then
  254. return game.StarterPack
  255. elseif cparent == "Teams" then
  256. if game:findFirstChild("Teams") == nil then
  257. Instance.new("Teams").Parent = game
  258. end
  259. return game.Teams
  260. elseif cparent == "Your Character" then
  261. return player.Character
  262. else
  263. return nil
  264. end
  265. end
  266.  
  267. function insert()
  268. par = findParent()
  269. if par and ctype then
  270. ins = Instance.new(ctype)
  271. ins.Parent = par
  272. if ins:IsA("BasePart") then
  273. ins.Position = player.Character.Head.Position
  274. end
  275. ctype = nil
  276. cparent = "Workspace"
  277. Idd.Text = "Select"
  278. Pdd.Text = "Workspace"
  279. end
  280. end
  281.  
  282. Idd.MouseButton1Click:connect(IddClicked)
  283. Pdd.MouseButton1Click:connect(PddClicked)
  284. script.Parent.Insert.MouseButton1Click:connect(insert)
  285.  
  286. end
  287. coroutine.resume(coroutine.create(SCRIPT_EHOB88_FAKESCRIPT))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement