Advertisement
UltimatePaster5677

Particle Wings

Nov 20th, 2018
1,053
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.43 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,game,owner = owner,game
  3. local RealPlayer = Player
  4. do
  5. print("FE Compatibility code by Mokiros")
  6. local rp = RealPlayer
  7. script.Parent = rp.Character
  8.  
  9. --RemoteEvent for communicating
  10. local Event = Instance.new("RemoteEvent")
  11. Event.Name = "UserInput_Event"
  12.  
  13. --Fake event to make stuff like Mouse.KeyDown work
  14. local function fakeEvent()
  15. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  16. t.connect = t.Connect
  17. return t
  18. end
  19.  
  20. --Creating fake input objects with fake variables
  21. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  22. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  23. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  24. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  25. end}
  26. --Merged 2 functions into one by checking amount of arguments
  27. CAS.UnbindAction = CAS.BindAction
  28.  
  29. --This function will trigger the events that have been :Connect()'ed
  30. local function te(self,ev,...)
  31. local t = m[ev]
  32. if t and t._fakeEvent then
  33. for _,f in pairs(t.Functions) do
  34. f(...)
  35. end
  36. end
  37. end
  38. m.TrigEvent = te
  39. UIS.TrigEvent = te
  40.  
  41. Event.OnServerEvent:Connect(function(plr,io)
  42. if plr~=rp then return end
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. if not io.isMouse then
  46. local b = io.UserInputState == Enum.UserInputState.Begin
  47. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49. end
  50. for _,t in pairs(CAS.Actions) do
  51. for _,k in pairs(t.Keys) do
  52. if k==io.KeyCode then
  53. t.Function(t.Name,io.UserInputState,io)
  54. end
  55. end
  56. end
  57. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59. end
  60. end)
  61. Event.Parent = NLS([==[
  62. local Player = game:GetService("Players").LocalPlayer
  63. local Event = script:WaitForChild("UserInput_Event")
  64.  
  65. local Mouse = Player:GetMouse()
  66. local UIS = game:GetService("UserInputService")
  67. local input = function(io,a)
  68. if a then return end
  69. --Since InputObject is a client-side instance, we create and pass table instead
  70. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  71. end
  72. UIS.InputBegan:Connect(input)
  73. UIS.InputEnded:Connect(input)
  74.  
  75. local h,t
  76. --Give the server mouse data 30 times every second, but only if the values changed
  77. --If player is not moving their mouse, client won't fire events
  78. while wait(1/30) do
  79. if h~=Mouse.Hit or t~=Mouse.Target then
  80. h,t=Mouse.Hit,Mouse.Target
  81. Event:FireServer({isMouse=true,Target=t,Hit=h})
  82. end
  83. end]==],Player.Character)
  84.  
  85. ----Sandboxed game object that allows the usage of client-side methods and services
  86. --Real game object
  87. local _rg = game
  88.  
  89. --Metatable for fake service
  90. local fsmt = {
  91. __index = function(self,k)
  92. local s = rawget(self,"_RealService")
  93. if s then return s[k] end
  94. end,
  95. __newindex = function(self,k,v)
  96. local s = rawget(self,"_RealService")
  97. if s then s[k]=v end
  98. end,
  99. __call = function(self,...)
  100. local s = rawget(self,"_RealService")
  101. if s then return s(...) end
  102. end
  103. }
  104. local function FakeService(t,RealService)
  105. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  106. return setmetatable(t,fsmt)
  107. end
  108.  
  109. --Fake game object
  110. local g = {
  111. GetService = function(self,s)
  112. return self[s]
  113. end,
  114. Players = FakeService({
  115. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  116. },"Players"),
  117. UserInputService = FakeService(UIS,"UserInputService"),
  118. ContextActionService = FakeService(CAS,"ContextActionService"),
  119. }
  120. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  121. g.service = g.GetService
  122.  
  123. g.RunService = FakeService({
  124. RenderStepped = _rg:GetService("RunService").Heartbeat,
  125. BindToRenderStep = function(self,name,_,fun)
  126. self._btrs[name] = self.Heartbeat:Connect(fun)
  127. end,
  128. UnbindFromRenderStep = function(self,name)
  129. self._btrs[name]:Disconnect()
  130. end,
  131. },"RunService")
  132.  
  133. setmetatable(g,{
  134. __index=function(self,s)
  135. return _rg:GetService(s) or typeof(_rg[s])=="function"
  136. and function(_,...)return _rg[s](_rg,...)end or _rg[s]
  137. end,
  138. __newindex = fsmt.__newindex,
  139. __call = fsmt.__call
  140. })
  141. --Changing owner to fake player object to support owner:GetMouse()
  142. game,owner = g,g.Players.LocalPlayer
  143. end
  144. --//======================================\\
  145. --|| CREATED BY GODCAT567
  146. --\\======================================//
  147. warn("Particle Wings created by Godcat567 aka David The Extreme Gamer")
  148. Instance["ParticleEmitter"] = {
  149. Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread)
  150. local fp = Create("ParticleEmitter"){
  151. Parent = Parent,
  152. Color = ColorSequence.new(Color1, Color2),
  153. LightEmission = LightEmission,
  154. Size = Size,
  155. Texture = Texture,
  156. Transparency = Transparency,
  157. ZOffset = ZOffset,
  158. Acceleration = Accel,
  159. Drag = Drag,
  160. LockedToPart = LockedToPart,
  161. VelocityInheritance = VelocityInheritance,
  162. EmissionDirection = EmissionDirection,
  163. Enabled = Enabled,
  164. Lifetime = LifeTime,
  165. Rate = Rate,
  166. Rotation = Rotation,
  167. RotSpeed = RotSpeed,
  168. Speed = Speed,
  169. VelocitySpread = VelocitySpread,
  170. }
  171. return fp
  172. end;
  173. };
  174.  
  175. CreateTemplate = {
  176.  
  177. };
  178.  
  179.  
  180. wait(1)
  181. ------------------------------------------------------------------------------------
  182. local Character = game.Players.LocalPlayer.Character --game.Workspace.fefio92142
  183.  
  184.  
  185. -------------------------------------------------------------------------------------
  186. -------------------------------------------------------------------------------------
  187.  
  188. local Color = 0,0,50
  189.  
  190. local Num = 0.5
  191.  
  192. local Num2 = 4 -------------Mods:1,4,8,10,15,20-------------------------------------
  193. local Size = 0.8
  194. local Rate = 300
  195. -------------------------------------------------------------------------------------
  196. local Player = game:GetService("Players").LocalPlayer
  197. local Character = Player.Character
  198. Torso = Character:WaitForChild'Torso'
  199.  
  200. local Wing1 = Instance.new("Part",Character)
  201. Wing1.FormFactor = Enum.FormFactor.Custom
  202. Wing1.Size = Vector3.new(.2, .2, .2)
  203. Wing1.Name = "WIng_1"
  204.  
  205. local fire = Instance.new("ParticleEmitter", Wing1)
  206. fire.VelocitySpread = 0
  207. fire.Lifetime = NumberRange.new(2)
  208. fire.Acceleration = Vector3.new(0, 2, 2)
  209. fire.RotSpeed = NumberRange.new(10)
  210. fire.Rate = Rate
  211. fire.Rotation = NumberRange.new(151515)
  212. fire.Name = "Fire"
  213. fire.LightEmission = 0.78
  214. fire.LockedToPart = true
  215. fire.Texture = "rbxasset://textures/particles/explosion01_implosion_main.dds"
  216. fire.Color = ColorSequence.new(Color3.new(Color), Color3.new(Color))
  217. fire.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, Size), NumberSequenceKeypoint.new(1, Size)})
  218.  
  219. local Wing2 = Wing1:Clone()
  220. Wing2.Parent = Torso
  221. local x,y,z = 0,-1,-6
  222.  
  223. Wld = function(a,b,cf)
  224. local Weld = Instance.new('Weld',a)
  225. Weld.Part0 = a
  226. Weld.Part1 = b
  227. Weld.C1 = cf
  228. return Weld
  229. end
  230.  
  231. local wld = Wld(Torso,Wing1,CFrame.new(0,0,-.5)*CFrame.Angles(-math.rad(90),-math.rad(20),-math.rad(90)))
  232. local wld2 = Wld(Torso,Wing2,CFrame.new(0,0,.5)*CFrame.Angles(-math.rad(90),-math.rad(20),-math.rad(90)))
  233.  
  234.  
  235. game:GetService("RunService").Stepped:connect(function()
  236. --z = 6+math.sin(tick()*2)
  237. y = -1+math.sin(tick()*Num)*Num2
  238. Wing1.Fire.Acceleration = Vector3.new(x,y,z)
  239. Wing2.Fire.Acceleration = Vector3.new(x,y,-z)
  240. end)
  241. ------------------------------------------------------------------------------------------------
  242. local Player = game:GetService("Players").LocalPlayer
  243. local Character = Player.Character
  244. Torso = Character:WaitForChild'Torso'
  245.  
  246. local Wing1 = Instance.new("Part",Character)
  247. Wing1.FormFactor = Enum.FormFactor.Custom
  248. Wing1.Size = Vector3.new(.2, .2, .2)
  249. Wing1.Name = "WIng_1"
  250.  
  251. local fire = Instance.new("ParticleEmitter", Wing1)
  252. fire.VelocitySpread = 0
  253. fire.Lifetime = NumberRange.new(2.5)
  254. fire.Acceleration = Vector3.new(0, 4, 4)
  255. fire.RotSpeed = NumberRange.new(10)
  256. fire.Rate = Rate
  257. fire.Rotation = NumberRange.new(151515)
  258. fire.Name = "Fire"
  259. fire.LightEmission = 0.78
  260. fire.LockedToPart = true
  261. fire.Texture = "rbxasset://textures/particles/explosion01_implosion_main.dds"
  262. fire.Color = ColorSequence.new(Color3.new(Color), Color3.new(Color))
  263. fire.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, Size), NumberSequenceKeypoint.new(1, Size)})
  264.  
  265. local Wing2 = Wing1:Clone()
  266. Wing2.Parent = Torso
  267. local x,y,z = 0,-1,-6
  268.  
  269. Wld = function(a,b,cf)
  270. local Weld = Instance.new('Weld',a)
  271. Weld.Part0 = a
  272. Weld.Part1 = b
  273. Weld.C1 = cf
  274. return Weld
  275. end
  276.  
  277. local wld = Wld(Torso,Wing1,CFrame.new(0,0,-.5)*CFrame.Angles(-math.rad(90),-math.rad(30),-math.rad(90)))
  278. local wld2 = Wld(Torso,Wing2,CFrame.new(0,0,.5)*CFrame.Angles(-math.rad(90),-math.rad(30),-math.rad(90)))
  279.  
  280. print("Loaded")
  281.  
  282. game:GetService("RunService").Stepped:connect(function()
  283. --z = 6+math.sin(tick()*2)
  284. y = -1+math.sin(tick()*Num)*Num2
  285. Wing1.Fire.Acceleration = Vector3.new(x,y,z)
  286. Wing2.Fire.Acceleration = Vector3.new(x,y,-z)
  287. end)
  288.  
  289. ------------------------------------------------------------------------------------------------
  290. local Player = game:GetService("Players").LocalPlayer
  291. local Character = Player.Character
  292. Torso = Character:WaitForChild'Torso'
  293.  
  294. local Wing1 = Instance.new("Part",Character)
  295. Wing1.FormFactor = Enum.FormFactor.Custom
  296. Wing1.Size = Vector3.new(.2, .2, .2)
  297. Wing1.Name = "WIng_1"
  298.  
  299. local fire = Instance.new("ParticleEmitter", Wing1)
  300. fire.VelocitySpread = 0
  301. fire.Lifetime = NumberRange.new(2.8)
  302. fire.Acceleration = Vector3.new(0, 4, 4)
  303. fire.RotSpeed = NumberRange.new(10)
  304. fire.Rate = Rate
  305. fire.Rotation = NumberRange.new(151515)
  306. fire.Name = "Fire"
  307. fire.LightEmission = 0.78
  308. fire.LockedToPart = true
  309. fire.Texture = "rbxasset://textures/particles/explosion01_implosion_main.dds"
  310. fire.Color = ColorSequence.new(Color3.new(Color), Color3.new(Color))
  311. fire.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, Size), NumberSequenceKeypoint.new(1, Size)})
  312.  
  313. local Wing2 = Wing1:Clone()
  314. Wing2.Parent = Torso
  315. local x,y,z = 0,-1,-6
  316.  
  317. Wld = function(a,b,cf)
  318. local Weld = Instance.new('Weld',a)
  319. Weld.Part0 = a
  320. Weld.Part1 = b
  321. Weld.C1 = cf
  322. return Weld
  323. end
  324.  
  325. local wld = Wld(Torso,Wing1,CFrame.new(0,0,-.5)*CFrame.Angles(-math.rad(90),-math.rad(40),-math.rad(90)))
  326. local wld2 = Wld(Torso,Wing2,CFrame.new(0,0,.5)*CFrame.Angles(-math.rad(90),-math.rad(40),-math.rad(90)))
  327.  
  328. print("Loaded")
  329.  
  330. game:GetService("RunService").Stepped:connect(function()
  331. --z = 6+math.sin(tick()*2)
  332. y = -1+math.sin(tick()*Num)*Num2
  333. Wing1.Fire.Acceleration = Vector3.new(x,y,z)
  334. Wing2.Fire.Acceleration = Vector3.new(x,y,-z)
  335. end)
  336.  
  337. ------------------------------------------------------------------------------------------------
  338. local Player = game:GetService("Players").LocalPlayer
  339. local Character = Player.Character
  340. Torso = Character:WaitForChild'Torso'
  341.  
  342. local Wing1 = Instance.new("Part",Character)
  343. Wing1.FormFactor = Enum.FormFactor.Custom
  344. Wing1.Size = Vector3.new(.2, .2, .2)
  345. Wing1.Name = "WIng_1"
  346.  
  347. local fire = Instance.new("ParticleEmitter", Wing1)
  348. fire.VelocitySpread = 0
  349. fire.Lifetime = NumberRange.new(3)
  350. fire.Acceleration = Vector3.new(0, 4, 4)
  351. fire.RotSpeed = NumberRange.new(10)
  352. fire.Rate = Rate
  353. fire.Rotation = NumberRange.new(151515)
  354. fire.Name = "Fire"
  355. fire.LightEmission = 0.78
  356. fire.LockedToPart = true
  357. fire.Texture = "rbxasset://textures/particles/explosion01_implosion_main.dds"
  358. fire.Color = ColorSequence.new(Color3.new(Color), Color3.new(Color))
  359. fire.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, Size), NumberSequenceKeypoint.new(1, Size)})
  360.  
  361. local Wing2 = Wing1:Clone()
  362. Wing2.Parent = Torso
  363. local x,y,z = 0,-1,-6
  364.  
  365. Wld = function(a,b,cf)
  366. local Weld = Instance.new('Weld',a)
  367. Weld.Part0 = a
  368. Weld.Part1 = b
  369. Weld.C1 = cf
  370. return Weld
  371. end
  372.  
  373. local wld = Wld(Torso,Wing1,CFrame.new(0,0,-.5)*CFrame.Angles(-math.rad(90),-math.rad(50),-math.rad(90)))
  374. local wld2 = Wld(Torso,Wing2,CFrame.new(0,0,.5)*CFrame.Angles(-math.rad(90),-math.rad(50),-math.rad(90)))
  375.  
  376. print("Loaded")
  377.  
  378. game:GetService("RunService").Stepped:connect(function()
  379. --z = 6+math.sin(tick()*2)
  380. y = -1+math.sin(tick()*Num)*Num2
  381. Wing1.Fire.Acceleration = Vector3.new(x,y,z)
  382. Wing2.Fire.Acceleration = Vector3.new(x,y,-z)
  383. end)
  384.  
  385. ------------------------------------------------------------------------------------------------
  386. local Player = game:GetService("Players").LocalPlayer
  387. local Character = Player.Character
  388. Torso = Character:WaitForChild'Torso'
  389.  
  390. local Wing1 = Instance.new("Part",Character)
  391. Wing1.FormFactor = Enum.FormFactor.Custom
  392. Wing1.Size = Vector3.new(.2, .2, .2)
  393. Wing1.Name = "WIng_1"
  394.  
  395. local fire = Instance.new("ParticleEmitter", Wing1)
  396. fire.VelocitySpread = 0
  397. fire.Lifetime = NumberRange.new(3.1)
  398. fire.Acceleration = Vector3.new(0, 4, 4)
  399. fire.RotSpeed = NumberRange.new(10)
  400. fire.Rate = Rate
  401. fire.Rotation = NumberRange.new(151515)
  402. fire.Name = "Fire"
  403. fire.LightEmission = 0.78
  404. fire.LockedToPart = true
  405. fire.Texture = "rbxasset://textures/particles/explosion01_implosion_main.dds"
  406. fire.Color = ColorSequence.new(Color3.new(Color), Color3.new(Color))
  407. fire.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, Size), NumberSequenceKeypoint.new(1, Size)})
  408.  
  409. local Wing2 = Wing1:Clone()
  410. Wing2.Parent = Torso
  411. local x,y,z = 0,-1,-6
  412.  
  413. Wld = function(a,b,cf)
  414. local Weld = Instance.new('Weld',a)
  415. Weld.Part0 = a
  416. Weld.Part1 = b
  417. Weld.C1 = cf
  418. return Weld
  419. end
  420.  
  421. local wld = Wld(Torso,Wing1,CFrame.new(0,0,-.5)*CFrame.Angles(-math.rad(90),-math.rad(60),-math.rad(90)))
  422. local wld2 = Wld(Torso,Wing2,CFrame.new(0,0,.5)*CFrame.Angles(-math.rad(90),-math.rad(60),-math.rad(90)))
  423.  
  424. print("Loaded")
  425.  
  426. game:GetService("RunService").Stepped:connect(function()
  427. --z = 6+math.sin(tick()*2)
  428. y = -1+math.sin(tick()*Num)*Num2
  429. Wing1.Fire.Acceleration = Vector3.new(x,y,z)
  430. Wing2.Fire.Acceleration = Vector3.new(x,y,z)
  431. end)
  432.  
  433. --//=================================\\
  434. --\\=================================//
  435.  
  436.  
  437.  
  438.  
  439.  
  440. --//====================================================\\--
  441. --|| END OF SCRIPT
  442. --\\====================================================//--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement