Advertisement
Guest User

Untitled

a guest
May 20th, 2018
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.88 KB | None | 0 0
  1. --Thanks gaster :3
  2. wait()
  3. Player = game.Players.LocalPlayer
  4. Object = Player.Character.HumanoidRootPart
  5. Arm1 = Player.Character["Right Arm"]
  6. PreviousA1 = Arm1.CFrame.p
  7. Arm2 = Player.Character["Left Arm"]
  8. PreviousA2 = Arm2.CFrame.p
  9.  
  10. Leg1 = Player.Character["Right Leg"]
  11. PreviousL1 = Leg1.CFrame.p
  12. Leg2 = Player.Character["Left Leg"]
  13. PreviousL2 = Leg2.CFrame.p
  14.  
  15. Run = game["Run Service"]
  16.  
  17. PreviousP = Object.CFrame.p
  18. Running = false
  19. Phase = false
  20. PhaseActive = false
  21. Morph = false
  22. MorphActive = false
  23. Tornado = false
  24. TornadoRadius = 50
  25. TornadoActive = false
  26. Portal = false
  27. PortalEnd = false
  28. MaxZ = 15
  29. MinZ = -15
  30. LightMaxX = 3
  31. LightMinX = 1
  32. LightMaxX2 = -1
  33. LightMinX2 = -3
  34. LightMaxY = 3
  35. LightMinY = -1
  36. Rotation = 0
  37. Length = 10
  38. Color = BrickColor.White()
  39. PColor = Color3.new(0,0,0)
  40. PrevPoint1 = nil
  41. PrevPoint2 = nil
  42. PrevPoint3 = nil
  43. PrevPoint4 = nil
  44. PrevPoint5 = nil
  45. PrevPoint6 = nil
  46. PrevPoint7 = nil
  47. PrevPoint8 = nil
  48. PrevPoint9 = nil
  49. PrevPoint10 = nil
  50. PrevPoint11 = nil
  51. PrevPoint12 = nil
  52. angle = 0
  53. Mouse = Player:GetMouse()
  54. Player.Character.Humanoid.WalkSpeed = 100
  55.  
  56. Nil = function()
  57. PrevPoint1 = "Empty"
  58. PrevPoint2 = "Empty"
  59. PrevPoint3 = "Empty"
  60. PrevPoint4 = "Empty"
  61. PrevPoint5 = "Empty"
  62. PrevPoint6 = "Empty"
  63. PrevPoint7 = "Empty"
  64. PrevPoint8 = "Empty"
  65. PrevPoint9 = "Empty"
  66. PrevPoint10 = "Empty"
  67. PrevPoint11 = "Empty"
  68. PrevPoint12 = "Empty"
  69. end
  70.  
  71. local Lightning = coroutine.wrap(function()
  72. while wait() do
  73. if Portal == false then
  74. angle = angle + 0.6
  75. local Model = Instance.new("Model",workspace)
  76. Model.Name = "Lightning"
  77. local Point1 = Instance.new("Part",Model)
  78. Point1.Transparency = 1
  79. Point1.Size = Vector3.new(0.2,0.2,0.2)
  80. Point1.CFrame = Object.CFrame * CFrame.new(0,0,-(Object.Size.Z/2+Point1.Size.Z/2))
  81. Point1.Anchored = true
  82. Point1.CanCollide = false
  83. Point1.CFrame = Point1.CFrame * CFrame.new(math.random(-2,2),math.random(-2,2),-math.random(0,2))
  84.  
  85. local Point2 = Instance.new("Part",Model)
  86. Point2.Transparency = 1
  87. Point2.Size = Vector3.new(0.2,0.2,0.2)
  88. Point2.CFrame = Object.CFrame * CFrame.new(0,0,-(Object.Size.Z/2+Point2.Size.Z/2))
  89. Point2.Anchored = true
  90. Point2.CanCollide = false
  91. Point2.CFrame = Point2.CFrame * CFrame.new(math.random(-2,2),math.random(-2,2),-math.random(0,2))
  92.  
  93. local Point3 = Instance.new("Part",Model)
  94. Point3.Transparency = 1
  95. Point3.Size = Vector3.new(0.2,0.2,0.2)
  96. Point3.CFrame = Object.CFrame * CFrame.new(0,0,-(Object.Size.Z/2+Point3.Size.Z/2))
  97. Point3.Anchored = true
  98. Point3.CanCollide = false
  99. Point3.CFrame = Point3.CFrame * CFrame.new(math.random(-2,2),math.random(-2,2),-math.random(0,2))
  100.  
  101. local distance = (Point2.CFrame.p - Point1.CFrame.p).magnitude
  102. local Light = Instance.new("Part",Model)
  103. local PointLight = Instance.new("PointLight",Light)
  104. PointLight.Range = 5
  105. PointLight.Color = PColor
  106. Light.Transparency = 0
  107. Light.BrickColor = Color
  108. Light.Material = "Neon"
  109. Light.Size = Vector3.new(0.25,0.25,distance)
  110. Light.Anchored = true
  111. Light.CanCollide = false
  112. Light.CFrame = CFrame.new(Point2.CFrame.p , Point1.CFrame.p) * CFrame.new(0,0,-distance/2)
  113.  
  114. local distance2 = (Point3.CFrame.p - Point2.CFrame.p).magnitude
  115. local Light = Instance.new("Part",Model)
  116. local PointLight = Instance.new("PointLight",Light)
  117. PointLight.Range = 5
  118. PointLight.Color = PColor
  119. Light.Transparency = 0
  120. Light.BrickColor = Color
  121. Light.Material = "Neon"
  122. Light.Size = Vector3.new(0.25,0.25,distance2)
  123. Light.Anchored = true
  124. Light.CanCollide = false
  125. Light.CFrame = CFrame.new(Point3.CFrame.p , Point2.CFrame.p) * CFrame.new(0,0,-distance2/2)
  126.  
  127. local Point1 = Instance.new("Part",Model)
  128. Point1.Transparency = 1
  129. Point1.Size = Vector3.new(0.2,0.2,0.2)
  130. Point1.CFrame = Object.CFrame * CFrame.new(0,0,(Object.Size.Z/2+Point1.Size.Z/2))
  131. Point1.Anchored = true
  132. Point1.CanCollide = false
  133. Point1.CFrame = Point1.CFrame * CFrame.new(math.random(-2,2),math.random(-2,2),math.random(0,2))
  134.  
  135. local Point2 = Instance.new("Part",Model)
  136. Point2.Transparency = 1
  137. Point2.Size = Vector3.new(0.2,0.2,0.2)
  138. Point2.CFrame = Object.CFrame * CFrame.new(0,0,(Object.Size.Z/2+Point2.Size.Z/2))
  139. Point2.Anchored = true
  140. Point2.CanCollide = false
  141. Point2.CFrame = Point2.CFrame * CFrame.new(math.random(-2,2),math.random(-2,2),math.random(0,2))
  142.  
  143. local Point3 = Instance.new("Part",Model)
  144. Point3.Transparency = 1
  145. Point3.Size = Vector3.new(0.2,0.2,0.2)
  146. Point3.CFrame = Object.CFrame * CFrame.new(0,0,(Object.Size.Z/2+Point3.Size.Z/2))
  147. Point3.Anchored = true
  148. Point3.CanCollide = false
  149. Point3.CFrame = Point3.CFrame * CFrame.new(math.random(-2,2),math.random(-2,2),math.random(0,2))
  150.  
  151. local distance = (Point2.CFrame.p - Point1.CFrame.p).magnitude
  152. local Light = Instance.new("Part",Model)
  153. local PointLight = Instance.new("PointLight",Light)
  154. PointLight.Range = 5
  155. PointLight.Color = PColor
  156. Light.Transparency = 0
  157. Light.BrickColor = Color
  158. Light.Material = "Neon"
  159. Light.Size = Vector3.new(0.25,0.25,distance)
  160. Light.Anchored = true
  161. Light.CanCollide = false
  162. Light.CFrame = CFrame.new(Point2.CFrame.p , Point1.CFrame.p) * CFrame.new(0,0,-distance/2)
  163.  
  164. local distance2 = (Point3.CFrame.p - Point2.CFrame.p).magnitude
  165. local Light = Instance.new("Part",Model)
  166. local PointLight = Instance.new("PointLight",Light)
  167. PointLight.Range = 5
  168. PointLight.Color = PColor
  169. Light.Transparency = 0
  170. Light.BrickColor = Color
  171. Light.Material = "Neon"
  172. Light.Size = Vector3.new(0.3,0.3,distance2)
  173. Light.Anchored = true
  174. Light.CanCollide = false
  175. Light.CFrame = CFrame.new(Point3.CFrame.p , Point2.CFrame.p) * CFrame.new(0,0,-distance2/2)
  176.  
  177. local Point1 = Instance.new("Part",Model)
  178. Point1.Transparency = 1
  179. Point1.Size = Vector3.new(0.2,0.2,0.2)
  180. Point1.CFrame = Object.CFrame * CFrame.new((Object.Size.X/2+Point1.Size.X/2),0,0)
  181. Point1.Anchored = true
  182. Point1.CanCollide = false
  183. Point1.CFrame = Point1.CFrame * CFrame.new(math.random(0,2),math.random(-2,2),math.random(-2,2))
  184.  
  185. local Point2 = Instance.new("Part",Model)
  186. Point2.Transparency = 1
  187. Point2.Size = Vector3.new(0.2,0.2,0.2)
  188. Point2.CFrame = Object.CFrame * CFrame.new((Object.Size.X/2+Point1.Size.X/2),0,0)
  189. Point2.Anchored = true
  190. Point2.CanCollide = false
  191. Point2.CFrame = Point2.CFrame * CFrame.new(math.random(0,2),math.random(-2,2),math.random(-2,2))
  192.  
  193. local Point3 = Instance.new("Part",Model)
  194. Point3.Transparency = 1
  195. Point3.Size = Vector3.new(0.2,0.2,0.2)
  196. Point3.CFrame = Object.CFrame * CFrame.new((Object.Size.X/2+Point1.Size.X/2),0,0)
  197. Point3.Anchored = true
  198. Point3.CanCollide = false
  199. Point3.CFrame = Point3.CFrame * CFrame.new(math.random(0,2),math.random(-2,2),math.random(-2,2))
  200.  
  201. local distance = (Point2.CFrame.p - Point1.CFrame.p).magnitude
  202. local Light = Instance.new("Part",Model)
  203. local PointLight = Instance.new("PointLight",Light)
  204. PointLight.Range = 5
  205. PointLight.Color = PColor
  206. Light.Transparency = 0
  207. Light.BrickColor = Color
  208. Light.Material = "Neon"
  209. Light.Size = Vector3.new(0.25,0.25,distance)
  210. Light.Anchored = true
  211. Light.CanCollide = false
  212. Light.CFrame = CFrame.new(Point2.CFrame.p , Point1.CFrame.p) * CFrame.new(0,0,-distance/2)
  213.  
  214. local distance2 = (Point3.CFrame.p - Point2.CFrame.p).magnitude
  215. local Light = Instance.new("Part",Model)
  216. local PointLight = Instance.new("PointLight",Light)
  217. PointLight.Range = 5
  218. PointLight.Color = PColor
  219. Light.Transparency = 0
  220. Light.BrickColor = Color
  221. Light.Material = "Neon"
  222. Light.Size = Vector3.new(0.25,0.25,distance2)
  223. Light.Anchored = true
  224. Light.CanCollide = false
  225. Light.CFrame = CFrame.new(Point3.CFrame.p , Point2.CFrame.p) * CFrame.new(0,0,-distance2/2)
  226.  
  227. local Point1 = Instance.new("Part",Model)
  228. Point1.Transparency = 1
  229. Point1.Size = Vector3.new(0.2,0.2,0.2)
  230. Point1.CFrame = Object.CFrame * CFrame.new(-(Object.Size.X/2+Point1.Size.X/2),0,0)
  231. Point1.Anchored = true
  232. Point1.CanCollide = false
  233. Point1.CFrame = Point1.CFrame * CFrame.new(-math.random(0,2),math.random(-2,2),math.random(-2,2))
  234.  
  235. local Point2 = Instance.new("Part",Model)
  236. Point2.Transparency = 1
  237. Point2.Size = Vector3.new(0.2,0.2,0.2)
  238. Point2.CFrame = Object.CFrame * CFrame.new(-(Object.Size.X/2+Point1.Size.X/2),0,0)
  239. Point2.Anchored = true
  240. Point2.CanCollide = false
  241. Point2.CFrame = Point2.CFrame * CFrame.new(-math.random(0,2),math.random(-2,2),math.random(-2,2))
  242.  
  243. local Point3 = Instance.new("Part",Model)
  244. Point3.Transparency = 1
  245. Point3.Size = Vector3.new(0.2,0.2,0.2)
  246. Point3.CFrame = Object.CFrame * CFrame.new(-(Object.Size.X/2+Point1.Size.X/2),0,0)
  247. Point3.Anchored = true
  248. Point3.CanCollide = false
  249. Point3.CFrame = Point3.CFrame * CFrame.new(-math.random(0,2),math.random(-2,2),math.random(-2,2))
  250.  
  251. local distance = (Point2.CFrame.p - Point1.CFrame.p).magnitude
  252. local Light = Instance.new("Part",Model)
  253. local PointLight = Instance.new("PointLight",Light)
  254. PointLight.Range = 5
  255. PointLight.Color = PColor
  256. Light.Transparency = 0
  257. Light.BrickColor = Color
  258. Light.Material = "Neon"
  259. Light.Size = Vector3.new(0.25,0.25,distance)
  260. Light.Anchored = true
  261. Light.CanCollide = false
  262. Light.CFrame = CFrame.new(Point2.CFrame.p , Point1.CFrame.p) * CFrame.new(0,0,-distance/2)
  263.  
  264. local distance2 = (Point3.CFrame.p - Point2.CFrame.p).magnitude
  265. local Light = Instance.new("Part",Model)
  266. local PointLight = Instance.new("PointLight",Light)
  267. PointLight.Range = 5
  268. PointLight.Color = PColor
  269. Light.Transparency = 0
  270. Light.BrickColor = Color
  271. Light.Material = "Neon"
  272. Light.Size = Vector3.new(0.25,0.25,distance2)
  273. Light.Anchored = true
  274. Light.CanCollide = false
  275. Light.CFrame = CFrame.new(Point3.CFrame.p , Point2.CFrame.p) * CFrame.new(0,0,-distance2/2)
  276.  
  277. local Children = Model:GetChildren()
  278. wait(0.1)
  279. for i = 1,#Children do
  280. if Children[i]:IsA("Part") then
  281. Children[i].Transparency = 1
  282. end
  283. game.Debris:AddItem(Children[i],0)
  284. end
  285.  
  286. end
  287. end
  288. end)
  289. Lightning()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement