Fov Changer
Key RequiredUniversal

Fov Changer

Universal ScriptLURK0LURK0 3.9K views 1.7K executesUpdated Jan 24, 2025
5.0/ 5(1 votes)
10100% Positive
Lua Script•296 lines (7917 chars)
local FovMenu = Instance.new("ScreenGui")
local Main = Instance.new("Frame")
local TextBox = Instance.new("TextBox")
local UICorner = Instance.new("UICorner")
local Set = Instance.new("TextButton")
local UICorner_2 = Instance.new("UICorner")
local UICorner_3 = Instance.new("UICorner")
local Close = Instance.new("TextButton")
local UICorner_4 = Instance.new("UICorner")

--Properties:

FovMenu.Name = "FovMenu"
FovMenu.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
FovMenu.ZIndexBehavior = Enum.ZIndexBehavior.Sibling

Main.Name = "Main"
Main.Parent = FovMenu
Main.BackgroundColor3 = Color3.fromRGB(220, 220, 220)
Main.BorderColor3 = Color3.fromRGB(0, 0, 0)
Main.BorderSizePixel = 0
Main.Position = UDim2.new(0.64581418, 0, 0.21400778, 0)
Main.Size = UDim2.new(0, 189, 0, 136)

TextBox.Parent = Main
TextBox.BackgroundColor3 = Color3.fromRGB(193, 193, 193)
TextBox.BorderColor3 = Color3.fromRGB(0, 0, 0)
TextBox.BorderSizePixel = 0
TextBox.Position = UDim2.new(0.0532213636, 0, 0.234029204, 0)
TextBox.Size = UDim2.new(0, 169, 0, 38)
TextBox.Font = Enum.Font.FredokaOne
TextBox.Text = "1-560"
TextBox.TextColor3 = Color3.fromRGB(255, 255, 255)
TextBox.TextScaled = true
TextBox.TextSize = 14.000
TextBox.TextWrapped = true

UICorner.CornerRadius = UDim.new(0, 6)
UICorner.Parent = TextBox

Set.Name = "Set"
Set.Parent = Main
Set.BackgroundColor3 = Color3.fromRGB(114, 255, 49)
Set.BorderColor3 = Color3.fromRGB(0, 0, 0)
Set.BorderSizePixel = 0
Set.Position = UDim2.new(0.187986344, 0, 0.612481713, 0)
Set.Size = UDim2.new(0, 116, 0, 38)
Set.Font = Enum.Font.FredokaOne
Set.Text = "SET"
Set.TextColor3 = Color3.fromRGB(255, 255, 255)
Set.TextScaled = true
Set.TextSize = 14.000
Set.TextWrapped = true

UICorner_2.CornerRadius = UDim.new(0, 6)
UICorner_2.Parent = Set

UICorner_3.CornerRadius = UDim.new(0, 6)
UICorner_3.Parent = Main

Close.Name = "Close"
Close.Parent = Main
Close.BackgroundColor3 = Color3.fromRGB(255, 61, 64)
Close.BorderColor3 = Color3.fromRGB(0, 0, 0)
Close.BorderSizePixel = 0
Close.Position = UDim2.new(0.859943986, 0, -0.063988857, 0)
Close.Size = UDim2.new(0, 30, 0, 30)
Close.Font = Enum.Font.FredokaOne
Close.Text = "X"
Close.TextColor3 = Color3.fromRGB(255, 255, 255)
Close.TextScaled = true
Close.TextSize = 14.000
Close.TextWrapped = true

UICorner_4.CornerRadius = UDim.new(0, 6)
UICorner_4.Parent = Close

-- Scripts:

local function JBLNUL_fake_script() -- Set.LocalScript 
	local script = Instance.new('LocalScript', Set)

	local button = script.Parent 
	local TweenService = game:GetService("TweenService")
	
	
	local shakeTweenInfo = TweenInfo.new(0.1, Enum.EasingStyle.Sine, Enum.EasingDirection.Out)
	
	local function shakeButton()
		
		local rotateLeft = TweenService:Create(button, shakeTweenInfo, {Rotation = -9})
		local rotateRight = TweenService:Create(button, shakeTweenInfo, {Rotation = 9})
		local rotateCenter = TweenService:Create(button, shakeTweenInfo, {Rotation = 0}) 
	
		
		rotateLeft:Play()
		rotateLeft.Completed:Wait()
		rotateRight:Play()
		rotateRight.Completed:Wait() 
		rotateCenter:Play() 
	end
	
	
	button.MouseButton1Click:Connect(function()
		shakeButton() 
	end)
	
end
coroutine.wrap(JBLNUL_fake_script)()
local function FBNKJLD_fake_script() -- Set.LocalScript 
	local script = Instance.new('LocalScript', Set)

	local button = script.Parent 
	local textBox = script.Parent.Parent:FindFirstChild("TextBox")
	local camera = workspace.CurrentCamera
	
	
	local MIN_FOV = 1
	local MAX_FOV = 560
	
	local originalColor = button.BackgroundColor3 
	local errorColor = Color3.fromRGB(255, 75, 78)
	local successColor = Color3.fromRGB(114, 255, 49)
	
	
	local function setFOV()
		if not textBox then
			return
		end
	
		
		local input = textBox.Text
	
	 
		local number = tonumber(input)
	
		if number then
		
			if number >= MIN_FOV and number <= MAX_FOV then
			
				local tweenInfo = TweenInfo.new(0.5, Enum.EasingStyle.Linear)
				local tweenGoal = { FieldOfView = number }
				local tween = game:GetService("TweenService"):Create(camera, tweenInfo, tweenGoal)
				tween:Play()
	
			
				camera.FieldOfView = number
				button.BackgroundColor3 = successColor
				print("FOV успешно установлен на " .. number)
	
				
				wait(0.5)
				button.BackgroundColor3 = originalColor
			else
			
				warn("Введите число от " .. MIN_FOV .. " до " .. MAX_FOV)
				textBox.Text = "" 
	
			
				button.BackgroundColor3 = errorColor
				wait(0.5)
				button.BackgroundColor3 = originalColor
			end
		else
			
			warn("Введите корректное число!")
			textBox.Text = "" 
	
		
			button.BackgroundColor3 = errorColor
			wait(0.5)
			button.BackgroundColor3 = originalColor
		end
	end
	
	
	button.MouseButton1Click:Connect(setFOV)
	
end
coroutine.wrap(FBNKJLD_fake_script)()
local function RACR_fake_script() -- Close.LocalScript 
	local script = Instance.new('LocalScript', Close)

	local button = script.Parent 
	local TweenService = game:GetService("TweenService")
	local mathRandom = math.random
	
	
	button.Size = UDim2.new(0, 30, 0, 30)
	
	
	local hoverTweenInfo = TweenInfo.new(0.3, Enum.EasingStyle.Sine, Enum.EasingDirection.Out) 
	local hoverSizeGoal = {Size = UDim2.new(0, 35, 0, 35)} 
	local hoverBackSizeGoal = {Size = UDim2.new(0, 30, 0, 30)} 
	
	local function getRandomRotation()
		return mathRandom(0, 1) == 0 and -10 or 10
	end
	
	
	button.MouseEnter:Connect(function()
		local hoverSizeTween = TweenService:Create(button, hoverTweenInfo, hoverSizeGoal)
		hoverSizeTween:Play()
	
		local rotationGoal = {Rotation = getRandomRotation()}
		local hoverRotateTween = TweenService:Create(button, hoverTweenInfo, rotationGoal)
		hoverRotateTween:Play()
	end)
	
	button.MouseLeave:Connect(function()
	
		local hoverBackSizeTween = TweenService:Create(button, hoverTweenInfo, hoverBackSizeGoal)
		hoverBackSizeTween:Play()
	
		local hoverRotateBackTween = TweenService:Create(button, hoverTweenInfo, {Rotation = 0})
		hoverRotateBackTween:Play()
	end)
	
	button.MouseButton1Click:Connect(function()
		local menu = button.Parent 
		menu.Visible = false 
	end)
	
end
coroutine.wrap(RACR_fake_script)()
local function RPKKCU_fake_script() -- Main.LocalScript 
	local script = Instance.new('LocalScript', Main)

	local dragging = false
	local dragStart = nil
	local startPos = nil
	local menu = script.Parent 
	local userInputService = game:GetService("UserInputService")
	local guiService = game:GetService("GuiService")
	
	
	local function startDrag(input)
		dragging = true
		dragStart = input.Position
		startPos = menu.Position
	end
	
	
	local function drag(input)
		if dragging then
			local delta = input.Position - dragStart
			menu.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
		end
	end
	
	local function stopDrag()
		dragging = false
	end
	
	menu.InputBegan:Connect(function(input, isProcessed)
		if not isProcessed then
			if input.UserInputType == Enum.UserInputType.MouseButton1 then
				startDrag(input)
			end
		end
	end)
	
	menu.InputChanged:Connect(function(input)
		if input.UserInputType == Enum.UserInputType.MouseMovement then
			drag(input)
		end
	end)
	
	menu.InputEnded:Connect(function(input)
		if input.UserInputType == Enum.UserInputType.MouseButton1 then
			stopDrag()
		end
	end)
	
	local function handleTouchInput(input, isProcessed)
		if not isProcessed then
			if input.UserInputType == Enum.UserInputType.Touch then
				if input.UserInputState == Enum.UserInputState.Begin then
					startDrag(input)
				elseif input.UserInputState == Enum.UserInputState.Change then
					drag(input)
				elseif input.UserInputState == Enum.UserInputState.End then
					stopDrag()
				end
			end
		end
	end
	
	userInputService.InputBegan:Connect(handleTouchInput)
	userInputService.InputChanged:Connect(handleTouchInput)
	userInputService.InputEnded:Connect(handleTouchInput)
	
	userInputService.TouchMovementEnabled = false
	
end
coroutine.wrap(RPKKCU_fake_script)()

Features & Information

1-560

Community Comments (0)

No comments yet for this script.

More Scripts for Universal Scripts