Advertisement
vL4d_4eVer

Untitled

Dec 26th, 2018
315
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 21.87 KB | None | 0 0
  1.  
  2. while wait(2) do
  3.     for i,v in pairs(game.Players:GetPlayers()) do
  4.         if v.Character and v.Character:FindFirstChild("Torso") then
  5. spawn(function()
  6.     if v.Character:FindFirstChild("Folder") then else
  7.     local run = Instance.new("Folder",v.Character)
  8. local p = game:GetService("Players"):WaitForChild(v.Name)
  9. local char = p.Character
  10. local larm = char:WaitForChild("Left Arm")
  11. local rarm = char:WaitForChild("Right Arm")
  12. local lleg = char:WaitForChild("Left Leg")
  13. local rleg = char:WaitForChild("Right Leg")
  14. local hed = char:WaitForChild("Head")
  15. local torso = char:WaitForChild("Torso")
  16. local root = char:WaitForChild("HumanoidRootPart")
  17. local hum = char:FindFirstChildOfClass("Humanoid")
  18. local debris = game:GetService("Debris")
  19. local input = game:GetService("UserInputService")
  20. local run = game:GetService("RunService")
  21. local rs = run.Heartbeat
  22. local wingpose = "Idle"
  23. local DebrisModel = Instance.new("Model",char)
  24. DebrisModel.Name = "Debris"
  25. repeat rs:wait() until p.CharacterAppearanceLoaded
  26.  
  27. noidle = false
  28. shift = false
  29. control = false
  30.  
  31. ----------------------------------------------------------------------------
  32.  
  33. function rswait(value)
  34.   game:GetService("RunService").Heartbeat:Wait()
  35. end
  36.  
  37. ----------------------------------------------------------------------------
  38.  
  39. local timeposition = 0
  40.  
  41. function music(id)
  42. if id == "Stop" then
  43. if not torso:FindFirstChild("MusicRuin") then
  44. soundz = Instance.new("Sound",torso)
  45. end
  46. soundz:Stop()
  47. else
  48. if not torso:FindFirstChild("MusicRuin") then
  49. soundz = Instance.new("Sound",torso)
  50. for i=1,2 do
  51. local equalizer = Instance.new("EqualizerSoundEffect",soundz)
  52. equalizer.HighGain = 6
  53. equalizer.MidGain = 0
  54. equalizer.LowGain = 6
  55. end
  56. end
  57. soundz.Volume = 10
  58. soundz.Name = "MusicRuin"
  59. soundz.Looped = true
  60. soundz.PlaybackSpeed = 1
  61. soundz.SoundId = "rbxassetid://"..id
  62. soundz:Stop()
  63. soundz:Play()
  64. end
  65. end
  66.  
  67. ----------------------------------------------------------------------------
  68.  
  69. function lerp(a, b, t)
  70.   return a + (b - a)*t
  71. end
  72.  
  73. ----------------------------------------------------------------------------
  74.  
  75. function Lerp(c1,c2,al)
  76.   local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
  77.   local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
  78.   for i,v in pairs(com1) do
  79.     com1[i] = v+(com2[i]-v)*al
  80.   end
  81.   return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1)))
  82. end
  83.  
  84. ----------------------------------------------------------------------------
  85.  
  86. function slerp(a, b, t)
  87.   dot = a:Dot(b)
  88.   if dot > 0.99999 or dot < -0.99999 then
  89.     return t <= 0.5 and a or b
  90.   else
  91.     r = math.acos(dot)
  92.     return (a*math.sin((1 - t)*r) + b*math.sin(t*r)) / math.sin(r)
  93.   end
  94. end
  95.  
  96. ----------------------------------------------------------------------------
  97.  
  98. function clerp(c1,c2,al)
  99.  
  100.   local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
  101.  
  102.   local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
  103.  
  104.   for i,v in pairs(com1) do
  105.  
  106.     com1[i] = lerp(v,com2[i],al)
  107.  
  108.   end
  109.  
  110.   return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1)))
  111.  
  112. end
  113.  
  114. ----------------------------------------------------------------------------
  115.  
  116. function findAllNearestTorso(pos,dist)
  117.     local list = workspace:children()
  118.     local torso = {}
  119.     local temp = nil
  120.     local human = nil
  121.     local temp2 = nil
  122.     for x = 1, #list do
  123.         temp2 = list[x]
  124.         if (temp2.className == "Model") and (temp2 ~= char) then
  125.             temp = temp2:findFirstChild("Torso")
  126.             human = temp2:findFirstChildOfClass("Humanoid")
  127.             if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  128.                 if (temp.Position - pos).magnitude < dist then
  129.                     table.insert(torso,temp)
  130.                     dist = (temp.Position - pos).magnitude
  131.                 end
  132.             end
  133.         end
  134.     end
  135.     return torso
  136. end
  137.  
  138. ----------------------------------------------------------------------------
  139.  
  140. function checkIfNotPlayer(model)
  141. if model.CanCollide == true and model ~= char and model.Parent ~= char and model.Parent.Parent ~= char and model.Parent.Parent ~= char and model.Parent ~= DebrisModel and model.Parent.Parent ~= DebrisModel and model.Parent.Parent.Parent ~= DebrisModel and model ~= wings and model.Parent ~= wings and model.Parent.Parent ~= wings then
  142. return true
  143. else
  144. return false
  145. end
  146. end
  147.  
  148. ----------------------------------------------------------------------------
  149.  
  150. function newWeld(wp0, wp1, wc0x, wc0y, wc0z)
  151.  
  152.   local wld = Instance.new("Weld", wp1)
  153.  
  154.   wld.Part0 = wp0
  155.  
  156.   wld.Part1 = wp1
  157.  
  158.   wld.C0 = CFrame.new(wc0x, wc0y, wc0z)
  159.  
  160.   return wld
  161.  
  162. end
  163.  
  164. function weld(model)
  165.   local parts,last = {}
  166.   local function scan(parent)
  167.     for _,v in pairs(parent:GetChildren()) do
  168.       if (v:IsA("BasePart")) then
  169.         if (last) then
  170.           local w = Instance.new("Weld")
  171.           w.Name = ("%s_Weld"):format(v.Name)
  172.           w.Part0,w.Part1 = last,v
  173.           w.C0 = last.CFrame:inverse()
  174.           w.C1 = v.CFrame:inverse()
  175.           w.Parent = last
  176.         end
  177.         last = v
  178.         table.insert(parts,v)
  179.       end
  180.       scan(v)
  181.     end
  182.   end
  183.   scan(model)
  184.   for _,v in pairs(parts) do
  185.         v.Anchored = false
  186.         v.Locked = true
  187.         v.Anchored = false
  188.         v.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  189.         v.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  190.         v.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  191.         v.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  192.         v.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  193.         v.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  194.         v.CustomPhysicalProperties = PhysicalProperties.new(0,0,0)
  195.   end
  196. end
  197.  
  198. ----------------------------------------------------------------------------
  199.  
  200. function calculate(part,asd)
  201. end
  202.  
  203. ----------------------------------------------------------------------------
  204.  
  205. function sound(id,position,vol,pitch,start,finish)
  206.   coroutine.resume(coroutine.create(function()
  207.  
  208.   local part = Instance.new("Part",workspace)
  209.   part.Position = position
  210.   part.Size = Vector3.new(0,0,0)
  211.   part.CanCollide = false
  212.   part.Transparency = 1
  213.  
  214.   local sound = Instance.new("Sound",part)
  215.  
  216.   sound.SoundId = "rbxassetid://"..id
  217.  
  218.   repeat rs:wait() until sound.IsLoaded
  219.  
  220.   if vol ~= nil then
  221.     sound.Volume = vol
  222.   end
  223.  
  224.   if pitch ~= nil then
  225.     sound.PlaybackSpeed = pitch
  226.   end
  227.  
  228.   if start ~= nil then
  229.     sound.TimePosition = start
  230.   end
  231.  
  232.   if finish ~= nil then
  233.     debris:AddItem(part,finish-start)
  234.   else
  235.     debris:AddItem(part,sound.TimeLength)
  236.   end
  237.  
  238.   sound:Play()  
  239.  
  240.   return sound
  241.  
  242.   end))
  243. end
  244.  
  245. ----------------------------------------------------------------------------
  246.  
  247. function computeDirection(vec)
  248. local lenSquared = vec.magnitude * vec.magnitude
  249. local invSqrt = 1 / math.sqrt(lenSquared)
  250. return Vector3.new(vec.x * invSqrt, vec.y * invSqrt, vec.z * invSqrt)
  251. end
  252.  
  253. ----------------------------------------------------------------------------
  254.  
  255. local shaking = 0
  256. function shake(num) if num > shaking then shaking = num end end
  257. game:GetService("RunService").Heartbeat:connect(function()
  258. hum.CameraOffset = Vector3.new(math.random(-1,1),math.random(-1,1),math.random(-1,1))*(shaking/100)
  259. if shaking > 0 then shaking = shaking - 1 else shaking = 0 end
  260. end)
  261.  
  262. plr = game:GetService("Players"):WaitForChild(v.Name)
  263. DebrisModel = Instance.new("Model",plr.Character)
  264. DebrisModel.Name = "DebrisModel"
  265.  
  266. function Effect(mesh,size,transparency,material,color,position,rotation,positionchange,sizechange,rotationchange,transparencychange,acceleration)
  267.  
  268.  local part = Instance.new("Part",DebrisModel)
  269.   part.Anchored = true
  270.   part.CanCollide = false
  271.   part.Size = Vector3.new(1,1,1)
  272.   part.Transparency = transparency
  273.   part.Material = material
  274.   part.Color = color
  275.   part.CFrame = CFrame.new(position)*CFrame.Angles(math.rad(rotation.X),math.rad(rotation.Y),math.rad(rotation.Z))
  276.  
  277.  local partmesh = Instance.new("SpecialMesh",part)
  278.   if tonumber(mesh) == nil then partmesh.MeshType = mesh else partmesh.MeshId = "rbxassetid://"..mesh end
  279.   partmesh.Scale = size
  280.  
  281.  local pvalue = Instance.new("Vector3Value",part)
  282.   pvalue.Name = "Position"
  283.   pvalue.Value = positionchange
  284.  
  285.  local svalue = Instance.new("Vector3Value",part)
  286.   svalue.Name = "Size"
  287.   svalue.Value = sizechange
  288.  
  289.  local rvalue = Instance.new("Vector3Value",part)
  290.   rvalue.Name = "Rotation"
  291.   rvalue.Value = rotationchange
  292.  
  293.  local tvalue = Instance.new("NumberValue",part)
  294.   tvalue.Name = "Transparency"
  295.   tvalue.Value = transparencychange
  296.  
  297.  local avalue = Instance.new("NumberValue",part)
  298.   avalue.Name = "Acceleration"
  299.   avalue.Value = acceleration
  300.  
  301.  part.Name = "EFFECT"
  302.  
  303.  return part
  304.  
  305. end
  306.  
  307. game:GetService("RunService").Heartbeat:connect(function()
  308. coroutine.resume(coroutine.create(function()
  309.  
  310.  for i, v in pairs(DebrisModel:GetChildren()) do
  311.   if v:isA("BasePart") then
  312.    v.LocalTransparencyModifier = 0
  313.   end
  314.  end
  315.  
  316.  if not plr.Character:FindFirstChild("DebrisModel") then
  317.   DebrisModel = Instance.new("Model",plr.Character)
  318.   DebrisModel.Name = "DebrisModel"
  319.  end
  320.  
  321.  for i,v in pairs(DebrisModel:GetChildren()) do
  322.   if v:IsA("BasePart") and v.Name == "EFFECT" then
  323.    local pvalue = v:FindFirstChild("Position").Value
  324.    local svalue = v:FindFirstChild("Size").Value
  325.    local rvalue = v:FindFirstChild("Rotation").Value
  326.    local tvalue = v:FindFirstChild("Transparency").Value
  327.    local avalue = v:FindFirstChild("Acceleration").Value
  328.    local mesh = v:FindFirstChild("Mesh")
  329.    mesh.Scale = mesh.Scale + svalue
  330.    v:FindFirstChild("Size").Value = v:FindFirstChild("Size").Value + (Vector3.new(1,1,1)*avalue)
  331.    v.Transparency = v.Transparency + tvalue
  332.    v.CFrame = CFrame.new(pvalue)*v.CFrame*CFrame.Angles(math.rad(rvalue.X),math.rad(rvalue.Y),math.rad(rvalue.Z))
  333.    if v.Transparency >= 1 or mesh.Scale.X < 0 or mesh.Scale.Y < 0 or mesh.Scale.Z < 0 then
  334.      v:Destroy()
  335.    end
  336.   end
  337.  end
  338.  
  339. end))
  340. end)
  341.  
  342. local wsback = 0
  343. local frozen = false
  344. function freeze()
  345. if frozen == false then
  346. frozen = true
  347. wsback = hum.WalkSpeed
  348. hum.WalkSpeed = 1
  349. else
  350. frozen = false
  351. hum.WalkSpeed = wsback
  352. end
  353. end
  354. hum.WalkSpeed = 25
  355.  
  356. function Lightning(Part0,Part1,Times,Offset,Color,Thickness,Trans)
  357.     local magz = (Part0 - Part1).magnitude
  358.     local curpos = Part0
  359.     local trz = {-Offset,Offset}
  360.     for i=1,Times do
  361.         local li = Instance.new("Part", DebrisModel)
  362.         li.TopSurface =0
  363.         li.Material = Enum.Material.Neon
  364.         li.BottomSurface = 0
  365.         li.Anchored = true
  366.         li.Locked = true
  367.         li.Transparency = Trans or 0.4
  368.         li.Color = Color
  369.         li.formFactor = "Custom"
  370.         li.CanCollide = false
  371.         li.Size = Vector3.new(Thickness,Thickness,magz/Times)
  372.         local lim = Instance.new("BlockMesh",li)
  373.         local Offzet = Vector3.new(trz[math.random(1,2)],trz[math.random(1,2)],trz[math.random(1,2)])
  374.         local trolpos = CFrame.new(curpos,Part1)*CFrame.new(0,0,magz/Times).p+Offzet
  375.         if Times == i then
  376.         local magz2 = (curpos - Part1).magnitude
  377.         li.Size = Vector3.new(Thickness,Thickness,magz2)
  378.         li.CFrame = CFrame.new(curpos,Part1)*CFrame.new(0,0,-magz2/2)
  379.         else
  380.         li.CFrame = CFrame.new(curpos,trolpos)*CFrame.new(0,0,magz/Times/2)
  381.         end
  382.         curpos = li.CFrame*CFrame.new(0,0,magz/Times/2).p
  383.         li.Name = "LIGHTNING"
  384.     end
  385. end
  386.  
  387. ----------------------------------------------------------------------------
  388. skin_color = BrickColor.new("Light orange")
  389. --p:ClearCharacterAppearance()
  390. --hed:WaitForChild("face"):Destroy()
  391. hed:WaitForChild("face").Texture = "rbxassetid://407320095"
  392. ----------------------------------------------------------------------------
  393. local size = 1
  394.  
  395. newWeld(torso, larm, -1.5, 0.5, 0)
  396. larm.Weld.C1 = CFrame.new(0, 0.5, 0)
  397. newWeld(torso, rarm, 1.5, 0.5, 0)
  398. rarm.Weld.C1 = CFrame.new(0, 0.5, 0)
  399. newWeld(torso, hed, 0, 1.5, 0)
  400. newWeld(torso, lleg, -0.5, -1, 0)
  401. lleg.Weld.C1 = CFrame.new(0, 1, 0)
  402. newWeld(torso, rleg, 0.5, -1, 0)
  403. rleg.Weld.C1 = CFrame.new(0, 1, 0)
  404. newWeld(root, torso, 0, -1, 0)
  405. torso.Weld.C1 = CFrame.new(0, -1, 0)
  406.  
  407. emitters={}
  408.  
  409. ----------------------------------------------------------------------------------------
  410. music(288494027)
  411. velocityYFall=0
  412. velocityYFall2=0
  413. velocityYFall3=0
  414. velocityYFall4=0
  415. neckrotY=0
  416. neckrotY2=0
  417. torsorotY=0
  418. torsorotY2=0
  419. torsoY=0
  420. torsoY2=0
  421. colored = 0
  422. sine = 0
  423. change=0.4
  424. movement=10
  425. timeranim=0
  426. running = false
  427. jumped = false
  428. icolor=1
  429. imode=false
  430.  
  431. didjump = false
  432. jumppower = 0
  433. debounceimpact = false
  434.  
  435. function jumpimpact()
  436. if debounceimpact == false then
  437. debounceimpact = true
  438. if jumppower < -150 then jumppower = -150 end
  439. shake(-jumppower/5)
  440. for i=1,-jumppower/20 do rs:wait()
  441. hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.Angles(0,0,0), 0.05)
  442. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, (jumppower/20)-hum.HipHeight, 0) * CFrame.Angles(math.rad(0),math.rad(0), math.rad(0)), 0.05)
  443. end
  444. debounceimpact = false
  445. end
  446. end
  447.  
  448. max = 0
  449.  
  450. while true do
  451. game:GetService("RunService").Heartbeat:wait()
  452.  
  453.  
  454.  
  455. if -root.Velocity.Y/1.5 > -5 and -root.Velocity.Y/1.5 < 150 then
  456. velocityYFall = root.Velocity.Y/1.5
  457. else
  458. if -root.Velocity.Y/1.5 < -5 then
  459. velocityYFall = 5
  460. elseif -root.Velocity.Y/1.5 > 150 then
  461. velocityYFall = -150
  462. end
  463. end
  464.  
  465. if -root.Velocity.Y/180 > 0 and -root.Velocity.Y/180 < 1.2 then
  466. velocityYFall2 = root.Velocity.Y/180
  467. else
  468. if -root.Velocity.Y/180 < 0 then
  469. velocityYFall2 = 0
  470. elseif -root.Velocity.Y/180 > 1.2 then
  471. velocityYFall2 = -1.2
  472. end
  473. end
  474.  
  475. if -root.Velocity.Y/1.5 > -5 and -root.Velocity.Y/1.5 < 50 then
  476. velocityYFall3 = root.Velocity.Y/1.5
  477. else
  478. if -root.Velocity.Y/1.5 < -5 then
  479. velocityYFall3 = 5
  480. elseif -root.Velocity.Y/1.5 > 50 then
  481. velocityYFall3 = -50
  482. end
  483. end
  484.  
  485. if -root.Velocity.Y/1.5 > -50 and -root.Velocity.Y/1.5 < 20 then
  486. velocityYFall4 = root.Velocity.Y/1.5
  487. else
  488. if -root.Velocity.Y/180 < -5 then
  489. velocityYFall4 = 5
  490. elseif -root.Velocity.Y/180 > 50 then
  491. velocityYFall4 = -50
  492. end
  493. end
  494.  
  495. if root.RotVelocity.Y/6 < 1 and root.RotVelocity.Y/6 > -1 then
  496. neckrotY = root.RotVelocity.Y/6
  497. else
  498. if root.RotVelocity.Y/6 < -1 then
  499. neckrotY = -1
  500. elseif root.RotVelocity.Y/6 > 1 then
  501. neckrotY = 1
  502. end
  503. end
  504.  
  505. if root.RotVelocity.Y/8 < 0.6 and root.RotVelocity.Y/8 > -0.6 then
  506. neckrotY2 = root.RotVelocity.Y/8
  507. else
  508. if root.RotVelocity.Y/8 < -0.6 then
  509. neckrotY2 = -0.6
  510. elseif root.RotVelocity.Y/8 > 0.6 then
  511. neckrotY2 = 0.6
  512. end
  513. end
  514.  
  515. if root.RotVelocity.Y/6 < 0.2 and root.RotVelocity.Y/6 > -0.2 then
  516. torsorotY = root.RotVelocity.Y/6
  517. else
  518. if root.RotVelocity.Y/6 < -0.2 then
  519. torsorotY = -0.2
  520. elseif root.RotVelocity.Y/6 > 0.2 then
  521. torsorotY = 0.2
  522. end
  523. end
  524.  
  525. if root.RotVelocity.Y/8 < 0.2 and root.RotVelocity.Y/8 > -0.2 then
  526. torsorotY2 = root.RotVelocity.Y/8
  527. else
  528. if root.RotVelocity.Y/8 < -0.2 then
  529. torsorotY2 = -0.2
  530. elseif root.RotVelocity.Y/8 > 0.2 then
  531. torsorotY2 = 0.2
  532. end
  533. end
  534.  
  535. torsoY = -(torso.Velocity*Vector3.new(1, 0, 1)).magnitude/20
  536. torsoY2 = -(torso.Velocity*Vector3.new(1, 0, 1)).magnitude/36
  537.  
  538. local ray1 = Ray.new(root.Position+Vector3.new(size,0,0),Vector3.new(0, -4, 0))
  539. local part1, endPoint = workspace:FindPartOnRay(ray1, char)
  540.  
  541. local ray2 = Ray.new(root.Position-Vector3.new(size,0,0),Vector3.new(0, -4, 0))
  542. local part2, endPoint = workspace:FindPartOnRay(ray2, char)
  543.  
  544. local ray3 = Ray.new(root.Position+Vector3.new(0,0,size/2),Vector3.new(0, -4, 0))
  545. local part3, endPoint = workspace:FindPartOnRay(ray3, char)
  546.  
  547. local ray4 = Ray.new(root.Position-Vector3.new(0,0,size/2),Vector3.new(0, -4, 0))
  548. local part4, endPoint = workspace:FindPartOnRay(ray4, char)
  549.  
  550. local ray5 = Ray.new(root.Position+Vector3.new(size,0,size/2),Vector3.new(0, -4, 0))
  551. local part5, endPoint = workspace:FindPartOnRay(ray5, char)
  552.  
  553. local ray6 = Ray.new(root.Position-Vector3.new(size,0,size/2),Vector3.new(0, -4, 0))
  554. local part6, endPoint = workspace:FindPartOnRay(ray6, char)
  555.  
  556. local ray7 = Ray.new(root.Position+Vector3.new(size,0,-size/2),Vector3.new(0, -4, 0))
  557. local part7, endPoint = workspace:FindPartOnRay(ray7, char)
  558.  
  559. local ray8 = Ray.new(root.Position-Vector3.new(size,0,-size/2),Vector3.new(0, -4, 0))
  560. local part8, endPoint = workspace:FindPartOnRay(ray8, char)
  561.  
  562. local ray = Ray.new(root.Position,Vector3.new(0, -6, 0))
  563. local part, endPoint = workspace:FindPartOnRay(ray, char)
  564.  
  565. if part1 or part2 or part3 or part4 or part5 or part6 or part7 or part8 then jumped = false else endPoint = 0 jumped = true end
  566.  
  567. local rlegray = Ray.new(rleg.Position+Vector3.new(0,size/2,0),Vector3.new(0, -1.75, 0))
  568. local rlegpart, rlegendPoint = workspace:FindPartOnRay(rlegray, char)
  569.  
  570. local llegray = Ray.new(lleg.Position+Vector3.new(0,size/2,0),Vector3.new(0, -1.75, 0))
  571. local llegpart, llegendPoint = workspace:FindPartOnRay(llegray, char)
  572.  
  573. if hum.Health > 0 and noidle == false then
  574. if hum.Sit == false then
  575. if (torso.Velocity*Vector3.new(1, 0, 1)).magnitude >= 5 and jumped == false then
  576. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0, 1.5, -.2) * CFrame.Angles(math.rad((torso.Velocity*Vector3.new(1, 0, 1)).magnitude/35),torsorotY, math.rad(0)+torsorotY), 0.4)
  577. hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.Angles((change/10)*math.cos(sine/2)+0.1,-(change/10)*math.cos(sine/4)-(torsorotY/5),(change/5)*math.cos(sine/4)), 0.1)
  578. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.62-(movement/40)*math.cos(sine/4)/3,(movement/150)+(movement/40)*math.cos(sine/4))*CFrame.Angles(math.rad(-5-(movement*2)*math.cos(sine/4))+ -(movement/10)*math.sin(sine/4)*2,math.rad(0-(movement*2)*math.cos(sine/4)),math.rad(0)), 0.2)
  579. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.62+(movement/40)*math.cos(sine/4)/3,(movement/150)-(movement/40)*math.cos(sine/4))*CFrame.Angles(math.rad(-5+(movement*2)*math.cos(sine/4))+ (movement/10)*math.sin(sine/4)*2,math.rad(0-(movement*2)*math.cos(sine/4)),math.rad(0)), 0.2)
  580. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -0.5+(change*2)*math.sin(sine/2), 0) * CFrame.Angles(math.rad(30+(change*20)-(movement/20)*math.cos(sine/2)), torsorotY2+math.rad(0-20*math.sin(sine/4)), torsorotY2+math.rad(0-1*math.cos(sine/4))), 0.1)
  581. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5,(-0.85-(movement/15)*math.cos(sine/4)/2),-0.1+(movement/15)*math.cos(sine/4))*CFrame.Angles(math.rad(-50+(change*5)-movement*math.cos(sine/4))+ -(movement/10)*math.sin(sine/4),math.rad(0+(movement*2)*math.cos(sine/4)),math.rad(0)), 0.2)
  582. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5,(-0.85+(movement/15)*math.cos(sine/4)/2),-0.1-(movement/15)*math.cos(sine/4))*CFrame.Angles(math.rad(-50+(change*5)+movement*math.cos(sine/4))+ (movement/10)*math.sin(sine/4),math.rad(0+(movement*2)*math.cos(sine/4)),math.rad(0)), 0.2)
  583. elseif jumped == true then
  584. didjump = true
  585. jumppower = root.Velocity.Y
  586. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0, 1.5, -.1) * CFrame.Angles(0,0,0), 0.4)
  587. hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.Angles(0,0,0), 0.1)
  588. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.55,0) * CFrame.Angles(math.rad(0),math.rad(0), math.rad(0)), 0.1)
  589. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.55,0) * CFrame.Angles(math.rad(0),math.rad(0), math.rad(0)), 0.1)
  590. torso.Weld.C0 = CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(math.random(-90,90)),math.rad(0), math.rad(math.random(-180,180)))
  591. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5,-0.925,0) * CFrame.Angles(math.rad(0),math.rad(0), math.rad(0)), 0.1)
  592. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5,0,-0.8) * CFrame.Angles(math.rad(0),math.rad(0), math.rad(0)), 0.1)
  593. elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude < 5 then
  594. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0, 1.5, -.1), 0.4)
  595. hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.Angles(math.rad(0+50*math.sin(sine/4)),0,0), 0.1)
  596. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.55,-0.05-0.2*math.cos(sine/4))*CFrame.Angles(math.rad(0+80*math.sin(sine/4)),math.rad(-5-5*math.sin(sine/8)),math.rad(-6+2*math.cos(sine/8))), 0.2)
  597. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.55,-0.05-0.2*math.cos(sine/4))*CFrame.Angles(math.rad(0+80*math.sin(sine/4)),math.rad(5+5*math.sin(sine/8)),math.rad(6-2*math.cos(sine/8))), 0.2)
  598. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1.1-hum.HipHeight, 0+2*math.cos(sine/4)) * CFrame.Angles(math.rad(0-80*math.cos(sine/4)),math.rad(0), math.rad(0-1*math.cos(sine/32))), 0.1)
  599. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(0,llegendPoint.Y-lleg.Position.Y,0)*CFrame.new(-0.5,0,0)*CFrame.Angles(math.rad(0+120*math.cos(sine/4)),math.rad(10),math.rad(-5+1*math.cos(sine/16))), 0.1)
  600. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0,rlegendPoint.Y-rleg.Position.Y,0)*CFrame.new(0.5,0,0)*CFrame.Angles(math.rad(0+120*math.cos(sine/4)),math.rad(-10),math.rad(5+1*math.cos(sine/16))), 0.1)
  601. end
  602.  
  603. else
  604. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0, 1.5, -.1), 0.4)
  605. hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.Angles(0.05*math.sin(sine/16)+0.15,0.05*math.cos(sine/32),0.01*math.cos(sine/32)), 0.1)
  606. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.55-(0.1)*math.cos(sine/16)/3,-0.05-0.1*math.cos(sine/16))*CFrame.Angles(math.rad(-2+4*math.sin(sine/16)),math.rad(-5-5*math.sin(sine/16)),math.rad(-6+2*math.cos(sine/16))), 0.2)
  607. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.55-(0.1)*math.cos(sine/16)/3,-0.05-0.1*math.cos(sine/16))*CFrame.Angles(math.rad(-2+4*math.sin(sine/16)),math.rad(5+5*math.sin(sine/16)),math.rad(6-2*math.cos(sine/16))), 0.2)
  608. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1.4-(0.1)*math.cos(sine/16)-hum.HipHeight, 0) * CFrame.Angles(math.rad(0-2*math.cos(sine/16)),math.rad(0), math.rad(0-1*math.cos(sine/32))), 0.1)
  609. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5,-0.55+(0.1)*math.cos(sine/16),0)*CFrame.Angles(math.rad(80+2*math.cos(sine/16)),math.rad(4),math.rad(-2+1*math.cos(sine/32))), 0.2)
  610. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5,-0.55+(0.1)*math.cos(sine/16),0)*CFrame.Angles(math.rad(80+2*math.cos(sine/16)),math.rad(-4),math.rad(2+1*math.cos(sine/32))), 0.2)
  611. end
  612.  
  613. end
  614. if didjump == true and jumped == false and jumppower < 0 then
  615. didjump = false
  616. jumpimpact()
  617. end
  618.  
  619. sine = sine + change
  620. hum.Health = math.huge
  621. hum.MaxHealth = math.huge
  622. end
  623. end
  624. end)
  625.     end
  626.     end
  627. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement