Advertisement
Hebablazin

Dubstep Gun

May 30th, 2016
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.  
  3. end
  4. local danceAnim = Instance.new("Animation", char)
  5. danceAnim.AnimationId = "http://www.roblox.com/asset/?id=130018893"
  6. danceAnim.Name = "DancingAnimation"
  7. ----------------------------------------------------------------------------------------------------------
  8. local main = Instance.new("Part", char)
  9.  main.FormFactor = "Custom"
  10.  main.CanCollide = false
  11.  main.Size = Vector3.new(.75, 1, 1.2)
  12.  main.Locked = true
  13.  main.BrickColor = BrickColor.new("Black")
  14.  main.TopSurface = 0
  15.  main.BottomSurface = 0
  16.  main.Position = torso.Position
  17.  main:BreakJoints()
  18. local weld1 = weld(main, ra, CFrame.new(), char, CFrame.new(0, -.8, -.6))
  19.  local speaker = Instance.new("Part", char)
  20.  speaker.FormFactor = "Custom"
  21.  speaker.CanCollide = false
  22.  speaker.Size = Vector3.new(1.5, .25, 1.4)
  23.  speaker.Locked = true
  24.  speaker.BrickColor = BrickColor.new("Black")
  25.  speaker.TopSurface = 0
  26.  speaker.BottomSurface = 0
  27.  speaker.Position = torso.Position
  28.  speaker:BreakJoints()
  29. local weld2 = weld(speaker, main, CFrame.new(), char, CFrame.new(-.25, -1.7, .6))
  30.  local speaker2 = Instance.new("Part", char)
  31.  speaker2.FormFactor = "Custom"
  32.  speaker2.CanCollide = false
  33.  speaker2.Size = Vector3.new(1, .25, 2)
  34.  speaker2.Locked = true
  35.  speaker2.BrickColor = BrickColor.new("Black")
  36.  speaker2.TopSurface = 0
  37.  speaker2.BottomSurface = 0
  38.  speaker2.Position = torso.Position
  39.  speaker2:BreakJoints()
  40. local weld3 = weld(speaker2, main, CFrame.new(), char, CFrame.new(0, -1.7, -.2))
  41.  local main2 = Instance.new("Part", char)
  42.  main2.FormFactor = "Custom"
  43.  main2.CanCollide = false
  44.  main2.Size = Vector3.new(.751, 1, .6)
  45.  main2.Locked = true
  46.  main2.BrickColor = BrickColor.new("Black")
  47.  main2.TopSurface = 0
  48.  main2.BottomSurface = 0
  49.  main2.Position = torso.Position
  50.  main2:BreakJoints()
  51. local weld4 = weld(main2, ra, CFrame.new(), char, CFrame.new(0, 0, -.9))
  52.  local main3 = Instance.new("Part", char)
  53.  main3.FormFactor = "Custom"
  54.  main3.CanCollide = false
  55.  main3.Size = Vector3.new(.751, 1.45, 1)
  56.  main3.Locked = true
  57.  main3.BrickColor = BrickColor.new("Black")
  58.  main3.TopSurface = 0
  59.  main3.BottomSurface = 0
  60.  main3.Position = torso.Position
  61.  main3:BreakJoints()
  62. local weld5 = weld(main3, ra, CFrame.new(), char, CFrame.new(0, -1.6, -.9))
  63.  local main4 = Instance.new("Part", char)
  64.  main4.FormFactor = "Custom"
  65.  main4.CanCollide = false
  66.  main4.Size = Vector3.new(1, .76, 1)
  67.  Instance.new("CylinderMesh", main4)
  68.  main4.Locked = true
  69.  main4.BrickColor = BrickColor.new("Black")
  70.  main4.TopSurface = 0
  71.  main4.BottomSurface = 0
  72.  main4.Position = torso.Position
  73.  main4:BreakJoints()
  74. local weld6 = weld(main4, main, CFrame.new(), char, CFrame.new(0, -.15, -.5)*CFrame.Angles(math.pi/2, 0, math.pi/2))
  75.  local speaker3 = Instance.new("Part", char)
  76.  speaker3.FormFactor = "Custom"
  77.  speaker3.CanCollide = false
  78.  speaker3.Size = Vector3.new(1.5, .5, 1.4)
  79.  speaker3.Locked = true
  80.  speaker3.BrickColor = BrickColor.new("Black")
  81.  speaker3.TopSurface = 0
  82.  speaker3.BottomSurface = 0
  83.  speaker3.Position = torso.Position
  84.  speaker3:BreakJoints()
  85. local welds1 = weld(speaker3, main, CFrame.new(), char, CFrame.new(-.25, -2.2, .6))
  86.  local speaker4 = Instance.new("Part", char)
  87.  speaker4.FormFactor = "Custom"
  88.  speaker4.CanCollide = false
  89.  speaker4.Size = Vector3.new(1, .5, 2)
  90.  speaker4.Locked = true
  91.  speaker4.BrickColor = BrickColor.new("Black")
  92.  speaker4.TopSurface = 0
  93.  speaker4.BottomSurface = 0
  94.  speaker4.Position = torso.Position
  95.  speaker4:BreakJoints()
  96. local welds2 = weld(speaker4, main, CFrame.new(), char, CFrame.new(0, -2.205, -.2))
  97.  local speaker5 = Instance.new("Part", char)
  98.  speaker5.FormFactor = "Custom"
  99.  speaker5.CanCollide = false
  100.  speaker5.Size = Vector3.new(1.4, .4, 1.3)
  101.  speaker5.Locked = true
  102.  speaker5.BrickColor = BrickColor.new("Black")
  103.  speaker5.TopSurface = 0
  104.  speaker5.BottomSurface = 0
  105.  speaker5.Position = torso.Position
  106.  speaker5:BreakJoints()
  107. local welds3 = weld(speaker5, main, CFrame.new(), char, CFrame.new(-.25, -2, .6))
  108.  local speaker6 = Instance.new("Part", char)
  109.  speaker6.FormFactor = "Custom"
  110.  speaker6.CanCollide = false
  111.  speaker6.Size = Vector3.new(.9, .4, 1.9)
  112.  speaker6.Locked = true
  113.  speaker6.BrickColor = BrickColor.new("Black")
  114.  speaker6.TopSurface = 0
  115.  speaker6.BottomSurface = 0
  116.  speaker6.Position = torso.Position
  117.  speaker6:BreakJoints()
  118. local welds4 = weld(speaker6, main, CFrame.new(), char, CFrame.new(0, -2, -.2))
  119.  
  120.  local support = Instance.new("Part", char)
  121.  support.FormFactor = "Custom"
  122.  support.CanCollide = false
  123.  support.Size = Vector3.new(.3, .4, .6)
  124.  support.Locked = true
  125.  support.BrickColor = BrickColor.new("Black")
  126.  support.TopSurface = 0
  127.  support.BottomSurface = 0
  128.  support.Position = torso.Position
  129.  support:BreakJoints()
  130. local welds5 = weld(support, main, CFrame.new(), char, CFrame.new(0, -1.5, -.4))
  131.  
  132.  
  133. debounce = false
  134.  
  135. function stopsound()
  136. if debounce then return end
  137.  if not sound.IsPlaying then return end
  138.  sound:stop()
  139.  debounce = true
  140. local dancebro = Instance.new("StringValue", game:service'Lighting')
  141.  dancebro.Name = ('STOPDANCING'..plr.Name)
  142.  game:service'Debris':AddItem(dancebro, 1)
  143.  coroutine.wrap(function()
  144.  while not sound.IsPlaying do
  145.  if charge <= 100 then
  146.  charge = charge + .1
  147.  wait()
  148.  elseif charge > 100 then
  149.  charge = 100
  150.  break
  151.  end
  152.  end
  153.  end)()
  154.  wait(.1)
  155.  debounce = false
  156. end
  157. mouse.Button1Down:connect(function(mous)
  158.  if debounceofsprint then return end
  159.  if sound.IsPlaying then return end
  160.  if debounce then return end
  161.  sound:play()
  162.  for i = 70, 55, -.35 do
  163.  if not sound.IsPlaying then debounce = true camera.FieldOfView = 70 return end
  164.  camera.FieldOfView = i
  165.  wait()
  166. end
  167. for i = 65, 70, 2.5 do
  168.  if not sound.IsPlaying then debounce = true camera.FieldOfView = 70 return end
  169.  camera.FieldOfView = i
  170.  wait()
  171. end
  172. if debounce then debounce = false return end
  173.  if dancemode then
  174.  for i,v in pairs(workspace:children()) do
  175.  if not sound.IsPlaying then break end
  176.  coroutine.wrap(function()
  177.  if v:IsA("Model") and v:findFirstChild("Humanoid") and v.Name ~= char.Name and v:findFirstChild("ModelForParts") == nil and v:findFirstChild("Torso") and (v:findFirstChild("Torso").Position - head.Position).magnitude < 30 then
  178.  danceAnimClone = danceAnim:clone()
  179.  danceAnimClone.Parent = v
  180. danceAnimClone.AnimationId = "http://www.roblox.com/asset/?id=130018893"
  181.  wait()
  182.  NLS([[
  183.  function animatehuman(animationid, object)
  184.  local animation = object:findFirstChild("Humanoid"):LoadAnimation(animationid)
  185.  animation:Play()
  186.  end
  187.  while wait(.5) do
  188. if game:service'Lighting':findFirstChild("STOPDANCING]]..plr.Name..[[") and game:service'Lighting':findFirstChild("STOPDANCING]]..plr.Name..[["):IsA("StringValue") then game:service'Debris':AddItem(script.Parent:findFirstChild("DancingAnimation"), 5) break end
  189.  animatehuman(script.Parent:findFirstChild("DancingAnimation"), script.Parent)
  190.  end
  191.  ]], v)
  192.  end
  193.  end)()
  194.  end
  195. end
  196.  coroutine.wrap(function()
  197.  while sound.IsPlaying do
  198.  if charge <= 1 then
  199.  if debounce then break end
  200.  if not sound.IsPlaying then break end
  201.  sound:stop()
  202.  debounce = true
  203.  chargetext.TextColor3 = Color3.new(1,0,0)
  204. dancebro = Instance.new("StringValue", game:service'Lighting')
  205.  dancebro.Name = ('STOPDANCING'..plr.Name)
  206.  game:service'Debris':AddItem(dancebro, 1)
  207.  coroutine.wrap(function()
  208.  repeat wait() until charge >= 10
  209.  debounce = false
  210.  chargetext.TextColor3 = Color3.new(1,1,1)
  211.  end)()
  212.  coroutine.wrap(function()
  213.  while not sound.IsPlaying do
  214.  if charge <= 100 then
  215.  charge = charge + .1
  216.  wait()
  217.  elseif charge > 100 then
  218.  charge = 100
  219.  break
  220.  end
  221.  end
  222.  end)()
  223.  else
  224.  charge = charge - .08
  225.  wait()
  226.  end
  227.  end
  228.  end)()
  229.  coroutine.wrap(function()
  230.  local ran,err = ypcall(function()
  231.  while sound.IsPlaying and Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude <= 20 do
  232.  if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 20 then stopsound() break end
  233.  if not sound.IsPlaying then break end
  234.  rayCast(speaker, 1250, 0, 5, "Lavender")
  235.  wait(.35)
  236.  if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 20 then stopsound() break end
  237.  if not sound.IsPlaying then break end
  238.  rayCast(speaker, 1250, 0, 5, "Pink")
  239.  wait(.95)
  240.  if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 20 then stopsound() break end
  241.  if not sound.IsPlaying then break end
  242.  rayCast(speaker, 1250, 0, 5, "Bright bluish green")
  243.  wait(.55)
  244.  if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 20 then stopsound() break end
  245.  if not sound.IsPlaying then break end
  246.  rayCast(speaker, 1250, 0, 5, "Pink")
  247.  wait(.4)
  248.  if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 20 then stopsound() break end
  249.  if not sound.IsPlaying then break end
  250.  rayCast(speaker, 1250, 0, 5, "Bright bluish green")
  251.  local pl = Instance.new("PointLight", torso)
  252.  pl.Color = Color3.new(153/255/1.25, 102/255/1.25, 204/255/1.25)
  253.  pl.Range = 30
  254.  pl.Brightness = 0.7
  255.  game:service'Debris':AddItem(pl, .3)
  256.  wait(.45)
  257.  if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 20 then stopsound() break end
  258.  if not sound.IsPlaying then break end
  259.  rayCast(speaker, 1250, 0, 5, "Lavender")
  260.  wait(.75)
  261.  end
  262.  end) if err then print(err) end
  263.  end)()
  264. end)
  265.  
  266. mouse.Button1Up:connect(function(mous)
  267.  stopsound()
  268. end)
  269. ctrl = false
  270. mouse.KeyDown:connect(function(k)
  271.  if string.byte(k) == 50 then
  272.  ctrl = true
  273.  humanoid.WalkSpeed = 8
  274.  end
  275.  if string.byte(k) == 48 then
  276.  humanoid.WalkSpeed = 28
  277.  end
  278. end)
  279.  
  280. mouse.KeyUp:connect(function(k)
  281.  if string.byte(k) == 50 then
  282.  ctrl = false
  283.  humanoid.WalkSpeed = 16
  284.  end
  285.  if string.byte(k) == 48 then
  286.  humanoid.WalkSpeed = 16
  287.  if ctrl then
  288.  humanoid.WalkSpeed = 8
  289.  end
  290.  end
  291. end)
  292.  
  293. humanoid.Died:connect(function()
  294.  deathpos = torso.Position
  295.  WorkModel = Instance.new("Model", workspace)
  296.  WorkModel.Name = " "
  297.  wait(1/60)
  298.  humanoid.Parent = nil
  299.  if torso then
  300.  local Head = char:FindFirstChild("Head")
  301.  if Head then
  302.  local Neck = Instance.new("Weld")
  303.  Neck.Name = "Neck"
  304.  Neck.Part0 = torso
  305.  Neck.Part1 = Head
  306.  Neck.C0 = CFrame.new(0, 1.5, 0)
  307.  Neck.C1 = CFrame.new()
  308.  Neck.Parent = torso
  309.  end
  310.  local Limb = char:FindFirstChild("Right Arm")
  311.  if Limb then
  312.  
  313.  Limb.CFrame = torso.CFrame * CFrame.new(1.5, 0, 0)
  314.  local Joint = Instance.new("Glue")
  315.  Joint.Name = "RightShoulder"
  316.  Joint.Part0 = torso
  317.  Joint.Part1 = Limb
  318.  Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  319.  Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  320.  Joint.Parent = torso
  321.  
  322.  local B = Instance.new("Part")
  323.  B.TopSurface = 0
  324.  B.BottomSurface = 0
  325.  B.formFactor = "Symmetric"
  326.  B.Size = Vector3.new(1, 1, 1)
  327.  B.Transparency = 1
  328.  B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  329.  B.Parent = char
  330.  B.CanCollide = false
  331.  local W = Instance.new("Weld")
  332.  W.Part0 = Limb
  333.  W.Part1 = B
  334.  W.C0 = CFrame.new(0, -0.5, 0)
  335.  W.Parent = Limb
  336.  
  337.  end
  338.  local Limb = char:FindFirstChild("Left Arm")
  339.  if Limb then
  340.  
  341.  Limb.CFrame = torso.CFrame * CFrame.new(-1.5, 0, 0)
  342.  local Joint = Instance.new("Glue")
  343.  Joint.Name = "LeftShoulder"
  344.  Joint.Part0 = torso
  345.  Joint.Part1 = Limb
  346.  Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  347.  Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  348.  Joint.Parent = torso
  349.  
  350.  local B = Instance.new("Part")
  351.  B.TopSurface = 0
  352.  B.BottomSurface = 0
  353.  B.formFactor = "Symmetric"
  354.  B.Size = Vector3.new(1, 1, 1)
  355.  B.Transparency = 1
  356.  B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  357.  B.Parent = char
  358.  B.CanCollide = false
  359.  local W = Instance.new("Weld")
  360.  W.Part0 = Limb
  361.  W.Part1 = B
  362.  W.C0 = CFrame.new(0, -0.5, 0)
  363.  W.Parent = Limb
  364.  
  365.  end
  366.  local Limb = char:FindFirstChild("Right Leg")
  367.  if Limb then
  368.  
  369.  Limb.CFrame = torso.CFrame * CFrame.new(0.5, -2, 0)
  370.  local Joint = Instance.new("Glue")
  371.  Joint.Name = "RightHip"
  372.  Joint.Part0 = torso
  373.  Joint.Part1 = Limb
  374.  Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  375.  Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  376.  Joint.Parent = torso
  377.  
  378.  local B = Instance.new("Part")
  379.  B.TopSurface = 0
  380.  B.BottomSurface = 0
  381.  B.formFactor = "Symmetric"
  382.  B.Size = Vector3.new(1, 1, 1)
  383.  B.Transparency = 1
  384.  B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  385.  B.Parent = char
  386.  B.CanCollide = false
  387.  local W = Instance.new("Weld")
  388.  W.Part0 = Limb
  389.  W.Part1 = B
  390.  W.C0 = CFrame.new(0, -0.5, 0)
  391.  W.Parent = Limb
  392.  
  393.  end
  394.  local Limb = char:FindFirstChild("Left Leg")
  395.  if Limb then
  396.  
  397.  Limb.CFrame = torso.CFrame * CFrame.new(-0.5, -2, 0)
  398.  local Joint = Instance.new("Glue")
  399.  Joint.Name = "LeftHip"
  400.  Joint.Part0 = torso
  401.  Joint.Part1 = Limb
  402.  Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  403.  Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  404.  Joint.Parent = torso
  405.  
  406.  local B = Instance.new("Part")
  407.  B.TopSurface = 0
  408.  B.BottomSurface = 0
  409.  B.formFactor = "Symmetric"
  410.  B.Size = Vector3.new(1, 1, 1)
  411.  B.Transparency = 1
  412.  B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  413.  B.Parent = char
  414.  B.CanCollide = false
  415.  local W = Instance.new("Weld")
  416.  W.Part0 = Limb
  417.  W.Part1 = B
  418.  W.C0 = CFrame.new(0, -0.5, 0)
  419.  W.Parent = Limb
  420.  end
  421.  for blood = 0, 3 do
  422.  local blood = Instance.new("Part", workspace)
  423.  blood.BrickColor = BrickColor.Red()
  424.  blood.FormFactor = "Custom"
  425.  blood.Size = Vector3.new(.2,.2,.2)
  426.  blood.Anchored = true
  427.  blood.TopSurface = "Smooth"
  428.  blood.BackSurface = "Smooth"
  429.  local bloodmesh = Instance.new("CylinderMesh", blood)
  430.  bloodmesh.Scale = Vector3.new(3, 0, 3)
  431.  local rayzb = Ray.new(torso.Position, Vector3.new(0, -20, 0) + Vector3.new(math.random(-2, 2), 0, math.random(-2, 2)))
  432.  local hitzb, hitposb = workspace:findPartOnRay(rayzb, char)
  433.  if hitzb then
  434.  blood.CFrame = CFrame.new(hitposb.x,hitposb.y,hitposb.z)
  435.  blood.CFrame = blood.CFrame * CFrame.new(0, .05, 0)
  436.  coroutine.wrap(function()
  437.  for cframe = 0, math.random(16, 24) do
  438.  bloodmesh.Scale = bloodmesh.Scale + Vector3.new(.45, 0, .45)
  439.  wait()
  440.  end
  441.  end)()
  442.  elseif not hitzb then
  443.  blood:Destroy()
  444.  end
  445.  end
  446.  local BP = Instance.new("BodyPosition", torso)
  447.  BP.maxForce = Vector3.new(1,1,1)/0
  448.  BP.position = deathpos
  449.  for i,v in pairs(char:children()) do
  450.  if v:IsA("Part") then v.Parent = WorkModel end
  451.  end
  452.  wait(.3)
  453.  BP:Destroy()
  454.  end
  455. end)
  456.  
  457. local rlegm = Instance.new("Motor", torso)
  458. rlegm.C0 = CFrame.new(0.5, -1, 0)
  459. rlegm.C1 = CFrame.new(0, 1, 0)
  460. rlegm.Part0 = torso
  461. rlegm.Part1 = rl
  462. rlegm.Name = "Right Hip"
  463. local llegm = Instance.new("Motor", torso)
  464. llegm.C0 = CFrame.new(-0.5, -1, 0)
  465. llegm.C1 = CFrame.new(0, 1, 0)
  466. llegm.Part0 = torso
  467. llegm.Part1 = ll
  468. llegm.Name = "Left Hip"
  469. neck.C0 = CFrame.new(0, 1, 0)
  470. neck.C1 = CFrame.new(0, -0.5, 0)
  471. rj.C0 = CFrame.new(0, -1, 0)
  472. rj.C1 = CFrame.new(0, -1, 0)
  473. rsc0 = rm.C0
  474. lsc0 = lm.C0
  475. neckc0 = neck.C0
  476. rootc0 = rj.C0
  477. llc0 = llegm.C0
  478. rlc0 = rlegm.C0
  479. speed = 0.4
  480. angle = 0
  481. anglespeed = 0
  482. mvmnt = 0
  483. game:service'RunService'.RenderStepped:connect(function()
  484.  angle = (angle % 100) + anglespeed/10
  485.  mvmnt = math.pi * math.sin(math.pi*2/100*(angle*10))
  486.  local rscf = rsc0
  487.  local lscf = lsc0
  488.  local rlcf = rlc0
  489.  local llcf = llc0
  490.  local rjcf = rootc0
  491.  local ncf = neckc0
  492.  local rayz = Ray.new(rootpart.Position, Vector3.new(0, -4.1, 0))
  493.  local hitz, enz = workspace:findPartOnRay(rayz, char)
  494.  --math.asin(mouse.UnitRay.Direction.y)
  495.  ncf = neckc0 * CFrame.Angles(camera.CoordinateFrame.lookVector.y, 0, 0)
  496.  rscf = rsc0 * CFrame.new(-.55, 0, .35) * CFrame.Angles(camera.CoordinateFrame.lookVector.y+math.pi/2, 0, 0)
  497.  lscf = lsc0 * CFrame.new(.85, 0, -.65) * CFrame.Angles(camera.CoordinateFrame.lookVector.y+math.pi/2, 0, math.rad(45))
  498.  if firing then
  499.  rscf = rsc0 * CFrame.new(-.55, .15, .65) * CFrame.Angles(camera.CoordinateFrame.lookVector.y+math.pi/2, 0, 0)
  500.  lscf = lsc0 * CFrame.new(.85, .15, -.35) * CFrame.Angles(camera.CoordinateFrame.lookVector.y+math.pi/2, 0, math.rad(45))
  501.  end
  502.  if not hitz then
  503.  ncf = neckc0 * CFrame.Angles(math.pi/18, 0, 0)
  504.  rscf = rsc0 * CFrame.new(-.45, 0, -.75) * CFrame.Angles(math.pi/5+math.pi/18, 0, math.rad(-70))
  505.  lscf = lsc0 * CFrame.new(.35, 0, 0) * CFrame.Angles(math.pi/3.5+math.pi/18, 0, 0)
  506.  rjcf = rootc0 * CFrame.Angles(-math.pi/32, 0, 0)
  507.  rlcf = rlc0 * CFrame.new(0, 0.7, -0.5) * CFrame.Angles(-math.pi/14, 0, 0)
  508.  llcf = llc0 * CFrame.Angles(-math.pi/20, 0, 0)
  509.  elseif humanoid.Sit then
  510.  ncf = neckc0 * CFrame.Angles(0, 0, 0)
  511.  rjcf = rootc0 * CFrame.new(0, -.2, 0)
  512.  rlcf = rlc0 * CFrame.Angles(math.pi/2, 0, math.rad(7.5))
  513.  llcf = llc0 * CFrame.Angles(math.pi/2, 0, -math.rad(7.5))
  514.  if sprinting then
  515.  debounceofsprint = false
  516.  sprinting = false
  517.  end
  518.  elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude <= 2 then
  519.  speed = 0.3
  520.  if ctrl then
  521.  rjcf = rootc0 * CFrame.new(0, -1.25, 0)
  522.  llcf = llc0 * CFrame.new(0, 0, -.45) * CFrame.Angles(-math.pi/2.2, 0, 0)
  523.  rlcf = rlcf * CFrame.new(0, 1.25, -.85)
  524.  else
  525.  rjcf = rootc0
  526.  rlcf = rlc0 * CFrame.Angles(-math.rad(.5), 0, math.rad(1.5))
  527.  llcf = llc0 * CFrame.Angles(math.rad(1.5), 0, -math.rad(1.5))
  528.  end
  529.  elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude <= 20 then
  530.  if not humanoid.Sit then
  531.  anglespeed = 2
  532.  if ctrl then
  533.  anglespeed = 3
  534.  ncf = neckc0 * CFrame.Angles(camera.CoordinateFrame.lookVector.y+math.pi/18, 0, 0)
  535.  rjcf = rootc0 * CFrame.new(0, -.35, 0) * CFrame.Angles(-math.pi/18, 0, 0)
  536.  rscf = rsc0 * CFrame.new(-.55, 0, .35) * CFrame.Angles(camera.CoordinateFrame.lookVector.y+math.pi/2+math.pi/18, 0, 0)
  537.  lscf = lsc0 * CFrame.new(.85, 0, -.65) * CFrame.Angles(camera.CoordinateFrame.lookVector.y+math.pi/2+math.pi/18, 0, math.rad(45))
  538.  llcf = llc0 * CFrame.new(0, .45, -.35) * CFrame.Angles(math.pi/18 - math.sin(angle)*.45, 0, 0)
  539.  rlcf = rlcf * CFrame.new(0, .45, -.35) * CFrame.Angles(math.pi/18 + math.sin(angle)*.45, 0, 0)
  540.  else
  541.  rjcf = rootc0
  542.  rlcf = rlc0 * CFrame.Angles(math.sin(-angle)*.65, 0, math.rad(.5))
  543.  llcf = llc0 * CFrame.Angles(math.sin(angle)*.65, 0, -math.rad(.5))
  544.  end
  545.  if sprinting then
  546.  debounceofsprint = false
  547.  sprinting = false
  548.  end
  549.  end
  550.  elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 20 then
  551.  if not humanoid.Sit then
  552.  anglespeed = 2.7
  553.  ncf = neckc0 * CFrame.Angles(math.pi/18, 0, 0)
  554.  rscf = rsc0 * CFrame.new(-.45, 0, -.75) * CFrame.Angles(math.pi/5+math.pi/18, 0, math.rad(-70))
  555.  lscf = lsc0 * CFrame.new(.35, 0, 0) * CFrame.Angles(math.pi/3.5+math.pi/18, 0, 0)
  556.  rjcf = rootc0 * CFrame.new(0, 0, 0) * CFrame.Angles(-math.pi/18, math.sin(angle)*.1, math.sin(angle)*.045)
  557.  rlcf = rlc0 * CFrame.new(0, .3 + -math.cos(-angle)*.3, -.2+math.sin(angle)*0.25) * CFrame.Angles(-math.pi/18+math.sin(-angle)*1.3, 0, math.rad(.5))
  558.  llcf = llc0 * CFrame.new(0, .3 - -math.cos(angle)*.3, -.05-math.sin(angle)*0.25) * CFrame.Angles(-math.pi/18+math.sin(angle)*1.3, 0, -math.rad(.5))
  559.  sprinting = true
  560.  debounceofsprint = true
  561.  end
  562.  end
  563.  rm.C0 = clerp(rm.C0,rscf,speed)
  564.  lm.C0 = clerp(lm.C0,lscf,speed)
  565.  rj.C0 = clerp(rj.C0,rjcf,speed)
  566.  rlegm.C0 = clerp(rlegm.C0,rlcf,speed)
  567.  llegm.C0 = clerp(llegm.C0,llcf,speed)
  568.  neck.C0 = clerp(neck.C0,ncf,speed)
  569. end)
  570. .
  571.  
  572. PabloRV
  573.  
  574.  
  575.  
  576.  
  577.  
  578. Posts :  5
  579. Join date :  2014-07-23
  580.  
  581.  
  582.  
  583.  
  584.  
  585. View user profile
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement