minecrafter523

Untitled

Jun 5th, 2016
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. --dogfite by grubsteak
  2. local v=Vector3.new
  3. local yield=coroutine.yield
  4. local uvec=Vector3.new(1, 1, 1)
  5. local inf=math.huge
  6. local infvec=uvec*inf
  7. local down=false
  8. local speed;
  9.  
  10.  
  11. local players=game:GetService"Players"
  12. local player=players.LocalPlayer
  13. local mouse=player:GetMouse()
  14. repeat yield() until player.Character
  15. local character=player.Character
  16. local torso=character:WaitForChild"Torso"
  17. local humanoid=character:WaitForChild"Humanoid"
  18.  
  19. function weld(p1, p2)
  20. local weld=Instance.new"Weld"
  21. weld.Parent=p1
  22. weld.Part0=p1
  23. weld.Part1=p2
  24. return weld
  25. end
  26.  
  27. local ball=Instance.new"Part"
  28. ball.CanCollide=false
  29. ball.TopSurface="Smooth"
  30. ball.BottomSurface="Smooth"
  31. ball.BrickColor=BrickColor.new"Beige"
  32. ball.FormFactor="Custom"
  33. Instance.new("SpecialMesh", ball).MeshType=Enum.MeshType.Sphere
  34.  
  35. local lb=ball:Clone()
  36. lb.Size=uvec*1
  37. lb.Parent=character
  38. local lbn=ball:clone()
  39. lbn.BrickColor=BrickColor.new"Hot pink"
  40. lbn.Size=uvec*.2
  41. lbn.Parent=character
  42.  
  43. local rb=lb:Clone()
  44. rb.Parent=character
  45. local rbn=lbn:Clone()
  46. rbn.Parent=character
  47.  
  48. local lbnw=weld(lb, lbn)
  49. local rbnw=weld(rb, rbn)
  50. lbnw.C0=CFrame.new(0, 0, -(lb.Size.X/2-lbn.Size.X/4))
  51. rbnw.C0=lbnw.C0
  52.  
  53. local lbw=weld(torso, lb)
  54. local rbw=weld(torso, rb)
  55. lbw.C0=CFrame.new(-lb.Size.X/2, lb.Size.X/2, -lb.Size.X/2)
  56. rbw.C0=lbw.C0*CFrame.new(lb.Size.X, 0, 0)
  57.  
  58. while true do
  59. local dt=yield()
  60. local v=torso.Velocity
  61. local c0=CFrame.new(-lb.Size.X/2, lb.Size.X/2, -lb.Size.X/2)
  62. local deg=-math.max(math.min(v.Y*1.8, 50), -50)/70
  63. --print(deg)
  64. local ang=CFrame.Angles(deg * math.pi/2 , 0, 0)
  65. lbw.C0=c0*CFrame.Angles(0, deg*1.2*math.pi/4, 0)*ang
  66. rbw.C0=c0*CFrame.new(lb.Size.X, 0, 0)*CFrame.Angles(0, -deg*1.2*math.pi/4, 0)*ang
  67. end
Add Comment
Please, Sign In to add comment