Advertisement
justneed

Animator logger + player script gui

Jan 22nd, 2025 (edited)
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.92 KB | Source Code | 0 0
  1. local plr = game:GetService("Players")
  2. local me  = plr.LocalPlayer
  3. local hum = me.Character:WaitForChild("Humanoid")
  4. local hrp = me.Character:WaitForChild("HumanoidRootPart")
  5.  
  6. local function update()
  7.     hum = me.Character:WaitForChild("Humanoid")
  8.     hrp = me.Character:WaitForChild("HumanoidRootPart")
  9.     animator = hum:FindFirstChild("Animator")
  10. end
  11.  
  12. me.CharacterAdded:Connect(update)
  13.  
  14. if me.Character then
  15.     update()
  16. end
  17.  
  18. local animator = hum:FindFirstChild("Animator")
  19.  
  20. local screen  = Instance.new("ScreenGui")
  21. screen.Parent = me.PlayerGui
  22. screen.Name   = "AnimLogger"
  23.  
  24. local frame    = Instance.new("Frame")
  25. frame.Parent   = screen
  26. frame.Size     = UDim2.new(0,250,0,250)
  27. frame.Position = UDim2.new(0,15,0,380)
  28. frame.Name     = "LogFrame"
  29.  
  30. frame.Active     = true
  31. frame.Selectable = true
  32. frame.Draggable  = true
  33.  
  34. local btn    = Instance.new("TextButton")
  35. btn.Parent   = frame
  36. btn.Size     = UDim2.new(0,25,0,25)
  37. btn.Position = UDim2.new(0,225,0,0)
  38. btn.Text     = "X"
  39. btn.TextSize = 12
  40.  
  41. local text             = Instance.new("TextBox")
  42. text.Parent            = frame
  43. text.Size              = UDim2.new(0,80,0,35)
  44. text.Position          = UDim2.new(0,90,0,100)
  45. text.Text              = ""
  46. text.PlaceholderText   = "Animation"
  47. text.PlaceholderColor3 = Color3.fromRGB(70,70,70)
  48. text.TextSize          = 12
  49.  
  50. local label           = Instance.new("TextLabel")
  51. label.Parent          = frame
  52. label.Text            = "AnimationId"
  53. label.Position        = UDim2.new(0,72,0,50)
  54. label.TextSize        = 16
  55. label.Size            = UDim2.new(0,120,0,5)
  56. label.BorderSizePixel = 0
  57. label.Name            = "Logger"
  58.  
  59. local btn2    = Instance.new("TextButton")
  60. btn2.Parent   = frame
  61. btn2.Size     = text.Size
  62. btn2.Position = UDim2.new(0,30,0,140)
  63. btn2.Text     = "Start"
  64. btn2.TextSize = 12
  65.  
  66. local btn3    = Instance.new("TextButton")
  67. btn3.Parent   = frame
  68. btn3.Size     = text.Size
  69. btn3.Position = UDim2.new(0,150,0,140)
  70. btn3.Text     = "Stop"
  71. btn3.TextSize = 12
  72.  
  73. local btn4    = Instance.new("TextButton")
  74. btn4.Parent   = frame
  75. btn4.Size     = text.Size
  76. btn4.Position = UDim2.new(0,90,0,180)
  77. btn4.Text     = "Copy"
  78. btn4.TextSize = 12
  79.  
  80. local anim
  81. local animtrack
  82.  
  83. local args
  84.  
  85. btn.MouseButton1Click:Connect(function()
  86.     screen:Destroy()
  87. end)
  88.  
  89. btn2.MouseButton1Click:Connect(function()
  90.     anim             = Instance.new("Animation")
  91.     anim.AnimationId = "rbxassetid://" .. text.Text
  92.     animtrack        = hum.Animator:LoadAnimation(anim)
  93.     animtrack:Play()
  94. end)
  95.  
  96. btn3.MouseButton1Click:Connect(function()
  97.     animtrack:Stop()
  98. end)
  99.  
  100. btn4.MouseButton1Click:Connect(function()
  101.     setclipboard(args)
  102. end)
  103.  
  104. local con
  105. con = game:GetService("RunService").RenderStepped:Connect(function()
  106.     for _, track in pairs(hum.Animator:GetPlayingAnimationTracks()) do
  107.         label.Text = track.Animation.AnimationId
  108.         args       = label.Text:sub(14)
  109.     end
  110. end)
  111.  
  112. screen.ResetOnSpawn = false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement