Advertisement
SandSandoval

Untitled

Jul 10th, 2016
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --Made by LuisPambid[L]--
  2. --Storm Spirit[Dota 2 Idea ;o]--
  3. --Player Settings
  4. local modelName="sandoval12" --Name here
  5. repeat wait() until game.Players.LocalPlayer and game.Players.LocalPlayer.Character
  6. local player=game.Players.LocalPlayer
  7. local char=player.Character
  8.  
  9. --CharacterParts
  10. local humanoid=char.Humanoid
  11. local head=char.Head
  12. local torso=char.Torso
  13. local LA=char:findFirstChild("Left Arm")
  14. local RA=char:findFirstChild("Right Arm")
  15. local LL=char:findFirstChild("Left Leg")
  16. local RL=char:findFirstChild("Right Leg")
  17.  
  18. --Joints
  19. local LS=torso:findFirstChild("Left Shoulder")
  20. local RS=torso:findFirstChild("Right Shoulder")
  21. local LH=torso:findFirstChild("Left Hip")
  22. local RH=torso:findFirstChild("Right Hip")
  23. LS.Part0=torso RS.Part0=torso LH.Part0=torso RH.Part0=torso
  24.  
  25. --Local Functions
  26. local s=function(f) Spawn(f) end
  27. local c=function(f) coroutine.resume(coroutine.create(f)) end
  28. pcall(function() player.Backpack[modelName]:remove() end)
  29. pcall(function() char["CharacterParts"]:remove() end)
  30. pcall(function() char[modelName]:remove() end)
  31. pcall(function() player.PlayerGui[modelName]:remove() end)
  32. pcall(function() for i, v in pairs(char:children()) do if v:isA("BasePart") then v.Transparency=0 end end end)
  33. --Settings
  34. local model=Instance.new("Model", char) model.Name="CharacterParts"
  35. local model2=Instance.new("Model", char) model2.Name=modelName
  36. local bin=Instance.new("HopperBin", player.Backpack) bin.Name=modelName
  37. local gui=Instance.new("ScreenGui") gui.Name=modelName
  38. local skincolor="Really black"
  39. local body={}
  40. local animate={}
  41. local obj={}
  42. local onTrail=false
  43. local onKey=false
  44. local onHit=false
  45. local onBlock=false
  46. local onHold=false
  47. local onClick=false
  48. local onClick2=false
  49. local onAttack=false
  50. local onCast=false
  51. local cast=0
  52. local colorSet={
  53. Handle="Dark orange";
  54. Blade="Mid gray";
  55. Extra="Bright blue";
  56. }
  57. local combo=0
  58. local dmg=math.random(5, 10)
  59. local m
  60.  
  61. local add={
  62. Part=function(par, a, c, col, t, s, cf, ms)
  63. local p=Instance.new("Part", par) pcall(function() p.TopSurface="Smooth" p.BottomSurface="Smooth" p.formFactor="Custom" p.Anchored=a p.CanCollide=c p.BrickColor=BrickColor.new(col) p.Transparency=t p.Size=s p.CFrame=cf or CFrame.new() end)
  64. local m=Instance.new("BlockMesh", p) pcall(function() m.Scale=ms or Vector3.new(1, 1, 1) end)
  65. return p
  66. end;
  67. Wedge=function(par, a, c, col, t, s, cf, ms)
  68. local p=Instance.new("WedgePart", par) pcall(function() p.TopSurface="Smooth" p.BottomSurface="Smooth" p.formFactor="Custom" p.Anchored=a p.CanCollide=c p.BrickColor=BrickColor.new(col) p.Transparency=t p.Size=s p.CFrame=cf or CFrame.new() end)
  69. local m=Instance.new("SpecialMesh", p) pcall(function() m.Scale=ms or Vector3.new(1, 1, 1) m.MeshType="Wedge" end)
  70. return p
  71. end;
  72. Gui=function(ins, par, bc, bg, tc, fs, text, t, s, pos)
  73. local g=Instance.new(ins, par) pcall(function() g.BorderColor=BrickColor.new(bc) g.BackgroundColor=BrickColor.new(bg) g.TextColor=BrickColor.new(tc) g.FontSize=fs g.Font="ArialBold" g.Text=text g.BackgroundTransparency=t g.Size=s g.Position=pos end)
  74. return g
  75. end;
  76. Weld=function(par, p1, cf)
  77. local w=Instance.new("Weld", par) pcall(function() w.Part0=w.Parent or par w.Part1=p1 w.C1=cf or CFrame.new() end)
  78. return w
  79. end;
  80. Mesh=function(ins, par, s, of, t, id, tid)
  81. local m=Instance.new(ins, par) pcall(function() m.Scale=s or Vector3.new(1, 1, 1) m.Offset=of or Vector3.new() m.MeshId=id or "" m.TextureId=tid or "" m.MeshType=t end)
  82. return m
  83. end;
  84. Sound=function(parent, id, pitch, volume)
  85. local s=Instance.new("Sound", parent) pcall(function() s.SoundId=id s.Volume=volume s.Pitch=pitch end)
  86. return s
  87. end;
  88. }
  89.  
  90. --Sounds
  91. local Sounds={
  92. Slash="rbxasset://sounds//swordslash.wav";
  93. Hit="http://www.roblox.com/asset/?id=11113679 ";
  94. Equip="rbxasset://sounds/unsheath.wav";
  95. Charge="http://www.roblox.com/asset/?id=2101137";
  96. ElectricShortage="http://roblox.com/asset/?id=10209481";
  97. Elec="http://www.roblox.com/asset/?id=2800815";
  98. ElectricSound="http://www.roblox.com/asset/?id=10756118";
  99. Abscond="http://www.roblox.com/asset/?id=2767090";
  100. }
  101.  
  102. --Decals
  103. local Decals={
  104. SlashDecal="http://www.roblox.com/asset/?id=25539335";
  105. }
  106.  
  107. --MeshIds
  108. local Meshes={
  109. Charge="http://www.roblox.com/asset/?id=20329976";
  110. Noob="http://www.roblox.com/asset/?id=29515710";
  111. Ring="http://www.roblox.com/asset/?id=3270017";
  112. Crown="http://www.roblox.com/asset/?id=1323306";
  113. }
  114.  
  115. ------------------------CreateParts------------------------
  116. body.Torso=add.Part(model2, false, false, skincolor, 1, Vector3.new(2, 2, 1), nil)
  117. body.TorsoW=add.Weld(body.Torso, torso, nil)
  118. function createParts()
  119. for i, v in pairs(char:children()) do if v:isA("CharacterMesh") then v:remove() end end
  120. torso.Transparency=1 body.Torso.Transparency=0
  121. --Parts--
  122. gui.Parent=player.PlayerGui
  123. body.Head=add.Part(model, false, false, skincolor, 1, Vector3.new(1, 1, 1), nil)
  124. body.LA, body.RA=add.Part(model, false, false, skincolor, 1, Vector3.new(1, 1, 1), nil), add.Part(model, false, false, skincolor, 1, Vector3.new(1, 1, 1), nil)
  125. body.LL, body.RL=add.Part(model, false, false, skincolor, 1, Vector3.new(1, 1, 1), nil), add.Part(model, false, false, skincolor, 1, Vector3.new(1, 1, 1), nil)
  126.  
  127. --Welds--
  128. body.HeadW=add.Weld(body.Head, body.Torso, CFrame.new(0, 1.5, 0))
  129. body.LAW, body.RAW=add.Weld(body.LA, body.Torso, CFrame.new(-1.5, .5, 0)), add.Weld(body.RA, body.Torso, CFrame.new(1.5, .5, 0))
  130. body.LLW, body.RLW=add.Weld(body.LL, body.Torso, CFrame.new(-.5, -1.5, 0)), add.Weld(body.RL, body.Torso, CFrame.new(.5, -1.5, 0))
  131.  
  132. --Welds2--
  133. add.Weld(body.Head, head, nil)
  134. add.Weld(LA, body.LA, CFrame.new(0, -.5, 0))
  135. add.Weld(RA, body.RA, CFrame.new(0, -.5, 0))
  136. LH.Part0=body.Torso
  137. RH.Part0=body.Torso
  138.  
  139. --Sign--
  140. body.Part=add.Part(model, false, false, "White", 0, Vector3.new(.2, 1, .2))
  141. add.Weld(body.Part, body.Torso, CFrame.new(.25, 0, -.45))
  142. body.Part=add.Part(model, false, false, "White", 0, Vector3.new(.7, .2, .2))
  143. add.Weld(body.Part, body.Torso, CFrame.new(0, -.5, -.45))
  144.  
  145. --Animation--
  146. animate={
  147. ["Head"]=function(cf)
  148. body.HeadW.C1=CFrame.new(0, 1.5, 0)*cf
  149. end;
  150. ["Torso"]=function(cf)
  151. body.TorsoW.C1=(cf or CFrame.new()*CFrame.Angles(0, 0, 0))
  152. end;
  153. ["LA"]=function(cf)
  154. body.LAW.C1=CFrame.new(-1.5, .5, 0)*(cf or CFrame.new()*CFrame.Angles(0, 0, 0))
  155. end;
  156. ["RA"]=function(cf)
  157. body.RAW.C1=CFrame.new(1.5, .5, 0)*(cf or CFrame.new()*CFrame.Angles(0, 0, 0))
  158. end;
  159. ["LL"]=function(cf)
  160. LLW=add.Weld(LL, body.LL, CFrame.new(0, -1, 0))
  161. body.LLW.C1=CFrame.new(-.5, -1, 0)*(cf or CFrame.new()*CFrame.Angles(0, 0, 0))
  162. c(function()
  163. wait()
  164. LLW:remove()
  165. end)
  166. end;
  167. ["RL"]=function(cf)
  168. RLW=add.Weld(RL, body.RL, CFrame.new(0, -1, 0))
  169. body.RLW.C1=CFrame.new(.5, -1, 0)*(cf or CFrame.new()*CFrame.Angles(0, 0, 0))
  170. c(function()
  171. wait()
  172. RLW:remove()
  173. end)
  174. end;
  175. }
  176. --GuiLabels--
  177. obj.AL=add.Gui("TextLabel", gui, "Really black", "Really black", "White", "Size18", "Attack(ClickPLAYER)", 0, UDim2.new(0, 150, 0, 50), UDim2.new(0, 0, 0, 150))
  178. obj.AL2=add.Gui("TextLabel", obj.AL, "Really black", "Really black", "White", "Size18", "StaticRemnant(Z)", 0, UDim2.new(1, 0, 1, 0), UDim2.new(0, 0, 1, 0))
  179. obj.AL3=add.Gui("TextLabel", obj.AL2, "Really black", "Really black", "White", "Size18", "ElectricVortex(X)", 0, UDim2.new(1, 0, 1, 0), UDim2.new(0, 0, 1, 0))
  180. obj.AL4=add.Gui("TextLabel", obj.AL3, "Really black", "Really black", "White", "Size18", "BallLightning(C)", 0, UDim2.new(1, 0, 1, 0), UDim2.new(0, 0, 1, 0))
  181. --WeaponDesgin--
  182. for i, v in pairs(model2:children()) do
  183. if i~=1 then return end
  184. end
  185. end
  186.  
  187. ------------------------Functions------------------------
  188. function removeParts()
  189. pcall(function()
  190. if torso then
  191. LS.Part0=torso
  192. RS.Part0=torso LH.Part0=torso
  193. RH.Part0=torso
  194. torso.Transparency=0
  195. body.Torso.Transparency=1
  196. end
  197. player.PlayerGui[modelName]:remove()
  198. for i, v in pairs(model:children()) do
  199. v:remove()
  200. end
  201. end)
  202. end
  203. function play(soundid, pitch, vol)
  204. local sound=add.Sound(workspace, soundid, pitch or 1, volume or 1)
  205. sound:play()
  206. s(function() wait(5) sound:remove() end)
  207. end
  208. function fade(part, incr)
  209. if part:isA("BasePart") then
  210. for i=part.Transparency, 1, incr do wait() part.Transparency=i end
  211. elseif part:isA("Model") then
  212. for i, v in pairs(part:children() or part) do
  213. if v:isA("BasePart") then
  214. for i=part.Transparency, 1, incr do wait() v.Transparency=i end
  215. end
  216. end
  217. end
  218. end
  219. function appear(part, incr)
  220. if part:isA("BasePart") then
  221. for i=part.Transparency, 0, -incr do wait() part.Transparency=i end
  222. elseif part:isA("Model") then
  223. for i, v in pairs(part:children() or part) do
  224. if v:isA("BasePart") then
  225. for i=part.Transparency, 0, -incr do wait() v.Transparency=i end
  226. end
  227. end
  228. end
  229. end
  230. function computePos(pos, pos2)
  231. local pos3=Vector3.new(pos2.x, pos.y, pos2.z)
  232. return CFrame.new(pos, pos3)
  233. end
  234. function rayCast(pos, dir, max, ingore)
  235. return workspace:findPartOnRay(Ray.new(pos, dir.unit*(max or 9999)), ignore)
  236. end
  237. function nearPos(pos, dis)
  238. local temp
  239. local distance=dis
  240. for i, v in pairs(workspace:children()) do
  241. if v:isA("Model") then
  242. temp=v:findFirstChild("Torso")
  243. local humanoid=v:findFirstChild("Humanoid")
  244. if temp and humanoid and v~=char and (temp.CFrame.p-pos).magnitude<distance then
  245. distance=(temp.CFrame.p-pos).magnitude
  246. return temp.Parent
  247. end
  248. end
  249. end
  250. end
  251. function lightningGen(startPos, endPos, col)
  252. local magnitude=(startPos-endPos).magnitude
  253. local distance=(startPos+endPos)/2
  254. local pattern=add.Part(workspace, true, false, "White", 1, Vector3.new(.2, .2, magnitude), CFrame.new(distance, startPos))
  255. local startPosProx=startPos
  256. for i=1, 9 do
  257. local startPosProx2=startPosProx local random=Vector3.new(math.random(-1, 1), math.random(-1, 1), math.random(-1, 1))
  258. local findSize=pattern.Size.z/10 local findOffSet=pattern.CFrame.lookVector*-1
  259. local compute=i*findSize*findOffSet local newStartPos=startPos
  260. local newEndPos=CFrame.new(random+compute+newStartPos).p
  261. local magnitude=(startPosProx2-newEndPos).magnitude
  262. local distance=(startPosProx2+newEndPos)/2
  263. local lightning=add.Part(workspace, true, false, col or "Bright yellow", 0, Vector3.new(.2, .2, magnitude), CFrame.new(distance, startPosProx2))
  264. s(function()
  265. fade(lightning, .1) lightning:remove()
  266. end)
  267. startPosProx=newEndPos
  268. end
  269. pattern:remove()
  270. end
  271. function trail(pos, cf, col, thick)
  272. onTrail=true
  273. s(function()
  274. local old=(pos.CFrame*(cf or CFrame.new())).p
  275. while onTrail do wait()
  276. local new=(pos.CFrame*(cf or CFrame.new())).p
  277. local mag=(old-new).magnitude
  278. local dis=(old+new)/2 local trail=add.Part(char, true, false, col or "White", 0, Vector3.new(1, mag, 1), CFrame.new(dis, new)*CFrame.Angles(math.pi/2, 0, 0))
  279. trail.Name="Effect" local tMesh=add.Mesh("CylinderMesh", trail, Vector3.new(thick or 1, 1, thick or 1), nil, nil)
  280. old=new
  281. s(function()
  282. for i=1, 0, -.1 do wait() tMesh.Scale=tMesh.Scale*Vector3.new(i, 1, i) end trail:remove()
  283. end)
  284. s(function()
  285. fade(trail, .1)
  286. end)
  287. end
  288. end)
  289. end
  290. function stickHit(from, to)
  291. local stickW=add.Weld(from, to, to.CFrame:inverse()*from.CFrame)
  292. stickW.C0=from.CFrame:inverse()*from.CFrame
  293. return stickW
  294. end
  295. function glowMesh(prt, size, speed)
  296. local glow=prt:clone() add.Weld(prt, glow)
  297. glow.Parent=workspace
  298. glow.Anchored=false
  299. glow.CanCollide=false
  300. for i, v in pairs(glow:children()) do
  301. if v:isA("SpecialMesh") or v:isA("BlockMesh") or v:isA("CylinderMesh") then
  302. s(function()
  303. for i=0, size, speed do wait() v.Scale=v.Scale+Vector3.new(i, i, i) end
  304. end)
  305. s(function()
  306. fade(glow, .1) glow:remove()
  307. end)
  308. end
  309. end
  310. end
  311. function charge(prt, cf, col, start, endval, incr)
  312. local aura=add.Part(workspace, false, false, col or "Bright yellow", 0, Vector3.new(1, 1, 1), cf or torso.CFrame)
  313. local auraM=add.Mesh("SpecialMesh", aura, Vector3.new(start, .5, start), nil, "File") auraM.MeshId=Meshes.Charge
  314. add.Weld(aura, prt or torso, cf*CFrame.Angles(0, math.rad(math.random(-45, 45)), 0))
  315. s(function()
  316. for i=start, endval, incr do wait()
  317. auraM.Scale=Vector3.new(i, auraM.Scale.y, i)
  318. end
  319. aura:remove()
  320. end)
  321. s(function()
  322. fade(aura, .1)
  323. end)
  324. end
  325. function makeCircle(prt, prts, dis, incr)
  326. local radius=dis+(prts+incr)
  327. for i=1, prts do
  328. local prt2=prt:clone()
  329. prt2.Parent=model
  330. local x = math.sin((360/prts + 360/prts*i)/(180/math.pi))*radius
  331. local y = 0
  332. local z = math.cos((360/prts + 360/prts*i)/(180/math.pi))*radius
  333. prt2.CFrame=prt.CFrame:toWorldSpace(CFrame.new(x,y,z))
  334. prt:remove()
  335. return prt2
  336. end
  337. end
  338. function antiExplosion(model)
  339. local ffs={}
  340. for i, v in pairs(model:children()) do
  341. pcall(function()
  342. local ff2=Instance.new("ForceField", v.Handle)
  343. table.insert(ffs, ff2) end)
  344. if v:isA("BasePart") then
  345. local ff=Instance.new("ForceField", v)
  346. table.insert(ffs, ff)
  347. end
  348. end
  349. return ffs
  350. end
  351. function dmgHit(prt)
  352. prt.Touched:connect(function(h)
  353. if onKey==true and h.Parent:findFirstChild("Humanoid") and onHit==false and h.Parent~=char then
  354. onHit=true print("dmg")
  355. local fakeM=Instance.new("Model", workspace)
  356. fakeM.Name=-dmg
  357. local hHuman=h.Parent:findFirstChild("Humanoid")
  358. hHuman.Health=hHuman.Health-dmg
  359. local hTorso=h.Parent:findFirstChild("Torso")
  360. local fakeH=Instance.new("Humanoid", fakeM) fakeH.MaxHealth=0 fakeH.Health=0
  361. local label=add.Part(fakeM, true, false, "Bright red", 0, Vector3.new(.5, .5, .5), h.CFrame*CFrame.new(math.random(-4, 4), 4, math.random(-4, 4))) label.Name="Head"
  362. game.Debris:addItem(fakeM, 1)
  363. wait(.1)
  364. onHit=false
  365. end
  366. end)
  367. end
  368. function blockHit(prt)
  369. prt.Touched:connect(function(h)
  370. if onBlock==true and onKey==true and not h.Parent:findFirstChild("Humanoid") and onHit==false and h.Parent~=char then
  371. onHit=true
  372. play(Sounds.Hit, 1, 1)
  373. print'Blocked'
  374. local bp=Instance.new("BodyPosition", h) bp.maxForce=Vector3.new(math.huge, math.huge, math.huge) bp.position=(CFrame.new(torso.CFrame.p, h.CFrame.p)*CFrame.new(0, 0, -math.random(100, 200))).p
  375. local bg=Instance.new("BodyGyro", h) bg.maxTorque=Vector3.new(math.huge, math.huge, math.huge) bg.cframe=CFrame.new(h.CFrame.p, torso.CFrame.p)
  376. game.Debris:addItem(bp, .2) game.Debris:addItem(bg, .2)
  377. wait(.1)
  378. onHit=false
  379. end
  380. end)
  381. end
  382. function idle()
  383. animate.LA(CFrame.Angles(0, 0, -math.rad(15)))
  384. animate.RA(CFrame.Angles(0, 0, math.rad(15)))
  385. end
  386. function StaticRemnant()
  387. casted()
  388. play(Sounds.ElectricShortage, 1, 1)
  389. play(Sounds.Abscond, 1, 1)
  390. local trans=.5
  391. local color="Bright blue"
  392. local rem=add.Part(workspace, true, false, color, .25, Vector3.new(4, 4, 4), torso.CFrame*CFrame.new(0, -.2, 0))
  393. local remM=add.Mesh("SpecialMesh", rem, Vector3.new(7, 7, 7), nil, nil, Meshes.Noob)
  394. s(function()
  395. while wait() do
  396. for i=.25, .5, .01 do wait()
  397. rem.Transparency=i
  398. remM.Scale=remM.Scale+Vector3.new(i*.05, i*.05, i*.05)
  399. end
  400. for i=.5, .25, -.01 do wait()
  401. rem.Transparency=i
  402. remM.Scale=remM.Scale-Vector3.new(i*.05, i*.05, i*.05)
  403. end
  404. end
  405. end)
  406. rem.Touched:connect(function(h)
  407. if h.Parent:findFirstChild("Humanoid") and onHit==false and h.Parent~=char then
  408. onHit=true
  409. play(Sounds.ElectricSound, 1, 1)
  410. local blast=add.Part(workspace, true, false, color, .25, Vector3.new(4, 4, 1), rem.CFrame*CFrame.new(0, -3, 0)*CFrame.Angles(math.rad(90), 0, 0))
  411. local blastM=add.Mesh("SpecialMesh", blast, blast.Size, nil, nil, Meshes.Ring)
  412. local blast2=add.Part(workspace, true, false, color, .25, Vector3.new(4, 1, 4), rem.CFrame*CFrame.new(0, -3, 0))
  413. local blast2M=add.Mesh("SpecialMesh", blast2, blast.Size, nil, nil, Meshes.Charge)
  414. s(function()
  415. for i=blast.Size.x, 12, 1 do wait()
  416. blastM.Scale=Vector3.new(i, i, i)
  417. blast2M.Scale=Vector3.new(i, i*.2, i)
  418. end
  419. blast:remove()
  420. blast2:remove()
  421. end)
  422. rem:remove()
  423. local fakeM=Instance.new("Model", workspace)
  424. fakeM.Name=-20
  425. local hHuman=h.Parent:findFirstChild("Humanoid")
  426. hHuman.Health=hHuman.Health-20
  427. local hTorso=h.Parent:findFirstChild("Torso")
  428. local fakeH=Instance.new("Humanoid", fakeM) fakeH.MaxHealth=0 fakeH.Health=0
  429. local label=add.Part(fakeM, true, false, "Bright red", 0, Vector3.new(.5, .5, .5), h.CFrame*CFrame.new(math.random(-4, 4), 4, math.random(-4, 4))) label.Name="Head"
  430. game.Debris:addItem(fakeM, 1)
  431. wait(.1)
  432. onHit=false
  433. end
  434. end)
  435. game.Debris:addItem(rem, 12)
  436. wait(2)
  437. end
  438. function ElectricVortex(target)
  439. casted()
  440. onClick=false
  441. humanoid.WalkSpeed=8
  442. for i=0, 1, .2 do wait()
  443. animate.Torso(CFrame.Angles(0, -math.rad(45)*i, 0))
  444. animate.RA(CFrame.Angles(0, 0, math.rad(135)*i))
  445. end
  446. for i=0, 1, .2 do wait()
  447. animate.Torso(CFrame.Angles(0, -math.rad(45-90*i), 0))
  448. animate.RA(CFrame.Angles(-math.rad(45)*i, 0, math.rad(135)))
  449. end
  450. for i=1, 0, -.2 do wait()
  451. animate.Torso(CFrame.Angles(0, math.rad(45)*i, 0))
  452. animate.RA(CFrame.Angles(-math.rad(45)*i, 0, math.rad(135)*i))
  453. end
  454. idle()
  455. local start=add.Part(model, true, false, "Bright blue", .2, Vector3.new(1.5, 1.5, 1.5), torso.CFrame)
  456. local startM=add.Mesh("SpecialMesh", start, nil, nil, "Sphere")
  457. local bg=Instance.new("BodyGyro", target) bg.maxTorque=Vector3.new(math.huge, math.huge, math.huge) bg.D=100
  458. local bv=Instance.new("BodyVelocity", target) bv.maxForce=Vector3.new(math.huge, math.huge, math.huge)
  459. for i=0, 1, .01 do wait()
  460. bv.velocity=target.CFrame.lookVector*10
  461. bg.cframe=CFrame.new(target.CFrame.p, start.CFrame.p)
  462. local mag=(start.CFrame.p-target.CFrame.p).magnitude
  463. local dis=(start.CFrame.p+target.CFrame.p)/2
  464. local con=add.Part(workspace, true, false, "Bright blue", .2, Vector3.new(1, mag, 1), CFrame.new(dis, start.CFrame.p)*CFrame.Angles(math.rad(90), 0, 0))
  465. local conM=add.Mesh("CylinderMesh", con)
  466. s(function()
  467. for i=.2, 1, .1 do wait() con.Transparency=i end con:remove()
  468. end)
  469. play(Sounds.Electric, 1, 1)
  470. play(Sounds.ElectricSound, 1, 1)
  471. end
  472. loop=false
  473. bg:remove()
  474. bv:remove()
  475. start:remove()
  476. humanoid.WalkSpeed=16
  477. end
  478. function BallLightning()
  479. casted()
  480. humanoid.WalkSpeed=0
  481. onKey=true
  482. play(Sounds.Electric, 1, 1)
  483. play(Sounds.ElectricSound, 1, 1)
  484. for i=0, 1, .2 do wait()
  485. animate.Torso(CFrame.Angles(-math.rad(90)*i, 0, 0))
  486. end
  487. torso.CFrame=computePos(torso.CFrame.p, m.Hit.p)
  488. local ball=add.Part(workspace, false, false, "Cyan", 0, Vector3.new(7, 7, 7), torso.CFrame)
  489. for i, v in pairs(char:children()) do if v.ClassName=="Part" then dmgHit(v) end end
  490. dmgHit(ball)
  491. local ballM=add.Mesh("SpecialMesh", ball, nil, nil, "Sphere")
  492. local ballW=add.Weld(ball, torso)
  493. local bp=Instance.new("BodyPosition", torso) bp.maxForce=bp.maxForce*math.huge bp.D=bp.D*1.5
  494. trail(ball, CFrame.new(), "Cyan", ball.Size.x)
  495. local pos=m.Hit.p
  496. dmg=(torso.CFrame.p-m.Hit.p).magnitude/2
  497. bp.position=Vector3.new(pos.x, pos.y, pos.z)
  498. wait(.4)
  499. for i=1, 0, -.2 do wait()
  500. animate.Torso(CFrame.Angles(-math.rad(90)*i, 0, 0))
  501. end
  502. bp:remove()
  503. ball:remove()
  504. onKey=false
  505. onTrail=false
  506. dmg=math.random(5, 10)
  507. humanoid.WalkSpeed=16
  508. idle()
  509. end
  510. function findClick()
  511. if onClick then
  512. local dis=nearPos(torso.CFrame.p, 25)
  513. local tgt=m.Target
  514. if tgt and dis then
  515. if tgt.Parent:findFirstChild("Humanoid") then
  516. m.Icon=""
  517. ElectricVortex(tgt.Parent:findFirstChild("Torso"))
  518. end
  519. end
  520. end
  521. if onClick2 then
  522. onClick2=false
  523. m.Icon=""
  524. BallLightning()
  525. end
  526. end
  527. function Attack()
  528. if not onAttack then
  529. onAttack=true
  530. play(Sounds.Electric, 1, 1)
  531. play(Sounds.ElectricSound, 1, 1)
  532. for i=0, 1, .2 do wait()
  533. animate.Torso(CFrame.Angles(0, -math.rad(45)*i, 0))
  534. animate.RA(CFrame.Angles(0, 0, math.rad(135)*i))
  535. end
  536. for i=0, 1, .2 do wait()
  537. animate.Torso(CFrame.Angles(0, -math.rad(45-90*i), 0))
  538. animate.RA(CFrame.Angles(-math.rad(45)*i, 0, math.rad(135)))
  539. end
  540. for i=1, 0, -.2 do wait()
  541. animate.Torso(CFrame.Angles(0, math.rad(45)*i, 0))
  542. animate.RA(CFrame.Angles(-math.rad(45)*i, 0, math.rad(135)*i))
  543. end
  544. local bolt=add.Part(workspace, false, false, "Cyan", 0, Vector3.new(.2, .2, 1.5), CFrame.new(body.RA.CFrame.p, m.Hit.p))
  545. local bf=Instance.new("BodyForce", bolt) bf.force=Vector3.new(0, bolt:getMass()*196.25, 0)
  546. local bv=Instance.new("BodyVelocity", bolt) bv.maxForce=bv.maxForce*math.huge bv.velocity=bolt.CFrame.lookVector*100
  547. idle()
  548. game.Debris:addItem(bolt, 5)
  549. bolt.Touched:connect(function(h)
  550. if not onCast and h.Parent:findFirstChild("Humanoid") and onHit==false and h.Parent~=char then
  551. onHit=true print("dmg")
  552. dmg=math.random(5, 10)
  553. local blast=add.Part(workspace, true, false, "Bright blue", .25, Vector3.new(2, .5, 2), CFrame.new(h.CFrame.p, torso.CFrame.p)*CFrame.Angles(-math.rad(90), 0, 0))
  554. local blastM=add.Mesh("SpecialMesh", blast, blast.Size, nil, nil, Meshes.Charge)
  555. game.Debris:addItem(blast, 1)
  556. bolt:remove()
  557. local effect
  558. local fakeM=Instance.new("Model", workspace)
  559. fakeM.Name=-dmg
  560. local hHuman=h.Parent:findFirstChild("Humanoid")
  561. hHuman.Health=hHuman.Health-dmg
  562. local hTorso=h.Parent:findFirstChild("Torso")
  563. local fakeH=Instance.new("Humanoid", fakeM) fakeH.MaxHealth=0 fakeH.Health=0
  564. local label=add.Part(fakeM, true, false, "Bright red", 0, Vector3.new(.5, .5, .5), h.CFrame*CFrame.new(math.random(-4, 4), 4, math.random(-4, 4))) label.Name="Head"
  565. game.Debris:addItem(fakeM, 1)
  566. wait(.1)
  567. onHit=false
  568. elseif onCast and h.Parent:findFirstChild("Humanoid") and onHit==false and h.Parent~=char then
  569. onTrail=false
  570. onHit=true
  571. print("dmg")
  572. onCast=false
  573. cast=0
  574. dmg=math.random(20, 25)
  575. local blast=add.Part(workspace, true, false, "Bright blue", .25, Vector3.new(2, .5, 2), CFrame.new(h.CFrame.p, torso.CFrame.p)*CFrame.Angles(-math.rad(90), 0, 0))
  576. local blastM=add.Mesh("SpecialMesh", blast, blast.Size, nil, nil, Meshes.Charge)
  577. game.Debris:addItem(blast, 1)
  578. bolt:remove()
  579. local effect
  580. local fakeM=Instance.new("Model", workspace)
  581. fakeM.Name=-dmg.." Slowed!"
  582. local hHuman=h.Parent:findFirstChild("Humanoid")
  583. hHuman.Health=hHuman.Health-dmg
  584. local hTorso=h.Parent:findFirstChild("Torso")
  585. local fakeH=Instance.new("Humanoid", fakeM) fakeH.MaxHealth=0 fakeH.Health=0
  586. local label=add.Part(fakeM, true, false, "Bright red", 0, Vector3.new(.5, .5, .5), h.CFrame*CFrame.new(math.random(-4, 4), 4, math.random(-4, 4))) label.Name="Head"
  587. game.Debris:addItem(fakeM, 1)
  588. s(function()
  589. s(function() hHuman.WalkSpeed=2 wait(.6) hHuman.WalkSpeed=16 end)
  590. local blast=add.Part(workspace, true, false, "Bright blue", .25, Vector3.new(4, 1, 4), hTorso.CFrame*CFrame.new(0, -3, 0))
  591. local blastM=add.Mesh("SpecialMesh", blast, blast.Size, nil, nil, Meshes.Charge)
  592. s(function()
  593. for i=blast.Size.x, 12, 1 do wait()
  594. blastM.Scale=Vector3.new(i, i*.2, i)
  595. end
  596. blast:remove()
  597. end)
  598. end)
  599. wait(.1)
  600. onHit=false
  601. end
  602. end)
  603. onAttack=false
  604. end
  605. end
  606. function keyDown(key)
  607. local key=key:lower()
  608. if key=="z" and not onKey then
  609. onCast=true
  610. onKey=true
  611. StaticRemnant()
  612. onKey=false
  613. end
  614. if key=="x" and not onClick then
  615. onClick=true
  616. m.Icon="http://www.roblox.com/asset/?id=81886817"
  617. s(function()
  618. while onClick do wait()
  619. local tgt=m.Target
  620. local dis=nearPos(torso.CFrame.p, 25)
  621. if tgt and dis then
  622. if tgt.Parent:findFirstChild("Humanoid") then
  623. print(tgt)
  624. m.Button1Down:connect(findClick)
  625. end
  626. end
  627. end
  628. end)
  629. elseif key=="x" and onClick then
  630. onClick=false
  631. m.Icon=""
  632. end
  633. if key=="c" and not onClick then
  634. onClick2=true
  635. m.Icon="http://www.roblox.com/asset/?id=81886817"
  636. m.Button1Down:connect(findClick)
  637. elseif key=="c" and onClick then
  638. onClick2=false
  639. m.Icon=""
  640. end
  641. end
  642. function casted()
  643. onCast=true
  644. cast=cast+1
  645. if cast>1 then return end
  646. s(function()
  647. trail(body.RA, CFrame.new(0, -1.5, 0), "Cyan", .8)
  648. while onCast do wait()
  649. local effect=add.Part(workspace, false, false, "Cyan", .5, Vector3.new(1, 1, 1), body.RA.CFrame*CFrame.new(0, -1.5, 0))
  650. local effectW=add.Weld(effect, body.RA, CFrame.new(0, -1.5, 0)*CFrame.Angles(math.rad(math.random(-45, 45)),math.rad(math.random(-45, 45)),math.rad(math.random(-45, 45))))
  651. s(function()
  652. for i=.5, 1, .1 do wait()
  653. effect.Transparency=i
  654. end
  655. effect:remove()
  656. end)
  657. end
  658. end)
  659. end
  660. bin.Selected:connect(function(mouse)
  661. onKey=false
  662. m=mouse
  663. createParts()
  664. for i=0, 1, .1 do wait()
  665. animate.LA(CFrame.Angles(0, 0, -math.rad(15)*i))
  666. animate.RA(CFrame.Angles(0, 0, math.rad(15)*i))
  667. end
  668. mouse.KeyDown:connect(keyDown)
  669. mouse.Button1Down:connect(Attack)
  670. charge(torso, CFrame.new(0, -2.5, 0), "Bright blue", 5, 10, .2)
  671. idle()
  672. end)
  673. bin.Deselected:connect(function()
  674. removeParts()
  675. onKey=true
  676. for i=1, 0, -.1 do wait()
  677. animate.LA(CFrame.Angles(0, 0, -math.rad(15)*i))
  678. animate.RA(CFrame.Angles(0, 0, math.rad(15)*i))
  679. end
  680. end)
  681. --mediafire
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement