Advertisement
zephpsian

Untitled

Aug 9th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.02 KB | None | 0 0
  1. local plr = game.Players.G_osty
  2. local character = plr.Character
  3. RootPart=character.HumanoidRootPart
  4. RootJoint=RootPart.RootJoint
  5. character.Torso.roblox:Destroy()
  6. tors = character.Torso
  7. local Player_Size = 1
  8. vt=Vector3.new
  9. VT=Vector3.new
  10. cf=CFrame.new
  11. euler=CFrame.fromEulerAnglesXYZ
  12. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  13. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  14. LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
  15. LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
  16. RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
  17. RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
  18. RootPart=character.HumanoidRootPart
  19. RootJoint=RootPart.RootJoint
  20. RootCF=euler(-1.57,0,3.14)
  21. RAD=math.rad
  22. COS=math.cos
  23.  
  24. local r = 255,0,0
  25. local g = 0,255,0
  26. local b = 0,0,255
  27. coroutine.resume(coroutine.create(function()
  28. while wait(1) do
  29. for i,v in pairs(character:GetChildren()) do
  30. if v:IsA("Part") and v.Name ~= "Head" then
  31. local v2 = v:Clone()
  32. v2:ClearAllChildren()
  33. v2.Name = "Glow"
  34. v2.Transparency = 0.7
  35. v2.CanCollide = false
  36. v2.Anchored = true
  37. v2.Material = Enum.Material.Neon
  38. v2.Parent = character
  39. v2.Color = Color3.fromRGB(r)
  40. v2.Position = v.Position + Vector3.new(-math.random(0.1,3),math.random(0.1,3),-math.random(0.1,3))
  41. local v3 = v:Clone()
  42. v3:ClearAllChildren()
  43. v3.Name = "Glow"
  44. v3.Transparency = 0.7
  45. v3.CanCollide = false
  46. v3.Anchored = true
  47. v3.Material = Enum.Material.Neon
  48. v3.Parent = character
  49. v3.Color = Color3.fromRGB(0,255,0)
  50. v3.Position = v.Position + Vector3.new(math.random(0.1,3),-math.random(0.1,3),math.random(0.1,3))
  51. local v4 = v:Clone()
  52. v4:ClearAllChildren()
  53. v4.Name = "Glow"
  54. v4.Transparency = 0.7
  55. v4.CanCollide = false
  56. v4.Anchored = true
  57. v4.Material = Enum.Material.Neon
  58. v4.Parent = character
  59. v4.Color = Color3.fromRGB(0,0,255)
  60. v4.Position = v.Position + Vector3.new(-math.random(0.1,3),math.random(0.1,3),-math.random(0.1,3))
  61.  
  62. wait()
  63. v3:Destroy()
  64. v4:Destroy()
  65. v2:Destroy()
  66. end
  67. end
  68. end
  69. end))
  70. function clerp(a,b,t)
  71. local qa = {QuaternionFromCFrame(a)}
  72. local qb = {QuaternionFromCFrame(b)}
  73. local ax, ay, az = a.x, a.y, a.z
  74. local bx, by, bz = b.x, b.y, b.z
  75. local _t = 1-t
  76. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  77. end
  78.  
  79.  
  80. function aclerp(startCF,endCF,alpha)
  81. return startCF:lerp(endCF, alpha)
  82. end
  83.  
  84.  
  85. function Clerp(a,b,t)
  86. local qa = {QuaternionFromCFrame(a)}
  87. local qb = {QuaternionFromCFrame(b)}
  88. local ax, ay, az = a.x, a.y, a.z
  89. local bx, by, bz = b.x, b.y, b.z
  90. local _t = 1-t
  91. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  92. end
  93.  
  94. function QuaternionFromCFrame(cf)
  95. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  96. local trace = m00 + m11 + m22
  97. if trace > 0 then
  98. local s = math.sqrt(1 + trace)
  99. local recip = 0.5/s
  100. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  101. else
  102. local i = 0
  103. if m11 > m00 then
  104. i = 1
  105. end
  106. if m22 > (i == 0 and m00 or m11) then
  107. i = 2
  108. end
  109. if i == 0 then
  110. local s = math.sqrt(m00-m11-m22+1)
  111. local recip = 0.5/s
  112. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  113. elseif i == 1 then
  114. local s = math.sqrt(m11-m22-m00+1)
  115. local recip = 0.5/s
  116. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  117. elseif i == 2 then
  118. local s = math.sqrt(m22-m00-m11+1)
  119. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  120. end
  121. end
  122. end
  123.  
  124. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  125. local xs, ys, zs = x + x, y + y, z + z
  126. local wx, wy, wz = w*xs, w*ys, w*zs
  127. local xx = x*xs
  128. local xy = x*ys
  129. local xz = x*zs
  130. local yy = y*ys
  131. local yz = y*zs
  132. local zz = z*zs
  133. 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))
  134. end
  135.  
  136. function QuaternionSlerp(a, b, t)
  137. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  138. local startInterp, finishInterp;
  139. if cosTheta >= 0.0001 then
  140. if (1 - cosTheta) > 0.0001 then
  141. local theta = math.acos(cosTheta)
  142. local invSinTheta = 1/math.sin(theta)
  143. startInterp = math.sin((1-t)*theta)*invSinTheta
  144. finishInterp = math.sin(t*theta)*invSinTheta
  145. else
  146. startInterp = 1-t
  147. finishInterp = t
  148. end
  149. else
  150. if (1+cosTheta) > 0.0001 then
  151. local theta = math.acos(-cosTheta)
  152. local invSinTheta = 1/math.sin(theta)
  153. startInterp = math.sin((t-1)*theta)*invSinTheta
  154. finishInterp = math.sin(t*theta)*invSinTheta
  155. else
  156. startInterp = t-1
  157. finishInterp = t
  158. end
  159. end
  160. 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
  161. end
  162. LW=tors["Left Shoulder"]
  163. LH=tors["Left Hip"]
  164. RW=tors["Right Shoulder"]
  165. RH=tors["Right Hip"]
  166. CF = CFrame.new
  167. Sin = math.sin
  168. Cos = math.cos
  169. Rad = math.rad
  170. angles=CFrame.Angles
  171. local sine = 0
  172. coroutine.resume(coroutine.create(function()
  173. while wait() do
  174. RootJoint.C0 = clerp(RootJoint.C0, RootCF * CF(0* Player_Size, 0* Player_Size, 2 + 0.25* Player_Size * Cos(sine / 12)) * angles(Rad(25), Rad(0), Rad(0)), 0.1)
  175. tors.Neck.C0 = clerp(tors.Neck.C0, necko* CF(0, 0, 0 + ((1* Player_Size) - 1)) * angles(Rad(15 - 6.5 * Sin(sine / 12)), Rad(0), Rad(0)), 0.05)
  176. RH.C0 = clerp(RH.C0, CF(1* Player_Size, -1 - 0.15 * Cos(sine / 20)* Player_Size, -0.1* Player_Size) * angles(Rad(0), Rad(76), Rad(0)) * angles(Rad(-8.5 - 6.5 * Sin(sine / 12)), Rad(0), Rad(15)), 0.1)
  177. LH.C0 = clerp(LH.C0, CF(-1.1* Player_Size, -0.6 - 0.15 * Cos(sine / 20)* Player_Size, -0.3* Player_Size) * angles(Rad(0), Rad(-76), Rad(0)) * angles(Rad(-8.5 - 6.5 * Sin(sine / 12)), Rad(15), Rad(25)), 0.1)
  178. RW.C0 = clerp(RW.C0, CF(1.4* Player_Size, 0.4 + 0.08 * Sin(sine / 12)* Player_Size, 0* Player_Size) * angles(Rad(25 - 6.5 * Cos(sine / 12)), Rad(-.6), Rad(13 + 6.5 * Sin(sine / 12))), 0.1)
  179. LW.C0 = clerp(LW.C0, CF(-1.4* Player_Size, 0.4 + 0.08 * Sin(sine / 12)* Player_Size, 0* Player_Size) * angles(Rad(25 - 6.5 * Cos(sine / 12)), Rad(-.6), Rad(-13 - 6.5 * Sin(sine / 12))), 0.1)
  180.  
  181. end
  182. end))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement