ahackerROBLOX

Untitled

Sep 1st, 2015
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.96 KB | None | 0 0
  1. plr = game.Players.LocalPlayer
  2. char = plr.Character
  3. mouse = plr:GetMouse()
  4. up = false
  5.  
  6. armweld = Instance.new("Weld", char.Torso)
  7. armweld.C0 = CFrame.new(1.5, .5, 0)
  8. armweld.C1 = CFrame.new(0, .5, 0)
  9. armweld.Part0 = char.Torso
  10. armweld.Part1 = char["Right Arm"]
  11.  
  12. Handle = Instance.new("Part",char)
  13. Handle.Size=Vector3.new(1,6,1)
  14. Handle.Name = "Handle"
  15. Handle.Anchored = false
  16. Handle.CanCollide = false
  17. Handle.BrickColor = BrickColor.new("Really black")
  18. Handle:BreakJoints()
  19. Mesh = Instance.new("SpecialMesh",Handle)
  20. Mesh.MeshType=0
  21. Mesh.Scale=Vector3.new(0.2,0.8,0.2)
  22. Mesh.Offset=Vector3.new(0,-2,0)
  23. Weld = Instance.new("Weld",Handle)
  24. Weld.Part0 = Weld.Parent
  25. Weld.Part1 = plr.Character["Right Arm"]
  26. Weld.C0 = CFrame.new(0,1,1)*CFrame.Angles(math.rad(90),0,0)
  27. Ball = Instance.new("Part",plr.Character)
  28. Ball.Size = Vector3.new(0.1,0.1,0.1)
  29. Ball.Name = "Ball"
  30. Ball:BreakJoints()
  31. Ball.Anchored = false
  32. Ball.Transparency = 0
  33. Ball.CanCollide = false
  34. Ball.Shape = "Ball"
  35. Ball.TopSurface = "Unjoinable"
  36. Ball.BottomSurface = "Unjoinable"
  37. Ball.BrickColor = BrickColor.new(104)
  38. Mesh = Instance.new("SpecialMesh",Ball)
  39. Mesh.MeshId = "http://www.roblox.com/asset/?id=9756362"
  40. Mesh.Scale = Vector3.new(0.7,0.7,1)
  41. Weld = Instance.new("Weld",Ball)
  42. Weld.Part0 = Weld.Parent
  43. Weld.Part1 = Handle
  44. Weld.C0 = CFrame.new(0,0,-2.5)*CFrame.Angles(math.rad(90),0,0)
  45.  
  46.  
  47. function onKeyDown(key)
  48. if key == "e" then
  49. if up == false then
  50. for a = 0, 1, .05 do
  51. armweld.C0 = CFrame.new(1.5, .5, 0) * CFrame.Angles(math.sin(a*math.pi/2)*math.pi/2, 0, 0)
  52. wait()
  53. end
  54. up = true
  55. else
  56. up = false
  57. for a = 1, 0, -.05 do
  58. armweld.C0 = CFrame.new(1.5, .5, 0) * CFrame.Angles(math.sin(a*math.pi/2)*math.pi/2, 0, 0)
  59. wait()
  60. end
  61. end
  62. end
  63. end
  64.  
  65. mouse.KeyDown:connect(onKeyDown)
  66. mouse.Button1Down:connect(function()
  67. if up then
  68. local startpos = Ball.Position;
  69. local endpos = mouse.Hit.p;
  70. local length = 999;
  71.  
  72. local ray = Ray.new(startpos, (endpos - startpos).unit*length)
  73. local hit, hitpos = workspace:FindPartOnRay( ray, char )
  74.  
  75. local size = (startpos-hitpos).magnitude
  76.  
  77. if hit then
  78. if hit.Parent:findFirstChild("Humanoid") then
  79. hit.Parent.Humanoid:TakeDamage(100)
  80. end
  81. end
  82.  
  83. local part = Instance.new("Part", char)
  84. part.Anchored = true
  85. part.formFactor = "Custom"
  86. part.CanCollide = false
  87. part.BrickColor = BrickColor.new(104)
  88. part.Size = Vector3.new(.1, size, .1)
  89. part.CFrame = CFrame.new(startpos, hitpos) * CFrame.Angles(-math.pi/2, 0, 0) * CFrame.new(0, size/2, 0)
  90. local m = Instance.new("CylinderMesh", part)
  91. wait(0.1)
  92. part:remove()
  93. end
  94. end)
  95.  
  96. Ball.Touched:connect(function(hit)
  97. if up == false then
  98. if hit.Parent:findFirstChild("Humanoid") then
  99. hit.Parent.Humanoid.Health = 0
  100. end
  101. end
  102. end)
Add Comment
Please, Sign In to add comment