
Key RequiredUniversal

--[[
WARNING: Heads up! This script has not been verified by ScriptBlox. Use at your own risk!
Toggle Fly: Press 'F' to start flying / stop flying.
]]
local UserInputService = game:GetService("UserInputService")
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local humanoidRootPart = character:WaitForChild("HumanoidRootPart")
local flying = false
local speed = 50 -- Speed of flight (adjustable)
local flyHeight = 5 -- Height above the ground when flying
-- BodyVelocity used for flying
local bodyVelocity = Instance.new("BodyVelocity")
bodyVelocity.MaxForce = Vector3.new(100000, 100000, 100000) -- Make sure the force is high enough to allow flying
bodyVelocity.Velocity = Vector3.new(0, 0, 0)
bodyVelocity.P = 10000
-- Create a simple UI to show flying status
local flyingLabel = Instance.new("TextLabel")
flyingLabel.Size = UDim2.new(0, 200, 0, 50)
flyingLabel.Position = UDim2.new(0.5, -100, 0.5, -25)
flyingLabel.BackgroundTransparency = 1
flyingLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
flyingLabel.TextScaled = true
flyingLabel.Text = "Press 'F' to Toggle Fly"
flyingLabel.Parent = player.PlayerGui:WaitForChild("ScreenGui")
-- Function to toggle flying on/off
local function toggleFly()
if flying then
-- Disable flying: remove the BodyVelocity and return the character to normal state
bodyVelocity.Parent = nil
humanoid.PlatformStand = false
flying = false
flyingLabel.Text = "Press 'F' to Toggle Fly"
else
-- Enable flying: add the BodyVelocity and make the character hover
bodyVelocity.Parent = humanoidRootPart
humanoid.PlatformStand = true
flying = true
flyingLabel.Text = "Flying..."
end
end
-- Update fly movement based on key presses
local function updateFlyMovement()
if flying then
local camera = workspace.CurrentCamera
local direction = Vector3.new(0, 0, 0)
-- Basic WASD movement, plus mouse look
local forward = (camera.CFrame.LookVector * speed)
local right = (camera.CFrame.RightVector * speed)
local up = Vector3.new(0, 1, 0) * flyHeight
-- Get movement input (WASD keys, etc.)
if UserInputService:IsKeyDown(Enum.KeyCode.W) then
direction = direction + forward
end
if UserInputService:IsKeyDown(Enum.KeyCode.S) then
direction = direction - forward
end
if UserInputService:IsKeyDown(Enum.KeyCode.A) then
direction = direction - right
end
if UserInputService:IsKeyDown(Enum.KeyCode.D) then
direction = direction + right
end
if UserInputService:IsKeyDown(Enum.KeyCode.Space) then
direction = direction + up
end
if UserInputService:IsKeyDown(Enum.KeyCode.LeftControl) then
direction = direction - up
end
-- Apply the velocity to the character
bodyVelocity.Velocity = direction
end
end
-- Listen for keypress to toggle fly
UserInputService.InputBegan:Connect(function(input, gameProcessed)
if gameProcessed then return end
if input.UserInputType == Enum.UserInputType.Keyboard then
if input.KeyCode == Enum.KeyCode.F then
toggleFly() -- Toggle flying on/off when 'F' is pressed
end
end
end)
-- Listen for movement updates while flying
game:GetService("RunService").Heartbeat:Connect(function()
updateFlyMovement() -- Update movement direction while flying
end)



don't work
Never tested
I got it from Chatgpt
((((MODERATER)))) PLEZ APPROVE; ITS NOT RIVALS BUT ITS SOMETHING TO PROVE IM 7 DAYS OLD ACCOUNT.