bobopopcornboy

Window2

Sep 25th, 2024
12
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. screengui = Instance.new("ScreenGui")
  2. screengui.Parent = owner.PlayerGui
  3. event = workspace.delete.delete
  4. window = Instance.new("Frame")
  5. window.Parent = screengui
  6. window.Position = UDim2.new(0, 100, 0, 0)
  7. window.Size = UDim2.new(0, 171, 0, 341)
  8. window.BackgroundTransparency = 0.4
  9. moveB = Instance.new("TextButton")
  10. moveB.Parent = window
  11. moveB.Size = UDim2.new(1,0,0,15)
  12. moveB.Text = ""
  13. moveB.BackgroundColor3 = Color3.new(0.337255, 0.337255, 0.337255)
  14.  
  15. --window2 = Instance.new("Frame")
  16. --window2.Parent = screengui
  17. --window2.Position = UDim2.new(0, 300, 0, 0)
  18. --window2.Size = UDim2.new(0, 171, 0, 341)
  19. --window2.BackgroundTransparency = 0.4
  20. --moveB2 = Instance.new("TextButton")
  21. --moveB2.Parent = window2
  22. --moveB2.Size = UDim2.new(1,0,0,15)
  23. --moveB2.Text = "Properties"
  24. --moveB2.BackgroundColor3 = Color3.new(0.337255, 0.337255, 0.337255)
  25.  
  26. frame = Instance.new("UICorner")
  27. frame.Parent = moveB
  28.  
  29. --frame = Instance.new("UICorner")
  30. --frame.Parent = moveB2
  31.  
  32. frame = Instance.new("Frame")
  33. frame.Parent = window
  34. frame.Position = UDim2.new(0.2, 0, 0, 20)
  35. frame.Size = UDim2.new(0, 121, 0, 321)
  36. frame.BackgroundTransparency = 1
  37. sframe = Instance.new("ScrollingFrame")
  38. sframe.Parent = frame
  39. sframe.Size = UDim2.new(1,0,1,0)
  40. sframe.CanvasSize = UDim2.new(0,0,5,0)
  41. sframe.BackgroundTransparency = 0.4
  42. where = Instance.new("UIListLayout")
  43. where.Parent = sframe
  44.  
  45. --sframe2 = Instance.new("ScrollingFrame")
  46. --sframe2.Parent = window2
  47. --sframe2.Size = UDim2.new(1,0,0,321)
  48. --sframe2.CanvasSize = UDim2.new(0,0,5,0)
  49. --sframe2.BackgroundTransparency = 0.4
  50. --sframe2.Position = UDim2.new(0,0,0,20)
  51. --where = Instance.new("UIListLayout")
  52. --where.Parent = sframe2
  53. --where.FillDirection = "Horizontal"
  54.  
  55. --grid1 = Instance.new("Frame")
  56. --grid1.Parent = sframe2
  57. --grid1.Size = UDim2.new(0.5,0,0.1,0)
  58. --grid1.Transparency = 1
  59. --grid2 = Instance.new("Frame")
  60. --grid2.Parent = sframe2
  61. --grid2.Size = UDim2.new(0.5,0,0.1,0)
  62. --grid2.Position = UDim2.new(0.5,0,0,0)
  63. --grid2.Transparency = 1
  64. --where = Instance.new("UIListLayout")
  65. --where.Parent = grid1
  66. --where = Instance.new("UIListLayout")
  67. --where.Parent = grid2
  68. --grid1folder = Instance.new("Folder")
  69. --grid1folder.Parent = grid1
  70. --grid2folder = Instance.new("Folder")
  71. --grid2folder.Parent = grid2
  72.  
  73. where = Instance.new("TextLabel")
  74. where.Parent = frame
  75. where.Position = UDim2.new(0,0,0,0)
  76. where.Size = UDim2.new(0,99,0,19)
  77. where.Text = "workspace"
  78. where.BackgroundColor = BrickColor.new(0.3, 0.9, 1)
  79. highlight = Instance.new("Highlight")
  80. highlight.Name = "selected"
  81. highlight.Parent = frame
  82. highlight.FillTransparency = 1
  83. highlight.OutlineColor = Color3.new(0.0980392, 0.788235, 1)
  84. back = Instance.new("TextButton")
  85. back.Parent = frame
  86. back.BackgroundTransparency = 0
  87. back.Text = "BACK"
  88. back.TextColor = BrickColor.Red()
  89. back.Position = UDim2.new(-.24,0,0,0.05)
  90. back.Size = UDim2.new(0,20,0,20)
  91. back.Name = "back"
  92. des = Instance.new("TextButton")
  93. des.Parent = frame
  94. des.BackgroundTransparency = 0
  95. des.Text = "DESTROY"
  96. des.TextColor = BrickColor.Red()
  97. des.Position = UDim2.new(-.24,0,0.1,1)
  98. des.Size = UDim2.new(0,20,0,20)
  99. des.Name = "DESTROY"
  100. wherepart = Instance.new("ObjectValue")
  101. wherepart.Parent = frame
  102. wherepart.Value = game.Workspace
  103. chil = Instance.new("Folder")
  104. chil.Parent = sframe
  105. wait(0.5)
  106. wherechil = wherepart.Value:GetChildren()
  107. for i= 1, #wherechil do
  108.     print("hi")
  109.     local CHILL = Instance.new("TextButton")
  110.     CHILL.Parent = chil
  111.     CHILL.Text = wherechil[i].Name
  112.     CHILL.Size = UDim2.new(0,99,0,19)
  113.     local ii = i * 0.02
  114.     CHILL.Position = UDim2.new(-0.008,0,ii)
  115.     c = Instance.new("ObjectValue")
  116.     c.Value = wherechil[i]
  117.     c.Parent = CHILL
  118.     c.Name = "ob"
  119. end
  120.  
  121.  
  122.  
  123. print("hi")
  124. wherechil = wherepart.Value:GetChildren()
  125. wherepart.Changed:Connect(function()
  126.     highlight.Parent = wherepart.Value
  127.     where.Text = wherepart.Value.Name
  128.     wherechil = wherepart.Value:GetChildren()
  129.     chil:ClearAllChildren()
  130.     for i= 1, #wherechil do
  131.         if wherechil[i] ~= highlight then
  132.         local CHILL = Instance.new("TextButton")
  133.         CHILL.Parent = chil
  134.         CHILL.Text = wherechil[i].Name
  135.         CHILL.Size = UDim2.new(0,99,0,19)
  136.         local ii = i * 0.02
  137.         CHILL.Position = UDim2.new(-0.008,0,ii)
  138.         c = Instance.new("ObjectValue")
  139.         c.Value = wherechil[i]
  140.         c.Parent = CHILL
  141.         c.Name = "ob"
  142.         end
  143.     end
  144. end)
  145. back.MouseButton1Down:Connect(function()
  146. if not wherepart.Value or not wherepart.Value.Parent then
  147. wherepart.Value = workspace
  148. end
  149. wherepart.Value = wherepart.Value.Parent
  150. end)
  151. des.MouseButton1Down:Connect(function()
  152.     local old = wherepart.Value.Parent
  153.     highlight.Parent = frame
  154.     event:FireServer(wherepart.Value)
  155.     wherepart.Value = old
  156. end)
  157. highlight.Destroying:Connect(function()
  158.     highlight = Instance.new("Highlight")
  159.     highlight.Name = "selected"
  160.     highlight.Parent = frame
  161.     highlight.FillTransparency = 1
  162.     highlight.OutlineColor = Color3.new(0.0980392, 0.788235, 1)
  163. end)
  164.  
  165. --window script
  166. mouse = owner:GetMouse()
  167. mx,my = mouse.X,mouse.Y
  168. sx,sy = 0,0
  169. moveB.MouseButton1Down:Connect(function()
  170.     sx,sy = mouse.X,mouse.Y
  171. end)
  172. moveB.MouseButton1Up:Connect(function()
  173.     sx,sy = 0,0
  174. end)
  175. mouse.Button1Up:Connect(function()
  176.     sx,sy = 0,0
  177. end)
  178.  
  179. mouse.Move:Connect(function()
  180.     if sx ~= 0 then
  181.         mx,my = mouse.X,mouse.Y
  182.         local dxy = window.Position
  183.         local dx,dy = dxy.X.Offset,dxy.Y.Offset
  184.         local nx,ny = dx+(mx-sx),dy+(my-sy)
  185.         window.Position = UDim2.new(0,nx,0,ny)
  186.         sx,sy = mouse.X,mouse.Y
  187.     end
  188. end)
  189.  
  190. --window script2
  191. --mouse = owner:GetMouse()
  192. --mx,my = mouse.X,mouse.Y
  193. --sx2,sy2 = 0,0
  194. --moveB2.MouseButton1Down:Connect(function()
  195. --  sx2,sy2 = mouse.X,mouse.Y
  196. --end)
  197. --moveB2.MouseButton1Up:Connect(function()
  198. --  sx2,sy2 = 0,0
  199. --end)
  200. --mouse.Button1Up:Connect(function()
  201. --  sx2,sy2 = 0,0
  202. --end)
  203. --
  204. --mouse.Move:Connect(function()
  205. --  if sx2 ~= 0 then
  206. --      local size = workspace.CurrentCamera.ViewportSize
  207. --      local ssx = size.X
  208. --      local ssy = size.Y
  209. --      mx,my = mouse.X,mouse.Y
  210. --      local dxy = window2.Position
  211. --      local dx,dy = dxy.X.Offset,dxy.Y.Offset
  212. --      local nx,ny = dx+(mx-sx2),dy+(my-sy2)
  213. --      window2.Position = UDim2.new(0,nx,0,ny)
  214. --      sx2,sy2 = mouse.X,mouse.Y
  215. --  end
  216. --end)
  217.  
  218. --while loop
  219. while true do
  220.     wait(0.01)
  221.     cc = chil:GetChildren()
  222.     ccc = #cc
  223.     for iii = 1, ccc do
  224.         cc[iii].MouseButton1Up:Connect(function()
  225.             print("down")
  226.             wherepart.Value = cc[iii].ob.Value
  227.         end)
  228.     end
  229. end
Add Comment
Please, Sign In to add comment