Advertisement
iiJosephCats205

Fireball

Apr 14th, 2018
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. local Player = game.Players.LocalPlayer
  2. local Character = Player.Character
  3. local Mouse = Player:GetMouse()
  4. local Speed = 100 --Change Value
  5. local Damage = 4 --Change Value
  6. Enabled = true
  7.  
  8. Mouse.KeyDown:Connect(function(Key)
  9. if Enabled == false then return end
  10. Key = Key:lower()
  11. if Key == "q" then
  12. Enabled = false
  13. local Fireball = Instance.new("Part")
  14. Fireball.Shape = "Ball"
  15. Fireball.Material = Enum.Material.Neon
  16. Fireball.BrickColor = BrickColor.Red()
  17. Fireball.CFrame = Character.Torso.CFrame*CFrame.new(0,0,-5)
  18. Fireball.Parent = Character
  19. Fireball.CanCollide = false
  20. local BodyVelocity = Instance.new("BodyVelocity")
  21. BodyVelocity.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  22. BodyVelocity.Parent = Fireball
  23. BodyVelocity.Velocity = Character.Torso.CFrame.lookVector*Speed
  24. Fireball.Touched:Connect(function(hit)
  25. local TakeDamage = false
  26. local Humanoid = hit.Parent:FindFirstChild("Humanoid")
  27. if Humanoid ~= nil then
  28. TakeDamage = true
  29. Humanoid:TakeDamage(Damage)
  30. wait(.1)
  31. TakeDamage = false
  32. end
  33. end)
  34. end
  35. wait(1)
  36. Enabled = true
  37. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement