Advertisement
sIendytubble

become a cat idk

May 17th, 2020
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.80 KB | None | 0 0
  1. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  2. local RealPlayer = Player
  3. local a=RealPlayer;char=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer
  4. mas = owner
  5. player = owner
  6. mouse = player:GetMouse()
  7. char = owner.Character
  8. wait()
  9. coroutine.resume(coroutine.create(function()
  10. while true do
  11. for i,v in pairs(char.Animate:GetChildren()) do
  12. for i,animation in pairs(v:GetChildren()) do
  13. animation.AnimationId = "rbxassetid://0"
  14. dooo = char.Humanoid:LoadAnimation(animation)
  15. dooo:Stop()
  16. end
  17. end
  18. wait(0.0001)
  19. end
  20. end))
  21. Model0 = char
  22. Part1 = char.Torso
  23. SpecialMesh2 = Instance.new("SpecialMesh")
  24. Weld3 = Instance.new("Weld")
  25. Motor6D4 = Instance.new("Motor6D")
  26. Motor6D5 = Instance.new("Motor6D")
  27. Motor6D6 = Instance.new("Motor6D")
  28. Motor6D7 = Instance.new("Motor6D")
  29. Part8 = char.Head
  30. mouse.Button1Down:Connect(function()
  31. Sound9:Play()
  32. end)
  33. Sound9 = Instance.new("Sound")
  34. Part10 = char["Left Arm"]
  35. SpecialMesh11 = Instance.new("SpecialMesh")
  36. Part12 = char["Left Leg"]
  37. SpecialMesh13 = Instance.new("SpecialMesh")
  38. Part14 = char["Right Arm"]
  39. SpecialMesh15 = Instance.new("SpecialMesh")
  40. Part16 = char["Right Leg"]
  41. SpecialMesh17 = Instance.new("SpecialMesh")
  42. Part18 = Instance.new("Part")
  43. SpecialMesh19 = Instance.new("SpecialMesh")
  44. WeldConstraint20 = Instance.new("WeldConstraint")
  45. Humanoid21 = char.Humanoid
  46. Hat22 = Instance.new("Hat")
  47. Part1.Name = "Torso"
  48. Part1.Parent = Model0
  49. Part1.CFrame = CFrame.new(19.217514, 1.32589602, -19.8199348, -0.476602882, -1.40832712e-28, -0.879118741, 2.95492759e-28, 1, 2.10648588e-35, 0.879118741, 2.59773186e-28, -0.476602882)
  50. Part1.Orientation = Vector3.new(0, -118.459999, 0)
  51. Part1.Position = Vector3.new(19.217514, 1.32589602, -19.8199348)
  52. Part1.Rotation = Vector3.new(-180, -61.5400009, 180)
  53. Part1.Color = Color3.new(0.337255, 0.258824, 0.211765)
  54. Part1.Size = Vector3.new(0.541177154, 0.81176573, 2.02941442)
  55. Part1.BottomSurface = Enum.SurfaceType.Smooth
  56. Part1.BrickColor = BrickColor.new("Dirt brown")
  57. Part1.Material = Enum.Material.Granite
  58. Part1.TopSurface = Enum.SurfaceType.Smooth
  59. Part1.brickColor = BrickColor.new("Dirt brown")
  60. Part1.FormFactor = Enum.FormFactor.Custom
  61. Part1.formFactor = Enum.FormFactor.Custom
  62. SpecialMesh2.Parent = Part1
  63. SpecialMesh2.MeshId = "rbxassetid://1485742207"
  64. SpecialMesh2.Scale = Vector3.new(0.0135294292, 0.0135294292, 0.0124470731)
  65. SpecialMesh2.TextureId = "rbxassetid://1485746693"
  66. SpecialMesh2.MeshType = Enum.MeshType.FileMesh
  67. Weld3.Name = "Neck"
  68. Weld3.Parent = Part1
  69. Weld3.C0 = CFrame.new(-2.86277952e-07, -27.0476532, -2.29022362e-06, 1, 2.50387147e-21, -1.16694232e-21, -2.50387147e-21, 1, 9.25738092e-22, 1.16694232e-21, -9.25738092e-22, 1)
  70. Weld3.C1 = CFrame.new(-2.86277952e-07, -27.5076542, 0.744116247, 1, 2.50387147e-21, -1.16694232e-21, -2.50387147e-21, 1, 9.25738092e-22, 1.16694232e-21, -9.25738092e-22, 1)
  71. Weld3.Part0 = Part1
  72. Weld3.Part1 = Part8
  73. Weld3.part1 = Part8
  74. Motor6D4.Name = "Left Hip"
  75. Motor6D4.Parent = Part1
  76. Motor6D4.MaxVelocity = 0.15000000596046
  77. Motor6D4.C0 = CFrame.new(-0.122847214, -0.547675967, 0.651577175, -4.37113883e-08, 0, -1, 0, 1, 0, 1, 0, -4.37113883e-08)
  78. Motor6D4.C1 = CFrame.new(0.0676471442, 0.202941433, -0.108235389, -4.37113883e-08, -1.16027513e-42, -1, 0, 1, -4.22132457e-29, 1, 0, -4.37113883e-08)
  79. Motor6D4.Part0 = Part1
  80. Motor6D4.Part1 = Part12
  81. Motor6D4.part1 = Part12
  82. Motor6D5.Name = "Left Shoulder"
  83. Motor6D5.Parent = Part1
  84. Motor6D5.MaxVelocity = 0.15000000596046
  85. Motor6D5.C0 = CFrame.new(-0.143411949, -0.392355502, -0.354471028, -4.37113883e-08, 0, -1, 0, 1, 0, 1, 0, -4.37113883e-08)
  86. Motor6D5.C1 = CFrame.new(0.0676471442, 0.41941312, 0.0135294162, -4.37113883e-08, -1.05798034e-42, -1, 0, 1, -4.20018027e-29, 1, 0, -4.37113883e-08)
  87. Motor6D5.Part0 = Part1
  88. Motor6D5.Part1 = Part10
  89. Motor6D5.part1 = Part10
  90. Motor6D6.Name = "Right Hip"
  91. Motor6D6.Parent = Part1
  92. Motor6D6.MaxVelocity = 0.15000000596046
  93. Motor6D6.C0 = CFrame.new(0.2613886, -0.547675967, 0.651577175, -4.37113883e-08, 0, 1, 0, 1, 0, -1, 0, -4.37113883e-08)
  94. Motor6D6.C1 = CFrame.new(0.0676471442, 0.202941433, -0.108235389, -4.37113883e-08, -1.16027513e-42, 1, 0, 1, -4.22132457e-29, -1, 0, -4.37113883e-08)
  95. Motor6D6.Part0 = Part1
  96. Motor6D6.Part1 = Part16
  97. Motor6D6.part1 = Part16
  98. Motor6D7.Name = "Right Shoulder"
  99. Motor6D7.Parent = Part1
  100. Motor6D7.MaxVelocity = 0.15000000596046
  101. Motor6D7.C0 = CFrame.new(0.284118503, -0.392355502, -0.354471028, -4.37113883e-08, 0, 1, 0, 1, 0, -1, 0, -4.37113883e-08)
  102. Motor6D7.C1 = CFrame.new(0.0676471591, 0.41941312, 0.0135294162, -4.37113883e-08, -1.05798034e-42, 1, 0, 1, -4.20018027e-29, -1, 0, -4.37113883e-08)
  103. Motor6D7.Part0 = Part1
  104. Motor6D7.Part1 = Part14
  105. Motor6D7.part1 = Part14
  106. Part8.Name = "Head"
  107. Part8.Parent = Model0
  108. Part8.CFrame = CFrame.new(19.8716831, 1.78589702, -19.4652863, -0.476602882, -1.40832712e-28, -0.879118741, 2.95492759e-28, 1, 2.10648588e-35, 0.879118741, 2.59773186e-28, -0.476602882)
  109. Part8.Orientation = Vector3.new(0, -118.459999, 0)
  110. Part8.Position = Vector3.new(19.8716831, 1.78589702, -19.4652863)
  111. Part8.Rotation = Vector3.new(-180, -61.5400009, 180)
  112. Part8.Transparency = 1
  113. Part8.Size = Vector3.new(0.541177154, 0.108235434, 0.541177154)
  114. Part8.BottomSurface = Enum.SurfaceType.Smooth
  115. Part8.TopSurface = Enum.SurfaceType.Smooth
  116. Part8.FormFactor = Enum.FormFactor.Custom
  117. Part8.formFactor = Enum.FormFactor.Custom
  118. Sound9.Name = "Bark"
  119. Sound9.Parent = Part8
  120. Sound9.EmitterSize = 0
  121. Sound9.MinDistance = 0
  122. Sound9.SoundId = "http://www.roblox.com/asset/?id=1091083826"
  123. Sound9.Volume = 1
  124. Part10.Name = "Left Arm"
  125. Part10.Parent = Model0
  126. Part10.CFrame = CFrame.new(19.6416206, 0.514127374, -19.8300915, -0.476602882, -1.60850888e-28, -0.879118741, 2.95492759e-28, 1, 2.10648588e-35, 0.879118741, 2.96697765e-28, -0.476602882)
  127. Part10.Orientation = Vector3.new(0, -118.459999, 0)
  128. Part10.Position = Vector3.new(19.6416206, 0.514127374, -19.8300915)
  129. Part10.Rotation = Vector3.new(-180, -61.5400009, 180)
  130. Part10.Color = Color3.new(0.337255, 0.258824, 0.211765)
  131. Part10.Size = Vector3.new(0.270588577, 1.02823663, 0.270588577)
  132. Part10.BottomSurface = Enum.SurfaceType.Smooth
  133. Part10.BrickColor = BrickColor.new("Dirt brown")
  134. Part10.CanCollide = false
  135. Part10.TopSurface = Enum.SurfaceType.Smooth
  136. Part10.brickColor = BrickColor.new("Dirt brown")
  137. Part10.FormFactor = Enum.FormFactor.Custom
  138. Part10.formFactor = Enum.FormFactor.Custom
  139. SpecialMesh11.Parent = Part10
  140. SpecialMesh11.MeshId = "http://www.roblox.com/asset/?id=257307555"
  141. SpecialMesh11.Offset = Vector3.new(0.0135294292, 0.108235434, 0.405882835)
  142. SpecialMesh11.Scale = Vector3.new(0.541177213, 0.541177213, 0.541177213)
  143. SpecialMesh11.TextureId = "rbxassetid://1486205565"
  144. SpecialMesh11.MeshType = Enum.MeshType.FileMesh
  145. Part12.Name = "Left Leg"
  146. Part12.Parent = Model0
  147. Part12.CFrame = CFrame.new(18.6403389, 0.57527864, -20.3495312, -0.476602882, -1.60951663e-28, -0.879118741, 2.95492759e-28, 1, 2.10648588e-35, 0.879118741, 2.96883642e-28, -0.476602882)
  148. Part12.Orientation = Vector3.new(0, -118.459999, 0)
  149. Part12.Position = Vector3.new(18.6403389, 0.57527864, -20.3495312)
  150. Part12.Rotation = Vector3.new(-180, -61.5400009, 180)
  151. Part12.Color = Color3.new(0.337255, 0.258824, 0.211765)
  152. Part12.Size = Vector3.new(0.270588577, 1.02823663, 0.270588577)
  153. Part12.BottomSurface = Enum.SurfaceType.Smooth
  154. Part12.BrickColor = BrickColor.new("Dirt brown")
  155. Part12.CanCollide = false
  156. Part12.TopSurface = Enum.SurfaceType.Smooth
  157. Part12.brickColor = BrickColor.new("Dirt brown")
  158. Part12.FormFactor = Enum.FormFactor.Custom
  159. Part12.formFactor = Enum.FormFactor.Custom
  160. SpecialMesh13.Parent = Part12
  161. SpecialMesh13.MeshId = "http://www.roblox.com/asset/?id=257316977"
  162. SpecialMesh13.Offset = Vector3.new(-0.0405883007, -0.0541177168, 0)
  163. SpecialMesh13.Scale = Vector3.new(0.541177213, 0.541177213, 0.541177213)
  164. SpecialMesh13.TextureId = "rbxassetid://1486205565"
  165. SpecialMesh13.MeshType = Enum.MeshType.FileMesh
  166. Part14.Name = "Right Arm"
  167. Part14.Parent = Model0
  168. Part14.CFrame = CFrame.new(19.4378586, 0.514127374, -19.4542408, -0.476602882, -1.20814536e-28, -0.879118741, 2.95492759e-28, 1, 2.10648588e-35, 0.879118741, 2.22848608e-28, -0.476602882)
  169. Part14.Orientation = Vector3.new(0, -118.459999, 0)
  170. Part14.Position = Vector3.new(19.4378586, 0.514127374, -19.4542408)
  171. Part14.Rotation = Vector3.new(-180, -61.5400009, 180)
  172. Part14.Color = Color3.new(0.337255, 0.258824, 0.211765)
  173. Part14.Size = Vector3.new(0.270588577, 1.02823663, 0.270588577)
  174. Part14.BottomSurface = Enum.SurfaceType.Smooth
  175. Part14.BrickColor = BrickColor.new("Dirt brown")
  176. Part14.CanCollide = false
  177. Part14.TopSurface = Enum.SurfaceType.Smooth
  178. Part14.brickColor = BrickColor.new("Dirt brown")
  179. Part14.FormFactor = Enum.FormFactor.Custom
  180. Part14.formFactor = Enum.FormFactor.Custom
  181. SpecialMesh15.Parent = Part14
  182. SpecialMesh15.MeshId = "http://www.roblox.com/asset/?id=255485626"
  183. SpecialMesh15.Offset = Vector3.new(-0.0270588584, -0.0270588584, 0)
  184. SpecialMesh15.Scale = Vector3.new(0.541177213, 0.541177213, 0.541177213)
  185. SpecialMesh15.TextureId = "rbxassetid://1486205565"
  186. SpecialMesh15.MeshType = Enum.MeshType.FileMesh
  187. Part16.Name = "Right Leg"
  188. Part16.Parent = Model0
  189. Part16.CFrame = CFrame.new(18.4572105, 0.57527864, -20.0117416, -0.476602882, -1.20713762e-28, -0.879118741, 2.95492759e-28, 1, 2.10648588e-35, 0.879118741, 2.22662731e-28, -0.476602882)
  190. Part16.Orientation = Vector3.new(0, -118.459999, 0)
  191. Part16.Position = Vector3.new(18.4572105, 0.57527864, -20.0117416)
  192. Part16.Rotation = Vector3.new(-180, -61.5400009, 180)
  193. Part16.Color = Color3.new(0.337255, 0.258824, 0.211765)
  194. Part16.Size = Vector3.new(0.270588577, 1.02823663, 0.270588577)
  195. Part16.BottomSurface = Enum.SurfaceType.Smooth
  196. Part16.BrickColor = BrickColor.new("Dirt brown")
  197. Part16.CanCollide = false
  198. Part16.TopSurface = Enum.SurfaceType.Smooth
  199. Part16.brickColor = BrickColor.new("Dirt brown")
  200. Part16.FormFactor = Enum.FormFactor.Custom
  201. Part16.formFactor = Enum.FormFactor.Custom
  202. SpecialMesh17.Parent = Part16
  203. SpecialMesh17.MeshId = "http://www.roblox.com/asset/?id=257317035"
  204. SpecialMesh17.Offset = Vector3.new(0.0405883007, -0.0541177168, 0)
  205. SpecialMesh17.Scale = Vector3.new(0.541177213, 0.541177213, 0.541177213)
  206. SpecialMesh17.TextureId = "rbxassetid://1486205565"
  207. SpecialMesh17.MeshType = Enum.MeshType.FileMesh
  208. Part18.Name = "Tail"
  209. Part18.Parent = Model0
  210. Part18.CFrame = CFrame.new(18.4908447, 1.40913272, -20.3286877, -0.359611541, -0.126505762, -0.924489379, 0.0417008884, 0.9875983, -0.151362568, 0.932172477, -0.0929837003, -0.349876434)
  211. Part18.Orientation = Vector3.new(8.71000004, -110.730003, 2.42000008)
  212. Part18.Position = Vector3.new(18.4908447, 1.40913272, -20.3286877)
  213. Part18.Rotation = Vector3.new(156.610001, -67.5899963, 160.619995)
  214. Part18.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  215. Part18.Size = Vector3.new(0.405882865, 0.541177154, 0.405882865)
  216. Part18.BottomSurface = Enum.SurfaceType.Smooth
  217. Part18.BrickColor = BrickColor.new("Really black")
  218. Part18.TopSurface = Enum.SurfaceType.Smooth
  219. Part18.brickColor = BrickColor.new("Really black")
  220. Part18.FormFactor = Enum.FormFactor.Custom
  221. Part18.formFactor = Enum.FormFactor.Custom
  222. SpecialMesh19.Parent = Part18
  223. SpecialMesh19.MeshId = "rbxassetid://1486120861"
  224. SpecialMesh19.Offset = Vector3.new(0.100000001, 0.389999986, 0.5)
  225. SpecialMesh19.Scale = Vector3.new(0.00350000011, 0.00350000011, 0.00350000011)
  226. SpecialMesh19.TextureId = "rbxassetid://1491398236"
  227. SpecialMesh19.MeshType = Enum.MeshType.FileMesh
  228. WeldConstraint20.Parent = Part18
  229. WeldConstraint20.Part0 = Part18
  230. WeldConstraint20.Part1 = Part1
  231. Humanoid21.Parent = Model0
  232. Humanoid21.LeftLeg = Part12
  233. Humanoid21.NameOcclusion = Enum.NameOcclusion.NoOcclusion
  234. Humanoid21.RightLeg = Part16
  235. Humanoid21.Torso = Part1
  236. Humanoid21.WalkSpeed = 9
  237. Hat22.Name = "NoHat"
  238. Hat22.Parent = Model0
  239. --Made by Luckymaxer
  240.  
  241. Figure = char
  242.  
  243. RunService = game:GetService("RunService")
  244.  
  245.  
  246. Humanoid = Figure:WaitForChild("Humanoid")
  247. Head = Figure:WaitForChild("Head")
  248. Torso = Figure:WaitForChild("Torso")
  249.  
  250. Neck = Torso:WaitForChild("Neck")
  251. LeftShoulder = Motor6D5
  252. RightShoulder = Motor6D7
  253. LeftHip = Motor6D4
  254. RightHip = Motor6D6
  255.  
  256. for i, v in pairs({--[[Neck, ]]LeftShoulder, RightShoulder, LeftHip, RightHip}) do
  257. if v and v.Parent then
  258. v.DesiredAngle = 0
  259. v.CurrentAngle = 0
  260. end
  261. end
  262.  
  263. Pose = "None"
  264. LastPose = Pose
  265. PoseTime = tick()
  266.  
  267. ToolAnimTime = 0
  268.  
  269. function SetPose(pose)
  270. LastPose = Pose
  271. Pose = pose
  272. PoseTime = tick()
  273. end
  274.  
  275. function OnRunning(Speed)
  276. if Speed > 0 then
  277. SetPose("Running")
  278. else
  279. SetPose("Standing")
  280. end
  281. end
  282.  
  283. function OnDied()
  284. SetPose("Dead")
  285. end
  286.  
  287. function OnJumping()
  288. SetPose("Jumping")
  289. end
  290.  
  291. function OnClimbing()
  292. SetPose("Climbing")
  293. end
  294.  
  295. function OnGettingUp()
  296. SetPose("GettingUp")
  297. end
  298.  
  299. function OnFreeFall()
  300. SetPose("FreeFall")
  301. end
  302.  
  303. function OnFallingDown()
  304. SetPose("FallingDown")
  305. end
  306.  
  307. function OnSeated()
  308. SetPose("Seated")
  309. end
  310.  
  311. function OnPlatformStanding()
  312. SetPose("PlatformStanding")
  313. end
  314.  
  315. function OnSwimming(Speed)
  316. return OnRunning(Speed)
  317. end
  318.  
  319. function MoveJump()
  320. RightShoulder.MaxVelocity = 0.15
  321. LeftShoulder.MaxVelocity = 0.15
  322. RightShoulder.DesiredAngle = 0.5
  323. LeftShoulder.DesiredAngle = -0.5
  324. RightHip.DesiredAngle = -0.5
  325. LeftHip.DesiredAngle = 0.5
  326. end
  327.  
  328. function MoveFreeFall()
  329. RightShoulder.MaxVelocity = 0.15
  330. LeftShoulder.MaxVelocity = 0.15
  331. RightShoulder.DesiredAngle = 0.5
  332. LeftShoulder.DesiredAngle = -0.5
  333. RightHip.DesiredAngle = -0.5
  334. LeftHip.DesiredAngle = 0.5
  335. end
  336.  
  337. function MoveSit()
  338. RightShoulder.MaxVelocity = 0.15
  339. LeftShoulder.MaxVelocity = 0.15
  340. RightShoulder.DesiredAngle = (math.pi / 2)
  341. LeftShoulder.DesiredAngle = -(math.pi / 2)
  342. RightHip.DesiredAngle = 1
  343. LeftHip.DesiredAngle = -1
  344. end
  345.  
  346. function GetTool()
  347. for i, v in pairs(Figure:GetChildren()) do
  348. if v:IsA("Tool") then
  349. return v
  350. end
  351. end
  352. end
  353.  
  354. function GetToolAnim(Tool)
  355. for i, v in pairs(Tool:GetChildren()) do
  356. if v:IsA("StringValue") and v.Name == "ToolAnim" then
  357. return v
  358. end
  359. end
  360. return nil
  361. end
  362.  
  363. function AnimateTool()
  364.  
  365. if (ToolAnim == "None") then
  366. return
  367. end
  368.  
  369. if (ToolAnim == "Slash") then
  370. RightShoulder.MaxVelocity = 0.5
  371. RightShoulder.DesiredAngle = 0
  372. return
  373. end
  374.  
  375. if (ToolAnim == "Lunge") then
  376. RightShoulder.MaxVelocity = 0.5
  377. LeftShoulder.MaxVelocity = 0.5
  378. RightHip.MaxVelocity = 0.5
  379. LeftHip.MaxVelocity = 0.5
  380. RightShoulder.DesiredAngle = (math.pi / 2)
  381. LeftShoulder.DesiredAngle = 0
  382. RightHip.DesiredAngle = (math.pi / 2)
  383. LeftHip.DesiredAngle = 1
  384. return
  385. end
  386.  
  387. end
  388.  
  389. function Move(Time)
  390. local LimbAmplitude
  391. local LimbFrequency
  392. local NeckAmplitude
  393. local NeckFrequency
  394. local NeckDesiredAngle
  395.  
  396. if (Pose == "Jumping") then
  397. MoveJump()
  398. return
  399. elseif (Pose == "FreeFall") then
  400. MoveFreeFall()
  401. return
  402. elseif (Pose == "Seated") then
  403. MoveSit()
  404. return
  405. end
  406.  
  407. local ClimbFudge = 0
  408.  
  409. if (Pose == "Running") then
  410. RightShoulder.MaxVelocity = 0.15
  411. LeftShoulder.MaxVelocity = 0.15
  412. LimbAmplitude = 1
  413. LimbFrequency = 9
  414. NeckAmplitude = 0
  415. NeckFrequency = 0
  416. NeckDesiredAngle = 0
  417. --[[if Creator and Creator.Value and Creator.Value:IsA("Player") and Creator.Value.Character then
  418. local CreatorCharacter = Creator.Value.Character
  419. local CreatorHead = CreatorCharacter:FindFirstChild("Head")
  420. if CreatorHead then
  421. local TargetPosition = CreatorHead.Position
  422. local Direction = Torso.CFrame.lookVector
  423. local HeadPosition = Head.Position
  424. NeckDesiredAngle = ((((HeadPosition - TargetPosition).Unit):Cross(Direction)).Y / 4)
  425. end
  426. end]]
  427. elseif (Pose == "Climbing") then
  428. RightShoulder.MaxVelocity = 0.5
  429. LeftShoulder.MaxVelocity = 0.5
  430. LimbAmplitude = 1
  431. LimbFrequency = 9
  432. NeckAmplitude = 0
  433. NeckFrequency = 0
  434. NeckDesiredAngle = 0
  435. ClimbFudge = math.pi
  436. else
  437. LimbAmplitude = 0.1
  438. LimbFrequency = 1
  439. NeckAmplitude = 0.25
  440. NeckFrequency = 1.25
  441. end
  442.  
  443. NeckDesiredAngle = ((not NeckDesiredAngle and (NeckAmplitude * math.sin(Time * NeckFrequency))) or NeckDesiredAngle)
  444. LimbDesiredAngle = (LimbAmplitude * math.sin(Time * LimbFrequency))
  445.  
  446. --Neck.DesiredAngle = NeckDesiredAngle
  447. RightShoulder.DesiredAngle = (LimbDesiredAngle + ClimbFudge)
  448. LeftShoulder.DesiredAngle = (LimbDesiredAngle - ClimbFudge)
  449. RightHip.DesiredAngle = -LimbDesiredAngle
  450. LeftHip.DesiredAngle = -LimbDesiredAngle
  451.  
  452. local Tool = GetTool()
  453.  
  454. if Tool then
  455.  
  456. AnimStringValueObject = GetToolAnim(Tool)
  457.  
  458. if AnimStringValueObject then
  459. ToolAnim = AnimStringValueObject.Value
  460. if AnimStringValueObject and AnimStringValueObject.Parent then
  461. AnimStringValueObject:Destroy()
  462. end
  463. ToolAnimTime = (Time + 0.3)
  464. end
  465.  
  466. if Time > ToolAnimTime then
  467. ToolAnimTime = 0
  468. ToolAnim = "None"
  469. end
  470.  
  471. AnimateTool()
  472.  
  473. else
  474. ToolAnim = "None"
  475. ToolAnimTime = 0
  476. end
  477.  
  478. end
  479.  
  480. Humanoid.Died:connect(OnDied)
  481. Humanoid.Running:connect(OnRunning)
  482. Humanoid.Jumping:connect(OnJumping)
  483. Humanoid.Climbing:connect(OnClimbing)
  484. Humanoid.GettingUp:connect(OnGettingUp)
  485. Humanoid.FreeFalling:connect(OnFreeFall)
  486. Humanoid.FallingDown:connect(OnFallingDown)
  487. Humanoid.Seated:connect(OnSeated)
  488. Humanoid.PlatformStanding:connect(OnPlatformStanding)
  489. Humanoid.Swimming:connect(OnSwimming)
  490.  
  491. Humanoid:ChangeState(Enum.HumanoidStateType.None)
  492.  
  493. RunService.Stepped:connect(function()
  494. local _, Time = wait(0.1)
  495. Move(Time)
  496. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement