add gs
This commit is contained in:
@@ -0,0 +1,952 @@
|
||||
<roblox xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.roblox.com/roblox.xsd" version="4">
|
||||
<External>null</External>
|
||||
<External>nil</External>
|
||||
<Item class="Model" referent="RBX0">
|
||||
<Properties>
|
||||
<CoordinateFrame name="ModelInPrimary">
|
||||
<X>0</X>
|
||||
<Y>0</Y>
|
||||
<Z>0</Z>
|
||||
<R00>1</R00>
|
||||
<R01>0</R01>
|
||||
<R02>0</R02>
|
||||
<R10>0</R10>
|
||||
<R11>1</R11>
|
||||
<R12>0</R12>
|
||||
<R20>0</R20>
|
||||
<R21>0</R21>
|
||||
<R22>1</R22>
|
||||
</CoordinateFrame>
|
||||
<string name="Name">erik.cassel</string>
|
||||
<Ref name="PrimaryPart">RBX1</Ref>
|
||||
</Properties>
|
||||
<Item class="Part" referent="RBX1">
|
||||
<Properties>
|
||||
<bool name="Anchored">false</bool>
|
||||
<float name="BackParamA">-0.5</float>
|
||||
<float name="BackParamB">0.5</float>
|
||||
<token name="BackSurface">0</token>
|
||||
<token name="BackSurfaceInput">0</token>
|
||||
<float name="BottomParamA">-0.5</float>
|
||||
<float name="BottomParamB">0.5</float>
|
||||
<token name="BottomSurface">4</token>
|
||||
<token name="BottomSurfaceInput">0</token>
|
||||
<int name="BrickColor">194</int>
|
||||
<CoordinateFrame name="CFrame">
|
||||
<X>0</X>
|
||||
<Y>19.5</Y>
|
||||
<Z>22.5</Z>
|
||||
<R00>-1</R00>
|
||||
<R01>0</R01>
|
||||
<R02>0</R02>
|
||||
<R10>0</R10>
|
||||
<R11>1</R11>
|
||||
<R12>0</R12>
|
||||
<R20>0</R20>
|
||||
<R21>0</R21>
|
||||
<R22>-1</R22>
|
||||
</CoordinateFrame>
|
||||
<bool name="CanCollide">true</bool>
|
||||
<PhysicalProperties name="CustomPhysicalProperties">
|
||||
<CustomPhysics>false</CustomPhysics>
|
||||
</PhysicalProperties>
|
||||
<float name="Elasticity">0.5</float>
|
||||
<float name="Friction">0.300000012</float>
|
||||
<float name="FrontParamA">-0.5</float>
|
||||
<float name="FrontParamB">0.5</float>
|
||||
<token name="FrontSurface">0</token>
|
||||
<token name="FrontSurfaceInput">0</token>
|
||||
<float name="LeftParamA">-0.5</float>
|
||||
<float name="LeftParamB">0.5</float>
|
||||
<token name="LeftSurface">0</token>
|
||||
<token name="LeftSurfaceInput">0</token>
|
||||
<bool name="Locked">true</bool>
|
||||
<token name="Material">256</token>
|
||||
<string name="Name">Head</string>
|
||||
<float name="Reflectance">0</float>
|
||||
<float name="RightParamA">-0.5</float>
|
||||
<float name="RightParamB">0.5</float>
|
||||
<token name="RightSurface">0</token>
|
||||
<token name="RightSurfaceInput">0</token>
|
||||
<Vector3 name="RotVelocity">
|
||||
<X>0</X>
|
||||
<Y>0</Y>
|
||||
<Z>0</Z>
|
||||
</Vector3>
|
||||
<float name="TopParamA">-0.5</float>
|
||||
<float name="TopParamB">0.5</float>
|
||||
<token name="TopSurface">0</token>
|
||||
<token name="TopSurfaceInput">0</token>
|
||||
<float name="Transparency">0</float>
|
||||
<Vector3 name="Velocity">
|
||||
<X>0</X>
|
||||
<Y>0</Y>
|
||||
<Z>0</Z>
|
||||
</Vector3>
|
||||
<token name="formFactorRaw">0</token>
|
||||
<token name="shape">1</token>
|
||||
<Vector3 name="size">
|
||||
<X>2</X>
|
||||
<Y>1</Y>
|
||||
<Z>1</Z>
|
||||
</Vector3>
|
||||
</Properties>
|
||||
<Item class="SpecialMesh" referent="RBX2">
|
||||
<Properties>
|
||||
<token name="LODX">2</token>
|
||||
<token name="LODY">2</token>
|
||||
<Content name="MeshId"><null></null></Content>
|
||||
<token name="MeshType">0</token>
|
||||
<string name="Name">Mesh</string>
|
||||
<Vector3 name="Offset">
|
||||
<X>0</X>
|
||||
<Y>0</Y>
|
||||
<Z>0</Z>
|
||||
</Vector3>
|
||||
<Vector3 name="Scale">
|
||||
<X>1.25</X>
|
||||
<Y>1.25</Y>
|
||||
<Z>1.25</Z>
|
||||
</Vector3>
|
||||
<Content name="TextureId"><null></null></Content>
|
||||
<Vector3 name="VertexColor">
|
||||
<X>1</X>
|
||||
<Y>1</Y>
|
||||
<Z>1</Z>
|
||||
</Vector3>
|
||||
</Properties>
|
||||
</Item>
|
||||
<Item class="Decal" referent="RBX3">
|
||||
<Properties>
|
||||
<token name="Face">5</token>
|
||||
<string name="Name">face</string>
|
||||
<Content name="Texture"><url>rbxasset://textures/face.png</url></Content>
|
||||
<float name="Transparency">0</float>
|
||||
</Properties>
|
||||
</Item>
|
||||
<Item class="Attachment" referent="RBX94E86BA569B64785B5D8F3F9C1C9D4F8">
|
||||
<Properties>
|
||||
<CoordinateFrame name="CFrame">
|
||||
<X>0</X>
|
||||
<Y>0.600000024</Y>
|
||||
<Z>0</Z>
|
||||
<R00>1</R00>
|
||||
<R01>0</R01>
|
||||
<R02>0</R02>
|
||||
<R10>0</R10>
|
||||
<R11>1</R11>
|
||||
<R12>0</R12>
|
||||
<R20>0</R20>
|
||||
<R21>0</R21>
|
||||
<R22>1</R22>
|
||||
</CoordinateFrame>
|
||||
<string name="Name">HairAttachment</string>
|
||||
</Properties>
|
||||
</Item>
|
||||
<Item class="Attachment" referent="RBX378A74DCC4AA4A2598AA40FF503FD481">
|
||||
<Properties>
|
||||
<CoordinateFrame name="CFrame">
|
||||
<X>0</X>
|
||||
<Y>0.600000024</Y>
|
||||
<Z>0</Z>
|
||||
<R00>1</R00>
|
||||
<R01>0</R01>
|
||||
<R02>0</R02>
|
||||
<R10>0</R10>
|
||||
<R11>1</R11>
|
||||
<R12>0</R12>
|
||||
<R20>0</R20>
|
||||
<R21>0</R21>
|
||||
<R22>1</R22>
|
||||
</CoordinateFrame>
|
||||
<string name="Name">HatAttachment</string>
|
||||
</Properties>
|
||||
</Item>
|
||||
<Item class="Attachment" referent="RBX99DFBABC62D2465A8C279BF27A84727A">
|
||||
<Properties>
|
||||
<CoordinateFrame name="CFrame">
|
||||
<X>0</X>
|
||||
<Y>0</Y>
|
||||
<Z>-0.600000024</Z>
|
||||
<R00>1</R00>
|
||||
<R01>0</R01>
|
||||
<R02>0</R02>
|
||||
<R10>0</R10>
|
||||
<R11>1</R11>
|
||||
<R12>0</R12>
|
||||
<R20>0</R20>
|
||||
<R21>0</R21>
|
||||
<R22>1</R22>
|
||||
</CoordinateFrame>
|
||||
<string name="Name">FaceFrontAttachment</string>
|
||||
</Properties>
|
||||
</Item>
|
||||
<Item class="Attachment" referent="RBX1D688DF966C84BC7B8EA35A8C51B3A3E">
|
||||
<Properties>
|
||||
<CoordinateFrame name="CFrame">
|
||||
<X>0</X>
|
||||
<Y>0</Y>
|
||||
<Z>0</Z>
|
||||
<R00>1</R00>
|
||||
<R01>0</R01>
|
||||
<R02>0</R02>
|
||||
<R10>0</R10>
|
||||
<R11>1</R11>
|
||||
<R12>0</R12>
|
||||
<R20>0</R20>
|
||||
<R21>0</R21>
|
||||
<R22>1</R22>
|
||||
</CoordinateFrame>
|
||||
<string name="Name">FaceCenterAttachment</string>
|
||||
</Properties>
|
||||
</Item>
|
||||
</Item>
|
||||
<Item class="Part" referent="RBX4">
|
||||
<Properties>
|
||||
<bool name="Anchored">false</bool>
|
||||
<float name="BackParamA">-0.5</float>
|
||||
<float name="BackParamB">0.5</float>
|
||||
<token name="BackSurface">0</token>
|
||||
<token name="BackSurfaceInput">0</token>
|
||||
<float name="BottomParamA">-0.5</float>
|
||||
<float name="BottomParamB">0.5</float>
|
||||
<token name="BottomSurface">4</token>
|
||||
<token name="BottomSurfaceInput">0</token>
|
||||
<int name="BrickColor">194</int>
|
||||
<CoordinateFrame name="CFrame">
|
||||
<X>0</X>
|
||||
<Y>18</Y>
|
||||
<Z>22.5</Z>
|
||||
<R00>-1</R00>
|
||||
<R01>0</R01>
|
||||
<R02>-0</R02>
|
||||
<R10>-0</R10>
|
||||
<R11>1</R11>
|
||||
<R12>-0</R12>
|
||||
<R20>-0</R20>
|
||||
<R21>0</R21>
|
||||
<R22>-1</R22>
|
||||
</CoordinateFrame>
|
||||
<bool name="CanCollide">true</bool>
|
||||
<PhysicalProperties name="CustomPhysicalProperties">
|
||||
<CustomPhysics>false</CustomPhysics>
|
||||
</PhysicalProperties>
|
||||
<float name="Elasticity">0.5</float>
|
||||
<float name="Friction">0.300000012</float>
|
||||
<float name="FrontParamA">-0.5</float>
|
||||
<float name="FrontParamB">0.5</float>
|
||||
<token name="FrontSurface">0</token>
|
||||
<token name="FrontSurfaceInput">0</token>
|
||||
<float name="LeftParamA">0</float>
|
||||
<float name="LeftParamB">0</float>
|
||||
<token name="LeftSurface">2</token>
|
||||
<token name="LeftSurfaceInput">0</token>
|
||||
<bool name="Locked">true</bool>
|
||||
<token name="Material">256</token>
|
||||
<string name="Name">Torso</string>
|
||||
<float name="Reflectance">0</float>
|
||||
<float name="RightParamA">0</float>
|
||||
<float name="RightParamB">0</float>
|
||||
<token name="RightSurface">2</token>
|
||||
<token name="RightSurfaceInput">0</token>
|
||||
<Vector3 name="RotVelocity">
|
||||
<X>0</X>
|
||||
<Y>0</Y>
|
||||
<Z>0</Z>
|
||||
</Vector3>
|
||||
<float name="TopParamA">-0.5</float>
|
||||
<float name="TopParamB">0.5</float>
|
||||
<token name="TopSurface">3</token>
|
||||
<token name="TopSurfaceInput">0</token>
|
||||
<float name="Transparency">0</float>
|
||||
<Vector3 name="Velocity">
|
||||
<X>0</X>
|
||||
<Y>0</Y>
|
||||
<Z>0</Z>
|
||||
</Vector3>
|
||||
<token name="formFactorRaw">0</token>
|
||||
<token name="shape">1</token>
|
||||
<Vector3 name="size">
|
||||
<X>2</X>
|
||||
<Y>2</Y>
|
||||
<Z>1</Z>
|
||||
</Vector3>
|
||||
</Properties>
|
||||
<Item class="Decal" referent="RBX5">
|
||||
<Properties>
|
||||
<token name="Face">5</token>
|
||||
<string name="Name">roblox</string>
|
||||
<Content name="Texture"><null></null></Content>
|
||||
<float name="Transparency">0</float>
|
||||
</Properties>
|
||||
</Item>
|
||||
<Item class="Attachment" referent="RBXF18642A6731741EB965F132B28EAF1DC">
|
||||
<Properties>
|
||||
<CoordinateFrame name="CFrame">
|
||||
<X>0</X>
|
||||
<Y>1</Y>
|
||||
<Z>0</Z>
|
||||
<R00>1</R00>
|
||||
<R01>0</R01>
|
||||
<R02>0</R02>
|
||||
<R10>0</R10>
|
||||
<R11>1</R11>
|
||||
<R12>0</R12>
|
||||
<R20>0</R20>
|
||||
<R21>0</R21>
|
||||
<R22>1</R22>
|
||||
</CoordinateFrame>
|
||||
<string name="Name">NeckAttachment</string>
|
||||
</Properties>
|
||||
</Item>
|
||||
<Item class="Attachment" referent="RBXE4C1D4019C4A40DA86329D0548957CE3">
|
||||
<Properties>
|
||||
<CoordinateFrame name="CFrame">
|
||||
<X>0</X>
|
||||
<Y>0</Y>
|
||||
<Z>-0.5</Z>
|
||||
<R00>1</R00>
|
||||
<R01>0</R01>
|
||||
<R02>0</R02>
|
||||
<R10>0</R10>
|
||||
<R11>1</R11>
|
||||
<R12>0</R12>
|
||||
<R20>0</R20>
|
||||
<R21>0</R21>
|
||||
<R22>1</R22>
|
||||
</CoordinateFrame>
|
||||
<string name="Name">BodyFrontAttachment</string>
|
||||
</Properties>
|
||||
</Item>
|
||||
<Item class="Attachment" referent="RBX9A29D0ACFCB045FE95734B1973F9F3DA">
|
||||
<Properties>
|
||||
<CoordinateFrame name="CFrame">
|
||||
<X>0</X>
|
||||
<Y>0</Y>
|
||||
<Z>0.5</Z>
|
||||
<R00>1</R00>
|
||||
<R01>0</R01>
|
||||
<R02>0</R02>
|
||||
<R10>0</R10>
|
||||
<R11>1</R11>
|
||||
<R12>0</R12>
|
||||
<R20>0</R20>
|
||||
<R21>0</R21>
|
||||
<R22>1</R22>
|
||||
</CoordinateFrame>
|
||||
<string name="Name">BodyBackAttachment</string>
|
||||
</Properties>
|
||||
</Item>
|
||||
<Item class="Attachment" referent="RBXB02E7106C39E485995A68DB8B3662D6A">
|
||||
<Properties>
|
||||
<CoordinateFrame name="CFrame">
|
||||
<X>-1</X>
|
||||
<Y>1</Y>
|
||||
<Z>0</Z>
|
||||
<R00>1</R00>
|
||||
<R01>0</R01>
|
||||
<R02>0</R02>
|
||||
<R10>0</R10>
|
||||
<R11>1</R11>
|
||||
<R12>0</R12>
|
||||
<R20>0</R20>
|
||||
<R21>0</R21>
|
||||
<R22>1</R22>
|
||||
</CoordinateFrame>
|
||||
<string name="Name">LeftCollarAttachment</string>
|
||||
</Properties>
|
||||
</Item>
|
||||
<Item class="Attachment" referent="RBX68757F07EBFA45A8BBC77405BF28AD4A">
|
||||
<Properties>
|
||||
<CoordinateFrame name="CFrame">
|
||||
<X>1</X>
|
||||
<Y>1</Y>
|
||||
<Z>0</Z>
|
||||
<R00>1</R00>
|
||||
<R01>0</R01>
|
||||
<R02>0</R02>
|
||||
<R10>0</R10>
|
||||
<R11>1</R11>
|
||||
<R12>0</R12>
|
||||
<R20>0</R20>
|
||||
<R21>0</R21>
|
||||
<R22>1</R22>
|
||||
</CoordinateFrame>
|
||||
<string name="Name">RightCollarAttachment</string>
|
||||
</Properties>
|
||||
</Item>
|
||||
<Item class="Attachment" referent="RBXAE8F55F8248748C0B3B008E176195348">
|
||||
<Properties>
|
||||
<CoordinateFrame name="CFrame">
|
||||
<X>0</X>
|
||||
<Y>-1</Y>
|
||||
<Z>-0.5</Z>
|
||||
<R00>1</R00>
|
||||
<R01>0</R01>
|
||||
<R02>0</R02>
|
||||
<R10>0</R10>
|
||||
<R11>1</R11>
|
||||
<R12>0</R12>
|
||||
<R20>0</R20>
|
||||
<R21>0</R21>
|
||||
<R22>1</R22>
|
||||
</CoordinateFrame>
|
||||
<string name="Name">WaistFrontAttachment</string>
|
||||
</Properties>
|
||||
</Item>
|
||||
<Item class="Attachment" referent="RBXDBB757C86A6948EE86DA6F8B9A4CBDC0">
|
||||
<Properties>
|
||||
<CoordinateFrame name="CFrame">
|
||||
<X>0</X>
|
||||
<Y>-1</Y>
|
||||
<Z>0</Z>
|
||||
<R00>1</R00>
|
||||
<R01>0</R01>
|
||||
<R02>0</R02>
|
||||
<R10>0</R10>
|
||||
<R11>1</R11>
|
||||
<R12>0</R12>
|
||||
<R20>0</R20>
|
||||
<R21>0</R21>
|
||||
<R22>1</R22>
|
||||
</CoordinateFrame>
|
||||
<string name="Name">WaistCenterAttachment</string>
|
||||
</Properties>
|
||||
</Item>
|
||||
<Item class="Attachment" referent="RBX0CD5ED23664D4ECABBB224F0DAE8542E">
|
||||
<Properties>
|
||||
<CoordinateFrame name="CFrame">
|
||||
<X>0</X>
|
||||
<Y>-1</Y>
|
||||
<Z>0.5</Z>
|
||||
<R00>1</R00>
|
||||
<R01>0</R01>
|
||||
<R02>0</R02>
|
||||
<R10>0</R10>
|
||||
<R11>1</R11>
|
||||
<R12>0</R12>
|
||||
<R20>0</R20>
|
||||
<R21>0</R21>
|
||||
<R22>1</R22>
|
||||
</CoordinateFrame>
|
||||
<string name="Name">WaistBackAttachment</string>
|
||||
</Properties>
|
||||
</Item>
|
||||
</Item>
|
||||
<Item class="Part" referent="RBX6">
|
||||
<Properties>
|
||||
<bool name="Anchored">false</bool>
|
||||
<float name="BackParamA">-0.5</float>
|
||||
<float name="BackParamB">0.5</float>
|
||||
<token name="BackSurface">0</token>
|
||||
<token name="BackSurfaceInput">0</token>
|
||||
<float name="BottomParamA">-0.5</float>
|
||||
<float name="BottomParamB">0.5</float>
|
||||
<token name="BottomSurface">4</token>
|
||||
<token name="BottomSurfaceInput">0</token>
|
||||
<int name="BrickColor">194</int>
|
||||
<CoordinateFrame name="CFrame">
|
||||
<X>1.5</X>
|
||||
<Y>18</Y>
|
||||
<Z>22.5</Z>
|
||||
<R00>-1</R00>
|
||||
<R01>0</R01>
|
||||
<R02>0</R02>
|
||||
<R10>0</R10>
|
||||
<R11>1</R11>
|
||||
<R12>0</R12>
|
||||
<R20>0</R20>
|
||||
<R21>0</R21>
|
||||
<R22>-1</R22>
|
||||
</CoordinateFrame>
|
||||
<bool name="CanCollide">false</bool>
|
||||
<PhysicalProperties name="CustomPhysicalProperties">
|
||||
<CustomPhysics>false</CustomPhysics>
|
||||
</PhysicalProperties>
|
||||
<float name="Elasticity">0.5</float>
|
||||
<float name="Friction">0.300000012</float>
|
||||
<float name="FrontParamA">-0.5</float>
|
||||
<float name="FrontParamB">0.5</float>
|
||||
<token name="FrontSurface">0</token>
|
||||
<token name="FrontSurfaceInput">0</token>
|
||||
<float name="LeftParamA">-0.5</float>
|
||||
<float name="LeftParamB">0.5</float>
|
||||
<token name="LeftSurface">0</token>
|
||||
<token name="LeftSurfaceInput">0</token>
|
||||
<bool name="Locked">true</bool>
|
||||
<token name="Material">256</token>
|
||||
<string name="Name">Left Arm</string>
|
||||
<float name="Reflectance">0</float>
|
||||
<float name="RightParamA">-0.5</float>
|
||||
<float name="RightParamB">0.5</float>
|
||||
<token name="RightSurface">0</token>
|
||||
<token name="RightSurfaceInput">0</token>
|
||||
<Vector3 name="RotVelocity">
|
||||
<X>0</X>
|
||||
<Y>0</Y>
|
||||
<Z>0</Z>
|
||||
</Vector3>
|
||||
<float name="TopParamA">-0.5</float>
|
||||
<float name="TopParamB">0.5</float>
|
||||
<token name="TopSurface">3</token>
|
||||
<token name="TopSurfaceInput">0</token>
|
||||
<float name="Transparency">0</float>
|
||||
<Vector3 name="Velocity">
|
||||
<X>0</X>
|
||||
<Y>0</Y>
|
||||
<Z>0</Z>
|
||||
</Vector3>
|
||||
<token name="formFactorRaw">0</token>
|
||||
<token name="shape">1</token>
|
||||
<Vector3 name="size">
|
||||
<X>1</X>
|
||||
<Y>2</Y>
|
||||
<Z>1</Z>
|
||||
</Vector3>
|
||||
</Properties>
|
||||
<Item class="Attachment" referent="RBX32AAED8CBEAA432B93549F57A8CD264F">
|
||||
<Properties>
|
||||
<CoordinateFrame name="CFrame">
|
||||
<X>0</X>
|
||||
<Y>1.0</Y>
|
||||
<Z>0</Z>
|
||||
<R00>1</R00>
|
||||
<R01>0</R01>
|
||||
<R02>0</R02>
|
||||
<R10>0</R10>
|
||||
<R11>1</R11>
|
||||
<R12>0</R12>
|
||||
<R20>0</R20>
|
||||
<R21>0</R21>
|
||||
<R22>1</R22>
|
||||
</CoordinateFrame>
|
||||
<string name="Name">LeftShoulderAttachment</string>
|
||||
</Properties>
|
||||
</Item>
|
||||
<Item class="Attachment" referent="RBX6E6935175E1C4EA18E576318A7CD28A7">
|
||||
<Properties>
|
||||
<CoordinateFrame name="CFrame">
|
||||
<X>0</X>
|
||||
<Y>-1</Y>
|
||||
<Z>0</Z>
|
||||
<R00>1</R00>
|
||||
<R01>0</R01>
|
||||
<R02>0</R02>
|
||||
<R10>0</R10>
|
||||
<R11>1</R11>
|
||||
<R12>0</R12>
|
||||
<R20>0</R20>
|
||||
<R21>0</R21>
|
||||
<R22>1</R22>
|
||||
</CoordinateFrame>
|
||||
<string name="Name">LeftGripAttachment</string>
|
||||
<BinaryString name="Tags"></BinaryString>
|
||||
<bool name="Visible">false</bool>
|
||||
</Properties>
|
||||
</Item>
|
||||
</Item>
|
||||
<Item class="Part" referent="RBX7">
|
||||
<Properties>
|
||||
<bool name="Anchored">false</bool>
|
||||
<float name="BackParamA">-0.5</float>
|
||||
<float name="BackParamB">0.5</float>
|
||||
<token name="BackSurface">0</token>
|
||||
<token name="BackSurfaceInput">0</token>
|
||||
<float name="BottomParamA">-0.5</float>
|
||||
<float name="BottomParamB">0.5</float>
|
||||
<token name="BottomSurface">4</token>
|
||||
<token name="BottomSurfaceInput">0</token>
|
||||
<int name="BrickColor">194</int>
|
||||
<CoordinateFrame name="CFrame">
|
||||
<X>-1.5</X>
|
||||
<Y>18</Y>
|
||||
<Z>22.5</Z>
|
||||
<R00>-1</R00>
|
||||
<R01>0</R01>
|
||||
<R02>0</R02>
|
||||
<R10>0</R10>
|
||||
<R11>1</R11>
|
||||
<R12>0</R12>
|
||||
<R20>0</R20>
|
||||
<R21>0</R21>
|
||||
<R22>-1</R22>
|
||||
</CoordinateFrame>
|
||||
<bool name="CanCollide">false</bool>
|
||||
<PhysicalProperties name="CustomPhysicalProperties">
|
||||
<CustomPhysics>false</CustomPhysics>
|
||||
</PhysicalProperties>
|
||||
<float name="Elasticity">0.5</float>
|
||||
<float name="Friction">0.300000012</float>
|
||||
<float name="FrontParamA">-0.5</float>
|
||||
<float name="FrontParamB">0.5</float>
|
||||
<token name="FrontSurface">0</token>
|
||||
<token name="FrontSurfaceInput">0</token>
|
||||
<float name="LeftParamA">-0.5</float>
|
||||
<float name="LeftParamB">0.5</float>
|
||||
<token name="LeftSurface">0</token>
|
||||
<token name="LeftSurfaceInput">0</token>
|
||||
<bool name="Locked">true</bool>
|
||||
<token name="Material">256</token>
|
||||
<string name="Name">Right Arm</string>
|
||||
<float name="Reflectance">0</float>
|
||||
<float name="RightParamA">-0.5</float>
|
||||
<float name="RightParamB">0.5</float>
|
||||
<token name="RightSurface">0</token>
|
||||
<token name="RightSurfaceInput">0</token>
|
||||
<Vector3 name="RotVelocity">
|
||||
<X>0</X>
|
||||
<Y>0</Y>
|
||||
<Z>0</Z>
|
||||
</Vector3>
|
||||
<float name="TopParamA">-0.5</float>
|
||||
<float name="TopParamB">0.5</float>
|
||||
<token name="TopSurface">3</token>
|
||||
<token name="TopSurfaceInput">0</token>
|
||||
<float name="Transparency">0</float>
|
||||
<Vector3 name="Velocity">
|
||||
<X>0</X>
|
||||
<Y>0</Y>
|
||||
<Z>0</Z>
|
||||
</Vector3>
|
||||
<token name="formFactorRaw">0</token>
|
||||
<token name="shape">1</token>
|
||||
<Vector3 name="size">
|
||||
<X>1</X>
|
||||
<Y>2</Y>
|
||||
<Z>1</Z>
|
||||
</Vector3>
|
||||
</Properties>
|
||||
<Item class="Attachment" referent="RBX1442A14CF3BB469E8B8A84AEF3ACBA23">
|
||||
<Properties>
|
||||
<CoordinateFrame name="CFrame">
|
||||
<X>0</X>
|
||||
<Y>1.0</Y>
|
||||
<Z>0</Z>
|
||||
<R00>1</R00>
|
||||
<R01>0</R01>
|
||||
<R02>0</R02>
|
||||
<R10>0</R10>
|
||||
<R11>1</R11>
|
||||
<R12>0</R12>
|
||||
<R20>0</R20>
|
||||
<R21>0</R21>
|
||||
<R22>1</R22>
|
||||
</CoordinateFrame>
|
||||
<string name="Name">RightShoulderAttachment</string>
|
||||
</Properties>
|
||||
</Item>
|
||||
<Item class="Attachment" referent="RBX8300B203D1414AC48DE24AAD40EF3254">
|
||||
<Properties>
|
||||
<CoordinateFrame name="CFrame">
|
||||
<X>0</X>
|
||||
<Y>-1</Y>
|
||||
<Z>0</Z>
|
||||
<R00>1</R00>
|
||||
<R01>0</R01>
|
||||
<R02>0</R02>
|
||||
<R10>0</R10>
|
||||
<R11>1</R11>
|
||||
<R12>0</R12>
|
||||
<R20>0</R20>
|
||||
<R21>0</R21>
|
||||
<R22>1</R22>
|
||||
</CoordinateFrame>
|
||||
<string name="Name">RightGripAttachment</string>
|
||||
<BinaryString name="Tags"></BinaryString>
|
||||
<bool name="Visible">false</bool>
|
||||
</Properties>
|
||||
</Item>
|
||||
</Item>
|
||||
<Item class="Part" referent="RBX8">
|
||||
<Properties>
|
||||
<bool name="Anchored">false</bool>
|
||||
<float name="BackParamA">-0.5</float>
|
||||
<float name="BackParamB">0.5</float>
|
||||
<token name="BackSurface">0</token>
|
||||
<token name="BackSurfaceInput">0</token>
|
||||
<float name="BottomParamA">-0.5</float>
|
||||
<float name="BottomParamB">0.5</float>
|
||||
<token name="BottomSurface">0</token>
|
||||
<token name="BottomSurfaceInput">0</token>
|
||||
<int name="BrickColor">194</int>
|
||||
<CoordinateFrame name="CFrame">
|
||||
<X>0.5</X>
|
||||
<Y>16</Y>
|
||||
<Z>22.5</Z>
|
||||
<R00>-1</R00>
|
||||
<R01>0</R01>
|
||||
<R02>-0</R02>
|
||||
<R10>-0</R10>
|
||||
<R11>1</R11>
|
||||
<R12>-0</R12>
|
||||
<R20>-0</R20>
|
||||
<R21>0</R21>
|
||||
<R22>-1</R22>
|
||||
</CoordinateFrame>
|
||||
<bool name="CanCollide">false</bool>
|
||||
<PhysicalProperties name="CustomPhysicalProperties">
|
||||
<CustomPhysics>false</CustomPhysics>
|
||||
</PhysicalProperties>
|
||||
<float name="Elasticity">0.5</float>
|
||||
<float name="Friction">0.300000012</float>
|
||||
<float name="FrontParamA">-0.5</float>
|
||||
<float name="FrontParamB">0.5</float>
|
||||
<token name="FrontSurface">0</token>
|
||||
<token name="FrontSurfaceInput">0</token>
|
||||
<float name="LeftParamA">-0.5</float>
|
||||
<float name="LeftParamB">0.5</float>
|
||||
<token name="LeftSurface">0</token>
|
||||
<token name="LeftSurfaceInput">0</token>
|
||||
<bool name="Locked">true</bool>
|
||||
<token name="Material">256</token>
|
||||
<string name="Name">Left Leg</string>
|
||||
<float name="Reflectance">0</float>
|
||||
<float name="RightParamA">-0.5</float>
|
||||
<float name="RightParamB">0.5</float>
|
||||
<token name="RightSurface">0</token>
|
||||
<token name="RightSurfaceInput">0</token>
|
||||
<Vector3 name="RotVelocity">
|
||||
<X>0</X>
|
||||
<Y>0</Y>
|
||||
<Z>0</Z>
|
||||
</Vector3>
|
||||
<float name="TopParamA">-0.5</float>
|
||||
<float name="TopParamB">0.5</float>
|
||||
<token name="TopSurface">3</token>
|
||||
<token name="TopSurfaceInput">0</token>
|
||||
<float name="Transparency">0</float>
|
||||
<Vector3 name="Velocity">
|
||||
<X>0</X>
|
||||
<Y>0</Y>
|
||||
<Z>0</Z>
|
||||
</Vector3>
|
||||
<token name="formFactorRaw">0</token>
|
||||
<token name="shape">1</token>
|
||||
<Vector3 name="size">
|
||||
<X>1</X>
|
||||
<Y>2</Y>
|
||||
<Z>1</Z>
|
||||
</Vector3>
|
||||
</Properties>
|
||||
<Item class="Attachment" referent="RBX13">
|
||||
<Properties>
|
||||
<CoordinateFrame name="CFrame">
|
||||
<X>0</X>
|
||||
<Y>-1</Y>
|
||||
<Z>0</Z>
|
||||
<R00>1</R00>
|
||||
<R01>0</R01>
|
||||
<R02>0</R02>
|
||||
<R10>0</R10>
|
||||
<R11>1</R11>
|
||||
<R12>0</R12>
|
||||
<R20>0</R20>
|
||||
<R21>0</R21>
|
||||
<R22>1</R22>
|
||||
</CoordinateFrame>
|
||||
<string name="Name">LeftFootAttachment</string>
|
||||
<bool name="Visible">false</bool>
|
||||
</Properties>
|
||||
</Item>
|
||||
</Item>
|
||||
<Item class="Part" referent="RBX9">
|
||||
<Properties>
|
||||
<bool name="Anchored">false</bool>
|
||||
<float name="BackParamA">-0.5</float>
|
||||
<float name="BackParamB">0.5</float>
|
||||
<token name="BackSurface">0</token>
|
||||
<token name="BackSurfaceInput">0</token>
|
||||
<float name="BottomParamA">-0.5</float>
|
||||
<float name="BottomParamB">0.5</float>
|
||||
<token name="BottomSurface">0</token>
|
||||
<token name="BottomSurfaceInput">0</token>
|
||||
<int name="BrickColor">194</int>
|
||||
<CoordinateFrame name="CFrame">
|
||||
<X>-0.5</X>
|
||||
<Y>16</Y>
|
||||
<Z>22.5</Z>
|
||||
<R00>-1</R00>
|
||||
<R01>0</R01>
|
||||
<R02>-0</R02>
|
||||
<R10>-0</R10>
|
||||
<R11>1</R11>
|
||||
<R12>-0</R12>
|
||||
<R20>-0</R20>
|
||||
<R21>0</R21>
|
||||
<R22>-1</R22>
|
||||
</CoordinateFrame>
|
||||
<bool name="CanCollide">false</bool>
|
||||
<PhysicalProperties name="CustomPhysicalProperties">
|
||||
<CustomPhysics>false</CustomPhysics>
|
||||
</PhysicalProperties>
|
||||
<float name="Elasticity">0.5</float>
|
||||
<float name="Friction">0.300000012</float>
|
||||
<float name="FrontParamA">-0.5</float>
|
||||
<float name="FrontParamB">0.5</float>
|
||||
<token name="FrontSurface">0</token>
|
||||
<token name="FrontSurfaceInput">0</token>
|
||||
<float name="LeftParamA">-0.5</float>
|
||||
<float name="LeftParamB">0.5</float>
|
||||
<token name="LeftSurface">0</token>
|
||||
<token name="LeftSurfaceInput">0</token>
|
||||
<bool name="Locked">true</bool>
|
||||
<token name="Material">256</token>
|
||||
<string name="Name">Right Leg</string>
|
||||
<float name="Reflectance">0</float>
|
||||
<float name="RightParamA">-0.5</float>
|
||||
<float name="RightParamB">0.5</float>
|
||||
<token name="RightSurface">0</token>
|
||||
<token name="RightSurfaceInput">0</token>
|
||||
<Vector3 name="RotVelocity">
|
||||
<X>0</X>
|
||||
<Y>0</Y>
|
||||
<Z>0</Z>
|
||||
</Vector3>
|
||||
<float name="TopParamA">-0.5</float>
|
||||
<float name="TopParamB">0.5</float>
|
||||
<token name="TopSurface">3</token>
|
||||
<token name="TopSurfaceInput">0</token>
|
||||
<float name="Transparency">0</float>
|
||||
<Vector3 name="Velocity">
|
||||
<X>0</X>
|
||||
<Y>0</Y>
|
||||
<Z>0</Z>
|
||||
</Vector3>
|
||||
<token name="formFactorRaw">0</token>
|
||||
<token name="shape">1</token>
|
||||
<Vector3 name="size">
|
||||
<X>1</X>
|
||||
<Y>2</Y>
|
||||
<Z>1</Z>
|
||||
</Vector3>
|
||||
</Properties>
|
||||
<Item class="Attachment" referent="RBX14">
|
||||
<Properties>
|
||||
<CoordinateFrame name="CFrame">
|
||||
<X>0</X>
|
||||
<Y>-1</Y>
|
||||
<Z>0</Z>
|
||||
<R00>1</R00>
|
||||
<R01>0</R01>
|
||||
<R02>0</R02>
|
||||
<R10>0</R10>
|
||||
<R11>1</R11>
|
||||
<R12>0</R12>
|
||||
<R20>0</R20>
|
||||
<R21>0</R21>
|
||||
<R22>1</R22>
|
||||
</CoordinateFrame>
|
||||
<string name="Name">RightFootAttachment</string>
|
||||
<bool name="Visible">false</bool>
|
||||
</Properties>
|
||||
</Item>
|
||||
</Item>
|
||||
<Item class="Humanoid" referent="RBX10">
|
||||
<Properties>
|
||||
<token name="DisplayDistanceType">0</token>
|
||||
<float name="HealthDisplayDistance">100</float>
|
||||
<float name="Health_XML">100</float>
|
||||
<float name="HipHeight">0</float>
|
||||
<float name="JumpPower">50</float>
|
||||
<float name="MaxHealth">100</float>
|
||||
<float name="MaxSlopeAngle">89</float>
|
||||
<string name="Name">Humanoid</string>
|
||||
<float name="NameDisplayDistance">100</float>
|
||||
<token name="NameOcclusion">2</token>
|
||||
<float name="WalkSpeed">16</float>
|
||||
</Properties>
|
||||
</Item>
|
||||
<Item class="Part" referent="RBX11">
|
||||
<Properties>
|
||||
<bool name="Anchored">false</bool>
|
||||
<float name="BackParamA">-0.5</float>
|
||||
<float name="BackParamB">0.5</float>
|
||||
<token name="BackSurface">0</token>
|
||||
<token name="BackSurfaceInput">0</token>
|
||||
<float name="BottomParamA">-0.5</float>
|
||||
<float name="BottomParamB">0.5</float>
|
||||
<token name="BottomSurface">0</token>
|
||||
<token name="BottomSurfaceInput">0</token>
|
||||
<int name="BrickColor">194</int>
|
||||
<CoordinateFrame name="CFrame">
|
||||
<X>0</X>
|
||||
<Y>18</Y>
|
||||
<Z>22.5</Z>
|
||||
<R00>-1</R00>
|
||||
<R01>0</R01>
|
||||
<R02>-0</R02>
|
||||
<R10>-0</R10>
|
||||
<R11>1</R11>
|
||||
<R12>-0</R12>
|
||||
<R20>-0</R20>
|
||||
<R21>0</R21>
|
||||
<R22>-1</R22>
|
||||
</CoordinateFrame>
|
||||
<bool name="CanCollide">false</bool>
|
||||
<PhysicalProperties name="CustomPhysicalProperties">
|
||||
<CustomPhysics>false</CustomPhysics>
|
||||
</PhysicalProperties>
|
||||
<float name="Elasticity">0.5</float>
|
||||
<float name="Friction">0.300000012</float>
|
||||
<float name="FrontParamA">-0.5</float>
|
||||
<float name="FrontParamB">0.5</float>
|
||||
<token name="FrontSurface">0</token>
|
||||
<token name="FrontSurfaceInput">0</token>
|
||||
<float name="LeftParamA">0</float>
|
||||
<float name="LeftParamB">0</float>
|
||||
<token name="LeftSurface">0</token>
|
||||
<token name="LeftSurfaceInput">0</token>
|
||||
<bool name="Locked">true</bool>
|
||||
<token name="Material">256</token>
|
||||
<string name="Name">HumanoidRootPart</string>
|
||||
<float name="Reflectance">0</float>
|
||||
<float name="RightParamA">0</float>
|
||||
<float name="RightParamB">0</float>
|
||||
<token name="RightSurface">0</token>
|
||||
<token name="RightSurfaceInput">0</token>
|
||||
<Vector3 name="RotVelocity">
|
||||
<X>0</X>
|
||||
<Y>0</Y>
|
||||
<Z>0</Z>
|
||||
</Vector3>
|
||||
<float name="TopParamA">-0.5</float>
|
||||
<float name="TopParamB">0.5</float>
|
||||
<token name="TopSurface">0</token>
|
||||
<token name="TopSurfaceInput">0</token>
|
||||
<float name="Transparency">1</float>
|
||||
<Vector3 name="Velocity">
|
||||
<X>0</X>
|
||||
<Y>0</Y>
|
||||
<Z>0</Z>
|
||||
</Vector3>
|
||||
<token name="formFactorRaw">0</token>
|
||||
<token name="shape">1</token>
|
||||
<Vector3 name="size">
|
||||
<X>2</X>
|
||||
<Y>2</Y>
|
||||
<Z>1</Z>
|
||||
</Vector3>
|
||||
</Properties>
|
||||
<Item class="Attachment" referent="RBX12">
|
||||
<Properties>
|
||||
<CoordinateFrame name="CFrame">
|
||||
<X>0</X>
|
||||
<Y>0</Y>
|
||||
<Z>0</Z>
|
||||
<R00>1</R00>
|
||||
<R01>0</R01>
|
||||
<R02>0</R02>
|
||||
<R10>0</R10>
|
||||
<R11>1</R11>
|
||||
<R12>0</R12>
|
||||
<R20>0</R20>
|
||||
<R21>0</R21>
|
||||
<R22>1</R22>
|
||||
</CoordinateFrame>
|
||||
<string name="Name">RootAttachment</string>
|
||||
<bool name="Visible">false</bool>
|
||||
</Properties>
|
||||
</Item>
|
||||
</Item>
|
||||
</Item>
|
||||
</roblox>
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,366 @@
|
||||
<roblox xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.roblox.com/roblox.xsd" version="4">
|
||||
<External>null</External>
|
||||
<External>nil</External>
|
||||
<Item class="Script" referent="RBXf11428b7b777457c8d872c64386aa070">
|
||||
<Properties>
|
||||
<bool name="Disabled">false</bool>
|
||||
<Content name="LinkedSource"><null></null></Content>
|
||||
<string name="Name">Sound</string>
|
||||
<string name="ScriptGuid"></string>
|
||||
<ProtectedString name="Source"><![CDATA[--[[
|
||||
Author: @spotco
|
||||
This script creates sounds which are placed under the character head.
|
||||
These sounds are used by the "LocalSound" script.
|
||||
|
||||
To modify this script, copy it to your "StarterPlayer/StarterCharacterScripts" folder keeping the same script name ("Sound").
|
||||
The default Sound script loaded for every character will then be replaced with your copy of the script.
|
||||
]]--
|
||||
|
||||
function CreateNewSound(name, id, looped, pitch, parent)
|
||||
local sound = Instance.new("Sound")
|
||||
sound.SoundId = id
|
||||
sound.Name = name
|
||||
sound.archivable = false
|
||||
sound.Parent = parent
|
||||
sound.Pitch = pitch
|
||||
sound.Looped = looped
|
||||
|
||||
sound.MinDistance = 5
|
||||
sound.MaxDistance = 150
|
||||
sound.Volume = 0.65
|
||||
|
||||
return sound
|
||||
end
|
||||
|
||||
local head = script.Parent:FindFirstChild("Head")
|
||||
if head == nil then
|
||||
error("Sound script parent has no child Head.")
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
CreateNewSound("GettingUp", "rbxasset://sounds/action_get_up.mp3", false, 1, head)
|
||||
CreateNewSound("Died", "rbxasset://sounds/uuhhh.mp3", false, 1, head)
|
||||
CreateNewSound("FreeFalling", "rbxasset://sounds/action_falling.mp3", true, 1, head)
|
||||
CreateNewSound("Jumping", "rbxasset://sounds/action_jump.mp3", false, 1, head)
|
||||
CreateNewSound("Landing", "rbxasset://sounds/action_jump_land.mp3", false, 1, head)
|
||||
CreateNewSound("Splash", "rbxasset://sounds/impact_water.mp3", false, 1, head)
|
||||
CreateNewSound("Running", "rbxasset://sounds/action_footsteps_plastic.mp3", true, 1.85, head)
|
||||
CreateNewSound("Swimming", "rbxasset://sounds/action_swim.mp3", true, 1.6, head)
|
||||
CreateNewSound("Climbing", "rbxasset://sounds/action_footsteps_plastic.mp3", true, 1, head)]]></ProtectedString>
|
||||
</Properties>
|
||||
<Item class="LocalScript" referent="RBXcf674087fdd94888aaa89ff050d72c40">
|
||||
<Properties>
|
||||
<bool name="Disabled">false</bool>
|
||||
<Content name="LinkedSource"><null></null></Content>
|
||||
<string name="Name">LocalSound</string>
|
||||
<string name="ScriptGuid"></string>
|
||||
<ProtectedString name="Source"><![CDATA[--[[
|
||||
Author: @spotco
|
||||
This script runs locally for the player of the given humanoid.
|
||||
This script triggers humanoid sound play/pause actions locally.
|
||||
|
||||
The Playing/TimePosition properties of Sound objects bypass FilteringEnabled, so this triggers the sound
|
||||
immediately for the player and is replicated to all other players.
|
||||
|
||||
This script is optimized to reduce network traffic through minimizing the amount of property replication.
|
||||
]]--
|
||||
|
||||
--All sounds are referenced by this ID
|
||||
local SFX = {
|
||||
Died = 0;
|
||||
Running = 1;
|
||||
Swimming = 2;
|
||||
Climbing = 3,
|
||||
Jumping = 4;
|
||||
GettingUp = 5;
|
||||
FreeFalling = 6;
|
||||
FallingDown = 7;
|
||||
Landing = 8;
|
||||
Splash = 9;
|
||||
}
|
||||
|
||||
local Humanoid = nil
|
||||
local Head = nil
|
||||
|
||||
--SFX ID to Sound object
|
||||
local Sounds = {}
|
||||
|
||||
do
|
||||
local Figure = script.Parent.Parent
|
||||
Head = Figure:WaitForChild("Head")
|
||||
while not Humanoid do
|
||||
for _,NewHumanoid in pairs(Figure:GetChildren()) do
|
||||
if NewHumanoid:IsA("Humanoid") then
|
||||
Humanoid = NewHumanoid
|
||||
break
|
||||
end
|
||||
end
|
||||
Figure.ChildAdded:wait()
|
||||
end
|
||||
|
||||
Sounds[SFX.Died] = Head:WaitForChild("Died")
|
||||
Sounds[SFX.Running] = Head:WaitForChild("Running")
|
||||
Sounds[SFX.Swimming] = Head:WaitForChild("Swimming")
|
||||
Sounds[SFX.Climbing] = Head:WaitForChild("Climbing")
|
||||
Sounds[SFX.Jumping] = Head:WaitForChild("Jumping")
|
||||
Sounds[SFX.GettingUp] = Head:WaitForChild("GettingUp")
|
||||
Sounds[SFX.FreeFalling] = Head:WaitForChild("FreeFalling")
|
||||
Sounds[SFX.Landing] = Head:WaitForChild("Landing")
|
||||
Sounds[SFX.Splash] = Head:WaitForChild("Splash")
|
||||
end
|
||||
|
||||
local Util
|
||||
Util = {
|
||||
|
||||
--Define linear relationship between (pt1x,pt2x) and (pt2x,pt2y). Evaluate this at x.
|
||||
YForLineGivenXAndTwoPts = function(x,pt1x,pt1y,pt2x,pt2y)
|
||||
--(y - y1)/(x - x1) = m
|
||||
local m = (pt1y - pt2y) / (pt1x - pt2x)
|
||||
--float b = pt1.y - m * pt1.x;
|
||||
local b = (pt1y - m * pt1x)
|
||||
return m * x + b
|
||||
end;
|
||||
|
||||
--Clamps the value of "val" between the "min" and "max"
|
||||
Clamp = function(val,min,max)
|
||||
return math.min(max,math.max(min,val))
|
||||
end;
|
||||
|
||||
--Gets the horizontal (x,z) velocity magnitude of the given part
|
||||
HorizontalSpeed = function(Head)
|
||||
local hVel = Head.Velocity + Vector3.new(0,-Head.Velocity.Y,0)
|
||||
return hVel.magnitude
|
||||
end;
|
||||
|
||||
--Gets the vertical (y) velocity magnitude of the given part
|
||||
VerticalSpeed = function(Head)
|
||||
return math.abs(Head.Velocity.Y)
|
||||
end;
|
||||
|
||||
--Setting Playing/TimePosition values directly result in less network traffic than Play/Pause/Resume/Stop
|
||||
--If these properties are enabled, use them.
|
||||
Play = function(sound)
|
||||
if sound.TimePosition ~= 0 then
|
||||
sound.TimePosition = 0
|
||||
end
|
||||
if not sound.IsPlaying then
|
||||
sound.Playing = true
|
||||
end
|
||||
end;
|
||||
Pause = function(sound)
|
||||
if sound.IsPlaying then
|
||||
sound.Playing = false
|
||||
end
|
||||
end;
|
||||
Resume = function(sound)
|
||||
if not sound.IsPlaying then
|
||||
sound.Playing = true
|
||||
end
|
||||
end;
|
||||
Stop = function(sound)
|
||||
if sound.IsPlaying then
|
||||
sound.Playing = false
|
||||
end
|
||||
if sound.TimePosition ~= 0 then
|
||||
sound.TimePosition = 0
|
||||
end
|
||||
end;
|
||||
}
|
||||
|
||||
do
|
||||
-- List of all active Looped sounds
|
||||
local playingLoopedSounds = {}
|
||||
|
||||
-- Last seen Enum.HumanoidStateType
|
||||
local activeState = nil
|
||||
|
||||
-- Verify and set that "sound" is in "playingLoopedSounds".
|
||||
function setSoundInPlayingLoopedSounds(sound)
|
||||
for i=1, #playingLoopedSounds do
|
||||
if playingLoopedSounds[i] == sound then
|
||||
return
|
||||
end
|
||||
end
|
||||
table.insert(playingLoopedSounds,sound)
|
||||
end
|
||||
|
||||
-- Stop all active looped sounds except parameter "except". If "except" is not passed, all looped sounds will be stopped.
|
||||
function stopPlayingLoopedSoundsExcept(except)
|
||||
for i=#playingLoopedSounds,1,-1 do
|
||||
if playingLoopedSounds[i] ~= except then
|
||||
Util.Pause(playingLoopedSounds[i])
|
||||
table.remove(playingLoopedSounds,i)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Table of Enum.HumanoidStateType to handling function
|
||||
local stateUpdateHandler = {
|
||||
[Enum.HumanoidStateType.Dead] = function()
|
||||
stopPlayingLoopedSoundsExcept()
|
||||
local sound = Sounds[SFX.Died]
|
||||
Util.Play(sound)
|
||||
end;
|
||||
|
||||
[Enum.HumanoidStateType.RunningNoPhysics] = function()
|
||||
stateUpdated(Enum.HumanoidStateType.Running)
|
||||
end;
|
||||
|
||||
[Enum.HumanoidStateType.Running] = function()
|
||||
local sound = Sounds[SFX.Running]
|
||||
stopPlayingLoopedSoundsExcept(sound)
|
||||
|
||||
if Util.HorizontalSpeed(Head) > 0.5 then
|
||||
Util.Resume(sound)
|
||||
setSoundInPlayingLoopedSounds(sound)
|
||||
else
|
||||
stopPlayingLoopedSoundsExcept()
|
||||
end
|
||||
end;
|
||||
|
||||
[Enum.HumanoidStateType.Swimming] = function()
|
||||
if activeState ~= Enum.HumanoidStateType.Swimming and Util.VerticalSpeed(Head) > 0.1 then
|
||||
local splashSound = Sounds[SFX.Splash]
|
||||
splashSound.Volume = Util.Clamp(
|
||||
Util.YForLineGivenXAndTwoPts(
|
||||
Util.VerticalSpeed(Head),
|
||||
100, 0.28,
|
||||
350, 1),
|
||||
0,1)
|
||||
Util.Play(splashSound)
|
||||
end
|
||||
|
||||
do
|
||||
local sound = Sounds[SFX.Swimming]
|
||||
stopPlayingLoopedSoundsExcept(sound)
|
||||
Util.Resume(sound)
|
||||
setSoundInPlayingLoopedSounds(sound)
|
||||
end
|
||||
end;
|
||||
|
||||
[Enum.HumanoidStateType.Climbing] = function()
|
||||
local sound = Sounds[SFX.Climbing]
|
||||
if Util.VerticalSpeed(Head) > 0.1 then
|
||||
Util.Resume(sound)
|
||||
stopPlayingLoopedSoundsExcept(sound)
|
||||
else
|
||||
stopPlayingLoopedSoundsExcept()
|
||||
end
|
||||
setSoundInPlayingLoopedSounds(sound)
|
||||
end;
|
||||
|
||||
[Enum.HumanoidStateType.Jumping] = function()
|
||||
if activeState == Enum.HumanoidStateType.Jumping then
|
||||
return
|
||||
end
|
||||
stopPlayingLoopedSoundsExcept()
|
||||
local sound = Sounds[SFX.Jumping]
|
||||
Util.Play(sound)
|
||||
end;
|
||||
|
||||
[Enum.HumanoidStateType.GettingUp] = function()
|
||||
stopPlayingLoopedSoundsExcept()
|
||||
local sound = Sounds[SFX.GettingUp]
|
||||
Util.Play(sound)
|
||||
end;
|
||||
|
||||
[Enum.HumanoidStateType.Freefall] = function()
|
||||
if activeState == Enum.HumanoidStateType.Freefall then
|
||||
return
|
||||
end
|
||||
local sound = Sounds[SFX.FreeFalling]
|
||||
sound.Volume = 0
|
||||
stopPlayingLoopedSoundsExcept()
|
||||
end;
|
||||
|
||||
[Enum.HumanoidStateType.FallingDown] = function()
|
||||
stopPlayingLoopedSoundsExcept()
|
||||
end;
|
||||
|
||||
[Enum.HumanoidStateType.Landed] = function()
|
||||
stopPlayingLoopedSoundsExcept()
|
||||
if Util.VerticalSpeed(Head) > 75 then
|
||||
local landingSound = Sounds[SFX.Landing]
|
||||
landingSound.Volume = Util.Clamp(
|
||||
Util.YForLineGivenXAndTwoPts(
|
||||
Util.VerticalSpeed(Head),
|
||||
50, 0,
|
||||
100, 1),
|
||||
0,1)
|
||||
Util.Play(landingSound)
|
||||
end
|
||||
end;
|
||||
|
||||
[Enum.HumanoidStateType.Seated] = function()
|
||||
stopPlayingLoopedSoundsExcept()
|
||||
end;
|
||||
}
|
||||
|
||||
-- Handle state event fired or OnChange fired
|
||||
function stateUpdated(state)
|
||||
if stateUpdateHandler[state] ~= nil then
|
||||
stateUpdateHandler[state]()
|
||||
end
|
||||
activeState = state
|
||||
end
|
||||
|
||||
Humanoid.Died:connect( function() stateUpdated(Enum.HumanoidStateType.Dead) end)
|
||||
Humanoid.Running:connect( function() stateUpdated(Enum.HumanoidStateType.Running) end)
|
||||
Humanoid.Swimming:connect( function() stateUpdated(Enum.HumanoidStateType.Swimming) end)
|
||||
Humanoid.Climbing:connect( function() stateUpdated(Enum.HumanoidStateType.Climbing) end)
|
||||
Humanoid.Jumping:connect( function() stateUpdated(Enum.HumanoidStateType.Jumping) end)
|
||||
Humanoid.GettingUp:connect( function() stateUpdated(Enum.HumanoidStateType.GettingUp) end)
|
||||
Humanoid.FreeFalling:connect( function() stateUpdated(Enum.HumanoidStateType.Freefall) end)
|
||||
Humanoid.FallingDown:connect( function() stateUpdated(Enum.HumanoidStateType.FallingDown) end)
|
||||
|
||||
-- required for proper handling of Landed event
|
||||
Humanoid.StateChanged:connect(function(old, new)
|
||||
stateUpdated(new)
|
||||
end)
|
||||
|
||||
|
||||
function onUpdate(stepDeltaSeconds, tickSpeedSeconds)
|
||||
local stepScale = stepDeltaSeconds / tickSpeedSeconds
|
||||
do
|
||||
local sound = Sounds[SFX.FreeFalling]
|
||||
if activeState == Enum.HumanoidStateType.Freefall then
|
||||
if Head.Velocity.Y < 0 and Util.VerticalSpeed(Head) > 75 then
|
||||
Util.Resume(sound)
|
||||
|
||||
--Volume takes 1.1 seconds to go from volume 0 to 1
|
||||
local ANIMATION_LENGTH_SECONDS = 1.1
|
||||
|
||||
local normalizedIncrement = tickSpeedSeconds / ANIMATION_LENGTH_SECONDS
|
||||
sound.Volume = Util.Clamp(sound.Volume + normalizedIncrement * stepScale, 0, 1)
|
||||
else
|
||||
sound.Volume = 0
|
||||
end
|
||||
else
|
||||
Util.Pause(sound)
|
||||
end
|
||||
end
|
||||
|
||||
do
|
||||
local sound = Sounds[SFX.Running]
|
||||
if activeState == Enum.HumanoidStateType.Running then
|
||||
if Util.HorizontalSpeed(Head) < 0.5 then
|
||||
Util.Pause(sound)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local lastTick = tick()
|
||||
local TICK_SPEED_SECONDS = 0.25
|
||||
while true do
|
||||
onUpdate(tick() - lastTick,TICK_SPEED_SECONDS)
|
||||
lastTick = tick()
|
||||
wait(TICK_SPEED_SECONDS)
|
||||
end
|
||||
end
|
||||
]]></ProtectedString>
|
||||
</Properties>
|
||||
</Item>
|
||||
</Item>
|
||||
</roblox>
|
||||
@@ -0,0 +1,664 @@
|
||||
<roblox xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.roblox.com/roblox.xsd" version="4">
|
||||
<External>null</External>
|
||||
<External>nil</External>
|
||||
<Item class="LocalScript" referent="RBXC49238CC391A40B0B08D3C0989F85A53">
|
||||
<Properties>
|
||||
<bool name="Disabled">false</bool>
|
||||
<Content name="LinkedSource"><null></null></Content>
|
||||
<string name="Name">Animate</string>
|
||||
<ProtectedString name="Source"><![CDATA[local Figure = script.Parent
|
||||
local Torso = Figure:WaitForChild("Torso")
|
||||
local RightShoulder = Torso:WaitForChild("Right Shoulder")
|
||||
local LeftShoulder = Torso:WaitForChild("Left Shoulder")
|
||||
local RightHip = Torso:WaitForChild("Right Hip")
|
||||
local LeftHip = Torso:WaitForChild("Left Hip")
|
||||
local Neck = Torso:WaitForChild("Neck")
|
||||
local Humanoid = Figure:WaitForChild("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=180435571", weight = 9 },
|
||||
{ id = "http://www.roblox.com/asset/?id=180435792", weight = 1 }
|
||||
},
|
||||
walk = {
|
||||
{ id = "http://www.roblox.com/asset/?id=180426354", weight = 10 }
|
||||
},
|
||||
run = {
|
||||
{ id = "run.xml", weight = 10 }
|
||||
},
|
||||
jump = {
|
||||
{ id = "http://www.roblox.com/asset/?id=125750702", weight = 10 }
|
||||
},
|
||||
fall = {
|
||||
{ id = "http://www.roblox.com/asset/?id=180436148", weight = 10 }
|
||||
},
|
||||
climb = {
|
||||
{ id = "http://www.roblox.com/asset/?id=180436334", weight = 10 }
|
||||
},
|
||||
sit = {
|
||||
{ id = "http://www.roblox.com/asset/?id=178130996", weight = 10 }
|
||||
},
|
||||
toolnone = {
|
||||
{ id = "http://www.roblox.com/asset/?id=182393478", weight = 10 }
|
||||
},
|
||||
toolslash = {
|
||||
{ id = "http://www.roblox.com/asset/?id=129967390", weight = 10 }
|
||||
-- { id = "slash.xml", weight = 10 }
|
||||
},
|
||||
toollunge = {
|
||||
{ id = "http://www.roblox.com/asset/?id=129967478", weight = 10 }
|
||||
},
|
||||
wave = {
|
||||
{ id = "http://www.roblox.com/asset/?id=128777973", weight = 10 }
|
||||
},
|
||||
point = {
|
||||
{ id = "http://www.roblox.com/asset/?id=128853357", weight = 10 }
|
||||
},
|
||||
dance1 = {
|
||||
{ id = "http://www.roblox.com/asset/?id=182435998", weight = 10 },
|
||||
{ id = "http://www.roblox.com/asset/?id=182491037", weight = 10 },
|
||||
{ id = "http://www.roblox.com/asset/?id=182491065", weight = 10 }
|
||||
},
|
||||
dance2 = {
|
||||
{ id = "http://www.roblox.com/asset/?id=182436842", weight = 10 },
|
||||
{ id = "http://www.roblox.com/asset/?id=182491248", weight = 10 },
|
||||
{ id = "http://www.roblox.com/asset/?id=182491277", weight = 10 }
|
||||
},
|
||||
dance3 = {
|
||||
{ id = "http://www.roblox.com/asset/?id=182436935", weight = 10 },
|
||||
{ id = "http://www.roblox.com/asset/?id=182491368", weight = 10 },
|
||||
{ id = "http://www.roblox.com/asset/?id=182491423", weight = 10 }
|
||||
},
|
||||
laugh = {
|
||||
{ id = "http://www.roblox.com/asset/?id=129423131", weight = 10 }
|
||||
},
|
||||
cheer = {
|
||||
{ id = "http://www.roblox.com/asset/?id=129423030", weight = 10 }
|
||||
},
|
||||
}
|
||||
local dances = {"dance1", "dance2", "dance3"}
|
||||
|
||||
-- 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, dance1 = true, dance2 = true, dance3 = true, laugh = false, cheer = false}
|
||||
|
||||
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.3
|
||||
|
||||
local toolTransitionTime = 0.1
|
||||
local fallTransitionTime = 0.3
|
||||
local jumpMaxLimbVelocity = 0.75
|
||||
|
||||
-- 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
|
||||
|
||||
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.0, 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)
|
||||
currentAnimTrack.Priority = Enum.AnimationPriority.Core
|
||||
|
||||
-- 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, priority)
|
||||
|
||||
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)
|
||||
if priority then
|
||||
toolAnimTrack.Priority = priority
|
||||
end
|
||||
|
||||
-- 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
|
||||
playAnimation("walk", 0.1, Humanoid)
|
||||
if currentAnimInstance and currentAnimInstance.AnimationId == "http://www.roblox.com/asset/?id=180426354" then
|
||||
setAnimationSpeed(speed / 14.5)
|
||||
end
|
||||
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)
|
||||
playAnimation("climb", 0.1, Humanoid)
|
||||
setAnimationSpeed(speed / 12.0)
|
||||
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 > 0 then
|
||||
pose = "Running"
|
||||
else
|
||||
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, Enum.AnimationPriority.Idle)
|
||||
return
|
||||
end
|
||||
|
||||
if (toolAnim == "Slash") then
|
||||
playToolAnimation("toolslash", 0, Humanoid, Enum.AnimationPriority.Action)
|
||||
return
|
||||
end
|
||||
|
||||
if (toolAnim == "Lunge") then
|
||||
playToolAnimation("toollunge", 0, Humanoid, Enum.AnimationPriority.Action)
|
||||
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
|
||||
-- print("Wha " .. pose)
|
||||
stopAllAnimations()
|
||||
amplitude = 0.1
|
||||
frequency = 1
|
||||
setAngles = true
|
||||
end
|
||||
|
||||
if (setAngles) then
|
||||
local desiredAngle = amplitude * math.sin(time * frequency)
|
||||
|
||||
RightShoulder:SetDesiredAngle(desiredAngle + climbFudge)
|
||||
LeftShoulder:SetDesiredAngle(desiredAngle - climbFudge)
|
||||
RightHip:SetDesiredAngle(-desiredAngle)
|
||||
LeftHip:SetDesiredAngle(-desiredAngle)
|
||||
end
|
||||
|
||||
-- Tool Animation handling
|
||||
local tool = getTool()
|
||||
if tool and tool:FindFirstChild("Handle") then
|
||||
|
||||
local 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:GetService("Players").LocalPlayer.Chatted:connect(function(msg)
|
||||
local emote = ""
|
||||
if msg == "/e dance" then
|
||||
emote = dances[math.random(1, #dances)]
|
||||
elseif (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
|
||||
|
||||
end)
|
||||
|
||||
|
||||
-- main program
|
||||
|
||||
-- initialize to idle
|
||||
playAnimation("idle", 0.1, Humanoid)
|
||||
pose = "Standing"
|
||||
|
||||
while Figure.Parent ~= nil do
|
||||
local _, time = wait(0.1)
|
||||
move(time)
|
||||
end
|
||||
|
||||
|
||||
]]></ProtectedString>
|
||||
</Properties>
|
||||
<Item class="StringValue" referent="RBX3D115054235C475E9E23460AF948BD6F">
|
||||
<Properties>
|
||||
<string name="Name">idle</string>
|
||||
<string name="Value"></string>
|
||||
</Properties>
|
||||
<Item class="Animation" referent="RBXDB67065FB85E4931999CB515B5F2012A">
|
||||
<Properties>
|
||||
<Content name="AnimationId"><url>http://www.roblox.com/asset/?id=180435571</url></Content>
|
||||
<string name="Name">Animation1</string>
|
||||
</Properties>
|
||||
<Item class="NumberValue" referent="RBX9C1D89D976924979BDD8B81DA97BE114">
|
||||
<Properties>
|
||||
<string name="Name">Weight</string>
|
||||
<double name="Value">9</double>
|
||||
</Properties>
|
||||
</Item>
|
||||
</Item>
|
||||
<Item class="Animation" referent="RBXEEE171AA4C1C4802A98EA849C0B0A8AC">
|
||||
<Properties>
|
||||
<Content name="AnimationId"><url>http://www.roblox.com/asset/?id=180435792</url></Content>
|
||||
<string name="Name">Animation2</string>
|
||||
</Properties>
|
||||
<Item class="NumberValue" referent="RBX37B140D9414C4473A5F27F7880B0EC4E">
|
||||
<Properties>
|
||||
<string name="Name">Weight</string>
|
||||
<double name="Value">1</double>
|
||||
</Properties>
|
||||
</Item>
|
||||
</Item>
|
||||
</Item>
|
||||
<Item class="StringValue" referent="RBX6B0595F7D6464E039C6C20310AF91669">
|
||||
<Properties>
|
||||
<string name="Name">walk</string>
|
||||
<string name="Value"></string>
|
||||
</Properties>
|
||||
<Item class="Animation" referent="RBX45D6152C54FA4EF7B0F9CBF069550557">
|
||||
<Properties>
|
||||
<Content name="AnimationId"><url>http://www.roblox.com/asset/?id=180426354</url></Content>
|
||||
<string name="Name">WalkAnim</string>
|
||||
</Properties>
|
||||
</Item>
|
||||
</Item>
|
||||
<Item class="StringValue" referent="RBX304A801B2F904AA59F892145C3DA51F4">
|
||||
<Properties>
|
||||
<string name="Name">run</string>
|
||||
<string name="Value"></string>
|
||||
</Properties>
|
||||
<Item class="Animation" referent="RBXA37336981B6E454C90E45A7F01515966">
|
||||
<Properties>
|
||||
<Content name="AnimationId"><url>http://www.roblox.com/asset/?id=180426354</url></Content>
|
||||
<string name="Name">RunAnim</string>
|
||||
</Properties>
|
||||
</Item>
|
||||
</Item>
|
||||
<Item class="StringValue" referent="RBX992310CD075D4083AA3FC397200F0E12">
|
||||
<Properties>
|
||||
<string name="Name">jump</string>
|
||||
<string name="Value"></string>
|
||||
</Properties>
|
||||
<Item class="Animation" referent="RBXDB0FB6EAF0A94640AD7C222F7E4E39F4">
|
||||
<Properties>
|
||||
<Content name="AnimationId"><url>http://www.roblox.com/asset/?id=125750702</url></Content>
|
||||
<string name="Name">JumpAnim</string>
|
||||
</Properties>
|
||||
</Item>
|
||||
</Item>
|
||||
<Item class="StringValue" referent="RBXE784B068E17041EDBE1C80F73A8FB305">
|
||||
<Properties>
|
||||
<string name="Name">climb</string>
|
||||
<string name="Value"></string>
|
||||
</Properties>
|
||||
<Item class="Animation" referent="RBX94C1F5C954294A889B341487BAC89356">
|
||||
<Properties>
|
||||
<Content name="AnimationId"><url>http://www.roblox.com/asset/?id=180436334</url></Content>
|
||||
<string name="Name">ClimbAnim</string>
|
||||
</Properties>
|
||||
</Item>
|
||||
</Item>
|
||||
<Item class="StringValue" referent="RBX40FB7BAC1B514D918FD0D59D70A13401">
|
||||
<Properties>
|
||||
<string name="Name">toolnone</string>
|
||||
<string name="Value"></string>
|
||||
</Properties>
|
||||
<Item class="Animation" referent="RBX6B27C35810754C93915CA4FE34E8EB95">
|
||||
<Properties>
|
||||
<Content name="AnimationId"><url>http://www.roblox.com/asset/?id=182393478</url></Content>
|
||||
<string name="Name">ToolNoneAnim</string>
|
||||
</Properties>
|
||||
</Item>
|
||||
</Item>
|
||||
<Item class="StringValue" referent="RBX9D56FC8B85B240089A73C4C0BF994681">
|
||||
<Properties>
|
||||
<string name="Name">fall</string>
|
||||
<string name="Value"></string>
|
||||
</Properties>
|
||||
<Item class="Animation" referent="RBX0766704DC00944A88D7F0204B7AD2177">
|
||||
<Properties>
|
||||
<Content name="AnimationId"><url>http://www.roblox.com/asset/?id=180436148</url></Content>
|
||||
<string name="Name">FallAnim</string>
|
||||
</Properties>
|
||||
</Item>
|
||||
</Item>
|
||||
<Item class="StringValue" referent="RBXCE77F4BD43F74ECE8CEC4CB497927D27">
|
||||
<Properties>
|
||||
<string name="Name">sit</string>
|
||||
<string name="Value"></string>
|
||||
</Properties>
|
||||
<Item class="Animation" referent="RBXBEBAA19B49FE45FB9D852B2290377C2C">
|
||||
<Properties>
|
||||
<Content name="AnimationId"><url>http://www.roblox.com/asset/?id=178130996</url></Content>
|
||||
<string name="Name">SitAnim</string>
|
||||
</Properties>
|
||||
</Item>
|
||||
</Item>
|
||||
</Item>
|
||||
</roblox>
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,32 @@
|
||||
<roblox xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.roblox.com/roblox.xsd" version="4">
|
||||
<External>null</External>
|
||||
<External>nil</External>
|
||||
<Item class="Script" referent="RBX0">
|
||||
<Properties>
|
||||
<bool name="Disabled">false</bool>
|
||||
<Content name="LinkedSource"><null></null></Content>
|
||||
<string name="Name">Health</string>
|
||||
<string name="ScriptGuid">{EC3A881D-5F49-4644-A69D-FB60F2E59FF2}</string>
|
||||
<ProtectedString name="Source"><![CDATA[-- Gradually regenerates the Humanoid's Health over time.
|
||||
|
||||
local REGEN_RATE = 1/100 -- Regenerate this fraction of MaxHealth per second.
|
||||
local REGEN_STEP = 1 -- Wait this long between each regeneration step.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
local Character = script.Parent
|
||||
local Humanoid = Character:WaitForChild'Humanoid'
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
while true do
|
||||
while Humanoid.Health < Humanoid.MaxHealth do
|
||||
local dt = wait(REGEN_STEP)
|
||||
local dh = dt*REGEN_RATE*Humanoid.MaxHealth
|
||||
Humanoid.Health = math.min(Humanoid.Health + dh, Humanoid.MaxHealth)
|
||||
end
|
||||
Humanoid.HealthChanged:Wait()
|
||||
end]]></ProtectedString>
|
||||
</Properties>
|
||||
</Item>
|
||||
</roblox>
|
||||
Reference in New Issue
Block a user