if FFlagAnimateScriptEmoteHook then(script:WaitForChild("\080\108\097\121\069\109\111\116\101")).OnInvoke=function(b)if pose~="\083\116\097\110\100\105\110\103"then return end if emoteNames[b]~=nil then playAnimation(b,EMOTE_TRANSITION_TIME,Humanoid)if userPlayEmoteByIdAnimTrackReturn then return true,currentAnimTrack else return true end elseif typeof(b)=="\073\110\115\116\097\110\099\101"and b:IsA("\065\110\105\109\097\116\105\111\110")then playEmote(b,EMOTE_TRANSITION_TIME,Humanoid)if userPlayEmoteByIdAnimTrackReturn then return true,currentAnimTrack else return true end end return false end end if not FFlagUserFixLoadAnimationError or Character.Parent~=nil then playAnimation("\105\100\108\101",.1,Humanoid)pose="\083\116\097\110\100\105\110\103"end
-- emote bindable hook
if FFlagAnimateScriptEmoteHook then
	script:WaitForChild("PlayEmote").OnInvoke = function(emote)
		-- Only play emotes when idling
		if pose ~= "Standing" then
			return
		end

		if emoteNames[emote] ~= nil then
			-- Default emotes
			playAnimation(emote, EMOTE_TRANSITION_TIME, Humanoid)

			if userPlayEmoteByIdAnimTrackReturn then
				return true, currentAnimTrack
			else
				return true
			end
		elseif typeof(emote) == "Instance" and emote:IsA("Animation") then
			-- Non-default emotes
			playEmote(emote, EMOTE_TRANSITION_TIME, Humanoid)

			if userPlayEmoteByIdAnimTrackReturn then
				return true, currentAnimTrack
			else
				return true
			end
		end

		-- Return false to indicate that the emote could not be played
		return false
	end
end

if (not FFlagUserFixLoadAnimationError) or Character.Parent ~= nil then
	-- initialize to idle
	playAnimation("idle", 0.1, Humanoid)
	pose = "Standing"
end
