Advertisement
fireband12

Untitled

Feb 16th, 2015
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. plr=game.Players.LocalPlayer
  2. mouse=plr:GetMouse()
  3. char=plr.Character
  4. local a = Instance.new("Part")
  5. a.Parent = char.Head
  6. a.Name = "Ball"
  7. a.Shape = "Ball"
  8. a.Size = Vector3.new(2,2,2)
  9. a.TopSurface = "Smooth"
  10. a.BottomSurface = "Smooth"
  11. a.Anchored = false
  12. local angle = 0
  13. coroutine.wrap(function()
  14. repeat until true
  15. angle = angle + math.rad(1)
  16. a.CFrame = CFrame.new(angle,0,0)
  17. end)
  18.  
  19. local bp = Instance.new("BodyPosition")
  20.  
  21. bp.Parent = a
  22. bp.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  23. coroutine.wrap(function()
  24. while wait(.1) do
  25. x, y, z = char.Head.Position.x, char.Head.Position.y, char.Head.Position.z
  26. bp.position = Vector3.new(x, y, z - 5)
  27. end
  28. end)()
  29.  
  30. mouse.Button1Down:connect(function()
  31. local lazor = Instance.new("Part",char)
  32. lazor.Touched:connect(function(hit)
  33. if hit.Parent ~= char or hit.Parent ~= Ball or hit.Parent ~= "Base" then
  34. hit:FindFirstChild("Humanoid").TakeDamage(30)
  35.  
  36. end
  37. end)
  38. lazor.Anchored=true
  39. lazor.FormFactor = "Custom"
  40. lazor.BottomSurface = "Smooth"
  41. lazor.TopSurface= "Smooth"
  42. lazor.BrickColor=BrickColor.new("Bright red")
  43. lazor.CanCollide=false
  44. lazor.Transparency=0.4
  45. pos1=mouse.Hit.p--vector3 .3.
  46. pos2=a.CFrame.p--vector3 .3. xdd :3
  47. mag=(pos1-pos2).magnitude
  48. lazor.Size=Vector3.new(0.1,0.1,mag)
  49. lazor.CFrame=CFrame.new(pos1,pos2)*CFrame.new(0,0,-mag/2 + 2)
  50. coroutine.wrap(function()
  51. wait(0.5)
  52. for i=1,10 do wait()
  53. lazor.Transparency=lazor.Transparency+0.1
  54. wait(0.1)
  55. game:GetService("Debris"):AddItem(lazor, 1)
  56. end
  57. end)()
  58. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement