Universal Script πŸ“Œ
82.3k Views
136 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

2
Log in to join the conversation. Login
korealis's profile picture
korealis2 weeks ago

chatgpt (or claude (or gemini (or grok)))

1
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
Universal Script πŸ“Œ
54
2
Approved 2 hours ago
Script hub
206
1.1k
Bumped 4 hours ago

Script hub

Lunyx Hub

Script hub
120.8k
222.1k
Bumped 4 hours ago
Key System
Script hub
10.7k
203.7k
Bumped 5 hours ago

Script hub

KeylessVerified script badgeIRIDIUM HUB | #1

Script hub
33.4k
301.1k
Bumped 8 hours ago