Advertisement
Guest User

asdfers

a guest
Nov 23rd, 2014
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.72 KB | None | 0 0
  1. --FireWork--
  2. Player = game.Players.LocalPlayer
  3. Mouse = Player:GetMouse()
  4. function Path(Block,Speed,Color)
  5. local Parts = {}
  6. game:GetService("RunService").Stepped:connect(function()
  7. if Block:IsDescendantOf(Workspace) then
  8. local P = Parts[#Parts]
  9. if P then
  10. local G = Instance.new("Part",Workspace)
  11. if Color then
  12. G.BrickColor = Color
  13. end
  14. G.Anchored = true
  15. G.FormFactor = "Custom";G.CanCollide = false
  16. G.TopSurface = "Smooth"
  17. G.BottomSurface = "Smooth"
  18. local Dis = ((P.CFrame*CFrame.new(0,0,-P.Size.Z/2)).p-Block.CFrame.p).magnitude
  19. G.Size = Vector3.new(1,1,Dis)
  20. G.CFrame = CFrame.new((P.CFrame*CFrame.new(0,0,-P.Size.Z/2)).p,Block.CFrame.p)*CFrame.new(0,0,-Dis/2)
  21. table.insert(Parts,G)
  22. else
  23. local G = Instance.new("Part",Workspace)
  24. G.Anchored = true
  25. G.FormFactor = 'Custom'
  26. G.Size = Vector3.new(0,0,0)
  27. G.CFrame = Block.CFrame
  28. table.insert(Parts,G)
  29. end
  30. end
  31. for i,v in pairs(Parts) do
  32. if v.Transparency < 1 then
  33. v.Transparency = v.Transparency +Speed
  34. else
  35. table.remove(Parts,i)
  36. v:Destroy()
  37. end
  38. end
  39. end)
  40. end
  41. Parts = {}
  42. function NewPart()
  43. local Part = Instance.new("Part",Workspace)
  44. Part.Anchored = true
  45. Part.CanCollide = false
  46. Part.Size = Vector3.new(1,1,1)
  47. local B = {}
  48. B.Velocity = Vector3.new(0,0,0)
  49. B.P = Part
  50. table.insert(Parts,B)
  51. return B
  52. end
  53. function Launch(C1,C2,A,Color)
  54. local Part = NewPart()
  55. Part.P.CFrame = C1
  56. Path(Part.P,0.1,Color)
  57. if Color then
  58. Part.P.BrickColor = Color
  59. end
  60. Part.Velocity = (C1.p-C2.p)*A
  61. return Part.P
  62. end
  63. Amount = 10
  64. mt = math.random
  65. game:GetService("RunService").Stepped:connect(function()
  66. for i,v in pairs(Parts) do
  67. if v.P:IsDescendantOf(Workspace) and v.P.CFrame.Y > 0 then
  68. v.P.CFrame = v.P.CFrame+v.Velocity
  69. v.Velocity = v.Velocity -Vector3.new(0,0.5,0)
  70. else
  71. v.P:Destroy()
  72. table.remove(Parts,i)
  73. end
  74. end
  75. end)
  76. game.Lighting.TimeOfDay = "00:00:00"
  77. --game.Lighting.Sky.CelestialBodiesShown = false
  78. Mouse.Button1Down:connect(function()
  79. --while wait(5) do
  80. local Color = BrickColor.random()
  81. local Pos = CFrame.new(math.random(-500,500),0,math.random(-500,500))
  82. local P = Pos+Vector3.new(mt(-50,50),-mt(200,600),mt(-50,50))
  83. local MS = Launch(Pos+Vector3.new(0,10,0),P,0.05)
  84. Path(MS,0.1)
  85. wait(1);MS:Destroy()
  86. local M = Instance.new("Part",Workspace);M.Transparency = 1;M.CFrame = P;M.CanCollide = false
  87. local S = Instance.new("Sound",M);S.SoundId = "http://www.roblox.com/asset/?id="..157878578;S.Volume = 20;S:Play()
  88. for i = 1,math.random(20,50) do
  89. Instance.new("PointLight",Launch(MS.CFrame,MS.CFrame+Vector3.new(mt(-100,100),-mt(0,150),mt(-100,100))+(-MS.Velocity),0.1,Color)).Range = 20
  90. end
  91. --end
  92. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement