Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- 7/4/2020 by Konethorix
- local plr = game:GetService("Players").LocalPlayer
- repeat wait() until workspace.CurrentCamera
- local cam = workspace.CurrentCamera
- local run = game:GetService("RunService")
- -- Instances:
- local RadarGui = Instance.new("ScreenGui")
- local Frame = Instance.new("Frame")
- local Viewport = Instance.new("ViewportFrame")
- local Title = Instance.new("TextLabel")
- local Exit = Instance.new("TextButton")
- local Mini = Instance.new("TextButton")
- local Arrow = Instance.new("ImageLabel")
- local Dot = Instance.new("ImageLabel")
- local Dist = Instance.new("TextButton")
- local Range_ = Instance.new("TextLabel")
- local Range = Instance.new("TextLabel")
- local Refresh = Instance.new("TextButton")
- local exited = false
- local minied = false
- local height = 4000
- --Properties:
- RadarGui.Name = "RadarGui"
- RadarGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- RadarGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- RadarGui.ResetOnSpawn = false
- Frame.Parent = RadarGui
- Frame.Active = true
- Frame.BackgroundColor3 = Color3.fromRGB(85, 170, 255)
- Frame.Draggable = true
- Frame.Position = UDim2.new(0, 50, 1, -400)
- Frame.Size = UDim2.new(0, 320, 0, 30)
- Viewport.BackgroundColor3 = Color3.fromRGB(74, 74, 74)
- Viewport.Name = "Viewport"
- Viewport.Parent = Frame
- Viewport.BackgroundColor3 = Color3.fromRGB(74, 74, 74)
- Viewport.Size = UDim2.new(0, 320, 0, 320)
- Viewport.Position = UDim2.new(0, 0, 1, 0)
- Viewport.LightDirection = Vector3.new(0,1,0)
- Viewport.Ambient = Color3.new(1,1,1)
- Viewport.LightColor = Color3.new(1,1,1)
- Title.Name = "Title"
- Title.Parent = Frame
- Title.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Title.BackgroundTransparency = 1.000
- Title.Size = UDim2.new(0, 260, 1, 0)
- Title.Font = Enum.Font.SourceSans
- Title.Text = "Top down radar by Konethorix"
- Title.TextColor3 = Color3.fromRGB(0, 0, 0)
- Title.TextScaled = true
- Title.TextSize = 14.000
- Title.TextWrapped = true
- Exit.Name = "Exit"
- Exit.Parent = Frame
- Exit.BackgroundColor3 = Color3.fromRGB(255, 76, 76)
- Exit.Position = UDim2.new(0, 290, 0, 0)
- Exit.Size = UDim2.new(0, 30, 1, 0)
- Exit.Font = Enum.Font.SourceSans
- Exit.Text = "X"
- Exit.TextColor3 = Color3.fromRGB(0, 0, 0)
- Exit.TextScaled = true
- Exit.TextSize = 14.000
- Exit.TextWrapped = true
- Mini.Name = "Mini"
- Mini.Parent = Frame
- Mini.BackgroundColor3 = Color3.fromRGB(255, 201, 62)
- Mini.Position = UDim2.new(0, 260, 0, 0)
- Mini.Size = UDim2.new(0, 30, 1, 0)
- Mini.Font = Enum.Font.SourceSans
- Mini.Text = "_"
- Mini.TextColor3 = Color3.fromRGB(0, 0, 0)
- Mini.TextScaled = true
- Mini.TextSize = 14.000
- Mini.TextWrapped = true
- Arrow.Name = "Arrow"
- Arrow.Parent = Viewport
- Arrow.AnchorPoint = Vector2.new(0.5, 0.5)
- Arrow.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Arrow.BackgroundTransparency = 1.000
- Arrow.Position = UDim2.new(0.5, 0, 0.5, 0)
- Arrow.Size = UDim2.new(0, 30, 0, 20)
- Arrow.Image = "rbxassetid://402675744"
- Arrow.ImageColor3 = Color3.fromRGB(255, 53, 53)
- Arrow.Visible = false
- Dot.Name = "Dot"
- Dot.Parent = Viewport
- Dot.AnchorPoint = Vector2.new(0.5, 0.5)
- Dot.BackgroundColor3 = Color3.fromRGB(0, 170, 255)
- Dot.BorderSizePixel = 2
- Dot.Position = UDim2.new(0.5, 0, 0.5, 0)
- Dot.Size = UDim2.new(0, 6, 0, 6)
- Dist.Name = "Dist"
- Dist.Parent = Viewport
- Dist.BackgroundColor3 = Color3.fromRGB(0, 170, 255)
- Dist.Position = UDim2.new(1, 0, 0, 0)
- Dist.Size = UDim2.new(0, 50, 0, 50)
- Dist.Font = Enum.Font.SourceSans
- Dist.Text = ""
- Dist.TextColor3 = Color3.fromRGB(0, 0, 0)
- Dist.TextSize = 14.000
- Range_.Name = "Range_"
- Range_.Parent = Dist
- Range_.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Range_.BackgroundTransparency = 1.000
- Range_.Size = UDim2.new(1, 0, 0, 20)
- Range_.Font = Enum.Font.SourceSans
- Range_.Text = "Height"
- Range_.TextColor3 = Color3.fromRGB(0, 0, 0)
- Range_.TextScaled = true
- Range_.TextSize = 14.000
- Range_.TextWrapped = true
- Range.Name = "Range"
- Range.Parent = Dist
- Range.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Range.BackgroundTransparency = 1.000
- Range.Position = UDim2.new(0, 0, 0, 20)
- Range.Size = UDim2.new(1, 0, 0, 30)
- Range.Font = Enum.Font.ArialBold
- Range.Text = "4000"
- Range.TextColor3 = Color3.fromRGB(0, 0, 0)
- Range.TextScaled = true
- Range.TextSize = 14.000
- Range.TextWrapped = true
- Refresh.Name = "Refresh"
- Refresh.Parent = Viewport
- Refresh.BackgroundColor3 = Color3.fromRGB(0, 170, 255)
- Refresh.Position = UDim2.new(1, 0, 0, 55)
- Refresh.Size = UDim2.new(0, 64, 0, 50)
- Refresh.Font = Enum.Font.SourceSansBold
- Refresh.Text = "Refresh Map"
- Refresh.TextColor3 = Color3.fromRGB(0, 0, 0)
- Refresh.TextScaled = true
- Refresh.TextSize = 14.000
- Refresh.TextWrapped = true
- -- Camera section
- local fakecam = Instance.new("Camera")
- fakecam.Name = "FakeCamera"
- fakecam.CameraType = "Scriptable"
- fakecam.FieldOfView = 10
- fakecam.Parent = plr.PlayerGui
- Viewport.CurrentCamera = fakecam
- local mapModel = Instance.new("Model")
- mapModel.Parent = Viewport
- function refresh()
- mapModel:ClearAllChildren()
- for i,child in pairs(workspace:GetDescendants()) do
- if child ~= workspace.Terrain and not (game:GetService("Players"):GetPlayerFromCharacter(child)) then
- if child:IsA("BasePart") then
- child:Clone().Parent = mapModel
- elseif child:IsA("MeshPart") then
- local rechild = Instance.new("Part")
- rechild.TopSurface = 0
- rechild.BottomSurface = 0
- rechild.Color = child.Color
- rechild.Transparency = child.Transparency
- rechild.Reflectance = child.Reflectance
- rechild.Material = child.Material
- rechild.Size = child.Size
- rechild.CFrame = child.CFrame
- rechild.Parent = mapModel
- end
- end
- end
- end
- refresh()
- spawn(function()
- while not exited do
- run.Heartbeat:Wait()
- local char = plr.Character
- if char then
- local root = char:FindFirstChild("HumanoidRootPart")
- if root then
- local rotX,rotY,rotZ = cam.CFrame:ToEulerAnglesYXZ()
- fakecam.CFrame = CFrame.new(root.Position + Vector3.new(0,height,0), root.Position) * CFrame.Angles(0,0,rotY + math.pi/2)
- end
- end
- end
- end)
- -- interesting examination
- --[[
- local Direction = (Vector2.new(Cam.Focus.x,Cam.Focus.z)-Vector2.new(Cam.CoordinateFrame.x,Cam.CoordinateFrame.z)).unit --Calculates where you're looking
- N.Position = UDim2.new(0.5,-Direction.x * Radius.Value,0.5,Direction.y * Radius.Value) --Moves the north symbol
- E.Position = UDim2.new(0.5,-Direction.y * Radius.Value,0.5,-Direction.x * Radius.Value) --Moves the east symbol
- S.Position = UDim2.new(0.5,Direction.x * Radius.Value,0.5,-Direction.y * Radius.Value) --Moves the south symbol
- W.Position = UDim2.new(0.5,Direction.y * Radius.Value,0.5,Direction.x * Radius.Value) --Moves the west symbol
- ]]
- Mini.MouseButton1Down:Connect(function()
- if not minied then
- minied = true
- Viewport.Visible = false
- else
- minied = false
- Viewport.Visible = true
- end
- end)
- Exit.MouseButton1Click:Connect(function()
- exited = true
- RadarGui:Destroy()
- fakecam:Destroy()
- wait(.5)
- script:Destroy()
- end)
- Dist.MouseButton1Down:Connect(function()
- local allHeights = {
- [4000] = 6000,
- [6000] = 8000,
- [8000] = 10000,
- [10000] = 15000,
- [15000] = 20000,
- [20000] = 40000,
- [40000] = 60000,
- [60000] = 4000,
- }
- local newHeight = allHeights[height]
- height = newHeight
- Range.Text = tostring(newHeight)
- end)
- Refresh.MouseButton1Click:Connect(refresh)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement