return function(R,d)local e if d.ClassName=="\072\117\109\097\110\111\105\100"then e=d elseif d:FindFirstChildOfClass("\072\117\109\097\110\111\105\100")then e=d:FindFirstChildOfClass("\072\117\109\097\110\111\105\100")elseif d.ClassName=="\080\108\097\121\101\114"then e=d.Character:FindFirstChild("\072\117\109\097\110\111\105\100")end if e then local d=Instance.new("\065\110\105\109\097\116\105\111\110")d.AnimationId="\114\098\120\097\115\115\101\116\105\100\058\047\047"..R local B=e:LoadAnimation(d)B:Play()return B end end
--[[
	
	Plays an animation on humanoid/character/player. Returns {animationTrack, animation}
	
	Functions.Animation(
		id,						<-- |REQ| 	Animation ID
		instance,				<-- |REQ|	Player/character/humanoid		
	)
	
--]]

return function(id, parent)
	local humanoid

	--- Get humanoid
	if parent.ClassName == "Humanoid" then
		humanoid = parent
	elseif parent:FindFirstChildOfClass("Humanoid") then
		humanoid = parent:FindFirstChildOfClass("Humanoid")
	elseif parent.ClassName == "Player" then
		humanoid = parent.Character:FindFirstChild("Humanoid")
	end

	--- Play animation
	if humanoid then
		local animation = Instance.new("Animation")
		animation.AnimationId = "rbxassetid://" .. id
		--
		local track = humanoid:LoadAnimation(animation)
		track:Play()
		--
		return track
	end
end
