Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local plr = game.Players.G_osty
- local character = plr.Character
- RootPart=character.HumanoidRootPart
- RootJoint=RootPart.RootJoint
- character.Torso.roblox:Destroy()
- tors = character.Torso
- local Player_Size = 1
- vt=Vector3.new
- VT=Vector3.new
- cf=CFrame.new
- euler=CFrame.fromEulerAnglesXYZ
- necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
- necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
- LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
- LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
- RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
- RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
- RootPart=character.HumanoidRootPart
- RootJoint=RootPart.RootJoint
- RootCF=euler(-1.57,0,3.14)
- RAD=math.rad
- local CF = CFrame.new
- COS=math.cos
- local Sin = math.sin
- local Cos = math.cos
- local Rad = math.rad
- local angles=CFrame.Angles
- LW=tors["Left Shoulder"]
- LH=tors["Left Hip"]
- RW=tors["Right Shoulder"]
- RH=tors["Right Hip"]
- Neck = tors["Neck"]
- local ROOTC0 = CF(0, 0, 0) * angles(RAD(-90), RAD(0), RAD(180))
- local NECKC0 = CF(0, 1, 0) * angles(RAD(-90), RAD(0), RAD(180))
- local RWC0 = CF(-0.5, 0, 0) * angles(RAD(0), RAD(90), RAD(0))
- local LWC0 = CF(0.5, 0, 0) * angles(RAD(0), RAD(-90), RAD(0))
- Animation_Speed = 3
- local sine = 0
- local Humanoid = plr.Character.Humanoid
- local r = 255,0,0
- local g = 0,255,0
- local b = 0,0,255
- coroutine.resume(coroutine.create(function()
- while wait(1) do
- for i,v in pairs(character:GetChildren()) do
- if v:IsA("Part") and v.Name ~= "Head" then
- local v2 = v:Clone()
- v2:ClearAllChildren()
- v2.Name = "Glow"
- v2.Transparency = 0.7
- v2.CanCollide = false
- v2.Anchored = true
- v2.Material = Enum.Material.Neon
- v2.Parent = character
- v2.Color = Color3.fromRGB(r)
- v2.Position = v.Position + Vector3.new(-math.random(0.1,3),math.random(0.1,3),-math.random(0.1,3))
- local v3 = v:Clone()
- v3:ClearAllChildren()
- v3.Name = "Glow"
- v3.Transparency = 0.7
- v3.CanCollide = false
- v3.Anchored = true
- v3.Material = Enum.Material.Neon
- v3.Parent = character
- v3.Color = Color3.fromRGB(0,255,0)
- v3.Position = v.Position + Vector3.new(math.random(0.1,3),-math.random(0.1,3),math.random(0.1,3))
- local v4 = v:Clone()
- v4:ClearAllChildren()
- v4.Name = "Glow"
- v4.Transparency = 0.7
- v4.CanCollide = false
- v4.Anchored = true
- v4.Material = Enum.Material.Neon
- v4.Parent = character
- v4.Color = Color3.fromRGB(0,0,255)
- v4.Position = v.Position + Vector3.new(-math.random(0.1,3),math.random(0.1,3),-math.random(0.1,3))
- wait()
- v3:Destroy()
- v4:Destroy()
- v2:Destroy()
- end
- end
- end
- end))
- function clerp(a,b,t)
- local qa = {QuaternionFromCFrame(a)}
- local qb = {QuaternionFromCFrame(b)}
- local ax, ay, az = a.x, a.y, a.z
- local bx, by, bz = b.x, b.y, b.z
- local _t = 1-t
- return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
- end
- function aclerp(startCF,endCF,alpha)
- return startCF:lerp(endCF, alpha)
- end
- function Clerp(a,b,t)
- local qa = {QuaternionFromCFrame(a)}
- local qb = {QuaternionFromCFrame(b)}
- local ax, ay, az = a.x, a.y, a.z
- local bx, by, bz = b.x, b.y, b.z
- local _t = 1-t
- return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
- end
- function QuaternionFromCFrame(cf)
- local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
- local trace = m00 + m11 + m22
- if trace > 0 then
- local s = math.sqrt(1 + trace)
- local recip = 0.5/s
- return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
- else
- local i = 0
- if m11 > m00 then
- i = 1
- end
- if m22 > (i == 0 and m00 or m11) then
- i = 2
- end
- if i == 0 then
- local s = math.sqrt(m00-m11-m22+1)
- local recip = 0.5/s
- return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
- elseif i == 1 then
- local s = math.sqrt(m11-m22-m00+1)
- local recip = 0.5/s
- return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
- elseif i == 2 then
- local s = math.sqrt(m22-m00-m11+1)
- local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
- end
- end
- end
- function QuaternionToCFrame(px, py, pz, x, y, z, w)
- local xs, ys, zs = x + x, y + y, z + z
- local wx, wy, wz = w*xs, w*ys, w*zs
- local xx = x*xs
- local xy = x*ys
- local xz = x*zs
- local yy = y*ys
- local yz = y*zs
- local zz = z*zs
- 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))
- end
- function QuaternionSlerp(a, b, t)
- local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
- local startInterp, finishInterp;
- if cosTheta >= 0.0001 then
- if (1 - cosTheta) > 0.0001 then
- local theta = math.acos(cosTheta)
- local invSinTheta = 1/math.sin(theta)
- startInterp = math.sin((1-t)*theta)*invSinTheta
- finishInterp = math.sin(t*theta)*invSinTheta
- else
- startInterp = 1-t
- finishInterp = t
- end
- else
- if (1+cosTheta) > 0.0001 then
- local theta = math.acos(-cosTheta)
- local invSinTheta = 1/math.sin(theta)
- startInterp = math.sin((t-1)*theta)*invSinTheta
- finishInterp = math.sin(t*theta)*invSinTheta
- else
- startInterp = t-1
- finishInterp = t
- end
- end
- 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
- end
- Humanoid.Animator.Parent = nil
- coroutine.resume(coroutine.create(function()
- while wait() do
- RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0.1, -0.1 + 0.05 * Sin(sine / 12)) * angles(RAD(-10), RAD(0), RAD(0)), 1 / Animation_Speed)
- Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * angles(RAD(-5 - 2.5 * Sin(sine / 12)), RAD(7 * COS(sine / 24)), RAD(0)), 1 / Animation_Speed)
- RW.C0 = Clerp(RW.C0, CF(1, 0.5 + 0.05 * Sin(sine / 12), -0.5) * angles(RAD(0), RAD(0), RAD(-100)) * angles(RAD(20), RAD(0), RAD(0)) * RWC0, 1 / Animation_Speed)
- LW.C0 = Clerp(LW.C0, CF(-1, 0.3 + 0.05 * Sin(sine / 12), -0.35) * angles(RAD(0), RAD(0), RAD(70)) * angles(RAD(20), RAD(0), RAD(0)) * LWC0, 1 / Animation_Speed)
- RH.C0 = Clerp(RH.C0, CF(1, -1 - 0.05 * Sin(sine / 12), 0) * angles(RAD(-10), RAD(80), RAD(0)) * angles(RAD(-3), RAD(0), RAD(0)), 1 / Animation_Speed)
- LH.C0 = Clerp(LH.C0, CF(-1, -1 - 0.05 * Sin(sine / 12), 0) * angles(RAD(-10), RAD(-80), RAD(0)) * angles(RAD(-3), RAD(0), RAD(0)), 1 / Animation_Speed)
- end
- end))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement