Advertisement
vL4d_4eVer

Untitled

Jul 27th, 2019
553
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 23.13 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("Weld",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    = owner
  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 danc    = false
  87. local muted=false
  88. local anim    = "Idle"
  89. local asset   = "rbxassetid://"
  90. local songs = {
  91.     2734040079,
  92.     1179830130,
  93.     152675132,
  94.     1467405749,
  95.     411386717,
  96.     3517565766,
  97.     509308446
  98. }
  99. --
  100. local necc0  = cf(0, t.Size.Y/2, 0)
  101. local necc1  = cf(0,-h.Size.Y/2,0)
  102. local rsc0   = cf(t.Size.X/2, t.Size.Y/4, 0)
  103. local rsc1   = cf(-ra.Size.X/2, ra.Size.Y/4, 0)
  104. local lsc0   = cf(-t.Size.X/2, t.Size.Y/4, 0)
  105. local lsc1   = cf(la.Size.X/2, la.Size.Y/4, 0)
  106. local rhc0   = cf(t.Size.X/4,-t.Size.Y/2,0)
  107. local rhc1   = cf(0,rl.Size.Y/2,0)
  108. local lhc0   = cf(-t.Size.X/4,-t.Size.Y/2,0)
  109. local lhc1   = cf(0,ll.Size.Y/2,0)
  110. local rutjc0 = cf(0,0,0)
  111. local rutjc1 = cf(0,0,0)
  112. if char:FindFirstChild("Animate") then
  113. char.Animate:Destroy()
  114. end
  115. if hum:FindFirstChildOfClass("Animator") then
  116. hum.Animator:Destroy()
  117. end
  118. --Creating new joints
  119. local nec = ins("Motor6D",t) nec.Name = "Neck" nec.Part0 = t nec.Part1 = h
  120. local rutj = ins("Motor6D",rut) rutj.Name = "RootJoint" rutj.Part0 = t rutj.Part1 = rut
  121. local rs = ins("Motor6D",t) rs.Name = "Right Shoulder" rs.Part0 = t rs.Part1 = ra
  122. local ls = ins("Motor6D",t) ls.Name = "Left Shoulder" ls.Part0 = t ls.Part1 = la
  123. local rh = ins("Motor6D",t) rh.Name = "Right Hip" rh.Part0 = t rh.Part1 = rl
  124. local lh = ins("Motor6D",t) lh.Name = "Left Hip" lh.Part0 = t lh.Part1 = ll
  125. --Removing old joints
  126. necno.Parent = nil
  127. rutjno.Parent = nil
  128. rsno.Parent = nil
  129. lsno.Parent = nil
  130. rhno.Parent = nil
  131. lhno.Parent = nil
  132. --Setting CFrames
  133. nec.C1 = necc1
  134. nec.C0 = necc0
  135. rs.C1 = rsc1
  136. rs.C0 = rsc0
  137. ls.C1 = lsc1
  138. ls.C0 = lsc0
  139. rh.C1 = rhc1
  140. rh.C0 = rhc0
  141. lh.C1 = lhc1
  142. lh.C0 = lhc0
  143. rutj.C1 = rutjc1
  144. rutj.C0 = rutjc0
  145.  
  146. local rem = Instance.New("RemoteEvent",{Name = "ARemote",Parent = char})
  147. local mus = Instance.New("Sound",{Looped = true,Volume = .5,SoundId = asset..songs[songPos],Parent = t})
  148. local vroOm = Instance.New("Sound",{Looped = true,Volume = 7.5,SoundId = asset..2658538628,Parent = t})
  149. if jok then
  150.     mus:Play()
  151. end
  152.  
  153. function swait()
  154.     stepped:Wait()
  155. end
  156. function rayc(spos,direc,ignore,dist)
  157.     return workspace:FindPartOnRayWithIgnoreList(ray(spos,direc.Unit * dist),ignore,false,false)
  158. end
  159. function tween(instance,args,info,playOnCreate)
  160.     if instance and args then
  161.         playOnCreate = playOnCreate or true
  162.         info = info or TweenInfo.new(
  163.             1,
  164.             Enum.EasingStyle.Linear,
  165.             Enum.EasingDirection.In,
  166.             0,
  167.             false,
  168.             0
  169.         )
  170.         if typeof(info) == "table" then
  171.             info = TweenInfo.new(unpack(info))
  172.         end
  173.         local tween = game:GetService("TweenService"):Create(instance,info,args)
  174.         if playOnCreate then
  175.             tween:Play()
  176.         end
  177.         return tween
  178.     end
  179. end
  180.  
  181. rem.OnServerEvent:Connect(function(plyr,type,input)
  182.     if string.lower(typeof(input)) == "string" then input = string.lower(input) end
  183.     if plr ~= plyr then return end
  184.     if type == "keyDown" then
  185.         if input == "leftcontrol" then
  186.             sprint = not sprint
  187.         elseif input == "n" then
  188.             jok = not jok
  189.         elseif input == "z" then
  190.             sitting = not sitting
  191.             laying = false
  192.             crying = false
  193.         elseif input == "x" then
  194.             sitting = false
  195.             laying = not laying
  196.             crying = false
  197.         elseif input == "c" and plr.Name == "v_Sado" then
  198.             sitting = false
  199.             laying = false
  200.             crying = not crying
  201.         elseif input == "l" then
  202.             songPos = songPos + 1
  203.             if songPos > #songs then
  204.                 songPos = 1
  205.             end
  206.             mus.SoundId = asset..songs[songPos]
  207.             mus:Play()
  208.             mus.TimePosition = 0
  209.         elseif input == "b" then
  210.             danc = not danc
  211.         elseif input=="m" then
  212.             muted=not muted
  213.         end
  214.     elseif type == "keyUp" then
  215.        
  216.     end
  217. end)
  218.  
  219. local client = NLS([[
  220.     local uis = game:GetService("UserInputService")
  221.     local cf = CFrame.new
  222.     local v3 = Vector3.new
  223.    
  224.     local plr = game:GetService("Players").LocalPlayer
  225.     local char = plr.Character
  226.     local rem = char:WaitForChild("ARemote")
  227.     local h = char.Head
  228.     local rut = char.HumanoidRootPart
  229.     local hum = char:FindFirstChildOfClass("Humanoid")
  230.    
  231.     uis.InputBegan:Connect(function(io,ip)
  232.         if io.UserInputType == Enum.UserInputType.Keyboard and not ip then
  233.             rem:FireServer("keyDown",io.KeyCode.Name)
  234.         end
  235.     end)
  236.     uis.InputChanged:Connect(function(io,ip)
  237.         if io.UserInputType == Enum.UserInputType.Keyboard and not ip then
  238.             rem:FireServer("keyDown",io.KeyCode.Name)
  239.         end
  240.     end)
  241.     uis.InputEnded:Connect(function(io,ip)
  242.         if io.UserInputType == Enum.UserInputType.Keyboard and not ip then
  243.             rem:FireServer("keyUp",io.KeyCode.Name)
  244.         end
  245.     end)
  246.    
  247.     game:GetService("RunService").RenderStepped:Connect(function()
  248.         local off = h.CFrame:toObjectSpace(rut.CFrame * cf(0,1.5,0))
  249.         hum.CameraOffset = hum.CameraOffset:Lerp(v3(off.x,-off.y,-off.z),.1)
  250.     end)
  251. ]],char)
  252.  
  253. stepped:Connect(function()
  254.     sine = sine + change
  255.    
  256.     local dir = hum.MoveDirection
  257.     if dir.Magnitude == 0 then dir = rut.Velocity/10 end
  258.    
  259.     local Ccf         = rut.CFrame
  260.     local Walktest1   = dir*Ccf.LookVector
  261.     local Walktest2   = dir*Ccf.RightVector
  262.     local rotfb       = Walktest1.X+Walktest1.Z
  263.     local rotrl       = Walktest2.X+Walktest2.Z
  264.    
  265.     local hit,pos,rot = rayc(rut.Position,-rut.CFrame.UpVector,{char},4.5)
  266.    
  267.     local verVel      = rut.Velocity.y
  268.     local horVel      = (rut.Velocity * v3(1,0,1)).Magnitude
  269.    
  270.     if mus.Parent ~= t then
  271.         Instance.Remove(mus)
  272.         mus = Instance.New("Sound",{Looped = true,Volume = .5,SoundId = asset..songs[songPos],Parent = t})
  273.         mus:Play()
  274.     end
  275.     if vroOm.Parent ~= t then
  276.         Instance.Remove(vroOm)
  277.         vroOm = Instance.New("Sound",{Looped = true,Volume = 7.5,SoundId = asset..2658538628,Parent = t})
  278.     end
  279.     if rotfb > 1 then
  280.         rotfb = 1
  281.     elseif rotfb < -1 then
  282.         rotfb = -1
  283.     end
  284.     if rotrl > 1 then
  285.         rotrl = 1
  286.     elseif rotrl < -1 then
  287.         rotrl = -1
  288.     end
  289.    
  290.     if jok then
  291.         if not sprint then
  292.             ws = 16
  293.         else
  294.             if not wsGrow then
  295.                 ws = 6
  296.             end
  297.         end
  298.         jp = 65
  299.         if not muted then
  300.             mus:Resume()
  301.         else
  302.             mus:Pause()
  303.         end
  304.     else
  305.         if not sprint then
  306.             ws = 8
  307.         else
  308.             ws = 38
  309.         end
  310.         jp = 35
  311.         mus:Stop()
  312.     end
  313.    
  314.     hum.WalkSpeed = ws
  315.     hum.JumpPower = jp
  316.    
  317.     local sn = 0 if plr.Name == "vlad20020" and random(0,1,50) == .6 then sn = random(5,10) end
  318.    
  319.     if anim == "walk" and hit then
  320.         if not jok then
  321.             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)
  322.             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)
  323.             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)
  324.             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)
  325.             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)
  326.             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)
  327.             wsGrow = false
  328.             vroOm:Stop()
  329.         else
  330.             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)
  331.             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)
  332.             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)
  333.             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)
  334.             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)
  335.             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)
  336.             wsGrow = false
  337.             vroOm:Stop()
  338.         end
  339.     elseif anim == "run" and hit then
  340.         if not jok then
  341.             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)
  342.             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)
  343.             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)
  344.             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)
  345.             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)
  346.             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)
  347.             wsGrow = false
  348.             vroOm:Stop()
  349.         else
  350.             nec.C1 = nec.C1:Lerp(necc1 * cf(0,0,0) * angles(0,0,0,true) * angles(-rotfb * 1.5,0,0),.2)
  351.             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)
  352.             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)
  353.             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)
  354.             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)
  355.             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)
  356.             vroOm:Resume()
  357.             if vroOm.TimePosition > vroOm.TimeLength -.1 then
  358.                 vroOm.TimePosition = 8.5
  359.             end
  360.             if vroOm.TimePosition < .1 then
  361.                 ws = 6
  362.             end
  363.             if vroOm.TimePosition < 8.5 then
  364.                 ws = ws + .01
  365.             else
  366.                 ws = 750
  367.                 wsGrow = true
  368.             end
  369.         end
  370.     elseif anim == "jump" and not hit then
  371.         nec.C1 = nec.C1:Lerp(necc1 * cf(0,0,0) * angles(0,0,0,true),.2)
  372.         rutj.C1 = rutj.C1:Lerp(rutjc1 * cf(0,0,0) * angles(0,0,0,true) * angles(-rotfb/5,0,-rotrl/5),.2)
  373.         rs.C1 = rs.C1:Lerp(rsc1 * cf(0,0,0) * angles(0,0,0,true),.2)
  374.         ls.C1 = ls.C1:Lerp(lsc1 * cf(0,0,0) * angles(0,0,0,true),.2)
  375.         rh.C1 = rh.C1:Lerp(rhc1 * cf(0,0,0) * angles(0,0,0,true),.2)
  376.         lh.C1 = lh.C1:Lerp(lhc1 * cf(0,0,0) * angles(0,0,0,true),.2)
  377.     elseif anim == "fall" and not hit then
  378.         nec.C1 = nec.C1:Lerp(necc1 * cf(0,0,0) * angles(0,0,0,true),.2)
  379.         rutj.C1 = rutj.C1:Lerp(rutjc1 * cf(0,0,0) * angles(0,0,0,true) * angles(-rotfb/5,0,-rotrl/5),.2)
  380.         rs.C1 = rs.C1:Lerp(rsc1 * cf(0,0,0) * angles(sin(sine/10) * 5,cos(sine/10) * 5,0,true),.2)
  381.         ls.C1 = ls.C1:Lerp(lsc1 * cf(0,0,0) * angles(-sin(sine/10) * 5,-cos(sine/10) * 5,0,true),.2)
  382.         rh.C1 = rh.C1:Lerp(rhc1 * cf(0,0,0) * angles(0,0,0,true),.2)
  383.         lh.C1 = lh.C1:Lerp(lhc1 * cf(0,0,0) * angles(0,0,0,true),.2)
  384.     elseif anim == "idle" and hit then
  385.         if (not jok or sitting or laying or crying) and not danc then
  386.             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)
  387.             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)
  388.             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)
  389.             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)
  390.             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)
  391.             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)
  392.             wsGrow = false
  393.             vroOm:Stop()
  394.         elseif jok and not sitting and not laying and not crying and not danc then
  395.             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)
  396.             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)
  397.             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)
  398.             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)
  399.             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)
  400.             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)
  401.             wsGrow = false
  402.             vroOm:Stop()
  403.         elseif danc and not sitting and not laying and not crying then
  404.             nec.C1 = nec.C1:Lerp(necc1 * cf(0,0,0) * angles((cos(sine/10) * sin(sine/25)) * 35,(cos(sine/20) * sin(sine/50)) * 30,(sin(sine/20) * cos(sine/50)) * 40,true),.2)
  405.             rutj.C1 = rutj.C1:Lerp(rutjc1 * cf((1 * cos(sine/20)) * sin(sine/50),-.3 - (.3 * sin(sine/10)) * cos(sine/25),(.5 * sin(sine/20)) * cos(sine/50)) * angles((-20 - (sin(sine/10) * cos(sine/25)) * 25) + ((sin(sine/20) * cos(sine/50)) * 15),0,-(cos(sine/20) * sin(sine/50)) * 30,true),.2)
  406.             rs.C1 = rs.C1:Lerp(rsc1 * cf(0,.125 + (.125 * -sin(sine/10) * cos(sine/25)),.25 - (.25 * cos(sine/10) * sin(sine/25))) * angles(-50 - (cos(sine/10) * sin(sine/25)) * 75,((cos(sine/20) * sin(sine/50)) * sin(sine/50)) * 70,((sin(sine/20) * cos(sine/50)) * cos(sine/25)) * 40,true),.2)
  407.             ls.C1 = ls.C1:Lerp(lsc1 * cf(0,.125 + (.125 * -sin(sine/10) * cos(sine/25)),.25 - (.25 * cos(sine/10) * sin(sine/25))) * angles(-50 - (cos(sine/10) * sin(sine/25)) * 75,-((cos(sine/20) * sin(sine/50)) * sin(sine/50)) * 70,-((sin(sine/20) * cos(sine/50)) * cos(sine/25)) * 40,true),.2)
  408.             rh.C1 = rh.C1:Lerp(rhc1 * cf(0,-.1 - (.3 * sin(sine/10)) * cos(sine/25),.275 + ((.275 * sin(sine/10)) * cos(sine/25))) * angles(-12.5 - (sin(sine/10) * cos(sine/25)) * 40,((cos(sine/20) * sin(sine/50)) * sin(sine/50)) * 30,((cos(sine/20) * sin(sine/50)) * sin(sine/25)) * 40,true),.2)
  409.             lh.C1 = lh.C1:Lerp(lhc1 * cf(0,-.1 - (.3 * sin(sine/10)) * cos(sine/25),.275 + ((.275 * sin(sine/10)) * cos(sine/25))) * angles(-15 - (sin(sine/10) * cos(sine/25)) * 40,((cos(sine/20) * sin(sine/50)) * -sin(sine/50)) * 30,((cos(sine/20) * sin(sine/50)) * -sin(sine/25)) * 40,true),.2)
  410.         end
  411.     end
  412.    
  413.     if verVel > 20 then
  414.         anim = "jump"
  415.         change = 1
  416.         nec.C0 = nec.C0:Lerp(necc0 * cf(0,0,0) * angles(5,0,0,true),.2)
  417.         rutj.C0 = rutj.C0:Lerp(rutjc0 * cf(0,0,0) * angles(-5,0,0,true),.2)
  418.         rs.C0 = rs.C0:Lerp(rsc0 * cf(0,-.15,-.25) * angles(150,10,12.5,true),.2)
  419.         ls.C0 = ls.C0:Lerp(lsc0 * cf(0,-.15,-.25) * angles(155,-10,-12.5,true),.2)
  420.         rh.C0 = rh.C0:Lerp(rhc0 * cf(0,.5,-.35) * angles(-12.5,0,5,true),.2)
  421.         lh.C0 = lh.C0:Lerp(lhc0 * cf(0,.2,-.15) * angles(-2.5,0,-5,true),.2)
  422.     elseif verVel < -20 then
  423.         anim = "fall"
  424.         change = 1
  425.         nec.C0 = nec.C0:Lerp(necc0 * cf(0,0,0) * angles(-7.5,0,0,true),.2)
  426.         rutj.C0 = rutj.C0:Lerp(rutjc0 * cf(0,0,0) * angles(5,0,0,true),.2)
  427.         rs.C0 = rs.C0:Lerp(rsc0 * cf(.25,-.25,0) * angles(0,10,110,true),.2)
  428.         ls.C0 = ls.C0:Lerp(lsc0 * cf(-.25,-.25,0) * angles(0,-10,-110,true),.2)
  429.         rh.C0 = rh.C0:Lerp(rhc0 * cf(0,.2,-.15) * angles(-2.5,0,5,true),.2)
  430.         lh.C0 = lh.C0:Lerp(lhc0 * cf(0,.5,-.35) * angles(-12.5,0,-5,true),.2)
  431.     elseif horVel > 5 and verVel > -20 and verVel < 20 then
  432.         if not sprint then
  433.             anim = "walk"
  434.             if not jok then
  435.                 change = .6
  436.             else
  437.                 change = 1
  438.             end
  439.             nec.C0 = nec.C0:Lerp(necc0 * cf(0,0,0) * angles(0,0,0,true),.2)
  440.             rutj.C0 = rutj.C0:Lerp(rutjc0 * cf(0,0,0) * angles(0,0,0,true),.2)
  441.             rs.C0 = rs.C0:Lerp(rsc0 * cf(0,0,0) * angles(0,0,0,true),.2)
  442.             ls.C0 = ls.C0:Lerp(lsc0 * cf(0,0,0) * angles(0,0,0,true),.2)
  443.             rh.C0 = rh.C0:Lerp(rhc0 * cf(0,0,0) * angles(0,0,0,true),.2)
  444.             lh.C0 = lh.C0:Lerp(lhc0 * cf(0,0,0) * angles(0,0,0,true),.2)
  445.         else
  446.             anim = "run"
  447.             if not jok then
  448.                 change = .9
  449.             else
  450.                 change = 1
  451.             end
  452.             nec.C0 = nec.C0:Lerp(necc0 * cf(0,0,0) * angles(0,0,0,true),.2)
  453.             rutj.C0 = rutj.C0:Lerp(rutjc0 * cf(0,0,0) * angles(0,0,0,true),.2)
  454.             rs.C0 = rs.C0:Lerp(rsc0 * cf(0,0,0) * angles(0,0,0,true),.2)
  455.             ls.C0 = ls.C0:Lerp(lsc0 * cf(0,0,0) * angles(0,0,0,true),.2)
  456.             rh.C0 = rh.C0:Lerp(rhc0 * cf(0,0,0) * angles(0,0,0,true),.2)
  457.             lh.C0 = lh.C0:Lerp(lhc0 * cf(0,0,0) * angles(0,0,0,true),.2)
  458.         end
  459.     elseif horVel < 5 and verVel > -20 and verVel < 20 then
  460.         anim = "idle"
  461.         change = 1
  462.         if not sitting and not laying and not crying and not danc then
  463.             if (not jok and hum.Sit) then
  464.                 nec.C0 = nec.C0:Lerp(necc0 * cf(0,0,0) * angles(-7.5,0,0,true),.2)
  465.                 rutj.C0 = rutj.C0:Lerp(rutjc0 * cf(0,.25,0) * angles(5,0,0,true),.2)
  466.                 rs.C0 = rs.C0:Lerp(rsc0 * cf(-.15,-.15,-.25) * angles(40,30,-35,true),.2)
  467.                 ls.C0 = ls.C0:Lerp(lsc0 * cf(.15,-.15,-.2) * angles(45,-30,32.5,true),.2)
  468.                 rh.C0 = rh.C0:Lerp(rhc0 * cf(0,.5,-.55) * angles(30,5,-5,true),.2)
  469.                 lh.C0 = lh.C0:Lerp(lhc0 * cf(0,.65,-.5) * angles(32.5,-5,5,true),.2)
  470.             elseif not jok then
  471.                 nec.C0 = nec.C0:Lerp(necc0 * cf(0,0,0) * angles(0,0,0,true),.2)
  472.                 rutj.C0 = rutj.C0:Lerp(rutjc0 * cf(0,0,0) * angles(0,0,0,true),.2)
  473.                 rs.C0 = rs.C0:Lerp(rsc0 * cf(0,0,0) * angles(.5,0,-.5,true),.2)
  474.                 ls.C0 = ls.C0:Lerp(lsc0 * cf(0,0,0) * angles(.5,0,.5,true),.2)
  475.                 rh.C0 = rh.C0:Lerp(rhc0 * cf(0,0,0) * angles(0,-2.5,2,true),.2)
  476.                 lh.C0 = lh.C0:Lerp(lhc0 * cf(0,0,0) * angles(0,2.5,-2,true),.2)
  477.             elseif jok then
  478.                 nec.C0 = nec.C0:Lerp(necc0 * cf(0,0,0) * angles(0,0,0,true),.2)
  479.                 rutj.C0 = rutj.C0:Lerp(rutjc0 * cf(0,0,0) * angles(0,0,0,true),.2)
  480.                 rs.C0 = rs.C0:Lerp(rsc0 * cf(0,0,0) * angles(0,0,0,true),.2)
  481.                 ls.C0 = ls.C0:Lerp(lsc0 * cf(0,0,0) * angles(0,0,0,true),.2)
  482.                 rh.C0 = rh.C0:Lerp(rhc0 * cf(0,0,0) * angles(0,0,5,true),.2)
  483.                 lh.C0 = lh.C0:Lerp(lhc0 * cf(0,0,0) * angles(0,0,-5,true),.2)
  484.             end
  485.         elseif sitting and not laying and not crying and not danc then
  486.             nec.C0 = nec.C0:Lerp(necc0 * cf(0,0,0) * angles(-20,0,0,true),.2)
  487.             rutj.C0 = rutj.C0:Lerp(rutjc0 * cf(0,1.75,0) * angles(-15,0,0,true),.2)
  488.             rs.C0 = rs.C0:Lerp(rsc0 * cf(-.1,-.5,.15) * angles(-20,-60,10,true),.2)
  489.             ls.C0 = ls.C0:Lerp(lsc0 * cf(0,-.25,-.2) * angles(70,-60,60,true) * angles(40,0,0,true),.2)
  490.             rh.C0 = rh.C0:Lerp(rhc0 * cf(0,0,0) * angles(70,7.5,5,true),.2)
  491.             lh.C0 = lh.C0:Lerp(lhc0 * cf(0,1.25,-.5) * angles(10,-10,-5,true),.2)
  492.         elseif not sitting and laying and not crying and not danc then
  493.             nec.C0 = nec.C0:Lerp(necc0 * cf(0,0,0) * angles(-35,0,0,true),.2)
  494.             rutj.C0 = rutj.C0:Lerp(rutjc0 * cf(0,0,-2.4) * angles(-87.5,0,0,true),.2)
  495.             rs.C0 = rs.C0:Lerp(rsc0 * cf(-.1,.75,-.25) * angles(195,0,-65,true) * angles(0,90,0,true),.2)
  496.             ls.C0 = ls.C0:Lerp(lsc0 * cf(.125,-.3,-.05) * angles(90,20,85,true) * angles(-30,20,0,true),.2)
  497.             rh.C0 = rh.C0:Lerp(rhc0 * cf(0,.25,-1) * angles(-55,20,7.5,true),.2)
  498.             lh.C0 = lh.C0:Lerp(lhc0 * cf(0,0,0) * angles(2,-7.5,5,true),.2)
  499.         elseif not sitting and not laying and crying and not danc then
  500.             nec.C0 = nec.C0:Lerp(necc0 * cf(0,0,0) * angles(-80,0,0,true),.2)
  501.             rutj.C0 = rutj.C0:Lerp(rutjc0 * cf(0,1.9,0) * angles(10,0,0,true),.2)
  502.             rs.C0 = rs.C0:Lerp(rsc0 * cf(-.25,-.475,-.8) * angles(85,0,-80,true) * angles(0,100,0,true),.2)
  503.             ls.C0 = ls.C0:Lerp(lsc0 * cf(.25,-.4,-.75) * angles(80,0,85,true) * angles(0,-87.5,0,true),.2)
  504.             rh.C0 = rh.C0:Lerp(rhc0 * cf(0,1.85,-.75) * angles(5,-5,-5,true),.2)
  505.             lh.C0 = lh.C0:Lerp(lhc0 * cf(0,1.85,-.7) * angles(3.5,5,5,true),.2)
  506.         elseif not sitting and not laying and not crying and danc then
  507.             nec.C0 = nec.C0:Lerp(necc0 * cf(0,0,0) * angles(0,0,0,true),.2)
  508.             rutj.C0 = rutj.C0:Lerp(rutjc0 * cf(0,0,0) * angles(0,0,0,true),.2)
  509.             rs.C0 = rs.C0:Lerp(rsc0 * cf(0,0,0) * angles(0,0,0,true),.2)
  510.             ls.C0 = ls.C0:Lerp(lsc0 * cf(0,0,0) * angles(0,0,0,true),.2)
  511.             rh.C0 = rh.C0:Lerp(rhc0 * cf(0,0,0) * angles(0,-5,5,true),.2)
  512.             lh.C0 = lh.C0:Lerp(lhc0 * cf(0,0,0) * angles(0,5,-5,true),.2)
  513.         end
  514.     end
  515. end)
  516. script.Parent = owner.Character
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement