local Players = game:GetService("Players") local TweenService = game:GetService("TweenService") local UserInputService = game:GetService("UserInputService") local player = Players.LocalPlayer local playerGui = player.PlayerGui -- Create ScreenGui local screenGui = Instance.new("ScreenGui") screenGui.Name = "DamagedAnimationGui" screenGui.Parent = playerGui screenGui.ResetOnSpawn = false -- Create Draggable Button local button = Instance.new("TextButton") button.Name = "DamageButton" button.Size = UDim2.new(0, 150, 0, 50) button.Position = UDim2.new(0.5, -75, 0.5, -25) button.BackgroundColor3 = Color3.fromRGB(255, 255, 255) button.Text = "Play Animation" button.TextColor3 = Color3.fromRGB(0, 0, 0) button.Font = Enum.Font.SourceSansBold button.TextSize = 18 button.Parent = screenGui -- Create Animation ID TextBox local textBox = Instance.new("TextBox") textBox.Name = "AnimationIdInput" textBox.Size = UDim2.new(0, 150, 0, 30) textBox.Position = UDim2.new(0.5, -75, 0.5, 30) textBox.BackgroundColor3 = Color3.fromRGB(200, 200, 200) textBox.Text = "1234567890" -- Default placeholder ID textBox.TextColor3 = Color3.fromRGB(0, 0, 0) textBox.Font = Enum.Font.SourceSans textBox.TextSize = 14 textBox.Parent = screenGui -- Create Toggle Button local toggleButton = Instance.new("TextButton") toggleButton.Name = "ToggleButton" toggleButton.Size = UDim2.new(0, 150, 0, 30) toggleButton.Position = UDim2.new(0.5, -75, 0.5, 65) toggleButton.BackgroundColor3 = Color3.fromRGB(255, 100, 100) toggleButton.Text = "Animation: ON" toggleButton.TextColor3 = Color3.fromRGB(0, 0, 0) toggleButton.Font = Enum.Font.SourceSansBold toggleButton.TextSize = 14 toggleButton.Parent = screenGui -- Create Mode Toggle Button local modeButton = Instance.new("TextButton") modeButton.Name = "ModeButton" modeButton.Size = UDim2.new(0, 150, 0, 30) modeButton.Position = UDim2.new(0.5, -75, 0.5, 100) modeButton.BackgroundColor3 = Color3.fromRGB(100, 100, 255) modeButton.Text = "Mode: Clean" modeButton.TextColor3 = Color3.fromRGB(0, 0, 0) modeButton.Font = Enum.Font.SourceSansBold modeButton.TextSize = 14 modeButton.Parent = screenGui -- Make Button Draggable local dragging = false local dragStart = nil local startPos = nil button.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = true dragStart = input.Position startPos = button.Position end end) button.InputChanged:Connect(function(input) if dragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then local delta = input.Position - dragStart button.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y) textBox.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y + 55) toggleButton.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y + 90) modeButton.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y + 125) end end) UserInputService.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = false end end) -- Animation Setup local humanoid = player.Character and player.Character:FindFirstChildOfClass("Humanoid") local animator = humanoid and humanoid:FindFirstChildOfClass("Animator") local animation = Instance.new("Animation") local animationTrack = nil local animationEnabled = true local isCleanMode = true -- Load Animation local function loadAnimation() if player.Character then humanoid = player.Character:FindFirstChildOfClass("Humanoid") animator = humanoid and humanoid:FindFirstChildOfClass("Animator") if animator then animation.AnimationId = "rbxassetid://" .. textBox.Text animationTrack = animator:LoadAnimation(animation) if not isCleanMode and animationTrack then animationTrack:AdjustSpeed(0) -- Prepare for choppy mode end end end end player.CharacterAdded:Connect(loadAnimation) if player.Character then loadAnimation() end -- Update Animation ID textBox.FocusLost:Connect(function() if animationTrack then animationTrack:Stop() animationTrack = nil end loadAnimation() end) -- Toggle Animation On/Off toggleButton.MouseButton1Click:Connect(function() animationEnabled = not animationEnabled toggleButton.Text = animationEnabled and "Animation: ON" or "Animation: OFF" toggleButton.BackgroundColor3 = animationEnabled and Color3.fromRGB(100, 255, 100) or Color3.fromRGB(255, 100, 100) if not animationEnabled and animationTrack then animationTrack:Stop() end end) -- Toggle Animation Mode modeButton.MouseButton1Click:Connect(function() isCleanMode = not isCleanMode modeButton.Text = isCleanMode and "Mode: Clean" or "Mode: Choppy" if animationTrack then animationTrack:Stop() if isCleanMode then animationTrack:AdjustSpeed(1) -- Normal speed for clean mode else animationTrack:AdjustSpeed(0) -- Pause for choppy mode end end end) -- RGB Color Cycle Function local function cycleRGB() local tweenInfo = TweenInfo.new(2, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, -1, true) local colors = { Color3.fromRGB(255, 0, 0), -- Red Color3.fromRGB(0, 255, 0), -- Green Color3.fromRGB(0, 0, 255), -- Blue } local currentIndex = 1 local function updateColor() local nextIndex = (currentIndex % #colors) + 1 local tween = TweenService:Create(button, tweenInfo, {BackgroundColor3 = colors[nextIndex]}) tween:Play() currentIndex = nextIndex end updateColor() local connection connection = button.MouseButton1Click:Connect(function() updateColor() if not connection.Connected then connection:Connect() end end) end -- Play Animation on Button Click button.MouseButton1Click:Connect(function() if animationTrack and animationEnabled then if isCleanMode then animationTrack:Play() else -- Choppy mode: Simulate frame-by-frame by stepping through keyframes animationTrack:Play() local keyframes = animationTrack:GetKeyframes() local currentTime = 0 for _, keyframe in ipairs(keyframes) do animationTrack.TimePosition = keyframe.Time wait(0.1) -- Brief pause to simulate choppy effect currentTime = keyframe.Time end animationTrack:Stop() end end end) -- Start RGB Cycle cycleRGB()