Advertisement
mathmasterphil

Fox

Mar 6th, 2015
333
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.59 KB | None | 0 0
  1. plr = game:service'Players'.LocalPlayer
  2. char = plr.Character
  3. mouse = plr:GetMouse()
  4. colors = {"Br. yellowish orange", "Bright red"}
  5. sizes = {1.5, 1.2, 1.4, 1.3, 1.6, 1.7}
  6. local firing = false
  7. local torso = char.Torso
  8. local head = char.Head
  9.  
  10. mouse.Button1Down:connect(function()
  11.     firing = true
  12.     coroutine.wrap(function()
  13.     while firing do
  14.         coroutine.wrap(function()
  15.         cube = sizes[math.random(1, #sizes)]
  16.     local fire = Instance.new("Part", char)
  17.         local fireparticle = Instance.new("Fire", fire)
  18.     fire.FormFactor = "Custom"
  19.     fire.Transparency = 0.4
  20.     fire.BottomSurface = 0; fire.TopSurface = 0
  21.     fire.Size = Vector3.new(cube, cube, cube)
  22.     fire.BrickColor = BrickColor.new(colors[math.random(1, #colors)])
  23.     fire.CFrame = head.CFrame * CFrame.new(math.random(-2, 2), math.random(-1, 1), -2) * CFrame.Angles(math.random(-4, 4), math.random(-4, 4),math.random(-4, 4))
  24.     fire.Velocity = CFrame.new(fire.Position,game.Players.LocalPlayer:GetMouse().Hit.p).lookVector * 50
  25.     bodyforc = Instance.new("BodyForce", fire)
  26.     bodyforc.force = Vector3.new(0, fire:GetMass() * 196, 0)
  27.     Instance.new("PointLight", fire).Color = Color3.new(1, 0, 0)
  28.     fire.Touched:connect(function(hit)
  29.         if hit.Parent:findFirstChild("Humanoid") ~= nil and hit.Parent.Name ~= plr.Name then
  30.             if hit.Parent:IsA("Hat") then
  31.                 hit.Parent.Parent.Humanoid:takeDamage(2)
  32.                 hit.Parent.Parent.Humanoid.Sit = true
  33.             end
  34.             hit.Parent.Humanoid:takeDamage(2)
  35.             hit.Parent.Humanoid.Sit = true
  36.         end
  37.     end)
  38.    
  39.     wait(1)
  40.     fire:Destroy()
  41. end)()
  42. wait(0.1)
  43.     end
  44.     end)()
  45. end)
  46. mouse.Button1Up:connect(function()
  47.     firing = false
  48.     end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement