mikee112

weew

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