Universal Script 📌
17.1k Views
1.2k Executions

FFA HEAD AIM LOCK

Universal Script 📌
thesnake_1
thesnake_1First script
2 years ago
Get an executor
Please login to perform these actions:

Does it work?

No reports yet

No reports yet. Tried it? Be the first to say.

Also noticed:

Description

this is a script i made which locks onto the closest player's head (inaccurate) for FFA shooters this does not include ESP to toggle it on/off, press Q for team version go here: https://scriptblox.com/script/Universal-Script-HEAD-AIM-LOCK-36877

View Raw
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local Camera = workspace.CurrentCamera
local LocalPlayer = Players.LocalPlayer
local UserInputService = game:GetService("UserInputService")

local enabled = false

UserInputService.InputBegan:Connect(function(input, gameProcessed)
    if gameProcessed then return end
    if input.KeyCode == Enum.KeyCode.Q then
        enabled = not enabled
    end
end)

function getClosestPlayer()
    local closest, minDist = nil, math.huge
    for _, player in ipairs(Players:GetPlayers()) do
        if player ~= LocalPlayer and player.Character and player.Character:FindFirstChild("Head") then
            local head = player.Character.Head.Position
            local screenPos, onScreen = Camera:WorldToViewportPoint(head)
            if onScreen then
                local dist = (Vector2.new(screenPos.X, screenPos.Y) - Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y / 2)).Magnitude
                if dist < minDist then
                    minDist = dist
                    closest = player
                end
            end
        end
    end
    return closest
end

RunService.RenderStepped:Connect(function()
    if not enabled then return end

    local target = getClosestPlayer()
    if target and target.Character and target.Character:FindFirstChild("Head") then
        local head = target.Character.Head.Position
        Camera.CFrame = CFrame.new(Camera.CFrame.Position, head)


Comments

3
Log in to join the conversation. Login
thesnake_1's profile picture
thesnake_1Uploader2 years ago

i have written that it is ffa, i am right now publishing the team version

2
AnnaBlox's profile picture
AnnaBlox2 years ago

pretty nice but you should try to make it only target non-team players

2
squhz's profile picture
squhz2 years ago

Amazing universal aimbot, thanks

1

Tags

More universal scripts

See all
Universal Script 📌
136
522
Bumped 21 minutes ago
Universal Script 📌
1.5k
30.2k
Bumped 22 minutes ago
Script hub
4.1M
558.5k
Bumped 45 minutes ago
Key System

Script hub

Hall of Fame #3

Verified script badgeOverflow 35 Supported Games

Script hub
5.4k
28.8k
Bumped 2 hours ago
Key System
Script hub
14.0k
28.4k
Bumped 3 hours ago
Universal Script 📌
339.0k
75.0k
Bumped 3 hours ago
Script hub
462.0k
990.4k
Bumped 3 hours ago
Key System

Script hub

Hall of Fame #5

Verified script badgeRonix Hub | 52 Supported Games + OP!