Advertisement
bobopopcornboy

Window

Aug 31st, 2024 (edited)
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.69 KB | None | 0 0
  1. screengui = Instance.new("ScreenGui")
  2. screengui.Parent = owner.PlayerGui
  3. frame = Instance.new("Frame")
  4. frame.Parent = screengui
  5. frame.Position = UDim2.new(0.798, 0, 0, 20)
  6. frame.Size = UDim2.new(0, 121, 0, 321)
  7. frame.BackgroundTransparency = 0.4
  8. sframe = Instance.new("ScrollingFrame")
  9. sframe.Parent = frame
  10. sframe.Size = UDim2.new(1,0,1,0)
  11. sframe.CanvasSize = UDim2.new(0,0,5,0)
  12. where = Instance.new("TextLabel")
  13. where.Parent = frame
  14. where.Position = UDim2.new(0,0,0,0)
  15. where.Size = UDim2.new(0,99,0,19)
  16. where.Text = "workspace"
  17. where.BackgroundColor = BrickColor.new(0.3, 0.9, 1)
  18. highlight = Instance.new("Highlight")
  19. highlight.Name = "selected"
  20. highlight.Parent = frame
  21. highlight.FillTransparency = 1
  22. highlight.OutlineColor = Color3.new(0.0980392, 0.788235, 1)
  23. back = Instance.new("TextButton")
  24. back.Parent = frame
  25. back.BackgroundTransparency = 0
  26. back.Text = "BACK"
  27. back.TextColor = BrickColor.Red()
  28. back.Position = UDim2.new(-.24,0,0,0.05)
  29. back.Size = UDim2.new(0,20,0,20)
  30. back.Name = "back"
  31. des = Instance.new("TextButton")
  32. des.Parent = frame
  33. des.BackgroundTransparency = 0
  34. des.Text = "DESTROY"
  35. des.TextColor = BrickColor.Red()
  36. des.Position = UDim2.new(-.24,0,0.1,1)
  37. des.Size = UDim2.new(0,20,0,20)
  38. des.Name = "DESTROY"
  39. wherepart = Instance.new("ObjectValue")
  40. wherepart.Parent = frame
  41. wherepart.Value = game.Workspace
  42. chil = Instance.new("Folder")
  43. chil.Parent = sframe
  44. wait(0.5)
  45. wherechil = wherepart.Value:GetChildren()
  46. for i= 1, #wherechil do
  47.     print("hi")
  48.     local CHILL = Instance.new("TextButton")
  49.     CHILL.Parent = chil
  50.     CHILL.Text = wherechil[i].Name
  51.     CHILL.Size = UDim2.new(0,99,0,19)
  52.     local ii = i * 0.02
  53.     CHILL.Position = UDim2.new(-0.008,0,ii)
  54.     c = Instance.new("ObjectValue")
  55.     c.Value = wherechil[i]
  56.     c.Parent = CHILL
  57.     c.Name = "ob"
  58. end
  59. print("hi")
  60. wherechil = wherepart.Value:GetChildren()
  61. wherepart.Changed:Connect(function()
  62.     if wherepart.Value ~= workspace then
  63.     highlight.Parent = wherepart.Value
  64.     else
  65.         highlight.Parent = frame    
  66.     end
  67.     where.Text = wherepart.Value.Name
  68.     wherechil = wherepart.Value:GetChildren()
  69.     chil:Destroy()
  70.     chil = Instance.new("Folder")
  71.     chil.Parent = sframe
  72.     if wherepart == game then
  73.         local CHILL = Instance.new("TextButton")
  74.         CHILL.Parent = chil
  75.         CHILL.Text = "Players"
  76.         CHILL.Size = UDim2.new(0,99,0,19)
  77.         local ii = #wherechil+1 * 0.02
  78.         CHILL.Position = UDim2.new(-0.008,0,ii)
  79.         c = Instance.new("ObjectValue")
  80.         c.Value = game.Players
  81.         c.Parent = CHILL
  82.         c.Name = "ob"
  83.     end
  84.     for i= 1, #wherechil do
  85.         local CHILL = Instance.new("TextButton")
  86.         CHILL.Parent = chil
  87.         local name = "ERROR"
  88.         if pcall(function() local hi = wherechil[i].Name  return hi end) then
  89.             _,name = pcall(function() return wherechil[i].Name end)
  90.         end
  91.         if type(name) ~= "string" then
  92.             name = "ERROR"
  93.         end
  94.         CHILL.Text = name
  95.         CHILL.Size = UDim2.new(0,99,0,19)
  96.         local ii = i * 0.02
  97.         CHILL.Position = UDim2.new(-0.008,0,ii)
  98.         c = Instance.new("ObjectValue")
  99.         c.Value = wherechil[i]
  100.         c.Parent = CHILL
  101.         c.Name = "ob"
  102.     end
  103. end)
  104. back.MouseButton1Down:Connect(function()
  105.     wherepart.Value = wherepart.Value.Parent
  106. end)
  107. des.MouseButton1Down:Connect(function()
  108.     local old = wherepart.Value.Parent
  109.     highlight.Parent = frame
  110.     wherepart.Value:Destroy()
  111.     wherepart.Value = old
  112. end)
  113. highlight.Destroying:Connect(function()
  114.     highlight = Instance.new("Highlight")
  115.     highlight.Name = "selected"
  116.     highlight.Parent = frame
  117.     highlight.FillTransparency = 1
  118.     highlight.OutlineColor = Color3.new(0.0980392, 0.788235, 1)
  119. end)
  120. while true do
  121.     wait(0.01)
  122.     cc = chil:GetChildren()
  123.     ccc = #cc
  124.     for iii = 1, ccc do
  125.         cc[iii].MouseButton1Up:Connect(function()
  126.             print("down")
  127.             wherepart.Value = cc[iii].ob.Value
  128.         end)
  129.     end
  130. end
Tags: Roblox
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement