跳至內容
可用Movement

FLYLYLLYLLY THIS IS A FLY SCRUPTT

POPooPoo544 次瀏覽Universal2026年7月28日
分享
FLYLYLLYLLY THIS IS A FLY SCRUPTT

腳本程式碼

Lua
-- Simple Fly Script (for educational purposes / Roblox Studio testing)
local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")

local player = Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local rootPart = character:WaitForChild("HumanoidRootPart")

local flying = false
local flySpeed = 50
local bv, bg

local function startFly()
    if flying then return end
    flying = true
    
    bv = Instance.new("BodyVelocity")
    bv.MaxForce = Vector3.new(1e5, 1e5, 1e5)
    bv.Velocity = Vector3.new(0, 0, 0)
    bv.Parent = rootPart
    
    bg = Instance.new("BodyGyro")
    bg.MaxTorque = Vector3.new(1e5, 1e5, 1e5)
    bg.P = 12500
    bg.Parent = rootPart
    
    humanoid.PlatformStand = true
end

local function stopFly()
    if not flying then return end
    flying = false
    humanoid.PlatformStand = false
    if bv then bv:Destroy() end
    if bg then bg:Destroy() end
end

local function updateFly()
    if not flying then return end
    
    local moveDirection = Vector3.new(0, 0, 0)
    if UserInputService:IsKeyDown(Enum.KeyCode.W) then moveDirection = moveDirection + workspace.CurrentCamera.CFrame.LookVector end
    if UserInputService:IsKeyDown(Enum.KeyCode.S) then moveDirection = moveDirection - workspace.CurrentCamera.CFrame.LookVector end
    if UserInputService:IsKeyDown(Enum.KeyCode.A) then moveDirection = moveDirection - workspace.CurrentCamera.CFrame.RightVector end
    if UserInputService:IsKeyDown(Enum.KeyCode.D) then moveDirection = moveDirection + workspace.CurrentCamera.CFrame.RightVector end
    if UserInputService:IsKeyDown(Enum.KeyCode.Space) then moveDirection = moveDirection + Vector3.new(0, 1, 0) end
    if UserInputService:IsKeyDown(Enum.KeyCode.LeftControl) then moveDirection = moveDirection - Vector3.new(0, 1, 0) end
    
    bv.Velocity = moveDirection.Unit * flySpeed
    bg.CFrame = workspace.CurrentCamera.CFrame
end

-- Toggle with F key
UserInputService.InputBegan:Connect(function(input)
    if input.KeyCode == Enum.KeyCode.F then
        if flying then
            stopFly()
        else
            startFly()
        end
    end
end)

RunService.Heartbeat:Connect(updateFly)

-- Cleanup
player.CharacterAdded:Connect(function(newChar)
    character = newChar
    humanoid = newChar:WaitForChild("Humanoid")
    rootPart = newChar:WaitForChild("HumanoidRootPart")
    if flying then stopFly() end
end)

描述

THIS IS A FLY SCRIPT THIS IS NOT MADE BY AI IT WAS INDEED MADE BY ME AFJHAKDJFHASDKFJHASKDFJHASKDFJHASDKFJHASDKJFHASDFKJHASDKFJHASDFHASDFKJ

評論 (0)

登入以參與討論

  • 成為第一個評論的人。

常見問題

如何使用 FLYLYLLYLLY THIS IS A FLY SCRUPTT 腳本?
複製上方的腳本代碼,在 Roblox 中進入 Universal,然後將代碼貼到你的執行器中並執行。腳本運行後功能會立即生效。
FLYLYLLYLLY THIS IS A FLY SCRUPTT 還能用嗎?
可以 — FLYLYLLYLLY THIS IS A FLY SCRUPTT 目前標記為可用(最近更新:2026年9月21日)。如果在 Roblox 更新後失效,請稍後回來查看修復版本。
哪個執行器相容 FLYLYLLYLLY THIS IS A FLY SCRUPTT?
此腳本相容大多數熱門 Roblox 執行器。查看我們的執行器頁面,為你的裝置找到可信的免費或付費執行器。