XMAS GUI
Key RequiredUniversal

XMAS GUI

Universal ScriptFienFien 291 views 2 executesUpdated Dec 20, 2025
Unrated
00
Lua Script•334 lines (10737 chars)
-- LocalScript to create a green-themed XMAS GUI with toggleable Speed, Fly, BETA, top-right X close, and animated OPEN button

local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local TweenService = game:GetService("TweenService")

local player = Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")

-- Variables for features
local defaultSpeed = 16
local speedEnabled = false
local flyEnabled = false
local humanoid
local flyBodyVelocity
local flyBodyAngularVelocity
local flyHeartbeat
local mainFrame
local speedButton
local flyButton
local openButton

-- Function to handle character respawn
local function onCharacterAdded(char)
    humanoid = char:WaitForChild("Humanoid")
    humanoid.WalkSpeed = defaultSpeed
    speedEnabled = false
    disableFly()  -- Reset fly on respawn
    if speedButton then updateSpeedButtonColor() end
    if flyButton then updateFlyButtonColor() end
end

player.CharacterAdded:Connect(onCharacterAdded)
if player.Character then
    onCharacterAdded(player.Character)
end

-- Speed toggle
local function toggleSpeed()
    local hum = humanoid
    if hum and hum.Parent then
        speedEnabled = not speedEnabled
        hum.WalkSpeed = speedEnabled and 50 or defaultSpeed
        updateSpeedButtonColor()
    end
end

function updateSpeedButtonColor()
    if speedButton then
        speedButton.BackgroundColor3 = speedEnabled and Color3.fromRGB(0, 100, 0) or Color3.fromRGB(50, 205, 50)
    end
end

-- Fly functions
local function enableFly()
    local hum = humanoid
    local char = player.Character
    if not hum or not hum.Parent or not char then return end
    local root = char:FindFirstChild("HumanoidRootPart")
    if not root then return end

    hum.PlatformStand = true

    flyBodyVelocity = Instance.new("BodyVelocity")
    flyBodyVelocity.MaxForce = Vector3.new(1e5, 1e5, 1e5)
    flyBodyVelocity.Velocity = Vector3.new(0, 0.1, 0)
    flyBodyVelocity.Parent = root

    flyBodyAngularVelocity = Instance.new("BodyAngularVelocity")
    flyBodyAngularVelocity.MaxTorque = Vector3.new(1e5, 1e5, 1e5)
    flyBodyAngularVelocity.AngularVelocity = Vector3.new(0, 0, 0)
    flyBodyAngularVelocity.Parent = root

    flyHeartbeat = RunService.Heartbeat:Connect(function()
        local cam = workspace.CurrentCamera
        if not cam then return end

        local moveVector = Vector3.new(0, 0, 0)
        local flySpeed = 50

        if UserInputService:IsKeyDown(Enum.KeyCode.W) then
            moveVector += cam.CFrame.LookVector
        end
        if UserInputService:IsKeyDown(Enum.KeyCode.S) then
            moveVector -= cam.CFrame.LookVector
        end
        if UserInputService:IsKeyDown(Enum.KeyCode.D) then
            moveVector += cam.CFrame.RightVector
        end
        if UserInputService:IsKeyDown(Enum.KeyCode.A) then
            moveVector -= cam.CFrame.RightVector
        end
        if UserInputService:IsKeyDown(Enum.KeyCode.Space) then
            moveVector += cam.CFrame.UpVector
        end
        if UserInputService:IsKeyDown(Enum.KeyCode.LeftShift) then
            moveVector -= cam.CFrame.UpVector
        end

        if flyBodyVelocity then
            flyBodyVelocity.Velocity = moveVector * flySpeed
        end
    end)

    flyEnabled = true
    updateFlyButtonColor()
end

local function disableFly()
    if flyHeartbeat then
        flyHeartbeat:Disconnect()
        flyHeartbeat = nil
    end
    if flyBodyVelocity then
        flyBodyVelocity:Destroy()
        flyBodyVelocity = nil
    end
    if flyBodyAngularVelocity then
        flyBodyAngularVelocity:Destroy()
        flyBodyAngularVelocity = nil
    end
    local hum = humanoid
    if hum and hum.Parent then
        hum.PlatformStand = false
    end
    flyEnabled = false
    updateFlyButtonColor()
