اريد الكود كامل بدون كود انشاء الواجهة سوف اضيفه فقط اكتب اين يتم وضعه في الكود مع التعديلات 

اريد الكود كامل مع التعديلات 
اريد الكود كامل مع التعديلات 
بدون كتابة شئ اخر منك
اريد في هذا الاسكربت ان يقوم بألغاء تفعيل الانيميشن الخاص بالطيران بعد ايقاف الطيران 
بمعني اذا قام اللاعب بتفعيل الطيران 
و من ثم قام بالغاء الطيران 
ان يتم ايقاف تشغيل الانيميشن الخاص بالطيران 
emote او pose 
يتم ايقافه
و اريد ان يتم ايضا اخفاء اللاعب عن طريق الضغط علي زر  u
من الكيبورد 
اريد ان يتم اخفاء اللاعب المحدد سواء كان انا المحدد او لاعب اخر

و اريد ان استطيع تحريك الواجهة الخاصة بالاسكربت بالكامل
ان يكون الاسكربت قابل للتحريك
الكود هذا 
-- Functionality Code
local TweenService = game:GetService("TweenService")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
local Character = LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()
local YoepsR = LocalPlayer.Name
local PlayerList = Players:GetPlayers()
local CurrentPlayerIndex = 1
local SelectedPlayer = PlayerList[CurrentPlayerIndex]
local HiddenPlayers = {}
local FlyingAnimationId = "10714347256"
local FlyingAnimationTrack = nil
local IsPanelVisible = true
local IsFlying = false -- Track flying state


-- UI Creation
local HidePlayerPart = Instance.new("ScreenGui")
local FrameButton = Instance.new("Frame")
local UIListLayout = Instance.new("UIListLayout")
local UIPadding = Instance.new("UIPadding")
local UICorner = Instance.new("UICorner")
local PlayerFrameSelect = Instance.new("Frame")
local TeleP = Instance.new("TextButton")
local UICorner_2 = Instance.new("UICorner")
local CnamePlayer = Instance.new("TextLabel")
local UICorner_3 = Instance.new("UICorner")
local CLefttButton = Instance.new("TextButton")
local UICorner_4 = Instance.new("UICorner")
local CRightButton = Instance.new("TextButton")
local UICorner_5 = Instance.new("UICorner")
local ImagePlayerCT = Instance.new("ImageLabel")
local UICorner_6 = Instance.new("UICorner")
local HideOneButto = Instance.new("TextButton")
local UICorner_7 = Instance.new("UICorner")
local HideAllButton = Instance.new("TextButton")
local UICorner_8 = Instance.new("UICorner")
local FlyPlButton = Instance.new("TextButton")
local UICorner_9 = Instance.new("UICorner")
local ColnumHide = Instance.new("TextBox")
local HideSmall = Instance.new("TextButton")
local HideBig = Instance.new("TextButton")
local UICorner_10 = Instance.new("UICorner")
local Xbuttonexit = Instance.new("TextButton")
local UICorner_11 = Instance.new("UICorner")
local YButton = Instance.new("TextButton")
local UICorner_12 = Instance.new("UICorner")

HidePlayerPart.Name = "HidePlayerPart"
HidePlayerPart.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
HidePlayerPart.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
HidePlayerPart.ResetOnSpawn = false

FrameButton.Name = "FrameButton"
FrameButton.Parent = HidePlayerPart
FrameButton.BackgroundColor3 = Color3.new(0.207843, 0.207843, 0.384314)
FrameButton.BorderColor3 = Color3.new(0, 0, 0)
FrameButton.BorderSizePixel = 0
FrameButton.Position = UDim2.new(0.045638945, 0, 0.126126125, 0)
FrameButton.Size = UDim2.new(0, 226, 0, 450)

UIListLayout.Parent = FrameButton
UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
UIListLayout.Padding = UDim.new(0, 15)

UIPadding.Parent = FrameButton
UIPadding.PaddingLeft = UDim.new(0, 12)
UIPadding.PaddingTop = UDim.new(0, 15)

UICorner.Parent = FrameButton
UICorner.CornerRadius = UDim.new(0, 15)

PlayerFrameSelect.Name = "PlayerFrameSelect"
PlayerFrameSelect.Parent = FrameButton
PlayerFrameSelect.BackgroundColor3 = Color3.new(1, 1, 1)
PlayerFrameSelect.BackgroundTransparency = 1
PlayerFrameSelect.BorderColor3 = Color3.new(0, 0, 0)
PlayerFrameSelect.BorderSizePixel = 0
PlayerFrameSelect.Position = UDim2.new(0.0996015966, 0, 0.0361757092, 0)
PlayerFrameSelect.Size = UDim2.new(0, 200, 0, 147)

TeleP.Name = "TeleP"
TeleP.Parent = PlayerFrameSelect
TeleP.BackgroundColor3 = Color3.new(0.333333, 1, 1)
TeleP.BorderColor3 = Color3.new(0, 0, 0)
TeleP.BorderSizePixel = 0
TeleP.Position = UDim2.new(-0.000398559583, 0, 0.569846511, 0)
TeleP.Size = UDim2.new(0, 200, 0, 50)
TeleP.Font = Enum.Font.FredokaOne
TeleP.Text = "Teleport"
TeleP.TextColor3 = Color3.new(0.333333, 0.333333, 0.498039)
TeleP.TextSize = 20
TeleP.TextWrapped = true

UICorner_2.Parent = TeleP
UICorner_2.CornerRadius = UDim.new(0, 15)

CnamePlayer.Name = "CnamePlayer"
CnamePlayer.Parent = PlayerFrameSelect
CnamePlayer.BackgroundColor3 = Color3.new(0.305882, 0.305882, 0.458824)
CnamePlayer.BorderColor3 = Color3.new(0, 0, 0)
CnamePlayer.BorderSizePixel = 0
CnamePlayer.Position = UDim2.new(0.21591644, 0, 0.123925552, 0)
CnamePlayer.Size = UDim2.new(0, 113, 0, 50)
CnamePlayer.Font = Enum.Font.SourceSans
CnamePlayer.Text = "Name Player"
CnamePlayer.TextColor3 = Color3.new(1, 1, 1)
CnamePlayer.TextSize = 14

UICorner_3.Parent = CnamePlayer
UICorner_3.CornerRadius = UDim.new(0, 15)

CLefttButton.Name = "CLefttButton"
CLefttButton.Parent = CnamePlayer
CLefttButton.BackgroundColor3 = Color3.new(0.666667, 1, 1)
CLefttButton.BorderColor3 = Color3.new(0, 0, 0)
CLefttButton.BorderSizePixel = 0
CLefttButton.Position = UDim2.new(-0.380530983, 0, 0.200000003, 0)
CLefttButton.Size = UDim2.new(0, 32, 0, 29)
CLefttButton.Font = Enum.Font.SourceSans
CLefttButton.Text = "<"
CLefttButton.TextColor3 = Color3.new(0, 0, 0)
CLefttButton.TextSize = 14

UICorner_4.Parent = CLefttButton
UICorner_4.CornerRadius = UDim.new(0, 15)

CRightButton.Name = "CRightButton"
CRightButton.Parent = CnamePlayer
CRightButton.BackgroundColor3 = Color3.new(0.666667, 1, 1)
CRightButton.BorderColor3 = Color3.new(0, 0, 0)
CRightButton.BorderSizePixel = 0
CRightButton.Position = UDim2.new(1.10619473, 0, 0.200000003, 0)
CRightButton.Size = UDim2.new(0, 32, 0, 29)
CRightButton.Font = Enum.Font.SourceSans
CRightButton.Text = ">"
CRightButton.TextColor3 = Color3.new(0, 0, 0)
CRightButton.TextSize = 14

UICorner_5.Parent = CRightButton
UICorner_5.CornerRadius = UDim.new(0, 15)

ImagePlayerCT.Name = "ImagePlayerCT"
ImagePlayerCT.Parent = PlayerFrameSelect
ImagePlayerCT.BackgroundColor3 = Color3.new(1, 1, 1)
ImagePlayerCT.BorderColor3 = Color3.new(0, 0, 0)
ImagePlayerCT.BorderSizePixel = 0
ImagePlayerCT.Position = UDim2.new(0.330000013, 0, -0.454305738, 0)
ImagePlayerCT.Size = UDim2.new(0, 67, 0, 67)
ImagePlayerCT.Image = "rbxasset://textures/ui/GuiImagePlaceholder.png"

UICorner_6.Parent = ImagePlayerCT
UICorner_6.CornerRadius = UDim.new(0, 50)

HideOneButto.Name = "HideOneButto"
HideOneButto.Parent = FrameButton
HideOneButto.BackgroundColor3 = Color3.new(0.333333, 0.333333, 0.498039)
HideOneButto.BorderColor3 = Color3.new(0, 0, 0)
HideOneButto.BorderSizePixel = 0
HideOneButto.Position = UDim2.new(0.0557809323, 0, 0.437837839, 0)
HideOneButto.Size = UDim2.new(0, 200, 0, 50)
HideOneButto.Font = Enum.Font.FredokaOne
HideOneButto.Text = "Hide One"
HideOneButto.TextColor3 = Color3.new(1, 1, 1)
HideOneButto.TextSize = 14

UICorner_7.Parent = HideOneButto
UICorner_7.CornerRadius = UDim.new(0, 15)

HideAllButton.Name = "HideAllButton"
HideAllButton.Parent = FrameButton
HideAllButton.BackgroundColor3 = Color3.new(0.333333, 0.333333, 0.498039)
HideAllButton.BorderColor3 = Color3.new(0, 0, 0)
HideAllButton.BorderSizePixel = 0
HideAllButton.Position = UDim2.new(0.0557809323, 0, 0.326126128, 0)
HideAllButton.Size = UDim2.new(0, 200, 0, 50)
HideAllButton.Font = Enum.Font.FredokaOne
HideAllButton.Text = "Hide All"
HideAllButton.TextColor3 = Color3.new(1, 1, 1)
HideAllButton.TextSize = 14

UICorner_8.Parent = HideAllButton
UICorner_8.CornerRadius = UDim.new(0, 15)

FlyPlButton.Name = "FlyPlButton"
FlyPlButton.Parent = FrameButton
FlyPlButton.BackgroundColor3 = Color3.new(0.333333, 0.333333, 0.498039)
FlyPlButton.BorderColor3 = Color3.new(0, 0, 0)
FlyPlButton.BorderSizePixel = 0
FlyPlButton.Position = UDim2.new(0.0557809323, 0, 0.214414418, 0)
FlyPlButton.Size = UDim2.new(0, 200, 0, 50)
FlyPlButton.Font = Enum.Font.FredokaOne
FlyPlButton.Text = "Fly"
FlyPlButton.TextColor3 = Color3.new(1, 1, 1)
FlyPlButton.TextSize = 14

UICorner_9.Parent = FlyPlButton
UICorner_9.CornerRadius = UDim.new(0, 15)

ColnumHide.Name = "ColnumHide"
ColnumHide.Parent = FrameButton
ColnumHide.BackgroundColor3 = Color3.new(0.333333, 0.333333, 0.498039)
ColnumHide.BorderColor3 = Color3.new(0, 0, 0)
ColnumHide.BorderSizePixel = 0
ColnumHide.Position = UDim2.new(0, 0, 0.735849082, 0)
ColnumHide.Size = UDim2.new(0, 145, 0, 50)
ColnumHide.Font = Enum.Font.FredokaOne
ColnumHide.Text = "Hide Num"
ColnumHide.TextColor3 = Color3.new(1, 1, 1)
ColnumHide.TextSize = 14

HideSmall.Name = "HideSmall"
HideSmall.Parent = ColnumHide
HideSmall.BackgroundColor3 = Color3.new(0.666667, 1, 1)
HideSmall.BorderColor3 = Color3.new(0, 0, 0)
HideSmall.BorderSizePixel = 0
HideSmall.Position = UDim2.new(1.37727892, 0, 0.639999986, 0)
HideSmall.Size = UDim2.new(0, -46, 0, 18)
HideSmall.Font = Enum.Font.SourceSans
HideSmall.Text = "-"
HideSmall.TextColor3 = Color3.new(0.333333, 0.333333, 0.498039)
HideSmall.TextScaled = true
HideSmall.TextSize = 14
HideSmall.TextWrapped = true

HideBig.Name = "HideBig"
HideBig.Parent = ColnumHide
HideBig.BackgroundColor3 = Color3.new(0.666667, 1, 1)
HideBig.BorderColor3 = Color3.new(0, 0, 0)
HideBig.BorderSizePixel = 0
HideBig.Position = UDim2.new(1.37727892, 0, 0, 0)
HideBig.Size = UDim2.new(0, -46, 0, 18)
HideBig.Font = Enum.Font.SourceSans
HideBig.Text = "+"
HideBig.TextColor3 = Color3.new(0.333333, 0.333333, 0.498039)
HideBig.TextScaled = true
HideBig.TextSize = 14
HideBig.TextWrapped = true

UICorner_10.Parent = ColnumHide
UICorner_10.CornerRadius = UDim.new(0, 15)

Xbuttonexit.Name = "Xbuttonexit"
Xbuttonexit.Parent = FrameButton
Xbuttonexit.BackgroundColor3 = Color3.new(0.207843, 0.207843, 0.384314)
Xbuttonexit.BorderColor3 = Color3.new(0, 0, 0)
Xbuttonexit.BorderSizePixel = 0
Xbuttonexit.Position = UDim2.new(0.116632856, 0, 0.850450456, 0)
Xbuttonexit.Size = UDim2.new(0, 87, 0, 32)
Xbuttonexit.Font = Enum.Font.FredokaOne
Xbuttonexit.Text = "X"
Xbuttonexit.TextColor3 = Color3.new(1, 1, 1)
Xbuttonexit.TextScaled = true
Xbuttonexit.TextSize = 14
Xbuttonexit.TextWrapped = true

UICorner_11.Parent = Xbuttonexit
UICorner_11.CornerRadius = UDim.new(0, 15)

YButton.Name = "YButton"
YButton.Parent = FrameButton
YButton.BackgroundColor3 = Color3.new(0.207843, 0.207843, 0.384314)
YButton.BorderColor3 = Color3.new(0, 0, 0)
YButton.BorderSizePixel = 0
YButton.Position = UDim2.new(0.5, 0, 0.850450456, 0)
YButton.Size = UDim2.new(0, 87, 0, 32)
YButton.Font = Enum.Font.FredokaOne
YButton.Text = "Y"
YButton.TextColor3 = Color3.new(1, 1, 1)
YButton.TextScaled = true
YButton.TextSize = 14
YButton.TextWrapped = true

UICorner_12.Parent = YButton
UICorner_12.CornerRadius = UDim.new(0, 15)



-- Update Player Info
local function UpdatePlayerInfo()
    if #PlayerList > 0 then
        SelectedPlayer = PlayerList[CurrentPlayerIndex]
        if SelectedPlayer then
            CnamePlayer.Text = SelectedPlayer.Name
            local thumb = Players:GetUserThumbnailAsync(SelectedPlayer.UserId, Enum.ThumbnailType.AvatarBust, Enum.ThumbnailSize.Size60x60)
            ImagePlayerCT.Image = thumb
        end
    else
        CnamePlayer.Text = "No Players"
        ImagePlayerCT.Image = "rbxasset://textures/ui/GuiImagePlaceholder.png"
    end
end

UpdatePlayerInfo()

-- Functions for transparency (ignoring HumanoidRootPart)
local function TweenCharacterTransparency(character, targetTransparency, duration)
    for _, part in ipairs(character:GetDescendants()) do
        if (part:IsA("BasePart") or part:IsA("Texture") or (part:IsA("Decal") and string.lower(part.Name) == "face"))
                and part.Name ~= "HumanoidRootPart" then
            local tweenInfo = TweenInfo.new(duration, Enum.EasingStyle.Linear)
            local tween = TweenService:Create(part, tweenInfo, {Transparency = targetTransparency})
            tween:Play()
        end
    end
end

local function SetCharacterTransparency(character, targetTransparency)
    for _, part in ipairs(character:GetDescendants()) do
        if (part:IsA("BasePart") or part:IsA("Texture") or (part:IsA("Decal") and string.lower(part.Name) == "face"))
                and part.Name ~= "HumanoidRootPart" then
            part.Transparency = targetTransparency
        end
    end
end

