
KeylessUniversal

--[[
WARNING: Heads up! This script has not been verified by ScriptBlox. Use at your own risk!
]]
-- GUI principal
local ScreenGui = Instance.new("ScreenGui", game.CoreGui)
ScreenGui.Name = "Gun"
local Frame = Instance.new("Frame", ScreenGui)
Frame.Size = UDim2.new(0, 220, 0, 240)
Frame.Position = UDim2.new(0, 50, 0, 50)
Frame.BackgroundColor3 = Color3.fromRGB(0, 0, 170)
Frame.BorderSizePixel = 0
Frame.Active = true
Frame.Draggable = true
-- Título
local Title = Instance.new("TextLabel", Frame)
Title.Size = UDim2.new(1, 0, 0, 30)
Title.Position = UDim2.new(0, 0, 0, 0)
Title.BackgroundTransparency = 1
Title.Text = "Gun"
Title.TextColor3 = Color3.fromRGB(255, 0, 0)
Title.Font = Enum.Font.SourceSansBold
Title.TextSize = 22
-- Botão Gun GUI
local GunGuiButton = Instance.new("TextButton")
GunGuiButton.Size = UDim2.new(0, 120, 0, 40)
GunGuiButton.Position = UDim2.new(0, 50, 0, 260)
GunGuiButton.Text = "Gun GUI"
GunGuiButton.BackgroundColor3 = Color3.fromRGB(0, 170, 255)
GunGuiButton.TextColor3 = Color3.new(1, 1, 1)
GunGuiButton.Font = Enum.Font.SourceSansBold
GunGuiButton.TextSize = 18
GunGuiButton.BorderSizePixel = 0
GunGuiButton.Parent = game.CoreGui
-- Variáveis de estado
local savedPosition
local savedAimbotState = false
local savedWallCheckState = false
local savedESPState = false
local espConnections = {}
local aimbotActive = false
local wallCheck = false
local espActive = false
local aimbotNPCActive = false
-- Botão de fechar
local CloseBtn = Instance.new("TextButton", Frame)
CloseBtn.Size = UDim2.new(0, 25, 0, 25)
CloseBtn.Position = UDim2.new(1, -30, 0, 5)
CloseBtn.Text = "X"
CloseBtn.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
CloseBtn.TextColor3 = Color3.new(1, 1, 1)
CloseBtn.Font = Enum.Font.SourceSansBold
CloseBtn.TextSize = 16
CloseBtn.MouseButton1Click:Connect(function()
savedPosition = Frame.Position
savedAimbotState = aimbotActive
savedWallCheckState = wallCheck
savedESPState = espActive
ScreenGui:Destroy()
GunGuiButton.Visible = true
end)
-- Função para ver se parte está visível
local function isVisible(targetPart)
local origin = workspace.CurrentCamera.CFrame.Position
local direction = (targetPart.Position - origin).Unit * 1000
local raycastParams = RaycastParams.new()
raycastParams.FilterType = Enum.RaycastFilterType.Blacklist
raycastParams.FilterDescendantsInstances = {game.Players.LocalPlayer.Character}
local result = workspace:Raycast(origin, direction, raycastParams)
return not result or result.Instance:IsDescendantOf(targetPart.Parent)
end
-- AIMBOT PLAYERS
local aimConnection
function toggleAimbot()
aimbotActive = not aimbotActive
if aimbotActive then
print("Aimbot ativado")
aimConnection = game:GetService("RunService").RenderStepped:Connect(function()
local cam = workspace.CurrentCamera
local closest, shortestDistance = nil, math.huge
for _, plr in pairs(game.Players:GetPlayers()) do
if plr ~= game.Players.LocalPlayer and plr.Character and plr.Character:FindFirstChild("HumanoidRootPart") then
local pos, onScreen = cam:WorldToViewportPoint(plr.Character.HumanoidRootPart.Position)
if onScreen then
local dist = (Vector2.new(pos.X, pos.Y) - Vector2.new(cam.ViewportSize.X / 2, cam.ViewportSize.Y / 2)).Magnitude
if dist < shortestDistance and (not wallCheck or isVisible(plr.Character.HumanoidRootPart)) then
closest, shortestDistance = plr.Character.HumanoidRootPart, dist
end
end
end
end
if closest then
cam.CFrame = CFrame.new(cam.CFrame.Position, closest.Position)
end
end)
else
print("Aimbot desativado")
if aimConnection then aimConnection:Disconnect() end
end
end
-- AIMBOT NPC
local aimNPCConnection
function toggleAimbotNPC()
aimbotNPCActive = not aimbotNPCActive
if aimbotNPCActive then
print("Aimbot NPC ativado")
aimNPCConnection = game:GetService("RunService").RenderStepped:Connect(function()
local cam = workspace.CurrentCamera
local closest, shortestDistance = nil, math.huge
for _, npc in pairs(workspace:GetDescendants()) do
if npc:IsA("Model") and npc:FindFirstChild("Humanoid") and npc:FindFirstChild("HumanoidRootPart") and not game.Players:GetPlayerFromCharacter(npc) then
local pos, onScreen = cam:WorldToViewportPoint(npc.HumanoidRootPart.Position)
if onScreen then
local dist = (Vector2.new(pos.X, pos.Y) - Vector2.new(cam.ViewportSize.X / 2, cam.ViewportSize.Y / 2)).Magnitude
if dist < shortestDistance and (not wallCheck or isVisible(npc.HumanoidRootPart)) then
closest, shortestDistance = npc.HumanoidRootPart, dist
end
end
end
end
if closest then
cam.CFrame = CFrame.new(cam.CFrame.Position, closest.Position)
end
end)
else
print("Aimbot NPC desativado")
if aimNPCConnection then aimNPCConnection:Disconnect() end
end
end
-- WALL CHECK
function toggleWallCheck()
wallCheck = not wallCheck
print("Wall Check: " .. (wallCheck and "Ativado" or "Desativado"))
end
-- ESP
function toggleESP()
espActive = not espActive
local function criarESP(plr)
if plr == game.Players.LocalPlayer or not plr.Character or not plr.Character:FindFirstChild("HumanoidRootPart") then return end
local hrp = plr.Character.HumanoidRootPart
if hrp:FindFirstChild("ESPBox") then return end
local espBox = Instance.new("BoxHandleAdornment", hrp)
espBox.Size = Vector3.new(4, 6, 2)
espBox.Adornee = hrp
espBox.AlwaysOnTop = true
espBox.ZIndex = 5
espBox.Transparency = 0.3
espBox.Color3 = Color3.fromRGB(0, 170, 255)
espBox.Name = "ESPBox"
local line = Drawing.new("Line")
table.insert(espConnections, line)
line.Thickness = 1.5
line.Color = Color3.fromRGB(0, 170, 255)
line.Transparency = 1
line.Visible = true
local conn = game:GetService("RunService").RenderStepped:Connect(function()
if not hrp:IsDescendantOf(workspace) then
if line then line:Remove() end
if conn then conn:Disconnect() end
return
end
local cam = workspace.CurrentCamera
local pos, visible = cam:WorldToViewportPoint(hrp.Position)
line.Visible = visible
if visible then
line.From = Vector2.new(cam.ViewportSize.X / 2, cam.ViewportSize.Y)
line.To = Vector2.new(pos.X, pos.Y)
end
end)
table.insert(espConnections, conn)
table.insert(espConnections, hrp.AncestryChanged:Connect(function()
if not hrp:IsDescendantOf(workspace) then
espBox:Destroy()
if line then line:Remove() end
if conn then conn:Disconnect() end
end
end))
end
if espActive then
print("ESP ativado")
for _, plr in pairs(game.Players:GetPlayers()) do
if plr.Character then criarESP(plr) end
table.insert(espConnections, plr.CharacterAdded:Connect(function()
task.wait(1)
criarESP(plr)
end))
end
table.insert(espConnections, game.Players.PlayerAdded:Connect(function(plr)
table.insert(espConnections, plr.CharacterAdded:Connect(function()
task.wait(1)
criarESP(plr)
end))
end))
else
print("ESP desativado")
for _, plr in pairs(game.Players:GetPlayers()) do
if plr.Character and plr.Character:FindFirstChild("HumanoidRootPart") then
local adorn = plr.Character.HumanoidRootPart:FindFirstChild("ESPBox")
if adorn then adorn:Destroy() end
end
end
for _, v in pairs(espConnections) do
if typeof(v) == "RBXScriptConnection" then v:Disconnect()
elseif typeof(v) == "table" and v.Remove then v:Remove() end
end
espConnections = {}
end
end
-- Criar botões
function criarBotao(texto, ordem, func)
local alturaBotao = 35
local espacamento = 10
local margemSuperior = 40
local botao = Instance.new("TextButton", Frame)
botao.Size = UDim2.new(0, 200, 0, alturaBotao)
botao.Position = UDim2.new(0.5, -100, 0, margemSuperior + (ordem - 1) * (alturaBotao + espacamento))
botao.Text = texto
botao.BackgroundColor3 = Color3.fromRGB(0, 170, 255)
botao.TextColor3 = Color3.new(1, 1, 1)
botao.Font = Enum.Font.SourceSansBold
botao.TextSize = 16
botao.BorderSizePixel = 0
botao.MouseButton1Click:Connect(func)
end
-- Criar botões
criarBotao("Aimbot On/Off", 1, toggleAimbot)
criarBotao("Wall Check On/Off", 2, toggleWallCheck)
criarBotao("ESP On/Off", 3, toggleESP)
criarBotao("Aimbot NPC On/Off", 4, toggleAimbotNPC)



Update