Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local screengui = Instance.new("ScreenGui", game.StarterGui)
- local baseplate = workspace.baseplate
- local frame = Instance.new("Frame", screengui)
- frame.Position = UDim2.new(0.79, 0,0.72, 0)
- frame.BackgroundColor3 = workspace.baseplate.BrickColor.Color
- frame.Size = UDim2.new(0, 200, 0, 200)
- frame.BorderSizePixel = 0
- for i, obj in pairs(workspace:GetChildren()) do
- if obj:IsA("Model") or obj:IsA("Folder") then
- for _,t in pairs(obj:GetChildren()) do
- if t:IsA("Model") or t:IsA("Folder") then
- for b,p in pairs(t:GetChildren()) do
- if p:IsA("Part") or p:IsA("MeshPart") then
- local label = Instance.new("TextLabel", frame)
- label.Text = ""
- label.BorderSizePixel = 0
- label.BackgroundColor3 = p.BrickColor.Color
- label.Size = UDim2.new(p.Size.X /baseplate.Size.X, 0, p.Size.Z /baseplate.Size.Z, 0)
- 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)
- label.Transparency = p.Transparency
- if p.Rotation.X == -180 and p.Rotation.X == -180 then
- label.Rotation = p.Rotation.Y
- else
- label.Rotation = -p.Rotation.Y
- end
- end
- end
- elseif t:IsA("Part") or t:IsA("MeshPart") then
- local label = Instance.new("TextLabel", frame)
- label.Text = ""
- label.BorderSizePixel = 0
- label.BackgroundColor3 = t.BrickColor.Color
- label.Size = UDim2.new(t.Size.X /baseplate.Size.X, 0, t.Size.Z /baseplate.Size.Z, 0)
- 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)
- label.Transparency = t.Transparency
- if t.Rotation.X == -180 and t.Rotation.X == -180 then
- label.Rotation = t.Rotation.Y
- else
- label.Rotation = -t.Rotation.Y
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement