Run it
Copy the script and paste it into your executor.
Players = :()
UserInputService = :()
TweenService = :()
RunService = :()
SoundService = :()
Workspace = :()
ContextActionService = :()
player = Players.LocalPlayer
playerGui = player:()
CONFIG = {
RANGE = ,
SCAN_RATE = ,
TRACK_NPCS = ,
BEEP_ID = ,
BEEP_VOLUME = ,
BEEP_FAR = ,
BEEP_NEAR = ,
PITCH_FAR = ,
PITCH_NEAR = ,
HUD_SIZE = ,
HUD_OFFSET = ,
HUD_TRANS = ,
DOT_SIZE = ,
SWEEP_SPEED = ,
PULSE_SPEED = ,
}
MAX_BLIPS =
TWEEN_TIME =
RADAR_MIN_SIZE =
RADAR_MAX_SIZE =
RADAR_DEF_SIZE =
SLIDER_PANEL_W =
SLIDER_PANEL_H =
SLIDER_BAR_W =
SLIDER_BAR_H =
SLIDER_GAP_X =
COL_BG = .(, , )
COL_RING = .(, , )
COL_ACCENT = .(, , )
COL_SELF = .(, , )
COL_ENEMY = .(, , )
COL_DANGER = .(, , )
BTN_OFF_BG = .(, , )
BTN_OFF_TEXT = .(, , )
BTN_OFF_STROKE = .(, , )
BTN_ON_BG = .(, , )
BTN_ON_TEXT = .(, , )
BTN_ON_STROKE = .(, , )
BTN_HEIGHT =
BTN_GAP =
BTN_PAD_TOP =
BTN_COUNT =
HUB_HEIGHT = BTN_PAD_TOP + (BTN_HEIGHT * BTN_COUNT) + (BTN_GAP * (BTN_COUNT - )) +
HUB_WIDTH =
HUB_MIN_H =
GENV = ( ())
GENV.LonelyHub GENV.LonelyHub.Destroy
(GENV.LonelyHub.Destroy)
connections = {}
npcs = {}
beepSound
radarHUD, radarDisplay, radarContainer, radarScale
radarBtn, soundBtn, moveRadarBtn, sizeBtn
radarEnabled =
soundEnabled =
targets = {}
nearestDist =
scanAcc, beepAcc, sweepAngle, pulseT = , , ,
minimized =
wasEmpty =
radarLocked =
radarDragging =
radarDragInput =
hubDragInput =
sliderOpen =
sliderDragging =
sliderDragInput =
currentRadarSize = RADAR_DEF_SIZE
(c)
.(connections, c)
c
(class, props, parent)
inst = .(class)
k, v (props) inst[k] = v
inst.Parent = parent
inst
()
ok, ui = (() gethui () )
ok ui ui
ok2, core = (() :() )
ok2 core
probe = .()
can = (() probe.Parent = core )
probe:()
can core
playerGui
(input)
input.UserInputType == .UserInputType.MouseButton1
input.UserInputType == .UserInputType.Touch
CONFIG.TRACK_NPCS
.(()
n =
_, inst (Workspace:())
inst:() npcs[inst] =
n +=
n % == .()
)
(Workspace.DescendantAdded:((inst)
inst:() npcs[inst] =
))
(Workspace.DescendantRemoving:((inst)
npcs[inst] npcs[inst] =
))
()
ContextActionService:(
,
() .ContextActionResult.Sink ,
,
.ContextActionPriority.High.Value,
.UserInputType.Touch,
.UserInputType.MouseButton1
)
()
ContextActionService:()
()
radarHUD radarHUD:()
radarHUD = (, {
Name = ,
ResetOnSpawn = ,
ZIndexBehavior = .ZIndexBehavior.Sibling,
}, ())
size = CONFIG.HUD_SIZE
off = CONFIG.HUD_OFFSET
dotSize = CONFIG.DOT_SIZE
radarContainer = (, {
Size = .(size, size),
Position = .(, -size - off, , off),
BackgroundColor3 = COL_BG,
BackgroundTransparency = CONFIG.HUD_TRANS,
BorderSizePixel = ,
}, radarHUD)
(, { CornerRadius = .(, ) }, radarContainer)
outerStroke = (, { Color = COL_ACCENT, Thickness = }, radarContainer)
radarScale = (, { Scale = currentRadarSize / size }, radarContainer)
scope = (, {
Size = .(, ),
BackgroundColor3 = COL_BG,
BackgroundTransparency = CONFIG.HUD_TRANS,
BorderSizePixel = ,
ClipsDescendants = ,
}, radarContainer)
(, { CornerRadius = .(, ) }, scope)
_, f ({ , , })
ring = (, {
Size = .(f, f),
AnchorPoint = .(, ),
Position = .(, ),
BackgroundTransparency = ,
ZIndex = ,
}, scope)
(, { CornerRadius = .(, ) }, ring)
(, { Color = COL_RING, Thickness = , Transparency = }, ring)
pulseRing = (, {
AnchorPoint = .(, ),
Position = .(, ),
Size = .(, ),
BackgroundTransparency = ,
ZIndex = ,
}, scope)
(, { CornerRadius = .(, ) }, pulseRing)
pulseStroke = (, { Color = COL_ACCENT, Thickness = , Transparency = }, pulseRing)
sweepHolder = (, {
Size = .(, ),
BackgroundTransparency = ,
ZIndex = ,
}, scope)
sweepLine = (, {
AnchorPoint = .(, ),
Position = .(, ),
Size = .(, , , ),
BackgroundColor3 = COL_ACCENT,
BackgroundTransparency = ,
BorderSizePixel = ,
ZIndex = ,
}, sweepHolder)
selfDot = (, {
AnchorPoint = .(, ),
Position = .(, ),
Size = .(, ),
BackgroundColor3 = COL_SELF,
BorderSizePixel = ,
ZIndex = ,
}, scope)
(, { CornerRadius = .(, ) }, selfDot)
blips = {}
i = , MAX_BLIPS
dot = (, {
AnchorPoint = .(, ),
Size = .(dotSize, dotSize),
BackgroundColor3 = COL_ENEMY,
BorderSizePixel = ,
Visible = ,
ZIndex = ,
}, scope)
(, { CornerRadius = .(, ) }, dot)
stroke = (, {
Color = COL_DANGER,
Thickness = ,
Enabled = ,
Transparency = ,
}, dot)
blips[i] = { dot = dot, stroke = stroke }
detectStroke = (, {
Color = COL_DANGER,
Thickness = ,
Transparency = ,
}, radarContainer)
statusText = (, {
Position = .(, , , -),
Size = .(, , , ),
BackgroundTransparency = ,
Font = .Font.GothamBold,
TextSize = ,
TextColor3 = COL_ACCENT,
Text = ,
ZIndex = ,
}, scope)
radarDisplay = {
blips = blips,
stroke = outerStroke,
status = statusText,
sweepHolder = sweepHolder,
sweepLine = sweepLine,
pulseRing = pulseRing,
pulseStroke = pulseStroke,
detectStroke = detectStroke,
}
(radarContainer.InputBegan:((input)
radarLocked
(input)
radarDragging =
radarDragInput = input
))
sizePanel
sizeSliderBar, sizeSliderFill, sizeSliderKnob, sizeValueLabel
()
sizePanel radarContainer
abs = radarContainer.AbsolutePosition
sz = radarContainer.AbsoluteSize.X
sizePanel.Position = .(
abs.X - SLIDER_PANEL_W - SLIDER_GAP_X,
abs.Y + (sz - SLIDER_PANEL_H) /
)
()
sizePanel sizePanel:()
sizePanel = (, {
Name = ,
Size = .(SLIDER_PANEL_W, SLIDER_PANEL_H),
Position = .(, , , ),
BackgroundColor3 = .(, , ),
BackgroundTransparency = ,
BorderSizePixel = ,
Visible = ,
ZIndex = ,
Active = ,
}, radarHUD)
(, { CornerRadius = .(, ) }, sizePanel)
(, { Color = COL_ACCENT, Thickness = , Transparency = }, sizePanel)
sizeValueLabel = (, {
Position = .(, , , ),
Size = .(, , , ),
BackgroundTransparency = ,
Font = .Font.GothamBold,
TextSize = ,
TextColor3 = COL_ACCENT,
Text = (currentRadarSize),
ZIndex = ,
}, sizePanel)
sizeSliderBar = (, {
AnchorPoint = .(, ),
Position = .(, , , ),
Size = .(SLIDER_BAR_W, SLIDER_BAR_H),
BackgroundColor3 = .(, , ),
BorderSizePixel = ,
ZIndex = ,
Active = ,
}, sizePanel)
(, { CornerRadius = .(, ) }, sizeSliderBar)
sizeSliderFill = (, {
AnchorPoint = .(, ),
Position = .(, ),
Size = .(, , , ),
BackgroundColor3 = COL_ACCENT,
BorderSizePixel = ,
ZIndex = ,
}, sizeSliderBar)
(, { CornerRadius = .(, ) }, sizeSliderFill)
sizeSliderKnob = (, {
AnchorPoint = .(, ),
Position = .(, , , ),
Size = .(, ),
BackgroundColor3 = COL_ACCENT,
BorderSizePixel = ,
ZIndex = ,
}, sizeSliderBar)
(, { CornerRadius = .(, ) }, sizeSliderKnob)
(, { Color = .(, , ), Thickness = }, sizeSliderKnob)
()
t = (currentRadarSize - RADAR_MIN_SIZE) / (RADAR_MAX_SIZE - RADAR_MIN_SIZE)
t = .(t, , )
sizeSliderFill.Size = .(, , t, )
sizeSliderKnob.Position = .(, , - t, )
sizeValueLabel.Text = (.(currentRadarSize + ))
(newSize)
currentRadarSize = .(newSize, RADAR_MIN_SIZE, RADAR_MAX_SIZE)
radarScale
radarScale.Scale = currentRadarSize / CONFIG.HUD_SIZE
sizePanel sizePanel.Visible
()
()
(screenY)
sizeSliderBar
barY = sizeSliderBar.AbsolutePosition.Y
barH = sizeSliderBar.AbsoluteSize.Y
barH <=
rel = .((screenY - barY) / barH, , )
newSize = RADAR_MAX_SIZE - rel * (RADAR_MAX_SIZE - RADAR_MIN_SIZE)
(newSize)
(input)
sliderDragging =
sliderDragInput = input
()
pos = input.Position
pos
(pos.Y)
()
sliderDragging
sliderDragging =
sliderDragInput =
()
()
(sizeSliderBar.InputBegan:((input)
(input)
(input)
))
(sizeSliderKnob.InputBegan:((input)
(input)
(input)
))
(sizePanel.InputBegan:((input)
(input) sizeSliderBar
(input)
))
(UserInputService.InputChanged:((input)
sliderDragging input ~= sliderDragInput
input.UserInputType == .UserInputType.Touch
(input.Position.Y)
input.UserInputType == .UserInputType.MouseMovement
(input.Position.Y)
))
(UserInputService.InputEnded:((input)
sliderDragging input == sliderDragInput
(input)
()
))
(UserInputService.WindowFocusReleased:(()
()
))
(UserInputService.InputChanged:((input)
radarDragging
input ~= radarDragInput
input.UserInputType == .UserInputType.MouseMovement
input.UserInputType == .UserInputType.Touch
delta = input.Delta
pos = radarContainer.Position
radarContainer.Position = .(
pos.X.Scale,
pos.X.Offset + delta.X,
pos.Y.Scale,
pos.Y.Offset + delta.Y
)
()
))
(UserInputService.InputEnded:((input)
input ~= radarDragInput
(input)
radarDragging =
radarDragInput =
))
()
radarDisplay
char = player.Character
hrp = char char:()
hrp nearestDist = ;
playerPos = hrp.Position
camera = Workspace.CurrentCamera
camCF
camera
look = camera.CFrame.LookVector
flatLook = .(look.X, , look.Z)
flatLook.Magnitude <
flatLook = .(, , -)
flatLook = flatLook.Unit
camCF = .(playerPos, playerPos + flatLook)
camCF = hrp.CFrame
R = CONFIG.RANGE
nearest =
.(targets)
(root)
pos = root.Position
rel = camCF:(pos)
dist = (pos - playerPos).Magnitude
dist > R
nearest dist < nearest nearest = dist
.(targets, {
nx = + rel.X / ( * R),
ny = + rel.Z / ( * R),
dist = dist,
})
_, plr (Players:())
plr ~= player
c = plr.Character
root = c c:()
root (root)
CONFIG.TRACK_NPCS
hum (npcs)
model = hum.Parent
model hum.Health > model ~= char Players:(model)
root = model:() model.PrimaryPart
root root:() (root)
.(targets, (a, b) a.dist < b.dist )
nearestDist = nearest
i = , MAX_BLIPS
entry = radarDisplay.blips[i]
t = targets[i]
t
entry.dot.Visible =
entry.dot.Position = .(t.nx, t.ny)
entry.dot.Visible =
entry.stroke.Enabled =
(dist)
t = .( - dist / CONFIG.RANGE, , )
CONFIG.BEEP_FAR + (CONFIG.BEEP_NEAR - CONFIG.BEEP_FAR) * t, t
beepSound = (, {
Name = ,
SoundId = CONFIG.BEEP_ID,
Volume = CONFIG.BEEP_VOLUME,
RollOffMode = .RollOffMode.Linear,
}, SoundService)
(RunService.Heartbeat:((dt)
radarEnabled radarDisplay
sweepAngle = (sweepAngle + CONFIG.SWEEP_SPEED * dt) %
radarDisplay.sweepHolder.Rotation = sweepAngle
pulseT = (pulseT + dt * CONFIG.PULSE_SPEED) %
radarDisplay.pulseRing.Size = .(pulseT, pulseT)
radarDisplay.pulseStroke.Transparency = pulseT
scanAcc += dt
scanAcc >= CONFIG.SCAN_RATE
scanAcc =
()
hasEnemy = #targets >
hasEnemy
radarDisplay.stroke.Color = COL_DANGER
radarDisplay.status.Text =
radarDisplay.status.TextColor3 = COL_DANGER
radarDisplay.sweepLine.BackgroundColor3 = COL_DANGER
radarDisplay.pulseStroke.Color = COL_DANGER
radarDisplay.stroke.Color = COL_ACCENT
radarDisplay.status.Text =
radarDisplay.status.TextColor3 = COL_ACCENT
radarDisplay.sweepLine.BackgroundColor3 = COL_ACCENT
radarDisplay.pulseStroke.Color = COL_ACCENT
hasEnemy wasEmpty
radarDisplay.detectStroke.Thickness =
radarDisplay.detectStroke.Transparency =
TweenService:(
radarDisplay.detectStroke,
TweenInfo.(, .EasingStyle.Quad, .EasingDirection.Out),
{ Thickness = , Transparency = }
):()
wasEmpty = hasEnemy
first = radarDisplay.blips[]
hasEnemy first.dot.Visible
p = (.(() * ) + ) /
first.stroke.Enabled =
first.stroke.Transparency = + ( - p) *
first.stroke.Enabled =
soundEnabled radarEnabled nearestDist
interval, t = (nearestDist)
beepAcc += dt
beepAcc >= interval
beepAcc =
beepSound.PlaybackSpeed = CONFIG.PITCH_FAR + (CONFIG.PITCH_NEAR - CONFIG.PITCH_FAR) * t
beepSound:()
beepAcc = .huge
))
ScreenGui = .()
ScreenGui.Name =
ScreenGui.ResetOnSpawn =
ScreenGui.ZIndexBehavior = .ZIndexBehavior.Sibling
ScreenGui.Parent = ()
MainFrame = (, {
Name = ,
Size = .(HUB_WIDTH, HUB_HEIGHT),
Position = .(, , , ),
BackgroundColor3 = .(, , ),
BorderSizePixel = ,
Active = ,
}, ScreenGui)
(, { CornerRadius = .(, ) }, MainFrame)
(, {
BackgroundTransparency = ,
Position = .(, ),
Size = .(, -, , ),
Text = ,
TextColor3 = .(, , ),
Font = .Font.GothamBold,
TextSize = ,
TextXAlignment = .TextXAlignment.Center,
}, MainFrame)
MinimizeButton = (, {
Position = .(, -, , ),
Size = .(, ),
BackgroundTransparency = ,
Text = ,
TextColor3 = .(, , ),
Font = .Font.GothamBold,
TextSize = ,
}, MainFrame)
Description = (, {
BackgroundTransparency = ,
Position = .(, ),
Size = .(, , , ),
Text = ,
TextColor3 = .(, , ),
Font = .Font.Gotham,
TextSize = ,
}, MainFrame)
ButtonContainer = (, {
BackgroundTransparency = ,
Position = .(, BTN_PAD_TOP),
Size = .(, -, , (BTN_HEIGHT * BTN_COUNT) + (BTN_GAP * (BTN_COUNT - ))),
}, MainFrame)
(, {
Padding = .(, BTN_GAP),
SortOrder = .SortOrder.LayoutOrder,
}, ButtonContainer)
(btn, isOn)
stroke = btn:()
isOn
btn.BackgroundColor3 = BTN_ON_BG
btn.TextColor3 = BTN_ON_TEXT
stroke stroke.Color = BTN_ON_STROKE
btn.BackgroundColor3 = BTN_OFF_BG
btn.TextColor3 = BTN_OFF_TEXT
stroke stroke.Color = BTN_OFF_STROKE
(text, order)
btn = (, {
Size = .(, , , BTN_HEIGHT),
BackgroundColor3 = BTN_OFF_BG,
Text = text,
TextColor3 = BTN_OFF_TEXT,
Font = .Font.GothamBold,
TextSize = ,
AutoButtonColor = ,
LayoutOrder = order,
BorderSizePixel = ,
}, ButtonContainer)
(, { CornerRadius = .(, ) }, btn)
(, { Color = BTN_OFF_STROKE, Thickness = }, btn)
btn
radarBtn = (, )
(radarBtn, radarEnabled)
soundBtn = (, )
(soundBtn, soundEnabled)
moveRadarBtn = (, )
(moveRadarBtn, radarLocked)
sizeBtn = (, )
(sizeBtn, sliderOpen)
(radarBtn.Activated:(()
radarEnabled = radarEnabled
(radarBtn, radarEnabled)
radarHUD radarHUD.Enabled = radarEnabled
sizePanel
sizePanel.Visible = radarEnabled sliderOpen
sizePanel.Visible
()
))
(soundBtn.Activated:(()
soundEnabled = soundEnabled
(soundBtn, soundEnabled)
))
(moveRadarBtn.Activated:(()
radarLocked = radarLocked
radarLocked
moveRadarBtn.Text =
moveRadarBtn.Text =
(moveRadarBtn, radarLocked)
))
(sizeBtn.Activated:(()
sliderOpen = sliderOpen
(sizeBtn, sliderOpen)
sizePanel
sizePanel.Visible = radarEnabled sliderOpen
sliderOpen
()
()
))
(object, properties)
TweenService:(
object,
TweenInfo.(TWEEN_TIME, .EasingStyle.Quart, .EasingDirection.Out),
properties
):()
(MinimizeButton.Activated:(()
minimized = minimized
minimized
Description.Visible =
ButtonContainer.Visible =
MinimizeButton.Text =
(MainFrame, { Size = .(HUB_WIDTH, HUB_MIN_H) })
(MainFrame, { Size = .(HUB_WIDTH, HUB_HEIGHT) })
MinimizeButton.Text =
.(TWEEN_TIME, ()
minimized
Description.Visible =
ButtonContainer.Visible =
)
))
(MainFrame.InputBegan:((input)
(input)
hubDragInput = input
))
(UserInputService.InputChanged:((input)
hubDragInput
input ~= hubDragInput
input.UserInputType == .UserInputType.MouseMovement
input.UserInputType == .UserInputType.Touch
delta = input.Delta
pos = MainFrame.Position
MainFrame.Position = .(
pos.X.Scale,
pos.X.Offset + delta.X,
pos.Y.Scale,
pos.Y.Offset + delta.Y
)
))
(UserInputService.InputEnded:((input)
input ~= hubDragInput
(input)
hubDragInput =
))
()
()
()
(currentRadarSize)
()
GENV.LonelyHub = {
Destroy = ()
()
_, c (connections) (() c:() )
.(connections)
beepSound beepSound:()
radarHUD radarHUD:()
ScreenGui ScreenGui:()
GENV.LonelyHub =
}A different way to locate enemies, don't you think?

Universal