Advertisement
JuicyPenguin

Dance script

Jun 1st, 2015
401
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --joemom33's dance script! credit to jarredbcv and madiik, thx guys for taking my watch dogs script, heres another ;)
  2. music = true
  3. game.Players.LocalPlayer.Character.Humanoid.MaxHealth = math.huge --so u cant die when fights are going on e.e
  4.  
  5. do
  6.         local function QuaternionFromCFrame(cf)
  7.                 local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  8.                 local trace = m00 + m11 + m22
  9.                 if trace > 0 then
  10.                         local s = math.sqrt(1 + trace)
  11.                         local recip = 0.5/s
  12.                         return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  13.                 else
  14.                         local i = 0
  15.                         if m11 > m00 then
  16.                                 i = 1
  17.                         end
  18.                         if m22 > (i == 0 and m00 or m11) then
  19.                                 i = 2
  20.                         end
  21.                         if i == 0 then
  22.                                 local s = math.sqrt(m00-m11-m22+1)
  23.                                 local recip = 0.5/s
  24.                                 return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  25.                         elseif i == 1 then
  26.                                 local s = math.sqrt(m11-m22-m00+1)
  27.                                 local recip = 0.5/s
  28.                                 return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  29.                         elseif i == 2 then
  30.                                 local s = math.sqrt(m22-m00-m11+1)
  31.                                 local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  32.                         end
  33.                 end
  34.         end
  35.         local function QuaternionToCFrame(px, py, pz, x, y, z, w)
  36.                 local xs, ys, zs = x + x, y + y, z + z
  37.                 local wx, wy, wz = w*xs, w*ys, w*zs
  38.                 local xx = x*xs
  39.                 local xy = x*ys
  40.                 local xz = x*zs
  41.                 local yy = y*ys
  42.                 local yz = y*zs
  43.                 local zz = z*zs
  44.                 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))
  45.                 end  
  46.         local function QuaternionSlerp(a, b, t)
  47.                 local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  48.                 local startInterp, finishInterp;
  49.                 if cosTheta >= 0.0001 then
  50.                         if (1 - cosTheta) > 0.0001 then
  51.                                 local theta = math.acos(cosTheta)
  52.                                 local invSinTheta = 1/math.sin(theta)
  53.                                 startInterp = math.sin((1-t)*theta)*invSinTheta
  54.                                 finishInterp = math.sin(t*theta)*invSinTheta  
  55.                         else
  56.                                 startInterp = 1-t
  57.                                 finishInterp = t
  58.                         end
  59.                 else
  60.                         if (1+cosTheta) > 0.0001 then
  61.                                 local theta = math.acos(-cosTheta)
  62.                                 local invSinTheta = 1/math.sin(theta)
  63.                                 startInterp = math.sin((t-1)*theta)*invSinTheta
  64.                                 finishInterp = math.sin(t*theta)*invSinTheta
  65.                         else
  66.                                 startInterp = t-1
  67.                                 finishInterp = t
  68.                         end
  69.                 end
  70.                 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
  71.         end  
  72.         function clerp(a,b,t)
  73.                 local qa = {QuaternionFromCFrame(a)}
  74.                 local qb = {QuaternionFromCFrame(b)}
  75.                 local ax, ay, az = a.x, a.y, a.z
  76.                 local bx, by, bz = b.x, b.y, b.z  
  77.                 local _t = 1-t
  78.                 return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  79.         end
  80.  
  81. end
  82. do
  83. plr = game:service'Players'.LocalPlayer
  84. char = plr.Character
  85. mouse = plr:GetMouse()
  86. humanoid = char:findFirstChild("Humanoid")
  87. torso = char:findFirstChild("Torso")
  88. head = char.Head
  89. ra = char:findFirstChild("Right Arm")
  90. la = char:findFirstChild("Left Arm")
  91. rl = char:findFirstChild("Right Leg")
  92. ll = char:findFirstChild("Left Leg")
  93. rs = torso:findFirstChild("Right Shoulder")
  94. ls = torso:findFirstChild("Left Shoulder")
  95. rh = torso:findFirstChild("Right Hip")
  96. lh = torso:findFirstChild("Left Hip")
  97. neck = torso:findFirstChild("Neck")
  98. rj = char:findFirstChild("HumanoidRootPart"):findFirstChild("RootJoint")
  99. anim = char:findFirstChild("Animate")
  100. rootpart = char:findFirstChild("HumanoidRootPart")
  101. camera = workspace.CurrentCamera
  102. if anim then
  103. anim:Destroy()
  104. end
  105.  
  106. local rm = Instance.new("Motor", torso)
  107. rm.C0 = CFrame.new(1.5, 0.5, 0)
  108. rm.C1 = CFrame.new(0, 0.5, 0)
  109. rm.Part0 = torso
  110. rm.Part1 = ra
  111. local lm = Instance.new("Motor", torso)
  112. lm.C0 = CFrame.new(-1.5, 0.5, 0)
  113. lm.C1 = CFrame.new(0, 0.5, 0)
  114. lm.Part0 = torso
  115. lm.Part1 = la
  116.  
  117. local rlegm = Instance.new("Motor", torso)
  118. rlegm.C0 = CFrame.new(0.5, -1, 0)
  119. rlegm.C1 = CFrame.new(0, 1, 0)
  120. rlegm.Part0 = torso
  121. rlegm.Part1 = rl
  122. local llegm = Instance.new("Motor", torso)
  123. llegm.C0 = CFrame.new(-0.5, -1, 0)
  124. llegm.C1 = CFrame.new(0, 1, 0)
  125. llegm.Part0 = torso
  126. llegm.Part1 = ll
  127.  
  128. neck.C0 = CFrame.new(0, 1, 0)
  129. neck.C1 = CFrame.new(0, -0.5, 0)
  130.  
  131.  
  132. rj.C0 = CFrame.new()
  133. rj.C1 = CFrame.new()
  134.  
  135. local sound = Instance.new("Sound", head)
  136. sound.SoundId = "http://www.roblox.com/asset/?id=258218642"
  137. sound.Volume = 0.8
  138. sound.Looped = true
  139.  
  140. for _,v in pairs(char:GetChildren()) do if v.ClassName=="Hat" then v:remove() end end
  141.  
  142. local speed = 0.3
  143. local angle = 0
  144. local humanwalk = true
  145. local anglespeed = 1
  146. rsc0 = rm.C0
  147. lsc0 = lm.C0
  148. llc0 = llegm.C0
  149. rlc0 = rlegm.C0
  150. neckc0 = neck.C0
  151.  
  152. local controllerService = game:GetService("ControllerService")
  153. local controller = controllerService:GetChildren()[1]
  154.  
  155. controller.Parent = nil
  156.  
  157. Instance.new("HumanoidController", game:service'ControllerService')
  158. Instance.new("SkateboardController", game:service'ControllerService')
  159. Instance.new("VehicleController", game:service'ControllerService')
  160. local controller = controllerService:GetChildren()[1]
  161. mouse.KeyDown:connect(function(k)
  162.     if k == "q" then
  163.         if not sound.IsPlaying and  music == true then
  164.             game:service'InsertService':LoadAsset(44114719):children()[1].Parent = char
  165.             sound:stop()
  166.             sound.SoundId = "http://www.roblox.com/asset/?id=157460849"
  167.             wait()
  168.             sound:play()
  169.         end
  170.     end
  171.     if k == "e" then
  172.         if not sound.IsPlaying and music == true then
  173.             game:service'InsertService':LoadAsset(262400494):children()[1].Parent = char
  174.             sound:stop()
  175.             sound.SoundId = "http://www.roblox.com/asset/?id=155119191"
  176.             wait()
  177.             sound:play()
  178.         end
  179.     end
  180.         if k == "r" then
  181.         if not sound.IsPlaying and music == true then
  182.             game:service'InsertService':LoadAsset(47697285):children()[1].Parent = char
  183.             game:service'InsertService':LoadAsset(11748356):children()[1].Parent = char
  184.             sound:stop()
  185.             sound.SoundId = "http://www.roblox.com/asset/?id=215733323"
  186.             wait()
  187.             sound:play()
  188.         end
  189.     end
  190.         if k == "t" then
  191.         if not sound.IsPlaying and music == true then
  192.             game:service'InsertService':LoadAsset(1081240):children()[1].Parent = char
  193.             sound:stop()
  194.             sound.SoundId = "http://www.roblox.com/asset/?id=164813855"
  195.             wait()
  196.             sound:play()
  197.         end
  198.     end
  199.          if k == "y" then
  200.         if not sound.IsPlaying and music == true then
  201.             game:service'InsertService':LoadAsset(128159229):children()[1].Parent = char
  202.             sound:stop()
  203.             sound.SoundId = "http://www.roblox.com/asset/?id=185098375"
  204.             wait()
  205.             sound:play()
  206.         end
  207.     end
  208.          if k == "u" then
  209.         if not sound.IsPlaying and music == true then
  210.             game:service'InsertService':LoadAsset(48545806):children()[1].Parent = char
  211.             sound:stop()
  212.             sound.SoundId = "http://www.roblox.com/asset/?id=151781164"
  213.             wait()
  214.             sound:play()
  215.         end
  216.     end
  217.          if k == "p" then
  218.         if not sound.IsPlaying and music == true then
  219.             game:service'InsertService':LoadAsset(163500995):children()[1].Parent = char
  220.     game:service'InsertService':LoadAsset(164203067):children()[1].Parent = char
  221.             sound:stop()
  222.             sound.SoundId = "http://www.roblox.com/asset/?id=146048136"
  223.             wait()
  224.             sound:play()
  225.         end
  226.     end
  227.         if k == "f" then
  228.         if not sound.IsPlaying and music == true then
  229.             game:service'InsertService':LoadAsset(11453654):children()[1].Parent = char
  230.             sound:stop()
  231.             sound.SoundId = "http://www.roblox.com/asset/?id=133061687"
  232.             wait()
  233.             sound:play()
  234.         end
  235.     end
  236.  if string.byte(k) == 48 then
  237.         humanoid.WalkSpeed = 55
  238. elseif string.byte(k) == 50 then
  239. humanoid.Sit = true
  240.     end
  241.    
  242. end)
  243. mouse.KeyUp:connect(function(k)
  244.    
  245.     if string.byte(k) == 48 then
  246.         humanoid.WalkSpeed = 16
  247.     end
  248.    
  249. end)
  250.  
  251.    
  252.  
  253. while wait() do
  254.     angle = (angle % 100) + anglespeed/10 -- i don't see any function getting called here
  255.         mvmnt = math.pi * math.sin(math.pi*2/100*(angle*10))
  256.         local rscf = rsc0
  257.         local lscf = lsc0
  258.         local rlcf = rlc0
  259.         local llcf = llc0
  260.         local rjcf = CFrame.new()
  261.         local ncf = neckc0
  262.         local rayz = Ray.new(rootpart.Position, Vector3.new(0, -6, 0))
  263.             local hitz, enz = workspace:findPartOnRay(rayz, char)
  264.             if not hitz then
  265.         if sound.IsPlaying then
  266.             sound:stop()
  267.         end
  268. elseif humanoid.Sit then
  269.         if sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=157460849" then
  270.     anglespeed = 1/2
  271.         ncf = neckc0 * CFrame.Angles(math.pi/4, 0,math.sin(angle)*0.08)
  272.         rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, 0, math.sin(angle)*0.01,0,math.pi/2)
  273.         rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.sin(angle),0,math.pi/1)
  274.         lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, -math.sin(angle)*0.09, math.rad(15))
  275.         rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  276.         llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  277.             elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=149069781" then
  278.         elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=149069781" then
  279.         anglespeed = 6
  280.         ncf = neckc0 * CFrame.Angles(math.pi/5-math.sin(angle)*0.1, 0, 0)
  281.         rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, 0, 0)
  282.         rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  283.         lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  284.         rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  285.         llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  286.         elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=149410799" then
  287.         anglespeed = 6
  288.         ncf = neckc0 * CFrame.Angles(math.pi/5-math.sin(angle)*0.1, 0, 0)
  289.         rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, 0, 0)
  290.         rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  291.         lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  292.         rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  293.         llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  294.         elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=142305777" then
  295.         anglespeed = 6
  296.         rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(0, math.sin(angle),math.rad(20))
  297.         rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.sin(angle),0,math.pi/1)
  298.         lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.sin(angle),0,math.pi/1)
  299.         elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=160525520" then
  300.         anglespeed = 6
  301.         ncf = neckc0 * CFrame.Angles(math.pi/5-math.sin(angle)*0.1, 0, 0)
  302.         rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, 0, 0)
  303.         rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  304.         lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  305.         rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  306.         llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  307.         elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=152401544" then
  308.         anglespeed = 6
  309.         ncf = neckc0 * CFrame.Angles(math.pi/5-math.sin(angle)*0.1, 0, 0)
  310.         rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, 0, 0)
  311.         rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  312.         lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  313.         rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  314.         llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  315.         elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=146048136" then
  316.     anglespeed = 6
  317.         ncf = neckc0 * CFrame.Angles(math.sin(angle)-math.abs(math.sin(angle))*0.9,math.cos(angle)*.3, 0)
  318.             rjcf = CFrame.new(0, 0, 0) * CFrame.Angles(0, math.sin(angle)*.2, 0)
  319.             rscf = rsc0 * CFrame.Angles(math.pi/3+math.abs(math.sin(angle)*1), math.rad(anglespeed*angle)*.3,  math.sin(angle*3)*.6)
  320.             lscf = lsc0 * CFrame.Angles(math.pi/3+math.abs(math.sin(angle)*1), math.rad(anglespeed*angle)*.3,  math.sin(angle*3)*.6)
  321.             rlcf = rlc0 * CFrame.Angles(0, math.rad(angle)*math.sin(anglespeed), math.rad(angle)*.5)
  322.             llcf = llc0 * CFrame.Angles(0, math.rad(angle)*math.sin(anglespeed), -math.rad(angle)*.5)
  323.         elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=142305777" then
  324.         anglespeed = 6
  325.         rjcf = CFrame.new(0, math.sin(angle)*2, 0) * CFrame.Angles(0, math.sin(angle),0)
  326.         rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.sin(angle),0,math.pi/1)
  327.         lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.sin(angle),0,math.pi/1)
  328.         else
  329.         anglespeed = 1/2
  330.         ncf = neckc0 * CFrame.Angles(math.pi/5, 0, math.sin(angle)*0.08)
  331.         rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(math.pi/5, math.sin(angle)*0.01, 0)
  332.         rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  333.         lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  334.         rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  335.         llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  336.         end
  337.     elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude < 2 then
  338.             if sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=157460849" then
  339.     anglespeed = 3
  340.         ncf = neckc0 * CFrame.Angles(math.pi/4, 0,math.sin(angle)*0.08)
  341.         rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, 0, math.sin(angle)*0.01,0,math.pi/2)
  342.         rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.sin(angle),0,math.pi/1)
  343.         lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, -math.sin(angle)*0.09, math.rad(15))
  344.         rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  345.         llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  346.             elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=149069781" then
  347.             anglespeed = 2
  348.             ncf = neckc0 * CFrame.Angles(math.pi/10-math.abs(math.sin(angle))*0.3,0, 0)
  349.             rjcf = CFrame.new(0, 0, 0) * CFrame.Angles(0, math.sin(angle)*.5, 0)
  350.             rscf = rsc0 * CFrame.Angles(0, 0, math.pi/2+math.abs(math.sin(angle)*1))
  351.             lscf = lsc0 * CFrame.Angles(0, 0, -math.pi/2-math.abs(math.sin(angle)*1))
  352.             rlcf = rlc0 * CFrame.Angles(0, math.sin(angle)*0.08, math.rad(2.5))
  353.             llcf = llc0 * CFrame.Angles(0, -math.sin(angle)*0.08, -math.rad(2.5))
  354.             elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=149410799" then
  355.             anglespeed = 2
  356.             ncf = neckc0 * CFrame.Angles(math.pi/10-math.abs(math.sin(angle))*0.3,0, 0)
  357.             rjcf = CFrame.new(math.sin(angle)*2, 0, 0) * CFrame.Angles(-math.pi/20, math.sin(angle)*.5, 0)
  358.             rscf = rsc0 * CFrame.Angles(math.pi/3+math.abs(math.sin(angle)*.5), math.pi/20,  -math.pi/20)
  359.             lscf = lsc0 * CFrame.Angles(math.pi/3+math.abs(math.sin(angle)*.5), -math.pi/20,  math.pi/20)
  360.             rlcf = rlc0 * CFrame.Angles(math.pi/20+math.sin(angle)*0.2, math.sin(angle)*0.08, math.rad(2.5))
  361.             llcf = llc0 * CFrame.Angles(math.pi/20-math.sin(angle)*0.2, -math.sin(angle)*0.08, -math.rad(2.5))
  362.             elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=142305777" then
  363.             anglespeed = 4
  364.         rjcf = CFrame.new(0, math.sin(angle)*2, 0) * CFrame.Angles(0, math.sin(angle),0)
  365.         rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.sin(angle),0,math.pi/1)
  366.         lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.sin(angle),0,math.pi/1)
  367.             elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=160525520" then
  368.             anglespeed = 2
  369.             ncf = neckc0 * CFrame.Angles(math.pi/10-math.abs(math.sin(angle))*0.5,0, 0)
  370.             rjcf = CFrame.new(0, 0, math.sin(angle)*3) * CFrame.Angles(0, math.sin(angle)*0.1, 0)
  371.             rscf = rsc0 * CFrame.Angles(math.pi/3+math.abs(math.sin(angle)*1), math.pi/20,  -math.pi/20)
  372.             lscf = lsc0 * CFrame.Angles(math.pi/3+math.abs(math.sin(angle)*1), -math.pi/20,  math.pi/20)
  373.             rlcf = rlc0 * CFrame.Angles(math.pi/20+math.sin(angle*2)*.75, 0, 0)
  374.             llcf = llc0 * CFrame.Angles(math.pi/20-math.sin(angle*2)*.75, 0, 0)
  375.             elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=152401544" then
  376.             anglespeed = 2
  377.             ncf = neckc0 * CFrame.Angles(0,0, 0)
  378.             rjcf = CFrame.new(0, -math.abs(math.sin(angle))*1.5, 0) * CFrame.Angles(math.sin(angle)*2, 0, 0)
  379.             rscf = rsc0 * CFrame.Angles(0, 0,  0)
  380.             lscf = lsc0 * CFrame.Angles(0, 0,  0)
  381.             rlcf = rlc0 * CFrame.Angles(0, 0, 0)
  382.             llcf = llc0 * CFrame.Angles(0, 0, 0)
  383.             elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=146048136" then
  384.     anglespeed = 6
  385.         ncf = neckc0 * CFrame.Angles(math.sin(angle)-math.abs(math.sin(angle))*0.9,math.cos(angle)*.3, 0)
  386.             rjcf = CFrame.new(0, 0, 0) * CFrame.Angles(0, math.sin(angle)*.2, 0)
  387.             rscf = rsc0 * CFrame.Angles(math.pi/3+math.abs(math.sin(angle)*1), math.rad(anglespeed*angle)*.3,  math.sin(angle*3)*.6)
  388.             lscf = lsc0 * CFrame.Angles(math.pi/3+math.abs(math.sin(angle)*1), math.rad(anglespeed*angle)*.3,  math.sin(angle*3)*.6)
  389.             rlcf = rlc0 * CFrame.Angles(0, math.rad(angle)*math.sin(anglespeed), math.rad(angle)*.5)
  390.             llcf = llc0 * CFrame.Angles(0, math.rad(angle)*math.sin(anglespeed), -math.rad(angle)*.5)
  391.             elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=133061687" then
  392.             anglespeed = 7
  393.             ncf = neckc0 * CFrame.Angles(math.pi/10-math.abs(math.sin(angle))*0.3,0, 0)
  394.             rjcf = CFrame.new(0, 0, 0) * CFrame.Angles(0, math.sin(angle)*.5, 0)
  395.             rscf = rsc0 * CFrame.Angles(math.pi/3+math.abs(math.sin(angle)*1), math.pi/20,  -math.pi/20)
  396.             lscf = lsc0 * CFrame.Angles(math.pi/3+math.abs(math.sin(angle)*1), -math.pi/20,  math.pi/20)
  397.             rlcf = rlc0 * CFrame.Angles(0, math.sin(angle)*0.1, math.rad(2.5))
  398.             llcf = llc0 * CFrame.Angles(0, -math.sin(angle)*1, -math.rad(2.5))
  399.             else
  400.             if humanwalk then
  401.                         anglespeed = 1/4
  402.         ncf = neckc0 * CFrame.Angles(-math.sin(angle)*0.07, 0, 0)
  403.         rjcf = CFrame.new(0, 0, 0) * CFrame.Angles(0, math.sin(angle)*0.009, 0)
  404.         rscf = rsc0 * CFrame.Angles(math.sin(angle)*0.6, 0, 0)
  405.         lscf = lsc0 * CFrame.Angles(math.sin(-angle)*0.6, 0, 0)
  406.         rlcf = rlc0 * CFrame.Angles(0, math.sin(angle)*0.09, math.rad(2.5))
  407.         llcf = llc0 * CFrame.Angles(0, -math.sin(angle)*0.12, -math.rad(angle)*0.2)
  408.                 else
  409.         anglespeed = 1/2
  410.         ncf = neckc0 * CFrame.Angles(math.pi/5, 0, math.sin(angle)*0.5)
  411.         rjcf = CFrame.new(0, -2, 0) * CFrame.Angles(-math.pi/5, math.sin(angle)*0.01, 0)
  412.         rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/6, 0, -math.rad(60))
  413.         lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/6, 0, math.rad(60))
  414.         rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  415.         llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  416.             end
  417.         end
  418.     elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude < 20 then
  419.         if sound.IsPlaying then
  420.             sound:stop()
  421.             for _,v in pairs(char:GetChildren()) do if v.ClassName=="Hat" then v:remove() end end
  422.         end
  423.         if humanwalk then
  424.                                 anglespeed = 4
  425.         ncf = neckc0 * CFrame.Angles(math.pi/24, mvmnt*.02, 0)
  426.         rjcf = CFrame.new(0, math.abs(mvmnt)*0.05, 0) * CFrame.Angles(math.pi/24, -mvmnt*.02, 0)
  427.         rscf = rsc0 * CFrame.Angles(math.sin(angle)*1.25, 0, -math.abs(mvmnt)*0.02)
  428.         lscf = lsc0 * CFrame.Angles(math.sin(-angle)*1.25, 0, math.abs(mvmnt)*0.02)
  429.         rlcf = rlc0 * CFrame.Angles(math.sin(-angle)*1, 0, math.rad(.5))
  430.         llcf = llc0 * CFrame.Angles(math.sin(angle)*1, 0, -math.rad(.5))
  431.                 else
  432.         anglespeed = 4
  433.         ncf = neckc0 * CFrame.new(0, 0, .2) * CFrame.Angles(math.pi/1.9, 0, 0)
  434.         rjcf = CFrame.new(0, -1.5+math.abs(mvmnt)*0.05, 0) * CFrame.Angles(-math.pi/1.9, math.sin(mvmnt/2)*0.05, 0)
  435.         rscf = rsc0 * CFrame.new(-.45, 0.2, -.4+math.abs(mvmnt)*0.125) * CFrame.Angles(math.pi/2+math.sin(angle)*1, 0, math.rad(5))
  436.         lscf = lsc0 * CFrame.new(.45, 0.2, .1-math.abs(mvmnt)*0.125) * CFrame.Angles(math.pi/2+math.sin(-angle)*0.4, 0, -math.rad(5))
  437.         rlcf = rlc0 * CFrame.new(0, 0, -.3+math.abs(mvmnt)*0.125) * CFrame.Angles(math.pi/2.5+math.sin(-angle)*0.8, 0, math.abs(mvmnt)*0.025)
  438.         llcf = llc0 * CFrame.new(0, 0, .3-math.abs(mvmnt)*0.125) * CFrame.Angles(math.pi/2.5+math.sin(angle)*.6, 0, -math.abs(mvmnt)*0.025)
  439.         end
  440.     elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 20 then
  441.         if sound.IsPlaying then
  442.             sound:stop()
  443.         for _,v in pairs(char:GetChildren()) do if v.ClassName=="Hat" then v:remove() end end
  444.         end
  445.         if humanwalk then
  446.         anglespeed = 5
  447.         ncf = neckc0 * CFrame.Angles(math.rad(30), math.sin(angle)*.5, 0)
  448.         rjcf = CFrame.new(0, -.4 + math.abs(mvmnt)*0.25, 0) * CFrame.Angles(0, -math.sin(angle)*.08, 0)
  449.         rscf = rsc0 * CFrame.new(0, 0, -.3+math.abs(mvmnt)*0.125) *  CFrame.Angles(math.pi/18+math.sin(angle)*1.5, 0, -math.abs(mvmnt)*1.7)
  450.         lscf = lsc0 * CFrame.new(0, 0, .3-math.abs(mvmnt)*0.125) * CFrame.Angles(math.pi/18+math.sin(-angle)*1.5, 0, math.abs(mvmnt)*1.7)
  451.         rlcf = rlc0 * CFrame.new(0, 0, -.6+math.abs(mvmnt)*0.125) * CFrame.Angles(-math.pi/18+math.sin(-angle)*1.3, 0, math.rad(.5))
  452.         llcf = llc0 * CFrame.new(0, 0, -math.abs(mvmnt)*0.125) * CFrame.Angles(-math.pi/18+math.sin(angle)*1.3, 0, -math.rad(.5))
  453.         else
  454.         anglespeed = 5.5
  455.         ncf = neckc0 * CFrame.new(0, 0, .2) * CFrame.Angles(math.pi/1.9+math.sin(mvmnt/2)*0.05, 0, 0)
  456.         rjcf = CFrame.new(0, -1.3+math.abs(mvmnt)*0.05, 0) * CFrame.Angles(-math.pi/1.9+math.abs(mvmnt/2)*0.1, 0, 0)
  457.         rscf = rsc0 * CFrame.new(-1, 0.2, -.5) * CFrame.Angles(math.pi/2+math.sin(angle)*1.8, 0, math.rad(5))
  458.         lscf = lsc0 * CFrame.new(1, 0.2, -.5) * CFrame.Angles(math.pi/2+math.sin(angle)*1.8, 0, -math.rad(5))
  459.         rlcf = rlc0 * CFrame.new(0, .3-math.abs(mvmnt)*0.125, -.3+math.abs(mvmnt)*0.125) * CFrame.Angles(math.pi/2.5+math.sin(-angle)*1.4, 0, math.abs(mvmnt)*0.025)
  460.         llcf = llc0 * CFrame.new(0, .3-math.abs(mvmnt)*0.125, .3-math.abs(mvmnt)*0.125) * CFrame.Angles(math.pi/2.5+math.sin(-angle)*1.4, 0, -math.abs(mvmnt)*0.025)
  461.         end
  462.     end
  463.        
  464.     rm.C0 = clerp(rm.C0,rscf,speed)
  465.     lm.C0 = clerp(lm.C0,lscf,speed)
  466.     rj.C0 = clerp(rj.C0,rjcf,speed)
  467.     neck.C0 = clerp(neck.C0,ncf,speed)
  468.     rlegm.C0 = clerp(rlegm.C0,rlcf,speed)
  469.     llegm.C0 = clerp(llegm.C0,llcf,speed)
  470. end
  471.  
  472.  
  473. end
  474.  
  475. game.Players.LocalPlayer.Chatted:connect(function(k)
  476. if k:lower() == "musicon" then
  477. music = true
  478. elseif k:lower() == "musicoff" then
  479. music = false
  480. end
  481. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement