local K=game:GetService("\080\108\097\121\101\114\115")local V=game.ReplicatedStorage.Packages local S=require(V.CharacterAnimate)local e=script.Parent local I=e:WaitForChild("\072\117\109\097\110\111\105\100")local X=workspace.Dummy local W=X:WaitForChild("\072\117\109\097\110\111\105\100")local T=S.animate(script,I)K.LocalPlayer.Chatted:Connect(function(K)local V=""if K:sub(1,3)=="\047\101 "then V=K:sub(4)elseif K:sub(1,7)=="\047\101\109\111\116\101 "then V=K:sub(8)end T.playEmote(V)end);(script:WaitForChild("\080\108\097\121\069\109\111\116\101")).OnInvoke=function(K)return T.playEmote(K)end local v=S.animateManually(script,W)while true do v.fireState(Enum.HumanoidStateType.Climbing,5)task.wait(4)v.fireState(Enum.HumanoidStateType.Running,16)task.wait(2)v.fireState(Enum.HumanoidStateType.Freefall)task.wait(1)v.fireState(Enum.HumanoidStateType.Seated)task.wait(2)end
local Players = game:GetService("Players")

local Packages = game.ReplicatedStorage.Packages
local CharacterAnimate = require(Packages.CharacterAnimate)

local character = script.Parent
local humanoid = character:WaitForChild("Humanoid")

local dummy = workspace.Dummy
local dummyHumanoid = dummy:WaitForChild("Humanoid")

-- For my character

local myController = CharacterAnimate.animate(script, humanoid)

Players.LocalPlayer.Chatted:Connect(function(msg)
	-- This is only needed for the legacy chat system
	local emote = ""
	if msg:sub(1, 3) == "/e " then
		emote = msg:sub(4)
	elseif msg:sub(1, 7) == "/emote " then
		emote = msg:sub(8)
	end

	myController.playEmote(emote)
end)

script:WaitForChild("PlayEmote").OnInvoke = function(emote)
	return myController.playEmote(emote)
end

-- For the dummy character

local dummyController = CharacterAnimate.animateManually(script, dummyHumanoid)
while true do
	dummyController.fireState(Enum.HumanoidStateType.Climbing, 5)
	task.wait(4)
	dummyController.fireState(Enum.HumanoidStateType.Running, 16)
	task.wait(2)
	dummyController.fireState(Enum.HumanoidStateType.Freefall)
	task.wait(1)
	dummyController.fireState(Enum.HumanoidStateType.Seated)
	task.wait(2)
end
