Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local anim = {
- [1] = {
- ["Time"] = 0,
- ["Poses"] = {
- ["Left Leg"] = {
- ["EasingStyle"] = Enum.PoseEasingStyle.Linear,
- ["Name"] = "Left Leg",
- ["Weight"] = 1,
- ["CFrame"] = CFrame.new(-0.684869766, 0.55282259, 4.76837158e-07, 0.590535522, 0.807011604, 2.98023224e-08, -0.807011724, 0.590535283, -5.21540642e-08, 4.47034836e-08, 5.96046448e-08, 1),
- ["EasingDirection"] = Enum.PoseEasingDirection.In
- },
- ["Right Leg"] = {
- ["EasingStyle"] = Enum.PoseEasingStyle.Linear,
- ["Name"] = "Right Leg",
- ["Weight"] = 1,
- ["CFrame"] = CFrame.new(0, 0, 0, 0.426820129, 0.904336512, -0, -0.904336512, 0.426820129, 0, -0, 0, 1),
- ["EasingDirection"] = Enum.PoseEasingDirection.In
- },
- ["Head"] = {
- ["EasingStyle"] = Enum.PoseEasingStyle.Linear,
- ["Name"] = "Head",
- ["Weight"] = 1,
- ["CFrame"] = CFrame.new(4.76837158e-07, 9.53674316e-07, 5.06639481e-07, 0.931037128, 0.36492449, 3.7252903e-09, -0.344610125, 0.879208982, 0.328991622, 0.120057091, -0.306303352, 0.944332659),
- ["EasingDirection"] = Enum.PoseEasingDirection.In
- },
- ["Right Arm"] = {
- ["EasingStyle"] = Enum.PoseEasingStyle.Linear,
- ["Name"] = "Right Arm",
- ["Weight"] = 1,
- ["CFrame"] = CFrame.new(0.647121429, 0.260571122, 0.0220372677, -0.996192992, -0.0155502334, -0.0857777745, 0.020124143, -0.99840641, -0.0527188405, -0.0848212168, -0.0542443916, 0.994918823),
- ["EasingDirection"] = Enum.PoseEasingDirection.In
- },
- ["Torso"] = {
- ["EasingStyle"] = Enum.PoseEasingStyle.Linear,
- ["Name"] = "Torso",
- ["Weight"] = 1,
- ["CFrame"] = CFrame.new(0.0144105628, -0.0533313751, 0.192218065, 0.939329386, -0.335362732, 0.0720563084, 0.342139721, 0.901013315, -0.266674787, 0.0245090891, 0.275148779, 0.961089194),
- ["EasingDirection"] = Enum.PoseEasingDirection.In
- },
- ["HumanoidRootPart"] = {
- ["EasingStyle"] = Enum.PoseEasingStyle.Linear,
- ["Name"] = "HumanoidRootPart",
- ["Weight"] = 0,
- ["CFrame"] = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
- ["EasingDirection"] = Enum.PoseEasingDirection.In
- },
- ["Left Arm"] = {
- ["EasingStyle"] = Enum.PoseEasingStyle.Linear,
- ["Name"] = "Left Arm",
- ["Weight"] = 1,
- ["CFrame"] = CFrame.new(0.677412987, 0.100073397, 0, 0.796378791, -0.604798317, -1.49011612e-08, 0.604798317, 0.796378791, -1.49011612e-08, -1.49011612e-08, -1.49011612e-08, 1),
- ["EasingDirection"] = Enum.PoseEasingDirection.In
- }
- }
- },
- [2] = {
- ["Time"] = 0.10000000149011612,
- ["Poses"] = {
- ["Left Leg"] = {
- ["EasingStyle"] = Enum.PoseEasingStyle.Linear,
- ["Name"] = "Left Leg",
- ["Weight"] = 1,
- ["CFrame"] = CFrame.new(-0.463264465, -0.0622429848, 4.76837158e-07, 0.842653334, 0.53845638, -2.98023224e-08, -0.53845644, 0.842653513, 1.08033419e-07, 5.96046448e-08, -1.04308128e-07, 1),
- ["EasingDirection"] = Enum.PoseEasingDirection.In
- },
- ["Right Leg"] = {
- ["EasingStyle"] = Enum.PoseEasingStyle.Linear,
- ["Name"] = "Right Leg",
- ["Weight"] = 1,
- ["CFrame"] = CFrame.new(9.53674316e-07, -9.53674316e-07, 2.38418579e-07, 0.665835917, 0.746097982, -4.47034836e-08, -0.74609828, 0.665835917, 3.7252903e-09, -2.23517418e-08, -5.96046448e-08, 1),
- ["EasingDirection"] = Enum.PoseEasingDirection.In
- },
- ["Head"] = {
- ["EasingStyle"] = Enum.PoseEasingStyle.Linear,
- ["Name"] = "Head",
- ["Weight"] = 1,
- ["CFrame"] = CFrame.new(7.15255737e-07, 1.90734863e-06, 1.31130219e-06, 0.931037009, 0.362027347, -0.0458928719, -0.344610155, 0.913602471, 0.215810433, 0.120057121, -0.185112447, 0.97535634),
- ["EasingDirection"] = Enum.PoseEasingDirection.In
- },
- ["Right Arm"] = {
- ["EasingStyle"] = Enum.PoseEasingStyle.Linear,
- ["Name"] = "Right Arm",
- ["Weight"] = 1,
- ["CFrame"] = CFrame.new(0.647122383, 0.260572374, 0.0220379829, -0.963085651, -0.255162179, -0.0857808441, 0.260135263, -0.964132011, -0.0527232401, -0.0692511648, -0.0730917081, 0.994918108),
- ["EasingDirection"] = Enum.PoseEasingDirection.In
- },
- ["Torso"] = {
- ["EasingStyle"] = Enum.PoseEasingStyle.Linear,
- ["Name"] = "Torso",
- ["Weight"] = 1,
- ["CFrame"] = CFrame.new(0.0163631812, -0.0528020859, 0.109983921, 0.979776502, -0.195315555, 0.0434723943, 0.200038537, 0.96126461, -0.189617723, -0.0047531873, 0.194479138, 0.980895162),
- ["EasingDirection"] = Enum.PoseEasingDirection.In
- },
- ["HumanoidRootPart"] = {
- ["EasingStyle"] = Enum.PoseEasingStyle.Linear,
- ["Name"] = "HumanoidRootPart",
- ["Weight"] = 0,
- ["CFrame"] = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
- ["EasingDirection"] = Enum.PoseEasingDirection.In
- },
- ["Left Arm"] = {
- ["EasingStyle"] = Enum.PoseEasingStyle.Linear,
- ["Name"] = "Left Arm",
- ["Weight"] = 1,
- ["CFrame"] = CFrame.new(0.560233116, -0.107698023, 4.76837158e-07, 0.886575878, -0.462583035, -4.47034836e-08, 0.462583125, 0.886575937, -2.98023224e-08, 0, 2.98023224e-08, 1),
- ["EasingDirection"] = Enum.PoseEasingDirection.In
- }
- }
- },
- [3] = {
- ["Time"] = 0.1666666716337204,
- ["Poses"] = {
- ["Left Leg"] = {
- ["EasingStyle"] = Enum.PoseEasingStyle.Linear,
- ["Name"] = "Left Leg",
- ["Weight"] = 1,
- ["CFrame"] = CFrame.new(-0.21053791, -0.525047839, -2.38418579e-07, 0.688685894, -0.725060165, 0, 0.725060225, 0.688685656, -5.49480319e-08, 7.4505806e-09, 6.70552254e-08, 0.999999881),
- ["EasingDirection"] = Enum.PoseEasingDirection.In
- },
- ["Right Leg"] = {
- ["EasingStyle"] = Enum.PoseEasingStyle.Linear,
- ["Name"] = "Right Leg",
- ["Weight"] = 1,
- ["CFrame"] = CFrame.new(0.747333527, 0.175471604, 0, 0.996824026, -0.0796357989, 0, 0.0796357691, 0.996824026, 8.38190317e-09, 7.4505806e-09, 4.71482053e-09, 0.99999994),
- ["EasingDirection"] = Enum.PoseEasingDirection.In
- },
- ["Head"] = {
- ["EasingStyle"] = Enum.PoseEasingStyle.Linear,
- ["Name"] = "Head",
- ["Weight"] = 1,
- ["CFrame"] = CFrame.new(0, 1.90734863e-06, 9.53674316e-07, 1, 0, 0, 0, 0.997949541, 0.0640043765, 0, -0.0640043765, 0.997949541),
- ["EasingDirection"] = Enum.PoseEasingDirection.In
- },
- ["Right Arm"] = {
- ["EasingStyle"] = Enum.PoseEasingStyle.Linear,
- ["Name"] = "Right Arm",
- ["Weight"] = 1,
- ["CFrame"] = CFrame.new(-0.275900841, -0.3245157, -4.76837158e-07, 0.92888242, -0.370374888, -4.47034836e-08, 0.370374829, 0.92888242, 3.7252903e-08, 2.98023224e-08, -4.84287739e-08, 0.99999994),
- ["EasingDirection"] = Enum.PoseEasingDirection.In
- },
- ["Torso"] = {
- ["EasingStyle"] = Enum.PoseEasingStyle.Linear,
- ["Name"] = "Torso",
- ["Weight"] = 1,
- ["CFrame"] = CFrame.new(0.00148778036, -0.00670719147, 0.0193655491, 0.992368937, 0.122845046, -0.0106275892, -0.122691445, 0.975185513, -0.184282526, -0.012274324, 0.184180185, 0.982815862),
- ["EasingDirection"] = Enum.PoseEasingDirection.In
- },
- ["HumanoidRootPart"] = {
- ["EasingStyle"] = Enum.PoseEasingStyle.Linear,
- ["Name"] = "HumanoidRootPart",
- ["Weight"] = 0,
- ["CFrame"] = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
- ["EasingDirection"] = Enum.PoseEasingDirection.In
- },
- ["Left Arm"] = {
- ["EasingStyle"] = Enum.PoseEasingStyle.Linear,
- ["Name"] = "Left Arm",
- ["Weight"] = 1,
- ["CFrame"] = CFrame.new(-0.0250301361, -0.253720284, 0, 0.692191899, 0.721713364, 0, -0.721713364, 0.692191899, 0, 0, 0, 1),
- ["EasingDirection"] = Enum.PoseEasingDirection.In
- }
- }
- },
- [4] = {
- ["Time"] = 0.2666666805744171,
- ["Poses"] = {
- ["Left Leg"] = {
- ["EasingStyle"] = Enum.PoseEasingStyle.Linear,
- ["Name"] = "Left Leg",
- ["Weight"] = 1,
- ["CFrame"] = CFrame.new(0, -5.7220459e-06, -4.76837158e-07, 0.14543952, -0.989367068, 2.98023224e-08, 0.989367008, 0.14543958, 2.23517418e-08, 7.4505806e-09, -5.96046448e-08, 1),
- ["EasingDirection"] = Enum.PoseEasingDirection.In
- },
- ["Right Leg"] = {
- ["EasingStyle"] = Enum.PoseEasingStyle.Linear,
- ["Name"] = "Right Leg",
- ["Weight"] = 1,
- ["CFrame"] = CFrame.new(0.667492867, 0.837617874, 2.86102295e-06, 0.746720076, -0.665138483, 2.98023224e-08, 0.665138304, 0.746720254, -3.7252903e-08, -2.98023224e-08, 1.49011612e-08, 1),
- ["EasingDirection"] = Enum.PoseEasingDirection.In
- },
- ["Head"] = {
- ["EasingStyle"] = Enum.PoseEasingStyle.Linear,
- ["Name"] = "Head",
- ["Weight"] = 1,
- ["CFrame"] = CFrame.new(9.53674316e-07, 9.53674316e-07, -1.49011612e-07, 0.884607792, -0.465506583, -0.0277954452, 0.460267663, 0.861961365, 0.21254693, -0.0749833807, -0.200814113, 0.976755381),
- ["EasingDirection"] = Enum.PoseEasingDirection.In
- },
- ["Right Arm"] = {
- ["EasingStyle"] = Enum.PoseEasingStyle.Linear,
- ["Name"] = "Right Arm",
- ["Weight"] = 1,
- ["CFrame"] = CFrame.new(-0.940870285, -0.128141016, 1.43051147e-06, 0.263189197, 0.964744151, -2.98023224e-08, -0.96474421, 0.263189226, -2.98023224e-08, -1.53668225e-08, 5.96046448e-08, 1.00000012),
- ["EasingDirection"] = Enum.PoseEasingDirection.In
- },
- ["Torso"] = {
- ["EasingStyle"] = Enum.PoseEasingStyle.Linear,
- ["Name"] = "Torso",
- ["Weight"] = 1,
- ["CFrame"] = CFrame.new(-0.0269141123, -0.0971975327, 0.309423447, 0.877551675, 0.467636794, -0.105919108, -0.478786707, 0.842738926, -0.246077582, -0.0258127507, 0.266658515, 0.963445306),
- ["EasingDirection"] = Enum.PoseEasingDirection.In
- },
- ["HumanoidRootPart"] = {
- ["EasingStyle"] = Enum.PoseEasingStyle.Linear,
- ["Name"] = "HumanoidRootPart",
- ["Weight"] = 0,
- ["CFrame"] = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
- ["EasingDirection"] = Enum.PoseEasingDirection.In
- },
- ["Left Arm"] = {
- ["EasingStyle"] = Enum.PoseEasingStyle.Linear,
- ["Name"] = "Left Arm",
- ["Weight"] = 1,
- ["CFrame"] = CFrame.new(-0.866526604, 0.032540381, -4.76837158e-07, -0.856238127, 0.516581416, 1.1920929e-07, -0.516581357, -0.856238186, -1.11758709e-07, 1.49011612e-08, -1.78813934e-07, 1.00000012),
- ["EasingDirection"] = Enum.PoseEasingDirection.In
- }
- }
- },
- [5] = {
- ["Time"] = 0.36666667461395264,
- ["Poses"] = {
- ["Left Leg"] = {
- ["EasingStyle"] = Enum.PoseEasingStyle.Linear,
- ["Name"] = "Left Leg",
- ["Weight"] = 1,
- ["CFrame"] = CFrame.new(-0.231062889, 0.0648840964, -9.53674316e-07, 0.270372152, -0.96275574, -2.98023224e-08, 0.962755919, 0.270372182, 1.2293458e-07, -9.68575478e-08, -8.94069672e-08, 1.00000012),
- ["EasingDirection"] = Enum.PoseEasingDirection.In
- },
- ["Right Leg"] = {
- ["EasingStyle"] = Enum.PoseEasingStyle.Linear,
- ["Name"] = "Right Leg",
- ["Weight"] = 1,
- ["CFrame"] = CFrame.new(0.417463303, 0.105430976, 1.90734863e-06, 0.617512822, -0.786560833, 8.94069672e-08, 0.786560833, 0.617512703, -5.58793545e-08, -1.49011612e-08, -8.94069672e-08, 1.00000012),
- ["EasingDirection"] = Enum.PoseEasingDirection.In
- },
- ["Head"] = {
- ["EasingStyle"] = Enum.PoseEasingStyle.Linear,
- ["Name"] = "Head",
- ["Weight"] = 1,
- ["CFrame"] = CFrame.new(9.53674316e-07, 9.53674316e-07, -1.49011612e-07, 0.884607792, -0.465506583, -0.0277954452, 0.460267663, 0.861961365, 0.21254693, -0.0749833807, -0.200814113, 0.976755381),
- ["EasingDirection"] = Enum.PoseEasingDirection.In
- },
- ["Right Arm"] = {
- ["EasingStyle"] = Enum.PoseEasingStyle.Linear,
- ["Name"] = "Right Arm",
- ["Weight"] = 1,
- ["CFrame"] = CFrame.new(-0.271284103, -0.247525692, 2.38418579e-06, 0.6220631, 0.782967091, -2.98023224e-08, -0.782967031, 0.62206316, -1.04308128e-07, 0, 8.94069672e-08, 1.00000012),
- ["EasingDirection"] = Enum.PoseEasingDirection.In
- },
- ["Torso"] = {
- ["EasingStyle"] = Enum.PoseEasingStyle.Linear,
- ["Name"] = "Torso",
- ["Weight"] = 1,
- ["CFrame"] = CFrame.new(-0.0269143581, -0.09719944, 0.309423447, 0.939480245, 0.33699891, -0.0617144853, -0.342601478, 0.924667835, -0.166173413, 0.00106515922, 0.177260131, 0.984163463),
- ["EasingDirection"] = Enum.PoseEasingDirection.In
- },
- ["HumanoidRootPart"] = {
- ["EasingStyle"] = Enum.PoseEasingStyle.Linear,
- ["Name"] = "HumanoidRootPart",
- ["Weight"] = 0,
- ["CFrame"] = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
- ["EasingDirection"] = Enum.PoseEasingDirection.In
- },
- ["Left Arm"] = {
- ["EasingStyle"] = Enum.PoseEasingStyle.Linear,
- ["Name"] = "Left Arm",
- ["Weight"] = 1,
- ["CFrame"] = CFrame.new(-0.732704163, -0.116092503, -9.53674316e-07, -0.743167698, 0.669105113, 1.49011612e-07, -0.669104993, -0.743167698, -1.34110451e-07, 0, -2.08616257e-07, 1),
- ["EasingDirection"] = Enum.PoseEasingDirection.In
- }
- }
- },
- [6] = {
- ["Time"] = 0.4333333373069763,
- ["Poses"] = {
- ["Left Leg"] = {
- ["EasingStyle"] = Enum.PoseEasingStyle.Linear,
- ["Name"] = "Left Leg",
- ["Weight"] = 1,
- ["CFrame"] = CFrame.new(-0.531481743, -0.0503044128, 0, 0.941563606, -0.336835235, 0, 0.336835235, 0.941563606, 0, 0, 0, 1),
- ["EasingDirection"] = Enum.PoseEasingDirection.In
- },
- ["Right Leg"] = {
- ["EasingStyle"] = Enum.PoseEasingStyle.Linear,
- ["Name"] = "Right Leg",
- ["Weight"] = 1,
- ["CFrame"] = CFrame.new(0.00280380249, -0.0780924559, 0, 0.965983868, 0.258602351, -0, -0.258602351, 0.965983868, 0, -0, 0, 1),
- ["EasingDirection"] = Enum.PoseEasingDirection.In
- },
- ["Head"] = {
- ["EasingStyle"] = Enum.PoseEasingStyle.Linear,
- ["Name"] = "Head",
- ["Weight"] = 1,
- ["CFrame"] = CFrame.new(0, 0, 0, 1, 0, 0, 0, 0.987418056, 0.15813069, 0, -0.15813069, 0.987418056),
- ["EasingDirection"] = Enum.PoseEasingDirection.In
- },
- ["Right Arm"] = {
- ["EasingStyle"] = Enum.PoseEasingStyle.Linear,
- ["Name"] = "Right Arm",
- ["Weight"] = 1,
- ["CFrame"] = CFrame.new(0.103615761, -0.350956202, 0, 0.749707162, -0.661769569, -0, 0.661769569, 0.749707162, 0, 0, 0, 1),
- ["EasingDirection"] = Enum.PoseEasingDirection.In
- },
- ["Torso"] = {
- ["EasingStyle"] = Enum.PoseEasingStyle.Linear,
- ["Name"] = "Torso",
- ["Weight"] = 1,
- ["CFrame"] = CFrame.new(0, 0.0804681778, -0.0137200356, 1, 0, 0, 0, 0.984317541, -0.176405713, 0, 0.176405713, 0.984317541),
- ["EasingDirection"] = Enum.PoseEasingDirection.In
- },
- ["HumanoidRootPart"] = {
- ["EasingStyle"] = Enum.PoseEasingStyle.Linear,
- ["Name"] = "HumanoidRootPart",
- ["Weight"] = 0,
- ["CFrame"] = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
- ["EasingDirection"] = Enum.PoseEasingDirection.In
- },
- ["Left Arm"] = {
- ["EasingStyle"] = Enum.PoseEasingStyle.Linear,
- ["Name"] = "Left Arm",
- ["Weight"] = 1,
- ["CFrame"] = CFrame.new(-0.139419556, -0.0587918758, 1.1920929e-07, 0.992541552, 0.121906802, 0, -0.121906802, 0.992541552, 0, 0, 0, 1),
- ["EasingDirection"] = Enum.PoseEasingDirection.In
- }
- }
- },
- [7] = {
- ["Time"] = 0.5333333611488342,
- ["Poses"] = {
- ["Left Leg"] = {
- ["EasingStyle"] = Enum.PoseEasingStyle.Linear,
- ["Name"] = "Left Leg",
- ["Weight"] = 1,
- ["CFrame"] = CFrame.new(-0.684869766, 0.55282259, 4.76837158e-07, 0.590535522, 0.807011604, 2.98023224e-08, -0.807011724, 0.590535283, -5.21540642e-08, 4.47034836e-08, 5.96046448e-08, 1),
- ["EasingDirection"] = Enum.PoseEasingDirection.In
- },
- ["Right Leg"] = {
- ["EasingStyle"] = Enum.PoseEasingStyle.Linear,
- ["Name"] = "Right Leg",
- ["Weight"] = 1,
- ["CFrame"] = CFrame.new(0, 0, 0, 0.426820129, 0.904336512, -0, -0.904336512, 0.426820129, 0, -0, 0, 1),
- ["EasingDirection"] = Enum.PoseEasingDirection.In
- },
- ["Head"] = {
- ["EasingStyle"] = Enum.PoseEasingStyle.Linear,
- ["Name"] = "Head",
- ["Weight"] = 1,
- ["CFrame"] = CFrame.new(4.76837158e-07, 9.53674316e-07, 5.06639481e-07, 0.931037128, 0.36492449, 3.7252903e-09, -0.344610125, 0.879208982, 0.328991622, 0.120057091, -0.306303352, 0.944332659),
- ["EasingDirection"] = Enum.PoseEasingDirection.In
- },
- ["Right Arm"] = {
- ["EasingStyle"] = Enum.PoseEasingStyle.Linear,
- ["Name"] = "Right Arm",
- ["Weight"] = 1,
- ["CFrame"] = CFrame.new(0.647121429, 0.260571122, 0.0220372677, -0.996192992, -0.0155502334, -0.0857777745, 0.020124143, -0.99840641, -0.0527188405, -0.0848212168, -0.0542443916, 0.994918823),
- ["EasingDirection"] = Enum.PoseEasingDirection.In
- },
- ["Torso"] = {
- ["EasingStyle"] = Enum.PoseEasingStyle.Linear,
- ["Name"] = "Torso",
- ["Weight"] = 1,
- ["CFrame"] = CFrame.new(0.0144105628, -0.0533313751, 0.192218065, 0.939329386, -0.335362732, 0.0720563084, 0.342139721, 0.901013315, -0.266674787, 0.0245090891, 0.275148779, 0.961089194),
- ["EasingDirection"] = Enum.PoseEasingDirection.In
- },
- ["HumanoidRootPart"] = {
- ["EasingStyle"] = Enum.PoseEasingStyle.Linear,
- ["Name"] = "HumanoidRootPart",
- ["Weight"] = 0,
- ["CFrame"] = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
- ["EasingDirection"] = Enum.PoseEasingDirection.In
- },
- ["Left Arm"] = {
- ["EasingStyle"] = Enum.PoseEasingStyle.Linear,
- ["Name"] = "Left Arm",
- ["Weight"] = 1,
- ["CFrame"] = CFrame.new(0.677412987, 0.100073397, 0, 0.796378791, -0.604798317, -1.49011612e-08, 0.604798317, 0.796378791, -1.49011612e-08, -1.49011612e-08, -1.49011612e-08, 1),
- ["EasingDirection"] = Enum.PoseEasingDirection.In
- }
- }
- }
- }
- function MainAnimation(char,Array,Speed)
- local motors = {}
- local origMotors = {}
- for i=1, #Array do
- local poses = Array[i]["Poses"]
- local Time = Array[i]["Time"]
- for z,v in pairs(poses) do
- local Pose = v
- local descChar = char:GetDescendants()
- local motor
- local found = false
- for p=1, #descChar do
- local dc = descChar[p]
- if dc.ClassName == "Motor6D" then
- if dc.Part1.Name == Pose["Name"] then
- motor = dc
- found = true
- end
- end
- end
- if not found then
- end
- if found and motor ~= nil then
- if not table.find(motors, motor) then
- table.insert(motors, motor)
- table.insert(origMotors, motor.C0)
- end
- local style
- local direction
- if Pose["EasingStyle"] == Enum.PoseEasingStyle.Linear then
- style = Enum.EasingStyle.Linear
- elseif Pose["EasingStyle"] == Enum.PoseEasingStyle.Cubic then
- style = Enum.EasingStyle.Cubic
- elseif Pose["EasingStyle"] == Enum.PoseEasingStyle.Bounce then
- style = Enum.EasingStyle.Bounce
- elseif Pose["EasingStyle"] == Enum.PoseEasingStyle.Elastic then
- style = Enum.EasingStyle.Elastic
- elseif Pose["EasingStyle"] == Enum.PoseEasingStyle.Constant then
- style = true
- end
- if Pose["EasingDirection"] == Enum.PoseEasingDirection.In then
- direction = Enum.EasingDirection.In
- elseif Pose["EasingDirection"] == Enum.PoseEasingDirection.InOut then
- direction = Enum.EasingDirection.InOut
- elseif Pose["EasingDirection"] == Enum.PoseEasingDirection.Out then
- direction = Enum.EasingDirection.Out
- end
- if origMotors[table.find(motors,motor)] ~= nil then
- if i~=1 then
- game:GetService("TweenService"):Create(motor,TweenInfo.new(((Time-Array[i-1]["Time"])/2)/Speed,style,direction),{C0 = origMotors[table.find(motors,motor)] * Pose["CFrame"]}):Play()
- else
- game:GetService("TweenService"):Create(motor,TweenInfo.new(0.01,style,direction),{C0 = origMotors[table.find(motors,motor)] * Pose["CFrame"]}):Play()
- end
- else
- print("Nil")
- end
- end
- end
- if i~=1 then
- task.wait(((Time-Array[i-1]["Time"])/2)/Speed)
- end
- end
- for i=1, #motors do
- if origMotors[i] ~= nil then
- local originalC0 = origMotors[i]
- motors[i].C0 = originalC0
- end
- end
- end
- function Play(char,Array,Speed,looped)
- if not looped then
- MainAnimation(char,Array,Speed)
- else
- while wait() do
- MainAnimation(char,Array,Speed)
- end
- end
- end
- Play(owner.Character,anim,0.5,true)
Advertisement
Add Comment
Please, Sign In to add comment