SCRIPTCUSTOMIZER

testing

Dec 28th, 2023
16
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.23 KB | None | 0 0
  1. local cmt = {
  2. Angles = function(x,y,z,useRad)
  3. if not useRad then
  4. return CFrame.Angles(x,y,z)
  5. else
  6. return CFrame.Angles(math.rad(x),math.rad(y),math.rad(z))
  7. end
  8. end
  9. }
  10. local imt = {
  11. CreateWeld = function(p1,p2,c0,c1)
  12. c0,c1 = c0 or CFrame.new(0,0,0),c1 or CFrame.new(0,0,0)
  13. local weld = Instance.new("Motor6D",p1)
  14. weld.Part0,weld.Part1 = p1,p2
  15. weld.C0,weld.C1 = c0,c1
  16. return weld
  17. end,
  18. New = function(type,args)
  19. local instance = Instance.new(type)
  20. for i,v in pairs(args) do
  21. pcall(function()
  22. instance[i] = v
  23. end)
  24. end
  25. return instance
  26. end,
  27. Remove = function(instance,time)
  28. time = time or 0
  29. game:GetService("Debris"):AddItem(instance,time)
  30. end
  31. }
  32. local math = setmetatable({random = function(minNum,maxNum,div) div = div or 1 return math.random(minNum * div,maxNum * div)/div end},{__index = math})
  33. local CFrame = setmetatable(cmt,{__index = CFrame})
  34. local Instance = setmetatable(imt,{__index = Instance})
  35.  
  36. local stepped = game:GetService("RunService").Stepped
  37.  
  38. --BasicFunctions
  39. local ins = Instance.new
  40. local v3 = Vector3.new
  41. local cf = CFrame.new
  42. local angles = CFrame.Angles
  43. local rad = math.rad
  44. local huge = math.huge
  45. local cos = math.cos
  46. local sin = math.sin
  47. local tan = math.tan
  48. local ray = Ray.new
  49. local random = math.random
  50. local ud = UDim.new
  51. local ud2 = UDim2.new
  52. local c3 = Color3.new
  53. local rgb = Color3.fromRGB
  54. local bc = BrickColor.new
  55.  
  56. --Variables
  57. local plr = script.Parent.Parent
  58. local plrg = plr.PlayerGui
  59. local char = plr.Character
  60. local h = char.Head
  61. local t = char.Torso
  62. local ra = char["Right Arm"]
  63. local la = char["Left Arm"]
  64. local rl = char["Right Leg"]
  65. local ll = char["Left Leg"]
  66. local rut = char.HumanoidRootPart
  67. local hum = char:FindFirstChildOfClass("Humanoid")
  68. local necno = t.Neck
  69. local rutjno = rut.RootJoint
  70. local rsno = t["Right Shoulder"]
  71. local lsno = t["Left Shoulder"]
  72. local rhno = t["Right Hip"]
  73. local lhno = t["Left Hip"]
  74. --
  75. local change = 1
  76. local sine = 0
  77. local ws = 8
  78. local jp = 35
  79. local songPos = 1
  80. local jok = false
  81. local sprint = false
  82. local sitting = false
  83. local laying = false
  84. local crying = false
  85. local wsGrow = false
  86. local muted = false
  87. local anim = "Idle"
  88. local asset = "rbxassetid://"
  89. local songs = {
  90. 2734040079,
  91. 1179830130,
  92. 152675132,
  93. 1467405749,
  94. 411386717,
  95. 3517565766,
  96. 509308446
  97. }
  98. --
  99. script.Client.Disabled = false
  100. necc0,necc1=cf(0,t.Size.Y/2,0),cf(0,-h.Size.Y/2,0)
  101. rutjc0,rutjc1=cf(0,0,0),cf(0,0,0)
  102. rsc0,rsc1=cf(t.Size.X/2,t.Size.Y/4,0),cf(-ra.Size.X/2,ra.Size.Y/4,0)
  103. lsc0,lsc1=cf(-t.Size.X/2,t.Size.Y/4,0),cf(la.Size.X/2,la.Size.Y/4,0)
  104. rhc0,rhc1=cf(t.Size.X/4,-t.Size.Y/2,0),cf(0,rl.Size.Y/2,0)
  105. lhc0,lhc1=cf(-t.Size.X/4,-t.Size.Y/2,0),cf(0,ll.Size.Y/2,0)
  106. if char:FindFirstChild("Animate") then
  107. char.Animate:Destroy()
  108. end
  109. if hum:FindFirstChildOfClass("Animator") then
  110. hum.Animator:Destroy()
  111. end
  112. --Creating new joints
  113. local nec = ins("Motor6D",t) nec.Name = "Neck" nec.Part0 = t nec.Part1 = h
  114. local rutj = ins("Motor6D",rut) rutj.Name = "RootJoint" rutj.Part0 = t rutj.Part1 = rut
  115. local rs = ins("Motor6D",t) rs.Name = "Right Shoulder" rs.Part0 = t rs.Part1 = ra
  116. local ls = ins("Motor6D",t) ls.Name = "Left Shoulder" ls.Part0 = t ls.Part1 = la
  117. local rh = ins("Motor6D",t) rh.Name = "Right Hip" rh.Part0 = t rh.Part1 = rl
  118. local lh = ins("Motor6D",t) lh.Name = "Left Hip" lh.Part0 = t lh.Part1 = ll
  119. --Removing old joints
  120. necno.Parent = nil
  121. rutjno.Parent = nil
  122. rsno.Parent = nil
  123. lsno.Parent = nil
  124. rhno.Parent = nil
  125. lhno.Parent = nil
  126. --Setting CFrames
  127. nec.C1 = necc1
  128. nec.C0 = necc0
  129. rs.C1 = rsc1
  130. rs.C0 = rsc0
  131. ls.C1 = lsc1
  132. ls.C0 = lsc0
  133. rh.C1 = rhc1
  134. rh.C0 = rhc0
  135. lh.C1 = lhc1
  136. lh.C0 = lhc0
  137. rutj.C1 = rutjc1
  138. rutj.C0 = rutjc0
  139.  
  140. local rem = Instance.New("RemoteEvent",{Name = "ARemote",Parent = char})
  141. local mus = Instance.New("Sound",{Looped = true,Volume = .5,SoundId = asset..songs[songPos],Parent = t})
  142. local vroOm = Instance.New("Sound",{Looped = true,Volume = 7.5,SoundId = asset..2658538628,Parent = t})
  143. if jok then
  144. mus:Play()
  145. end
  146.  
  147. function swait()
  148. stepped:Wait()
  149. end
  150. function rayc(spos,direc,ignore,dist)
  151. return workspace:FindPartOnRayWithIgnoreList(ray(spos,direc.Unit * dist),ignore,false,false)
  152. end
  153. function tween(instance,args,info,playOnCreate)
  154. if instance and args then
  155. playOnCreate = playOnCreate or true
  156. info = info or TweenInfo.new(
  157. 1,
  158. Enum.EasingStyle.Linear,
  159. Enum.EasingDirection.In,
  160. 0,
  161. false,
  162. 0
  163. )
  164. if typeof(info) == "table" then
  165. info = TweenInfo.new(unpack(info))
  166. end
  167. local tween = game:GetService("TweenService"):Create(instance,info,args)
  168. if playOnCreate then
  169. tween:Play()
  170. end
  171. return tween
  172. end
  173. end
  174.  
  175. rem.OnServerEvent:Connect(function(plyr,type,input)
  176. if string.lower(typeof(input)) == "string" then input = string.lower(input) end
  177. if plr ~= plyr then return end
  178. if type == "keyDown" then
  179. if input == "leftcontrol" then
  180. sprint = not sprint
  181. elseif input == "n" then
  182. jok = not jok
  183. elseif input == "z" then
  184. sitting = not sitting
  185. laying = false
  186. crying = false
  187. elseif input == "x" then
  188. sitting = false
  189. laying = not laying
  190. crying = false
  191. elseif input == "c" and plr.UserId == 90745958 then
  192. sitting = false
  193. laying = false
  194. crying = not crying
  195. elseif input == "l" then
  196. songPos = songPos + 1
  197. if songPos > #songs then
  198. songPos = 1
  199. end
  200. mus.SoundId = asset..songs[songPos]
  201. mus:Play()
  202. mus.TimePosition = 0
  203. elseif input == "m" then
  204. muted = not muted
  205. end
  206. elseif type == "keyUp" then
  207.  
  208. end
  209. end)
  210.  
  211. stepped:Connect(function()
  212. sine = sine + change
  213.  
  214. local dir = hum.MoveDirection
  215. if dir.Magnitude == 0 then dir = rut.Velocity/10 end
  216.  
  217. local Ccf = rut.CFrame
  218. local Walktest1 = dir*Ccf.LookVector
  219. local Walktest2 = dir*Ccf.RightVector
  220. local rotfb = Walktest1.X+Walktest1.Z
  221. local rotrl = Walktest2.X+Walktest2.Z
  222.  
  223. local hit,pos,rot = rayc(rut.Position,-rut.CFrame.UpVector,{char},4.5)
  224.  
  225. local verVel = rut.Velocity.y
  226. local horVel = (rut.Velocity * v3(1,0,1)).Magnitude
  227.  
  228. if mus.Parent ~= t then
  229. Instance.Remove(mus)
  230. mus = Instance.New("Sound",{Looped = true,Volume = .5,SoundId = asset..songs[songPos],Parent = t})
  231. mus:Play()
  232. end
  233. if vroOm.Parent ~= t then
  234. Instance.Remove(vroOm)
  235. vroOm = Instance.New("Sound",{Looped = true,Volume = 7.5,SoundId = asset..2658538628,Parent = t})
  236. end
  237. if rotfb > 1 then
  238. rotfb = 1
  239. elseif rotfb < -1 then
  240. rotfb = -1
  241. end
  242. if rotrl > 1 then
  243. rotrl = 1
  244. elseif rotrl < -1 then
  245. rotrl = -1
  246. end
  247.  
  248. if jok then
  249. if not sprint then
  250. ws = 16
  251. else
  252. if not wsGrow then
  253. ws = 6
  254. end
  255. end
  256. jp = 65
  257. if not muted then
  258. mus:Resume()
  259. else
  260. mus:Stop()
  261. end
  262. else
  263. if not sprint then
  264. ws = 8
  265. else
  266. ws = 38
  267. end
  268. jp = 35
  269. mus:Stop()
  270. end
  271.  
  272. hum.WalkSpeed = ws
  273. hum.JumpPower = jp
  274.  
  275. local sn = 0 if plr.Name == "vlad20020" and random(0,1,50) == .6 then sn = random(5,10) end
  276.  
  277. if anim == "walk" and hit then
  278. if not jok then
  279. nec.C1 = nec.C1:Lerp(necc1 * cf(0,0,0) * angles(cos(sine/3) * 5,0,0,true) * angles(-rotfb/15,rotrl/2,0),.2)
  280. rutj.C1 = rutj.C1:Lerp(rutjc1 * cf(0,.2 * cos(sine/3),0) * angles(sin(sine/3) * 2.5,sin(sine/6) * 2.5,0,true) * angles(-rotfb/12.5,0,-rotrl/8.5),.2)
  281. rs.C1 = rs.C1:Lerp(rsc1 * cf(.05 - .05 * cos(sine/3),0,.1 * cos(sine/6) * rotfb) * angles(-10 - sin(sine/6) * 40 * rotfb,-sin(sine/6) * 25 * rotfb,0,true),.2)
  282. ls.C1 = ls.C1:Lerp(lsc1 * cf(-.05 + .05 * cos(sine/3),0,-.1 * cos(sine/6) * rotfb) * angles(-10 + sin(sine/6) * 40 * rotfb,-sin(sine/6) * 25 * rotfb,0,true),.2)
  283. rh.C1 = rh.C1:Lerp(rhc1 * cf(0,.2 * cos(sine/6),.3 * -cos(sine/6)) * angles((7.5 * math.abs(rotfb)) + sin(sine/6) * 40 * rotfb,sin(sine/6) * 5,sin(sine/6) * 40 * rotrl,true),.2)
  284. lh.C1 = lh.C1:Lerp(lhc1 * cf(0,-.2 * cos(sine/6),.3 * cos(sine/6)) * angles((7.5 * math.abs(rotfb)) - sin(sine/6) * 40 * rotfb,sin(sine/6) * 5,-sin(sine/6) * 40 * rotrl,true),.2)
  285. wsGrow = false
  286. vroOm:Stop()
  287. else
  288. nec.C1 = nec.C1:Lerp(necc1 * cf(0,0,0) * angles(sin(sine/5) * 15,sin(sine/10) * 20,0,true) * angles(-rotfb/10,rotrl/2,0),.2)
  289. rutj.C1 = rutj.C1:Lerp(rutjc1 * cf(0,cos(sine/5) * 2.5,0) * angles(0,sin(sine/10) * 20,0,true) * angles(-rotfb/5,0,-rotrl/5),.2)
  290. rs.C1 = rs.C1:Lerp(rsc1 * cf(0,0,sin(sine/10) * 2.5 * rotfb) * angles(-15 + (sin(-sine/10) * 60 * rotfb),(-sin(sine/10) * 20) * rotfb,0,true),.2)
  291. ls.C1 = ls.C1:Lerp(lsc1 * cf(0,0,-sin(sine/10) * 2.5 * rotfb) * angles(-15 + (sin(sine/10) * 60 * rotfb),(-sin(sine/10) * 20) * rotfb,0,true),.2)
  292. rh.C1 = rh.C1:Lerp(rhc1 * cf((sin(sine/10) * 2.5) * rotrl,cos(sine/10) * 2.5,(-sin(sine/10) * 2.5) * rotfb) * angles(6.5 - (-sin(sine/10) * 35) * rotfb,sin(sine/10) * 10,(sin(sine/10) * 35) * rotrl,true),.2)
  293. lh.C1 = lh.C1:Lerp(lhc1 * cf((-sin(sine/10) * 2.5) * rotrl,-cos(sine/10) * 2.5,(sin(sine/10) * 2.5) * rotfb) * angles(6.5 - (sin(sine/10) * 35) * rotfb,sin(sine/10) * 10,(-sin(sine/10) * 35) * rotrl,true),.2)
  294. wsGrow = false
  295. vroOm:Stop()
  296. end
  297. elseif anim == "run" and hit then
  298. if not jok then
  299. nec.C1 = nec.C1:Lerp(necc1 * cf(0,0,0) * angles(cos(sine/3) * 7.5,sin(sine/6) * 5,0,true) * angles(-rotfb/10,rotrl/2,0),.2)
  300. rutj.C1 = rutj.C1:Lerp(rutjc1 * cf(0,.4 * cos(sine/3),0) * angles(sin(sine/3) * 4,sin(sine/6) * 7.5,0,true) * angles(-rotfb/5,0,-rotrl/5),.2)
  301. rs.C1 = rs.C1:Lerp(rsc1 * cf(.1 - .1 * cos(sine/3),0,-.15 - .2 * cos(sine/6) * rotfb) * angles(-15 - sin(sine/6) * 110 * rotfb,-sin(sine/6) * 25 * rotfb,-10,true),.2)
  302. ls.C1 = ls.C1:Lerp(lsc1 * cf(-.1 + .1 * cos(sine/3),0,-.15 +.2 * cos(sine/6) * rotfb) * angles(-15 + sin(sine/6) * 110 * rotfb,-sin(sine/6) * 25 * rotfb,10,true),.2)
  303. rh.C1 = rh.C1:Lerp(rhc1 * cf(0,.5 * cos(sine/6),.75 * -cos(sine/6)) * angles((7.5 * math.abs(rotfb)) + (sin(sine/6) * 80 * rotfb),sin(sine/6) * 15,sin(sine/6) * 60 * rotrl,true),.2)
  304. lh.C1 = lh.C1:Lerp(lhc1 * cf(0,.5 * -cos(sine/6),.75 * cos(sine/6)) * angles((7.5 * math.abs(rotfb)) + (-sin(sine/6) * 80 * rotfb),sin(sine/6) * 15,-sin(sine/6) * 60 * rotrl,true),.2)
  305. wsGrow = false
  306. vroOm:Stop()
  307. else
  308. nec.C1 = nec.C1:Lerp(necc1 * cf(0,0,0) * angles(0,0,0,true) * angles(-rotfb * 1.5,0,0),.2)
  309. rutj.C1 = rutj.C1:Lerp(rutjc1 * cf(0,-math.abs(rotfb * 1.5) + 1 * sin(sine),0) * angles(sin(sine) * 25,0,cos(sine) * 15,true) * angles(-rotfb * 1.5,0,-rotrl * 1.5),.2)
  310. rs.C1 = rs.C1:Lerp(rsc1 * cf(0,0,0) * angles(-sine * 50 * (ws/750) * rotfb,sin(sine) * 200,sine * 50 * (ws/750) * rotrl,true),.2)
  311. ls.C1 = ls.C1:Lerp(lsc1 * cf(0,0,0) * angles(-sine * 50 * (ws/750) * rotfb,sin(sine) * 200,sine * 50 * (ws/750) * rotrl,true),.2)
  312. rh.C1 = rh.C1:Lerp(rhc1 * cf(0,0,1 * sin(sine/5) * 5 * (ws/750)) * angles(sine * 50 * (ws/750) * rotfb,0,sine * 50 * (ws/750) * rotrl,true),.2)
  313. lh.C1 = lh.C1:Lerp(lhc1 * cf(0,0,-1 * sin(sine/5) * 5 * (ws/750)) * angles(sine * 50 * (ws/750) * rotfb,0,sine * 50 * (ws/750) * rotrl,true),.2)
  314. vroOm:Resume()
  315. if vroOm.TimePosition > vroOm.TimeLength -.1 then
  316. vroOm.TimePosition = 8.5
  317. end
  318. if vroOm.TimePosition < .1 then
  319. ws = 6
  320. end
  321. if vroOm.TimePosition < 8.5 then
  322. ws = ws + .01
  323. else
  324. ws = 750
  325. wsGrow = true
  326. end
  327. end
  328. elseif anim == "jump" and not hit then
  329. nec.C1 = nec.C1:Lerp(necc1 * cf(0,0,0) * angles(0,0,0,true),.2)
  330. rutj.C1 = rutj.C1:Lerp(rutjc1 * cf(0,0,0) * angles(0,0,0,true) * angles(-rotfb/5,0,-rotrl/5),.2)
  331. rs.C1 = rs.C1:Lerp(rsc1 * cf(0,0,0) * angles(0,0,0,true),.2)
  332. ls.C1 = ls.C1:Lerp(lsc1 * cf(0,0,0) * angles(0,0,0,true),.2)
  333. rh.C1 = rh.C1:Lerp(rhc1 * cf(0,0,0) * angles(0,0,0,true),.2)
  334. lh.C1 = lh.C1:Lerp(lhc1 * cf(0,0,0) * angles(0,0,0,true),.2)
  335. elseif anim == "fall" and not hit then
  336. nec.C1 = nec.C1:Lerp(necc1 * cf(0,0,0) * angles(0,0,0,true),.2)
  337. rutj.C1 = rutj.C1:Lerp(rutjc1 * cf(0,0,0) * angles(0,0,0,true) * angles(-rotfb/5,0,-rotrl/5),.2)
  338. rs.C1 = rs.C1:Lerp(rsc1 * cf(0,0,0) * angles(sin(sine/10) * 5,cos(sine/10) * 5,0,true),.2)
  339. ls.C1 = ls.C1:Lerp(lsc1 * cf(0,0,0) * angles(-sin(sine/10) * 5,-cos(sine/10) * 5,0,true),.2)
  340. rh.C1 = rh.C1:Lerp(rhc1 * cf(0,0,0) * angles(0,0,0,true),.2)
  341. lh.C1 = lh.C1:Lerp(lhc1 * cf(0,0,0) * angles(0,0,0,true),.2)
  342. elseif anim == "idle" and hit then
  343. if not jok or sitting or laying or crying then
  344. nec.C1 = nec.C1:Lerp(necc1 * cf(0,0,0) * angles(cos(sine/20) * 4,sin(sine/80) * 10,0,true) * angles(random(-sn,sn),random(-sn,sn),random(-sn,sn),true),.2)
  345. rutj.C1 = rutj.C1:Lerp(rutjc1 * cf(sin(sine/80)/20,sin(sine/20)/15,sin(sine/30)/17.5) * angles(sin(sine/20) * .9,sin(sine/60) * 2.25,sin(sine/80) * 2.25,true),.2)
  346. rs.C1 = rs.C1:Lerp(rsc1 * cf(0,sin(sine/20)/15,0) * angles((cos(sine/20) * 4),sin(sine/20) * 1.8,(sin(sine/80) * 2.25) + (cos(sine/20) * 2.25),true),.2)
  347. ls.C1 = ls.C1:Lerp(lsc1 * cf(0,sin(sine/20)/15,0) * angles((cos(sine/20) * 4),-sin(sine/20) * 1.8,(sin(sine/80) * 2.25) + (-cos(sine/20) * 2.25),true),.2)
  348. rh.C1 = rh.C1:Lerp(rhc1 * cf(0,(sin(sine/20)/15) + (sin(sine/80)/25),0) * angles((sin(sine/20) * 1.8) - (sin(sine/30) * 2.25) + (sin(sine/60) * 1.35),sin(sine/60) * 2.25,(sin(sine/80) * 3.25),true),.2)
  349. lh.C1 = lh.C1:Lerp(lhc1 * cf(0,(sin(sine/20)/15) - (sin(sine/80)/25),0) * angles((sin(sine/20) * 1.8) - (sin(sine/30) * 2.25) - (sin(sine/60) * 1.35),sin(sine/60) * 2.25,(sin(sine/80) * 3.25),true),.2)
  350. wsGrow = false
  351. vroOm:Stop()
  352. elseif jok and not sitting and not laying and not crying then
  353. nec.C1 = nec.C1:Lerp(necc1 * cf(0,0,0) * angles(-cos(sine/10) * sin(sine/20) * 45,sin(sine/20) * cos(sine/40) * 30,sin(sine/30) * cos(sine/60) * 20,true),.2)
  354. rutj.C1 = rutj.C1:Lerp(rutjc1 * cf(.25 * sin(sine/30) * cos(sine/60),-.65 + 1 * sin(sine/10) * cos(sine/20),0) * angles(sin(sine/10) * cos(sine/20) * 35,0,sin(sine/30) * cos(sine/60) * 10,true),.2)
  355. rs.C1 = rs.C1:Lerp(rsc1 * cf(0,.25 - .25 * sin(sine/20) * cos(sine/10),.25 * sin(sine/10) * cos(sine/20)) * angles(-105 + sin(sine/20) * cos(sine/10) * 65,sin(sine/20) * cos(sine/60) * 5,sin(sine/10) * cos(sine/20) * 70,true),.2)
  356. ls.C1 = ls.C1:Lerp(lsc1 * cf(0,.25 - .25 * sin(sine/20) * cos(sine/10),.25 * sin(sine/10) * cos(sine/20)) * angles(-105 + sin(sine/20) * cos(sine/10) * 65,sin(sine/20) * cos(sine/60) * 5,sin(sine/10) * cos(sine/20) * -70,true),.2)
  357. rh.C1 = rh.C1:Lerp(rhc1 * cf(0,-.625 + 1 * sin(sine/10) * cos(sine/20),.25 - .5 * sin(sine/10) * cos(sine/20)) * angles(10 + sin(sine/10) * cos(sine/20) * 40,0,sin(sine/30) * cos(sine/60) * 17.5,true),.2)
  358. lh.C1 = lh.C1:Lerp(lhc1 * cf(0,-.625 + 1 * sin(sine/10) * cos(sine/20),.25 - .5 * sin(sine/10) * cos(sine/20)) * angles(10 + sin(sine/10) * cos(sine/20) * 40,0,sin(sine/30) * cos(sine/60) * 17.5,true),.2)
  359. wsGrow = false
  360. vroOm:Stop()
  361. end
  362. end
  363.  
  364. if verVel > 20 then
  365. anim = "jump"
  366. change = 1
  367. nec.C0 = nec.C0:Lerp(necc0 * cf(0,0,0) * angles(5,0,0,true),.2)
  368. rutj.C0 = rutj.C0:Lerp(rutjc0 * cf(0,0,0) * angles(-5,0,0,true),.2)
  369. rs.C0 = rs.C0:Lerp(rsc0 * cf(0,-.15,-.25) * angles(150,10,12.5,true),.2)
  370. ls.C0 = ls.C0:Lerp(lsc0 * cf(0,-.15,-.25) * angles(155,-10,-12.5,true),.2)
  371. rh.C0 = rh.C0:Lerp(rhc0 * cf(0,.5,-.35) * angles(-12.5,0,5,true),.2)
  372. lh.C0 = lh.C0:Lerp(lhc0 * cf(0,.2,-.15) * angles(-2.5,0,-5,true),.2)
  373. elseif verVel < -20 then
  374. anim = "fall"
  375. change = 1
  376. nec.C0 = nec.C0:Lerp(necc0 * cf(0,0,0) * angles(-7.5,0,0,true),.2)
  377. rutj.C0 = rutj.C0:Lerp(rutjc0 * cf(0,0,0) * angles(5,0,0,true),.2)
  378. rs.C0 = rs.C0:Lerp(rsc0 * cf(.25,-.25,0) * angles(0,10,110,true),.2)
  379. ls.C0 = ls.C0:Lerp(lsc0 * cf(-.25,-.25,0) * angles(0,-10,-110,true),.2)
  380. rh.C0 = rh.C0:Lerp(rhc0 * cf(0,.2,-.15) * angles(-2.5,0,5,true),.2)
  381. lh.C0 = lh.C0:Lerp(lhc0 * cf(0,.5,-.35) * angles(-12.5,0,-5,true),.2)
  382. elseif horVel > 5 and verVel > -20 and verVel < 20 then
  383. if not sprint then
  384. anim = "walk"
  385. if not jok then
  386. change = .6
  387. else
  388. change = 1
  389. end
  390. nec.C0 = nec.C0:Lerp(necc0 * cf(0,0,0) * angles(0,0,0,true),.2)
  391. rutj.C0 = rutj.C0:Lerp(rutjc0 * cf(0,0,0) * angles(0,0,0,true),.2)
  392. rs.C0 = rs.C0:Lerp(rsc0 * cf(0,0,0) * angles(0,0,0,true),.2)
  393. ls.C0 = ls.C0:Lerp(lsc0 * cf(0,0,0) * angles(0,0,0,true),.2)
  394. rh.C0 = rh.C0:Lerp(rhc0 * cf(0,0,0) * angles(0,0,0,true),.2)
  395. lh.C0 = lh.C0:Lerp(lhc0 * cf(0,0,0) * angles(0,0,0,true),.2)
  396. else
  397. anim = "run"
  398. if not jok then
  399. change = .9
  400. else
  401. change = 1
  402. end
  403. nec.C0 = nec.C0:Lerp(necc0 * cf(0,0,0) * angles(0,0,0,true),.2)
  404. rutj.C0 = rutj.C0:Lerp(rutjc0 * cf(0,0,0) * angles(0,0,0,true),.2)
  405. rs.C0 = rs.C0:Lerp(rsc0 * cf(0,0,0) * angles(0,0,0,true),.2)
  406. ls.C0 = ls.C0:Lerp(lsc0 * cf(0,0,0) * angles(0,0,0,true),.2)
  407. rh.C0 = rh.C0:Lerp(rhc0 * cf(0,0,0) * angles(0,0,0,true),.2)
  408. lh.C0 = lh.C0:Lerp(lhc0 * cf(0,0,0) * angles(0,0,0,true),.2)
  409. end
  410. elseif horVel < 5 and verVel > -20 and verVel < 20 then
  411. anim = "idle"
  412. change = 1
  413. if not sitting and not laying and not crying then
  414. if not jok then
  415. nec.C0 = nec.C0:Lerp(necc0 * cf(0,0,0) * angles(0,0,0,true),.2)
  416. rutj.C0 = rutj.C0:Lerp(rutjc0 * cf(0,0,0) * angles(0,0,0,true),.2)
  417. rs.C0 = rs.C0:Lerp(rsc0 * cf(0,0,0) * angles(.5,0,-.5,true),.2)
  418. ls.C0 = ls.C0:Lerp(lsc0 * cf(0,0,0) * angles(.5,0,.5,true),.2)
  419. rh.C0 = rh.C0:Lerp(rhc0 * cf(0,0,0) * angles(0,-2.5,2,true),.2)
  420. lh.C0 = lh.C0:Lerp(lhc0 * cf(0,0,0) * angles(0,2.5,-2,true),.2)
  421. else
  422. nec.C0 = nec.C0:Lerp(necc0 * cf(0,0,0) * angles(0,0,0,true),.2)
  423. rutj.C0 = rutj.C0:Lerp(rutjc0 * cf(0,0,0) * angles(0,0,0,true),.2)
  424. rs.C0 = rs.C0:Lerp(rsc0 * cf(0,0,0) * angles(0,0,0,true),.2)
  425. ls.C0 = ls.C0:Lerp(lsc0 * cf(0,0,0) * angles(0,0,0,true),.2)
  426. rh.C0 = rh.C0:Lerp(rhc0 * cf(0,0,0) * angles(0,0,5,true),.2)
  427. lh.C0 = lh.C0:Lerp(lhc0 * cf(0,0,0) * angles(0,0,-5,true),.2)
  428. end
  429. elseif sitting and not laying and not crying then
  430. nec.C0 = nec.C0:Lerp(necc0 * cf(0,0,0) * angles(-20,0,0,true),.2)
  431. rutj.C0 = rutj.C0:Lerp(rutjc0 * cf(0,1.75,0) * angles(-15,0,0,true),.2)
  432. rs.C0 = rs.C0:Lerp(rsc0 * cf(-.1,-.5,.15) * angles(-20,-60,10,true),.2)
  433. ls.C0 = ls.C0:Lerp(lsc0 * cf(0,-.25,-.2) * angles(70,-60,60,true) * angles(40,0,0,true),.2)
  434. rh.C0 = rh.C0:Lerp(rhc0 * cf(0,0,0) * angles(70,7.5,5,true),.2)
  435. lh.C0 = lh.C0:Lerp(lhc0 * cf(0,1.25,-.5) * angles(10,-10,-5,true),.2)
  436. elseif not sitting and laying and not crying then
  437. nec.C0 = nec.C0:Lerp(necc0 * cf(0,0,0) * angles(-35,0,0,true),.2)
  438. rutj.C0 = rutj.C0:Lerp(rutjc0 * cf(0,0,-2.4) * angles(-87.5,0,0,true),.2)
  439. rs.C0 = rs.C0:Lerp(rsc0 * cf(-.1,.75,-.25) * angles(195,0,-65,true) * angles(0,90,0,true),.2)
  440. ls.C0 = ls.C0:Lerp(lsc0 * cf(.125,-.3,-.05) * angles(90,20,85,true) * angles(-30,20,0,true),.2)
  441. rh.C0 = rh.C0:Lerp(rhc0 * cf(0,.25,-1) * angles(-55,20,7.5,true),.2)
  442. lh.C0 = lh.C0:Lerp(lhc0 * cf(0,0,0) * angles(2,-7.5,5,true),.2)
  443. elseif not sitting and not laying and crying then
  444. nec.C0 = nec.C0:Lerp(necc0 * cf(0,0,0) * angles(-80,0,0,true),.2)
  445. rutj.C0 = rutj.C0:Lerp(rutjc0 * cf(0,1.9,0) * angles(10,0,0,true),.2)
  446. rs.C0 = rs.C0:Lerp(rsc0 * cf(-.25,-.475,-.8) * angles(85,0,-80,true) * angles(0,100,0,true),.2)
  447. ls.C0 = ls.C0:Lerp(lsc0 * cf(.25,-.4,-.75) * angles(80,0,85,true) * angles(0,-87.5,0,true),.2)
  448. rh.C0 = rh.C0:Lerp(rhc0 * cf(0,1.85,-.75) * angles(5,-5,-5,true),.2)
  449. lh.C0 = lh.C0:Lerp(lhc0 * cf(0,1.85,-.7) * angles(3.5,5,5,true),.2)
  450. end
  451. end
  452. end)
Add Comment
Please, Sign In to add comment