Fpv drone script universal
Key RequiredUniversal

Fpv drone script universal

Universal Script1234sacitire1234sacitire 848 views 7K executesUpdated Jul 27, 2026
5.0/ 5(1 votes)
10100% Positive
Lua Script•253 lines (9108 chars)
-- FPV 3D ACRO DRONE (FIXED SLIDER + NO TELEPORT + CAMERA TILT SLIDER)
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local GuiService = game:GetService("GuiService")

local player = Players.LocalPlayer
local camera = workspace.CurrentCamera

-- CONFIGURAZIONE ACRO
local STICK_SENSITIVITY = 300   
local ROLL_MULTIPLIER = 1.5   
local EXPO = 1.2              
local THROTTLE_MAX_POWER = 130  

-- FISICA
local DRAG = 0.992             
local GRAVITY_FORCE = 45     
local CAMERA_TILT = 30
local DEADZONE = 0.15          
local BOUNCE_ELASTICITY = 0.2 
local SLIDE_BOOST = 50 
local SLIDE_FRICTION = 0.98

-- STATO
local active = false
local unarmed = false 
local velocity = Vector3.new()
local currentPos = camera.CFrame.Position
local droneRotation = CFrame.new()

-- GUI SETUP
local screenGui = Instance.new("ScreenGui", player:WaitForChild("PlayerGui"))
screenGui.Name = "DroneGuiAcro3D"
screenGui.ResetOnSpawn = false

local toggleBtn = Instance.new("TextButton", screenGui)
toggleBtn.Size = UDim2.new(0, 160, 0, 40)
toggleBtn.Position = UDim2.new(1, -180, 0, 20)
toggleBtn.Text = "3D ACRO: OFF (Y)"
toggleBtn.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
toggleBtn.TextColor3 = Color3.new(1, 1, 1)
toggleBtn.Font = Enum.Font.SourceSansBold
toggleBtn.TextSize = 14
Instance.new("UICorner", toggleBtn)

-- SLIDER SPEED (ORIGINALE)
local sliderFrame = Instance.new("Frame", screenGui)
sliderFrame.Size = UDim2.new(0, 160, 0, 25)
sliderFrame.Position = UDim2.new(1, -180, 0, 65)
sliderFrame.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
Instance.new("UICorner", sliderFrame)

local sliderBar = Instance.new("Frame", sliderFrame)
sliderBar.Size = UDim2.new(THROTTLE_MAX_POWER/500, 0, 1, 0)
sliderBar.BackgroundColor3 = Color3.fromRGB(0, 180, 100)
Instance.new("UICorner", sliderBar)

local sliderLabel = Instance.new("TextLabel", sliderFrame)
sliderLabel.Size = UDim2.new(1, 0, 1, 0)
sliderLabel.BackgroundTransparency = 1
sliderLabel.Text = "SPEED: " .. math.floor(THROTTLE_MAX_POWER)
sliderLabel.TextColor3 = Color3.new(1, 1, 1)
sliderLabel.Font = Enum.Font.SourceSansBold
sliderLabel.TextSize = 14
sliderLabel.ZIndex = 3

-- NUOVO SLIDER TILT (ANGOLO CAMERA)
local tiltFrame = Instance.new("Frame", screenGui)
tiltFrame.Size = UDim2.new(0, 160, 0, 25)
tiltFrame.Position = UDim2.new(1, -180, 0, 95)
tiltFrame.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
Instance.new("UICorner", tiltFrame)

local tiltBar = Instance.new("Frame", tiltFrame)
tiltBar.Size = UDim2.new(CAMERA_TILT/60, 0, 1, 0)
tiltBar.BackgroundColor3 = Color3.fromRGB(0, 120, 220)
Instance.new("UICorner", tiltBar)

local tiltLabel = Instance.new("TextLabel", tiltFrame)
tiltLabel.Size = UDim2.new(1, 0, 1, 0)
tiltLabel.BackgroundTransparency = 1
tiltLabel.Text = "TILT: " .. math.floor(CAMERA_TILT) .. "°"
tiltLabel.TextColor3 = Color3.new(1, 1, 1)
tiltLabel.Font = Enum.Font.SourceSansBold
tiltLabel.TextSize = 14
tiltLabel.ZIndex = 3

local unarmedLabel = Instance.new("TextLabel", screenGui)
unarmedLabel.Size = UDim2.new(0, 160, 0, 25)
unarmedLabel.Position = UDim2.new(1, -180, 0, 130) -- Spostato per fare spazio al tilt
unarmedLabel.Text = "ARMED"
unarmedLabel.BackgroundColor3 = Color3.fromRGB(0, 180, 0)
unarmedLabel.TextColor3 = Color3.new(1, 1, 1)
unarmedLabel.Font = Enum.Font.SourceSansBold
unarmedLabel.TextSize = 14
Instance.new("UICorner", unarmedLabel)

-- LOGICA SLIDERS
local isDraggingSpeed = false
local isDraggingTilt = false

local function updateSliders()
	local mouseLocation = UserInputService:GetMouseLocation()
	local inset = GuiService:GetGuiInset()
	local adjustedMouseX = mouseLocation.X - inset.X
	
	if isDraggingSpeed then
		local relativeX = adjustedMouseX - sliderFrame.AbsolutePosition.X
		local percentage = math.clamp(relativeX / sliderFrame.AbsoluteSize.X, 0, 1)
		sliderBar.Size = UDim2.new(percentage, 0, 1, 0)
		THROTTLE_MAX_POWER = percentage * 500
		sliderLabel.Text = "SPEED: " .. math.floor(THROTTLE_MAX_POWER)
	elseif isDraggingTilt then
		local relativeX = adjustedMouseX - tiltFrame.AbsolutePosition.X
		local percentage = math.clamp(relativeX / tiltFrame.AbsoluteSize.X, 0, 1)
		tiltBar.Size = UDim2.new(percentage, 0, 1, 0)
		CAMERA_TILT = percentage * 60 -- Range 0-60 gradi
		tiltLabel.Text = "TILT: " .. math.floor(CAMERA_TILT) .. "°"
	end
end

sliderFrame.InputBegan:Connect(function(i) 
	if i.UserInputType == Enum.UserInputType.MouseButton1 or i.UserInputType == Enum.UserInputType.Touch then 
		isDraggingSpeed = true updateSliders()
	end 
end)

tiltFrame.InputBegan:Connect(function(i) 
	if i.UserInputType == Enum.UserInputType.MouseButton1 or i.UserInputType == Enum.UserInputType.Touch then 
		isDraggingTilt = true updateSliders()
	end 
end)

UserInputService.InputEnded:Connect(function(i) 
	if i.UserInputType == Enum.UserInputType.MouseButton1 or i.UserInputType == Enum.UserInputType.Touch then 
		isDraggingSpeed = false
		isDraggingTilt = false
	end 
end)

-- LOGICA ATTIVAZIONE (NO TELEPORT)
local function toggle()
	active = not active
	local char = player.Character
	local hrp = char and char:FindFirstChild("HumanoidRootPart")
	
	if active then
		if hrp then 
			hrp.Anchored = true 
			currentPos = hrp.Position + Vector3.new(0, 5, 0)
		else
			currentPos = camera.CFrame.Position
		end
		velocity = Vector3.new()
		droneRotation = camera.CFrame * CFrame.Angles(math.rad(-CAMERA_TILT), 0, 0)
		droneRotation = droneRotation - droneRotation.Position
		camera.CameraType = Enum.CameraType.Scriptable
		UserInputService.MouseBehavior = Enum.MouseBehavior.LockCenter
		toggleBtn.Text = "3D ACRO: ON"
		toggleBtn.BackgroundColor3 = Color3.fromRGB(200, 50, 50)
	else
		if hrp then hrp.Anchored = false end
		camera.CameraType = Enum.CameraType.Custom
		toggleBtn.Text = "3D ACRO: OFF (Y)"
		toggleBtn.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
		UserInputService.MouseBehavior = Enum.MouseBehavior.Default
	end
end

