SebTDZ

Mini Map Part 1

Aug 23rd, 2019
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.52 KB | None | 0 0
  1. -- Farewell Infortality.
  2. -- Version: 2.82
  3. -- Instances:
  4. local ScreenGui = Instance.new("ScreenGui")
  5. --Properties:
  6. ScreenGui.Parent = owner:WaitForChild("PlayerGui")
  7. ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  8.  
  9. local viewportFrame = Instance.new("ViewportFrame")
  10. viewportFrame.Size = UDim2.new(0.3, 0, 0.4, 0)
  11. viewportFrame.Position = UDim2.new(0, 15, 0, 15)
  12. viewportFrame.BackgroundColor3 = Color3.new(0, 0, 0)
  13. viewportFrame.BorderColor3 = Color3.new(0.6, 0.5, 0.4)
  14. viewportFrame.BorderSizePixel = 2
  15. viewportFrame.BackgroundTransparency = 0.25
  16. viewportFrame.Parent = ScreenGui
  17.  
  18. local viewportCamera = Instance.new("Camera")
  19. viewportFrame.CurrentCamera = viewportCamera
  20. viewportCamera.Parent = viewportFrame
  21.  
  22. viewportCamera.CFrame = CFrame.new(Vector3.new(0, 700, 0), Vector3.new(0, 0, 0))
  23. local Point1 = Vector3.new(-2500,-10,-2500)
  24. local Point2 = Vector3.new(2500,2500,2000)
  25. local Region = Region3.new(Point1,Point2)
  26. for _,Part in pairs(game.Workspace:FindPartsInRegion3(Region,nil,math.huge)) do
  27.     local Part = Part:Clone()
  28.     Part.Parent = viewportFrame
  29.     if Part.Name == "Head" then
  30.         local Pos = Instance.new("Part", viewportFrame)
  31.         Pos.Name = "Pos"
  32.         Pos.Size = Vector3.new(0.1,10.3,10.3)
  33.         Pos.Position = Part.Position
  34.         Pos.Rotation = Vector3.new(0, 0, 90)
  35.         Pos.CanCollide = true
  36.         Pos.Anchored = true
  37.         Pos.Shape = Enum.PartType.Cylinder
  38.         Pos.TopSurface = Enum.SurfaceType.Smooth
  39.         Pos.BottomSurface = Enum.SurfaceType.Smooth
  40.     end
  41.     for i,o in pairs(Part:GetChildren()) do
  42.         o:Remove()
  43.     end
  44. end
Advertisement
Add Comment
Please, Sign In to add comment