end

local function toggleFly()
    if flyEnabled then
        disableFly()
    else
        enableFly()
    end
end

function updateFlyButtonColor()
    if flyButton then
        flyButton.BackgroundColor3 = flyEnabled and Color3.fromRGB(0, 100, 0) or Color3.fromRGB(50, 205, 50)
    end
end

-- Create the ScreenGui
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "XMAS STILL IN DEVELOPMENT"
screenGui.ResetOnSpawn = false
screenGui.Parent = playerGui

-- Function to create/open the main GUI
local function CreateMainGUI()
    openButton.Visible = false

    -- Reset states
    speedEnabled = false
    if humanoid and humanoid.Parent then
        humanoid.WalkSpeed = defaultSpeed
    end
    disableFly()

    -- Create mainFrame
    mainFrame = Instance.new("Frame")
    mainFrame.Name = "MainFrame"
    mainFrame.Size = UDim2.new(0, 400, 0, 500)
    mainFrame.Position = UDim2.new(0.5, -200, 0.5, -250)
    mainFrame.BackgroundColor3 = Color3.fromRGB(34, 139, 34)
    mainFrame.BorderSizePixel = 0
    mainFrame.Parent = screenGui

    local corner = Instance.new("UICorner")
    corner.CornerRadius = UDim.new(0, 20)
    corner.Parent = mainFrame

    -- Title (leaves space for X button)
    local title = Instance.new("TextLabel")
    title.Name = "Title"
    title.Size = UDim2.new(1, -60, 0, 80)
    title.Position = UDim2.new(0, 0, 0, 20)
    title.BackgroundTransparency = 1
    title.Text = "XMAS STILL IN DEVELOPMENT"
    title.TextColor3 = Color3.fromRGB(255, 255, 255)
    title.TextSize = 28
    title.Font = Enum.Font.GothamBold
    title.Parent = mainFrame

    -- Top-right Close X button
    local closeX = Instance.new("TextButton")
    closeX.Name = "CloseX"
    closeX.Size = UDim2.new(0, 45, 0, 45)
    closeX.Position = UDim2.new(1, -55, 0, 20)
    closeX.BackgroundColor3 = Color3.fromRGB(220, 20, 60)
    closeX.Text = "✕"
    closeX.TextColor3 = Color3.fromRGB(255, 255, 255)
    closeX.TextSize = 32
    closeX.Font = Enum.Font.GothamBold
    closeX.Parent = mainFrame

    local closeXCorner = Instance.new("UICorner")
    closeXCorner.CornerRadius = UDim.new(0, 10)
    closeXCorner.Parent = closeX

    closeX.MouseButton1Click:Connect(function()
        -- Reset states before closing
        speedEnabled = false
        if humanoid and humanoid.Parent then
            humanoid.WalkSpeed = defaultSpeed
        end
        disableFly()
        if mainFrame and mainFrame.Parent then
            mainFrame:Destroy()
        end
        mainFrame = nil
        openButton.Visible = true
    end)

    -- Button 1: Speed
    speedButton = Instance.new("TextButton")
    speedButton.Name = "SpeedButton"
    speedButton.Size = UDim2.new(0.8, 0, 0, 60)
    speedButton.Position = UDim2.new(0.1, 0, 0.20, 0)
    speedButton.BackgroundColor3 = Color3.fromRGB(50, 205, 50)
    speedButton.Text = "Speed"
    speedButton.TextColor3 = Color3.fromRGB(0, 0, 0)
    speedButton.TextSize = 28
    speedButton.Font = Enum.Font.GothamBold
    speedButton.Parent = mainFrame

    local speedCorner = Instance.new("UICorner")
    speedCorner.CornerRadius = UDim.new(0, 12)
    speedCorner.Parent = speedButton

    speedButton.MouseButton1Click:Connect(toggleSpeed)

    -- Button 2: Fly
    flyButton = Instance.new("TextButton")
    flyButton.Name = "FlyButton"
    flyButton.Size = UDim2.new(0.8, 0, 0, 60)
    flyButton.Position = UDim2.new(0.1, 0, 0.35, 0)
    flyButton.BackgroundColor3 = Color3.fromRGB(50, 205, 50)
    flyButton.Text = "Fly"
    flyButton.TextColor3 = Color3.fromRGB(0, 0, 0)
    flyButton.TextSize = 28
    flyButton.Font = Enum.Font.GothamBold
    flyButton.Parent = mainFrame

    local flyCorner = Instance.new("UICorner")
    flyCorner.CornerRadius = UDim.new(0, 12)
    flyCorner.Parent = flyButton

    flyButton.MouseButton1Click:Connect(toggleFly)

    -- Button 3: (BETA) - Does nothing
    local betaButton = Instance.new("TextButton")
    betaButton.Name = "BetaButton"
    betaButton.Size = UDim2.new(0.8, 0, 0, 60)
    betaButton.Position = UDim2.new(0.1, 0, 0.50, 0)
    betaButton.BackgroundColor3 = Color3.fromRGB(76, 175, 80)
    betaButton.Text = "(BETA)"
    betaButton.TextColor3 = Color3.fromRGB(255, 255, 0)
    betaButton.TextSize = 28
    betaButton.Font = Enum.Font.GothamBold
    betaButton.Parent = mainFrame

    local betaCorner = Instance.new("UICorner")
    betaCorner.CornerRadius = UDim.new(0, 12)
    betaCorner.Parent = betaButton

    -- Footer
    local footer = Instance.new("TextLabel")
    footer.Size = UDim2.new(1, 0, 0, 50)
    footer.Position = UDim2.new(0, 0, 1, -70)
    footer.BackgroundTransparency = 1
    footer.Text = "Made with Roblox Lua (Fly: WASD + Space/Shift)"
    footer.TextColor3 = Color3.fromRGB(200, 255, 200)
    footer.TextSize = 18
    footer.Font = Enum.Font.Gotham
    footer.Parent = mainFrame

    -- Set button colors to OFF state
    updateSpeedButtonColor()
    updateFlyButtonColor()
end

-- Create the green/red glowing flowing OPEN button (starts visible)
openButton = Instance.new("TextButton")
openButton.Name = "OpenXMAS"
openButton.Size = UDim2.new(0, 260, 0, 65)
openButton.Position = UDim2.new(0.5, -130, 0, 20)
openButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
openButton.Text = "OPEN XMAS GUI"
openButton.TextColor3 = Color3.fromRGB(255, 255, 255)
openButton.TextSize = 24
openButton.Font = Enum.Font.GothamBold
openButton.Parent = screenGui

local openCorner = Instance.new("UICorner")
openCorner.CornerRadius = UDim.new(0, 15)
openCorner.Parent = openButton

-- Green/Red flowing gradient
local gradient = Instance.new("UIGradient")
gradient.Color = ColorSequence.new({
    ColorSequenceKeypoint.new(0.00, Color3.fromRGB(0, 255, 0)),
    ColorSequenceKeypoint.new(0.50, Color3.fromRGB(255, 0, 0)),
    ColorSequenceKeypoint.new(1.00, Color3.fromRGB(0, 255, 0))
})
gradient.Rotation = 45
gradient.Offset = Vector2.new(0, 0)
gradient.Parent = openButton

-- Flowing animation
local flowTweenInfo = TweenInfo.new(3, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, -1, true)
local flowTween = TweenService:Create(gradient, flowTweenInfo, {Offset = Vector2.new(2, 0)})
flowTween:Play()

-- Glowing stroke
local stroke = Instance.new("UIStroke")
stroke.Color = Color3.fromRGB(255, 255, 255)
stroke.Thickness = 3
stroke.Transparency = 1
stroke.Parent = openButton

local glowTweenInfo = TweenInfo.new(1.2, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, -1, true)
local glowTween = TweenService:Create(stroke, glowTweenInfo, {Transparency = 0})
glowTween:Play()

-- Pulsing size for extra glow effect
local pulseTweenInfo = TweenInfo.new(1.5, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut, -1, true)
local pulseTween = TweenService:Create(openButton, pulseTweenInfo, {Size = UDim2.new(0, 280, 0, 70)})
pulseTween:Play()

-- Connect open button
openButton.MouseButton1Click:Connect(CreateMainGUI)

Features & Information

.

Community Comments (0)

No comments yet for this script.

More Scripts for Universal Scripts