Script
Key RequiredUniversal

Script

Universal ScriptGodverseGodverse 518 views 13 executesUpdated May 31, 2026
2.5/ 5(2 votes)
1150% Positive
Lua Script•199 lines (6672 chars)
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local Workspace = game:GetService("Workspace")
local UserInputService = game:GetService("UserInputService")

local LocalPlayer = Players.LocalPlayer
local Camera = Workspace.CurrentCamera

-- ⚙️ 初期設定パラメータ(UIでリアルタイムに変更可能)
local FOV_RADIUS = 150
local SMOOTHNESS = 0.15
local ASSIST_ENABLED = true
local SHOW_FOV_CIRCLE = true

----------------------------------------------------------------
-- 🟦 1. UIの作成 (メニュー & FOVサークル)
----------------------------------------------------------------
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "AimbotConfigUI"
screenGui.IgnoreGuiInset = true
screenGui.ResetOnSpawn = false
screenGui.Parent = LocalPlayer:WaitForChild("PlayerGui")

-- 🔴 FOVサークル(画面中央の円)
local fovFrame = Instance.new("Frame")
fovFrame.AnchorPoint = Vector2.new(0.5, 0.5)
fovFrame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
fovFrame.BackgroundTransparency = 0.95
fovFrame.BorderSizePixel = 0
fovFrame.Visible = SHOW_FOV_CIRCLE
fovFrame.Parent = screenGui

local uiCornerCircle = Instance.new("UICorner")
uiCornerCircle.CornerRadius = UDim.new(1, 0)
uiCornerCircle.Parent = fovFrame

local uiStrokeCircle = Instance.new("UIStroke")
uiStrokeCircle.Color = Color3.fromRGB(0, 255, 255)
uiStrokeCircle.Thickness = 1
uiStrokeCircle.Parent = fovFrame

-- 📂 設定メニューのメインパネル(画面左側に配置)
local menuPanel = Instance.new("Frame")
menuPanel.Size = UDim2.new(0, 250, 0, 220)
menuPanel.Position = UDim2.new(0, 20, 0.3, 0)
menuPanel.BackgroundColor3 = Color3.fromRGB(30, 30, 35)
menuPanel.BorderSizePixel = 0
menuPanel.Active = true
menuPanel.Draggable = true -- メニューをドラッグで移動可能に
menuPanel.Parent = screenGui

local uiCornerMenu = Instance.new("UICorner")
uiCornerMenu.CornerRadius = UDim.new(0, 8)
uiCornerMenu.Parent = menuPanel

-- タイトルラベル
local titleLabel = Instance.new("TextLabel")
titleLabel.Size = UDim2.new(1, 0, 0, 35)
titleLabel.BackgroundColor3 = Color3.fromRGB(45, 45, 50)
titleLabel.Text = "  Aimbot Settings"
titleLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
titleLabel.TextSize = 16
titleLabel.TextXAlignment = Enum.TextXAlignment.Left
titleLabel.Font = Enum.Font.SourceSansBold
titleLabel.Parent = menuPanel

local uiCornerTitle = Instance.new("UICorner")
uiCornerTitle.CornerRadius = UDim.new(0, 8)
uiCornerTitle.Parent = titleLabel

----------------------------------------------------------------
-- 🟦 2. メニュー内のコンポーネント(ボタン・スライダー)
----------------------------------------------------------------

-- ① ON/OFF トグルボタン
local toggleButton = Instance.new("TextButton")
toggleButton.Size = UDim2.new(0, 210, 0, 35)
toggleButton.Position = UDim2.new(0, 20, 0, 50)
toggleButton.BackgroundColor3 = Color3.fromRGB(0, 180, 100)
toggleButton.Text = "Aimbot: ON"
toggleButton.TextColor3 = Color3.fromRGB(255, 255, 255)
toggleButton.TextSize = 14
toggleButton.Font = Enum.Font.SourceSansBold
toggleButton.Parent = menuPanel
Instance.new("UICorner", toggleButton).CornerRadius = UDim.new(0, 5)

toggleButton.MouseButton1Click:Connect(function()
	ASSIST_ENABLED = not ASSIST_ENABLED
	if ASSIST_ENABLED then
		toggleButton.Text = "Aimbot: ON"
		toggleButton.BackgroundColor3 = Color3.fromRGB(0, 180, 100)
	else
		toggleButton.Text = "Aimbot: OFF"
		toggleButton.BackgroundColor3 = Color3.fromRGB(180, 50, 50)
	end
end)

