
Key Required

local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local player = Players.LocalPlayer
local camera = workspace.CurrentCamera
-- GUI
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "FlyGui"
screenGui.ResetOnSpawn = false
screenGui.Parent = player:WaitForChild("PlayerGui")
local mainFrame = Instance.new("Frame")
mainFrame.Size = UDim2.new(0,260,0,160)
mainFrame.Position = UDim2.new(0.5,-130,0.5,-80)
mainFrame.BackgroundColor3 = Color3.fromRGB(0,0,0)
mainFrame.Active = true
mainFrame.Parent = screenGui
Instance.new("UICorner", mainFrame).CornerRadius = UDim.new(0,20)
local stroke = Instance.new("UIStroke", mainFrame)
stroke.Thickness = 3
-- Barra arrastável
local topBar = Instance.new("Frame")
topBar.Size = UDim2.new(1,0,0,40)
topBar.BackgroundColor3 = Color3.fromRGB(20,20,20)
topBar.Parent = mainFrame
Instance.new("UICorner", topBar).CornerRadius = UDim.new(0,20)
-- Sistema drag
local dragging = false
local dragStart, startPos
topBar.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1
or input.UserInputType == Enum.UserInputType.Touch then
dragging = true
dragStart = input.Position
startPos = mainFrame.Position
input.Changed:Connect(function()
if input.UserInputState == Enum.UserInputState.End then
dragging = false
end
end)
end
end)
UserInputService.InputChanged:Connect(function(input)
if dragging and (input.UserInputType == Enum.UserInputType.MouseMovement
or input.UserInputType == Enum.UserInputType.Touch) then
local delta = input.Position - dragStart
mainFrame.Position = UDim2.new(
startPos.X.Scale,
startPos.X.Offset + delta.X,
startPos.Y.Scale,
startPos.Y.Offset + delta.Y
)
end
end)
-- Botões
local function createButton(text, y)
local btn = Instance.new("TextButton")
btn.Size = UDim2.new(0.8,0,0,40)
btn.Position = UDim2.new(0.1,0,0,y)
btn.Text = text
btn.TextScaled = true
btn.BackgroundColor3 = Color3.new(1,1,1)
btn.Parent = mainFrame
Instance.new("UICorner", btn).CornerRadius = UDim.new(0,15)
local stroke = Instance.new("UIStroke", btn)
stroke.Thickness = 3
return btn, stroke
end
local flyBtn, flyStroke = createButton("Fly",55)
local unflyBtn, unflyStroke = createButton("Unfly",105)
-- Arco-íris
RunService.RenderStepped:Connect(function()
local hue = (tick()%5)/5
local color = Color3.fromHSV(hue,1,1)
stroke.Color = color
flyStroke.Color = color
unflyStroke.Color = color
end)
-- SISTEMA FLY SUAVE
local flying = false
local velocity
local gyro
local speed = 60
local function startFly()
local char = player.Character or player.CharacterAdded:Wait()
local hrp = char:WaitForChild("HumanoidRootPart")
local humanoid = char:WaitForChild("Humanoid")
humanoid:ChangeState(Enum.HumanoidStateType.Physics)
velocity = Instance.new("LinearVelocity")
velocity.MaxForce = math.huge
velocity.Parent = hrp
local attachment = Instance.new("Attachment", hrp)
velocity.Attachment0 = attachment
gyro = Instance.new("AlignOrientation")
gyro.MaxTorque = math.huge
gyro.Parent = hrp
gyro.Attachment0 = attachment
flying = true
RunService.RenderStepped:Connect(function()
if flying and hrp then
local moveDir = humanoid.MoveDirection
-- Direção baseada na câmera
local camCF = camera.CFrame
local lookVector = camCF.LookVector
local rightVector = camCF.RightVector
local direction = (lookVector * moveDir.Z + rightVector * moveDir.X)
velocity.VectorVelocity = direction * speed
gyro.CFrame = CFrame.lookAt(hrp.Position, hrp.Position + camCF.LookVector)
end
end)
end
local function stopFly()
flying = false
if velocity then velocity:Destroy() end
if gyro then gyro:Destroy() end
local char = player.Character
if char then
char:WaitForChild("Humanoid"):ChangeState(Enum.HumanoidStateType.GettingUp)
end
end
flyBtn.MouseButton1Click:Connect(function()
if not flying then
startFly()
end
end)
unflyBtn.MouseButton1Click:Connect(function()
if flying then
stopFly()
end
end)



Ei mn cadê o link