ADVERTISEMENTREMOVE ADS

Universal Aimbot

Universal script
1 month ago
Script preview thumbnail
Script Preview

Description

Just a Universal Aimbot, It is undetected in most games..

Features:

  • Aimbot
ADVERTISEMENTREMOVE ADS
103 Lines • 2.88 KiB
Raw
local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local Camera = workspace.CurrentCamera
local LocalPlayer = Players.LocalPlayer
local FOVRadius = 200
local AimSpeed = 2 -- lower = faster
local circle
if Drawing then
circle = Drawing.new("Circle")
circle.Visible = true
circle.Color = Color3.fromRGB(255, 0, 0)
circle.Thickness = 2
circle.Filled = false
circle.Radius = FOVRadius
end
local function hasLineOfSight(origin, targetPart)
local rayParams = RaycastParams.new()
rayParams.FilterDescendantsInstances = {LocalPlayer.Character, targetPart.Parent}
rayParams.FilterType = Enum.RaycastFilterType.Blacklist
local direction = (targetPart.Position - origin)
local result = workspace:Raycast(origin, direction, rayParams)
if result and result.Instance then
if not targetPart:IsDescendantOf(result.Instance) then
return false
end
end
return true
end
local function getClosestPlayer()
local mousePos = Camera.ViewportSize / 2
local closestPlayer, closestDist = 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
local screenPos, onScreen = Camera:WorldToViewportPoint(head.Position)
if onScreen then
local dist = (Vector2.new(screenPos.X, screenPos.Y) - mousePos).Magnitude
if dist < FOVRadius then
if hasLineOfSight(Camera.CFrame.Position, head) then
if dist < closestDist then
closestDist = dist
closestPlayer = player
end
end
end
end
end
end
return closestPlayer
end
local holdingRMB = false
UserInputService.InputBegan:Connect(function(input, gp)
if gp then return end
if input.UserInputType == Enum.UserInputType.MouseButton2 then
holdingRMB = true
end
end)
UserInputService.InputEnded:Connect(function(input, gp)
if input.UserInputType == Enum.UserInputType.MouseButton2 then
holdingRMB = false
end
end)
local function aimAt(targetPos)
local mousePos = Camera.ViewportSize / 2
local screenPos, onScreen = Camera:WorldToViewportPoint(targetPos)
if not onScreen then return end
local delta = Vector2.new(screenPos.X, screenPos.Y) - mousePos
local moveX = delta.X / AimSpeed
local moveY = delta.Y / AimSpeed
mousemoverel(moveX, moveY)
end
RunService.RenderStepped:Connect(function()
local mousePos = Camera.ViewportSize / 2 --dont want to actually get mouse pos yk and most shooters are first person
if circle then
circle.Position = Vector2.new(mousePos.X, mousePos.Y)
end
if holdingRMB then
local target = getClosestPlayer()
if target and target.Character and target.Character:FindFirstChild("Head") then
aimAt(target.Character.Head.Position)
end
end
end)
ADVERTISEMENTREMOVE ADS

Comments

2 comments
to add a comment
TE

what da ai sc ript is this

0
0
Re

@BrysonRuggles ??

0
0
ADVERTISEMENTREMOVE ADS