getgenv().FOVEnabled = true getgenv().FOVValue = 70 getgenv().LockFOV = true getgenv().SmoothSpeed = 8 local player = game.Players.LocalPlayer local camera = workspace.CurrentCamera local TweenService = game:GetService("TweenService") local UserInputService = game:GetService("UserInputService") local ScreenGui = Instance.new("ScreenGui") ScreenGui.Name = "FOVChanger" ScreenGui.ResetOnSpawn = false ScreenGui.Parent = player:WaitForChild("PlayerGui") local MainFrame = Instance.new("Frame") MainFrame.Size = UDim2.new(0, 260, 0, 110) MainFrame.Position = UDim2.new(0.5, -130, 0.35, 0) MainFrame.BackgroundColor3 = Color3.fromRGB(45, 45, 45) MainFrame.BorderSizePixel = 0 MainFrame.Parent = ScreenGui local UICorner = Instance.new("UICorner") UICorner.CornerRadius = UDim.new(0, 12) UICorner.Parent = MainFrame local UIStroke = Instance.new("UIStroke") UIStroke.Color = Color3.fromRGB(65, 65, 65) UIStroke.Thickness = 1.5 UIStroke.Parent = MainFrame local ValueText = Instance.new("TextLabel") ValueText.Size = UDim2.new(1, 0, 0, 40) ValueText.BackgroundTransparency = 1 ValueText.Text = "FOV: " .. getgenv().FOVValue ValueText.TextColor3 = Color3.fromRGB(0, 170, 255) ValueText.TextSize = 22 ValueText.Font = Enum.Font.GothamBold ValueText.Parent = MainFrame local SliderBG = Instance.new("Frame") SliderBG.Size = UDim2.new(0, 220, 0, 8) SliderBG.Position = UDim2.new(0.5, -110, 0, 55) SliderBG.BackgroundColor3 = Color3.fromRGB(70, 70, 70) SliderBG.BorderSizePixel = 0 SliderBG.Parent = MainFrame local SliderCorner = Instance.new("UICorner") SliderCorner.CornerRadius = UDim.new(1, 0) SliderCorner.Parent = SliderBG local SliderFill = Instance.new("Frame") SliderFill.Size = UDim2.new(0, 0, 1, 0) SliderFill.BackgroundColor3 = Color3.fromRGB(0, 170, 255) SliderFill.BorderSizePixel = 0 SliderFill.Parent = SliderBG local FillCorner = Instance.new("UICorner") FillCorner.CornerRadius = UDim.new(1, 0) FillCorner.Parent = SliderFill local Knob = Instance.new("Frame") Knob.Size = UDim2.new(0, 18, 0, 18) Knob.Position = UDim2.new(0, -9, 0.5, -9) Knob.BackgroundColor3 = Color3.fromRGB(0, 170, 255) Knob.BorderSizePixel = 0 Knob.ZIndex = 2 Knob.Parent = SliderBG local KnobCorner = Instance.new("UICorner") KnobCorner.CornerRadius = UDim.new(1, 0) KnobCorner.Parent = Knob local dragging = false local dragStart local startPos ValueText.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then dragging = true dragStart = input.Position startPos = MainFrame.Position end end) UserInputService.InputChanged:Connect(function(input) if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then local delta = input.Position - dragStart MainFrame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y) end end) ValueText.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then dragging = false end end) local sliderDragging = false SliderBG.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then sliderDragging = true end end) UserInputService.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then sliderDragging = false end end) UserInputService.InputChanged:Connect(function(input) if sliderDragging and input.UserInputType == Enum.UserInputType.MouseMovement then local mousePos = UserInputService:GetMouseLocation() local relative = mousePos.X - SliderBG.AbsolutePosition.X local percentage = math.clamp(relative / SliderBG.AbsoluteSize.X, 0, 1) getgenv().FOVValue = math.floor(percentage * 120) ValueText.Text = "FOV: " .. getgenv().FOVValue SliderFill.Size = UDim2.new(percentage, 0, 1, 0) Knob.Position = UDim2.new(percentage, -9, 0.5, -9) end end) local function updateSlider() local percentage = getgenv().FOVValue / 120 SliderFill.Size = UDim2.new(percentage, 0, 1, 0) Knob.Position = UDim2.new(percentage, -9, 0.5, -9) end updateSlider() local currentTween = nil local function setFOV(target) if currentTween then currentTween:Cancel() end local tweenInfo = TweenInfo.new(0.2 / (getgenv().SmoothSpeed / 5), Enum.EasingStyle.Quint, Enum.EasingDirection.Out) currentTween = TweenService:Create(camera, tweenInfo, {FieldOfView = target}) currentTween:Play() end task.spawn(function() while getgenv().LockFOV and getgenv().FOVEnabled do if math.abs(camera.FieldOfView - getgenv().FOVValue) > 0.3 then setFOV(getgenv().FOVValue) end task.wait(0.03) end end)