Fly and speed
Key RequiredUniversal

Fly and speed

Universal ScriptC00LIGA93_2C00LIGA93_2 588 views 5.4K executesUpdated Feb 18, 2026
Unrated
00
Lua Script•173 lines (4478 chars)
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local player = Players.LocalPlayer

local flySpeed = 90
local flying = false
local bodyVelocity
local bodyGyro
local connection

-- GUI
local gui = Instance.new("ScreenGui")
gui.Name = "HubGui"
gui.ResetOnSpawn = false
gui.Parent = player:WaitForChild("PlayerGui")

local main = Instance.new("Frame")
main.Size = UDim2.new(0,260,0,220)
main.Position = UDim2.new(0.5,-130,0.5,-110)
main.BackgroundColor3 = Color3.fromRGB(25,25,25)
main.Active = true
main.Draggable = true
main.Parent = gui
Instance.new("UICorner", main).CornerRadius = UDim.new(0,15)

-- Abas
local flyTabBtn = Instance.new("TextButton")
flyTabBtn.Size = UDim2.new(0.5,0,0,30)
flyTabBtn.Text = "FLY"
flyTabBtn.Parent = main

local chatTabBtn = Instance.new("TextButton")
chatTabBtn.Size = UDim2.new(0.5,0,0,30)
chatTabBtn.Position = UDim2.new(0.5,0,0,0)
chatTabBtn.Text = "CHAT"
chatTabBtn.Parent = main

-- Frames das abas
local flyFrame = Instance.new("Frame")
flyFrame.Size = UDim2.new(1,0,1,-30)
flyFrame.Position = UDim2.new(0,0,0,30)
flyFrame.BackgroundTransparency = 1
flyFrame.Parent = main

local chatFrame = Instance.new("Frame")
chatFrame.Size = UDim2.new(1,0,1,-30)
chatFrame.Position = UDim2.new(0,0,0,30)
chatFrame.BackgroundTransparency = 1
chatFrame.Visible = false
chatFrame.Parent = main

-- Troca de abas
flyTabBtn.MouseButton1Click:Connect(function()
	flyFrame.Visible = true
	chatFrame.Visible = false
end)

chatTabBtn.MouseButton1Click:Connect(function()
	flyFrame.Visible = false
	chatFrame.Visible = true
end)

-- BOTÃO FLY
local flyBtn = Instance.new("TextButton")
flyBtn.Size = UDim2.new(0.8,0,0,40)
flyBtn.Position = UDim2.new(0.1,0,0.1,0)
flyBtn.Text = "FLY OFF"
flyBtn.Parent = flyFrame

-- SPEED +
local speedUp = Instance.new("TextButton")
speedUp.Size = UDim2.new(0.35,0,0,35)
speedUp.Position = UDim2.new(0.1,0,0.5,0)
speedUp.Text = "Speed +"
speedUp.Parent = flyFrame

-- SPEED -
local speedDown = Instance.new("TextButton")
speedDown.Size = UDim2.new(0.35,0,0,35)
speedDown.Position = UDim2.new(0.55,0,0.5,0)
speedDown.Text = "Speed -"
speedDown.Parent = flyFrame

local speedLabel = Instance.new("TextLabel")
speedLabel.Size = UDim2.new(1,0,0,30)
speedLabel.Position = UDim2.new(0,0,0.75,0)
speedLabel.BackgroundTransparency = 1
speedLabel.TextColor3 = Color3.new(1,1,1)
speedLabel.Text = "Velocidade: "..flySpeed
speedLabel.Parent = flyFrame

-- Sistema Fly
flyBtn.MouseButton1Click:Connect(function()

	local char = player.Character
	if not char then return end
	
	local humanoid = char:FindFirstChild("Humanoid")
	local hrp = char:FindFirstChild("HumanoidRootPart")
	if not humanoid or not hrp then return end
	
	flying = not flying
	
	if flying then
		flyBtn.Text = "FLY ON"
		
		bodyVelocity = Instance.new("BodyVelocity")
		bodyVelocity.MaxForce = Vector3.new(1e9,1e9,1e9)
		bodyVelocity.Parent = hrp
		
		bodyGyro = Instance.new("BodyGyro")
		bodyGyro.MaxTorque = Vector3.new(1e9,1e9,1e9)
		bodyGyro.Parent = hrp
		
		humanoid:ChangeState(Enum.HumanoidStateType.Physics)

		connection = RunService.RenderStepped:Connect(function()
			local camera = workspace.CurrentCamera
			local moveInput = humanoid.MoveDirection
			
			if moveInput.Magnitude > 0 then
				local direction = camera.CFrame.LookVector
				bodyVelocity.Velocity = direction * moveInput.Magnitude * flySpeed
			else
				bodyVelocity.Velocity = Vector3.zero
			end
			
			bodyGyro.CFrame = camera.CFrame
		end)
	else
		flyBtn.Text = "FLY OFF"
		
		if connection then connection:Disconnect() end
		if bodyVelocity then bodyVelocity:Destroy() end
		if bodyGyro then bodyGyro:Destroy() end
		
		humanoid:ChangeState(Enum.HumanoidStateType.GettingUp)
	end
end)

-- Ajuste velocidade
speedUp.MouseButton1Click:Connect(function()
	flySpeed = flySpeed + 20
	speedLabel.Text = "Velocidade: "..flySpeed
end)

speedDown.MouseButton1Click:Connect(function()
	flySpeed = math.max(20, flySpeed - 20)
	speedLabel.Text = "Velocidade: "..flySpeed
end)

-- FRASES RÁPIDAS
local frases = {
	"Oi!",
	"Tudo bem?",
	"Bom dia!",
	"Boa tarde!",
	"Boa noite!",
	"Valeu!",
	"Bora!"
}

for i, texto in ipairs(frases) do
	local btn = Instance.new("TextButton")
	btn.Size = UDim2.new(0.8,0,0,30)
	btn.Position = UDim2.new(0.1,0,0.05 + (i-1)*0.12,0)
	btn.Text = texto
	btn.Parent = chatFrame
	
	btn.MouseButton1Click:Connect(function()
		game.ReplicatedStorage.DefaultChatSystemChatEvents.SayMessageRequest:FireServer(texto, "All")
	end)
end

Features & Information

I lost my original account xp

Community Comments (0)

No comments yet for this script.

More Scripts for Universal Scripts