Advertisement
minecrafter523

Untitled

Jun 6th, 2016
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.95 KB | None | 0 0
  1. -------------------------
  2. local Music = false
  3. -------------------------
  4. local Player = game:GetService("Players").LocalPlayer
  5. local Char = Player.Character
  6. local Torso = Char["Torso"]
  7. local Head = Char["Head"]
  8. local Larm = Char["Left Arm"]
  9. local Rarm = Char["Right Arm"]
  10. local Lleg = Char["Left Leg"]
  11. local Rleg = Char["Right Leg"]
  12. local Humanoid = Char["Humanoid"]
  13. local Neck = Torso["Neck"]
  14. local LS = Torso["Left Shoulder"]
  15. local LH = Torso["Left Hip"]
  16. local RS = Torso["Right Shoulder"]
  17. local RH = Torso["Right Hip"]
  18. local Mouse = Player:GetMouse()
  19. local root = Char.HumanoidRootPart
  20. local cam = workspace.CurrentCamera
  21. local HealLimit = 5
  22. ----------------------------------
  23. local Ter = workspace.Terrain
  24. local Attacking = false
  25. local flySpeed = 10
  26. local MAX_FLY_SPEED = 500
  27. local canFly = false
  28. local flyToggled = false
  29. local keysDown = {}
  30. local rad = math.rad
  31. local Sound = Instance.new("Sound",Char)
  32. Sound.Volume = 0.3
  33. Sound.Looped = false
  34. Sound:Play()
  35. local SoundIds = {"267979379","324976791","401059459"}
  36. ----------------------------------
  37. local floatBP = Instance.new("BodyPosition")
  38. floatBP.maxForce = Vector3.new(0, math.huge, 0)
  39. local flyBV = Instance.new("BodyVelocity")
  40. flyBV.maxForce = Vector3.new(9e9, 9e9, 9e9)
  41. local turnBG = Instance.new("BodyGyro")
  42. turnBG.maxTorque = Vector3.new(math.huge, math.huge, math.huge)
  43. it=Instance.new
  44. vt=Vector3.new
  45. cf=CFrame.new
  46. euler=CFrame.fromEulerAnglesXYZ
  47. angles=CFrame.Angles
  48. RW, LW=Instance.new("Weld"), Instance.new("Weld")
  49. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  50. RW.Name="Right Shoulder"
  51. RW.Part0=Torso
  52. RW.C0=cf(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0.15)
  53. RW.C1=cf(0, 0.5, 0)
  54. RW.Part1=Rarm
  55. RW.Parent=Torso
  56. LW.Name="Left Shoulder"
  57. LW.Part0=Torso
  58. LW.C0=cf(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, 0, -0.15)
  59. LW.C1=cf(0, 0.5, 0)
  60. LW.Part1=Larm
  61. LW.Parent=Torso
  62. function swait(num)
  63. if num==0 or num==nil then
  64. game:service'RunService'.Stepped:wait(0)
  65. else
  66. for i=0,num do
  67. game:service'RunService'.Stepped:wait(0)
  68. end
  69. end
  70. end
  71. ----------------------------------------------------
  72. --[[Morphing]]--
  73. for i,v in pairs(Char:children()) do
  74. if v:IsA("Hat") or v:IsA("Pants") or v:IsA("Shirt") or v:IsA("CharacterMesh") then
  75. v:Destroy()
  76. end
  77. end
  78. local H = Instance.new("Hat",Char)
  79. local P = Instance.new("Part",H)
  80. local M = Instance.new("SpecialMesh",P)
  81. M.MeshId = "http://www.roblox.com/asset/?id=346578029"
  82. M.TextureId = "http://www.roblox.com/asset/?id=134207168"
  83. P.Locked = true
  84. H.AttachmentPos = Vector3.new(0, 0, 0)
  85. P.formFactor = 0
  86. P.Size = Vector3.new(2,2,2)
  87. P.Position = Head.Position
  88. local cor = Instance.new("Part", Char.Hat)
  89. cor.Name = "Link"
  90. cor.Locked = true
  91. cor.BottomSurface = 0
  92. cor.CanCollide = false
  93. cor.Size = Vector3.new(1, 9, 1)
  94. cor.Transparency = 1
  95. cor.TopSurface = 0
  96. corw = Instance.new("Weld", cor)
  97. corw.Part0 = Head
  98. corw.Part1 = cor
  99. corw.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  100. corw.C1 = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  101. weld1 = Instance.new("Weld", Char.Hat)
  102. weld1.Part0 = cor
  103. weld1.Part1 = Char.Hat.Part
  104. weld1.C0 = CFrame.new(0, 0.56, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  105. local S = Instance.new("Shirt",Char)
  106. S.ShirtTemplate = "http://www.roblox.com/asset/?id=151958439"
  107. local P = Instance.new("Pants",Char)
  108. P.PantsTemplate = "http://www.roblox.com/asset/?id=119143689"
  109.  
  110. function clerp(a,b,t)
  111. local qa = {QuaternionFromCFrame(a)}
  112. local qb = {QuaternionFromCFrame(b)}
  113. local ax, ay, az = a.x, a.y, a.z
  114. local bx, by, bz = b.x, b.y, b.z
  115. local _t = 1-t
  116. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  117. end
  118.  
  119. function QuaternionFromCFrame(cf)
  120. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  121. local trace = m00 + m11 + m22
  122. if trace > 0 then
  123. local s = math.sqrt(1 + trace)
  124. local recip = 0.5/s
  125. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  126. else
  127. local i = 0
  128. if m11 > m00 then
  129. i = 1
  130. end
  131. if m22 > (i == 0 and m00 or m11) then
  132. i = 2
  133. end
  134. if i == 0 then
  135. local s = math.sqrt(m00-m11-m22+1)
  136. local recip = 0.5/s
  137. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  138. elseif i == 1 then
  139. local s = math.sqrt(m11-m22-m00+1)
  140. local recip = 0.5/s
  141. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  142. elseif i == 2 then
  143. local s = math.sqrt(m22-m00-m11+1)
  144. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  145. end
  146. end
  147. end
  148.  
  149. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  150. local xs, ys, zs = x + x, y + y, z + z
  151. local wx, wy, wz = w*xs, w*ys, w*zs
  152. local xx = x*xs
  153. local xy = x*ys
  154. local xz = x*zs
  155. local yy = y*ys
  156. local yz = y*zs
  157. local zz = z*zs
  158. return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy))
  159. end
  160.  
  161. function QuaternionSlerp(a, b, t)
  162. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  163. local startInterp, finishInterp;
  164. if cosTheta >= 0.0001 then
  165. if (1 - cosTheta) > 0.0001 then
  166. local theta = math.acos(cosTheta)
  167. local invSinTheta = 1/math.sin(theta)
  168. startInterp = math.sin((1-t)*theta)*invSinTheta
  169. finishInterp = math.sin(t*theta)*invSinTheta
  170. else
  171. startInterp = 1-t
  172. finishInterp = t
  173. end
  174. else
  175. if (1+cosTheta) > 0.0001 then
  176. local theta = math.acos(-cosTheta)
  177. local invSinTheta = 1/math.sin(theta)
  178. startInterp = math.sin((t-1)*theta)*invSinTheta
  179. finishInterp = math.sin(t*theta)*invSinTheta
  180. else
  181. startInterp = t-1
  182. finishInterp = t
  183. end
  184. end
  185. return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp
  186. end
  187. ------------------------------------------------------
  188. function Particle(Part)
  189. local P = Instance.new("ParticleEmitter",Part)
  190. C = Color3.new(0,0,0)
  191. P.Color = ColorSequence.new(C,C)
  192. P.Lifetime = NumberRange.new(0.1,0.4)
  193. P.Size = NumberSequence.new(0.5)
  194. P.Speed = NumberRange.new(1)
  195. P.Acceleration = Vector3.new(0,-10,0)
  196. P.Texture = "http://www.roblox.com/asset/?id=341277531"
  197. end
  198. -------------------------
  199. function PT(Part,Time)
  200. local P = Instance.new("ParticleEmitter",Part)
  201. C = Color3.new(0,0,0)
  202. P.Color = ColorSequence.new(C,C)
  203. P.Lifetime = NumberRange.new(0.1,0.4)
  204. P.Size = NumberSequence.new(0.5)
  205. P.Speed = NumberRange.new(1)
  206. P.Acceleration = Vector3.new(0,-10,0)
  207. P.Texture = "http://www.roblox.com/asset/?id=341277531"
  208. game:GetService("Debris"):AddItem(P, Time)
  209. end
  210. function Heal ()
  211. for i,Part in pairs(Char:GetChildren()) do
  212. if Part:IsA("Part") then
  213. Particle(Part)
  214. end
  215. end
  216. Humanoid.Health = Humanoid.MaxHealth
  217. end
  218. function SetupHeal ()
  219. for i,Part in pairs(Char:GetChildren()) do
  220. if Part:IsA("Part") then
  221. Particle(Part)
  222. end
  223. end
  224. Humanoid.MaxHealth = 5000
  225. Humanoid.WalkSpeed = 30
  226. Humanoid.JumpPower = 100
  227. Humanoid.Health = Humanoid.MaxHealth
  228. wait(5)
  229. for i,Part in pairs(Char:GetChildren()) do
  230. if Part:IsA("Part") then
  231. if Part:findFirstChild("ParticleEmitter") then
  232. Part.ParticleEmitter:remove()
  233. end
  234. end
  235. end
  236. end
  237. function Destroy(hit,Damage)
  238. if Damage == nil then Damage = 1 end
  239. if hit and hit.Parent and hit.Parent:IsA("Model") and hit.Parent ~= Player.Character and hit.Parent:findFirstChild("Hit") == nil then
  240. if hit.Parent:findFirstChild("Torso") then
  241. rl=Instance.new("BodyAngularVelocity")
  242. rl.P=3000
  243. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  244. rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  245. rl.Parent=hit
  246. local M = Instance.new("Model",hit.Parent)
  247. M.Name = "Hit"
  248. game:GetService("Debris"):AddItem(rl,.5)
  249. if hit.Parent:findFirstChild("Humanoid") then
  250. hit.Parent.Humanoid.MaxHealth = 100
  251. hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health - Damage
  252. end
  253. for i,Part in pairs(hit.Parent:GetChildren()) do
  254. if Part:IsA("Part") then
  255. Part.BrickColor = BrickColor.new("Black")
  256. PT(Part,2)
  257. end
  258. end
  259. swait()
  260. M:remove()
  261. end
  262. end
  263. end
  264. function BeamHit(hit)
  265. if hit and hit.Parent and hit.Parent:IsA("Model") and hit.Parent ~= Player.Character and hit.Parent:findFirstChild("Hit") == nil then
  266. if hit.Parent:findFirstChild("Torso") then
  267. rl=Instance.new("BodyAngularVelocity")
  268. rl.P=3000
  269. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  270. rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  271. rl.Parent=hit
  272. local M = Instance.new("Model",hit.Parent)
  273. M.Name = "Hit"
  274. game:GetService("Debris"):AddItem(rl,1)
  275. if hit.Parent:findFirstChild("Humanoid") then
  276. hit.Parent.Humanoid.MaxHealth = 100
  277. hit.Parent.Humanoid.PlatformStand = true
  278. hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health - 5
  279. end
  280. for i,Part in pairs(hit.Parent:GetChildren()) do
  281. if Part:IsA("Part") then
  282. PT(Part,2)
  283. end
  284. end
  285. end
  286. end
  287. end
  288. -------------------------
  289. function Blast ()
  290. Attacking = true
  291. for i=0,1,0.1 do
  292. swait()
  293. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(190),math.rad(0),math.rad(0)),.3)
  294. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(190),math.rad(0),math.rad(0)),.3)
  295. end
  296. for i=0,1,0.1 do
  297. swait()
  298. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(190),math.rad(0),math.rad(50)),.5)
  299. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(190),math.rad(0),math.rad(-50)),.5)
  300. end
  301. swait(1)
  302. ypcall(function()
  303. local Ball = Instance.new("Part",Char)
  304. Ball.Shape = 0
  305. Ball.CFrame = Torso.CFrame -- Starting Place
  306. Ball.Transparency = 0.1
  307. Ball.BrickColor = BrickColor.new("Black")
  308. Ball.Reflectance = 0.1
  309. Ball.Material = "Neon"
  310. Ball.Anchored = true
  311. Ball.CanCollide = false
  312. Ball.Size = Vector3.new(3,3,3)
  313. Ball.Locked = true
  314. Ball.Touched:connect(Destroy)
  315. local HB = Instance.new("Part",Char)
  316. HB.Name = "Ball Hitbox"
  317. HB.Transparency = 1
  318. HB.Anchored = true
  319. HB.CanCollide = false
  320. HB.Shape = 0
  321. HB.Size = Vector3.new(6,6,6)
  322. HB.Locked = true
  323. z = Instance.new("Sound",HB)
  324. z.SoundId = "rbxassetid://237035051"
  325. z.Volume = 1
  326. z.Pitch = .9
  327. z:Play()
  328. for i = 0, 260, 8 do
  329. wait()
  330. Ball.Touched:connect(Destroy)
  331. HB.Touched:connect(Destroy)
  332. Ball.CFrame = Ball.CFrame * CFrame.new(0, 0, -4.2 -(i/18)) * CFrame.Angles(0, 0, math.rad(0))-- Make The Ball Go Forward
  333. HB.CFrame = Ball.CFrame
  334. HB.Touched:connect(Destroy)
  335. Ball.Touched:connect(Destroy)
  336. end
  337. swait()
  338. Ball:remove()
  339. z:Stop()
  340. HB:remove()
  341. swait(1)
  342. for i=0,1,0.1 do
  343. swait()
  344. RW.C0=cf(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0.15)
  345. LW.C0=cf(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, 0, -0.15)
  346. end
  347. Attacking = false
  348. end)
  349. end
  350. Mouse.KeyDown:connect(function(key)
  351. keysDown[key] = true
  352. key = key:lower()
  353. if Attacking == false then
  354. if key == "q" then
  355. Blast()
  356. elseif key == "g" then
  357. Puddle()
  358. elseif key == "r" then
  359. Beam()
  360. elseif key == "y" then
  361. NuclearBlast()
  362. end
  363. end
  364. if key == "e" then
  365. ypcall(function()
  366. flyToggled = not flyToggled
  367. if not flyToggled then
  368. floatBP.Parent = nil
  369. flyBV.Parent = nil
  370. turnBG.Parent = nil
  371. Humanoid.PlatformStand = false
  372. end
  373. end)
  374. elseif key == "t" then
  375. Boost()
  376. end
  377. end)
  378. function NuclearBlast()
  379.  
  380. end
  381. -------------------------
  382. function Boost()
  383. Attacking = true
  384. for i=0,1,0.1 do
  385. swait()
  386. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(5,100,100),.3)
  387. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(5,-100,-100),.3)
  388. end
  389. Head.Velocity=Torso.CFrame.lookVector*300
  390. RW.C0=cf(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0.15)
  391. LW.C0=cf(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, 0, -0.15)
  392. Attacking = false
  393. end
  394. function Beam()
  395. Attacking = true
  396. for i=0,1,0.1 do
  397. swait()
  398. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(5,100,-10),.3)
  399. end
  400. swait(2)
  401. for i=0,1,0.1 do
  402. swait()
  403. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(5,250,-10),.3)
  404. end
  405. for i=0,1,0.1 do
  406. swait()
  407. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(5,5,-10),.3)
  408. end
  409. for i=0,1,0.1 do
  410. swait()
  411. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(5,5,10),.3)
  412. end
  413. local P = Instance.new("Part",Torso)
  414. P.Name = "Circle"
  415. P.Size = Vector3.new(0.5,0.5,0.5)
  416. P.Shape = 0
  417. P.TopSurface = "Smooth"
  418. P.BottomSurface = "Smooth"
  419. P.CFrame = Rarm.CFrame
  420. P.CanCollide = false
  421. P.Anchored = true
  422. P.Transparency = 0.4
  423. P.BrickColor = BrickColor.new("Black")
  424. P.Material = "Neon"
  425. for i=1,200 do
  426. P.CFrame = Rarm.CFrame
  427. swait()
  428. P.Size = Vector3.new(P.Size.X + 0.02,P.Size.Y + 0.02,P.Size.Z + 0.02)
  429. end
  430. P.Shape = 1
  431. P.Size = Vector3.new(3.5,3.5,3.5)
  432. P.Touched:connect(Destroy,80)
  433. for i=1,350 do
  434. local ray = Ray.new(Rarm.CFrame.p, (Mouse.Hit.p - Rarm.CFrame.p).unit * 450)
  435. local part, position = workspace:FindPartOnRay(ray, Char, false, true)
  436. local distance = (Rarm.CFrame.p - position).magnitude
  437. P.Size = Vector3.new(P.Size.X, P.Size.Y, distance)
  438. P.Touched:connect(BeamHit)
  439. P.CFrame = CFrame.new(Rarm.CFrame.p, position) * CFrame.new(0, 0, -distance / 2)
  440. P.Touched:connect(BeamHit)
  441. swait()
  442. if part then
  443. if part.Parent then
  444. local humanoid = part.Parent:FindFirstChild("Humanoid")
  445. if not humanoid and part.Parent.Parent then
  446. humanoid = part.Parent.Parent:FindFirstChild("Humanoid")
  447. end
  448. if humanoid then
  449. if humanoid.Parent:findFirstChild("Torso") then
  450. rl=Instance.new("BodyAngularVelocity")
  451. rl.P=3000
  452. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  453. rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  454. rl.Parent = humanoid.Parent.Torso
  455. game:GetService("Debris"):AddItem(rl,.5)
  456. humanoid.MaxHealth = 100
  457. humanoid.Health = humanoid.Health - 5
  458. PT(humanoid.Parent.Torso,0.1)
  459. end
  460. end
  461. end
  462. end
  463. end
  464. for i=1,60 do
  465. P.Transparency = P.Transparency + 0.01
  466. P.Touched:connect(BeamHit)
  467. swait()
  468. end
  469. P:remove()
  470. RW.C0=cf(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0.15)
  471. Attacking = false
  472. end
  473. Mouse.KeyUp:connect(function(key)
  474. keysDown[key] = nil
  475. end)
  476. function Puddle()
  477. Attacking = true
  478. local P = Instance.new("Part",Char)
  479. P.Size = Vector3.new(1,0.1,1)
  480. P.CFrame = CFrame.new(Torso.CFrame.X,Torso.CFrame.Y - 2.7,Torso.CFrame.Z)
  481. P.Anchored = true
  482. P.BrickColor = BrickColor.new("Black")
  483. Instance.new("CylinderMesh",P)
  484. P.Name = "Puddle"
  485. P.CanCollide = false
  486. P.Touched:connect(Destroy)
  487. for i=1,200 do
  488. swait(0.1)
  489. P.CFrame = CFrame.new(Torso.CFrame.X,Torso.CFrame.Y - 2.7,Torso.CFrame.Z)
  490. P.Touched:connect(Destroy)
  491. P.Size = Vector3.new(P.Size.X + 0.1,P.Size.Y,P.Size.Z + 0.1)
  492. P.Touched:connect(Destroy)
  493. P.CFrame = CFrame.new(Torso.CFrame.X,Torso.CFrame.Y - 2.7,Torso.CFrame.Z)
  494. end
  495. Attacking = false
  496. P:Remove()
  497. end
  498. -------------------------
  499. function Click()
  500. Attacking = true
  501. for i=0,1,0.1 do
  502. swait()
  503. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(5,100,50),.2)
  504. end
  505. for i=0,1,0.1 do
  506. swait()
  507. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(5,-100,-550),.2)
  508. end
  509. local ray = Ray.new(Rarm.CFrame.p, (Mouse.Hit.p - Rarm.CFrame.p).unit * 300)
  510. local part, position = workspace:FindPartOnRay(ray, Char, false, true)
  511. local beam = Instance.new("Part", workspace)
  512. beam.BrickColor = BrickColor.new("Really black")
  513. beam.FormFactor = "Custom"
  514. beam.Material = "Neon"
  515. beam.Touched:connect(Destroy)
  516. beam.Transparency = 0.25
  517. beam.Anchored = true
  518. beam.Locked = true
  519. beam.CanCollide = false
  520. z = Instance.new("Sound",beam)
  521. z.SoundId = "rbxassetid://169380525"
  522. z.Pitch = 1.3
  523. z.Volume = 1
  524. local distance = (Rarm.CFrame.p - position).magnitude
  525. beam.Size = Vector3.new(0.3, 0.3, distance)
  526. beam.Touched:connect(Destroy)
  527. beam.CFrame = CFrame.new(Rarm.CFrame.p, position) * CFrame.new(0, 0, -distance / 2)
  528. beam.Touched:connect(Destroy)
  529. game:GetService("Debris"):AddItem(beam, 0.2)
  530. if part then
  531. local humanoid = part.Parent:FindFirstChild("Humanoid")
  532. if not humanoid then
  533. humanoid = part.Parent.Parent:FindFirstChild("Humanoid")
  534. end
  535. if humanoid then
  536. if humanoid.Parent:findFirstChild("Torso") then
  537. rl=Instance.new("BodyAngularVelocity")
  538. rl.P=3000
  539. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  540. rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  541. rl.Parent = humanoid.Parent.Torso
  542. game:GetService("Debris"):AddItem(rl,.5)
  543. humanoid.MaxHealth = 100
  544. humanoid.Health = humanoid.Health - 80
  545. end
  546. end
  547. end
  548. beam.Touched:connect(Destroy)
  549. z:Play()
  550. Attacking = false
  551. end
  552. -------------------------
  553. function Click2()
  554. Attacking = true
  555. for i=0,1,0.1 do
  556. swait()
  557. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(5,100,50),.2)
  558. end
  559. for i=0,1,0.1 do
  560. swait()
  561. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(5,-100,-550),.2)
  562. end
  563. local ray = Ray.new(Larm.CFrame.p, (Mouse.Hit.p - Larm.CFrame.p).unit * 300)
  564. local part, position = workspace:FindPartOnRay(ray, Char, false, true)
  565. local beam = Instance.new("Part", workspace)
  566. beam.BrickColor = BrickColor.new("Really black")
  567. beam.FormFactor = "Custom"
  568. beam.Material = "Neon"
  569. beam.Transparency = 0.25
  570. beam.Anchored = true
  571. beam.Locked = true
  572. z = Instance.new("Sound",beam)
  573. z.SoundId = "rbxassetid://169380525"
  574. z.Pitch = 1.3
  575. z.Volume = 1
  576. beam.CanCollide = false
  577. local distance = (Larm.CFrame.p - position).magnitude
  578. beam.Touched:connect(Destroy)
  579. beam.Size = Vector3.new(0.3, 0.3, distance)
  580. beam.CFrame = CFrame.new(Larm.CFrame.p, position) * CFrame.new(0, 0, -distance / 2)
  581. beam.Touched:connect(Destroy)
  582. game:GetService("Debris"):AddItem(beam, 0.2)
  583. if part then
  584. local humanoid = part.Parent:FindFirstChild("Humanoid")
  585. if not humanoid then
  586. humanoid = part.Parent.Parent:FindFirstChild("Humanoid")
  587. end
  588. if humanoid then
  589. if humanoid.Parent:findFirstChild("Torso") then
  590. rl=Instance.new("BodyAngularVelocity")
  591. rl.P=3000
  592. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  593. rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  594. rl.Parent = humanoid.Parent.Torso
  595. game:GetService("Debris"):AddItem(rl,.5)
  596. humanoid.MaxHealth = 100
  597. humanoid.Health = humanoid.Health - 80
  598. end
  599. end
  600. end
  601. beam.Touched:connect(Destroy)
  602. z:Play()
  603. Attacking = false
  604. end
  605. Mouse.Button1Down:connect(function()
  606. if Attacking == false then
  607. Click2()
  608. end
  609. end)
  610. -------------------------
  611. local function updateFly()
  612. ypcall(function()
  613. if not flyToggled then return end
  614.  
  615. lastForward = forward
  616. lastSide = side
  617.  
  618. forward = 0
  619. side = 0
  620.  
  621. if keysDown.w then
  622. forward = forward + 1
  623. end
  624. if keysDown.s then
  625. forward = forward - 1
  626. end
  627. if keysDown.a then
  628. side = side - 1
  629. end
  630. if keysDown.d then
  631. side = side + 1
  632. end
  633.  
  634. canFly = (forward ~= 0 or side ~= 0)
  635.  
  636. if canFly then
  637. stanceToggle = "Floating"
  638. turnBG.Parent = root
  639. floatBP.Parent = nil
  640. flyBV.Parent = root
  641.  
  642. flySpeed = flySpeed + 1 + (flySpeed / MAX_FLY_SPEED)
  643. if flySpeed > MAX_FLY_SPEED then flySpeed = MAX_FLY_SPEED end
  644. else
  645. floatBP.position = root.Position
  646. floatBP.Parent = root
  647.  
  648. flySpeed = flySpeed - 1
  649. if flySpeed < 0 then flySpeed = 0 end
  650. end
  651.  
  652. local camCF = cam.CoordinateFrame
  653. local in_forward = canFly and forward or lastForward
  654. local in_side = canFly and side or lastSide
  655.  
  656. flyBV.velocity = ((camCF.lookVector * in_forward) + (camCF * CFrame.new(in_side,
  657. in_forward * 0.2, 0).p) - camCF.p) * flySpeed
  658.  
  659. turnBG.cframe = camCF * CFrame.Angles(-rad(forward * (flySpeed / MAX_FLY_SPEED)), 0,
  660. 0)
  661. end)
  662. end
  663. -------------------------
  664. Mouse.Button2Down:connect(function()
  665. if Attacking == false then
  666. Click()
  667. end
  668. end)
  669. game:GetService("RunService").RenderStepped:connect(function()
  670. if Humanoid.Health ~= Humanoid.MaxHealth and HealLimit > 0 then
  671. HealLimit = HealLimit - 1
  672. Heal()
  673. wait(2)
  674. for i,Part in pairs(Char:GetChildren()) do
  675. if Part:IsA("Part") then
  676. if Part:findFirstChild("ParticleEmitter") then
  677. Part.ParticleEmitter:remove()
  678. end
  679. end
  680. end
  681. end
  682. if flyToggled then
  683. Humanoid.PlatformStand = true
  684. end
  685. updateFly()
  686. if Sound.IsPlaying == false and Music == true then
  687. Soundid = SoundIds[math.random(1,#SoundIds)]
  688. Sound.SoundId = "http://www.roblox.com/asset/?id="..Soundid
  689. Sound:Play()
  690. end
  691. end)
  692. SetupHeal()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement