Advertisement
plytalent

idk

Nov 14th, 2020 (edited)
781
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 9.12 KB | None | 0 0
  1. function LoadLibrary(a)
  2.     return loadstring(game:HttpGet("https://pastebin.com/raw/UfzKgS6T", true))()
  3. end
  4. loadstring(game:GetObjects("rbxassetid://4480871791")[1].Source)()
  5.  
  6. Character=workspace.CloneCharacter
  7. wait(1)
  8. print("Run")
  9. Torso=Character.Torso
  10. local tors = char.Torso
  11. Humanoid=Character.Humanoid
  12. LeftArm=Character["Left Arm"]
  13. LeftLeg=Character["Left Leg"]
  14. RightArm=Character["Right Arm"]
  15. RightLeg=Character["Right Leg"]
  16. LS=Torso["Left Shoulder"]
  17. LH=Torso["Left Hip"]
  18. RS=Torso["Right Shoulder"]
  19. RH=Torso["Right Hip"]
  20. Neck=Torso.Neck
  21. RootPart=Character.HumanoidRootPart
  22. RootJoint=RootPart.RootJoint
  23.  
  24. cf = CFrame.new
  25. angles = CFrame.Angles
  26. ROOTC0 =  RootJoint.C0
  27. NECKC0 = Torso.Neck.C0
  28. COS = math.cos
  29. ACOS = math.acos
  30. SIN = math.sin
  31. ASIN = math.asin
  32. ABS = math.abs
  33. MRANDOM = math.random
  34. FLOOR = math.floor
  35.  
  36.  
  37. cf=CFrame.new
  38. cn=CFrame.new
  39. euler=CFrame.fromEulerAnglesXYZ
  40. angles=CFrame.Angles
  41.  
  42.  
  43. RW, LW=Instance.new("Weld"), Instance.new("Weld")
  44. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  45. LH=Torso["Left Hip"]
  46. RH=Torso["Right Hip"]
  47.  
  48. RootCF=euler(-1.57,0,3.14)
  49. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  50.  
  51. RSH=Character.Torso["Right Shoulder"]
  52. LSH=Character.Torso["Left Shoulder"]
  53. --
  54. RSH.Parent=nil
  55. LSH.Parent=nil
  56. --
  57. RW.Name="Right Shoulder"
  58. RW.Part0=Character.Torso
  59. RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  60. RW.C1=cf(0, 0.5, 0)
  61. RW.Part1=Character["Right Arm"]
  62. RW.Parent=Character.Torso
  63. --
  64. LW.Name="Left Shoulder"
  65. LW.Part0=Character.Torso
  66. LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  67. LW.C1=cf(0, 0.5, 0)
  68. LW.Part1=Character["Left Arm"]
  69. LW.Parent=Character.Torso
  70.  
  71. function QuaternionSlerp(a, b, t)
  72.     local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  73.     local startInterp, finishInterp;
  74.     if cosTheta >= 0.0001 then
  75.         if (1 - cosTheta) > 0.0001 then
  76.             local theta = ACOS(cosTheta)
  77.             local invSinTheta = 1 / SIN(theta)
  78.             startInterp = SIN((1 - t) * theta) * invSinTheta
  79.             finishInterp = SIN(t * theta) * invSinTheta
  80.         else
  81.             startInterp = 1 - t
  82.             finishInterp = t
  83.         end
  84.     else
  85.         if (1 + cosTheta) > 0.0001 then
  86.             local theta = ACOS(-cosTheta)
  87.             local invSinTheta = 1 / SIN(theta)
  88.             startInterp = SIN((t - 1) * theta) * invSinTheta
  89.             finishInterp = SIN(t * theta) * invSinTheta
  90.         else
  91.             startInterp = t - 1
  92.             finishInterp = t
  93.         end
  94.     end
  95.     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
  96. end
  97.  
  98. function Clerp(a,b,t)
  99.     local qa = {QuaternionFromCFrame(a)}
  100.     local qb = {QuaternionFromCFrame(b)}
  101.     local ax, ay, az = a.x, a.y, a.z
  102.     local bx, by, bz = b.x, b.y, b.z
  103.     local _t = 1-t
  104.     return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  105. end
  106.  
  107. function QuaternionFromCFrame(cf)
  108.     local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  109.     local trace = m00 + m11 + m22
  110.     if trace > 0 then
  111.         local s = math.sqrt(1 + trace)
  112.         local recip = 0.5/s
  113.         return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  114.     else
  115.         local i = 0
  116.         if m11 > m00 then
  117.             i = 1
  118.         end
  119.         if m22 > (i == 0 and m00 or m11) then
  120.             i = 2
  121.         end
  122.         if i == 0 then
  123.             local s = math.sqrt(m00-m11-m22+1)
  124.             local recip = 0.5/s
  125.             return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  126.         elseif i == 1 then
  127.             local s = math.sqrt(m11-m22-m00+1)
  128.             local recip = 0.5/s
  129.             return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  130.         elseif i == 2 then
  131.             local s = math.sqrt(m22-m00-m11+1)
  132.             local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  133.         end
  134.     end
  135. end
  136.  
  137. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  138.     local xs, ys, zs = x + x, y + y, z + z
  139.     local wx, wy, wz = w*xs, w*ys, w*zs
  140.     local xx = x*xs
  141.     local xy = x*ys
  142.     local xz = x*zs
  143.     local yy = y*ys
  144.     local yz = y*zs
  145.     local zz = z*zs
  146.     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))
  147. end
  148.  
  149. function QuaternionSlerp(a, b, t)
  150.     local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  151.     local startInterp, finishInterp;
  152.     if cosTheta >= 0.0001 then
  153.         if (1 - cosTheta) > 0.0001 then
  154.             local theta = math.acos(cosTheta)
  155.             local invSinTheta = 1/math.sin(theta)
  156.             startInterp = math.sin((1-t)*theta)*invSinTheta
  157.             finishInterp = math.sin(t*theta)*invSinTheta  
  158.         else
  159.             startInterp = 1-t
  160.             finishInterp = t
  161.         end
  162.     else
  163.         if (1+cosTheta) > 0.0001 then
  164.             local theta = math.acos(-cosTheta)
  165.             local invSinTheta = 1/math.sin(theta)
  166.             startInterp = math.sin((t-1)*theta)*invSinTheta
  167.             finishInterp = math.sin(t*theta)*invSinTheta
  168.         else
  169.             startInterp = t-1
  170.             finishInterp = t
  171.         end
  172.     end
  173.     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
  174. end
  175.  
  176. local function CFrameFromTopBack(at, top, back)
  177.     local right = top:Cross(back)
  178.     return CFrame.new(
  179.         at.x, at.y, at.z,
  180.         right.x, top.x, back.x,
  181.         right.y, top.y, back.y,
  182.         right.z, top.z, back.z
  183.     )
  184. end
  185. function rayCast(Pos, Dir, Max, Ignore)  -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  186.     return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or math.huge)), Ignore)
  187. end
  188. sine = 0
  189. change = 1
  190. destroy_animate=true
  191. modeofglitch=1
  192.  
  193. game:GetService("RunService").Stepped:Connect(function()
  194. local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
  195. local hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position-Vector3.new(0,1,0))).lookVector,4,Character)
  196. sine=sine+1
  197. if RootPart.Velocity.y > 1 and hitfloor==nil then
  198. --jumpping
  199. RH.C0=Clerp(RH.C0,cf(1,-1 - 0.05 * math.cos(sine/25),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(-20)),.1)
  200. LH.C0=Clerp(LH.C0,cf(-1,-1-0.05*math.cos(sine/25),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(20)),.1)
  201. RootJoint.C0=Clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.05 * math.cos(sine/25))*angles(math.rad(-10),math.rad(0),math.rad(0)),.1)
  202. Torso.Neck.C0=Clerp(Torso.Neck.C0,necko*angles(math.rad(-2.5),math.rad(0),math.rad(0)),.1)
  203. RW.C0=Clerp(RW.C0,cf(1.45,0.5 + 0.1 * math.cos(sine/25),0)*angles(math.rad(-5),math.rad(0),math.rad(25)),.1)
  204. LW.C0=Clerp(LW.C0,cf(-1.45,0.5 + 0.1 * math.cos(sine/25),0)*angles(math.rad(-5),math.rad(0),math.rad(-25)),.1)
  205. elseif RootPart.Velocity.y < -1 and hitfloor==nil then
  206. --falling
  207. RH.C0=Clerp(RH.C0,cf(1,-1 - 0.05 * math.cos(sine/25),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(-20)),.1)
  208. LH.C0=Clerp(LH.C0,cf(-1,-1-0.05*math.cos(sine/25),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(20)),.1)
  209. RootJoint.C0=Clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.05 * math.cos(sine/25))*angles(math.rad(0),math.rad(0),math.rad(0)),.1)
  210. Torso.Neck.C0=Clerp(Torso.Neck.C0,necko*angles(math.rad(0),math.rad(0),math.rad(0)),.1)
  211. RW.C0=Clerp(RW.C0,cf(1.45,0.5 + 0.1 * math.cos(sine/25),0)*angles(math.rad(-20),math.rad(0),math.rad(50)),.1)
  212. LW.C0=Clerp(LW.C0,cf(-1.45,0.5 + 0.1 * math.cos(sine/25),0)*angles(math.rad(-20),math.rad(0),math.rad(-50)),.1)
  213. elseif torvel<1 and hitfloor~=nil then
  214. --idle
  215. RH.C0=Clerp(RH.C0,cf(1,-1 - 0.05 * math.cos(sine / 28),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0 + 1 * math.cos(sine / 34))),.1)
  216. LH.C0=Clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(sine / 28),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0 + 1 * math.cos(sine / 34))),.1)
  217. RootJoint.C0=Clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.05 * math.cos(sine / 28))*angles(math.rad(0 - 1 * math.cos(sine / 34)),math.rad(0),math.rad(0)),.1)
  218. Torso.Neck.C0=Clerp(Torso.Neck.C0,necko*angles(math.rad(5 - 2.5 * math.cos(sine / 28)),math.rad(0),math.rad(0)),.1)
  219. RW.C0=Clerp(RW.C0,cf(1,0.5 + 0.1 * math.cos(sine / 28),0.45)*angles(math.rad(-30),math.rad(0),math.rad(-30)),.1)
  220. LW.C0=Clerp(LW.C0,cf(-1,0.5 + 0.1 * math.cos(sine / 28),0.45)*angles(math.rad(-30),math.rad(0),math.rad(30)),.1)
  221. elseif tors.Velocity.magnitude < 50 and hitfloor~=nil then
  222. --walking
  223. RH.C0=Clerp(RH.C0,cf(1,-1 - 0.05 * math.cos(sine / 28),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0 + 1 * math.cos(sine / 34))),.1)
  224. LH.C0=Clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(sine / 28),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0 + 1 * math.cos(sine / 34))),.1)
  225. RootJoint.C0=Clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.05 * math.cos(sine / 28))*angles(math.rad(0 - 1 * math.cos(sine / 34)),math.rad(0),math.rad(0)),.1)
  226. Torso.Neck.C0=Clerp(Torso.Neck.C0,necko*angles(math.rad(5 - 2.5 * math.cos(sine / 28)),math.rad(0),math.rad(0)),.1)
  227. RW.C0=Clerp(RW.C0,cf(1,0.5 + 0.1 * math.cos(sine / 28),0.45)*angles(math.rad(-30),math.rad(0),math.rad(-30)),.1)
  228. LW.C0=Clerp(LW.C0,cf(-1,0.5 + 0.1 * math.cos(sine / 28),0.45)*angles(math.rad(-30),math.rad(0),math.rad(30)),.1)
  229. end
  230. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement