(script:WaitForChild("\080\108\097\121\069\109\111\116\101")).OnInvoke=function(P)if pose~="\083\116\097\110\100\105\110\103"then return end if emoteNames[P]~=nil then playAnimation(P,EMOTE_TRANSITION_TIME,Humanoid)if userPlayEmoteByIdAnimTrackReturn then return true,currentAnimTrack else return true end elseif typeof(P)=="\073\110\115\116\097\110\099\101"and P:IsA("\065\110\105\109\097\116\105\111\110")then playEmote(P,EMOTE_TRANSITION_TIME,Humanoid)if userPlayEmoteByIdAnimTrackReturn then return true,currentAnimTrack else return true end end return false end if Character.Parent~=nil then playAnimation("\105\100\108\101",.1,Humanoid)pose="\083\116\097\110\100\105\110\103"end
-- emote bindable hook
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

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