Advertisement
urabigfatnoob

test 2

Sep 6th, 2015
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. player = game.Players.LocalPlayer
  2. mouse = player:GetMouse()
  3. repeat wait() until player.Character
  4. chr = player.Character
  5.  
  6. template = Instance.new("Part") --We're not going to put it anywhere, it's just a template.
  7. template.CanCollide = false
  8. template.BrickColor = BrickColor.White()
  9. template.Transparency = .9
  10. template.Size = Vector3.new(7,7,7)
  11. template.TopSurface = Enum.SurfaceType.Smooth
  12. template.BottomSurface = Enum.SurfaceType.Smooth
  13.  
  14. bv = Instance.new("BodyVelocity", template)
  15. bv.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  16.  
  17. mesh = Instance.new("SpecialMesh",template)
  18. mesh.MeshType = "Sphere"
  19.  
  20. mouse.KeyDown:connect(function(key)
  21. if key == 'q' then
  22. local projectile = template:Clone()
  23. projectile.Parent = chr
  24. projectile.Name = 'Projectile'
  25. projectile.CFrame = chr.Torso.CFrame
  26. projectile.BodyVelocity.velocity = chr.Torso.CFrame.lookVector * 120
  27.  
  28. projectile.Touched:connect(function(pA)
  29. local h = pA.Parent:FindFirstChild("Humanoid")
  30. if h and h.Parent.Name ~= player.Name then
  31. h.Parent:Destroy()
  32. end
  33. end)
  34.  
  35. wait(4)
  36. projectile:Destroy()
  37. end
  38. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement