local players = game:GetService("Players")
local runservice = game:GetService("RunService")
local uis = game:GetService("UserInputService")
local ws = game:GetService("Workspace")
local lp = players.LocalPlayer
local enabled = true
local fov = 500
local headchance = 10
local inHook = false
local isMobile = uis.TouchEnabled and not uis.KeyboardEnabled
local bodyparts = {
"Torso", "HumanoidRootPart", "UpperTorso", "LowerTorso",
"Left Arm", "Right Arm", "Left Leg", "Right Leg",
"LeftUpperArm", "RightUpperArm", "LeftUpperLeg", "RightUpperLeg"
}
local circle = Drawing.new("Circle")
circle.Thickness = 1.5
circle.NumSides = 128
circle.Filled = false
circle.Transparency = 1
circle.Color = Color3.fromRGB(255, 50, 50)
circle.Visible = true
local dot = Drawing.new("Circle")
dot.Filled = true
dot.Radius = 5
dot.Color = Color3.fromRGB(255, 255, 0)
dot.Transparency = 1
dot.Visible = false
local line = Drawing.new("Line")
line.Thickness = 1
line.Color = Color3.fromRGB(255, 50, 50)
line.Transparency = 0.5
line.Visible = false
local statuslabel = Drawing.new("Text")
statuslabel.Size = 15
statuslabel.Outline = true
statuslabel.OutlineColor = Color3.fromRGB(0, 0, 0)
statuslabel.Position = Vector2.new(12, 12)
statuslabel.Visible = true
local togglebtn, fovupbtn, fovdownbtn
if isMobile then
local sg = Instance.new("ScreenGui")
sg.Name = "SilentAimMobile"
sg.ResetOnSpawn = false
sg.Parent = game:GetService("CoreGui")
local function makebtn(text, pos, size, color)
local btn = Instance.new("TextButton")
btn.Size = size or UDim2.new(0, 70, 0, 70)
btn.Position = pos
btn.BackgroundColor3 = color or Color3.fromRGB(30, 30, 30)
btn.BackgroundTransparency = 0.3
btn.TextColor3 = Color3.fromRGB(255, 255, 255)
btn.Font = Enum.Font.GothamBold
btn.TextSize = 13
btn.Text = text
btn.BorderSizePixel = 0
btn.Parent = sg
local c = Instance.new("UICorner")
c.CornerRadius = UDim.new(0, 10)
c.Parent = btn
return btn
end
togglebtn = makebtn("SA: ON", UDim2.new(1, -80, 1, -160), UDim2.new(0, 70, 0, 40), Color3.fromRGB(20, 140, 20))
fovupbtn = makebtn("FOV+", UDim2.new(1, -80, 1, -110), UDim2.new(0, 70, 0, 35), Color3.fromRGB(30, 30, 30))
fovdownbtn = makebtn("FOV-", UDim2.new(1, -80, 1, -65), UDim2.new(0, 70, 0, 35), Color3.fromRGB(30, 30, 30))
togglebtn.MouseButton1Click:Connect(function()
enabled = not enabled
togglebtn.Text = enabled and "SA: ON" or "SA: OFF"
togglebtn.BackgroundColor3 = enabled and Color3.fromRGB(20, 140, 20) or Color3.fromRGB(140, 20, 20)
end)
fovupbtn.MouseButton1Click:Connect(function()
fov = math.min(fov + 50, 9999)
end)
fovdownbtn.MouseButton1Click:Connect(function()
fov = math.max(fov - 50, 50)
end)
end
local function getMousePos()
if isMobile then
local touches = uis:GetTouches()
if touches and #touches > 0 then
return Vector2.new(touches[1].Position.X, touches[1].Position.Y)
end
return Vector2.new(workspace.CurrentCamera.ViewportSize.X / 2, workspace.CurrentCamera.ViewportSize.Y / 2)
end
return uis:GetMouseLocation()
end
local function alive(char)
if not char then return false end
local ok, res = pcall(function()
if not char:IsDescendantOf(ws) then return false end
local hum = char:FindFirstChildOfClass("Humanoid")
if not hum or hum.Health <= 0 then return false end
return true
end)
return ok and res
end
local function getpart(char)
if math.random(1, 100) <= headchance then
local h = char:FindFirstChild("Head")
if h then return h end
end
local pool = table.clone(bodyparts)
for i = #pool, 2, -1 do
local j = math.random(1, i)
pool[i], pool[j] = pool[j], pool[i]
end
for _, name in ipairs(pool) do
local p = char:FindFirstChild(name)
if p then return p end
end
return char:FindFirstChild("Head")
end
local rparams = RaycastParams.new()
rparams.FilterType = Enum.RaycastFilterType.Exclude
local function canSee(part, char)
local mychar = lp.Character
if not mychar then return true end
local root = mychar:FindFirstChild("HumanoidRootPart") or mychar:FindFirstChild("Torso")
if not root then return true end
local ok, result = pcall(function()
rparams.FilterDescendantsInstances = {mychar}
return ws:Raycast(root.Position, part.Position - root.Position, rparams)
end)
if not ok then return true end
if not result then return true end
return result.Instance:IsDescendantOf(char)
end
local function getTarget()
local cam = ws.CurrentCamera
if not cam then return nil end
local mouse = getMousePos()
local bestdist = math.huge
local besttarget = nil
for _, plr in ipairs(players:GetPlayers()) do
if plr == lp then continue end
local char = plr.Character
if not char then continue end
if not alive(char) then continue end
local refpart = char:FindFirstChild("Head") or char:FindFirstChild("HumanoidRootPart")
if not refpart then continue end
local ok, screenpos, onscreen = pcall(function()
return cam:WorldToViewportPoint(refpart.Position)
end)
if not ok or not onscreen then continue end
local dist = (Vector2.new(screenpos.X, screenpos.Y) - mouse).Magnitude
if dist < fov and dist < bestdist then
if canSee(refpart, char) then
bestdist = dist
besttarget = getpart(char)
end
end
end
return besttarget
end
local function isShootRay(origin, direction)
local cam = ws.CurrentCamera
if not cam then return false end
if direction.Magnitude < 30 then return false end
local mychar = lp.Character
if not mychar then return false end
local campos = cam.CFrame.Position
local camdist = (origin - campos).Magnitude
local hrp = mychar:FindFirstChild("HumanoidRootPart")
local head = mychar:FindFirstChild("Head")
local hrdist = hrp and (origin - hrp.Position).Magnitude or math.huge
local headdist = head and (origin - head.Position).Magnitude or math.huge
return camdist <= 25 or hrdist <= 15 or headdist <= 15
end
local oldnc
oldnc = hookmetamethod(game, "__namecall", newcclosure(function(self, ...)
local method = getnamecallmethod()
if enabled and not inHook and method == "Raycast" and self == ws then
local args = {...}
local origin = args[1]
local direction = args[2]
local params = args[3]
if typeof(origin) == "Vector3" and typeof(direction) == "Vector3" then
if isShootRay(origin, direction) then
inHook = true
local target = getTarget()
inHook = false
if target then
local newdir = (target.Position - origin).Unit * direction.Magnitude
setnamecallmethod(method)
return oldnc(self, origin, newdir, params)
end
end
end
end
setnamecallmethod(method)
return oldnc(self, ...)
end))
local connections = {}
local function trackplayer(plr)
if plr == lp then return end
if connections[plr] then return end
connections[plr] = plr.CharacterAdded:Connect(function(char)
char:WaitForChild("Humanoid", 5)
end)
end
for _, plr in ipairs(players:GetPlayers()) do
trackplayer(plr)
end
players.PlayerAdded:Connect(trackplayer)
players.PlayerRemoving:Connect(function(plr)
if connections[plr] then
connections[plr]:Disconnect()
connections[plr] = nil
end
end)
if not isMobile then
uis.InputBegan:Connect(function(input, processed)
if processed then return end
if input.KeyCode == Enum.KeyCode.P then
enabled = not enabled
end
if input.KeyCode == Enum.KeyCode.Equals then
fov = math.min(fov + 50, 9999)
end
if input.KeyCode == Enum.KeyCode.Minus then
fov = math.max(fov - 50, 50)
end
end)
uis.InputChanged:Connect(function(input, processed)
if processed then return end
if input.UserInputType == Enum.UserInputType.MouseWheel then
if uis:IsKeyDown(Enum.KeyCode.LeftAlt) then
fov = math.clamp(fov + (input.Position.Z * -50), 50, 9999)
end
end
end)
end
runservice.RenderStepped:Connect(function()
local cam = ws.CurrentCamera
local mousepos = getMousePos()
statuslabel.Text = string.format("Silent Aim: %s | FOV: %d", enabled and "ON" or "OFF", fov)
statuslabel.Color = enabled and Color3.fromRGB(80, 255, 80) or Color3.fromRGB(255, 60, 60)
circle.Position = mousepos
circle.Radius = fov
circle.Visible = enabled
if not cam or not enabled then
dot.Visible = false
line.Visible = false
return
end
local target = getTarget()
if target then
local ok, sp, onscreen = pcall(function()
return cam:WorldToViewportPoint(target.Position)
end)
if ok and onscreen then
local sv = Vector2.new(sp.X, sp.Y)
dot.Position = sv
dot.Visible = true
line.From = mousepos
line.To = sv
line.Visible = true
return
end
end
dot.Visible = false
line.Visible = false
end)
Comments
No comments yet
Be the first to share your thoughts!