Advertisement
urabigfatnoob

Orb V1

Sep 5th, 2015
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.84 KB | None | 0 0
  1. player = game.Players.LocalPlayer
  2. mouse = player:GetMouse()
  3. repeat wait() until player.Character
  4. chr = player.Character
  5. chr.Humanoid.WalkSpeed = 50
  6.  
  7. template = Instance.new("Part") --We're not going to put it anywhere, it's just a template.
  8. template.CanCollide = false
  9. template.BrickColor = BrickColor.White()
  10. template.Transparency = .9
  11. template.Size = Vector3.new(7,7,7)
  12. template.TopSurface = Enum.SurfaceType.Smooth
  13. template.BottomSurface = Enum.SurfaceType.Smooth
  14.  
  15. bv = Instance.new("BodyVelocity", template)
  16. bv.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  17.  
  18. mesh = Instance.new("SpecialMesh",template)
  19. mesh.MeshType = "Sphere"
  20.  
  21. debounce = false
  22.  
  23. mouse.KeyDown:connect(function(key)
  24. if key == 'q' or key == 'e' then
  25. local projectile = template:Clone()
  26. projectile.Parent = chr
  27. projectile.Name = 'Projectile'
  28. projectile.CFrame = chr.Torso.CFrame
  29. projectile.BodyVelocity.velocity = chr.Torso.CFrame.lookVector * 120
  30. if key == 'e' then
  31. projectile.BrickColor = BrickColor.Blue()
  32. end
  33.  
  34. projectile.Touched:connect(function(pA)
  35. local h = pA.Parent:FindFirstChild("Humanoid")
  36. if h and h.Parent.Name ~= player.Name then
  37. local health = h.MaxHealth/1.9
  38. if key == 'q' and debounce == false then
  39. debounce = true
  40. h.Health = h.Health - health
  41. wait(.25)
  42. debounce = false
  43. elseif key == 'e' then
  44. local clone = projectile:Clone()
  45. projectile:Destroy()
  46. clone.Parent = h.Parent
  47. clone.BrickColor = BrickColor.Blue()
  48. clone.Anchored = true
  49. clone.CFrame = h.Parent.Torso.CFrame
  50. h.Parent.Torso.Anchored = true
  51. wait(3)
  52. clone:Destroy()
  53. h.Parent.Torso.Anchored = false
  54. end
  55. end
  56. end)
  57.  
  58. wait(4)
  59. projectile:Destroy()
  60. end
  61. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement