Universal Script πŸ“Œ
82.3k Views
127 Executions

Fly

Universal Script πŸ“Œ
Tbao
Tbao1M views
2 years ago
Get an executor
Please login to perform these actions:

Does it work?

No reports yet

No reports yet. Tried it? Be the first to say.

Also noticed:

Description

Script

Updates

  1. Script edited: Create script

View Raw
-- Place this script in a LocalScript (for client-side)

local Players = game:GetService("Players")
local player = Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoidRootPart = character:WaitForChild("HumanoidRootPart")

local flying = true -- Set to true to enable flying
local flySpeed = 50 -- Adjust fly speed as needed

-- Function to handle flying
local function startFlying()
    local bodyGyro = Instance.new("BodyGyro")
    local bodyVelocity = Instance.new("BodyVelocity")

    bodyGyro.P = 9e4
    bodyGyro.maxTorque = Vector3.new(9e4, 9e4, 9e4)
    bodyGyro.cframe = humanoidRootPart.CFrame
    bodyGyro.Parent = humanoidRootPart

    bodyVelocity.velocity = Vector3.new(0, 0, 0)
    bodyVelocity.maxForce = Vector3.new(9e4, 9e4, 9e4)
    bodyVelocity.Parent = humanoidRootPart

    while flying do
        humanoidRootPart.CFrame = humanoidRootPart.CFrame
        bodyGyro.cframe = workspace.CurrentCamera.CFrame
        bodyVelocity.velocity = workspace.CurrentCamera.CFrame.LookVector * flySpeed

        local moveDirection = Vector3.new()
        local camera = workspace.CurrentCamera
        local cameraCFrame = camera.CFrame

        -- WASD controls for movement
        if player.Character.Humanoid.MoveDirection.Magnitude > 0 then
            moveDirection = cameraCFrame:VectorToWorldSpace(Vector3.new(player.Character.Humanoid.MoveDirection.X, 0, player.Character.Humanoid.MoveDirection.Z))
        end

        bodyVelocity.velocity = moveDirection * flySpeed



Comments

1
Log in to join the conversation. Login
hiexe's profile picture
hiexe2 years ago(edited)

chatgpt ahh codeπŸ’€ "Place this script in a LocalScript (for client-side)"

1

More universal scripts

See all
Script hub
3.0M
1.1M
Bumped 4 hours ago
Key System

Script hub

#6 today

CanHub V2 200 GAMES KEYLESS

Script hub
202
99
23 hours ago
Script hub
277.5k
165.7k
Bumped 5 hours ago
Key System
Universal Script πŸ“Œ
6.7k
17.1k
Bumped 5 hours ago
Script hub
1.7M
432.5k
Bumped 6 hours ago
Key System

Script hub

#7 today

Verified script badgeAxonic Hub | 50+ Games Supported

Universal Script πŸ“Œ
2.6k
7.2k
Bumped 11 hours ago
Script hub
6.0k
86.8k
Bumped 11 hours ago

Script hub

SAGAZx Hub

Script hub
77.8k
275.1k
Bumped 12 hours ago
Key System