Vihaan Fly Gui
Key Required

Vihaan Fly Gui

Brookhaven 🏡RPvihaaaaaanvihaaaaaan 4.7K views 4.8K executesUpdated Jul 6, 2026
Unrated
00
Lua Script•389 lines (14203 chars)
-- Custom ⚔️VIHAAN FLY GUI⚔️ Script with Screen Rainbow Border & Creator Tag
-- Optimized for Delta Executor (Camera-Relative Flight)

local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local SoundService = game:GetService("SoundService")
local TextChatService = game:GetService("TextChatService")
local LocalPlayer = Players.LocalPlayer

local PlayerGui = LocalPlayer:WaitForChild("PlayerGui", 10)
if not PlayerGui then return end

if PlayerGui:FindFirstChild("VihaanFlyGui_FinalAudio") then
    PlayerGui.VihaanFlyGui_FinalAudio:Destroy()
end

local ScreenGui = Instance.new("ScreenGui")
ScreenGui.Name = "VihaanFlyGui_FinalAudio"
ScreenGui.Parent = PlayerGui
ScreenGui.ResetOnSpawn = false

------------------- SCREEN BORDER CREATION -------------------
local BorderTop = Instance.new("Frame")
local BorderBottom = Instance.new("Frame")
local BorderLeft = Instance.new("Frame")
local BorderRight = Instance.new("Frame")

local function setupBorder(border, size, position)
    border.Size = size
    border.Position = position
    border.BorderSizePixel = 0
    border.Visible = false 
    border.ZIndex = 99
    border.Parent = ScreenGui
end

setupBorder(BorderTop, UDim2.new(1, 0, 0, 4), UDim2.new(0, 0, 0, 0))
setupBorder(BorderBottom, UDim2.new(1, 0, 0, 4), UDim2.new(0, 0, 1, -4))
setupBorder(BorderLeft, UDim2.new(0, 4, 1, 0), UDim2.new(0, 0, 0, 0))
setupBorder(BorderRight, UDim2.new(0, 4, 1, 0), UDim2.new(1, -4, 0, 0))

------------------- AUTOMATIC CHAT MESSAGER -------------------
task.spawn(function()
    task.wait(0.5)
    pcall(function()
        if TextChatService.ChatVersion == Enum.ChatVersion.TextChatService then
            local generalChannel = TextChatService:FindFirstChild("RBXGeneral", true) or TextChatService:FindFirstChild("TextChannels", true):FindFirstChild("RBXGeneral")
            if generalChannel then
                generalChannel:DisplaySystemMessage("<font color='#FF0000'><b>⚔️VIHAAN FLY GUI⚔️</b></font>")
            end
        else
            local starterGui = game:GetService("StarterGui")
            starterGui:SetCore("ChatMakeSystemMessage", {
                Text = "⚔️VIHAAN FLY GUI⚔️",
                Color = Color3.fromRGB(255, 0, 0),
                Font = Enum.Font.SourceSansBold,
                TextSize = 18
            })
        end
    end)
end)

------------------- SAFE AUDIO ENGINE -------------------
local PhonkSound = Instance.new("Sound")
PhonkSound.Name = "VihaanIntroAudio"
PhonkSound.SoundId = "rbxassetid://16447817028"
PhonkSound.Volume = 2.5
PhonkSound.Parent = SoundService

pcall(function()
    PhonkSound:Play()
end)

------------------- INTRO SCREEN (5 SECONDS) -------------------
local IntroFrame = Instance.new("Frame")
IntroFrame.Name = "IntroFrame"
IntroFrame.Size = UDim2.new(1, 0, 1, 100)
IntroFrame.Position = UDim2.new(0, 0, 0, -50)
IntroFrame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
IntroFrame.BorderSizePixel = 0
IntroFrame.ZIndex = 100 
IntroFrame.Parent = ScreenGui

local IntroText = Instance.new("TextLabel")
IntroText.Name = "IntroText"
IntroText.Size = UDim2.new(1, 0, 0, 100)
IntroText.Position = UDim2.new(0, 0, 0.5, -50)
IntroText.BackgroundTransparency = 1
IntroText.Text = "VIHAAN IS HERE"
IntroText.TextColor3 = Color3.fromRGB(255, 0, 0)
IntroText.Font = Enum.Font.SourceSansBold
IntroText.TextSize = 48
IntroText.ZIndex = 101
IntroText.Parent = IntroFrame

------------------- MAIN INTERFACE CONFIGURATIONS -------------------
local MainFrame = Instance.new("Frame")
local TitleLabel = Instance.new("TextLabel")
local MinimizeButton = Instance.new("TextButton")
local FlyButton = Instance.new("TextButton")
local CreatorLabel = Instance.new("TextLabel") -- New Creator Signature Label
local SpeedLabel = Instance.new("TextLabel")
local SpeedUpButton = Instance.new("TextButton")
local SpeedDownButton = Instance.new("TextButton")

MainFrame.Name = "MainFrame"
MainFrame.Size = UDim2.new(0, 280, 0, 230) -- Adjusted height to properly fit the tag
MainFrame.Position = UDim2.new(0.1, 0, 0.35, 0)
MainFrame.BackgroundColor3 = Color3.fromRGB(15, 15, 18)
MainFrame.BorderSizePixel = 0
MainFrame.Active = true
MainFrame.Visible = false 
MainFrame.Parent = ScreenGui

local function addCorner(parent, radius)
    local corner = Instance.new("UICorner")
    corner.CornerRadius = UDim.new(0, radius)
    corner.Parent = parent
end
addCorner(MainFrame, 12)

-- Universal Dragging Script for Mobile/PC Executors
local function makeDraggable(frame)
    local dragging, dragInput, dragStart, startPos
    local function update(input)
        local delta = input.Position - dragStart
        frame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
    end
    frame.InputBegan:Connect(function(input)
        if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
            dragging = true
            dragStart = input.Position
            startPos = frame.Position
            input.Changed:Connect(function()
                if input.UserInputState == Enum.UserInputState.End then dragging = false end
            end)
        end
    end)
    frame.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 update(input) end
    end)
end
makeDraggable(MainFrame)

-- Title Banner 
TitleLabel.Size = UDim2.new(1, 0, 0, 40)
TitleLabel.BackgroundColor3 = Color3.fromRGB(25, 25, 30)
TitleLabel.Text = "  ⚔️VIHAAN FLY GUI⚔️"
TitleLabel.Font = Enum.Font.SourceSansBold
TitleLabel.TextXAlignment = Enum.TextXAlignment.Left
TitleLabel.TextSize = 16
TitleLabel.Parent = MainFrame
addCorner(TitleLabel, 12)

-- Minimize Button Inside Main Window
MinimizeButton.Name = "MinimizeButton"
MinimizeButton.Size = UDim2.new(0, 35, 0, 30)
MinimizeButton.Position = UDim2.new(1, -40, 0, 5)
MinimizeButton.BackgroundColor3 = Color3.fromRGB(40, 40, 45)
MinimizeButton.Text = "_"
MinimizeButton.TextColor3 = Color3.fromRGB(255, 255, 255)
MinimizeButton.Font = Enum.Font.SourceSansBold
MinimizeButton.TextSize = 18
MinimizeButton.Parent = MainFrame
addCorner(MinimizeButton, 6)

-- Enlarged Fly Toggle Button
FlyButton.Name = "FlyButton"
FlyButton.Size = UDim2.new(0.92, 0, 0, 55)
FlyButton.Position = UDim2.new(0.04, 0, 0.24, 0)
FlyButton.BackgroundColor3 = Color3.fromRGB(40, 40, 45)
FlyButton.Text = "Fly: OFF"
FlyButton.TextColor3 = Color3.fromRGB(255, 255, 255)
FlyButton.Font = Enum.Font.SourceSansBold
FlyButton.TextSize = 24
FlyButton.Parent = MainFrame
addCorner(FlyButton, 8)

-- Creator Signature Tag (Placed nicely right under the Fly button)
CreatorLabel.Name = "CreatorLabel"
CreatorLabel.Size = UDim2.new(1, 0, 0, 20)
CreatorLabel.Position = UDim2.new(0, 0, 0.50, 0)
CreatorLabel.BackgroundTransparency = 1
CreatorLabel.Text = "By-CTX_ViHaAN"
CreatorLabel.Font = Enum.Font.SourceSansBold
CreatorLabel.TextSize = 15
CreatorLabel.Parent = MainFrame

-- Speed Readout Display
SpeedLabel.Size = UDim2.new(1, 0, 0, 20)
SpeedLabel.Position = UDim2.new(0, 0, 0.62, 0)
SpeedLabel.BackgroundTransparency = 1
SpeedLabel.Text = "Speed: 60"
SpeedLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
SpeedLabel.Font = Enum.Font.SourceSans
SpeedLabel.TextSize = 16
SpeedLabel.Parent = MainFrame

-- Decrease Speed Button
SpeedDownButton.Size = UDim2.new(0.44, 0, 0, 35)
SpeedDownButton.Position = UDim2.new(0.04, 0, 0.76, 0)
SpeedDownButton.BackgroundColor3 = Color3.fromRGB(45, 45, 50)
SpeedDownButton.Text = "- Speed"
SpeedDownButton.TextColor3 = Color3.fromRGB(255, 255, 255)
SpeedDownButton.Font = Enum.Font.SourceSansBold
SpeedDownButton.TextSize = 15
SpeedDownButton.Parent = MainFrame
addCorner(SpeedDownButton, 6)

-- Increase Speed Button
SpeedUpButton.Size = UDim2.new(0.44, 0, 0, 35)
SpeedUpButton.Position = UDim2.new(0.52, 0, 0.76, 0)
SpeedUpButton.BackgroundColor3 = Color3.fromRGB(45, 45, 50)
SpeedUpButton.Text = "+ Speed"
SpeedUpButton.TextColor3 = Color3.fromRGB(255, 255, 255)
SpeedUpButton.Font = Enum.Font.SourceSansBold
SpeedUpButton.TextSize = 15
SpeedUpButton.Parent = MainFrame
addCorner(SpeedUpButton, 6)

------------------- MINIMIZED SMALL TAB BAR -------------------
local MinimizedFrame = Instance.new("TextButton")
MinimizedFrame.Name = "MinimizedFrame"
MinimizedFrame.Size = UDim2.new(0, 160, 0, 30)
MinimizedFrame.Position = UDim2.new(0.5, -80, 0, 5) 
MinimizedFrame.BackgroundColor3 = Color3.fromRGB(10, 10, 12) 
MinimizedFrame.Text = "Vihaan Fly Gui"
MinimizedFrame.Font = Enum.Font.SourceSansBold
MinimizedFrame.TextSize = 16
MinimizedFrame.BorderSizePixel = 0
MinimizedFrame.Visible = false
MinimizedFrame.Parent = ScreenGui
addCorner(MinimizedFrame, 6)
makeDraggable(MinimizedFrame)

-- Master Rainbow Color Loop (Controls Titles, Creator Signatures & Screen Borders)
task.spawn(function()
    local hue = 0
    while true do
        hue = (hue + 0.005) % 1
        local currentColor = Color3.fromHSV(hue, 1, 1)
        
        -- Text updates
        if TitleLabel then TitleLabel.TextColor3 = currentColor end
        if MinimizedFrame then MinimizedFrame.TextColor3 = currentColor end
        if CreatorLabel then CreatorLabel.TextColor3 = currentColor end
        
        -- Screen Border frame updates
        BorderTop.BackgroundColor3 = currentColor
        BorderBottom.BackgroundColor3 = currentColor
        BorderLeft.BackgroundColor3 = currentColor
        BorderRight.BackgroundColor3 = currentColor
        
        RunService.Heartbeat:Wait()
    end
end)

------------------- MINIMIZE & MAXIMIZE LOGIC -------------------
MinimizeButton.MouseButton1Click:Connect(function()
    MainFrame.Visible = false
    MinimizedFrame.Visible = true
end)

MinimizedFrame.MouseButton1Click:Connect(function()
    MinimizedFrame.Visible = false
    MainFrame.Visible = true
end)

------------------- TIMERS (AUDIO & GUI) -------------------
task.spawn(function()
    task.wait(2)
    pcall(function()
        if PhonkSound then PhonkSound:Stop() PhonkSound:Destroy() end
    end)
end)

task.spawn(function()
    task.wait(5) 
    if IntroFrame then IntroFrame:Destroy() end
    MainFrame.Visible = true
    
    -- Turn on the screen rainbow borders exactly when the main GUI shows up
    BorderTop.Visible = true
    BorderBottom.Visible = true
    BorderLeft.Visible = true
    BorderRight.Visible = true
end)

------------------- 3D FLY LOGIC ENGINE -------------------
local flying = false
local flySpeed = 60
local bodyGyro, bodyVelocity

local function startFlying()
    local character = LocalPlayer.Character
    if not character then return end
    local rootPart = character:FindFirstChild("HumanoidRootPart")
    local humanoid = character:FindFirstChildOfClass("Humanoid")
    if not rootPart or not humanoid then return end
    
    humanoid.PlatformStand = true
    
    bodyGyro = Instance.new("BodyGyro")
    bodyGyro.maxTorque = Vector3.new(9e9, 9e9, 9e9)
    bodyGyro.cframe = rootPart.CFrame
    bodyGyro.Parent = rootPart
    
    bodyVelocity = Instance.new("BodyVelocity")
    bodyVelocity.maxForce = Vector3.new(9e9, 9e9, 9e9)
    bodyVelocity.velocity = Vector3.new(0, 0, 0)
    bodyVelocity.Parent = rootPart
    
    local camera = workspace.CurrentCamera
    
    task.spawn(function()
        while flying and rootPart and bodyVelocity and bodyGyro do
            local movement = Vector3.new(0, 0, 0)
            
            if UserInputService:IsKeyDown(Enum.KeyCode.W) then movement = movement + camera.CFrame.LookVector end
            if UserInputService:IsKeyDown(Enum.KeyCode.S) then movement = movement - camera.CFrame.LookVector end
            if UserInputService:IsKeyDown(Enum.KeyCode.A) then movement = movement - camera.CFrame.RightVector end
            if UserInputService:IsKeyDown(Enum.KeyCode.D) then movement = movement + camera.CFrame.RightVector end
            if UserInputService:IsKeyDown(Enum.KeyCode.Space) then movement = movement + Vector3.new(0, 1, 0) end
            if UserInputService:IsKeyDown(Enum.KeyCode.LeftShift) then movement = movement - Vector3.new(0, 1, 0) end
            
            if humanoid.MoveDirection.Magnitude > 0 then
                local joystickDir = humanoid.MoveDirection
                local lookVector = camera.CFrame.LookVector
                movement = lookVector * (joystickDir.Magnitude)
            end
            
            if movement.Magnitude > 0 then
                bodyVelocity.velocity = movement.Unit * flySpeed
            else
                bodyVelocity.velocity = Vector3.new(0, 0, 0)
            end
            
            bodyGyro.cframe = camera.CFrame
            RunService.RenderStepped:Wait()
        end
    end)
end

local function stopFlying()
    if bodyGyro then pcall(function() bodyGyro:Destroy() end) end
    if bodyVelocity then pcall(function() bodyVelocity:Destroy() end) end
    
    local character = LocalPlayer.Character
    if character then
        local humanoid = character:FindFirstChildOfClass("Humanoid")
        if humanoid then humanoid.PlatformStand = false end
    end
end

FlyButton.MouseButton1Click:Connect(function()
    flying = not flying
    if flying then
        FlyButton.Text = "Fly: ON"
        FlyButton.BackgroundColor3 = Color3.fromRGB(0, 170, 100)
        startFlying()
    else
        FlyButton.Text = "Fly: OFF"
        FlyButton.BackgroundColor3 = Color3.fromRGB(40, 40, 45)
        stopFlying()
    end
end)

SpeedUpButton.MouseButton1Click:Connect(function()
    flySpeed = math.min(flySpeed + 10, 300)
    SpeedLabel.Text = "Speed: " .. tostring(flySpeed)
end)

SpeedDownButton.MouseButton1Click:Connect(function()
    flySpeed = math.max(flySpeed - 10, 10)
    SpeedLabel.Text = "Speed: " .. tostring(flySpeed)
end)

LocalPlayer.CharacterAdded:Connect(function()
    if flying then
        flying = false
        FlyButton.Text = "Fly: OFF"
        FlyButton.BackgroundColor3 = Color3.fromRGB(40, 40, 45)
        stopFlying()
    end
end)

Features & Information

Fly

Community Comments (0)

No comments yet for this script.

More Scripts for Brookhaven 🏡RP