CombatTab:CreateSection("Feild of view")

local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local Players = game:GetService("Players")

local localPlayer = Players.LocalPlayer
local mouse = localPlayer:GetMouse()

local aimCircleRadius = 100
local aimCircleThickness = 2 -- Still needed for Drawing properties
local circleColor = Color3.fromRGB(128, 0, 128)
local aimCircle = nil
local fovEnabled = false

local function createAimCircle()
    if not aimCircle then
        aimCircle = Drawing.new("Circle")
        aimCircle.Visible = true
        aimCircle.Filled = false
        aimCircle.Color = circleColor
        aimCircle.Thickness = aimCircleThickness
    end
    aimCircle.Radius = aimCircleRadius
end

RunService.RenderStepped:Connect(function()
    if fovEnabled then
        if not aimCircle then
            createAimCircle()
        end
        aimCircle.Position = Vector2.new(mouse.X, mouse.Y + 40)
        aimCircle.Visible = true
    else
        if aimCircle then
            aimCircle.Visible = false
        end
    end
end)

CombatTab:CreateToggle({
    Name = "Enable FOV Circle",
    CurrentValue = false,
    Callback = function(Value)
        fovEnabled = Value
        if fovEnabled and not aimCircle then
            createAimCircle()
        end
    end,
})

CombatTab:CreateSlider({
    Name = "FOV Circle Radius",
    Range = {50, 500},
    Increment = 10,
    Suffix = "px",
    CurrentValue = aimCircleRadius,
    Callback = function(Value)
        aimCircleRadius = Value
        if aimCircle then
            aimCircle.Radius = aimCircleRadius
        end
    end,
})

CombatTab:CreateColorPicker({
    Name = "FOV Colorpicker",
    Color = circleColor,
    Callback = function(Value)
        circleColor = Value
        if aimCircle then
            aimCircle.Color = circleColor
        end
    end,
})

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: