Advertisement
iiAdqm

ddddddun

Sep 12th, 2017
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.10 KB | None | 0 0
  1. ----------------------------------------
  2. -- Originally made by Alfederate :D --
  3. ----------------------------------------
  4. ----------------------------------------
  5. -- Originally made by Alfederate :D --
  6. ----------------------------------------
  7.  
  8. -- there's no time to explain! --
  9.  
  10. local new=Instance.new
  11. local rad=math.rad
  12. local cf=CFrame.new
  13. local v3=Vector3.new
  14. local ang=function(x,y,z)
  15. return CFrame.Angles(rad(x),rad(y),rad(z))
  16. end
  17. local player=game:service'Players'.LocalPlayer
  18. local char=player.Character
  19. local cam=workspace.Camera
  20. local mouse=player:GetMouse()
  21. local weld=function(a,b,c0,c1)
  22. m=Instance.new('Motor',a)
  23. m.Part0=a
  24. m.Part1=b
  25. m.C0=c0
  26. m.C1=c1
  27. return m
  28. end
  29.  
  30. snd='rbxassetid://146964815'
  31. beamm=Instance.new('Model',workspace)
  32. beamm.Name='beam'
  33.  
  34. laser=false
  35.  
  36. rs=Instance.new('Part',char)
  37. rs.Transparency=1
  38. rs.CanCollide=false
  39. rs.TopSurface,rs.BottomSurface=0,0
  40. rs.FormFactor=3
  41. rs.Size=Vector3.new(.5,.5,.5)
  42.  
  43. ls=rs:Clone()
  44. ls.Parent=char
  45.  
  46. rsw=weld(rs,char.Torso,cf(-1,-.5,0),cf())
  47. lsw=weld(ls,char.Torso,cf(1,-.5,0),cf())
  48. raw=weld(char['Right Arm'],rs,cf(-.5,.6,-.14),ang(90,0,-8))
  49. law=weld(char['Left Arm'],ls,cf(-.3,1.5,-.14),ang(90,0,43))
  50.  
  51. s1=Instance.new('Sound',char)
  52. s1.Volume=1
  53. s1.Pitch=1
  54. s1.Looped=true
  55. s1.SoundId=snd
  56.  
  57. particles={}
  58.  
  59. local wep=new('Part',char)
  60. wep.FormFactor=3
  61. wep.CanCollide=false
  62. wep.Size=v3(1,3,1)
  63. wep.TopSurface,wep.BottomSurface=0,0
  64. local wepw=weld(wep,char['Right Arm'],cf(.26,.4,.7),ang(0,0,8))
  65.  
  66. local beam=wep:Clone()
  67. beam:ClearAllChildren()
  68. beam.Material='Neon'
  69. beam.BrickColor=BrickColor.new('Really black')
  70. beam.Size=Vector3.new(3,3,1)
  71. beam.Transparency=.5
  72. beam.Anchored=true
  73. local ms=Instance.new('BlockMesh',beam)
  74. local inner=beam:Clone()
  75. inner.Transparency=0
  76. inner.Material='SmoothPlastic'
  77. inner.BrickColor=BrickColor.new('Really black')
  78. local ms2=inner.Mesh
  79.  
  80. local expl=inner:Clone()
  81. expl.Mesh:Destroy()
  82. expl.Material='Neon'
  83. expl.BrickColor=BrickColor.new('Really black')
  84. expl.Size=Vector3.new(11,11,11)
  85. expl.Transparency=.55
  86. pl=Instance.new('PointLight',expl)
  87. pl.Color=expl.BrickColor.Color
  88. pl.Range=pl.Range*2
  89. pl.Name='light'
  90. local br=pl.Range
  91.  
  92. local exa=expl:Clone()
  93. exa.Size=Vector3.new(4,4,4)
  94. pl2=exa.light
  95.  
  96. local part=exa:Clone()
  97. part.Size=Vector3.new(1.5,1.5,1.5)
  98. pl3=part.light
  99. pms=Instance.new('BlockMesh',part)
  100.  
  101. char.Humanoid.Died:connect(function()
  102. laser=false
  103. beam.Parent=nil
  104. inner.Parent=nil
  105. expl.Parent=nil
  106. exa.Parent=nil
  107. s1:stop()
  108. end)
  109.  
  110. mouse.Button1Down:connect(function() if char.Humanoid.Health~=0 then
  111. laser=true
  112. s1.Volume=1
  113. s1:play()
  114. end end)
  115. mouse.Button1Up:connect(function()
  116. laser=false
  117. beam.Parent=nil
  118. inner.Parent=nil
  119. expl.Parent=nil
  120. exa.Parent=nil
  121. s1:stop()
  122. end)
  123.  
  124. parti=0
  125. game:service'RunService'.Stepped:connect(function()
  126. parti=parti+1
  127. for i,v in pairs(particles) do
  128. v.CFrame=v.CFrame*CFrame.new(0,0,-.3)
  129. v.Transparency=v.Transparency+.08
  130. if v.Transparency >= 1 then
  131. v:Destroy()
  132. table.remove(particles,i)
  133. else
  134. v.Parent=beamm
  135. end
  136. end
  137. a=cam.CoordinateFrame.p
  138. b=mouse.Hit.p
  139. mhitr=Ray.new(a,(b-a).unit*999)
  140. mhit,ps=workspace:FindPartOnRayWithIgnoreList(mhitr,{char,beamm})
  141. raw.C1=ang(90+(mouse.Hit.lookVector.y*90),0,-8)
  142. law.C1=ang(90+(mouse.Hit.lookVector.y*90),0,43)
  143. if not char.Humanoid.Sit and not char.Humanoid.PlatformStand then
  144. char.Torso.CFrame=CFrame.new(char.Torso.CFrame.p,Vector3.new(ps.x,char.Torso.CFrame.p.y,ps.z))
  145. end
  146. if laser then
  147. beamm.Parent=workspace
  148. beam.Parent=beamm
  149. inner.Parent=beamm
  150. expl.Parent=beamm
  151. exa.Parent=beamm
  152. s1.Volume=s1.Volume-.002
  153.  
  154. ray=Ray.new((wep.CFrame*cf(0,-1.5,0)).p,((wep.CFrame*cf(0,-10,0)).p-(wep.CFrame*cf(0,-1.5,0)).p).unit*999)
  155. hit,pos=workspace:FindPartOnRayWithIgnoreList(ray,{char,beamm})
  156.  
  157. if hit and hit.Parent:findFirstChild('Humanoid') and s1.Volume > .3 and parti/8==math.floor(parti/8) then
  158. Instance.new('Explosion',workspace).Position=pos
  159. end
  160. if hit and hit.Parent==workspace.Terrain or hit==workspace.Terrain and parti/8==math.floor(parti/8) then
  161. e=Instance.new('Explosion',workspace)
  162. e.Position=pos
  163. e.BlastRadius=14
  164. e.BlastPressure=1e4
  165. end
  166. if hit and not hit.Anchored and not (hit:GetMass()>1e4) then
  167. hit.Velocity=hit.Velocity+beam.CFrame.lookVector*(1*s1.Volume*hit:GetMass())
  168. end
  169.  
  170. if parti==math.floor(parti) then
  171. par=part:Clone()
  172. table.insert(particles,par)
  173. par.Parent=beamm
  174. par.Transparency=1-s1.Volume
  175. par.light.Range=br*s1.Volume
  176. par.CFrame=cf(pos)*ang(math.random(-180,180),math.random(-180,180),math.random(-180,180))*cf(0,0,-10)
  177. end
  178.  
  179. mag=((wep.CFrame*cf(0,-1.5,0)).p-pos).magnitude
  180. ms.Scale=v3(s1.Volume,s1.Volume,mag)
  181. ms2.Scale=v3(ms.Scale.x/2,ms.Scale.y/2,mag-(.1/mag))
  182. beam.CFrame=cf((wep.CFrame*cf(0,-1.5,0)).p,pos)*cf(0,0,-mag/2)*ang(0,0,math.random(0,180))
  183. inner.CFrame=beam.CFrame
  184. pl.Range=br*s1.Volume
  185. pl2.Range=br*s1.Volume
  186. expl.Size=v3(math.random(9,13),math.random(9,13),math.random(9,13))*s1.Volume
  187. expl.Transparency=math.random(40,60)/100
  188. expl.CFrame=cf(pos)*ang(math.random(0,180),math.random(0,180),math.random(0,180))
  189. exa.Size=v3(4,4,4)*s1.Volume
  190. exa.CFrame=wep.CFrame*cf(0,-1.5,0)*ang(math.random(0,180),math.random(0,180),math.random(0,180))
  191. char.Torso.Velocity=char.Torso.Velocity-beam.CFrame.lookVector*(7*s1.Volume)
  192. end
  193. end)
  194. -- there's no time to explain! --
  195.  
  196. local new=Instance.new
  197. local rad=math.rad
  198. local cf=CFrame.new
  199. local v3=Vector3.new
  200. local ang=function(x,y,z)
  201. return CFrame.Angles(rad(x),rad(y),rad(z))
  202. end
  203. local player=game:service'Players'.LocalPlayer
  204. local char=player.Character
  205. local cam=workspace.Camera
  206. local mouse=player:GetMouse()
  207. local weld=function(a,b,c0,c1)
  208. m=Instance.new('Motor',a)
  209. m.Part0=a
  210. m.Part1=b
  211. m.C0=c0
  212. m.C1=c1
  213. return m
  214. end
  215.  
  216. snd='rbxassetid://146964815'
  217. beamm=Instance.new('Model',workspace)
  218. beamm.Name='beam'
  219.  
  220. laser=false
  221.  
  222. rs=Instance.new('Part',char)
  223. rs.Transparency=1
  224. rs.CanCollide=false
  225. rs.TopSurface,rs.BottomSurface=0,0
  226. rs.FormFactor=3
  227. rs.Size=Vector3.new(.5,.5,.5)
  228.  
  229. ls=rs:Clone()
  230. ls.Parent=char
  231.  
  232. rsw=weld(rs,char.Torso,cf(-1,-.5,0),cf())
  233. lsw=weld(ls,char.Torso,cf(1,-.5,0),cf())
  234. raw=weld(char['Right Arm'],rs,cf(-.5,.6,-.14),ang(90,0,-8))
  235. law=weld(char['Left Arm'],ls,cf(-.3,1.5,-.14),ang(90,0,43))
  236.  
  237. s1=Instance.new('Sound',char)
  238. s1.Volume=1
  239. s1.Pitch=1
  240. s1.Looped=true
  241. s1.SoundId=snd
  242.  
  243. particles={}
  244.  
  245. local wep=new('Part',char)
  246. wep.FormFactor=3
  247. wep.CanCollide=false
  248. wep.Size=v3(1,3,1)
  249. wep.TopSurface,wep.BottomSurface=0,0
  250. local wepw=weld(wep,char['Right Arm'],cf(.26,.4,.7),ang(0,0,8))
  251.  
  252. local beam=wep:Clone()
  253. beam:ClearAllChildren()
  254. beam.Material='Neon'
  255. beam.BrickColor=BrickColor.new('Institutional white')
  256. beam.Size=Vector3.new(3,3,1)
  257. beam.Transparency=.5
  258. beam.Anchored=true
  259. local ms=Instance.new('BlockMesh',beam)
  260. local inner=beam:Clone()
  261. inner.Transparency=0
  262. inner.Material='SmoothPlastic'
  263. inner.BrickColor=BrickColor.new('Institutional white')
  264. local ms2=inner.Mesh
  265.  
  266. local expl=inner:Clone()
  267. expl.Mesh:Destroy()
  268. expl.Material='Neon'
  269. expl.BrickColor=BrickColor.new('Institutional white')
  270. expl.Size=Vector3.new(11,11,11)
  271. expl.Transparency=.55
  272. pl=Instance.new('PointLight',expl)
  273. pl.Color=expl.BrickColor.Color
  274. pl.Range=pl.Range*2
  275. pl.Name='light'
  276. local br=pl.Range
  277.  
  278. local exa=expl:Clone()
  279. exa.Size=Vector3.new(4,4,4)
  280. pl2=exa.light
  281.  
  282. local part=exa:Clone()
  283. part.Size=Vector3.new(1.5,1.5,1.5)
  284. pl3=part.light
  285. pms=Instance.new('BlockMesh',part)
  286.  
  287. char.Humanoid.Died:connect(function()
  288. laser=false
  289. beam.Parent=nil
  290. inner.Parent=nil
  291. expl.Parent=nil
  292. exa.Parent=nil
  293. s1:stop()
  294. end)
  295.  
  296. mouse.Button1Down:connect(function() if char.Humanoid.Health~=0 then
  297. laser=true
  298. s1.Volume=1
  299. s1:play()
  300. end end)
  301. mouse.Button1Up:connect(function()
  302. laser=false
  303. beam.Parent=nil
  304. inner.Parent=nil
  305. expl.Parent=nil
  306. exa.Parent=nil
  307. s1:stop()
  308. end)
  309.  
  310. parti=0
  311. game:service'RunService'.Stepped:connect(function()
  312. parti=parti+1
  313. for i,v in pairs(particles) do
  314. v.CFrame=v.CFrame*CFrame.new(0,0,-.3)
  315. v.Transparency=v.Transparency+.08
  316. if v.Transparency >= 1 then
  317. v:Destroy()
  318. table.remove(particles,i)
  319. else
  320. v.Parent=beamm
  321. end
  322. end
  323. a=cam.CoordinateFrame.p
  324. b=mouse.Hit.p
  325. mhitr=Ray.new(a,(b-a).unit*999)
  326. mhit,ps=workspace:FindPartOnRayWithIgnoreList(mhitr,{char,beamm})
  327. raw.C1=ang(90+(mouse.Hit.lookVector.y*90),0,-8)
  328. law.C1=ang(90+(mouse.Hit.lookVector.y*90),0,43)
  329. if not char.Humanoid.Sit and not char.Humanoid.PlatformStand then
  330. char.Torso.CFrame=CFrame.new(char.Torso.CFrame.p,Vector3.new(ps.x,char.Torso.CFrame.p.y,ps.z))
  331. end
  332. if laser then
  333. beamm.Parent=workspace
  334. beam.Parent=beamm
  335. inner.Parent=beamm
  336. expl.Parent=beamm
  337. exa.Parent=beamm
  338. s1.Volume=s1.Volume-.002
  339.  
  340. ray=Ray.new((wep.CFrame*cf(0,-1.5,0)).p,((wep.CFrame*cf(0,-10,0)).p-(wep.CFrame*cf(0,-1.5,0)).p).unit*999)
  341. hit,pos=workspace:FindPartOnRayWithIgnoreList(ray,{char,beamm})
  342.  
  343. if hit and hit.Parent:findFirstChild('Humanoid') and s1.Volume > .3 and parti/8==math.floor(parti/8) then
  344. Instance.new('Explosion',workspace).Position=pos
  345. end
  346. if hit and hit.Parent==workspace.Terrain or hit==workspace.Terrain and parti/8==math.floor(parti/8) then
  347. e=Instance.new('Explosion',workspace)
  348. e.Position=pos
  349. e.BlastRadius=14
  350. e.BlastPressure=1e4
  351. end
  352. if hit and not hit.Anchored and not (hit:GetMass()>1e4) then
  353. hit.Velocity=hit.Velocity+beam.CFrame.lookVector*(1*s1.Volume*hit:GetMass())
  354. end
  355.  
  356. if parti==math.floor(parti) then
  357. par=part:Clone()
  358. table.insert(particles,par)
  359. par.Parent=beamm
  360. par.Transparency=1-s1.Volume
  361. par.light.Range=br*s1.Volume
  362. par.CFrame=cf(pos)*ang(math.random(-180,180),math.random(-180,180),math.random(-180,180))*cf(0,0,-10)
  363. end
  364.  
  365. mag=((wep.CFrame*cf(0,-1.5,0)).p-pos).magnitude
  366. ms.Scale=v3(s1.Volume,s1.Volume,mag)
  367. ms2.Scale=v3(ms.Scale.x/2,ms.Scale.y/2,mag-(.1/mag))
  368. beam.CFrame=cf((wep.CFrame*cf(0,-1.5,0)).p,pos)*cf(0,0,-mag/2)*ang(0,0,math.random(0,180))
  369. inner.CFrame=beam.CFrame
  370. pl.Range=br*s1.Volume
  371. pl2.Range=br*s1.Volume
  372. expl.Size=v3(math.random(9,13),math.random(9,13),math.random(9,13))*s1.Volume
  373. expl.Transparency=math.random(40,60)/100
  374. expl.CFrame=cf(pos)*ang(math.random(0,180),math.random(0,180),math.random(0,180))
  375. exa.Size=v3(4,4,4)*s1.Volume
  376. exa.CFrame=wep.CFrame*cf(0,-1.5,0)*ang(math.random(0,180),math.random(0,180),math.random(0,180))
  377. char.Torso.Velocity=char.Torso.Velocity-beam.CFrame.lookVector*(7*s1.Volume)
  378. end
  379. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement