-- Made by YUN -- UPDATED: Right Ctrl toggles GUI, U toggles FOV circle local Players = game:GetService("Players") local RunService = game:GetService("RunService") local Workspace = game:GetService("Workspace") local UserInputService = game:GetService("UserInputService") local StarterGui = game:GetService("StarterGui") local player = Players.LocalPlayer while not player do task.wait() player = Players.LocalPlayer end local playerGui = player:WaitForChild("PlayerGui") local camera = workspace.CurrentCamera -- ===== CONFIGURATION ===== local FOV_RADIUS = 150 local SMOOTHNESS = 0.15 local AIMBOT_ENABLED = true local SHOW_FOV = true -- new: separate control for FOV circle visibility local target = nil local MOUSE_LOCKED = false -- ===== FOV CIRCLE (GUI overlay) ===== local screenGui = Instance.new("ScreenGui") screenGui.Name = "FOVGui" screenGui.ResetOnSpawn = false screenGui.Parent = playerGui local fovCircle = Instance.new("Frame") fovCircle.Size = UDim2.new(0, FOV_RADIUS*2, 0, FOV_RADIUS*2) fovCircle.AnchorPoint = Vector2.new(0.5, 0.5) fovCircle.Position = UDim2.new(0.5, 0, 0.5, 0) fovCircle.BackgroundColor3 = Color3.fromRGB(255,0,0) fovCircle.BackgroundTransparency = 0.9 fovCircle.BorderSizePixel = 0 fovCircle.Parent = screenGui local circleCorner = Instance.new("UICorner") circleCorner.CornerRadius = UDim.new(1,0) circleCorner.Parent = fovCircle -- Visibility is set in updateAimbotState() -- ===== AIMBOT CORE FUNCTIONS ===== local function isVisible(targetCharacter) if not targetCharacter then return false end local hrp = targetCharacter:FindFirstChild("HumanoidRootPart") if not hrp then return false end local origin = camera.CFrame.Position local direction = hrp.Position - origin local params = RaycastParams.new() params.FilterType = Enum.RaycastFilterType.Blacklist params.FilterDescendantsInstances = { player.Character, targetCharacter } local result = Workspace:Raycast(origin, direction, params) return result == nil end local function getClosestInFOV() local closest = nil local shortestDistance = math.huge local screenCenter = Vector2.new( camera.ViewportSize.X/2, camera.ViewportSize.Y/2 ) for _, plr in ipairs(Players:GetPlayers()) do if plr ~= player and plr.Character then local humanoid = plr.Character:FindFirstChildOfClass("Humanoid") local hrp = plr.Character:FindFirstChild("HumanoidRootPart") if humanoid and humanoid.Health > 0 and hrp then local screenPos, onScreen = camera:WorldToViewportPoint(hrp.Position) if onScreen then local dist = (Vector2.new(screenPos.X, screenPos.Y) - screenCenter).Magnitude if dist < FOV_RADIUS and dist < shortestDistance then if isVisible(plr.Character) then closest = plr shortestDistance = dist end end end end end end return closest end -- ===== MAIN RENDER LOOP ===== RunService.RenderStepped:Connect(function() if not AIMBOT_ENABLED then if MOUSE_LOCKED then UserInputService.MouseBehavior = Enum.MouseBehavior.Default MOUSE_LOCKED = false end return end target = getClosestInFOV() if target and target.Character then local hrp = target.Character:FindFirstChild("HumanoidRootPart") if hrp then local camPos = camera.CFrame.Position local lookAt = CFrame.new(camPos, hrp.Position) camera.CFrame = camera.CFrame:Lerp( lookAt, SMOOTHNESS ) if not MOUSE_LOCKED then UserInputService.MouseBehavior = Enum.MouseBehavior.LockCenter MOUSE_LOCKED = true end end else if MOUSE_LOCKED then UserInputService.MouseBehavior = Enum.MouseBehavior.Default MOUSE_LOCKED = false end end end) -- ===== SETTINGS MENU GUI ===== local menuGui = Instance.new("ScreenGui") menuGui.Name = "AimbotMenu" menuGui.ResetOnSpawn = false menuGui.Parent = playerGui menuGui.Enabled = true -- visible by default local mainFrame = Instance.new("Frame") mainFrame.Size = UDim2.new(0,220,0,150) mainFrame.Position = UDim2.new(0.05,0,0.3,0) mainFrame.BackgroundColor3 = Color3.fromRGB(35,35,35) mainFrame.BorderSizePixel = 0 mainFrame.Active = true mainFrame.Draggable = true mainFrame.Parent = menuGui local frameCorner = Instance.new("UICorner") frameCorner.CornerRadius = UDim.new(0,12) frameCorner.Parent = mainFrame local title = Instance.new("TextLabel") title.Size = UDim2.new(1,0,0,30) title.BackgroundTransparency = 1 title.Text = "Aimbot Settings" title.TextColor3 = Color3.new(1,1,1) title.TextScaled = true title.Parent = mainFrame local toggleButton = Instance.new("TextButton") toggleButton.Size = UDim2.new(0.8,0,0,30) toggleButton.Position = UDim2.new(0.1,0,0,40) toggleButton.BackgroundColor3 = Color3.fromRGB(60,60,60) toggleButton.TextColor3 = Color3.new(1,1,1) toggleButton.Text = "Aimbot: ON" toggleButton.Parent = mainFrame local smoothLabel = Instance.new("TextLabel") smoothLabel.Size = UDim2.new(1,0,0,25) smoothLabel.Position = UDim2.new(0,0,0,75) smoothLabel.BackgroundTransparency = 1 smoothLabel.TextColor3 = Color3.new(1,1,1) smoothLabel.TextScaled = true smoothLabel.Text = "Smoothness: "..string.format("%.2f", SMOOTHNESS) smoothLabel.Parent = mainFrame local minus = Instance.new("TextButton") minus.Size = UDim2.new(0,40,0,30) minus.Position = UDim2.new(0.2,0,0,110) minus.Text = "-" minus.BackgroundColor3 = Color3.fromRGB(60,60,60) minus.TextColor3 = Color3.new(1,1,1) minus.Parent = mainFrame local plus = Instance.new("TextButton") plus.Size = UDim2.new(0,40,0,30) plus.Position = UDim2.new(0.6,0,0,110) plus.Text = "+" plus.BackgroundColor3 = Color3.fromRGB(60,60,60) plus.TextColor3 = Color3.new(1,1,1) plus.Parent = mainFrame -- ===== STATE UPDATE FUNCTION ===== local function updateAimbotState() if AIMBOT_ENABLED then toggleButton.Text = "Aimbot: ON" else toggleButton.Text = "Aimbot: OFF" UserInputService.MouseBehavior = Enum.MouseBehavior.Default MOUSE_LOCKED = false end -- FOV circle visible only if aimbot is ON AND SHOW_FOV is true fovCircle.Visible = AIMBOT_ENABLED and SHOW_FOV end -- ===== BUTTONS & KEYBINDS ===== toggleButton.MouseButton1Click:Connect(function() AIMBOT_ENABLED = not AIMBOT_ENABLED updateAimbotState() end) -- E key toggles aimbot UserInputService.InputBegan:Connect(function(input, processed) if processed then return end if input.KeyCode == Enum.KeyCode.E then AIMBOT_ENABLED = not AIMBOT_ENABLED updateAimbotState() end -- NEW: U key toggles FOV circle visibility if input.KeyCode == Enum.KeyCode.U then SHOW_FOV = not SHOW_FOV updateAimbotState() end -- NEW: Right Ctrl toggles the settings GUI if input.KeyCode == Enum.KeyCode.RightControl then menuGui.Enabled = not menuGui.Enabled end end) -- Smoothness controls minus.MouseButton1Click:Connect(function() SMOOTHNESS = math.clamp(SMOOTHNESS - 0.05, 0.01, 1) smoothLabel.Text = "Smoothness: "..string.format("%.2f", SMOOTHNESS) end) plus.MouseButton1Click:Connect(function() SMOOTHNESS = math.clamp(SMOOTHNESS + 0.05, 0.01, 1) smoothLabel.Text = "Smoothness: "..string.format("%.2f", SMOOTHNESS) end) -- Reset camera on respawn player.CharacterAdded:Connect(function() camera.CameraType = Enum.CameraType.Custom UserInputService.MouseBehavior = Enum.MouseBehavior.Default MOUSE_LOCKED = false end) -- ===== NOTIFICATION ===== local function sendNotification(title, text, duration) StarterGui:SetCore("SendNotification", { Title = title; Text = text; Duration = duration or 5; }) end sendNotification("INFO", "E = toggle aimbot | U = toggle FOV | Right Ctrl = toggle menu", 6)