Animation ID Capture
Key RequiredUniversal

Animation ID Capture

Universal Scriptrendr_skrendr_sk 2.1K views 2K executesUpdated Mar 11, 2026
Unrated
00
Lua Script•225 lines (7744 chars)
local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
local TweenService = game:GetService("TweenService")

local player = Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")

-- Create ScreenGui
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "AnimationCaptureGui"
screenGui.Parent = player:WaitForChild("PlayerGui")

-- Main Frame
local mainFrame = Instance.new("Frame")
mainFrame.Name = "MainFrame"
mainFrame.Size = UDim2.new(0, 400, 0, 250)
mainFrame.Position = UDim2.new(0.5, -200, 0.5, -125)
mainFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
mainFrame.BorderSizePixel = 0
mainFrame.Parent = screenGui

-- UI Corner for rounded edges
local uiCorner = Instance.new("UICorner")
uiCorner.CornerRadius = UDim.new(0, 10)
uiCorner.Parent = mainFrame

-- Title Label
local titleLabel = Instance.new("TextLabel")
titleLabel.Size = UDim2.new(1, 0, 0, 30)
titleLabel.BackgroundTransparency = 1
titleLabel.Text = "Animation Asset ID Capture"
titleLabel.Font = Enum.Font.SourceSansBold
titleLabel.TextSize = 20
titleLabel.TextColor3 = Color3.new(1, 1, 1)
titleLabel.Parent = mainFrame

-- Minimize Button
local minimizeButton = Instance.new("TextButton")
minimizeButton.Size = UDim2.new(0, 30, 0, 30)
minimizeButton.Position = UDim2.new(1, -35, 0, 0)
minimizeButton.Text = "-"
minimizeButton.Font = Enum.Font.SourceSansBold
minimizeButton.TextSize = 24
minimizeButton.TextColor3 = Color3.new(1, 1, 1)
minimizeButton.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
minimizeButton.Parent = mainFrame

-- Container Frame for toggling visibility
local containerFrame = Instance.new("Frame")
containerFrame.Size = UDim2.new(1, 0, 1, -30)
containerFrame.Position = UDim2.new(0, 0, 0, 30)
containerFrame.BackgroundTransparency = 1
containerFrame.Parent = mainFrame

-- Toggle Capture Button
local toggleCaptureButton = Instance.new("TextButton")
toggleCaptureButton.Size = UDim2.new(0, 150, 0, 40)
toggleCaptureButton.Position = UDim2.new(0, 10, 0, 10)
toggleCaptureButton.Text = "Start Capture"
toggleCaptureButton.Font = Enum.Font.SourceSansBold
toggleCaptureButton.TextSize = 18
toggleCaptureButton.TextColor3 = Color3.new(1, 1, 1)
toggleCaptureButton.BackgroundColor3 = Color3.fromRGB(70, 130, 180)
toggleCaptureButton.Parent = containerFrame

-- Input TextBox for animation ID
local animationInput = Instance.new("TextBox")
animationInput.Size = UDim2.new(0, 180, 0, 40)
animationInput.Position = UDim2.new(0, 10, 0, 60)
animationInput.PlaceholderText = "Enter Animation Asset ID"
animationInput.ClearTextOnFocus = false
animationInput.Font = Enum.Font.SourceSans
animationInput.TextSize = 18
animationInput.TextColor3 = Color3.new(1, 1, 1)
animationInput.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
animationInput.Parent = containerFrame

-- Play Button
local playButton = Instance.new("TextButton")
playButton.Size = UDim2.new(0, 60, 0, 40)
playButton.Position = UDim2.new(0, 200, 0, 60)
playButton.Text = "Play"
playButton.Font = Enum.Font.SourceSansBold
playButton.TextSize = 18
playButton.TextColor3 = Color3.new(1, 1, 1)
playButton.BackgroundColor3 = Color3.fromRGB(70, 130, 180)
playButton.Parent = containerFrame

-- Frame for animation list
local listFrame = Instance.new("ScrollingFrame")
listFrame.Size = UDim2.new(0, 170, 1, -20)
listFrame.Position = UDim2.new(1, -180, 0, 10)
listFrame.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
listFrame.BorderSizePixel = 0
listFrame.CanvasSize = UDim2.new(0, 0, 0, 0)
listFrame.ScrollBarThickness = 6
listFrame.Parent = containerFrame

local listUIGrid = Instance.new("UIListLayout")
listUIGrid.Padding = UDim.new(0, 5)
listUIGrid.SortOrder = Enum.SortOrder.LayoutOrder
listUIGrid.Parent = listFrame

local listUICorner = Instance.new("UICorner")
listUICorner.CornerRadius = UDim.new(0, 8)
listUICorner.Parent = listFrame

-- Variables for capture state and animation list
local capturing = false
local capturedAnimations = {}

-- Function to add animation ID to list GUI
local function addAnimationToList(animId)
    if capturedAnimations[animId] then return end
    capturedAnimations[animId] = true

    local itemFrame = Instance.new("Frame")
    itemFrame.Size = UDim2.new(1, -10, 0, 40)
    itemFrame.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
    itemFrame.Parent = listFrame

    local itemUICorner = Instance.new("UICorner")
    itemUICorner.CornerRadius = UDim.new(0, 6)
    itemUICorner.Parent = itemFrame

    local animLabel = Instance.new("TextLabel")
    animLabel.Size = UDim2.new(0.7, 0, 1, 0)
    animLabel.Position = UDim2.new(0, 5, 0, 0)
    animLabel.Text = animId
    animLabel.Font = Enum.Font.SourceSans
    animLabel.TextSize = 16
    animLabel.TextColor3 = Color3.new(1, 1, 1)
    animLabel.BackgroundTransparency = 1
    animLabel.TextTruncate = Enum.TextTruncate.AtEnd
    animLabel.Parent = itemFrame

    local copyButton = Instance.new("TextButton")
    copyButton.Size = UDim2.new(0.25, -10, 0.7, 0)
    copyButton.Position = UDim2.new(0.75, 0, 0.15, 0)
    copyButton.Text = "Copy"
    copyButton.Font = Enum.Font.SourceSansBold
    copyButton.TextSize = 14
    copyButton.TextColor3 = Color3.new(1, 1, 1)
    copyButton.BackgroundColor3 = Color3.fromRGB(70, 130, 180)
    copyButton.Parent = itemFrame

    copyButton.MouseButton1Click:Connect(function()
        setclipboard(animId)
    end)

    -- Update CanvasSize to fit all items
    listFrame.CanvasSize = UDim2.new(0, 0, 0, listUIGrid.AbsoluteContentSize.Y)
end

-- Function to play animation by asset ID
local function playAnimationById(animId)
    if not animId or animId == "" then return end
    local anim = Instance.new("Animation")
    anim.AnimationId = "rbxassetid://"..animId

    local animTrack = humanoid:LoadAnimation(anim)
    animTrack:Play()
    -- Optionally stop after some time or on next play, but keep simple here
end

-- Capture animation IDs when playing on character
local function onAnimationPlayed(track)
    if not capturing then return end
    local animId = track.Animation.AnimationId
    -- AnimationId is a string like "rbxassetid://12345678"
    local id = animId:match("%d+")
    if id then
        addAnimationToList(id)
    end
end

-- Connect to humanoid.AnimationPlayed event
local animationConnection

-- Toggle capture button logic
toggleCaptureButton.MouseButton1Click:Connect(function()
    capturing = not capturing
    if capturing then
        toggleCaptureButton.Text = "Stop Capture"
        animationConnection = humanoid.AnimationPlayed:Connect(onAnimationPlayed)
    else
        toggleCaptureButton.Text = "Start Capture"
        if animationConnection then
            animationConnection:Disconnect()
            animationConnection = nil
        end
    end
end)

-- Play button logic
playButton.MouseButton1Click:Connect(function()
    local animId = animationInput.Text
    playAnimationById(animId)
end)

-- Minimize/maximize logic
local minimized = false
minimizeButton.MouseButton1Click:Connect(function()
    minimized = not minimized
    if minimized then
        containerFrame.Visible = false
        mainFrame.Size = UDim2.new(0, 400, 0, 30)
        minimizeButton.Text = "+"
    else
        containerFrame.Visible = true
        mainFrame.Size = UDim2.new(0, 400, 0, 250)
        minimizeButton.Text = "-"
    end
end)

-- Update character and humanoid references if character respawns
player.CharacterAdded:Connect(function(char)
    character = char
    humanoid = character:WaitForChild("Humanoid")
    if capturing and animationConnection then
        animationConnection:Disconnect()
        animationConnection = humanoid.AnimationPlayed:Connect(onAnimationPlayed)
    end
end)

Features & Information

Works with emotes also. The GUI will dissapear if you respawn. The textbox serve as Asset ID player but it kinda bugged so you have to respawn to stop the animation. Everything else works great
#Animation*etID#Animation *et ID#Logger

Community Comments (1)

asaaa

More Scripts for Universal Scripts