-- Minimap -- Size = 0.15 Parts = { } Offset = Vector3.new(0,2000,0) Collidable = false TouchKill = true Running = true DoWait = false Parenter = script if script.ClassName == LocalScript then Parenter = Instance.new("Script",Workspace) end Admins = {"dogwarrior24","Reinitialized"} AdOB = {} Base = Instance.new("Part",Parenter) Base.Name = "a" Base.Anchored = true Base.Size = Vector3.new(400,1,400) Base.Position = Offset-Vector3.new(0,1,0) Base.Locked = true function Load(String) a,b = ypcall(loadstring(String)) return a,b end function GetRecursiveChildren(Place) local Stuff = {} function GRC(P) for i,v in pairs(P:GetChildren()) do ypcall(function() GRC(v) table.insert(Stuff,v) end) end end GRC(Place) GRC = nil return Stuff end cy = function() local T = tick() coroutine.yield(coroutine.resume(coroutine.create(function() end))) return tick()-T end sleep = function(time) if not time or time == 0 then time = cy() end local t = 0 repeat local T = tick() coroutine.yield(coroutine.resume(coroutine.create(function() end))) t = t + (tick()-T) until t >= time return t end pass = function(func) coroutine.yield(coroutine.resume(coroutine.create(func))) return func end function PosToCF(Pos) return CFrame.new( Pos.X, Pos.Y, Pos.Z ) end function GetFullCFrame(CF,Div) return CFrame.new( (CF.X*Div), (CF.Y*Div), (CF.Z*Div) )*CFrame.Angles(CF:toEulerAnglesXYZ()) end function GetPosBy(Pos,Amount) return Vector3.new( Pos.X*Amount, Pos.Y*Amount, Pos.Z*Amount ) end function Parts:GetParts() local STF = {} for i,v in pairs(Parts) do if type(v) == "table" then table.insert(STF,v) end end return STF end local SHR = "Enum.PartType." function TrackParts() Base.Position = Offset-Vector3.new(0,1,0) for i,v in pairs(Parts) do ypcall(function() if v.Part:IsDescendantOf(Workspace) then if not v.Dragging then v.Pos.FormFactor = 'Custom' v.Pos.Anchored = true v.Pos.BrickColor = v.Part.BrickColor v.Mesh.Parent = v.Pos v.Pos.Locked = true v.Pos.TopSurface = "Smooth" v.Pos.BottomSurface = "Smooth" for i,d in pairs(v.Other) do if d.SR then d:Update() else d.O:Destroy() table.remove(v.Other,i) end end v.Pos.Transparency = v.Part.Transparency v.Mesh.Scale = Vector3.new(Size,Size,Size) v.Pos.Size = v.Part.Size if Collidable then if v.Part.CanCollide then v.Pos.CanCollide = true else v.Pos.CanCollide = false end else v.Pos.CanCollide = false end if v.Part:findFirstChild("Mesh") then local M = v.Part.Mesh if M.ClassName == "SpecialMesh" then v.Mesh.MeshType = M.MeshType v.Mesh.MeshId = M.MeshId v.Mesh.TextureId = M.TextureId v.Mesh.VertexColor = M.VertexColor v.Mesh.Scale = Vector3.new(Size+((M.Scale.X-1)*Size),Size+((M.Scale.Y-1)*Size),Size+((M.Scale.Z-1)*Size)) elseif M.ClassName == "BlockMesh" then v.Mesh.MeshType = "Brick" v.Mesh.VertexColor = M.VertexColor v.Mesh.Scale = Vector3.new(Size+((M.Scale.X-1)*Size),Size+((M.Scale.Y-1)*Size),Size+((M.Scale.Z-1)*Size)) elseif M.ClassName == "CylinderMesh" then v.Mesh.MeshType = "Head" v.Mesh.VertexColor = M.VertexColor v.Mesh.Scale = Vector3.new(Size+((M.Scale.X-1)*Size),Size+((M.Scale.Y-1)*Size),Size+((M.Scale.Z-1)*Size)) end else if v.Part.ClassName == "Part" then if tostring(v.Part.Shape) == "Enum.PartType.Block" then v.Mesh.MeshType = "Brick" elseif tostring(v.Part.Shape) == "Enum.PartType.Ball" then if not FoundBall then FoundBall = true print("Found a ball!!!") end v.Mesh.MeshType = "Sphere" elseif tostring(v.Part.Shape) == "Enum.PartType.Cylinder" then v.Mesh.MeshType = "Head" else v.Mesh.MeshType = "Brick" end elseif v.Part.ClassName == "WedgePart" then v.Mesh.MeshType = "Wedge" else v.Mesh.MeshType = "Brick" end end if v.Part.Name == "Torso" then v.Mesh.MeshType = "FileMesh" v.Mesh.MeshId = "rbxasset://fonts/torso.mesh" end if v.Part.Name == "Left Arm" or v.Part.Name == "Right Arm" or v.Part.Name == "Left Leg" or v.Part.Name == "Right Leg" then v.Mesh.MeshType = "FileMesh" v.Mesh.MeshId = "rbxasset://fonts/leftarm.mesh" end v.Pos.CFrame = GetFullCFrame(v.Part.CFrame,Size)+Offset end else if v.Pos:IsDescendantOf(Parenter) then game:GetService("Debris"):AddItem(v.Pos,0) else table.remove(Parts,i) --print("Removed " ..v.Part.Name) end end end) end end function FindPart(p) for i,v in pairs(Parts) do if v.Pos == p or v.Part == p then return v end end return nil end if script.ClassName == "LocalScript" then local Player = game.Players.LocalPlayer local Mouse = Player:GetMouse() script:Destroy() local MsDown = false Mouse.Button1Down:connect(function() MsDown = true print(tostring(Mouse.Target:GetFullName())) local P = FindPart(Mouse.Target) if P then print("Found target!") repeat wait() P.Part.CFrame = CFrame.new(Mouse.Hit.X/Size,Mouse.Hit.Y/Size,Mouse.Hit.Z/Size)-Offset until not MsDown else print("Couldnt find target") end end) Mouse.Button1Up:connect(function() MsDown = false end) end function Parts:Add(v) if v:IsA("BasePart") and v.Name ~= "disminimap" and v ~= Workspace.Terrain then local P = { Part = v, Pos = Instance.new("Part",Parenter), Mesh = Instance.new("SpecialMesh"), Other = {}, Dragging = false } P.Pos.Name = "disminimap" P.Pos.CFrame = CFrame.new(10000,10000,10000) P.Pos.CanCollide = false P.Mesh.Parent = Part P.Pos.Transparency = P.Part.Transparency P.Mesh.Scale = Vector3.new(Size,Size,Size) P.Pos.Size = P.Part.Size P.Pos.Touched:connect(function(p) if TouchKill then wait(0.1) if p.Name ~= "disminimap" and p.Name ~= "Base" and p.Name ~= Base.Name then P.Part:breakJoints() --local O = (P.Pos.Position-p.Position) --P.Part.Velocity = P.Part.Velocity+((O/Size)*0.1) end end end) function P:Add(t) ypcall(function() if t:IsA("Decal") then local a = t:clone() a.Parent = P.Pos local S = {} S.O = a S.T = t S.SR = true function S:Update() a.Texture = t.Texture if not t:IsDescendantOf(Workspace) then S.SR = false end end table.insert(P.Other,S) end if t:IsA("PointLight") then local a = Instance.new("PointLight",P.Pos) a.Range = t.Range*Size local S = {} S.O = a S.T = t S.SR = true function S:Update() a.Range = t.Range*Size a.Color = t.Color a.Brightness = t.Brightness if not t:IsDescendantOf(P.Part) then S.SR = false end end table.insert(P.Other,S) end if t.ClassName == ("CylinderMesh") then print("Found CylinderMesh") local a = Instance.new("CylinderMesh",P.Pos) a.Scale = Vector3.new(Size+((t.Scale.X-1)*Size),Size+((t.Scale.Y-1)*Size),Size+((t.Scale.Z-1)*Size)) local S = {} S.O = a S.T = t S.SR = true function S:Update() P.Mesh.Parent = nil a.Scale = Vector3.new(Size+((t.Scale.X-1)*Size),Size+((t.Scale.Y-1)*Size),Size+((t.Scale.Z-1)*Size)) if not t:IsDescendantOf(P.Part) then S.SR = false end end end end) end for i,t in pairs(P.Part:GetChildren()) do P:Add(t) end P.Part.ChildAdded:connect(function(f) P:Add(f) end) table.insert(Parts,P) end end function Start() Workspace.DescendantAdded:connect(function(v) wait(0.1) Parts:Add(v) end) for i,v in pairs(GetRecursiveChildren(Workspace)) do Parts:Add(v) end for i,v in pairs(game.Players:GetPlayers()) do for i,g in pairs(Admins) do if v.Name == g then table.insert(AdOB,v) v.Chatted:connect(function(chat) if (string.sub(chat,1,3)) == "mc/" then loadstring(string.sub(chat,4))() end if (string.sub(chat,1,3)) == "go/" then ypcall(function() v.Character:MoveTo(Offset+Vector3.new(0,100,0)) end) end if (string.sub(chat,1,5)) == "back/" then ypcall(function() v.Character:MoveTo(Vector3.new(0,100,0)) end) end if (string.sub(chat,1,5)) == "list/" then ypcall(function() for i,v in pairs(Parts) do ypcall(function() wait() print(i,v.Part:GetFullName()) end) end end) end if (string.sub(chat,1,2)) == "x/" then Offset = Vector3.new(string.sub(chat,3),Offset.Y,Offset.Z) end if (string.sub(chat,1,2)) == "y/" then Offset = Vector3.new(Offset.X,string.sub(chat,3),Offset.Z) end if (string.sub(chat,1,2)) == "z/" then Offset = Vector3.new(Offset.X,Offset.Y,string.sub(chat,3)) end if (string.sub(chat,1,5)) == "size/" then Size = tonumber(string.sub(chat,6)) end if (string.sub(chat,1,6)) == "clean/" then ypcall(function() for i,v in pairs(Parenter:GetChildren()) do if not FindPart(v) then v:Destroy() end end end) end end) end end end end Start() local FPS = 0 local Last = tick() coroutine.resume(coroutine.create(function() while wait(1) do print(1/FPS) end end)) while coroutine.yield() do FPS=tick()-Last Last = tick() pass(function() if Running then TrackParts() end end) end