Advertisement
vibrantsinger423

gdg

Apr 15th, 2019
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.55 KB | None | 0 0
  1. Player=game:GetService("Players").LocalPlayer
  2. Character=Player.Character
  3. Torso=Character.Torso
  4. euler=CFrame.fromEulerAnglesXYZ
  5. it=Instance.new
  6. vt=Vector3.new
  7. cf=CFrame.new
  8. local Effects={}
  9. mouse=Player:GetMouse()
  10.  
  11. function NoOutline(Part)
  12. Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
  13. end
  14.  
  15. function part(formfactor,parent,material,reflectance,transparency,brickcolor,name,size)
  16. local fp=it("Part")
  17. fp.formFactor=formfactor
  18. fp.Parent=parent
  19. fp.Reflectance=reflectance
  20. fp.Transparency=transparency
  21. fp.CanCollide=false
  22. fp.Locked=true
  23. fp.BrickColor=BrickColor.new(tostring(brickcolor))
  24. fp.Name=name
  25. fp.Size=size
  26. fp.Position=Character.Torso.Position
  27. NoOutline(fp)
  28. fp.Material=material
  29. fp:BreakJoints()
  30. return fp
  31. end
  32.  
  33. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  34. local mesh=it(Mesh)
  35. mesh.Parent=part
  36. if Mesh=="SpecialMesh" then
  37. mesh.MeshType=meshtype
  38. mesh.MeshId=meshid
  39. end
  40. mesh.Offset=offset
  41. mesh.Scale=scale
  42. return mesh
  43. end
  44.  
  45. function weld(parent,part0,part1,c0)
  46. local weld=it("Weld")
  47. weld.Parent=parent
  48. weld.Part0=part0
  49. weld.Part1=part1
  50. weld.C0=c0
  51. return weld
  52. end
  53.  
  54. function swait(num)
  55. if num==0 or num==nil then
  56. game:service'RunService'.Stepped:wait(0)
  57. else
  58. for i=0,num do
  59. game:service'RunService'.Stepped:wait(0)
  60. end
  61. end
  62. end
  63.  
  64. function MagicBlockx(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  65. local prt=part(3,workspace,"Neon",0,0,brickcolor,"Effect",vt())
  66. prt.Anchored=true
  67. prt.CFrame=cframe
  68. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  69. game:GetService("Debris"):AddItem(prt,5)
  70. table.insert(Effects,{prt,"Block1",delay,x3,y3,z3}) --part, type, delay
  71. end
  72.  
  73. so = function(id,par,vol,pit)
  74. coroutine.resume(coroutine.create(function()
  75. local sou = Instance.new("Sound",par or workspace)
  76. sou.Volume=vol
  77. sou.Pitch=pit or 1
  78. sou.SoundId=id
  79. swait()
  80. sou:play()
  81. game:GetService("Debris"):AddItem(sou,6)
  82. end))
  83. end
  84.  
  85. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  86. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  87. end
  88.  
  89. function MagicCylinder(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  90. local prt=part(3,workspace,"Neon",0,0,brickcolor,"Effect",vt(0.2,0.2,0.2))
  91. prt.Anchored=true
  92. prt.CFrame=cframe
  93. msh=mesh("SpecialMesh",prt,"Head","",vt(0,0,0),vt(x1,y1,z1))
  94. game:GetService("Debris"):AddItem(prt,2)
  95. coroutine.resume(coroutine.create(function(Part,Mesh)
  96. for i=0,1,delay do
  97. swait()
  98. Part.CFrame=Part.CFrame
  99. Part.Transparency=i
  100. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  101. end
  102. Part.Parent=nil
  103. end),prt,msh)
  104. end
  105.  
  106. function MagicCirclex(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  107. local prt=part(3,workspace,"Neon",0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  108. prt.Anchored=true
  109. prt.CFrame=cframe
  110. prt.CanCollide = false
  111. msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
  112. game:GetService("Debris"):AddItem(prt,2)
  113. coroutine.resume(coroutine.create(function(Part,Mesh)
  114. for i=0,1,delay do
  115. swait()
  116. Part.CFrame=Part.CFrame
  117. Part.Transparency=i
  118. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  119. end
  120. Part.Parent=nil
  121. end),prt,msh)
  122. end
  123.  
  124. function MagicRingx(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  125. local prt=part(3,workspace,"Neon",0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  126. prt.Anchored=true
  127. prt.CFrame=cframe
  128. msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(x1,y1,z1))
  129. game:GetService("Debris"):AddItem(prt,2)
  130. coroutine.resume(coroutine.create(function(Part,Mesh,num)
  131. for i=0,1,delay do
  132. swait()
  133. Part.Transparency=i
  134. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  135. end
  136. Part.Parent=nil
  137. end),prt,msh,(math.random(0,1)+math.random())/5)
  138. end
  139.  
  140. mouse.KeyDown:connect(function(k)
  141. k=k:lower()
  142. if k=='e' then
  143. lazor()
  144. end
  145. end)
  146.  
  147. function lazor()
  148. --[[
  149. local orb=part(3,Character,"Neon",0,1,BrickColor.new("Dark blue"),"Orb",vt())
  150. local omsh=mesh("SpecialMesh",orb,"Sphere","",vt(0,0,0),vt(15,15,15))
  151. local owld=weld(orb,orb,Torso,cf(0,-1.5,8),cf(0,0,0))
  152. so("http://roblox.com/asset/?id=169445572",orb,1,0.9)
  153. so("http://roblox.com/asset/?id=169380495",orb,1,0.6)
  154. so("http://roblox.com/asset/?id=203691346",orb,1,0.9)
  155. for i=1,0.3,-0.01 do
  156. wait()
  157. orb.Transparency=i
  158. omsh.Scale=omsh.Scale+vt(0.5,0.5,0.5)
  159. MagicBlockx(BrickColor.new("Really black"),orb.CFrame,15,15,15,2,2,2,0.1)
  160. local ef=part(3,workspace,"Neon",0,0,BrickColor.new("Dark blue"),"Effect",vt())
  161. ef.Anchored=true
  162. local emsh=mesh("SpecialMesh",ef,"Sphere","",vt(0,0,0),vt(2,math.random(1000,1500)/100,2))
  163. local ceef=euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))*cf(0,math.random(10,20),0)
  164. ef.CFrame=orb.CFrame*ceef
  165. game:GetService("Debris"):AddItem(ef,2)
  166. coroutine.resume(coroutine.create(function(Part,Mesh)
  167. for i=0,1,0.1 do
  168. wait()
  169. Part.Transparency=i
  170. Part.CFrame=Part.CFrame*cf(0,-1,0)
  171. end
  172. Part.Parent=nil
  173. end),ef,emsh)
  174. end
  175. --orb orb orb
  176. local Pos=cf(orb.Position,Player:GetMouse().Hit.p).lookVector
  177. wait(.5)
  178. orb.Parent=nil ]]--
  179. local Pos=cf(Torso.Position,Player:GetMouse().Hit.p).lookVector
  180. local hit,pos = rayCast(Torso.Position,Pos,999,Character)
  181. local mag=(Torso.Position-pos).magnitude
  182. MagicCirclex(BrickColor.new("Dark blue"),cf(pos),15,15,15,8,8,8,0.02)
  183. MagicBlockx(BrickColor.new("Dark blue"),cf(pos),15,15,15,8,8,8,0.02)
  184. MagicCylinder(BrickColor.new("Dark blue"),CFrame.new((Torso.Position+pos)/2,pos)*euler(1.57,0,0),10,mag*5,10,0.5,0,0.5,0.01)
  185. for i=1,2 do
  186. --MagicRingx(BrickColor.new("Dark blue"),cf(pos)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),3,3,3,1,1,1,0.04)
  187. end
  188. for i=1,5 do
  189. --local tehcf=CFrame.new((orb.Position+pos)/2,pos)*euler(1.57,0,0)*cf(0,(mag/5)*(i/2),0)
  190. --MagicRingx(BrickColor.new("Really black"),tehcf*euler(1.57,0,0),1,1,1,0.5,0.5,0.5,0.01)
  191. end
  192. for i=0,5 do
  193. --local tehcf=CFrame.new((orb.Position+pos)/2,pos)*euler(1.57,0,0)*cf(0,(-mag/5)*(i/2),0)
  194. --MagicRingx(BrickColor.new("Dark blue"),tehcf*euler(1.57,0,0),1,1,1,0.5,0.5,0.5,0.01)
  195. end
  196. local ref=part(3,workspace,"Neon",0,1,BrickColor.new("Really black"),"Effect",vt())
  197. ref.CFrame=cf(pos)
  198. so("http://roblox.com/asset/?id=203691378",Torso,1,0.7)
  199. so("http://roblox.com/asset/?id=169445602",Torso,1,0.7)
  200. so("http://www.roblox.com/Asset?ID=203691282",Torso,1,.8)
  201. coroutine.resume(coroutine.create(function(Part)
  202. Part.Parent=nil
  203. end),ref)
  204. if hit~=nil then
  205. --MagniDamage(Part,hit,30,90,100,0,"Normal")
  206. end
  207. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement