
KeylessUniversal

-- Aimbot & Transparent Box Hitbox Expander (Bot/NPC only)
-- Made by ryu949
--// Services
local Workspace = game:GetService("Workspace")
local Players = game:GetService("Players")
local camera = workspace.CurrentCamera
local RunService = game:GetService("RunService")
--// Settings for Hitbox
local BoxSize = Vector3.new(10, 10, 10)
local BoxColor = Color3.fromRGB(255, 255, 255)
local Transparency = 0.5
--// Aimbot Settings
local aimbotEnabled = false
local smoothingFactor = 0.15
--// Check if model is a player
local function isPlayer(model)
for _, player in pairs(Players:GetPlayers()) do
if player.Character == model then
return true
end
end
return false
end
--// Create fake transparent hitbox
local function addBox(model)
if not isPlayer(model) and model:FindFirstChild("HumanoidRootPart") then
if model:FindFirstChild("FakeHitbox") then return end
local box = Instance.new("Part")
box.Name = "FakeHitbox"
box.Size = BoxSize
box.Transparency = Transparency
box.Color = BoxColor
box.Anchored = false
box.CanCollide = false
box.Massless = true
box.Material = Enum.Material.ForceField
box.CFrame = model.HumanoidRootPart.CFrame
box.Parent = model
local weld = Instance.new("WeldConstraint")
weld.Part0 = box
weld.Part1 = model.HumanoidRootPart
weld.Parent = box
end
end
--// Apply to existing bots/NPCs
for _, npc in pairs(Workspace:GetDescendants()) do
if npc:IsA("Model") and npc:FindFirstChild("Humanoid") and npc:FindFirstChild("HumanoidRootPart") and not isPlayer(npc) then
addBox(npc)
end
end
--// Apply to future bots/NPCs
Workspace.DescendantAdded:Connect(function(descendant)
task.wait(0.5)
if descendant:IsA("Model") and descendant:FindFirstChild("Humanoid") and descendant:FindFirstChild("HumanoidRootPart") and not isPlayer(descendant) then
addBox(descendant)
end
end)
-- GUI Button for Aimbot
local screenGui = Instance.new("ScreenGui", game.CoreGui)
screenGui.Name = "AimbotUI"
local button = Instance.new("TextButton")
button.Name = "AimbotToggle"
button.Size = UDim2.new(0, 200, 0, 50)
button.Position = UDim2.new(1, -210, 0, 20)
button.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
button.TextColor3 = Color3.fromRGB(255, 255, 255)
button.Text = "Aimbot: OFF"
button.Font = Enum.Font.SourceSansBold
button.TextScaled = true
button.Parent = screenGui
local corner = Instance.new("UICorner")
corner.CornerRadius = UDim.new(0, 10)
corner.Parent = button
-- Target only NPCs/Bots and lock onto the Head (never below)
local function getClosestTarget()
local closestPart = nil
local shortestDist = math.huge
for _, model in ipairs(workspace:GetDescendants()) do
if model:IsA("Model") and model ~= Players.LocalPlayer.Character then
local hum = model:FindFirstChildOfClass("Humanoid")
if hum and hum.Health > 0 then
if not isPlayer(model) then
local targetPart = model:FindFirstChild("Head") or model:FindFirstChild("UpperTorso")
if targetPart then
local dist = (targetPart.Position - camera.CFrame.Position).Magnitude
if dist < shortestDist then
shortestDist = dist
closestPart = targetPart
end
end
end
end
end
end
return closestPart
end
-- Smooth camera aim with prediction using Heartbeat
RunService.Heartbeat:Connect(function()
if aimbotEnabled then
local target = getClosestTarget()
if target then
local camPos = camera.CFrame.Position
local prediction = target.Position
if target:IsA("BasePart") and target.AssemblyLinearVelocity then
prediction = target.Position + target.AssemblyLinearVelocity * 0.04
end
local smoothed = camPos + (prediction - camPos) * smoothingFactor
camera.CFrame = CFrame.new(smoothed, prediction)
end
end
end)
-- Toggle Aimbot
button.MouseButton1Click:Connect(function()
aimbotEnabled = not aimbotEnabled
button.Text = aimbotEnabled and "Aimbot: ON" or "Aimbot: OFF"
end)



but lag on aim bot
use RunService.Heartbeat and make variable called prediction target.Position + Target.Velocity*Prediction recommens 0.03-0.04 for track