Advertisement
tsup2

Untitled

Aug 16th, 2018
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.62 KB | None | 0 0
  1. plr = game.Players.LocalPlayer
  2. char = plr.Character
  3. mouse = plr:GetMouse()
  4. alt = false
  5. val = 0
  6. cooldown = false
  7. selected = false
  8. summon = 5
  9. tool = Instance.new("HopperBin", plr.Backpack)
  10. tool.Name = "Doragonkomando"
  11. tool.Selected:connect(function()
  12. selected = true
  13. end)
  14. tool.Deselected:connect(function()
  15. selected = false
  16. end)
  17. mouse.KeyDown:connect(function(key)
  18. if selected == true then
  19. if key == "+" and mouse.Target then
  20. local target = mouse.Target
  21. local count = 0
  22. local glow = function(a)
  23. local b = Instance.new("PointLight", a)
  24. b.Color = Color3.new(1, 0, 0)
  25. b.Range = 30
  26. b.Brightness = 2000000000
  27. end
  28. while true do
  29. local on = true
  30. local trailp = true
  31. local trail = true
  32. local function beam(a, b, c)
  33. if trail == true then
  34. local beamcf = a.CFrame.p
  35. local ray = Ray.new(beamcf, (b.CFrame.p - beamcf).unit * c)
  36. local part, position = workspace:FindPartOnRay(ray, plr, false, true)
  37. local beam = Instance.new("Part", script)
  38. beam.BrickColor = BrickColor.new(1003)
  39. beam.FormFactor = "Custom"
  40. beam.Anchored = true
  41. beam.Locked = true
  42. beam.CanCollide = false
  43. glow(beam)
  44. beam.Material = "SmoothPlastic"
  45. local distance = (beamcf - position).magnitude
  46. beam.Size = Vector3.new(5, 5, distance)
  47. beam.CFrame = CFrame.new(beamcf, position) * CFrame.new(0, 0, -distance / 2)
  48. local done = false
  49. game:GetService("RunService").Stepped:connect(function()
  50. if done == false then
  51. done = true
  52. repeat
  53. wait()
  54. beam.Transparency = beam.Transparency + 0.1
  55. until beam.Transparency > 1
  56. beam:Destroy()
  57. end
  58. end)
  59. end
  60. end
  61. end
  62. local val2 = 0
  63. if alt == false then
  64. val = 180
  65. alt = true
  66. else
  67. val = -180
  68. alt = false
  69. end
  70. local a = Instance.new("Part")
  71. a.FormFactor = "Custom"
  72. a.CanCollide = false
  73. a.Anchored = true
  74. a.Material = "SmoothPlastic"
  75. a.CFrame = char.Torso.CFrame * CFrame.Angles(math.random(), val * math.random(), math.random())
  76. a.Size = Vector3.new(10, 10, 10)
  77. a.Parent = script
  78. a.BrickColor = BrickColor.new(1003)
  79. glow(a)
  80. local particle = Instance.new("ParticleEmitter", a)
  81. particle.Rate = 100
  82. particle.Texture = "rbxassetid://49399918"
  83. particle.VelocitySpread = 180
  84. local mesh = Instance.new("SpecialMesh", a)
  85. mesh.MeshType = "FileMesh"
  86. mesh.MeshId = "rbxassetid://24478215"
  87. mesh.TextureId = "rbxassetid://24591681"
  88. mesh.Scale = Vector3.new(5, 5, 5)
  89. local b = a:Clone()
  90. game:GetService("RunService").Stepped:connect(function()
  91. if on == true then
  92. local mag2 = (a.Position - target.Position).magnitude
  93. local m = math.floor(mag2 * 1000)
  94. if m > 9000 then
  95. a.CFrame = a.CFrame * CFrame.new(0, 0, -5)
  96. a.CFrame = a.CFrame:lerp(CFrame.new(a.Position, target.Position), val2)
  97. val2 = val2 + 0.001
  98. b.CFrame = a.CFrame * CFrame.new(0, 0, 5)
  99. beam(a, b, 200)
  100. else
  101. target:BreakJoints()
  102. target.BrickColor = a.BrickColor
  103. local mag2 = (target.Position - char.Torso.Position).magnitude
  104. local m = math.floor(mag2 * 1000)
  105. if m > 9000 then
  106. local cf = target.CFrame
  107. target.Size = target.Size - Vector3.new(5, 5, 5)
  108. target.CFrame = cf
  109. trail = false
  110. a:Destroy()
  111. target.Anchored = true
  112. target.CFrame = target.CFrame * CFrame.new(0, 0, -5)
  113. target.CFrame = target.CFrame:lerp(CFrame.new(target.Position, char.Torso.Position), val2)
  114. val2 = val2 + 0.001
  115. else
  116. target:Destroy()
  117. end
  118. end
  119. else
  120. a:Destroy()
  121. trailp = false
  122. end
  123. if target.Parent == nil then
  124. on = false
  125. end
  126. end)
  127. count = count + 1
  128. end
  129. if key == "e" and cooldown == false then
  130. local pos = mouse.hit
  131. local count = 0
  132. local trail = true
  133. cooldown = true
  134. local p = char:GetChildren()
  135. for i = 1, #p do
  136. if p[i].ClassName == "Part" and p[i].Name ~= "HumanoidRootPart" then
  137. p[i].Transparency = 1
  138. p[i].Anchored = true
  139. end
  140. if p[i].ClassName == "Hat" then
  141. p[i].Handle.Transparency = 1
  142. end
  143. end
  144. local glow = function(a)
  145. Instance.new("PointLight", a)
  146. end
  147. local function beam(a, b, c)
  148. if trail == true then
  149. local beamcf = a.CFrame.p
  150. local ray = Ray.new(beamcf, (b.CFrame.p - beamcf).unit * c)
  151. local part, position = workspace:FindPartOnRay(ray, plr, false, true)
  152. local beam = Instance.new("Part", script)
  153. beam.BrickColor = BrickColor.new(1)
  154. beam.FormFactor = "Custom"
  155. beam.Anchored = true
  156. beam.Locked = true
  157. beam.CanCollide = false
  158. beam.Material = "Neon"
  159. glow(beam)
  160. local distance = (beamcf - position).magnitude
  161. beam.Size = Vector3.new(2, 2, distance)
  162. beam.CFrame = CFrame.new(beamcf, position) * CFrame.new(0, 0, -distance / 2)
  163. local done = false
  164. game:GetService("RunService").Stepped:connect(function()
  165. if done == false then
  166. done = true
  167. repeat
  168. wait()
  169. beam.Transparency = beam.Transparency + 0.1
  170. until beam.Transparency > 1
  171. beam:Destroy()
  172. end
  173. end)
  174. end
  175. end
  176. local a = Instance.new("Part")
  177. a.FormFactor = "Custom"
  178. a.CanCollide = false
  179. a.Anchored = true
  180. a.Material = "Neon"
  181. a.CFrame = char.Torso.CFrame * CFrame.Angles(0, val * math.random(), 0)
  182. a.Size = Vector3.new(4, 4, 4)
  183. a.Parent = script
  184. a.BrickColor = BrickColor.new(1)
  185. a.Rotation = Vector3.new(30, 0, 0)
  186. glow(a)
  187. local particle = Instance.new("ParticleEmitter", a)
  188. particle.Rate = 100
  189. particle.Texture = "rbxassetid://6870073"
  190. particle.VelocitySpread = 180
  191. local mesh = Instance.new("SpecialMesh", a)
  192. mesh.MeshType = "FileMesh"
  193. mesh.MeshId = "rbxassetid://24478215"
  194. mesh.Scale = Vector3.new(2, 2, 2)
  195. local b = a:Clone()
  196. local on = true
  197. game:GetService("RunService").Stepped:connect(function()
  198. if on == true then
  199. local mag2 = (pos.p - char.Torso.Position).magnitude
  200. local m = math.floor(mag2 * 1000)
  201. if m > 9000 then
  202. a.CFrame = a.CFrame * CFrame.new(0, 0, -4)
  203. char.Torso.CFrame = a.CFrame
  204. b.CFrame = a.CFrame * CFrame.new(0, 0, 5)
  205. beam(a, b, 10)
  206. a.CFrame = a.CFrame:lerp(CFrame.new(a.CFrame.p, pos.p), count)
  207. count = count + 0.01
  208. else
  209. cooldown = false
  210. on = false
  211. trail = false
  212. a:Destroy()
  213. p = char:GetChildren()
  214. for i = 1, #p do
  215. if p[i].ClassName == "Part" and p[i].Name ~= "HumanoidRootPart" then
  216. p[i].Transparency = 0
  217. p[i].Anchored = false
  218. end
  219. if p[i].ClassName == "Hat" then
  220. p[i].Handle.Transparency = 0
  221. end
  222. end
  223. end
  224. end
  225. end)
  226. end
  227. end
  228. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement