Advertisement
Guest User

Untitled

a guest
Dec 17th, 2018
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.00 KB | None | 0 0
  1. local screengui = Instance.new("ScreenGui", game.StarterGui)
  2. local baseplate = workspace.baseplate
  3. local frame = Instance.new("Frame", screengui)
  4. frame.Position = UDim2.new(0.79, 0,0.72, 0)
  5. frame.BackgroundColor3 = workspace.baseplate.BrickColor.Color
  6. frame.Size = UDim2.new(0, 200, 0, 200)
  7. frame.BorderSizePixel = 0
  8.  
  9. for i, obj in pairs(workspace:GetChildren()) do
  10.     if obj:IsA("Model") or obj:IsA("Folder") then
  11.         for _,t in pairs(obj:GetChildren()) do
  12.             if t:IsA("Model") or t:IsA("Folder") then
  13.                 for b,p in pairs(t:GetChildren()) do
  14.                     if p:IsA("Part") or p:IsA("MeshPart") then
  15.                         local label = Instance.new("TextLabel", frame)
  16.                         label.Text = ""
  17.                         label.BorderSizePixel = 0
  18.                         label.BackgroundColor3 = p.BrickColor.Color
  19.                         label.Size = UDim2.new(p.Size.X /baseplate.Size.X, 0, p.Size.Z /baseplate.Size.Z, 0)
  20.                         label.Position = UDim2.new((p.Position.X -(p.Size.X /2) -(baseplate.Position.X -(baseplate.Size.X /2))) /baseplate.Size.X, 0, (p.Position.Z -(p.Size.Z /2) -(baseplate.Position.Z -(baseplate.Size.Z /2))) /baseplate.Size.Z, 0)
  21.                         label.Transparency = p.Transparency
  22.                         if p.Rotation.X == -180 and p.Rotation.X == -180 then
  23.                             label.Rotation = p.Rotation.Y
  24.                         else
  25.                             label.Rotation = -p.Rotation.Y
  26.                         end
  27.                     end
  28.                 end
  29.             elseif t:IsA("Part") or t:IsA("MeshPart") then
  30.                 local label = Instance.new("TextLabel", frame)
  31.                 label.Text = ""
  32.                 label.BorderSizePixel = 0
  33.                 label.BackgroundColor3 = t.BrickColor.Color
  34.                 label.Size = UDim2.new(t.Size.X /baseplate.Size.X, 0, t.Size.Z /baseplate.Size.Z, 0)
  35.                 label.Position = UDim2.new((t.Position.X -(t.Size.X /2) -(baseplate.Position.X -(baseplate.Size.X /2))) /baseplate.Size.X, 0, (t.Position.Z -(t.Size.Z /2) -(baseplate.Position.Z -(baseplate.Size.Z /2))) /baseplate.Size.Z, 0)
  36.                 label.Transparency = t.Transparency
  37.                 if t.Rotation.X == -180 and t.Rotation.X == -180 then
  38.                     label.Rotation = t.Rotation.Y
  39.                 else
  40.                     label.Rotation = -t.Rotation.Y
  41.                 end
  42.             end
  43.         end
  44.     end
  45. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement