Advertisement
GForcebit

Minimap?

Apr 28th, 2018
411
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --Original Creator/Paste DUCKYHACKS4SALE/https://pastebin.com/2k1yhzrE
  2. pos = game.Workspace[game.Players.LocalPlayer.Name].Torso.Position + Vector3.new(0,.5,0)
  3. small = 50
  4.  
  5. local model = Instance.new("Model",workspace)
  6. model.Name = "Lol MAP"
  7. model.Parent = game.Lighting
  8.  
  9. objs = {}
  10.  
  11. function showpart(part,ta)
  12. if part:IsA("BasePart") then
  13. local p = Instance.new("Part")
  14. p.formFactor = "Symmetric"
  15. p.Size = Vector3.new(1,1,1)
  16. p.BrickColor = part.BrickColor
  17. p.TopSurface = part.TopSurface
  18. p.BottomSurface = part.BottomSurface
  19. p.RightSurface = part.RightSurface
  20. p.LeftSurface = part.LeftSurface
  21. p.FrontSurface = part.FrontSurface
  22. p.BackSurface = part.BackSurface
  23. p.Material = part.Material
  24. p.Reflectance = part.Reflectance
  25. p.Transparency = part.Transparency
  26. p.Anchored = true
  27. p.CanCollide = false
  28. local m = Instance.new("BlockMesh",p)
  29. m.Scale = Vector3.new(part.Size.X/small, part.Size.Y/small, part.Size.Z/small)
  30. part.Changed:connect(function()
  31. p.BrickColor = part.BrickColor
  32. p.Transparency = part.Transparency
  33. m.Scale = Vector3.new(part.Size.X/small, part.Size.Y/small, part.Size.Z/small)
  34. p.Reflectance = part.Reflectance
  35. end)
  36. p.Parent = model
  37. table.insert(ta,p)
  38. end
  39. end
  40.  
  41. function parts(p)
  42. p.ChildAdded:connect(function(obj)
  43. if obj:IsA("BasePart") then
  44. local t = {obj}
  45. showpart(obj,t)
  46. table.insert(objs,t)
  47. end
  48. end)
  49. p.ChildRemoved:connect(function(obj)
  50. for i,v in pairs(objs) do
  51. if obj == v[1] then
  52. v[2]:remove()
  53. table.remove(objs,i)
  54. end
  55. end
  56. end)
  57. for _,v in pairs(p:children()) do
  58. if v:IsA("BasePart") and p.Name ~= "Lol MAP" then
  59. local t = {v}
  60. showpart(v,t)
  61. table.insert(objs,t)
  62. end
  63. parts(v)
  64. end
  65. end
  66.  
  67. parts(workspace)
  68.  
  69. while true do
  70. wait()
  71. for _,v in pairs(objs) do
  72. local a,b,c = v[1].CFrame.x, v[1].CFrame.y, v[1].CFrame.z
  73. local d,e,f = v[1].CFrame:toEulerAnglesXYZ()
  74. v[2].CFrame = CFrame.new(pos) * CFrame.new(a/small,b/small,c/small) * CFrame.Angles(d,e,f)
  75. end
  76. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement