Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- screengui = Instance.new("ScreenGui")
- screengui.Parent = owner.PlayerGui
- frame = Instance.new("Frame")
- frame.Parent = screengui
- frame.Position = UDim2.new(0.798, 0, 0, 20)
- frame.Size = UDim2.new(0, 121, 0, 321)
- frame.BackgroundTransparency = 0.4
- sframe = Instance.new("ScrollingFrame")
- sframe.Parent = frame
- sframe.Size = UDim2.new(1,0,1,0)
- sframe.CanvasSize = UDim2.new(0,0,5,0)
- where = Instance.new("TextLabel")
- where.Parent = frame
- where.Position = UDim2.new(0,0,0,0)
- where.Size = UDim2.new(0,99,0,19)
- where.Text = "workspace"
- where.BackgroundColor = BrickColor.new(0.3, 0.9, 1)
- highlight = Instance.new("Highlight")
- highlight.Name = "selected"
- highlight.Parent = frame
- highlight.FillTransparency = 1
- highlight.OutlineColor = Color3.new(0.0980392, 0.788235, 1)
- back = Instance.new("TextButton")
- back.Parent = frame
- back.BackgroundTransparency = 0
- back.Text = "BACK"
- back.TextColor = BrickColor.Red()
- back.Position = UDim2.new(-.24,0,0,0.05)
- back.Size = UDim2.new(0,20,0,20)
- back.Name = "back"
- des = Instance.new("TextButton")
- des.Parent = frame
- des.BackgroundTransparency = 0
- des.Text = "DESTROY"
- des.TextColor = BrickColor.Red()
- des.Position = UDim2.new(-.24,0,0.1,1)
- des.Size = UDim2.new(0,20,0,20)
- des.Name = "DESTROY"
- wherepart = Instance.new("ObjectValue")
- wherepart.Parent = frame
- wherepart.Value = game.Workspace
- chil = Instance.new("Folder")
- chil.Parent = sframe
- wait(0.5)
- wherechil = wherepart.Value:GetChildren()
- for i= 1, #wherechil do
- print("hi")
- local CHILL = Instance.new("TextButton")
- CHILL.Parent = chil
- CHILL.Text = wherechil[i].Name
- CHILL.Size = UDim2.new(0,99,0,19)
- local ii = i * 0.02
- CHILL.Position = UDim2.new(-0.008,0,ii)
- c = Instance.new("ObjectValue")
- c.Value = wherechil[i]
- c.Parent = CHILL
- c.Name = "ob"
- end
- print("hi")
- wherechil = wherepart.Value:GetChildren()
- wherepart.Changed:Connect(function()
- if wherepart.Value ~= workspace then
- highlight.Parent = wherepart.Value
- else
- highlight.Parent = frame
- end
- where.Text = wherepart.Value.Name
- wherechil = wherepart.Value:GetChildren()
- chil:Destroy()
- chil = Instance.new("Folder")
- chil.Parent = sframe
- if wherepart == game then
- local CHILL = Instance.new("TextButton")
- CHILL.Parent = chil
- CHILL.Text = "Players"
- CHILL.Size = UDim2.new(0,99,0,19)
- local ii = #wherechil+1 * 0.02
- CHILL.Position = UDim2.new(-0.008,0,ii)
- c = Instance.new("ObjectValue")
- c.Value = game.Players
- c.Parent = CHILL
- c.Name = "ob"
- end
- for i= 1, #wherechil do
- local CHILL = Instance.new("TextButton")
- CHILL.Parent = chil
- local name = "ERROR"
- if pcall(function() local hi = wherechil[i].Name return hi end) then
- _,name = pcall(function() return wherechil[i].Name end)
- end
- if type(name) ~= "string" then
- name = "ERROR"
- end
- CHILL.Text = name
- CHILL.Size = UDim2.new(0,99,0,19)
- local ii = i * 0.02
- CHILL.Position = UDim2.new(-0.008,0,ii)
- c = Instance.new("ObjectValue")
- c.Value = wherechil[i]
- c.Parent = CHILL
- c.Name = "ob"
- end
- end)
- back.MouseButton1Down:Connect(function()
- wherepart.Value = wherepart.Value.Parent
- end)
- des.MouseButton1Down:Connect(function()
- local old = wherepart.Value.Parent
- highlight.Parent = frame
- wherepart.Value:Destroy()
- wherepart.Value = old
- end)
- highlight.Destroying:Connect(function()
- highlight = Instance.new("Highlight")
- highlight.Name = "selected"
- highlight.Parent = frame
- highlight.FillTransparency = 1
- highlight.OutlineColor = Color3.new(0.0980392, 0.788235, 1)
- end)
- while true do
- wait(0.01)
- cc = chil:GetChildren()
- ccc = #cc
- for iii = 1, ccc do
- cc[iii].MouseButton1Up:Connect(function()
- print("down")
- wherepart.Value = cc[iii].ob.Value
- end)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement