Run it
Copy the script and paste it into your executor.
Players = :()
RunService = :()
UserInputService = :()
player = Players.LocalPlayer
camera = .CurrentCamera
DEFAULT_KEY = .KeyCode.E
DEFAULT_LOCK =
DEFAULT_RANGE =
MAX_RANGE =
MAX_LOCK =
NPC_REFRESH_INTERVAL =
AIM_RATE =
NPC_FOLDER_NAME =
enabled =
lockValue = DEFAULT_LOCK
rangeValue = DEFAULT_RANGE
TOGGLE_KEY = DEFAULT_KEY
listeningForKey =
npcCache = {}
lastNpcRefresh =
(v, a, b)
v < a a
v > b b
v
(model)
model
Players:(model) ~=
()
newCache = {}
searchRoot =
NPC_FOLDER_NAME :(NPC_FOLDER_NAME)
searchRoot = :(NPC_FOLDER_NAME)
searchRoot ==
_, obj (:())
obj:() obj:() obj:()
(obj) obj ~= player.Character
.(newCache, obj)
_, obj (searchRoot:())
obj:() obj:() obj:()
(obj) obj ~= player.Character
.(newCache, obj)
npcCache = newCache
screenGui = .()
screenGui.Name =
screenGui.ResetOnSpawn =
screenGui.Parent = player:()
main = .()
main.Name =
main.Size = .(, , , )
main.Position = .(, , , )
main.BackgroundColor3 = .(, , )
main.BorderSizePixel =
main.AnchorPoint = .(,)
main.Parent = screenGui
main.ClipsDescendants =
uICorner = .()
uICorner.CornerRadius = .(, )
uICorner.Parent = main
topbar = .()
topbar.Name =
topbar.Size = .(, , , )
topbar.BackgroundTransparency =
topbar.Parent = main
title = .()
title.Size = .(, -, , )
title.Position = .(, , , )
title.BackgroundTransparency =
title.Text =
title.TextColor3 = .(,,)
title.Font = .Font.GothamBold
title.TextSize =
title.TextXAlignment = .TextXAlignment.Left
title.Parent = topbar
dragging, dragInput, dragStart, startPos
(input)
delta = input.Position - dragStart
main.Position = .(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
topbar.InputBegan:((input)
input.UserInputType == .UserInputType.MouseButton1
dragging =
dragStart = input.Position
startPos = main.Position
input.Changed:(()
input.UserInputState == .UserInputState.End
dragging =
)
)
topbar.InputChanged:((input)
input.UserInputType == .UserInputType.MouseMovement
dragInput = input
)
UserInputService.InputChanged:((input)
input == dragInput dragging
(input)
)
(y)
row = .()
row.Size = .(, -, , )
row.Position = .(, , , + (y-) * )
row.BackgroundTransparency =
row.Parent = main
row
row1 = ()
toggleBtn = .()
toggleBtn.Size = .(, , , )
toggleBtn.Position = .(, , , )
toggleBtn.BackgroundColor3 = .(,,)
toggleBtn.BorderSizePixel =
toggleBtn.AutoButtonColor =
toggleBtn.Text =
toggleBtn.Font = .Font.GothamSemibold
toggleBtn.TextSize =
toggleBtn.TextColor3 = .(,,)
toggleBtn.Parent = row1
btnCorner = .()
btnCorner.CornerRadius = .(,)
btnCorner.Parent = toggleBtn
keyLabel = .()
keyLabel.Size = .(, , , )
keyLabel.Position = .(, -, , )
keyLabel.BackgroundTransparency =
keyLabel.Text = .(, (TOGGLE_KEY):(,))
keyLabel.Font = .Font.Gotham
keyLabel.TextSize =
keyLabel.TextColor3 = .(,,)
keyLabel.TextXAlignment = .TextXAlignment.Right
keyLabel.Parent = row1
changeKeyBtn = .()
changeKeyBtn.Size = .(, , , )
changeKeyBtn.Position = .(, , , )
changeKeyBtn.BackgroundColor3 = .(,,)
changeKeyBtn.Text =
changeKeyBtn.Font = .Font.Gotham
changeKeyBtn.TextSize =
changeKeyBtn.TextColor3 = .(,,)
changeKeyBtn.Parent = row1
ckCorner = .()
ckCorner.CornerRadius = .(,)
ckCorner.Parent = changeKeyBtn
listeningLabel = .()
listeningLabel.Size = .(, , , )
listeningLabel.Position = .(, , , )
listeningLabel.BackgroundTransparency =
listeningLabel.Text =
listeningLabel.Font = .Font.Gotham
listeningLabel.TextSize =
listeningLabel.TextColor3 = .(,,)
listeningLabel.Parent = row1
(parent, labelText, min, max, default)
container = .()
container.Size = .(, , , )
container.BackgroundTransparency =
container.Parent = parent
label = .()
label.Size = .(, , , )
label.Position = .(, , , )
label.BackgroundTransparency =
label.Text = labelText
label.Font = .Font.Gotham
label.TextSize =
label.TextColor3 = .(,,)
label.TextXAlignment = .TextXAlignment.Left
label.Parent = container
sliderBar = .()
sliderBar.Size = .(, , , )
sliderBar.Position = .(, , , )
sliderBar.BackgroundColor3 = .(,,)
sliderBar.BorderSizePixel =
sliderBar.Parent = container
barCorner = .()
barCorner.Parent = sliderBar
thumb = .()
thumb.Size = .(, , , )
thumb.Position = .(, -, , -)
thumb.BackgroundColor3 = .(,,)
thumb.Parent = sliderBar
tCorner = .()
tCorner.Parent = thumb
valueBox = .()
valueBox.Size = .(, , , )
valueBox.Position = .(, -, , )
valueBox.Text = (default)
valueBox.ClearTextOnFocus =
valueBox.Font = .Font.Gotham
valueBox.TextSize =
valueBox.TextColor3 = .(,,)
valueBox.BackgroundColor3 = .(,,)
valueBox.Parent = container
vbCorner = .()
vbCorner.Parent = valueBox
(v)
v = (.(v+), min, max)
valueBox.Text = (v)
alpha = (v - min) / .(, max - min)
thumb.Position = .(alpha, -, , -)
v
dragging =
sliderBar.InputBegan:((input)
input.UserInputType == .UserInputType.MouseButton1
dragging =
(move)
move.UserInputType == .UserInputType.MouseMovement dragging
absPos = move.Position.x
barPos = sliderBar.AbsolutePosition.X
barSize = sliderBar.AbsoluteSize.X
rel = ((absPos - barPos) / .(, barSize), , )
newVal = min + rel * (max - min)
(newVal)
moveConn
moveConn = UserInputService.InputChanged:(onMove)
input.Changed:(()
input.UserInputState == .UserInputState.End
dragging =
moveConn moveConn:()
)
)
valueBox.FocusLost:((enterPressed)
n = (valueBox.Text)
n
valueBox.Text = (default)
n = (.(n+), min, max)
valueBox.Text = (n)
)
(default)
{
Container = container,
SetValue = setValue,
GetValue = ()
(valueBox.Text) default
,
ValueBox = valueBox
}
row2 = ()
lockSlider = (row2, , , MAX_LOCK, DEFAULT_LOCK)
lockSlider.Container.Parent = row2
row3 = ()
rangeSlider = (row3, , , MAX_RANGE, DEFAULT_RANGE)
rangeSlider.Container.Parent = row3
()
toggleBtn.Text = .. (enabled )
enabled
toggleBtn.BackgroundColor3 = .(,,)
toggleBtn.BackgroundColor3 = .(,,)
keyLabel.Text = .(, (TOGGLE_KEY):(,))
toggleBtn.MouseButton1Click:(()
enabled = enabled
()
)
changeKeyBtn.MouseButton1Click:(()
listeningForKey =
listeningLabel.Text =
conn
conn = UserInputService.InputBegan:((input, gp)
input.UserInputType == .UserInputType.Keyboard listeningForKey
TOGGLE_KEY = input.KeyCode
listeningForKey =
listeningLabel.Text =
()
conn:()
)
)
UserInputService.InputBegan:((input, gameProcessed)
input.UserInputType ~= .UserInputType.Keyboard
listeningForKey
input.KeyCode == TOGGLE_KEY gameProcessed
enabled = enabled
()
)
(origin, maxRange)
nearest, nearestDistSq = , maxRange * maxRange +
originV3 = origin
_, model (npcCache)
model model.Parent
hrp = model:()
hum = model:()
hrp hum hum.Health >
dSq = (hrp.Position - originV3).Magnitude ^
dSq <= maxRange * maxRange dSq < nearestDistSq
nearest = hrp
nearestDistSq = dSq
nearest
aimAccumulator =
aimInterval = / .(, AIM_RATE)
()
lastNpcRefresh = ()
heartbeatConn
heartbeatConn = RunService.RenderStepped:((dt)
lockValue = (lockSlider.(), , MAX_LOCK)
rangeValue = (rangeSlider.(), , MAX_RANGE)
now = ()
now - lastNpcRefresh >= NPC_REFRESH_INTERVAL
()
lastNpcRefresh = now
enabled
player.Character player.Character:()
aimAccumulator = aimAccumulator + dt
aimAccumulator < aimInterval
aimAccumulator = aimAccumulator - aimInterval
origin = player.Character.HumanoidRootPart.Position
target = (origin, rangeValue)
target
alpha = - (lockValue / MAX_LOCK)
alpha = (alpha, , )
camPos = camera.CFrame.Position
toTarget = target.Position - camPos
dir = toTarget.Unit
dot = camera.CFrame.LookVector:(dir)
dot <
goalCFrame = .(camPos, target.Position)
camera.CFrame = camera.CFrame:(goalCFrame, alpha)
)
player.CharacterRemoving:(()
)
()
(, (TOGGLE_KEY))

Universal