
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 (não some ao morrer)
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "FlyGui"
screenGui.ResetOnSpawn = false
screenGui.Parent = player:WaitForChild("PlayerGui")
-- Frame principal
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.Parent = screenGui
mainFrame.Active = true
local corner = Instance.new("UICorner")
corner.CornerRadius = UDim.new(0,20)
corner.Parent = mainFrame
local stroke = Instance.new("UIStroke")
stroke.Thickness = 3
stroke.Parent = mainFrame
-- Barra superior (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
local topCorner = Instance.new("UICorner")
topCorner.CornerRadius = UDim.new(0,20)
topCorner.Parent = topBar
-- Texto inferior
local credit = Instance.new("TextLabel")
credit.Size = UDim2.new(1,0,0,25)
credit.Position = UDim2.new(0,0,1,-25)
credit.BackgroundTransparency = 1
credit.Text = "YouTuber: LoginEditXZ"
credit.TextColor3 = Color3.new(1,1,1)
credit.TextScaled = true
credit.Parent = mainFrame
-- Função botão arco-íris
local function createButton(text, yPos)
local button = Instance.new("TextButton")
button.Size = UDim2.new(0.8,0,0,40)
button.Position = UDim2.new(0.1,0,0,yPos)
button.Text = text
button.TextScaled = true
button.BackgroundColor3 = Color3.new(1,1,1)
button.Parent = mainFrame
local corner = Instance.new("UICorner")
corner.CornerRadius = UDim.new(0,15)
corner.Parent = button
local stroke = Instance.new("UIStroke")
stroke.Thickness = 3
stroke.Parent = button
return button, stroke
end
local flyButton, flyStroke = createButton("Fly", 55)
local unflyButton, unflyStroke = createButton("Unfly", 105)
-- Arco-íris animado
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 DRAG (segura parte superior)
local dragging = false
local dragInput
local dragStart
local 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)
topBar.InputChanged:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseMovement
or input.UserInputType == Enum.UserInputType.Touch then
dragInput = input
end
end)
UserInputService.InputChanged:Connect(function(input)
if input == dragInput and dragging 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)
-- SISTEMA FLY
local flying = false
local platform
local connection
local function startFly()
local character = player.Character or player.CharacterAdded:Wait()
local hrp = character:WaitForChild("HumanoidRootPart")
flying = true
platform = Instance.new("Part")
platform.Size = Vector3.new(5,1,5)
platform.Transparency = 1
platform.Anchored = true
platform.CanCollide = true
platform.Parent = workspace
connection = RunService.RenderStepped:Connect(function()
if flying and hrp then
local moveDir = character:WaitForChild("Humanoid").MoveDirection
local camLook = camera.CFrame.LookVector
-- posição abaixo do player
platform.Position = hrp.Position - Vector3.new(0,3,0)
if moveDir.Magnitude > 0 then
hrp.CFrame = CFrame.new(hrp.Position, hrp.Position + camLook)
hrp.Velocity = camLook * 50
end
end
end)
end
local function stopFly()
flying = false
if connection then
connection:Disconnect()
end
if platform then
platform:Destroy()
end
end
flyButton.MouseButton1Click:Connect(function()
if not flying then
startFly()
end
end)
unflyButton.MouseButton1Click:Connect(function()
if flying then
stopFly()
end
end)No comments yet for this script.



