Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Created with PenguinAnonymous's compiler
- --PenguinAnonymous is not responsible for damages caused to your game
- --This plugin does not remove things
- --PenguinAnonymous cannot be held resonsible for manual deletion for the purpose of testing
- --Keep in mind, any items that cause errors in compilation will be skipped and documented within the last line of the disclaimer comments
- --Thank you for using my plugin and enjoy :)
- --It is free to use
- --If you use this plugin to create your own, please give me credit
- --Z_V edited my plugin to look like his own and published it without giving me credit, and that makes me very angry
- --Errors: Attachment,MeshPart,Accessory,Camera,Animator,Status
- local runDummyScript = function(f,scri)
- local oldenv = getfenv(f)
- local newenv = setmetatable({}, {
- __index = function(_, k)
- if k:lower() == 'script' then
- return scri
- else
- return oldenv[k]
- end
- end
- })
- setfenv(f, newenv)
- ypcall(function() f() end)
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- mas.Name = "CompiledModel"
- o1 = Instance.new("Model")
- o2 = Instance.new("Part")
- o4 = Instance.new("Vector3Value")
- o5 = Instance.new("Vector3Value")
- o8 = Instance.new("Vector3Value")
- o10 = Instance.new("Vector3Value")
- o11 = Instance.new("Vector3Value")
- o12 = Instance.new("Motor6D")
- o13 = Instance.new("Script")
- o16 = Instance.new("Vector3Value")
- o18 = Instance.new("Vector3Value")
- o19 = Instance.new("Vector3Value")
- o20 = Instance.new("Motor6D")
- o23 = Instance.new("Vector3Value")
- o25 = Instance.new("Vector3Value")
- o26 = Instance.new("Vector3Value")
- o27 = Instance.new("Motor6D")
- o30 = Instance.new("Vector3Value")
- o32 = Instance.new("Vector3Value")
- o34 = Instance.new("Vector3Value")
- o35 = Instance.new("Vector3Value")
- o36 = Instance.new("Motor6D")
- o39 = Instance.new("Vector3Value")
- o41 = Instance.new("Vector3Value")
- o42 = Instance.new("Vector3Value")
- o43 = Instance.new("Motor6D")
- o46 = Instance.new("Vector3Value")
- o48 = Instance.new("Vector3Value")
- o49 = Instance.new("Vector3Value")
- o50 = Instance.new("Motor6D")
- o53 = Instance.new("Vector3Value")
- o55 = Instance.new("Vector3Value")
- o56 = Instance.new("Vector3Value")
- o57 = Instance.new("Motor6D")
- o60 = Instance.new("Vector3Value")
- o61 = Instance.new("Vector3Value")
- o62 = Instance.new("Motor6D")
- o65 = Instance.new("Vector3Value")
- o67 = Instance.new("Vector3Value")
- o68 = Instance.new("Vector3Value")
- o69 = Instance.new("Motor6D")
- o71 = Instance.new("Part")
- o72 = Instance.new("SpecialMesh")
- o74 = Instance.new("Vector3Value")
- o75 = Instance.new("Weld")
- o79 = Instance.new("Vector3Value")
- o80 = Instance.new("Vector3Value")
- o81 = Instance.new("Motor6D")
- o84 = Instance.new("Vector3Value")
- o86 = Instance.new("Vector3Value")
- o87 = Instance.new("Vector3Value")
- o88 = Instance.new("Motor6D")
- o91 = Instance.new("Vector3Value")
- o93 = Instance.new("Vector3Value")
- o95 = Instance.new("Vector3Value")
- o97 = Instance.new("Vector3Value")
- o99 = Instance.new("Vector3Value")
- o101 = Instance.new("Vector3Value")
- o103 = Instance.new("Vector3Value")
- o105 = Instance.new("Vector3Value")
- o107 = Instance.new("Vector3Value")
- o108 = Instance.new("Vector3Value")
- o109 = Instance.new("Motor6D")
- o110 = Instance.new("Humanoid")
- o112 = Instance.new("NumberValue")
- o113 = Instance.new("NumberValue")
- o114 = Instance.new("NumberValue")
- o115 = Instance.new("NumberValue")
- o117 = Instance.new("Part")
- o118 = Instance.new("SpecialMesh")
- o119 = Instance.new("Vector3Value")
- o121 = Instance.new("Vector3Value")
- o123 = Instance.new("Vector3Value")
- o125 = Instance.new("Vector3Value")
- o127 = Instance.new("Vector3Value")
- o129 = Instance.new("Vector3Value")
- o130 = Instance.new("Vector3Value")
- o131 = Instance.new("Sound")
- o132 = Instance.new("Sound")
- o133 = Instance.new("Sound")
- o134 = Instance.new("Sound")
- o135 = Instance.new("Sound")
- o136 = Instance.new("Sound")
- o137 = Instance.new("Sound")
- o138 = Instance.new("Sound")
- o139 = Instance.new("Sound")
- o140 = Instance.new("Motor6D")
- o141 = Instance.new("Decal")
- o142 = Instance.new("Shirt")
- o143 = Instance.new("Pants")
- o146 = Instance.new("Vector3Value")
- o148 = Instance.new("Vector3Value")
- o150 = Instance.new("Vector3Value")
- o152 = Instance.new("Vector3Value")
- o154 = Instance.new("Vector3Value")
- o156 = Instance.new("Vector3Value")
- o158 = Instance.new("Vector3Value")
- o159 = Instance.new("Vector3Value")
- o160 = Instance.new("Motor6D")
- o161 = Instance.new("BodyColors")
- o162 = Instance.new("Script")
- o163 = Instance.new("Script")
- o164 = Instance.new("LocalScript")
- o165 = Instance.new("StringValue")
- o166 = Instance.new("Animation")
- o167 = Instance.new("StringValue")
- o168 = Instance.new("Animation")
- o169 = Instance.new("StringValue")
- o170 = Instance.new("Animation")
- o171 = Instance.new("NumberValue")
- o172 = Instance.new("Animation")
- o173 = Instance.new("NumberValue")
- o174 = Instance.new("StringValue")
- o175 = Instance.new("Animation")
- o176 = Instance.new("StringValue")
- o177 = Instance.new("Animation")
- o178 = Instance.new("StringValue")
- o179 = Instance.new("Animation")
- o180 = Instance.new("StringValue")
- o181 = Instance.new("Animation")
- o182 = Instance.new("StringValue")
- o183 = Instance.new("Animation")
- o184 = Instance.new("StringValue")
- o185 = Instance.new("Animation")
- o186 = Instance.new("StringValue")
- o187 = Instance.new("Animation")
- o190 = Instance.new("Vector3Value")
- o192 = Instance.new("Vector3Value")
- o194 = Instance.new("Vector3Value")
- o195 = Instance.new("Vector3Value")
- o196 = Instance.new("Motor6D")
- o1.Name = ""
- o1.Parent = mas
- o1.PrimaryPart = o2
- o2.Name = "HumanoidRootPart"
- o2.Parent = o1
- o2.BrickColor = BrickColor.new("Fossil")
- o2.Transparency = 1
- o2.Position = Vector3.new(-16.0358047, 2.84820652, 26.2238865)
- o2.Rotation = Vector3.new(0, -1.08000004, 0)
- o2.Size = Vector3.new(2, 2, 1)
- o2.CFrame = CFrame.new(-16.0358047, 2.84820652, 26.2238865, 0.999822617, 0, -0.0188379921, 0, 1, 0, 0.0188379921, 0, 0.999822617)
- o2.Color = Color3.new(0.623529, 0.631373, 0.67451)
- o2.Position = Vector3.new(-16.0358047, 2.84820652, 26.2238865)
- o4.Name = "OriginalPosition"
- o4.Parent = mas
- o5.Name = "OriginalSize"
- o5.Parent = o2
- o5.Value = Vector3.new(2, 2, 1)
- o8.Name = "OriginalPosition"
- o8.Parent = mas
- o8.Value = Vector3.new(-0.0358767509, 0.40380016, -0.000202059746)
- o10.Name = "OriginalPosition"
- o10.Parent = mas
- o10.Value = Vector3.new(-0.0358767509, -0.396199822, -0.000202059746)
- o11.Name = "OriginalSize"
- o11.Parent = mas
- o11.Value = Vector3.new(0.827857256, 0.925159276, 0.877025366)
- o12.Name = "LeftElbow"
- o12.Parent = mas
- o12.C0 = CFrame.new(-0.187108159, -0.361013532, -0.0245017558, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o12.C1 = CFrame.new(-0.0358767509, 0.40380016, -0.000202059746, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o12.Active = true
- o12.Part0 = mas
- o12.Part1 = mas
- o13.Parent = o1
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- wait(3)
- local hum = script.Parent.Humanoid
- local anim = hum:LoadAnimation(script.Parent.Animation)
- anim:Play()
- end,o13)
- end))
- o16.Name = "OriginalPosition"
- o16.Parent = mas
- o16.Value = Vector3.new(-0.0572995245, 0.406759053, 0.0292848647)
- o18.Name = "OriginalPosition"
- o18.Parent = mas
- o18.Value = Vector3.new(-0.0572995245, -0.393240929, 0.0292848647)
- o19.Name = "OriginalSize"
- o19.Parent = mas
- o19.Value = Vector3.new(0.678933918, 1.34023976, 0.83825773)
- o20.Name = "LeftHip"
- o20.Parent = mas
- o20.C0 = CFrame.new(-0.500000596, -0.317417175, 0.0487938523, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o20.C1 = CFrame.new(-0.0572995245, 0.406759113, 0.0292848647, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o20.Active = true
- o20.Part0 = mas
- o20.Part1 = mas
- o23.Name = "OriginalPosition"
- o23.Parent = mas
- o23.Value = Vector3.new(0.0363556147, 0.403800189, -0.00020223856)
- o25.Name = "OriginalPosition"
- o25.Parent = mas
- o25.Value = Vector3.new(0.0363556147, -0.396199793, -0.00020223856)
- o26.Name = "OriginalSize"
- o26.Parent = mas
- o26.Value = Vector3.new(0.827857256, 0.925159216, 0.877025485)
- o27.Name = "RightElbow"
- o27.Parent = mas
- o27.C0 = CFrame.new(0.187587023, -0.361013532, -0.0245021135, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o27.C1 = CFrame.new(0.0363556147, 0.403800189, -0.00020223856, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o27.Active = true
- o27.Part0 = mas
- o27.Part1 = mas
- o30.Name = "OriginalPosition"
- o30.Parent = mas
- o30.Value = Vector3.new(-0.0624326468, 0.288986444, -0.0245021135)
- o32.Name = "OriginalPosition"
- o32.Parent = mas
- o32.Value = Vector3.new(0.187587023, -0.361013532, -0.0245021135)
- o34.Name = "OriginalPosition"
- o34.Parent = mas
- o34.Value = Vector3.new(0.187586665, 0.538986921, -0.0245022308)
- o35.Name = "OriginalSize"
- o35.Parent = mas
- o35.Value = Vector3.new(0.675612688, 1.12489867, 0.826949239)
- o36.Name = "RightShoulder"
- o36.Parent = mas
- o36.C0 = CFrame.new(1.24997997, 0.584590554, 0.0607423484, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o36.C1 = CFrame.new(-0.0624326468, 0.288986444, -0.0245021135, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o36.Active = true
- o36.Part0 = mas
- o36.Part1 = mas
- o39.Name = "OriginalPosition"
- o39.Parent = mas
- o39.Value = Vector3.new(0.0106925964, 0.110724702, -0.0063508749)
- o41.Name = "OriginalPosition"
- o41.Parent = mas
- o41.Value = Vector3.new(0.0102136135, -0.189274922, -0.00635108072)
- o42.Name = "OriginalSize"
- o42.Parent = mas
- o42.Value = Vector3.new(0.775964022, 0.955060005, 0.760477781)
- o43.Name = "LeftWrist"
- o43.Parent = mas
- o43.C0 = CFrame.new(-0.0358767509, -0.396199822, -0.000202059746, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o43.C1 = CFrame.new(0.0106925964, 0.110724702, -0.0063508749, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o43.Active = true
- o43.Part0 = mas
- o43.Part1 = mas
- o46.Name = "OriginalPosition"
- o46.Parent = mas
- o46.Value = Vector3.new(-0.0102137327, 0.110724702, -0.00635111332)
- o48.Name = "OriginalPosition"
- o48.Parent = mas
- o48.Value = Vector3.new(-0.0102140903, -0.189274922, -0.00635131914)
- o49.Name = "OriginalSize"
- o49.Parent = mas
- o49.Value = Vector3.new(0.775964022, 0.955060005, 0.760477781)
- o50.Name = "RightWrist"
- o50.Parent = mas
- o50.C0 = CFrame.new(0.0363556147, -0.396199793, -0.00020223856, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o50.C1 = CFrame.new(-0.0102137327, 0.110724702, -0.00635111332, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o50.Active = true
- o50.Part0 = mas
- o50.Part1 = mas
- o53.Name = "OriginalPosition"
- o53.Parent = mas
- o53.Value = Vector3.new(0.0572995543, 0.406759053, 0.0292846859)
- o55.Name = "OriginalPosition"
- o55.Parent = mas
- o55.Value = Vector3.new(0.0572995543, -0.393240929, 0.029328391)
- o56.Name = "OriginalSize"
- o56.Parent = mas
- o56.Value = Vector3.new(0.678933978, 1.34023976, 0.838257849)
- o57.Name = "RightHip"
- o57.Parent = mas
- o57.C0 = CFrame.new(0.499999434, -0.317417175, 0.0487938523, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o57.C1 = CFrame.new(0.0572995543, 0.406759053, 0.0292846859, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o57.Active = true
- o57.Part0 = mas
- o57.Part1 = mas
- o60.Name = "OriginalPosition"
- o60.Parent = mas
- o60.Value = Vector3.new(-0.0572988093, -0.0541849136, 0.102052271)
- o61.Name = "OriginalSize"
- o61.Parent = mas
- o61.Value = Vector3.new(0.804975927, 0.45631969, 1.21525145)
- o62.Name = "LeftAnkle"
- o62.Parent = mas
- o62.C0 = CFrame.new(-0.0572988987, -0.554775894, 0.00460058777, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o62.C1 = CFrame.new(-0.0572988093, -0.0541849211, 0.102052271, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o62.Active = true
- o62.Part0 = mas
- o62.Part1 = mas
- o65.Name = "OriginalPosition"
- o65.Parent = mas
- o65.Value = Vector3.new(-0.0572987199, 0.445221424, 0.00459977984)
- o67.Name = "OriginalPosition"
- o67.Parent = mas
- o67.Value = Vector3.new(-0.0572988987, -0.554775834, 0.00460058777)
- o68.Name = "OriginalSize"
- o68.Parent = mas
- o68.Value = Vector3.new(0.722899318, 0.919740438, 0.897220731)
- o69.Name = "LeftKnee"
- o69.Parent = mas
- o69.C0 = CFrame.new(-0.0572995245, -0.393240988, 0.0292848647, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o69.C1 = CFrame.new(-0.0572987199, 0.445221484, 0.00459977984, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o69.Active = true
- o69.Part0 = mas
- o69.Part1 = mas
- o71.Name = "Handle"
- o71.Parent = mas
- o71.Position = Vector3.new(-16.0358105, 4.79820633, 26.2241611)
- o71.Rotation = Vector3.new(0, -1.08000004, 0)
- o71.CanCollide = false
- o71.FormFactor = Enum.FormFactor.Custom
- o71.Size = Vector3.new(1.3400265, 1.34999824, 0.779999673)
- o71.CFrame = CFrame.new(-16.0358105, 4.79820633, 26.2241611, 0.999822617, -6.98092676e-24, -0.0188379921, 1.35200779e-39, 1, -3.70576914e-22, 0.0188379921, 3.7051118e-22, 0.999822617)
- o71.BottomSurface = Enum.SurfaceType.Smooth
- o71.TopSurface = Enum.SurfaceType.Smooth
- o71.Position = Vector3.new(-16.0358105, 4.79820633, 26.2241611)
- o72.Parent = o71
- o72.MeshId = "http://www.roblox.com/asset/?id=188004660 "
- o72.TextureId = "http://www.roblox.com/asset/?id=451217406"
- o72.MeshType = Enum.MeshType.FileMesh
- o74.Name = "OriginalSize"
- o74.Parent = o71
- o74.Value = Vector3.new(1.3400265, 1.34999824, 0.779999673)
- o75.Name = "AccessoryWeld"
- o75.Parent = o71
- o75.C0 = CFrame.new(8.65838956e-09, 0.150000095, -0.000272244215, 1, 7.87137555e-09, -3.26223034e-24, -7.87137555e-09, 1, -4.1444221e-16, 0, 4.1444221e-16, 1)
- o75.C1 = CFrame.new(0, 0.600000024, 0, 1, 7.87137555e-09, 3.02998127e-15, -7.87137555e-09, 1, -4.1444258e-16, -3.02998127e-15, 4.14442554e-16, 1)
- o75.Active = true
- o75.Part0 = o71
- o75.Part1 = o117
- o79.Name = "OriginalPosition"
- o79.Parent = mas
- o79.Value = Vector3.new(0.0572986603, -0.0541877747, 0.102150455)
- o80.Name = "OriginalSize"
- o80.Parent = mas
- o80.Value = Vector3.new(0.804975271, 0.456319809, 1.21525121)
- o81.Name = "RightAnkle"
- o81.Parent = mas
- o81.C0 = CFrame.new(0.0572987497, -0.554778814, 0.00469824811, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o81.C1 = CFrame.new(0.0572986603, -0.0541877747, 0.102150455, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o81.Active = true
- o81.Part0 = mas
- o81.Part1 = mas
- o84.Name = "OriginalPosition"
- o84.Parent = mas
- o84.Value = Vector3.new(0.0572987497, 0.445221305, 0.00464349939)
- o86.Name = "OriginalPosition"
- o86.Parent = mas
- o86.Value = Vector3.new(0.0572987497, -0.554778814, 0.00469824811)
- o87.Name = "OriginalSize"
- o87.Parent = mas
- o87.Value = Vector3.new(0.722899377, 0.919740558, 0.897220731)
- o88.Name = "RightKnee"
- o88.Parent = mas
- o88.C0 = CFrame.new(0.0572995543, -0.393240929, 0.029328391, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o88.C1 = CFrame.new(0.0572987497, 0.445221305, 0.00464349939, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o88.Active = true
- o88.Part0 = mas
- o88.Part1 = mas
- o91.Name = "OriginalPosition"
- o91.Parent = mas
- o91.Value = Vector3.new(-4.17232513e-07, -0.415409416, 0.0607423484)
- o93.Name = "OriginalPosition"
- o93.Parent = mas
- o93.Value = Vector3.new(-4.17232513e-07, 0.834590554, 0.0607423484)
- o95.Name = "OriginalPosition"
- o95.Parent = mas
- o95.Value = Vector3.new(-1.24989152, 0.584590554, 0.0607423484)
- o97.Name = "OriginalPosition"
- o97.Parent = mas
- o97.Value = Vector3.new(1.24997997, 0.584590554, 0.0607423484)
- o99.Name = "OriginalPosition"
- o99.Parent = mas
- o99.Value = Vector3.new(-1.00000024, 0.834590793, 0.0607421547)
- o101.Name = "OriginalPosition"
- o101.Parent = mas
- o101.Value = Vector3.new(0.999999583, 0.834590554, 0.0607422739)
- o103.Name = "OriginalPosition"
- o103.Parent = mas
- o103.Value = Vector3.new(-4.08213822e-07, 0.834590554, 0.0607423)
- o105.Name = "OriginalPosition"
- o105.Parent = mas
- o105.Value = Vector3.new(-4.17232513e-07, -0.165409446, 0.560742259)
- o107.Name = "OriginalPosition"
- o107.Parent = mas
- o107.Value = Vector3.new(-4.17232513e-07, -0.165409446, -0.439257652)
- o108.Name = "OriginalSize"
- o108.Parent = mas
- o108.Value = Vector3.new(2.03200006, 1.86928844, 1.12989664)
- o109.Name = "Waist"
- o109.Parent = mas
- o109.C0 = CFrame.new(-5.66244125e-07, 0.432582825, 0.0487938523, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o109.C1 = CFrame.new(-4.17232513e-07, -0.415409416, 0.0607423484, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o109.Active = true
- o109.Part0 = mas
- o109.Part1 = mas
- o110.Parent = o1
- o110.RightLeg = mas
- o110.LeftLeg = mas
- o110.Torso = o2
- o112.Name = "BodyWidthScale"
- o112.Parent = o110
- o112.Value = 1
- o113.Name = "BodyHeightScale"
- o113.Parent = o110
- o113.Value = 1
- o114.Name = "BodyDepthScale"
- o114.Parent = o110
- o114.Value = 1
- o115.Name = "HeadScale"
- o115.Parent = o110
- o115.Value = 1
- o117.Name = "Head"
- o117.Parent = o1
- o117.BrickColor = BrickColor.new("Institutional white")
- o117.Position = Vector3.new(-16.0358047, 4.34820652, 26.2238884)
- o117.Rotation = Vector3.new(0, -1.08000004, 0)
- o117.Size = Vector3.new(2, 1, 1)
- o117.CFrame = CFrame.new(-16.0358047, 4.34820652, 26.2238884, 0.999822617, 0, -0.0188379921, 0, 1, 0, 0.0188379921, 0, 0.999822617)
- o117.BottomSurface = Enum.SurfaceType.Smooth
- o117.TopSurface = Enum.SurfaceType.Smooth
- o117.Color = Color3.new(0.972549, 0.972549, 0.972549)
- o117.Position = Vector3.new(-16.0358047, 4.34820652, 26.2238884)
- o118.Parent = o117
- o118.Scale = Vector3.new(1.25, 1.25, 1.25)
- o119.Name = "OriginalSize"
- o119.Parent = o118
- o119.Value = Vector3.new(1.25, 1.25, 1.25)
- o121.Name = "OriginalPosition"
- o121.Parent = mas
- o123.Name = "OriginalPosition"
- o123.Parent = mas
- o123.Value = Vector3.new(0, 0, -0.600000024)
- o125.Name = "OriginalPosition"
- o125.Parent = mas
- o125.Value = Vector3.new(0, 0.600000024, 0)
- o127.Name = "OriginalPosition"
- o127.Parent = mas
- o127.Value = Vector3.new(0, 0.600000024, 0)
- o129.Name = "OriginalPosition"
- o129.Parent = mas
- o129.Value = Vector3.new(0, -0.5, 0)
- o130.Name = "OriginalSize"
- o130.Parent = o117
- o130.Value = Vector3.new(2, 1, 1)
- o131.Name = "GettingUp"
- o131.Parent = o117
- o131.SoundId = "rbxasset://sounds/action_get_up.mp3"
- o131.Volume = 0.64999997615814
- o132.Name = "Died"
- o132.Parent = o117
- o132.SoundId = "rbxasset://sounds/uuhhh.mp3"
- o132.Volume = 0.64999997615814
- o133.Name = "FreeFalling"
- o133.Parent = o117
- o133.SoundId = "rbxasset://sounds/action_falling.mp3"
- o133.Volume = 0.64999997615814
- o133.Looped = true
- o134.Name = "Jumping"
- o134.Parent = o117
- o134.SoundId = "rbxasset://sounds/action_jump.mp3"
- o134.Volume = 0.64999997615814
- o135.Name = "Landing"
- o135.Parent = o117
- o135.SoundId = "rbxasset://sounds/action_jump_land.mp3"
- o135.Volume = 0.64999997615814
- o136.Name = "Splash"
- o136.Parent = o117
- o136.SoundId = "rbxasset://sounds/impact_water.mp3"
- o136.Volume = 0.64999997615814
- o137.Name = "Running"
- o137.Parent = o117
- o137.Pitch = 1.8500000238419
- o137.SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3"
- o137.Volume = 0.64999997615814
- o137.Looped = true
- o138.Name = "Swimming"
- o138.Parent = o117
- o138.Pitch = 1.6000000238419
- o138.SoundId = "rbxasset://sounds/action_swim.mp3"
- o138.Volume = 0.64999997615814
- o138.Looped = true
- o139.Name = "Climbing"
- o139.Parent = o117
- o139.SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3"
- o139.Volume = 0.64999997615814
- o139.Looped = true
- o140.Name = "Neck"
- o140.Parent = o117
- o140.C0 = CFrame.new(-4.17232513e-07, 0.834590554, 0.0607423484, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o140.C1 = CFrame.new(0, -0.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o140.Active = true
- o140.Part0 = mas
- o140.Part1 = o117
- o141.Name = "face"
- o141.Parent = o117
- o141.Texture = "rbxassetid://2779681178"
- o142.Name = "Shirt"
- o142.Parent = o1
- o142.ShirtTemplate = "rbxassetid://1268378286"
- o143.Name = "Pants"
- o143.Parent = o1
- o143.PantsTemplate = "rbxassetid://1261244472"
- o146.Name = "OriginalPosition"
- o146.Parent = mas
- o146.Value = Vector3.new(-5.66244125e-07, 0.0325828269, 0.0487938523)
- o148.Name = "OriginalPosition"
- o148.Parent = mas
- o148.Value = Vector3.new(-5.66244125e-07, 0.432582825, 0.0487938523)
- o150.Name = "OriginalPosition"
- o150.Parent = mas
- o150.Value = Vector3.new(-0.500000596, -0.317417175, 0.0487938523)
- o152.Name = "OriginalPosition"
- o152.Parent = mas
- o152.Value = Vector3.new(0.499999434, -0.317417175, 0.0487938523)
- o154.Name = "OriginalPosition"
- o154.Parent = mas
- o154.Value = Vector3.new(-8.69035716e-07, -0.317417175, 0.0487938523)
- o156.Name = "OriginalPosition"
- o156.Parent = mas
- o156.Value = Vector3.new(-5.79254674e-07, -0.317417175, -0.451206207)
- o158.Name = "OriginalPosition"
- o158.Parent = mas
- o158.Value = Vector3.new(-5.93448078e-07, -0.317417175, 0.548793912)
- o159.Name = "OriginalSize"
- o159.Parent = mas
- o159.Value = Vector3.new(1.68052888, 0.508752942, 1.01567388)
- o160.Name = "Root"
- o160.Parent = mas
- o160.C0 = CFrame.new(0, -0.649999976, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o160.C1 = CFrame.new(-5.66244125e-07, 0.0325828269, 0.0487938523, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o160.Active = true
- o160.Part0 = o2
- o160.Part1 = mas
- o161.Parent = o1
- o161.HeadColor = BrickColor.new("Institutional white")
- o161.LeftArmColor = BrickColor.new("Institutional white")
- o161.LeftLegColor = BrickColor.new("Really black")
- o161.RightArmColor = BrickColor.new("Institutional white")
- o161.RightLegColor = BrickColor.new("Really black")
- o161.TorsoColor = BrickColor.new("Institutional white")
- o162.Name = "Animate"
- o162.Parent = o1
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- function waitForChild(parent, childName)
- local child = parent:findFirstChild(childName)
- if child then return child end
- while true do
- child = parent.ChildAdded:wait()
- if child.Name==childName then return child end
- end
- end
- local Figure = script.Parent
- local Humanoid = waitForChild(Figure, "Humanoid")
- local pose = "Standing"
- local currentAnim = ""
- local currentAnimInstance = nil
- local currentAnimTrack = nil
- local currentAnimKeyframeHandler = nil
- local currentAnimSpeed = 1.0
- local animTable = {}
- local animNames = {
- idle = {
- { id = "http://www.roblox.com/asset/?id=507766666", weight = 1 },
- { id = "http://www.roblox.com/asset/?id=507766951", weight = 1 },
- { id = "http://www.roblox.com/asset/?id=507766388", weight = 9 }
- },
- walk = {
- { id = "http://www.roblox.com/asset/?id=507777826", weight = 10 }
- },
- run = {
- { id = "http://www.roblox.com/asset/?id=507767714", weight = 10 }
- },
- swim = {
- { id = "http://www.roblox.com/asset/?id=507784897", weight = 10 }
- },
- swimidle = {
- { id = "http://www.roblox.com/asset/?id=507785072", weight = 10 }
- },
- jump = {
- { id = "http://www.roblox.com/asset/?id=507765000", weight = 10 }
- },
- fall = {
- { id = "http://www.roblox.com/asset/?id=507767968", weight = 10 }
- },
- climb = {
- { id = "http://www.roblox.com/asset/?id=507765644", weight = 10 }
- },
- sit = {
- { id = "http://www.roblox.com/asset/?id=507768133", weight = 10 }
- },
- toolnone = {
- { id = "http://www.roblox.com/asset/?id=507768375", weight = 10 }
- },
- toolslash = {
- { id = "http://www.roblox.com/asset/?id=507768375", weight = 10 }
- -- { id = "slash.xml", weight = 10 }
- },
- toollunge = {
- { id = "http://www.roblox.com/asset/?id=507768375", weight = 10 }
- },
- wave = {
- { id = "http://www.roblox.com/asset/?id=507770239", weight = 10 }
- },
- point = {
- { id = "http://www.roblox.com/asset/?id=507770453", weight = 10 }
- },
- dance = {
- { id = "http://www.roblox.com/asset/?id=507771019", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=507771955", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=507772104", weight = 10 }
- },
- dance2 = {
- { id = "http://www.roblox.com/asset/?id=507776043", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=507776720", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=507776879", weight = 10 }
- },
- dance3 = {
- { id = "http://www.roblox.com/asset/?id=507777268", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=507777451", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=507777623", weight = 10 }
- },
- laugh = {
- { id = "http://www.roblox.com/asset/?id=507770818", weight = 10 }
- },
- cheer = {
- { id = "http://www.roblox.com/asset/?id=507770677", weight = 10 }
- },
- }
- -- Existance in this list signifies that it is an emote, the value indicates if it is a looping emote
- local emoteNames = { wave = false, point = false, dance = true, dance2 = true, dance3 = true, laugh = false, cheer = false}
- math.randomseed(tick())
- function configureAnimationSet(name, fileList)
- if (animTable[name] ~= nil) then
- for _, connection in pairs(animTable[name].connections) do
- connection:disconnect()
- end
- end
- animTable[name] = {}
- animTable[name].count = 0
- animTable[name].totalWeight = 0
- animTable[name].connections = {}
- -- check for config values
- local config = script:FindFirstChild(name)
- if (config ~= nil) then
- -- print("Loading anims " .. name)
- table.insert(animTable[name].connections, config.ChildAdded:connect(function(child) configureAnimationSet(name, fileList) end))
- table.insert(animTable[name].connections, config.ChildRemoved:connect(function(child) configureAnimationSet(name, fileList) end))
- local idx = 1
- for _, childPart in pairs(config:GetChildren()) do
- if (childPart:IsA("Animation")) then
- table.insert(animTable[name].connections, childPart.Changed:connect(function(property) configureAnimationSet(name, fileList) end))
- animTable[name][idx] = {}
- animTable[name][idx].anim = childPart
- local weightObject = childPart:FindFirstChild("Weight")
- if (weightObject == nil) then
- animTable[name][idx].weight = 1
- else
- animTable[name][idx].weight = weightObject.Value
- end
- animTable[name].count = animTable[name].count + 1
- animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight
- -- print(name .. " [" .. idx .. "] " .. animTable[name][idx].anim.AnimationId .. " (" .. animTable[name][idx].weight .. ")")
- idx = idx + 1
- end
- end
- end
- -- fallback to defaults
- if (animTable[name].count <= 0) then
- for idx, anim in pairs(fileList) do
- animTable[name][idx] = {}
- animTable[name][idx].anim = Instance.new("Animation")
- animTable[name][idx].anim.Name = name
- animTable[name][idx].anim.AnimationId = anim.id
- animTable[name][idx].weight = anim.weight
- animTable[name].count = animTable[name].count + 1
- animTable[name].totalWeight = animTable[name].totalWeight + anim.weight
- -- print(name .. " [" .. idx .. "] " .. anim.id .. " (" .. anim.weight .. ")")
- end
- end
- end
- -- Setup animation objects
- function scriptChildModified(child)
- local fileList = animNames[child.Name]
- if (fileList ~= nil) then
- configureAnimationSet(child.Name, fileList)
- end
- end
- script.ChildAdded:connect(scriptChildModified)
- script.ChildRemoved:connect(scriptChildModified)
- for name, fileList in pairs(animNames) do
- configureAnimationSet(name, fileList)
- end
- -- ANIMATION
- -- declarations
- local toolAnim = "None"
- local toolAnimTime = 0
- local jumpAnimTime = 0
- local jumpAnimDuration = 0.31
- local toolTransitionTime = 0.1
- local fallTransitionTime = 0.2
- -- functions
- function stopAllAnimations()
- local oldAnim = currentAnim
- -- return to idle if finishing an emote
- if (emoteNames[oldAnim] ~= nil and emoteNames[oldAnim] == false) then
- oldAnim = "idle"
- end
- currentAnim = ""
- currentAnimInstance = nil
- if (currentAnimKeyframeHandler ~= nil) then
- currentAnimKeyframeHandler:disconnect()
- end
- if (currentAnimTrack ~= nil) then
- currentAnimTrack:Stop()
- currentAnimTrack:Destroy()
- currentAnimTrack = nil
- end
- return oldAnim
- end
- function setAnimationSpeed(speed)
- if speed ~= currentAnimSpeed then
- currentAnimSpeed = speed
- currentAnimTrack:AdjustSpeed(currentAnimSpeed)
- end
- end
- function keyFrameReachedFunc(frameName)
- if (frameName == "End") then
- -- print("Keyframe : ".. frameName)
- local repeatAnim = currentAnim
- -- return to idle if finishing an emote
- if (emoteNames[repeatAnim] ~= nil and emoteNames[repeatAnim] == false) then
- repeatAnim = "idle"
- end
- local animSpeed = currentAnimSpeed
- playAnimation(repeatAnim, 0.15, Humanoid)
- setAnimationSpeed(animSpeed)
- end
- end
- -- Preload animations
- function playAnimation(animName, transitionTime, humanoid)
- local roll = math.random(1, animTable[animName].totalWeight)
- local origRoll = roll
- local idx = 1
- while (roll > animTable[animName][idx].weight) do
- roll = roll - animTable[animName][idx].weight
- idx = idx + 1
- end
- -- print(animName .. " " .. idx .. " [" .. origRoll .. "]")
- local anim = animTable[animName][idx].anim
- -- switch animation
- if (anim ~= currentAnimInstance) then
- if (currentAnimTrack ~= nil) then
- currentAnimTrack:Stop(transitionTime)
- currentAnimTrack:Destroy()
- end
- currentAnimSpeed = 1.0
- -- load it to the humanoid; get AnimationTrack
- currentAnimTrack = humanoid:LoadAnimation(anim)
- -- play the animation
- currentAnimTrack:Play(transitionTime)
- currentAnim = animName
- currentAnimInstance = anim
- -- set up keyframe name triggers
- if (currentAnimKeyframeHandler ~= nil) then
- currentAnimKeyframeHandler:disconnect()
- end
- currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:connect(keyFrameReachedFunc)
- end
- end
- -------------------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------
- local toolAnimName = ""
- local toolAnimTrack = nil
- local toolAnimInstance = nil
- local currentToolAnimKeyframeHandler = nil
- function toolKeyFrameReachedFunc(frameName)
- if (frameName == "End") then
- -- print("Keyframe : ".. frameName)
- playToolAnimation(toolAnimName, 0.0, Humanoid)
- end
- end
- function playToolAnimation(animName, transitionTime, humanoid)
- local roll = math.random(1, animTable[animName].totalWeight)
- local origRoll = roll
- local idx = 1
- while (roll > animTable[animName][idx].weight) do
- roll = roll - animTable[animName][idx].weight
- idx = idx + 1
- end
- -- print(animName .. " * " .. idx .. " [" .. origRoll .. "]")
- local anim = animTable[animName][idx].anim
- if (toolAnimInstance ~= anim) then
- if (toolAnimTrack ~= nil) then
- toolAnimTrack:Stop()
- toolAnimTrack:Destroy()
- transitionTime = 0
- end
- -- load it to the humanoid; get AnimationTrack
- toolAnimTrack = humanoid:LoadAnimation(anim)
- -- play the animation
- toolAnimTrack:Play(transitionTime)
- toolAnimName = animName
- toolAnimInstance = anim
- currentToolAnimKeyframeHandler = toolAnimTrack.KeyframeReached:connect(toolKeyFrameReachedFunc)
- end
- end
- function stopToolAnimations()
- local oldAnim = toolAnimName
- if (currentToolAnimKeyframeHandler ~= nil) then
- currentToolAnimKeyframeHandler:disconnect()
- end
- toolAnimName = ""
- toolAnimInstance = nil
- if (toolAnimTrack ~= nil) then
- toolAnimTrack:Stop()
- toolAnimTrack:Destroy()
- toolAnimTrack = nil
- end
- return oldAnim
- end
- -------------------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------
- function onRunning(speed)
- if speed > 0.01 then
- local scale = 15.0
- playAnimation("walk", 0.1, Humanoid)
- setAnimationSpeed(speed / scale)
- pose = "Running"
- else
- if emoteNames[currentAnim] == nil then
- playAnimation("idle", 0.1, Humanoid)
- pose = "Standing"
- end
- end
- end
- function onDied()
- pose = "Dead"
- end
- function onJumping()
- playAnimation("jump", 0.1, Humanoid)
- jumpAnimTime = jumpAnimDuration
- pose = "Jumping"
- end
- function onClimbing(speed)
- local scale = 5.0
- playAnimation("climb", 0.1, Humanoid)
- setAnimationSpeed(speed / scale)
- pose = "Climbing"
- end
- function onGettingUp()
- pose = "GettingUp"
- end
- function onFreeFall()
- if (jumpAnimTime <= 0) then
- playAnimation("fall", fallTransitionTime, Humanoid)
- end
- pose = "FreeFall"
- end
- function onFallingDown()
- pose = "FallingDown"
- end
- function onSeated()
- pose = "Seated"
- end
- function onPlatformStanding()
- pose = "PlatformStanding"
- end
- function onSwimming(speed)
- if speed > 1.00 then
- local scale = 10.0
- playAnimation("swim", 0.4, Humanoid)
- setAnimationSpeed(speed / scale)
- pose = "Swimming"
- else
- playAnimation("swimidle", 0.4, Humanoid)
- pose = "Standing"
- end
- end
- function getTool()
- for _, kid in ipairs(Figure:GetChildren()) do
- if kid.className == "Tool" then return kid end
- end
- return nil
- end
- function getToolAnim(tool)
- for _, c in ipairs(tool:GetChildren()) do
- if c.Name == "toolanim" and c.className == "StringValue" then
- return c
- end
- end
- return nil
- end
- function animateTool()
- if (toolAnim == "None") then
- playToolAnimation("toolnone", toolTransitionTime, Humanoid)
- return
- end
- if (toolAnim == "Slash") then
- playToolAnimation("toolslash", 0, Humanoid)
- return
- end
- if (toolAnim == "Lunge") then
- playToolAnimation("toollunge", 0, Humanoid)
- return
- end
- end
- function moveSit()
- RightShoulder.MaxVelocity = 0.15
- LeftShoulder.MaxVelocity = 0.15
- RightShoulder:SetDesiredAngle(3.14 /2)
- LeftShoulder:SetDesiredAngle(-3.14 /2)
- RightHip:SetDesiredAngle(3.14 /2)
- LeftHip:SetDesiredAngle(-3.14 /2)
- end
- local lastTick = 0
- function move(time)
- local amplitude = 1
- local frequency = 1
- local deltaTime = time - lastTick
- lastTick = time
- local climbFudge = 0
- local setAngles = false
- if (jumpAnimTime > 0) then
- jumpAnimTime = jumpAnimTime - deltaTime
- end
- if (pose == "FreeFall" and jumpAnimTime <= 0) then
- playAnimation("fall", fallTransitionTime, Humanoid)
- elseif (pose == "Seated") then
- playAnimation("sit", 0.5, Humanoid)
- return
- elseif (pose == "Running") then
- playAnimation("walk", 0.1, Humanoid)
- elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
- stopAllAnimations()
- amplitude = 0.1
- frequency = 1
- setAngles = true
- end
- -- Tool Animation handling
- local tool = getTool()
- if tool and (tool.RequiresHandle or tool:FindFirstChild("Handle")) then
- animStringValueObject = getToolAnim(tool)
- if animStringValueObject then
- toolAnim = animStringValueObject.Value
- -- message recieved, delete StringValue
- animStringValueObject.Parent = nil
- toolAnimTime = time + .3
- end
- if time > toolAnimTime then
- toolAnimTime = 0
- toolAnim = "None"
- end
- animateTool()
- else
- stopToolAnimations()
- toolAnim = "None"
- toolAnimInstance = nil
- toolAnimTime = 0
- end
- end
- -- connect events
- Humanoid.Died:connect(onDied)
- Humanoid.Running:connect(onRunning)
- Humanoid.Jumping:connect(onJumping)
- Humanoid.Climbing:connect(onClimbing)
- Humanoid.GettingUp:connect(onGettingUp)
- Humanoid.FreeFalling:connect(onFreeFall)
- Humanoid.FallingDown:connect(onFallingDown)
- Humanoid.Seated:connect(onSeated)
- Humanoid.PlatformStanding:connect(onPlatformStanding)
- Humanoid.Swimming:connect(onSwimming)
- -- setup emote chat hook
- Game.Players.LocalPlayer.Chatted:connect(function(msg)
- local emote = ""
- if (string.sub(msg, 1, 3) == "/e ") then
- emote = string.sub(msg, 4)
- elseif (string.sub(msg, 1, 7) == "/emote ") then
- emote = string.sub(msg, 8)
- end
- if (pose == "Standing" and emoteNames[emote] ~= nil) then
- playAnimation(emote, 0.1, Humanoid)
- end
- -- print("===> " .. string.sub(msg, 1, 3) .. "(" .. emote .. ")")
- end)
- -- main program
- local runService = game:service("RunService");
- -- print("bottom")
- -- initialize to idle
- playAnimation("idle", 0.1, Humanoid)
- pose = "Standing"
- while Figure.Parent~=nil do
- local _, time = wait(0.1)
- move(time)
- end
- end,o162)
- end))
- o163.Name = "Health"
- o163.Parent = o1
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --Responsible for regening a player's humanoid's health
- -- declarations
- local Figure = script.Parent
- local Head = Figure:WaitForChild("Head")
- local Humanoid = Figure:WaitForChild("Humanoid")
- local regening = false
- -- regeneration
- function regenHealth()
- if regening then return end
- regening = true
- while Humanoid.Health < Humanoid.MaxHealth do
- local s = wait(1)
- local health = Humanoid.Health
- if health > 0 and health < Humanoid.MaxHealth then
- local newHealthDelta = 0.01 * s * Humanoid.MaxHealth
- health = health + newHealthDelta
- Humanoid.Health = math.min(health,Humanoid.MaxHealth)
- end
- end
- if Humanoid.Health > Humanoid.MaxHealth then
- Humanoid.Health = Humanoid.MaxHealth
- end
- regening = false
- end
- Humanoid.HealthChanged:connect(regenHealth)
- end,o163)
- end))
- o164.Name = "Animate"
- o164.Parent = o1
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- function waitForChild(parent, childName)
- local child = parent:findFirstChild(childName)
- if child then return child end
- while true do
- child = parent.ChildAdded:wait()
- if child.Name==childName then return child end
- end
- end
- local Figure = script.Parent
- local Humanoid = waitForChild(Figure, "Humanoid")
- local pose = "Standing"
- local currentAnim = ""
- local currentAnimInstance = nil
- local currentAnimTrack = nil
- local currentAnimKeyframeHandler = nil
- local currentAnimSpeed = 1.0
- local animTable = {}
- local animNames = {
- idle = {
- { id = "http://www.roblox.com/asset/?id=507766666", weight = 1 },
- { id = "http://www.roblox.com/asset/?id=507766951", weight = 1 },
- { id = "http://www.roblox.com/asset/?id=507766388", weight = 9 }
- },
- walk = {
- { id = "http://www.roblox.com/asset/?id=507777826", weight = 10 }
- },
- run = {
- { id = "http://www.roblox.com/asset/?id=507767714", weight = 10 }
- },
- swim = {
- { id = "http://www.roblox.com/asset/?id=507784897", weight = 10 }
- },
- swimidle = {
- { id = "http://www.roblox.com/asset/?id=507785072", weight = 10 }
- },
- jump = {
- { id = "http://www.roblox.com/asset/?id=507765000", weight = 10 }
- },
- fall = {
- { id = "http://www.roblox.com/asset/?id=507767968", weight = 10 }
- },
- climb = {
- { id = "http://www.roblox.com/asset/?id=507765644", weight = 10 }
- },
- sit = {
- { id = "http://www.roblox.com/asset/?id=507768133", weight = 10 }
- },
- toolnone = {
- { id = "http://www.roblox.com/asset/?id=507768375", weight = 10 }
- },
- toolslash = {
- { id = "http://www.roblox.com/asset/?id=507768375", weight = 10 }
- -- { id = "slash.xml", weight = 10 }
- },
- toollunge = {
- { id = "http://www.roblox.com/asset/?id=507768375", weight = 10 }
- },
- wave = {
- { id = "http://www.roblox.com/asset/?id=507770239", weight = 10 }
- },
- point = {
- { id = "http://www.roblox.com/asset/?id=507770453", weight = 10 }
- },
- dance = {
- { id = "http://www.roblox.com/asset/?id=507771019", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=507771955", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=507772104", weight = 10 }
- },
- dance2 = {
- { id = "http://www.roblox.com/asset/?id=507776043", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=507776720", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=507776879", weight = 10 }
- },
- dance3 = {
- { id = "http://www.roblox.com/asset/?id=507777268", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=507777451", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=507777623", weight = 10 }
- },
- laugh = {
- { id = "http://www.roblox.com/asset/?id=507770818", weight = 10 }
- },
- cheer = {
- { id = "http://www.roblox.com/asset/?id=507770677", weight = 10 }
- },
- }
- -- Existance in this list signifies that it is an emote, the value indicates if it is a looping emote
- local emoteNames = { wave = false, point = false, dance = true, dance2 = true, dance3 = true, laugh = false, cheer = false}
- math.randomseed(tick())
- function configureAnimationSet(name, fileList)
- if (animTable[name] ~= nil) then
- for _, connection in pairs(animTable[name].connections) do
- connection:disconnect()
- end
- end
- animTable[name] = {}
- animTable[name].count = 0
- animTable[name].totalWeight = 0
- animTable[name].connections = {}
- -- check for config values
- local config = script:FindFirstChild(name)
- if (config ~= nil) then
- -- print("Loading anims " .. name)
- table.insert(animTable[name].connections, config.ChildAdded:connect(function(child) configureAnimationSet(name, fileList) end))
- table.insert(animTable[name].connections, config.ChildRemoved:connect(function(child) configureAnimationSet(name, fileList) end))
- local idx = 1
- for _, childPart in pairs(config:GetChildren()) do
- if (childPart:IsA("Animation")) then
- table.insert(animTable[name].connections, childPart.Changed:connect(function(property) configureAnimationSet(name, fileList) end))
- animTable[name][idx] = {}
- animTable[name][idx].anim = childPart
- local weightObject = childPart:FindFirstChild("Weight")
- if (weightObject == nil) then
- animTable[name][idx].weight = 1
- else
- animTable[name][idx].weight = weightObject.Value
- end
- animTable[name].count = animTable[name].count + 1
- animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight
- -- print(name .. " [" .. idx .. "] " .. animTable[name][idx].anim.AnimationId .. " (" .. animTable[name][idx].weight .. ")")
- idx = idx + 1
- end
- end
- end
- -- fallback to defaults
- if (animTable[name].count <= 0) then
- for idx, anim in pairs(fileList) do
- animTable[name][idx] = {}
- animTable[name][idx].anim = Instance.new("Animation")
- animTable[name][idx].anim.Name = name
- animTable[name][idx].anim.AnimationId = anim.id
- animTable[name][idx].weight = anim.weight
- animTable[name].count = animTable[name].count + 1
- animTable[name].totalWeight = animTable[name].totalWeight + anim.weight
- -- print(name .. " [" .. idx .. "] " .. anim.id .. " (" .. anim.weight .. ")")
- end
- end
- end
- -- Setup animation objects
- function scriptChildModified(child)
- local fileList = animNames[child.Name]
- if (fileList ~= nil) then
- configureAnimationSet(child.Name, fileList)
- end
- end
- script.ChildAdded:connect(scriptChildModified)
- script.ChildRemoved:connect(scriptChildModified)
- for name, fileList in pairs(animNames) do
- configureAnimationSet(name, fileList)
- end
- -- ANIMATION
- -- declarations
- local toolAnim = "None"
- local toolAnimTime = 0
- local jumpAnimTime = 0
- local jumpAnimDuration = 0.31
- local toolTransitionTime = 0.1
- local fallTransitionTime = 0.2
- -- functions
- function stopAllAnimations()
- local oldAnim = currentAnim
- -- return to idle if finishing an emote
- if (emoteNames[oldAnim] ~= nil and emoteNames[oldAnim] == false) then
- oldAnim = "idle"
- end
- currentAnim = ""
- currentAnimInstance = nil
- if (currentAnimKeyframeHandler ~= nil) then
- currentAnimKeyframeHandler:disconnect()
- end
- if (currentAnimTrack ~= nil) then
- currentAnimTrack:Stop()
- currentAnimTrack:Destroy()
- currentAnimTrack = nil
- end
- return oldAnim
- end
- function setAnimationSpeed(speed)
- if speed ~= currentAnimSpeed then
- currentAnimSpeed = speed
- currentAnimTrack:AdjustSpeed(currentAnimSpeed)
- end
- end
- function keyFrameReachedFunc(frameName)
- if (frameName == "End") then
- -- print("Keyframe : ".. frameName)
- local repeatAnim = currentAnim
- -- return to idle if finishing an emote
- if (emoteNames[repeatAnim] ~= nil and emoteNames[repeatAnim] == false) then
- repeatAnim = "idle"
- end
- local animSpeed = currentAnimSpeed
- playAnimation(repeatAnim, 0.15, Humanoid)
- setAnimationSpeed(animSpeed)
- end
- end
- -- Preload animations
- function playAnimation(animName, transitionTime, humanoid)
- local roll = math.random(1, animTable[animName].totalWeight)
- local origRoll = roll
- local idx = 1
- while (roll > animTable[animName][idx].weight) do
- roll = roll - animTable[animName][idx].weight
- idx = idx + 1
- end
- -- print(animName .. " " .. idx .. " [" .. origRoll .. "]")
- local anim = animTable[animName][idx].anim
- -- switch animation
- if (anim ~= currentAnimInstance) then
- if (currentAnimTrack ~= nil) then
- currentAnimTrack:Stop(transitionTime)
- currentAnimTrack:Destroy()
- end
- currentAnimSpeed = 1.0
- -- load it to the humanoid; get AnimationTrack
- currentAnimTrack = humanoid:LoadAnimation(anim)
- -- play the animation
- currentAnimTrack:Play(transitionTime)
- currentAnim = animName
- currentAnimInstance = anim
- -- set up keyframe name triggers
- if (currentAnimKeyframeHandler ~= nil) then
- currentAnimKeyframeHandler:disconnect()
- end
- currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:connect(keyFrameReachedFunc)
- end
- end
- -------------------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------
- local toolAnimName = ""
- local toolAnimTrack = nil
- local toolAnimInstance = nil
- local currentToolAnimKeyframeHandler = nil
- function toolKeyFrameReachedFunc(frameName)
- if (frameName == "End") then
- -- print("Keyframe : ".. frameName)
- playToolAnimation(toolAnimName, 0.0, Humanoid)
- end
- end
- function playToolAnimation(animName, transitionTime, humanoid)
- local roll = math.random(1, animTable[animName].totalWeight)
- local origRoll = roll
- local idx = 1
- while (roll > animTable[animName][idx].weight) do
- roll = roll - animTable[animName][idx].weight
- idx = idx + 1
- end
- -- print(animName .. " * " .. idx .. " [" .. origRoll .. "]")
- local anim = animTable[animName][idx].anim
- if (toolAnimInstance ~= anim) then
- if (toolAnimTrack ~= nil) then
- toolAnimTrack:Stop()
- toolAnimTrack:Destroy()
- transitionTime = 0
- end
- -- load it to the humanoid; get AnimationTrack
- toolAnimTrack = humanoid:LoadAnimation(anim)
- -- play the animation
- toolAnimTrack:Play(transitionTime)
- toolAnimName = animName
- toolAnimInstance = anim
- currentToolAnimKeyframeHandler = toolAnimTrack.KeyframeReached:connect(toolKeyFrameReachedFunc)
- end
- end
- function stopToolAnimations()
- local oldAnim = toolAnimName
- if (currentToolAnimKeyframeHandler ~= nil) then
- currentToolAnimKeyframeHandler:disconnect()
- end
- toolAnimName = ""
- toolAnimInstance = nil
- if (toolAnimTrack ~= nil) then
- toolAnimTrack:Stop()
- toolAnimTrack:Destroy()
- toolAnimTrack = nil
- end
- return oldAnim
- end
- -------------------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------
- function onRunning(speed)
- if speed > 0.01 then
- local scale = 15.0
- playAnimation("walk", 0.1, Humanoid)
- setAnimationSpeed(speed / scale)
- pose = "Running"
- else
- if emoteNames[currentAnim] == nil then
- playAnimation("idle", 0.1, Humanoid)
- pose = "Standing"
- end
- end
- end
- function onDied()
- pose = "Dead"
- end
- function onJumping()
- playAnimation("jump", 0.1, Humanoid)
- jumpAnimTime = jumpAnimDuration
- pose = "Jumping"
- end
- function onClimbing(speed)
- local scale = 5.0
- playAnimation("climb", 0.1, Humanoid)
- setAnimationSpeed(speed / scale)
- pose = "Climbing"
- end
- function onGettingUp()
- pose = "GettingUp"
- end
- function onFreeFall()
- if (jumpAnimTime <= 0) then
- playAnimation("fall", fallTransitionTime, Humanoid)
- end
- pose = "FreeFall"
- end
- function onFallingDown()
- pose = "FallingDown"
- end
- function onSeated()
- pose = "Seated"
- end
- function onPlatformStanding()
- pose = "PlatformStanding"
- end
- function onSwimming(speed)
- if speed > 1.00 then
- local scale = 10.0
- playAnimation("swim", 0.4, Humanoid)
- setAnimationSpeed(speed / scale)
- pose = "Swimming"
- else
- playAnimation("swimidle", 0.4, Humanoid)
- pose = "Standing"
- end
- end
- function getTool()
- for _, kid in ipairs(Figure:GetChildren()) do
- if kid.className == "Tool" then return kid end
- end
- return nil
- end
- function getToolAnim(tool)
- for _, c in ipairs(tool:GetChildren()) do
- if c.Name == "toolanim" and c.className == "StringValue" then
- return c
- end
- end
- return nil
- end
- function animateTool()
- if (toolAnim == "None") then
- playToolAnimation("toolnone", toolTransitionTime, Humanoid)
- return
- end
- if (toolAnim == "Slash") then
- playToolAnimation("toolslash", 0, Humanoid)
- return
- end
- if (toolAnim == "Lunge") then
- playToolAnimation("toollunge", 0, Humanoid)
- return
- end
- end
- function moveSit()
- RightShoulder.MaxVelocity = 0.15
- LeftShoulder.MaxVelocity = 0.15
- RightShoulder:SetDesiredAngle(3.14 /2)
- LeftShoulder:SetDesiredAngle(-3.14 /2)
- RightHip:SetDesiredAngle(3.14 /2)
- LeftHip:SetDesiredAngle(-3.14 /2)
- end
- local lastTick = 0
- function move(time)
- local amplitude = 1
- local frequency = 1
- local deltaTime = time - lastTick
- lastTick = time
- local climbFudge = 0
- local setAngles = false
- if (jumpAnimTime > 0) then
- jumpAnimTime = jumpAnimTime - deltaTime
- end
- if (pose == "FreeFall" and jumpAnimTime <= 0) then
- playAnimation("fall", fallTransitionTime, Humanoid)
- elseif (pose == "Seated") then
- playAnimation("sit", 0.5, Humanoid)
- return
- elseif (pose == "Running") then
- playAnimation("walk", 0.1, Humanoid)
- elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
- stopAllAnimations()
- amplitude = 0.1
- frequency = 1
- setAngles = true
- end
- -- Tool Animation handling
- local tool = getTool()
- if tool and (tool.RequiresHandle or tool:FindFirstChild("Handle")) then
- animStringValueObject = getToolAnim(tool)
- if animStringValueObject then
- toolAnim = animStringValueObject.Value
- -- message recieved, delete StringValue
- animStringValueObject.Parent = nil
- toolAnimTime = time + .3
- end
- if time > toolAnimTime then
- toolAnimTime = 0
- toolAnim = "None"
- end
- animateTool()
- else
- stopToolAnimations()
- toolAnim = "None"
- toolAnimInstance = nil
- toolAnimTime = 0
- end
- end
- -- connect events
- Humanoid.Died:connect(onDied)
- Humanoid.Running:connect(onRunning)
- Humanoid.Jumping:connect(onJumping)
- Humanoid.Climbing:connect(onClimbing)
- Humanoid.GettingUp:connect(onGettingUp)
- Humanoid.FreeFalling:connect(onFreeFall)
- Humanoid.FallingDown:connect(onFallingDown)
- Humanoid.Seated:connect(onSeated)
- Humanoid.PlatformStanding:connect(onPlatformStanding)
- Humanoid.Swimming:connect(onSwimming)
- -- setup emote chat hook
- Game.Players.LocalPlayer.Chatted:connect(function(msg)
- local emote = ""
- if (string.sub(msg, 1, 3) == "/e ") then
- emote = string.sub(msg, 4)
- elseif (string.sub(msg, 1, 7) == "/emote ") then
- emote = string.sub(msg, 8)
- end
- if (pose == "Standing" and emoteNames[emote] ~= nil) then
- playAnimation(emote, 0.1, Humanoid)
- end
- -- print("===> " .. string.sub(msg, 1, 3) .. "(" .. emote .. ")")
- end)
- -- main program
- local runService = game:service("RunService");
- -- print("bottom")
- -- initialize to idle
- playAnimation("idle", 0.1, Humanoid)
- pose = "Standing"
- while Figure.Parent~=nil do
- local _, time = wait(0.1)
- move(time)
- end
- end,o164)
- end))
- o165.Name = "climb"
- o165.Parent = o164
- o166.Name = "ClimbAnim"
- o166.Parent = o165
- o166.AnimationId = "http://www.roblox.com/asset/?id=507765644"
- o167.Name = "fall"
- o167.Parent = o164
- o168.Name = "FallAnim"
- o168.Parent = o167
- o168.AnimationId = "http://www.roblox.com/asset/?id=507767968"
- o169.Name = "idle"
- o169.Parent = o164
- o170.Name = "Animation1"
- o170.Parent = o169
- o170.AnimationId = "http://www.roblox.com/asset/?id=507766388"
- o171.Name = "Weight"
- o171.Parent = o170
- o171.Value = 9
- o172.Name = "Animation2"
- o172.Parent = o169
- o172.AnimationId = "http://www.roblox.com/asset/?id=507766666"
- o173.Name = "Weight"
- o173.Parent = o172
- o173.Value = 1
- o174.Name = "jump"
- o174.Parent = o164
- o175.Name = "JumpAnim"
- o175.Parent = o174
- o175.AnimationId = "http://www.roblox.com/asset/?id=507765000"
- o176.Name = "run"
- o176.Parent = o164
- o177.Name = "RunAnim"
- o177.Parent = o176
- o177.AnimationId = "http://www.roblox.com/asset/?id=5077677142"
- o178.Name = "sit"
- o178.Parent = o164
- o179.Name = "SitAnim"
- o179.Parent = o178
- o179.AnimationId = "http://www.roblox.com/asset/?id=507768133"
- o180.Name = "toolnone"
- o180.Parent = o164
- o181.Name = "ToolNoneAnim"
- o181.Parent = o180
- o181.AnimationId = "http://www.roblox.com/asset/?id=507768375"
- o182.Name = "walk"
- o182.Parent = o164
- o183.Name = "RunAnim"
- o183.Parent = o182
- o183.AnimationId = "http://www.roblox.com/asset/?id=507777826"
- o184.Name = "swimidle"
- o184.Parent = o164
- o185.Name = "SwimIdle"
- o185.Parent = o184
- o185.AnimationId = "http://www.roblox.com/asset/?id=481825862"
- o186.Name = "swim"
- o186.Parent = o164
- o187.Name = "Swim"
- o187.Parent = o186
- o187.AnimationId = "http://www.roblox.com/asset/?id=507784897"
- o190.Name = "OriginalPosition"
- o190.Parent = mas
- o190.Value = Vector3.new(0.0625219345, 0.288986444, -0.0245017558)
- o192.Name = "OriginalPosition"
- o192.Parent = mas
- o192.Value = Vector3.new(-0.187108159, -0.361013532, -0.0245017558)
- o194.Name = "OriginalPosition"
- o194.Parent = mas
- o194.Value = Vector3.new(-0.187587023, 0.538986921, -0.0245018732)
- o195.Name = "OriginalSize"
- o195.Parent = mas
- o195.Value = Vector3.new(0.675612688, 1.12489867, 0.826949)
- o196.Name = "LeftShoulder"
- o196.Parent = mas
- o196.C0 = CFrame.new(-1.24989152, 0.584590554, 0.0607423484, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o196.C1 = CFrame.new(0.0625219345, 0.288986444, -0.0245017558, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o196.Active = true
- o196.Part0 = mas
- o196.Part1 = mas
- mas.Parent = workspace
- mas:MakeJoints()
- local mas1 = mas:GetChildren()
- for i=1,#mas1 do
- mas1[i].Parent = workspace
- ypcall(function() mas1[i]:MakeJoints() end)
- end
- mas:Destroy()
- for i=1,#cors do
- coroutine.resume(cors[i])
- end
- game:GetService("Lighting").Ambient = Color3.new(0, 0, 0)
- game:GetService("Lighting").Brightness = 2
- game:GetService("Lighting").ColorShift_Bottom = Color3.new(0, 0, 0)
- game:GetService("Lighting").ColorShift_Top = Color3.new(0, 0, 0)
- game:GetService("Lighting").GlobalShadows = true
- game:GetService("Lighting").OutdoorAmbient = Color3.new(0.501961, 0.501961, 0.501961)
- game:GetService("Lighting").Outlines = false
- game:GetService("Lighting").GeographicLatitude = 41.733299255371
- game:GetService("Lighting").TimeOfDay = "14:00:00"
- game:GetService("Lighting").FogColor = Color3.new(0.752941, 0.752941, 0.752941)
- game:GetService("Lighting").FogEnd = 100000
- game:GetService("Lighting").FogStart = 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement