Run it
Copy the script and paste it into your executor.
Settings = {
[] = .KeyCode.C,
[] = ,
[] = ,
}
AirPrediction = {
[] = ,
[] = ,
}
Players = :()
UserInputService = :()
Camera = .CurrentCamera
LocalPlayer = Players.LocalPlayer
Mouse = LocalPlayer:()
locking =
targetPart =
ScreenGui = .()
ScreenGui.Name =
ScreenGui.Parent = LocalPlayer.PlayerGui
()
frame = .()
frame.Size = .(, , , )
frame.Position = .(, -, , -)
frame.BackgroundColor3 = .(, , )
frame.BorderSizePixel =
frame.BorderColor3 = .(, , )
frame.Parent = ScreenGui
titleBar = .()
titleBar.Size = .(, , , )
titleBar.BackgroundColor3 = .(, , )
titleBar.Text =
titleBar.TextColor3 = .(, , )
titleBar.TextSize =
titleBar.TextStrokeColor3 = .(, , )
titleBar.TextStrokeTransparency =
titleBar.Parent = frame
dragInput, dragStart, startPos
(input)
delta = input.Position - dragStart
frame.Position = .(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
titleBar.InputBegan:((input)
input.UserInputType == .UserInputType.MouseButton1
dragInput = input
dragStart = input.Position
startPos = frame.Position
input.Changed:(()
input.UserInputState == .UserInputState.End
dragInput =
)
)
UserInputService.InputChanged:((input)
input == dragInput
(input)
)
frame
frame = ()
(name, position, defaultValue, callback)
settingFrame = .()
settingFrame.Size = .(, -, , )
settingFrame.Position = position
settingFrame.BackgroundColor3 = .(, , )
settingFrame.BorderSizePixel =
settingFrame.Parent = frame
label = .()
label.Size = .(, -, , )
label.Position = .(, , , )
label.Text = name
label.TextColor3 = .(, , )
label.TextSize =
label.BackgroundColor3 = .(, , )
label.BorderSizePixel =
label.TextXAlignment = .TextXAlignment.Left
label.Parent = settingFrame
textBox = .()
textBox.Size = .(, -, , )
textBox.Position = .(, , , )
textBox.Text = (defaultValue)
textBox.TextColor3 = .(, , )
textBox.BackgroundColor3 = .(, , )
textBox.TextSize =
textBox.ClearTextOnFocus =
textBox.BorderSizePixel =
textBox.Parent = settingFrame
textBox.FocusLost:((enterPressed)
enterPressed
value = (textBox.Text)
value
(value)
)
textBox
airPredictionBox = (, .(, , , ), AirPrediction.AirPrediction, (value)
AirPrediction.AirPrediction = value
)
predictionBox = (, .(, , , ), Settings.Prediction, (value)
Settings.Prediction = value
)
revertButton = .()
revertButton.Size = .(, -, , )
revertButton.Position = .(, , , )
revertButton.BackgroundColor3 = .(, , )
revertButton.Text =
revertButton.TextColor3 = .(, , )
revertButton.TextSize =
revertButton.BorderSizePixel =
revertButton.Parent = frame
revertButton.MouseButton1Click:(()
AirPrediction.AirPrediction =
Settings.Prediction =
airPredictionBox.Text = (AirPrediction.AirPrediction)
predictionBox.Text = (Settings.Prediction)
)
guiVisible =
UserInputService.InputBegan:((input, gameProcessed)
input.KeyCode == .KeyCode.P gameProcessed
guiVisible = guiVisible
ScreenGui.Enabled = guiVisible
)
()
closestPlayer =
shortestDistance = .huge
_, player (Players:())
player ~= LocalPlayer player.Character player.Character:(Settings.Part)
partPosition = player.Character[Settings.Part].Position
screenPoint = Camera:(partPosition)
distance = (.(Mouse.X, Mouse.Y) - .(screenPoint.X, screenPoint.Y)).magnitude
distance < shortestDistance
closestPlayer = player
shortestDistance = distance
closestPlayer
(player)
player player.Character player.Character:(Settings.Part)
targetPart = player.Character[Settings.Part]
Camera.CFrame = .(Camera.CFrame.Position, targetPart.Position)
()
locking = locking
locking
closestPlayer = ()
closestPlayer
(closestPlayer)
targetPart =
UserInputService.InputBegan:((input, gameProcessed)
input.KeyCode == Settings.Key gameProcessed
()
)
:().RenderStepped:(()
locking targetPart
targetPosition = targetPart.Position
cameraPosition = Camera.CFrame.Position
direction = (targetPosition - cameraPosition).unit
prediction = AirPrediction.UseAirPrediction AirPrediction.AirPrediction Settings.Prediction
smoothedPosition = cameraPosition + direction * prediction
cameraLookAt = .(cameraPosition, targetPosition)
Camera.CFrame = cameraLookAt + (Camera.CFrame.Position - cameraPosition)
)
c to lock onto Players uppertorso