Advertisement
kanewutt

fsefesf

May 15th, 2016
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 36.21 KB | None | 0 0
  1. -- http link: https://www.dropbox.com/s/37stvy9i24rh9jv/Particle%20emitter.lua?dl=1
  2.  
  3. -- asd Emitter --
  4. if script.ClassName == "LocalScript" then
  5. repeat wait() until game.Players.LocalPlayer.Character
  6. game.Players.LocalPlayer.Character:WaitForChild("Head")
  7. Mouse = game.Players.LocalPlayer:GetMouse()
  8. Workspace.CurrentCamera:ClearAllChildren()
  9. end
  10. wait(1)
  11. script.Parent = nil
  12. local Particles = {}
  13. local Emitters = {}
  14. FPS = 30
  15. random = function(a,b)
  16. local seed = tick()
  17. rick = rick and rick+1 or 1
  18. return a+(b-a)*(seed*rick%1)
  19. end
  20. function ray(p1,p2)
  21. local n = Ray.new(p1,p2)
  22. local hit,pos = Workspace:findPartOnRay(n)
  23. return hit,pos
  24. end
  25. function lerp(a,b,c)
  26. return a+(b-a)*c
  27. end
  28. function NewParticleEmitter(Adornee)
  29. local P = {}
  30. P.LastEmit = tick()
  31. P.EmitSpeed = 1
  32. P.Adornee = Adornee
  33. P.Image = 169845936
  34. P.LifeTime = 2
  35. P.Offset = Vector3.new(0,0,0)
  36. P.Speed = CFrame.new(0,0,0)
  37. P.OffVelocity = Vector3.new(0,0,0)
  38. P.OnVelocity = Vector3.new(0,0,0)
  39. P.Spread = Vector3.new(0,0,0)
  40. P.Growth = Vector2.new(0,0)
  41. P.ParticleSize = Vector2.new(1,1)
  42. P.EmitSize = Vector3.new(0,0,0)
  43. P.Rotation = 5
  44. P.RotationAccel = 0
  45. P.ConnectPower = 0
  46. P.Dampen = 0
  47. P.Velocity = Vector3.new(0,0,0)
  48. P.LinearMultiplication = Vector3.new(0,0,0)
  49. P.VerletMultiplication = false
  50. P.Color = Color3.new(1,1,1)
  51. P.ToColor = P.Color
  52. P.PowerToMouse = 0
  53. P.Replication = 0
  54. P.StartTransparency = 0.2
  55. function P:Emit(prop,pprop,gprop)
  56. if P.Adornee then
  57. local N = Instance.new("Part",script.ClassName == "LocalScript" and Workspace.CurrentCamera or P.Adornee)
  58. N.FormFactor = "Custom"
  59. N.Transparency = 1
  60. N.Size = Vector3.new(0,0,0)
  61. N.CFrame = P.Adornee.CFrame*CFrame.new(P.Offset)*CFrame.new(math.random(-P.EmitSize.X,P.EmitSize.X),math.random(-P.EmitSize.Y,P.EmitSize.Y),math.random(-P.EmitSize.Z,P.EmitSize.Z))
  62. N.CanCollide = false
  63. N.Anchored = true
  64. local C = Instance.new("BillboardGui",N)
  65. C.Size = UDim2.new(P.ParticleSize.X,0,P.ParticleSize.Y,0)
  66. local I = Instance.new("ImageLabel",C)
  67. I.Rotation = math.random(0,360)
  68. I.Size = UDim2.new(1,0,1,0)
  69. I.Image = "http://www.roblox.com/asset/?id="..P.Image-1
  70. I.BackgroundTransparency = 1
  71. I.ImageColor3 = Color3.new(0,0,0)
  72. local S = {}
  73. S.Part = N
  74. S.Board = C
  75. S.Gui = I
  76. S.Last = S.Part.CFrame.p
  77. S.Start = S.Part.CFrame
  78. S.Direction = math.random(1,2)
  79. S.Velocity = Vector3.new()
  80. S.LifeTime =P.LifeTime
  81. S.RotVelocity = 0
  82. local H = N.CFrame*CFrame.new(P.Velocity)
  83. local D = H.p-N.CFrame.p
  84. ypcall(function()
  85. table.foreach(prop or {},function(a,b) S[a]=b end)
  86. end)
  87. S.Velocity = S.Velocity+D+Vector3.new(
  88. P.Spread.X > 0 and random(-P.Spread.X,P.Spread.X)/50 or 0,
  89. P.Spread.Y > 0 and random(-P.Spread.Y,P.Spread.Y)/50 or 0,
  90. P.Spread.Z > 0 and random(-P.Spread.Z,P.Spread.Z)/50 or 0
  91. )
  92. S.CreationDate = tick()
  93. table.foreach(pprop or {},function(a,b) N[a]=b end)
  94. table.foreach(gprop or {},function(a,b) S.Board[a]=b end)
  95. function S:Update()
  96. local T = tick()-S.CreationDate
  97. local Age = (T/S.LifeTime)
  98. if T < S.LifeTime then
  99. S.RotVelocity = S.RotVelocity+P.RotationAccel
  100. S.Gui.Rotation = S.Gui.Rotation +((S.Direction == 1 and P.Rotation or -P.Rotation) + (S.Direction == 1 and S.RotVelocity or -S.RotVelocity))
  101. local ic3 = S.Gui.ImageColor3
  102. S.Gui.ImageColor3 = Color3.new(lerp(P.Color.r,P.ToColor.r,Age),lerp(P.Color.g,P.ToColor.g,Age),lerp(P.Color.b,P.ToColor.b,Age))--Color3.new(ic3.r+0.02,ic3.g+0.02,ic3.b+0.02)
  103. S.Gui.ImageTransparency = P.StartTransparency+((1-P.StartTransparency)*(T/P.LifeTime))
  104. S.Part.CFrame = S.Part.CFrame*CFrame.new(P.Speed.X/(1/FPS),P.Speed.Y/(1/FPS),P.Speed.Z/(1/FPS))
  105. S.Velocity = S.Velocity +((((P.Adornee.CFrame.p+P.Offset)-(S.Part.CFrame.p))*P.ConnectPower)*Vector3.new(math.random()+math.random(),math.random()+math.random(),math.random()+math.random()))
  106. S.Velocity = S.Velocity +(P.OffVelocity/(1/FPS))
  107. S.Velocity = S.Velocity +(P.OnVelocity/(1/FPS))
  108. S.Velocity = S.Velocity-(S.Velocity*P.Dampen)
  109. S.Velocity = S.Velocity+(S.Velocity*P.LinearMultiplication)
  110. if script.ClassName == "LocalScript" and P.PowerToMouse>0 then
  111. S.Velocity = S.Velocity+(-(S.Part.CFrame.p-(Mouse.Hit.p or S.Part.CFrame.p))*(P.PowerToMouse/(1/FPS)))
  112. end
  113. FakeVel = S.Velocity
  114. -- FakeVel = Vector3.new(unpack(FakeVel))
  115. S.Part.CFrame = S.Part.CFrame+FakeVel
  116. if P.VerletMultiplication then
  117. S.Velocity = S.Velocity+(S.Part.CFrame.p-S.Last)
  118. end
  119. S.Board.Size = S.Board.Size +UDim2.new(P.Growth.X/(1/FPS),0,P.Growth.Y/(1/FPS),0)
  120. --S.Gui.Position = UDim2.new(-(S.Gui.Size.X.Scale-1)/4,0,-(S.Gui.Size.Y.Scale-1)/4,0)
  121. S.Last = S.Part.CFrame.p
  122. if (tick()-S.CreationDate)%P.Replication<0.01 then
  123. --print'hax'
  124. wait(1)
  125. P:Emit({Velocity = S.Velocty,LifeTime=S.LifeTime*0.2},{CFrame=S.Part.CFrame},{Size = S.Board.Size-UDim2.new(0.5,0,0.5,0)})
  126. table.foreach(Particles,function(i,v)
  127. if v == S then
  128. table.remove(Particles,i)
  129. end
  130. end)
  131. N:Destroy()
  132. end
  133. else
  134. table.foreach(Particles,function(i,v)
  135. if v == S then
  136. table.remove(Particles,i)
  137. end
  138. end)
  139. N:Destroy()
  140. end
  141. end
  142. table.insert(Particles,S)
  143. return S
  144. end
  145. end
  146. function P:Update()
  147. if tick()-P.LastEmit > 1/P.EmitSpeed then
  148. P.LastEmit = tick()
  149. P:Emit()
  150. end
  151. end
  152. table.insert(Emitters,P)
  153. return P
  154. end
  155.  
  156. local C = NewParticleEmitter(script.ClassName == "LocalScript" and game.Players.LocalPlayer.Character:WaitForChild("Torso") or Workspace:WaitForChild("Base"))
  157. game.Players.LocalPlayer.CharacterAdded:connect(function()
  158. repeat wait() until game.Players.LocalPlayer.Character:WaitForChild("Torso")
  159. C.Adornee = game.Players.LocalPlayer.Character.Torso
  160. end)
  161. local Types = {}
  162. Types.Sparkles = function()
  163. C.EmitSpeed = 10
  164. C.ParticleSize = Vector2.new(2,2)
  165. C.Offset = Vector3.new(0,5,0)
  166. C.Speed = CFrame.new(0,0,0)
  167. C.Velocity = Vector3.new(0,0.6,0)
  168. C.Spread = Vector3.new(10,0,10)
  169. C.OnVelocity = Vector3.new(0,-0.4,0)
  170. C.OffVelocity = Vector3.new(0,0,0)
  171. --C.Growth = Vector2.new(-0.02,-0.02)
  172. C.EmitSize = Vector3.new(0,0,0)
  173. C.Rotation = 5
  174. C.ConnectPower = 0
  175. C.Dampen = 0.02
  176. C.LifeTime = 8
  177. C.Image = 169845936
  178. C.Growth = Vector2.new(0,0)
  179. C.StartTransparency = 0
  180. end
  181.  
  182. Types.Spikey = function()
  183. C.Color = Color3.new(200/255,0,0)
  184. C.OnVelocity = Vector3.new(0,0,0)
  185. C.Image = 169845936
  186. C.Dampen = 0
  187. C.Replication = 0
  188. C.Speed = CFrame.new(0,0,0)
  189. C.Spread = Vector3.new(0,0,0)
  190. C.OffVelocity = Vector3.new(0,0,0)
  191. C.Offset = Vector3.new(0,5,0)
  192. C.EmitSpeed = 100
  193. C.ToColor = Color3.new(0,0,0)
  194. C.LinearMultiplication = Vector3.new(0,0,0)
  195. C.Growth = Vector2.new(0,50)
  196. C.Velocity = Vector3.new(0,0,0)
  197. C.Rotation = 5
  198. C.StartTransparency = 0
  199. C.ConnectPower = 0
  200. C.PowerToMouse = 0
  201. C.RotationAccel = 0
  202. C.ParticleSize = Vector2.new(2,2)
  203. C.VerletMultiplication = false
  204. C.LifeTime = 3
  205. end
  206.  
  207. Types.Smoke = function()
  208. C.EmitSpeed = 100
  209. C.ParticleSize = Vector2.new(5,5)
  210. C.Offset = Vector3.new(0,5,0)
  211. C.Speed = CFrame.new(0,0,0)
  212. C.Velocity = Vector3.new(0,0.05,0)
  213. C.Spread = Vector3.new(1,1,1)
  214. C.OnVelocity = Vector3.new(0,0,0)
  215. C.OffVelocity = Vector3.new(0,0,0)
  216. C.Growth = Vector2.new(20,20)
  217. C.EmitSize = Vector3.new(0,0,0)
  218. C.Rotation = 0
  219. C.StartTransparency = 0.95
  220. C.ConnectPower = 0
  221. C.RotationAccel = 0.02
  222. C.Dampen = 0
  223. C.LifeTime = 3
  224. C.Image = 133619975
  225. end
  226. Types.Smoke()
  227.  
  228. --Types.Default()
  229. function gt(s,m,b)
  230. local n = {}
  231. local curr = ""
  232. for i = 1,#s do
  233. local t = string.sub(s,i,i)
  234. if t:match(m) then
  235. n[#n+1]=curr
  236. curr = ""
  237. else
  238. if not t:match(b) then
  239. curr = curr..t
  240. end
  241. if i == #s then
  242. n[#n+1]=curr
  243. end
  244. end
  245. end
  246. return n
  247. end
  248. if script.ClassName == "LocalScript" then Player = game.Players.LocalPlayer end
  249. function UI()
  250. --print(script.ClassName=="LocalScript",Player,Player:FindFirstChild("PlayerGui")~=nil,Player.PlayerGui:findFirstChild("EmitG")~=nil)
  251. if script.ClassName == "LocalScript" and Player and Player:FindFirstChild("PlayerGui") and not Player.PlayerGui:findFirstChild("EmitG") then
  252. print'ui'
  253. local Player = game.Players.LocalPlayer
  254. local Mouse = Player:GetMouse()
  255. local PlayerGui = Player:WaitForChild("PlayerGui")
  256. local Screen = Instance.new("ScreenGui",PlayerGui)
  257. Screen.Name = "EmitG"
  258. local Count = 0
  259. local Allow = {
  260. ["Vector3"]=true;
  261. ["CFrame"]=true;
  262. ["tick"]=true;
  263. ["Vector2"]=true;
  264. }
  265. local MX = 0
  266. local UI = {}
  267. local PBX = Instance.new("Frame",Screen)
  268. PBX.Size = UDim2.new(0,500,0,0)
  269. PBX.Position = UDim2.new(0,0.5,0,0)
  270. PBX.Active = true
  271. PBX.Draggable = true
  272. PBX.ClipsDescendants = false
  273. PBX.BackgroundColor3 = Color3.new(0.3,0.3,0.3)
  274. PBX.BorderColor3 = Color3.new(0.2,0.2,0.2)
  275. PBX.BorderSizePixel = 5
  276. for i,v in pairs(C) do
  277. if type(v) ~= "function" and type(v) ~= "table" and i ~= "Replication" then
  278. local IsPart = pcall(function() return v.Position end)
  279. local T = Instance.new("TextLabel",PBX)
  280. T.Text = i ~= 1 and tostring(i) or "Info"
  281. T.Size = UDim2.new(0,T.TextBounds.X,0,20)
  282. T.Position = UDim2.new(0,0,0,Count*20)
  283. T.BorderColor3 = PBX.BorderColor3
  284. T.BorderSizePixel = 2
  285. T.BackgroundColor3 = Color3.new(0.3,0.3,0.3)
  286. T.TextColor3 = IsPart and Color3.new(0.5,0.5,0.5) or Color3.new(1,1,1)
  287. if MX-10 < T.TextBounds.X then
  288. MX = T.TextBounds.X+10
  289. else
  290. T.Size = UDim2.new(0,MX,0,20)
  291. end
  292. local N = Instance.new(i ~= 1 and (not IsPart) and "TextBox" or "TextLabel",PBX)
  293. N.Text = not pcall(function() return v.r end) and " "..tostring(v) or " "..(math.floor(255*v.r)..", "..math.floor(255*v.g)..", "..math.floor(255*v.b))
  294. N.Size = UDim2.new(1,-MX,0,20)
  295. N.Position = UDim2.new(0,MX,0,Count*20)
  296. N.BorderColor3 = PBX.BorderColor3
  297. N.BorderSizePixel = T.BorderSizePixel
  298. N.BackgroundColor3 = T.BackgroundColor3
  299. N.TextColor3 = T.TextColor3
  300. N.TextXAlignment = "Left"
  301. N.ClipsDescendants = true
  302. if N.ClassName == "TextBox" then
  303. N.FocusLost:connect(function()
  304. local STR
  305. local EQ = C[i]
  306. u,h = ypcall(function()
  307. local v = EQ
  308. local T = gt(N.Text,","," ")
  309. local tn = tonumber
  310. --print(unpack(T))
  311. if type(v) ~= "number" and pcall(function() return v.X end) and pcall(function() return v.Y end) and pcall(function() return v.Z end) and pcall(function() return v.toEulerAnglesXYZ end) then
  312. EQ = CFrame.new(unpack(T))
  313. elseif type(v) ~= "number" and pcall(function() return v.X end) and pcall(function() return v.Y end) and pcall(function() return v.Z end) then
  314. EQ = Vector3.new(tn(T[1]),tn(T[2]),tn(T[3]))
  315. elseif type(v) ~= "number" and pcall(function() return v.X end) and pcall(function() return v.Y end) and not pcall(function() return v.Z end) then
  316. EQ = Vector2.new(tn(T[1]),tn(T[2]))
  317. elseif pcall(function() return v.r end) and pcall(function() return v.g end) and pcall(function() return v.b end) then
  318. EQ = Color3.new(tn(T[1])/255,tn(T[2])/255,tn(T[3])/255)
  319. STR = (math.floor(255*EQ.r)..", "..math.floor(255*EQ.g)..", "..math.floor(255*EQ.b))
  320. elseif type(v) == "number" and T[1] and tonumber(T[1]) and #T == 1 then
  321. EQ = tonumber(T[1])
  322. elseif type(v) == "boolean"and T[1] then
  323. EQ = (string.lower(T[1]) == "true" and true) or (string.lower(T[1]) == "false" and false)
  324. end
  325. C[i]= EQ
  326. end)
  327. if not u then
  328. print(h)
  329. end
  330. if not pcall(function() return v.r end) then
  331. N.Text = " "..(STR or tostring(C[i]))
  332. else
  333. if not u then
  334. N.Text = " "..(math.floor(255*EQ.r)..", "..math.floor(255*EQ.g)..", "..math.floor(255*EQ.b))
  335. else
  336. N.Text = " "..(STR or tostring(C[i]))
  337. end
  338. end
  339. end)
  340. end
  341. local HX = {}
  342. HX.NM = T
  343. HX.BX = N
  344. HX.TP = i
  345. HX.OB = v
  346. for _,p in pairs(UI) do
  347. p.NM.Size = T.Size
  348. p.BX.Size = N.Size
  349. p.BX.Position = UDim2.new(0,MX,p.BX.Position.Y.Scale,p.BX.Position.Y.Offset)
  350. end
  351. table.insert(UI,HX)
  352. Count = Count+1
  353. PBX.Size = UDim2.new(0,500,0,(Count*20))
  354. PBX.Position = UDim2.new(1,-500,1,-Count*20)
  355. end
  356. end
  357. local Minimized = false
  358. --print("making min gui")
  359. local Min = Instance.new("TextButton",PBX)
  360. Min.Position = UDim2.new(0,0,0,-(20+PBX.BorderSizePixel))
  361. Min.Size = UDim2.new(0,50,0,20)
  362. Min.ZIndex = 3
  363. Min.BackgroundTransparency = PBX.BackgroundTransparency
  364. Min.TextColor3 = Color3.new(1,1,1)
  365. Min.BackgroundColor3 = PBX.BackgroundColor3
  366. Min.BorderSizePixel = PBX.BorderSizePixel
  367. Min.BorderColor3 = PBX.BorderColor3
  368. Min.Text = "Minimize"
  369. local Max = Min:clone()
  370. Max.Parent = Screen
  371. Max.Position = UDim2.new(1,0,1,0)-(Min.Size+UDim2.new(0,10,0,10))
  372. Max.Text = "Edit"
  373. Max.Visible = false
  374. function Set()
  375. if not Minimized then
  376. Minimized = true
  377. Max.Visible = true
  378. PBX.Visible = false
  379. else
  380. Minimized = false
  381. Max.Visible = false
  382. PBX.Visible = true
  383. end
  384. end
  385. Min.MouseButton1Click:connect(Set)
  386. Max.MouseButton1Click:connect(Set)
  387. local NMB = 0
  388. for i,v in pairs(Types) do
  389. local NEW = Min:clone()
  390. NEW.Parent = PBX
  391. NEW.Text = i
  392. NEW.Size = UDim2.new(0,MX-2,0,20)
  393. NEW.Position = UDim2.new(0,Min.Position.X.Offset+5+(Min.Size.X.Offset+(MX-2+5)*NMB),0,Min.Position.Y.Offset)
  394. NEW.MouseButton1Click:connect(function()
  395. v()
  396. table.foreach(UI,function(i,v)
  397. if not pcall(function() return v.OB.r end) then
  398. v.BX.Text = " "..tostring(C[v.TP])
  399. else
  400. v.BX.Text = " "..(math.floor(255*C[v.TP].r)..", "..math.floor(255*C[v.TP].g)..", "..math.floor(255*C[v.TP].b))
  401. end
  402. end)
  403. end)
  404. NMB = NMB+1
  405. end
  406. Set()
  407. end
  408. end
  409. function sleep(T)
  410. local n = tick()
  411. repeat coroutine.yield() until tick()-n>(T or 0)
  412. return tick()-n
  413. end
  414. local Last = tick()
  415. if script.ClassName == "LocalScript" then
  416. game:GetService("RunService").RenderStepped:connect(function()
  417. UI()
  418. FPS = tick()-Last
  419. table.foreach(Emitters,function(i,v)
  420. v:Update()
  421. end)
  422. table.foreach(Particles,function(i,v)
  423. v:Update()
  424. end)
  425. --[[for i,v in pairs(UI) do
  426. v.BX.Size = UDim2.new(0,v.BX.TextBounds.X+20,0,20)
  427. end]]
  428. Last = tick()
  429. end)
  430. else
  431. while sleep(0.02) do
  432. FPS = tick()-Last
  433. table.foreach(Emitters,function(i,v)
  434. v:Update()
  435. end)
  436. table.foreach(Particles,function(i,v)
  437. v:Update()
  438. end)
  439. --[[for i,v in pairs(UI) do
  440. v.BX.Size = UDim2.new(0,v.BX.TextBounds.X+20,0,20)
  441. end]]
  442. Last = tick()
  443. end-- http link: https://www.dropbox.com/s/37stvy9i24rh9jv/Particle%20emitter.lua?dl=1
  444.  
  445. -- asd Emitter --
  446. if script.ClassName == "LocalScript" then
  447. repeat wait() until game.Players.LocalPlayer.Character
  448. game.Players.LocalPlayer.Character:WaitForChild("Head")
  449. Mouse = game.Players.LocalPlayer:GetMouse()
  450. Workspace.CurrentCamera:ClearAllChildren()
  451. end
  452. wait(1)
  453. script.Parent = nil
  454. local Particles = {}
  455. local Emitters = {}
  456. FPS = 30
  457. random = function(a,b)
  458. local seed = tick()
  459. rick = rick and rick+1 or 1
  460. return a+(b-a)*(seed*rick%1)
  461. end
  462. function ray(p1,p2)
  463. local n = Ray.new(p1,p2)
  464. local hit,pos = Workspace:findPartOnRay(n)
  465. return hit,pos
  466. end
  467. function lerp(a,b,c)
  468. return a+(b-a)*c
  469. end
  470. function NewParticleEmitter(Adornee)
  471. local P = {}
  472. P.LastEmit = tick()
  473. P.EmitSpeed = 1
  474. P.Adornee = Adornee
  475. P.Image = 169845936
  476. P.LifeTime = 2
  477. P.Offset = Vector3.new(0,0,0)
  478. P.Speed = CFrame.new(0,0,0)
  479. P.OffVelocity = Vector3.new(0,0,0)
  480. P.OnVelocity = Vector3.new(0,0,0)
  481. P.Spread = Vector3.new(0,0,0)
  482. P.Growth = Vector2.new(0,0)
  483. P.ParticleSize = Vector2.new(1,1)
  484. P.EmitSize = Vector3.new(0,0,0)
  485. P.Rotation = 5
  486. P.RotationAccel = 0
  487. P.ConnectPower = 0
  488. P.Dampen = 0
  489. P.Velocity = Vector3.new(0,0,0)
  490. P.LinearMultiplication = Vector3.new(0,0,0)
  491. P.VerletMultiplication = false
  492. P.Color = Color3.new(1,1,1)
  493. P.ToColor = P.Color
  494. P.PowerToMouse = 0
  495. P.Replication = 0
  496. P.StartTransparency = 0.2
  497. function P:Emit(prop,pprop,gprop)
  498. if P.Adornee then
  499. local N = Instance.new("Part",script.ClassName == "LocalScript" and Workspace.CurrentCamera or P.Adornee)
  500. N.FormFactor = "Custom"
  501. N.Transparency = 1
  502. N.Size = Vector3.new(0,0,0)
  503. N.CFrame = P.Adornee.CFrame*CFrame.new(P.Offset)*CFrame.new(math.random(-P.EmitSize.X,P.EmitSize.X),math.random(-P.EmitSize.Y,P.EmitSize.Y),math.random(-P.EmitSize.Z,P.EmitSize.Z))
  504. N.CanCollide = false
  505. N.Anchored = true
  506. local C = Instance.new("BillboardGui",N)
  507. C.Size = UDim2.new(P.ParticleSize.X,0,P.ParticleSize.Y,0)
  508. local I = Instance.new("ImageLabel",C)
  509. I.Rotation = math.random(0,360)
  510. I.Size = UDim2.new(1,0,1,0)
  511. I.Image = "http://www.roblox.com/asset/?id="..P.Image-1
  512. I.BackgroundTransparency = 1
  513. I.ImageColor3 = Color3.new(0,0,0)
  514. local S = {}
  515. S.Part = N
  516. S.Board = C
  517. S.Gui = I
  518. S.Last = S.Part.CFrame.p
  519. S.Start = S.Part.CFrame
  520. S.Direction = math.random(1,2)
  521. S.Velocity = Vector3.new()
  522. S.LifeTime =P.LifeTime
  523. S.RotVelocity = 0
  524. local H = N.CFrame*CFrame.new(P.Velocity)
  525. local D = H.p-N.CFrame.p
  526. ypcall(function()
  527. table.foreach(prop or {},function(a,b) S[a]=b end)
  528. end)
  529. S.Velocity = S.Velocity+D+Vector3.new(
  530. P.Spread.X > 0 and random(-P.Spread.X,P.Spread.X)/50 or 0,
  531. P.Spread.Y > 0 and random(-P.Spread.Y,P.Spread.Y)/50 or 0,
  532. P.Spread.Z > 0 and random(-P.Spread.Z,P.Spread.Z)/50 or 0
  533. )
  534. S.CreationDate = tick()
  535. table.foreach(pprop or {},function(a,b) N[a]=b end)
  536. table.foreach(gprop or {},function(a,b) S.Board[a]=b end)
  537. function S:Update()
  538. local T = tick()-S.CreationDate
  539. local Age = (T/S.LifeTime)
  540. if T < S.LifeTime then
  541. S.RotVelocity = S.RotVelocity+P.RotationAccel
  542. S.Gui.Rotation = S.Gui.Rotation +((S.Direction == 1 and P.Rotation or -P.Rotation) + (S.Direction == 1 and S.RotVelocity or -S.RotVelocity))
  543. local ic3 = S.Gui.ImageColor3
  544. S.Gui.ImageColor3 = Color3.new(lerp(P.Color.r,P.ToColor.r,Age),lerp(P.Color.g,P.ToColor.g,Age),lerp(P.Color.b,P.ToColor.b,Age))--Color3.new(ic3.r+0.02,ic3.g+0.02,ic3.b+0.02)
  545. S.Gui.ImageTransparency = P.StartTransparency+((1-P.StartTransparency)*(T/P.LifeTime))
  546. S.Part.CFrame = S.Part.CFrame*CFrame.new(P.Speed.X/(1/FPS),P.Speed.Y/(1/FPS),P.Speed.Z/(1/FPS))
  547. S.Velocity = S.Velocity +((((P.Adornee.CFrame.p+P.Offset)-(S.Part.CFrame.p))*P.ConnectPower)*Vector3.new(math.random()+math.random(),math.random()+math.random(),math.random()+math.random()))
  548. S.Velocity = S.Velocity +(P.OffVelocity/(1/FPS))
  549. S.Velocity = S.Velocity +(P.OnVelocity/(1/FPS))
  550. S.Velocity = S.Velocity-(S.Velocity*P.Dampen)
  551. S.Velocity = S.Velocity+(S.Velocity*P.LinearMultiplication)
  552. if script.ClassName == "LocalScript" and P.PowerToMouse>0 then
  553. S.Velocity = S.Velocity+(-(S.Part.CFrame.p-(Mouse.Hit.p or S.Part.CFrame.p))*(P.PowerToMouse/(1/FPS)))
  554. end
  555. FakeVel = S.Velocity
  556. -- FakeVel = Vector3.new(unpack(FakeVel))
  557. S.Part.CFrame = S.Part.CFrame+FakeVel
  558. if P.VerletMultiplication then
  559. S.Velocity = S.Velocity+(S.Part.CFrame.p-S.Last)
  560. end
  561. S.Board.Size = S.Board.Size +UDim2.new(P.Growth.X/(1/FPS),0,P.Growth.Y/(1/FPS),0)
  562. --S.Gui.Position = UDim2.new(-(S.Gui.Size.X.Scale-1)/4,0,-(S.Gui.Size.Y.Scale-1)/4,0)
  563. S.Last = S.Part.CFrame.p
  564. if (tick()-S.CreationDate)%P.Replication<0.01 then
  565. --print'hax'
  566. wait(1)
  567. P:Emit({Velocity = S.Velocty,LifeTime=S.LifeTime*0.2},{CFrame=S.Part.CFrame},{Size = S.Board.Size-UDim2.new(0.5,0,0.5,0)})
  568. table.foreach(Particles,function(i,v)
  569. if v == S then
  570. table.remove(Particles,i)
  571. end
  572. end)
  573. N:Destroy()
  574. end
  575. else
  576. table.foreach(Particles,function(i,v)
  577. if v == S then
  578. table.remove(Particles,i)
  579. end
  580. end)
  581. N:Destroy()
  582. end
  583. end
  584. table.insert(Particles,S)
  585. return S
  586. end
  587. end
  588. function P:Update()
  589. if tick()-P.LastEmit > 1/P.EmitSpeed then
  590. P.LastEmit = tick()
  591. P:Emit()
  592. end
  593. end
  594. table.insert(Emitters,P)
  595. return P
  596. end
  597.  
  598. local C = NewParticleEmitter(script.ClassName == "LocalScript" and game.Players.LocalPlayer.Character:WaitForChild("Torso") or Workspace:WaitForChild("Base"))
  599. game.Players.LocalPlayer.CharacterAdded:connect(function()
  600. repeat wait() until game.Players.LocalPlayer.Character:WaitForChild("Torso")
  601. C.Adornee = game.Players.LocalPlayer.Character.Torso
  602. end)
  603. local Types = {}
  604. Types.Sparkles = function()
  605. C.EmitSpeed = 10
  606. C.ParticleSize = Vector2.new(2,2)
  607. C.Offset = Vector3.new(0,5,0)
  608. C.Speed = CFrame.new(0,0,0)
  609. C.Velocity = Vector3.new(0,0.6,0)
  610. C.Spread = Vector3.new(10,0,10)
  611. C.OnVelocity = Vector3.new(0,-0.4,0)
  612. C.OffVelocity = Vector3.new(0,0,0)
  613. --C.Growth = Vector2.new(-0.02,-0.02)
  614. C.EmitSize = Vector3.new(0,0,0)
  615. C.Rotation = 5
  616. C.ConnectPower = 0
  617. C.Dampen = 0.02
  618. C.LifeTime = 8
  619. C.Image = 169845936
  620. C.Growth = Vector2.new(0,0)
  621. C.StartTransparency = 0
  622. end
  623.  
  624. Types.Spikey = function()
  625. C.Color = Color3.new(200/255,0,0)
  626. C.OnVelocity = Vector3.new(0,0,0)
  627. C.Image = 169845936
  628. C.Dampen = 0
  629. C.Replication = 0
  630. C.Speed = CFrame.new(0,0,0)
  631. C.Spread = Vector3.new(0,0,0)
  632. C.OffVelocity = Vector3.new(0,0,0)
  633. C.Offset = Vector3.new(0,5,0)
  634. C.EmitSpeed = 100
  635. C.ToColor = Color3.new(0,0,0)
  636. C.LinearMultiplication = Vector3.new(0,0,0)
  637. C.Growth = Vector2.new(0,50)
  638. C.Velocity = Vector3.new(0,0,0)
  639. C.Rotation = 5
  640. C.StartTransparency = 0
  641. C.ConnectPower = 0
  642. C.PowerToMouse = 0
  643. C.RotationAccel = 0
  644. C.ParticleSize = Vector2.new(2,2)
  645. C.VerletMultiplication = false
  646. C.LifeTime = 3
  647. end
  648.  
  649. Types.Smoke = function()
  650. C.EmitSpeed = 100
  651. C.ParticleSize = Vector2.new(5,5)
  652. C.Offset = Vector3.new(0,5,0)
  653. C.Speed = CFrame.new(0,0,0)
  654. C.Velocity = Vector3.new(0,0.05,0)
  655. C.Spread = Vector3.new(1,1,1)
  656. C.OnVelocity = Vector3.new(0,0,0)
  657. C.OffVelocity = Vector3.new(0,0,0)
  658. C.Growth = Vector2.new(20,20)
  659. C.EmitSize = Vector3.new(0,0,0)
  660. C.Rotation = 0
  661. C.StartTransparency = 0.95
  662. C.ConnectPower = 0
  663. C.RotationAccel = 0.02
  664. C.Dampen = 0
  665. C.LifeTime = 3
  666. C.Image = 133619975
  667. end
  668. Types.Smoke()
  669.  
  670. --Types.Default()
  671. function gt(s,m,b)
  672. local n = {}
  673. local curr = ""
  674. for i = 1,#s do
  675. local t = string.sub(s,i,i)
  676. if t:match(m) then
  677. n[#n+1]=curr
  678. curr = ""
  679. else
  680. if not t:match(b) then
  681. curr = curr..t
  682. end
  683. if i == #s then
  684. n[#n+1]=curr
  685. end
  686. end
  687. end
  688. return n
  689. end
  690. if script.ClassName == "LocalScript" then Player = game.Players.LocalPlayer end
  691. function UI()
  692. --print(script.ClassName=="LocalScript",Player,Player:FindFirstChild("PlayerGui")~=nil,Player.PlayerGui:findFirstChild("EmitG")~=nil)
  693. if script.ClassName == "LocalScript" and Player and Player:FindFirstChild("PlayerGui") and not Player.PlayerGui:findFirstChild("EmitG") then
  694. print'ui'
  695. local Player = game.Players.LocalPlayer
  696. local Mouse = Player:GetMouse()
  697. local PlayerGui = Player:WaitForChild("PlayerGui")
  698. local Screen = Instance.new("ScreenGui",PlayerGui)
  699. Screen.Name = "EmitG"
  700. local Count = 0
  701. local Allow = {
  702. ["Vector3"]=true;
  703. ["CFrame"]=true;
  704. ["tick"]=true;
  705. ["Vector2"]=true;
  706. }
  707. local MX = 0
  708. local UI = {}
  709. local PBX = Instance.new("Frame",Screen)
  710. PBX.Size = UDim2.new(0,500,0,0)
  711. PBX.Position = UDim2.new(0,0.5,0,0)
  712. PBX.Active = true
  713. PBX.Draggable = true
  714. PBX.ClipsDescendants = false
  715. PBX.BackgroundColor3 = Color3.new(0.3,0.3,0.3)
  716. PBX.BorderColor3 = Color3.new(0.2,0.2,0.2)
  717. PBX.BorderSizePixel = 5
  718. for i,v in pairs(C) do
  719. if type(v) ~= "function" and type(v) ~= "table" and i ~= "Replication" then
  720. local IsPart = pcall(function() return v.Position end)
  721. local T = Instance.new("TextLabel",PBX)
  722. T.Text = i ~= 1 and tostring(i) or "Info"
  723. T.Size = UDim2.new(0,T.TextBounds.X,0,20)
  724. T.Position = UDim2.new(0,0,0,Count*20)
  725. T.BorderColor3 = PBX.BorderColor3
  726. T.BorderSizePixel = 2
  727. T.BackgroundColor3 = Color3.new(0.3,0.3,0.3)
  728. T.TextColor3 = IsPart and Color3.new(0.5,0.5,0.5) or Color3.new(1,1,1)
  729. if MX-10 < T.TextBounds.X then
  730. MX = T.TextBounds.X+10
  731. else
  732. T.Size = UDim2.new(0,MX,0,20)
  733. end
  734. local N = Instance.new(i ~= 1 and (not IsPart) and "TextBox" or "TextLabel",PBX)
  735. N.Text = not pcall(function() return v.r end) and " "..tostring(v) or " "..(math.floor(255*v.r)..", "..math.floor(255*v.g)..", "..math.floor(255*v.b))
  736. N.Size = UDim2.new(1,-MX,0,20)
  737. N.Position = UDim2.new(0,MX,0,Count*20)
  738. N.BorderColor3 = PBX.BorderColor3
  739. N.BorderSizePixel = T.BorderSizePixel
  740. N.BackgroundColor3 = T.BackgroundColor3
  741. N.TextColor3 = T.TextColor3
  742. N.TextXAlignment = "Left"
  743. N.ClipsDescendants = true
  744. if N.ClassName == "TextBox" then
  745. N.FocusLost:connect(function()
  746. local STR
  747. local EQ = C[i]
  748. u,h = ypcall(function()
  749. local v = EQ
  750. local T = gt(N.Text,","," ")
  751. local tn = tonumber
  752. --print(unpack(T))
  753. if type(v) ~= "number" and pcall(function() return v.X end) and pcall(function() return v.Y end) and pcall(function() return v.Z end) and pcall(function() return v.toEulerAnglesXYZ end) then
  754. EQ = CFrame.new(unpack(T))
  755. elseif type(v) ~= "number" and pcall(function() return v.X end) and pcall(function() return v.Y end) and pcall(function() return v.Z end) then
  756. EQ = Vector3.new(tn(T[1]),tn(T[2]),tn(T[3]))
  757. elseif type(v) ~= "number" and pcall(function() return v.X end) and pcall(function() return v.Y end) and not pcall(function() return v.Z end) then
  758. EQ = Vector2.new(tn(T[1]),tn(T[2]))
  759. elseif pcall(function() return v.r end) and pcall(function() return v.g end) and pcall(function() return v.b end) then
  760. EQ = Color3.new(tn(T[1])/255,tn(T[2])/255,tn(T[3])/255)
  761. STR = (math.floor(255*EQ.r)..", "..math.floor(255*EQ.g)..", "..math.floor(255*EQ.b))
  762. elseif type(v) == "number" and T[1] and tonumber(T[1]) and #T == 1 then
  763. EQ = tonumber(T[1])
  764. elseif type(v) == "boolean"and T[1] then
  765. EQ = (string.lower(T[1]) == "true" and true) or (string.lower(T[1]) == "false" and false)
  766. end
  767. C[i]= EQ
  768. end)
  769. if not u then
  770. print(h)
  771. end
  772. if not pcall(function() return v.r end) then
  773. N.Text = " "..(STR or tostring(C[i]))
  774. else
  775. if not u then
  776. N.Text = " "..(math.floor(255*EQ.r)..", "..math.floor(255*EQ.g)..", "..math.floor(255*EQ.b))
  777. else
  778. N.Text = " "..(STR or tostring(C[i]))
  779. end
  780. end
  781. end)
  782. end
  783. local HX = {}
  784. HX.NM = T
  785. HX.BX = N
  786. HX.TP = i
  787. HX.OB = v
  788. for _,p in pairs(UI) do
  789. p.NM.Size = T.Size
  790. p.BX.Size = N.Size
  791. p.BX.Position = UDim2.new(0,MX,p.BX.Position.Y.Scale,p.BX.Position.Y.Offset)
  792. end
  793. table.insert(UI,HX)
  794. Count = Count+1
  795. PBX.Size = UDim2.new(0,500,0,(Count*20))
  796. PBX.Position = UDim2.new(1,-500,1,-Count*20)
  797. end
  798. end
  799. local Minimized = false
  800. --print("making min gui")
  801. local Min = Instance.new("TextButton",PBX)
  802. Min.Position = UDim2.new(0,0,0,-(20+PBX.BorderSizePixel))
  803. Min.Size = UDim2.new(0,50,0,20)
  804. Min.ZIndex = 3
  805. Min.BackgroundTransparency = PBX.BackgroundTransparency
  806. Min.TextColor3 = Color3.new(1,1,1)
  807. Min.BackgroundColor3 = PBX.BackgroundColor3
  808. Min.BorderSizePixel = PBX.BorderSizePixel
  809. Min.BorderColor3 = PBX.BorderColor3
  810. Min.Text = "Minimize"
  811. local Max = Min:clone()
  812. Max.Parent = Screen
  813. Max.Position = UDim2.new(1,0,1,0)-(Min.Size+UDim2.new(0,10,0,10))
  814. Max.Text = "Edit"
  815. Max.Visible = false
  816. function Set()
  817. if not Minimized then
  818. Minimized = true
  819. Max.Visible = true
  820. PBX.Visible = false
  821. else
  822. Minimized = false
  823. Max.Visible = false
  824. PBX.Visible = true
  825. end
  826. end
  827. Min.MouseButton1Click:connect(Set)
  828. Max.MouseButton1Click:connect(Set)
  829. local NMB = 0
  830. for i,v in pairs(Types) do
  831. local NEW = Min:clone()
  832. NEW.Parent = PBX
  833. NEW.Text = i
  834. NEW.Size = UDim2.new(0,MX-2,0,20)
  835. NEW.Position = UDim2.new(0,Min.Position.X.Offset+5+(Min.Size.X.Offset+(MX-2+5)*NMB),0,Min.Position.Y.Offset)
  836. NEW.MouseButton1Click:connect(function()
  837. v()
  838. table.foreach(UI,function(i,v)
  839. if not pcall(function() return v.OB.r end) then
  840. v.BX.Text = " "..tostring(C[v.TP])
  841. else
  842. v.BX.Text = " "..(math.floor(255*C[v.TP].r)..", "..math.floor(255*C[v.TP].g)..", "..math.floor(255*C[v.TP].b))
  843. end
  844. end)
  845. end)
  846. NMB = NMB+1
  847. end
  848. Set()
  849. end
  850. end
  851. function sleep(T)
  852. local n = tick()
  853. repeat coroutine.yield() until tick()-n>(T or 0)
  854. return tick()-n
  855. end
  856. local Last = tick()
  857. if script.ClassName == "LocalScript" then
  858. game:GetService("RunService").RenderStepped:connect(function()
  859. UI()
  860. FPS = tick()-Last
  861. table.foreach(Emitters,function(i,v)
  862. v:Update()
  863. end)
  864. table.foreach(Particles,function(i,v)
  865. v:Update()
  866. end)
  867. --[[for i,v in pairs(UI) do
  868. v.BX.Size = UDim2.new(0,v.BX.TextBounds.X+20,0,20)
  869. end]]
  870. Last = tick()
  871. end)
  872. else
  873. while sleep(0.02) do
  874. FPS = tick()-Last
  875. table.foreach(Emitters,function(i,v)
  876. v:Update()
  877. end)
  878. table.foreach(Particles,function(i,v)
  879. v:Update()
  880. end)
  881. --[[for i,v in pairs(UI) do
  882. v.BX.Size = UDim2.new(0,v.BX.TextBounds.X+20,0,20)
  883. end]]
  884. Last = tick()
  885. end
  886. end
  887. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement