Universal Script 📌
315 Views
15 Executions

Halilflygui

Universal Script 📌
halilyasarkosun
halilyasarkosunPublished 5
10 months 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

Fly

View Raw
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local flying = false
local speed = 50
local bv
local bg

mouse.KeyDown:Connect(function(key)
    if key:lower() == "e" then
        flying = not flying
        if flying then
            local char = player.Character or player.CharacterAdded:Wait()
            local hrp = char:WaitForChild("HumanoidRootPart")
            
            bv = Instance.new("BodyVelocity")
            bv.Velocity = Vector3.new(0,0,0)
            bv.MaxForce = Vector3.new(40000,40000,40000)
            bv.Parent = hrp
            
            bg = Instance.new("BodyGyro")
            bg.MaxTorque = Vector3.new(40000,40000,40000)
            bg.P = 9000
            bg.Parent = hrp
            
            while flying and char:FindFirstChild("HumanoidRootPart") do
                local direction = Vector3.new()
                if game:GetService("UserInputService"):IsKeyDown(Enum.KeyCode.W) then direction = direction + hrp.CFrame.LookVector end
                if game:GetService("UserInputService"):IsKeyDown(Enum.KeyCode.S) then direction = direction - hrp.CFrame.LookVector end
                if game:GetService("UserInputService"):IsKeyDown(Enum.KeyCode.A) then direction = direction - hrp.CFrame.RightVector end
                if game:GetService("UserInputService"):IsKeyDown(Enum.KeyCode.D) then direction = direction + hrp.CFrame.RightVector end
                if game:GetService("UserInputService"):IsKeyDown(Enum.KeyCode.Space) then direction = direction + Vector3.new(0,1,0) end
                if game:GetService("UserInputService"):IsKeyDown(Enum.KeyCode.LeftControl) then direction = direction - Vector3.new(0,1,0) end
                
                bv.Velocity = direction.Unit * speed
                bg.CFrame = workspace.CurrentCamera.CFrame
                wait()
            end
        else
            if bv then bv:Destroy() end
            if bg then bg:Destroy() end


Comments

1
Log in to join the conversation. Login
imnotglitched's profile picture
imnotglitched10 months ago

woah

1

More universal scripts

See all
Universal Script 📌
4.0k
26.6k
4 months ago
Script hub
1.1k
28
4 days ago
Key System
Script hub
3.5M
1.0M
1 year ago
Key System
Script hub
2.7M
643.6k
4 months ago
Key System

Script hub

#2 today

Verified script badgeFlow Hub | 35 Games | Updated