SHARE
TWEET

Pacifist

AndrewTheMaster May 3rd, 2017 173 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- params : ...
  2.  
  3. --decompiled by blyat
  4. --ben for making me not lazy
  5. --fixed by kent911t
  6.  
  7. script.Parent = nil
  8. Character = game.Players.LocalPlayer.Character
  9. Humanoid = Character.Humanoid
  10. if Humanoid:findFirstChild("Animate") then
  11.   Humanoid:findFirstChild("Animate"):Destroy()
  12. end
  13. Player = game:GetService("Players").LocalPlayer
  14. Character = Player.Character
  15. PlayerGui = Player.PlayerGui
  16. Backpack = Player.Backpack
  17. Torso = Character.Torso
  18. Head = Character.Head
  19. Humanoid = Character.Humanoid
  20. m = Instance.new("Model", Character)
  21. LeftArm = Character["Left Arm"]
  22. LeftLeg = Character["Left Leg"]
  23. RightArm = Character["Right Arm"]
  24. RightLeg = Character["Right Leg"]
  25. LS = Torso["Left Shoulder"]
  26. LH = Torso["Left Hip"]
  27. RS = Torso["Right Shoulder"]
  28. RH = Torso["Right Hip"]
  29. Face = Head.face
  30. Neck = Torso.Neck
  31. attacktype = 1
  32. vt = Vector3.new
  33. cf = CFrame.new
  34. euler = CFrame.fromEulerAnglesXYZ
  35. angles = CFrame.Angles
  36. cloaked = false
  37. necko = cf(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  38. necko2 = cf(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  39. LHC0 = cf(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  40. LHC1 = cf(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  41. RHC0 = cf(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  42. RHC1 = cf(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  43. RootPart = Character.HumanoidRootPart
  44. RootJoint = RootPart.RootJoint
  45. RootCF = euler(-1.57, 0, 3.14)
  46. attack = false
  47. attackdebounce = false
  48. deb = false
  49. equipped = true
  50. hand = false
  51. MMouse = nil
  52. combo = 0
  53. mana = 0
  54. trispeed = 0.2
  55. attackmode = "none"
  56. local idle = 0
  57. local Anim = "Idle"
  58. local gun = false
  59. local shoot = false
  60. player = nil
  61. mana = 0
  62. local defensevalue = 0.3
  63. local speedvalue = 1
  64. local damagevalue = 1
  65. local cf = CFrame.new
  66. local mr = math.rad
  67. local angles = CFrame.Angles
  68. local ud = UDim2.new
  69. local c3 = Color3.new
  70. local stats = Instance.new("Folder", Character)
  71. stats.Name = "Stats"
  72. local block = Instance.new("BoolValue", stats)
  73. block.Name = "Block"
  74. block.Value = false
  75. local stun = Instance.new("BoolValue", stats)
  76. stun.Name = "Stun"
  77. stun.Value = false
  78. local defense = Instance.new("NumberValue", stats)
  79. defense.Name = "Defence"
  80. defense.Value = defensevalue
  81. local speed = Instance.new("NumberValue", stats)
  82. speed.Name = "Speed"
  83. speed.Value = speedvalue
  84. local damagea = Instance.new("NumberValue", stats)
  85. damagea.Name = "Damage"
  86. damagea.Value = damagevalue
  87. Humanoid = Character.Humanoid
  88. if Humanoid:FindFirstChild("Animator") then
  89.   Humanoid:FindFirstChild("Animator"):Destroy()
  90. end
  91. Humanoid.WalkSpeed = 3
  92. Colorpart1 = Torso.BrickColor.r
  93. Colorpart2 = Torso.BrickColor.g
  94. Colorpart3 = Torso.BrickColor.b
  95. CloakEffectLight2 = Instance.new("PointLight", Torso)
  96. CloakEffectLight2.Color = Color3.new(Colorpart1, Colorpart2, Colorpart3)
  97. CloakEffectLight2.Range = 7.5
  98. CloakEffectLight2.Brightness = 7.5
  99. CloakEffectLight2.Enabled = true
  100. mouse = Player:GetMouse()
  101. RSH = nil
  102. LSH = nil
  103. RW = Instance.new("Motor")
  104. LW = Instance.new("Motor")
  105. RW.Name = "Right Shoulder"
  106. LW.Name = "Left Shoulder"
  107. LH = Torso["Left Hip"]
  108. RH = Torso["Right Hip"]
  109. TorsoColor = Torso.BrickColor
  110. NoOutline = function(Part)
  111.  
  112.   Part.TopSurface = 10
  113. end
  114.  
  115. player = Player
  116. ch = Character
  117. RSH = ch.Torso["Right Shoulder"]
  118. LSH = ch.Torso["Left Shoulder"]
  119. RSH.Parent = nil
  120. LSH.Parent = nil
  121. RW.Name = "Right Shoulder"
  122. RW.Part0 = ch.Torso
  123. RW.C0 = cf(1.5, 0.5, 0)
  124. RW.C1 = cf(0, 0.5, 0)
  125. RW.Part1 = ch["Right Arm"]
  126. RW.Parent = ch.Torso
  127. LW.Name = "Left Shoulder"
  128. LW.Part0 = ch.Torso
  129. LW.C0 = cf(-1.5, 0.5, 0)
  130. LW.C1 = cf(0, 0.5, 0)
  131. LW.Part1 = ch["Left Arm"]
  132. LW.Parent = ch.Torso
  133. local weldBetween = function(a, b)
  134.  
  135.   local weldd = Instance.new("ManualWeld")
  136.   weldd.Part0 = a
  137.   weldd.Part1 = b
  138.   weldd.C0 = CFrame.new()
  139.   weldd.C1 = b.CFrame:inverse() * a.CFrame
  140.   weldd.Parent = a
  141.   return weldd
  142. end
  143.  
  144. fat = Instance.new("BindableEvent", script)
  145. fat.Name = "Heartbeat"
  146. script:WaitForChild("Heartbeat")
  147. frame = 1/30
  148. tf = 0
  149. allowframeloss = false
  150. tossremainder = false
  151. lastframe = tick()
  152. script.Heartbeat:Fire()
  153. game:GetService("RunService").Heartbeat:connect(function(s, p)
  154.  
  155.   tf = tf + s
  156.   if frame <= tf then
  157.     if allowframeloss then
  158.       script.Heartbeat:Fire()
  159.       lastframe = tick()
  160.     else
  161.       for i = 1, math.floor(tf / frame) do
  162.         script.Heartbeat:Fire()
  163.       end
  164.       lastframe = tick()
  165.     end
  166.     if tossremainder then
  167.       tf = 0
  168.     else
  169.       tf = tf - frame * math.floor(tf / frame)
  170.     end
  171.   end
  172. end
  173. )
  174. local CFrameFromTopBack = function(at, top, back)
  175.  
  176.   local right = top:Cross(back)
  177.   return CFrame.new(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z)
  178. end
  179.  
  180. Triangle = function(a, b, c)
  181.  
  182.   local edg1 = c - a:Dot(b - a.unit)
  183.   local edg2 = a - b:Dot(c - b.unit)
  184.   local edg3 = b - c:Dot(a - c.unit)
  185.   if edg1 <= b - a.magnitude and edg1 >= 0 then
  186.     a = a
  187.   else
  188.     -- DECOMPILER ERROR at PC35: Overwrote pending register: R1 in 'AssignReg'
  189.  
  190.     if edg2 <= c - b.magnitude and edg2 >= 0 then
  191.       a = b
  192.     else
  193.       -- DECOMPILER ERROR at PC46: Overwrote pending register: R2 in 'AssignReg'
  194.  
  195.       -- DECOMPILER ERROR at PC47: Overwrote pending register: R1 in 'AssignReg'
  196.  
  197.       if edg3 <= a - c.magnitude and edg3 >= 0 then
  198.         a = c
  199.       else
  200.         assert(false, "unreachable")
  201.       end
  202.     end
  203.   end
  204.   local len1 = c - a:Dot(b - a.unit)
  205.   local len2 = b - a.magnitude - len1
  206.   local width = a + b - a.unit * len1 - c.magnitude
  207.   local maincf = CFrameFromTopBack(a, b - a:Cross(c - b).unit, -b - a.unit)
  208.   local list = {}
  209.   local TrailColor = "Dark grey"
  210.   if len1 > 0.01 then
  211.     local w1 = Instance.new("WedgePart", m)
  212.     game:GetService("Debris"):AddItem(w1, 5)
  213.     w1.Material = "SmoothPlastic"
  214.     w1.FormFactor = "Custom"
  215.     w1.BrickColor = BrickColor.new(TrailColor)
  216.     w1.Transparency = 0
  217.     w1.Reflectance = 0
  218.     w1.Material = "SmoothPlastic"
  219.     w1.CanCollide = false
  220.     NoOutline(w1)
  221.     local sz = Vector3.new(0.2, width, len1)
  222.     w1.Size = sz
  223.     local sp = Instance.new("SpecialMesh", w1)
  224.     sp.MeshType = "Wedge"
  225.     sp.Scale = Vector3.new(0, 1, 1) * sz / w1.Size
  226.     w1:BreakJoints()
  227.     w1.Anchored = true
  228.     w1.Parent = workspace
  229.     w1.Transparency = 0.7
  230.     table.insert(Effects, {w1, "Disappear", 0.01})
  231.     w1.CFrame = maincf * CFrame.Angles(math.pi, 0, math.pi / 2) * CFrame.new(0, width / 2, len1 / 2)
  232.     table.insert(list, w1)
  233.   end
  234.   do
  235.     if len2 > 0.01 then
  236.       local w2 = Instance.new("WedgePart", m)
  237.       game:GetService("Debris"):AddItem(w2, 5)
  238.       w2.Material = "SmoothPlastic"
  239.       w2.FormFactor = "Custom"
  240.       w2.BrickColor = BrickColor.new(TrailColor)
  241.       w2.Transparency = 0
  242.       w2.Reflectance = 0
  243.       w2.Material = "SmoothPlastic"
  244.       w2.CanCollide = false
  245.       NoOutline(w2)
  246.       local sz = Vector3.new(0.2, width, len2)
  247.       w2.Size = sz
  248.       local sp = Instance.new("SpecialMesh", w2)
  249.       sp.MeshType = "Wedge"
  250.       sp.Scale = Vector3.new(0, 1, 1) * sz / w2.Size
  251.       w2:BreakJoints()
  252.       w2.Anchored = true
  253.       w2.Parent = workspace
  254.       w2.Transparency = 0.7
  255.       table.insert(Effects, {w2, "Disappear", 0.01})
  256.       w2.CFrame = maincf * CFrame.Angles(math.pi, math.pi, -math.pi / 2) * CFrame.new(0, width / 2, -len1 - len2 / 2)
  257.       table.insert(list, w2)
  258.     end
  259.     do
  260.       return unpack(list)
  261.     end
  262.   end
  263. end
  264.  
  265. rayCast = function(Pos, Dir, Max, Ignore)
  266.  
  267.   return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  268. end
  269.  
  270. clerp = function(a, b, t)
  271.  
  272.   local qa = {QuaternionFromCFrame(a)}
  273.   local qb = {QuaternionFromCFrame(b)}
  274.   local ax, ay, az = a.x, a.y, a.z
  275.   local bx, by, bz = b.x, b.y, b.z
  276.   local _t = 1 - t
  277.   return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  278. end
  279.  
  280. local clerp = CFrame.new().lerp
  281. QuaternionFromCFrame = function(cf)
  282.  
  283.   local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  284.   local trace = m00 + m11 + m22
  285.   if trace > 0 then
  286.     local s = math.sqrt(1 + trace)
  287.     local recip = 0.5 / s
  288.     return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  289.   else
  290.     do
  291.       local i = 0
  292.       if m00 < m11 then
  293.         i = 1
  294.       end
  295.       if i == 0 and m00 or m11 < m22 then
  296.         i = 2
  297.       end
  298.       if i == 0 then
  299.         local s = math.sqrt(m00 - m11 - m22 + 1)
  300.         local recip = 0.5 / s
  301.         return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  302.       else
  303.         do
  304.           if i == 1 then
  305.             local s = math.sqrt(m11 - m22 - m00 + 1)
  306.             local recip = 0.5 / s
  307.             return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  308.           else
  309.             do
  310.               if i == 2 then
  311.                 local s = math.sqrt(m22 - m00 - m11 + 1)
  312.                 local recip = 0.5 / s
  313.                 return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  314.               end
  315.             end
  316.           end
  317.         end
  318.       end
  319.     end
  320.   end
  321. end
  322.  
  323. QuaternionToCFrame = function(px, py, pz, x, y, z, w)
  324.  
  325.   local xs, ys, zs = x + x, y + y, z + z
  326.   local wx, wy, wz = w * xs, w * ys, w * zs
  327.   local xx = x * xs
  328.   local xy = x * ys
  329.   local xz = x * zs
  330.   local yy = y * ys
  331.   local yz = y * zs
  332.   local zz = z * zs
  333.   return CFrame.new(px, py, pz, 1 - (yy + zz), xy - wz, xz + wy, xy + wz, 1 - (xx + zz), yz - wx, xz - wy, yz + wx, 1 - (xx + yy))
  334. end
  335.  
  336. QuaternionSlerp = function(a, b, t)
  337.  
  338.   local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  339.   local startInterp, finishInterp = nil, nil
  340.   if cosTheta >= 0.0001 then
  341.     if 1 - cosTheta > 0.0001 then
  342.       local theta = math.acos(cosTheta)
  343.       local invSinTheta = 1 / math.sin(theta)
  344.       startInterp = math.sin((1 - t) * theta) * invSinTheta
  345.       finishInterp = math.sin(t * theta) * invSinTheta
  346.     else
  347.       do
  348.         startInterp = 1 - t
  349.         finishInterp = t
  350.         if 1 + cosTheta > 0.0001 then
  351.           local theta = math.acos(-cosTheta)
  352.           local invSinTheta = 1 / math.sin(theta)
  353.           startInterp = math.sin((t - 1) * theta) * invSinTheta
  354.           finishInterp = math.sin(t * theta) * invSinTheta
  355.         else
  356.           do
  357.             startInterp = t - 1
  358.             finishInterp = t
  359.             return a[1] * (startInterp) + b[1] * finishInterp, a[2] * (startInterp) + b[2] * finishInterp, a[3] * (startInterp) + b[3] * finishInterp, a[4] * (startInterp) + b[4] * finishInterp
  360.           end
  361.         end
  362.       end
  363.     end
  364.   end
  365. end
  366.  
  367. sitting = false
  368. resting = false
  369. meditating = false
  370. sprint = false
  371. mouse.Button1Down:connect(function()
  372.  
  373. end
  374. )
  375. print("Only instinct left is survival.")
  376. mouse.KeyDown:connect(function(k)
  377.  
  378.   k = k:lower()
  379.   if k == "z" and attack == false and resting == false and sprint == false and meditating == false then
  380.     attack = true
  381.     if sitting == false then
  382.       sitting = true
  383.       Humanoid.WalkSpeed = 0
  384.       for i = 0, 1, 0.04 do
  385.         fat.Event:wait()
  386.         RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, -1.25) * angles(math.rad(0), math.rad(15), math.rad(0)), 0.15)
  387.         Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * cf(0, 0, 0) * angles(math.rad(20), math.rad(0), math.rad(30)), 0.15)
  388.         RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(20)), 0.15)
  389.         LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.3, 0) * angles(math.rad(15), math.rad(0), math.rad(-25)), 0.15)
  390.         RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(-60), math.rad(90), math.rad(0)) * angles(math.rad(-2.5), math.rad(0), math.rad(0)), 0.15)
  391.         LH.C0 = clerp(LH.C0, cf(-0.75, 0.25, -1) * angles(math.rad(-15), math.rad(-90), math.rad(0)) * angles(math.rad(-15), math.rad(0), math.rad(0)), 0.15)
  392.       end
  393.     elseif sitting == true then
  394.           sitting = false
  395.           for i = 0, 1, 0.04 do
  396.             fat.Event:wait()
  397.             RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, -1.25) * angles(math.rad(0), math.rad(15), math.rad(0)), 0.15)
  398.             Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * cf(0, 0, 0) * angles(math.rad(20), math.rad(0), math.rad(30)), 0.15)
  399.             RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(20)), 0.15)
  400.             LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.3, 0) * angles(math.rad(15), math.rad(0), math.rad(-25)), 0.15)
  401.             RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(-60), math.rad(90), math.rad(0)) * angles(math.rad(-2.5), math.rad(0), math.rad(0)), 0.15)
  402.             LH.C0 = clerp(LH.C0, cf(-0.75, 0.25, -1) * angles(math.rad(-15), math.rad(-90), math.rad(0)) * angles(math.rad(-15), math.rad(0), math.rad(0)), 0.15)
  403.           end
  404.           Humanoid.WalkSpeed = 3
  405.         end
  406.         attack = false
  407. end
  408.         if k == "x" and attack == false and sitting == false and sprint == false and meditating == false then
  409.           attack = true
  410.           if resting == false then
  411.             resting = true
  412.             Humanoid.WalkSpeed = 0
  413.             for i = 0, 1, 0.04 do
  414.               fat.Event:wait()
  415.               RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, -1.05) * angles(math.rad(0), math.rad(15), math.rad(0)), 0.15)
  416.               Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * cf(0, 0, 0) * angles(math.rad(20), math.rad(0), math.rad(30)), 0.15)
  417.               RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(20)), 0.15)
  418.               LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.1, 0) * angles(math.rad(15), math.rad(0), math.rad(-25)), 0.15)
  419.               RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(-40), math.rad(90), math.rad(0)) * angles(math.rad(-2.5), math.rad(0), math.rad(0)), 0.15)
  420.               LH.C0 = clerp(LH.C0, cf(-0.75, 0.05, -1) * angles(math.rad(-15), math.rad(-90), math.rad(0)) * angles(math.rad(-15), math.rad(0), math.rad(0)), 0.15)
  421.             end
  422.           elseif resting == true then
  423.                 resting = false
  424.                 for i = 0, 1, 0.04 do
  425.                   fat.Event:wait()
  426.                   RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, -1.05) * angles(math.rad(0), math.rad(15), math.rad(0)), 0.15)
  427.                   Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * cf(0, 0, 0) * angles(math.rad(20), math.rad(0), math.rad(30)), 0.15)
  428.                   RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(20)), 0.15)
  429.                   LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.1, 0) * angles(math.rad(15), math.rad(0), math.rad(-25)), 0.15)
  430.                   RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(-40), math.rad(90), math.rad(0)) * angles(math.rad(-2.5), math.rad(0), math.rad(0)), 0.15)
  431.                   LH.C0 = clerp(LH.C0, cf(-0.75, 0.05, -1) * angles(math.rad(-15), math.rad(-90), math.rad(0)) * angles(math.rad(-15), math.rad(0), math.rad(0)), 0.15)
  432.                 end
  433.                 Humanoid.WalkSpeed = 3
  434.               end
  435.               attack = false
  436. end
  437.               if k == "c" and attack == false and sitting == false and resting == false and sprint == false then
  438.                 attack = true
  439.                 if meditating == false then
  440.                   meditating = true
  441.                   Humanoid.WalkSpeed = 0
  442.                   for i = 0, 1, 0.04 do
  443.                     fat.Event:wait()
  444.                     RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, -1.05) * angles(math.rad(0), math.rad(15), math.rad(0)), 0.15)
  445.                     Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * cf(0, 0, 0) * angles(math.rad(20), math.rad(0), math.rad(30)), 0.15)
  446.                     RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(20)), 0.15)
  447.                     LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.1, 0) * angles(math.rad(15), math.rad(0), math.rad(-25)), 0.15)
  448.                     RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(-40), math.rad(90), math.rad(0)) * angles(math.rad(-2.5), math.rad(0), math.rad(0)), 0.15)
  449.                     LH.C0 = clerp(LH.C0, cf(-0.75, 0.05, -1) * angles(math.rad(-15), math.rad(-90), math.rad(0)) * angles(math.rad(-15), math.rad(0), math.rad(0)), 0.15)
  450.                   end
  451.                 elseif meditating == true then
  452.                       meditating = false
  453.                       for i = 0, 1, 0.04 do
  454.                         fat.Event:wait()
  455.                         RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, -1.05) * angles(math.rad(0), math.rad(15), math.rad(0)), 0.15)
  456.                         Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * cf(0, 0, 0) * angles(math.rad(20), math.rad(0), math.rad(30)), 0.15)
  457.                         RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(20)), 0.15)
  458.                         LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.1, 0) * angles(math.rad(15), math.rad(0), math.rad(-25)), 0.15)
  459.                         RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(-40), math.rad(90), math.rad(0)) * angles(math.rad(-2.5), math.rad(0), math.rad(0)), 0.15)
  460.                         LH.C0 = clerp(LH.C0, cf(-0.75, 0.05, -1) * angles(math.rad(-15), math.rad(-90), math.rad(0)) * angles(math.rad(-15), math.rad(0), math.rad(0)), 0.15)
  461.                       end
  462.                       Humanoid.WalkSpeed = 3
  463.                     end
  464.                     attack = false
  465. end
  466.                     if k == "e" and attack == false and resting == false and sitting == false and meditating == false and sprint == false then
  467.                       sprint = true
  468.                       Humanoid.WalkSpeed = 16
  469.                     end
  470.                   end
  471. )
  472. mouse.KeyUp:connect(function(k)
  473.  
  474.   if k == "e" and attack == false and resting == false and sitting == false and meditating == false and sprint == true then
  475.     sprint = false
  476.     Humanoid.WalkSpeed = 3
  477.   end
  478. end
  479. )
  480. local sine = 0
  481. local change = 1
  482. local val = 0
  483. fat.Event:connect(function()
  484.  
  485.   sine = sine + change
  486.   local torvel = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  487.     local velderp = RootPart.Velocity.y
  488.     hitfloor = rayCast(RootPart.Position, CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0)).lookVector, 4, Character)
  489.     if equipped == true or equipped == false then
  490.       if attack == false then
  491.         idle = idle + 1
  492.       else
  493.         idle = 0
  494.       end
  495.       if ((idle >= 500 and attack ~= false) or RootPart.Velocity.y > 1) and hitfloor == nil then
  496.         Anim = "Jump"
  497.         if attack == false then
  498.           change = 1
  499.           RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(-5), math.rad(0), math.rad(0)), 0.15)
  500.           Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * cf(0, 0, 0) * angles(math.rad(-10), math.rad(0), math.rad(0)), 0.15)
  501.           RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(20)), 0.15)
  502.           LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-20)), 0.15)
  503.           RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(-20), math.rad(90), math.rad(0)) * angles(math.rad(-10), math.rad(0), math.rad(0)), 0.15)
  504.           LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(-20), math.rad(-90), math.rad(0)) * angles(math.rad(-10), math.rad(0), math.rad(0)), 0.15)
  505.         end
  506.       elseif RootPart.Velocity.y < -1 and hitfloor == nil then
  507.           Anim = "Fall"
  508.           if attack == false then
  509.             change = 1
  510.             RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(5), math.rad(0), math.rad(0)), 0.15)
  511.             Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * cf(0, 0, 0) * angles(math.rad(10), math.rad(0), math.rad(0)), 0.15)
  512.             RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(10), math.rad(0), math.rad(10)), 0.15)
  513.             LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(10), math.rad(0), math.rad(-10)), 0.15)
  514.             RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(10), math.rad(90), math.rad(0)) * angles(math.rad(-5), math.rad(0), math.rad(0)), 0.15)
  515.             LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(-10), math.rad(-90), math.rad(0)) * angles(math.rad(-5), math.rad(0), math.rad(0)), 0.15)
  516.           end
  517.         elseif torvel < 1 and hitfloor ~= nil then
  518.             Anim = "Idle"
  519.             if attack == false and sitting == false and resting == false and meditating == false then
  520.               change = 1
  521.               RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, -0.1 + 0.1 * math.cos(sine / 30)) * angles(math.rad(-2.5 * math.cos(sine / 30)), math.rad(0), math.rad(0)), 0.15)
  522.               Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * cf(0, 0, 0) * angles(math.rad(-5 * math.cos(sine / 30)) + -math.sin(sine / 30) / 15, math.rad(0), math.rad(0)), 0.15)
  523.               RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.55 + 0.05 * math.cos(sine / 30) + -math.sin(sine / 30) / 40, 0) * angles(math.rad(5 - 2.5 * math.cos(sine / 30)), math.rad(0), math.rad(10 + 5 * math.cos(sine / 30)) + math.sin(sine / 30) / 20), 0.15)
  524.               LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.55 + 0.05 * math.cos(sine / 30) + -math.sin(sine / 30) / 40, 0) * angles(math.rad(5 - 2.5 * math.cos(sine / 30)), math.rad(0), math.rad(-10 - 5 * math.cos(sine / 30)) + -math.sin(sine / 30) / 20), 0.15)
  525.               RH.C0 = clerp(RH.C0, cf(1, -0.9 - 0.1 * math.cos(sine / 30), 0.025 * math.cos(sine / 30)) * angles(math.rad(-2.5 * math.cos(sine / 30)), math.rad(90), math.rad(0)) * angles(math.rad(-2.5), math.rad(0), math.rad(0)), 0.15)
  526.               LH.C0 = clerp(LH.C0, cf(-1, -0.9 - 0.1 * math.cos(sine / 30), 0.025 * math.cos(sine / 30)) * angles(math.rad(-2.5 * math.cos(sine / 30)), math.rad(-90), math.rad(0)) * angles(math.rad(-2.5), math.rad(0), math.rad(0)), 0.15)
  527.             elseif attack == false and sitting == true and resting == false and meditating == false then
  528.                 change = 1
  529.                 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, -1.9) * angles(math.rad(-45 - 2.5 * math.cos(sine / 30)), math.rad(0), math.rad(0)), 0.15)
  530.                 Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * cf(0, 0, 0) * angles(math.rad(-5 * math.cos(sine / 30)) + -math.sin(sine / 30) / 15, math.rad(0), math.rad(0)), 0.15)
  531.                 RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.45, 0) * angles(math.rad(-45 - 2.5 * math.cos(sine / 30)), math.rad(0), math.rad(10)), 0.15)
  532.                 LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.45, 0) * angles(math.rad(-45 - 2.5 * math.cos(sine / 30)), math.rad(0), math.rad(-10)), 0.15)
  533.                 RH.C0 = clerp(RH.C0, cf(1, -1, 0.025 * math.cos(sine / 30)) * angles(math.rad(45 - 2.5 * math.cos(sine / 30)), math.rad(90), math.rad(0)) * angles(math.rad(-2.5), math.rad(0), math.rad(0)), 0.15)
  534.                 LH.C0 = clerp(LH.C0, cf(-1, -1, 0.025 * math.cos(sine / 30)) * angles(math.rad(45 - 2.5 * math.cos(sine / 30)), math.rad(-90), math.rad(0)) * angles(math.rad(-2.5), math.rad(0), math.rad(0)), 0.15)
  535.               elseif attack == false and sitting == false and resting == true and meditating == false then
  536.                   change = 1
  537.                   RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, -2.3) * angles(math.rad(-80 - 1 * math.cos(sine / 30)), math.rad(0), math.rad(0)), 0.15)
  538.                   Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * cf(0, 0, 0) * angles(math.rad(5 - 1 * math.cos(sine / 30)) + -math.sin(sine / 30) / 15, math.rad(0), math.rad(0)), 0.15)
  539.                   RW.C0 = clerp(RW.C0, CFrame.new(1, 0.75, 0.1) * angles(math.rad(215 - 1 * math.cos(sine / 30)), math.rad(0), math.rad(-45)), 0.15)
  540.                   LW.C0 = clerp(LW.C0, CFrame.new(-1, 0.75, 0.1) * angles(math.rad(200 - 1 * math.cos(sine / 30)), math.rad(0), math.rad(45)), 0.15)
  541.                   RH.C0 = clerp(RH.C0, cf(1, -1, 0.025 * math.cos(sine / 30)) * angles(math.rad(25 - 1 * math.cos(sine / 30)), math.rad(90), math.rad(0)) * angles(math.rad(20), math.rad(0), math.rad(0)), 0.15)
  542.                   LH.C0 = clerp(LH.C0, cf(-1, -1, 0.025 * math.cos(sine / 30)) * angles(math.rad(10 - 1 * math.cos(sine / 30)), math.rad(-90), math.rad(0)) * angles(math.rad(20), math.rad(0), math.rad(0)), 0.15)
  543.                 elseif attack == false and sitting == false and resting == false and meditating == true then
  544.                     change = 1
  545.                     RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, -1.9) * angles(math.rad(10 - 1 * math.cos(sine / 30)), math.rad(0), math.rad(0)), 0.15)
  546.                     Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * cf(0, 0, 0) * angles(math.rad(10 - 1 * math.cos(sine / 30)) + -math.sin(sine / 30) / 15, math.rad(0), math.rad(0)), 0.15)
  547.                     RW.C0 = clerp(RW.C0, CFrame.new(1.25, 0.5, -0.5) * angles(math.rad(0), math.rad(165), math.rad(90)), 0.15)
  548.                     LW.C0 = clerp(LW.C0, CFrame.new(-1.25, 0.5, -0.5) * angles(math.rad(0), math.rad(-165), math.rad(-90)), 0.15)
  549.                     RH.C0 = clerp(RH.C0, cf(1, -1, 0.1) * angles(math.rad(-30), math.rad(75), math.rad(0)) * angles(math.rad(80), math.rad(0), math.rad(0)), 0.15)
  550.                     LH.C0 = clerp(LH.C0, cf(-1, -1, 0.1) * angles(math.rad(-30), math.rad(-75), math.rad(0)) * angles(math.rad(80), math.rad(0), math.rad(0)), 0.15)
  551.                   end
  552.           elseif torvel > 2 and torvel < 22 and hitfloor ~= nil then
  553.               Anim = "Walk"
  554.               if attack == false and sprint == false then
  555.                 change = 0.5
  556.                 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, -0.175 + 0.025 * math.cos(sine / 3.5) + -math.sin(sine / 3.5) / 7) * angles(math.rad(5 - 2.5 * math.cos(sine / 3.5)), math.rad(0), math.rad(10 * math.cos(sine / 7))), 0.15)
  557.                 Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * cf(0, 0, 0 + 0.025 * math.cos(sine / 3.5)) * angles(math.rad(0 - 2.5 * math.cos(sine / 3.5)), math.rad(1.5 * math.cos(sine / 7)), math.rad(-7.5 * math.cos(sine / 7))), 0.15)
  558.                 RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(30 * math.cos(sine / 7)) + math.sin(sine / 7) / 2.5, math.rad(0), math.rad(10)), 0.15)
  559.                 LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-30 * math.cos(sine / 7)) + -math.sin(sine / 7) / 2.5, math.rad(0), math.rad(-10)), 0.15)
  560.                 RH.C0 = clerp(RH.C0, cf(1, -0.925 - 0.5 * math.cos(sine / 7) / 2, 0.5 * math.cos(sine / 7) / 2) * angles(math.rad(-15 - 15 * math.cos(sine / 7)) + -math.sin(sine / 7) / 2.5, math.rad(90 - 10 * math.cos(sine / 7)), math.rad(0)) * angles(math.rad(0 + 2.5 * math.cos(sine / 7)), math.rad(0), math.rad(0)), 0.15)
  561.                 LH.C0 = clerp(LH.C0, cf(-1, -0.925 + 0.5 * math.cos(sine / 7) / 2, -0.5 * math.cos(sine / 7) / 2) * angles(math.rad(-15 + 15 * math.cos(sine / 7)) + math.sin(sine / 7) / 2.5, math.rad(-90 - 10 * math.cos(sine / 7)), math.rad(0)) * angles(math.rad(0 - 2.5 * math.cos(sine / 7)), math.rad(0), math.rad(0)), 0.15)
  562.               elseif attack == false and sprint == true then
  563.                   change = 1
  564.                   RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, -0.1 + 0.1 * math.cos(sine / 3.5) + -math.sin(sine / 3.5) / 7) * angles(math.rad(5 - 2.5 * math.cos(sine / 3.5)), math.rad(0), math.rad(10 * math.cos(sine / 7))), 0.15)
  565.                   Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * cf(0, 0, 0 + 0.025 * math.cos(sine / 3.5)) * angles(math.rad(0 - 2.5 * math.cos(sine / 3.5)), math.rad(1.5 * math.cos(sine / 7)), math.rad(-7.5 * math.cos(sine / 7))), 0.15)
  566.                   RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(45 * math.cos(sine / 7)) + math.sin(sine / 7) / 2.5, math.rad(0), math.rad(10)), 0.15)
  567.                   LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-45 * math.cos(sine / 7)) + -math.sin(sine / 7) / 2.5, math.rad(0), math.rad(-10)), 0.15)
  568.                   RH.C0 = clerp(RH.C0, cf(1, -0.9 - 0.25 * math.cos(sine / 7) / 2, 0.5 * math.cos(sine / 7) / 2) * angles(math.rad(-15 - 45 * math.cos(sine / 7)) + -math.sin(sine / 7) / 2.5, math.rad(90 - 10 * math.cos(sine / 7)), math.rad(0)) * angles(math.rad(0 + 2.5 * math.cos(sine / 7)), math.rad(0), math.rad(0)), 0.15)
  569.                   LH.C0 = clerp(LH.C0, cf(-1, -0.9 + 0.25 * math.cos(sine / 7) / 2, -0.5 * math.cos(sine / 7) / 2) * angles(math.rad(-15 + 45 * math.cos(sine / 7)) + math.sin(sine / 7) / 2.5, math.rad(-90 - 10 * math.cos(sine / 7)), math.rad(0)) * angles(math.rad(0 - 2.5 * math.cos(sine / 7)), math.rad(0), math.rad(0)), 0.15)
  570.                 end
  571.             elseif torvel < 22 and hitfloor ~= nil then
  572.                 Anim = "Run"
  573.               end
  574.     end
  575.     if attack == false then
  576.     end
  577.   end
  578. )
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top