-- LOGICA UNARMED
local function toggleUnarmed()
	unarmed = not unarmed
	if unarmed then
		unarmedLabel.Text = "UNARMED (SLIDE)"
		unarmedLabel.BackgroundColor3 = Color3.fromRGB(200, 100, 0)
	else
		unarmedLabel.Text = "ARMED"
		unarmedLabel.BackgroundColor3 = Color3.fromRGB(0, 180, 0)
	end
end

-- FISICA RAYCAST
local raycastParams = RaycastParams.new()
raycastParams.FilterType = Enum.RaycastFilterType.Exclude
local function updateFilter(char) if char then raycastParams.FilterDescendantsInstances = {char} end end
updateFilter(player.Character or player.CharacterAdded:Wait())
player.CharacterAdded:Connect(updateFilter)

local function applyExpo(value)
	local sign = value > 0 and 1 or -1
	return sign * (math.abs(value) ^ EXPO)
end

-- LOOP PRINCIPALE
RunService.RenderStepped:Connect(function(dt)
	if isDraggingSpeed or isDraggingTilt then updateSliders() end
	if not active then return end

	local pitch, roll, yaw = 0, 0, 0
	local throttleInput = 0
	
	local gpts = UserInputService:GetGamepadState(Enum.UserInputType.Gamepad1)
	for _, input in pairs(gpts) do
		local pos = input.Position
		if input.KeyCode == Enum.KeyCode.Thumbstick1 then
			if math.abs(pos.X) > DEADZONE then yaw = applyExpo(-pos.X) end
			if math.abs(pos.Y) > DEADZONE then throttleInput = pos.Y end
		elseif input.KeyCode == Enum.KeyCode.Thumbstick2 then
			if math.abs(pos.Y) > DEADZONE then pitch = applyExpo(-pos.Y) end
			if math.abs(pos.X) > DEADZONE then roll = applyExpo(pos.X) end
		end
	end

	local thrust = Vector3.new()
	if not unarmed then
		thrust = droneRotation.UpVector * (throttleInput * THROTTLE_MAX_POWER)
	end
	
	velocity = (velocity + (thrust * dt) + (Vector3.new(0, -GRAVITY_FORCE, 0) * dt)) * math.pow(DRAG, dt * 60)
	
	local move = velocity * dt
	if move.Magnitude > 0.01 then
		local hit = workspace:Raycast(currentPos, move + (move.Unit * 1.2), raycastParams)
		if hit then
			local reflect = velocity - 2 * velocity:Dot(hit.Normal) * hit.Normal
			velocity = reflect * BOUNCE_ELASTICITY
			currentPos = hit.Position + hit.Normal * 0.2
		end
	end

	local groundRay = workspace:Raycast(currentPos, Vector3.new(0, -2.5, 0), raycastParams)
	if groundRay and unarmed then
		local normal = groundRay.Normal
		if normal.Y < 0.9999 then 
			local slideDir = (Vector3.new(0, -1, 0) - (normal * Vector3.new(0, -1, 0):Dot(normal))).Unit
			velocity = (velocity + (slideDir * (GRAVITY_FORCE + SLIDE_BOOST) * dt)) * SLIDE_FRICTION
		end
	end

	local rotDelta = CFrame.Angles(math.rad(pitch * STICK_SENSITIVITY * dt), math.rad(yaw * STICK_SENSITIVITY * dt), math.rad(-roll * (STICK_SENSITIVITY * ROLL_MULTIPLIER) * dt))
	droneRotation = droneRotation * rotDelta
	currentPos = currentPos + velocity * dt
	camera.CFrame = CFrame.new(currentPos) * droneRotation * CFrame.Angles(math.rad(CAMERA_TILT), 0, 0)
end)

UserInputService.InputBegan:Connect(function(input, processed)
	if processed then return end
	if input.KeyCode == Enum.KeyCode.ButtonY or input.KeyCode == Enum.KeyCode.Y then toggle()
	elseif input.KeyCode == Enum.KeyCode.ButtonB or input.KeyCode == Enum.KeyCode.B then toggleUnarmed() end
end)

toggleBtn.MouseButton1Click:Connect(toggle)

Features & Information

Simple fpv drone script that works in all games(made with gemini)

Community Comments (0)

No comments yet for this script.

More Scripts for Universal Scripts