-- ② FOVサイズ調整スライダーのテキスト
local fovLabel = Instance.new("TextLabel")
fovLabel.Size = UDim2.new(0, 210, 0, 20)
fovLabel.Position = UDim2.new(0, 20, 0, 100)
fovLabel.BackgroundTransparency = 1
fovLabel.Text = "FOV Radius: " .. FOV_RADIUS
fovLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
fovLabel.TextSize = 14
fovLabel.TextXAlignment = Enum.TextXAlignment.Left
fovLabel.Font = Enum.Font.SourceSans
fovLabel.Parent = menuPanel

-- FOVスライダー(簡易版:クリックで3段階切り替え)
local fovBtn = Instance.new("TextButton")
fovBtn.Size = UDim2.new(0, 210, 0, 25)
fovBtn.Position = UDim2.new(0, 20, 0, 120)
fovBtn.BackgroundColor3 = Color3.fromRGB(60, 60, 65)
fovBtn.Text = "Change FOV (Small / Med / Large)"
fovBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
fovBtn.TextSize = 12
fovBtn.Parent = menuPanel
Instance.new("UICorner", fovBtn).CornerRadius = UDim.new(0, 5)

fovBtn.MouseButton1Click:Connect(function()
	if FOV_RADIUS == 80 then
		FOV_RADIUS = 150
	elseif FOV_RADIUS == 150 then
		FOV_RADIUS = 250
	else
		FOV_RADIUS = 80
	end
	fovLabel.Text = "FOV Radius: " .. FOV_RADIUS
end)

-- ③ メニューの非表示・表示切り替え(キーボードの「Insert」キー)
local menuVisible = true
UserInputService.InputBegan:Connect(function(input, gameProcessed)
	if not gameProcessed and input.KeyCode == Enum.KeyCode.Insert then
		menuVisible = not menuVisible
		menuPanel.Visible = menuVisible
	end
end)

-- 案内テキスト
local hintLabel = Instance.new("TextLabel")
hintLabel.Size = UDim2.new(0, 210, 0, 20)
hintLabel.Position = UDim2.new(0, 20, 0, 185)
hintLabel.BackgroundTransparency = 1
hintLabel.Text = "[Insert] キーでメニューを開閉"
hintLabel.TextColor3 = Color3.fromRGB(120, 120, 120)
hintLabel.TextSize = 11
hintLabel.Font = Enum.Font.SourceSansItalic
hintLabel.Parent = menuPanel

----------------------------------------------------------------
-- 🟦 3. エイムボットロジック & ループ
----------------------------------------------------------------
local function getClosestPlayerInFOV()
	if not ASSIST_ENABLED then return nil end
	
	local closestPlayer = nil
	local shortestDistance = FOV_RADIUS
	local screenCenter = Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y / 2)

	for _, player in ipairs(Players:GetPlayers()) do
		if player ~= LocalPlayer and player.Character and player.Character:FindFirstChild("Head") then
			local head = player.Character.Head
			local screenPosition, onScreen = Camera:WorldToViewportPoint(head.Position)

			if onScreen then
				local enemyPos2D = Vector2.new(screenPosition.X, screenPosition.Y)
				local distance = (enemyPos2D - screenCenter).Magnitude

				if distance < shortestDistance then
					shortestDistance = distance
					closestPlayer = player
				end
			end
		end
	end
	return closestPlayer
end

-- 毎フレームの更新処理
RunService.RenderStepped:Connect(function()
	-- FOVサークルの位置と大きさをリアルタイム同期
	if SHOW_FOV_CIRCLE then
		local screenSize = Camera.ViewportSize
		fovFrame.Position = UDim2.new(0, screenSize.X / 2, 0, screenSize.Y / 2)
		fovFrame.Size = UDim2.new(0, FOV_RADIUS * 2, 0, FOV_RADIUS * 2)
	end

	-- ターゲットの追従
	local targetPlayer = getClosestPlayerInFOV()
	if targetPlayer and targetPlayer.Character and targetPlayer.Character:FindFirstChild("Head") then
		local targetHead = targetPlayer.Character.Head
		local targetCFrame = CFrame.new(Camera.CFrame.Position, targetHead.Position)
		
		-- エイムの吸い付きを実行
		Camera.CFrame = Camera.CFrame:Lerp(targetCFrame, SMOOTHNESS)
	end
end)

Features & Information

1
#FOV

Community Comments (0)

No comments yet for this script.

More Scripts for Universal Scripts