
23.8k Views
607 Executions
Does it work?
No reports yetNo reports yet. Tried it? Be the first to say.
Also noticed:
Description
Fly Enable Disable
Updates
Script edited: Create script
local player = game.Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")
local camera = game.Workspace.CurrentCamera
-- Create the Fly Button GUI
local screenGui = Instance.new("ScreenGui")
screenGui.Parent = playerGui
local flyButton = Instance.new("TextButton")
flyButton.Size = UDim2.new(0, 200, 0, 50)
flyButton.Position = UDim2.new(0.5, -100, 0.9, -25)
flyButton.Text = "Enable Fly"
flyButton.Parent = screenGui
local flying = false
-- Function to enable/disable fly mode
local function toggleFly()
flying = not flying
if flying then
flyButton.Text = "Disable Fly"
-- Enable flying (this can be enhanced with a custom fly system)
local bodyVelocity = Instance.new("BodyVelocity")
bodyVelocity.MaxForce = Vector3.new(100000, 100000, 100000) -- To allow movement
bodyVelocity.Velocity = Vector3.new(0, 50, 0) -- Change this to control the speed
bodyVelocity.Parent = player.Character.HumanoidRootPart
else
flyButton.Text = "Enable Fly"
-- Disable flying
if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
for _, obj in pairs(player.Character.HumanoidRootPart:GetChildren()) do
if obj:IsA("BodyVelocity") then
obj:Destroy()
end
end
end
end
end
flyButton.MouseButton1Click:Connect(toggleFly)










Nice