-- Toggle single player visibility (gradual if value in ColnumHide)
local function ToggleSinglePlayerVisibility()
    if not SelectedPlayer or not SelectedPlayer.Character then return end
    local currentHidden = HiddenPlayers[SelectedPlayer]
    local duration = 1
    local fieldValue = tonumber(ColnumHide.Text)
    if fieldValue then
        if currentHidden then
            TweenCharacterTransparency(SelectedPlayer.Character, 0, duration)
            HiddenPlayers[SelectedPlayer] = false
            HideOneButto.Text = "Hide Player"
        else
            TweenCharacterTransparency(SelectedPlayer.Character, fieldValue, duration)
            HiddenPlayers[SelectedPlayer] = true
            HideOneButto.Text = "Show Player"
        end
    else
        if currentHidden then
            SetCharacterTransparency(SelectedPlayer.Character, 0)
            HiddenPlayers[SelectedPlayer] = false
            HideOneButto.Text = "Hide Player"
        else
            SetCharacterTransparency(SelectedPlayer.Character, 1)
            HiddenPlayers[SelectedPlayer] = true
            HideOneButto.Text = "Show Player"
        end
    end
end

-- Toggle all players visibility (gradual if value in ColnumHide)
local function HideAllPlayersExceptLocal()
    for _, player in ipairs(Players:GetPlayers()) do
        if player.Name ~= YoepsR and player.Character then
            if not HiddenPlayers[player] then
                local fieldValue = tonumber(ColnumHide.Text)
                if fieldValue then
                    TweenCharacterTransparency(player.Character, fieldValue, 1)
                else
                    SetCharacterTransparency(player.Character, 1)
                end
                HiddenPlayers[player] = true
            end
        end
    end
end

local function ShowAllHiddenPlayersExceptLocal()
    for player, _ in pairs(HiddenPlayers) do
        if player.Name ~= YoepsR and player.Character then
            local fieldValue = tonumber(ColnumHide.Text)
            if fieldValue then
                TweenCharacterTransparency(player.Character, 0, 1)
            else
                SetCharacterTransparency(player.Character, 0)
            end
            HiddenPlayers[player] = nil
        end
    end
end

local function ToggleAllPlayersVisibility()
    local allHidden = true
    for _, player in ipairs(Players:GetPlayers()) do
        if player.Name ~= YoepsR and player.Character then
            if not HiddenPlayers[player] then
                allHidden = false
                break
            end
        end
    end
    if allHidden then
        ShowAllHiddenPlayersExceptLocal()
    else
        HideAllPlayersExceptLocal()
    end
end

-- Teleport to selected player
local function TeleportToSelectedPlayer()
    if SelectedPlayer and SelectedPlayer.Character and LocalPlayer.Character then
        local targetCFrame = SelectedPlayer.Character:GetPrimaryPartCFrame() * CFrame.new(0, 2, 0)
        LocalPlayer.Character:SetPrimaryPartCFrame(targetCFrame)
    end
end

TeleP.MouseButton1Click:Connect(TeleportToSelectedPlayer)

CLefttButton.MouseButton1Click:Connect(function()
    PlayerList = Players:GetPlayers()
    if #PlayerList > 0 then
        CurrentPlayerIndex = ((CurrentPlayerIndex - 2) % #PlayerList) + 1
        UpdatePlayerInfo()
    end
end)

CRightButton.MouseButton1Click:Connect(function()
    PlayerList = Players:GetPlayers()
    if #PlayerList > 0 then
        CurrentPlayerIndex = (CurrentPlayerIndex % #PlayerList) + 1
        UpdatePlayerInfo()
    end
end)

HideOneButto.MouseButton1Click:Connect(function()
    ToggleSinglePlayerVisibility()
end)

HideAllButton.MouseButton1Click:Connect(function()
    for _, player in ipairs(Players:GetPlayers()) do
        if player.Name ~= YoepsR and player.Character then
            local fieldValue = tonumber(ColnumHide.Text)
            if fieldValue then
                TweenCharacterTransparency(player.Character, fieldValue, 1)
            else
                SetCharacterTransparency(player.Character, 1)
            end
            HiddenPlayers[player] = true
        end
    end
end)

YButton.MouseButton1Click:Connect(function()
    ToggleAllPlayersVisibility()
end)

HideSmall.MouseButton1Click:Connect(function()
    local current = tonumber(ColnumHide.Text) or 0
    current = math.clamp(current - 0.1, 0, 1)
    ColnumHide.Text = string.format("%.2f", current)
end)

HideBig.MouseButton1Click:Connect(function()
    local current = tonumber(ColnumHide.Text) or 0
    current = math.clamp(current + 0.1, 0, 1)
    ColnumHide.Text = string.format("%.2f", current)
end)

Xbuttonexit.MouseButton1Click:Connect(function()
    IsPanelVisible = not IsPanelVisible
    FrameButton.Visible = IsPanelVisible
end)

----- FlyCC
local function MakePlayerFly()
    local character = LocalPlayer.Character
    if character then
        local humanoid = character:FindFirstChildOfClass("Humanoid")
        if humanoid then
            local flyAnimation = Instance.new("Animation")
            flyAnimation.AnimationId = "http://www.roblox.com/asset/?id=10714347256"
            FlyingAnimationTrack = humanoid:LoadAnimation(flyAnimation)
            local userInputService = game:GetService("UserInputService")
            local speed = 7
            if not IsFlying then
                IsFlying = true
                humanoid.PlatformStand = true
                character.HumanoidRootPart.Anchored = true
                humanoid.JumpPower = 0
                humanoid.WalkSpeed = 0
                FlyingAnimationTrack:Play()
                local function getNextMovement()
                    local nextMove = Vector3.new(0, 0, 0)
                    if userInputService:IsKeyDown(Enum.KeyCode.W) then
                        nextMove = nextMove + Vector3.new(0, 0, -1)
                    end
                    if userInputService:IsKeyDown(Enum.KeyCode.S) then
                        nextMove = nextMove + Vector3.new(0, 0, 1)
                    end
                    if userInputService:IsKeyDown(Enum.KeyCode.A) then
                        nextMove = nextMove + Vector3.new(-1, 0, 0)
                    end
                    if userInputService:IsKeyDown(Enum.KeyCode.D) then
                        nextMove = nextMove + Vector3.new(1, 0, 0)
                    end
                    if userInputService:IsKeyDown(Enum.KeyCode.Space) then
                        nextMove = nextMove + Vector3.new(0, 1, 0)
                    elseif userInputService:IsKeyDown(Enum.KeyCode.LeftControl) then
                        nextMove = nextMove + Vector3.new(0, -1, 0)
                    end
                    return CFrame.new(nextMove * speed)
                end
                while IsFlying do
                    local rootpart = character:FindFirstChild("HumanoidRootPart")
                    if rootpart then
                        local look = (workspace.CurrentCamera.Focus.Position - workspace.CurrentCamera.CFrame.Position).Unit
                        local pos = rootpart.Position
                        local nextMove = getNextMovement()
                        rootpart.CFrame = CFrame.new(pos, pos + look) * nextMove
                    end
                    wait()
                end
            else
                IsFlying = false
                humanoid.PlatformStand = false
                character.HumanoidRootPart.Anchored = false
                humanoid.JumpPower = 50
                humanoid.WalkSpeed = 16
                if FlyingAnimationTrack then
                    FlyingAnimationTrack:Stop()
                end
            end
        end
    end
end

FlyPlButton.MouseButton1Click:Connect(MakePlayerFly)

-- Keyboard Input for ; and Y keys and U key
UserInputService.InputBegan:Connect(function(input, gameProcessed)
    if gameProcessed then return end
    if input.KeyCode == Enum.KeyCode.Semicolon then
        FrameButton.Visible = not FrameButton.Visible
    elseif input.KeyCode == Enum.KeyCode.Y then
        ToggleAllPlayersVisibility()
    elseif input.KeyCode == Enum.KeyCode.U then
        if LocalPlayer.Character then
            if not HiddenPlayers[LocalPlayer] then
                local fieldValue = tonumber(ColnumHide.Text)
                if fieldValue then
                    TweenCharacterTransparency(LocalPlayer.Character, fieldValue, 1)
                else
                    SetCharacterTransparency(LocalPlayer.Character, 1)
                end
                HiddenPlayers[LocalPlayer] = true
            else
                local fieldValue = tonumber(ColnumHide.Text)
                if fieldValue then
                    TweenCharacterTransparency(LocalPlayer.Character, 0, 1)
                else
                    SetCharacterTransparency(LocalPlayer.Character, 0)
                end
                HiddenPlayers[LocalPlayer] = false
            end
        end
    end
end)

-- Regularly update the player list and info
RunService.Heartbeat:Connect(function()
    PlayerList = Players:GetPlayers()
    if #PlayerList > 0 and CurrentPlayerIndex > #PlayerList then
        CurrentPlayerIndex = 1
    end
    UpdatePlayerInfo()
end)