Dark_EccentricYT

Untitled

May 24th, 2018
2,713
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.54 KB | None | 0 0
  1. --------------
  2. --Fireworks!--
  3. ----------------------------------------------------------------
  4. --By CKbackup (Sugarie Saffron) --
  5. --YT: https://www.youtube.com/channel/UC8n9FFz7e6Zo13ob_5F9MJw--
  6. --Discord: Sugarie Saffron#4705 --
  7. ----------------------------------------------------------------
  8.  
  9. wait(1/60)
  10. Effects = { }
  11. local Player = game:service'Players'.localPlayer
  12. local chara = Player.Character
  13. local Mouse = Player:GetMouse()
  14. local debby = game:GetService("Debris")
  15. local col = "Random"
  16.  
  17. warn("Sugarie's Fireworks")
  18. warn("YT: https://www.youtube.com/channel/UC8n9FFz7e6Zo13ob_5F9MJw")
  19. warn("Discord: Sugarie Saffron#4705")
  20. warn("-----------------------------------------------")
  21. warn('To change colours, chat in "Color " and then:')
  22. warn('"Rainbow" for rainbow colours')
  23. warn('"Random" for random colours (set on default)')
  24. warn('a BrickColor name')
  25. warn("-----------------------------------------------")
  26.  
  27. ArtificialHB = Instance.new("BindableEvent", script)
  28. ArtificialHB.Name = "Heartbeat"
  29. script:WaitForChild("Heartbeat")
  30. frame = 0.03333333333333
  31. tf = 0
  32. allowframeloss = false
  33. tossremainder = false
  34. lastframe = tick()
  35. script.Heartbeat:Fire()
  36. game:GetService("RunService").Heartbeat:connect(function(s, p)
  37. tf = tf + s
  38. if tf >= frame then
  39. if allowframeloss then
  40. script.Heartbeat:Fire()
  41. lastframe = tick()
  42. else
  43. for i = 1, math.floor(tf / frame) do
  44. script.Heartbeat:Fire()
  45. end
  46. lastframe = tick()
  47. end
  48. if tossremainder then
  49. tf = 0
  50. else
  51. tf = tf - frame * math.floor(tf / frame)
  52. end
  53. end
  54. end)
  55. function swait(num)
  56. if num == 0 or num == nil then
  57. ArtificialHB.Event:wait()
  58. else
  59. for i = 0, num do
  60. ArtificialHB.Event:wait()
  61. end
  62. end
  63. end
  64.  
  65. function so(id,par,pit,vol)
  66. local sou = Instance.new("Sound", par or workspace)
  67. if par == chara then
  68. sou.Parent = chara.Torso
  69. end
  70. sou.Volume = vol
  71. sou.Pitch = pit or 1
  72. sou.SoundId = "rbxassetid://" .. id
  73. sou.PlayOnRemove = true
  74. sou:Destroy()
  75. end
  76.  
  77. firecolour = {ColorSequenceKeypoint.new(0,BrickColor.new("Really red").Color),ColorSequenceKeypoint.new(.05,BrickColor.new("Neon orange").Color),ColorSequenceKeypoint.new(.1,BrickColor.new("New yeller").Color),ColorSequenceKeypoint.new(.15,BrickColor.new("Lime green").Color),ColorSequenceKeypoint.new(.2,BrickColor.new("Really blue").Color),ColorSequenceKeypoint.new(.25,BrickColor.new("Alder").Color),ColorSequenceKeypoint.new(1,BrickColor.new("Alder").Color)}
  78. barcolour = {ColorSequenceKeypoint.new(0,BrickColor.new("Really red").Color),ColorSequenceKeypoint.new(.2,BrickColor.new("Neon orange").Color),ColorSequenceKeypoint.new(.4,BrickColor.new("New yeller").Color),ColorSequenceKeypoint.new(.6,BrickColor.new("Lime green").Color),ColorSequenceKeypoint.new(.8,BrickColor.new("Really blue").Color),ColorSequenceKeypoint.new(1,BrickColor.new("Alder").Color)}
  79.  
  80. Player.Chatted:connect(function(msg)
  81. if msg:sub(1,6)== "Color " then
  82. col = msg:sub(7,msg:len())
  83. end
  84. end)
  85.  
  86. function firework()
  87. local fir = Instance.new("Part",chara)
  88. fir.Size = Vector3.new(.6,.6,4)
  89. fir.CanCollide = false
  90. fir.Anchored = true
  91. fir.CustomPhysicalProperties = PhysicalProperties.new(0,0,0,0,0)
  92. fir.CFrame = CFrame.new(Mouse.Hit.p)*CFrame.new(0,2,0)*CFrame.Angles(math.rad(90),0,0)
  93. local firm = Instance.new("SpecialMesh",fir)
  94. firm.MeshId = "rbxassetid://29935141"
  95. firm.TextureId = "rbxassetid://29935304"
  96. firm.Scale = Vector3.new(1.2,1.2,1.2)
  97. local fira = Instance.new("Part",fir)
  98. fira.CanCollide = false
  99. fira.Transparency = 1
  100. fira.Size = Vector3.new()
  101. local firaw = Instance.new("Weld",fira)
  102. firaw.Part0 = fira
  103. firaw.Part1 = fir
  104. firaw.C0 = CFrame.new(0,0,-1)
  105. local firp = Instance.new("ParticleEmitter",fira)
  106. firp.LightEmission = 1
  107. firp.Texture = "rbxasset://textures/particles/fire_main.dds"
  108. firp.Speed = NumberRange.new(0)
  109. firp.Size = NumberSequence.new(.5,0)
  110. firp.Transparency = NumberSequence.new(0,1)
  111. firp.LightInfluence = 0
  112. firp.RotSpeed = NumberRange.new(-300,300)
  113. firp.Rotation = NumberRange.new(0,360)
  114. firp.Lifetime = NumberRange.new(.5)
  115. firp.Rate = 1000
  116. if col == "Rainbow" then
  117. firp.Color = ColorSequence.new(firecolour)
  118. elseif col == "Random" then
  119. firp.Color = ColorSequence.new(BrickColor.Random().Color)
  120. else
  121. firp.Color = ColorSequence.new(BrickColor.new(col).Color)
  122. end
  123. so(11565378,fir,1,1)
  124. swait(60)
  125. so(161034732,fir,1,3)
  126. local bodv = Instance.new("BodyVelocity",fir)
  127. bodv.P = 20000
  128. bodv.MaxForce = Vector3.new(bodv.P,bodv.P,bodv.P)
  129. bodv.Velocity = Vector3.new(0,60,0)
  130. fir.Anchored = false
  131. local weito = math.random(40,60)
  132. swait(weito)
  133. so(161034752,fir,1,5)
  134. fir.Anchored = true
  135. fira.Anchored = true
  136. fir.Transparency = 1
  137. firp.Enabled = false
  138. local cho = math.random(1,2)
  139. if cho == 1 then
  140. local exp = Instance.new("Part",fir)
  141. exp.CanCollide = false
  142. exp.Transparency = 1
  143. exp.Size = Vector3.new()
  144. exp.Anchored = true
  145. exp.CFrame = fir.CFrame
  146. local expem = Instance.new("ParticleEmitter",exp)
  147. expem.LightEmission = 1
  148. expem.LightInfluence = 0
  149. expem.Texture = "rbxassetid://31727958"
  150. expem.Enabled = false
  151. expem.Speed = NumberRange.new(50)
  152. expem.Drag = 5
  153. expem.Lifetime = NumberRange.new(3)
  154. expem.RotSpeed = NumberRange.new(-300,300)
  155. expem.VelocitySpread = 360
  156. expem.Size = NumberSequence.new({
  157. NumberSequenceKeypoint.new(0,1),
  158. NumberSequenceKeypoint.new(.9,1),
  159. NumberSequenceKeypoint.new(1,0)
  160. })
  161. expem.Transparency = NumberSequence.new(0,1)
  162. if col == "Rainbow" then
  163. expem.Color = ColorSequence.new(barcolour)
  164. elseif col == "Random" then
  165. expem.Color = firp.Color
  166. else
  167. expem.Color = ColorSequence.new(BrickColor.new(col).Color)
  168. end
  169. expem:Emit(1000)
  170. elseif cho == 2 then
  171. for a=1,15 do
  172. local exp = Instance.new("Part",fir)
  173. exp.CanCollide = false
  174. exp.Transparency = 1
  175. exp.Size = Vector3.new()
  176. exp.Anchored = true
  177. exp.CFrame = fir.CFrame*CFrame.Angles(math.rad(math.random(0,360)),math.rad(math.random(0,360)),math.rad(math.random(0,360)))
  178. local expem = Instance.new("ParticleEmitter",exp)
  179. expem.LightEmission = 1
  180. expem.LightInfluence = 0
  181. expem.Texture = "rbxassetid://31727958"
  182. expem.Enabled = true
  183. expem.Drag = 3
  184. expem.Speed = NumberRange.new(80)
  185. expem.Lifetime = NumberRange.new(3)
  186. expem.RotSpeed = NumberRange.new(-300,300)
  187. expem.Size = NumberSequence.new(1,0)
  188. expem.Transparency = NumberSequence.new(0,1)
  189. expem.Rate = 10000
  190. if col == "Rainbow" then
  191. expem.Color = ColorSequence.new(firecolour)
  192. elseif col == "Random" then
  193. expem.Color = firp.Color
  194. else
  195. expem.Color = ColorSequence.new(BrickColor.new(col).Color)
  196. end
  197. coroutine.wrap(function()
  198. swait(20)
  199. expem.Enabled = false
  200. end)()
  201. end
  202. end
  203. debby:AddItem(fir,8)
  204. end
  205.  
  206. Mouse.Button1Down:connect(function()
  207. firework()
  208. end)
Add Comment
Please, Sign In to add comment