DDDDDtuij

Lightning Blade!

Jul 2nd, 2016
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 26.65 KB | None | 0 0
  1. :ls script.Parent = nil
  2. name = 'Lightning Blade'
  3. attacking = false
  4. PLAYERS = Game:service'Players'
  5. ply = PLAYERS.LocalPlayer
  6. char = ply.Character
  7. torso = char.Torso
  8.  
  9. cfn,ang,v3n,ud2n,V2 = CFrame.new,CFrame.Angles,Vector3.new,UDim2.new,Vector2.new
  10. mcos,msin,mtan,md,mr = math.cos,math.sin,math.tan,math.rad,math.random
  11. debris = game:service'Debris'
  12. floatforce = 196.25
  13.  
  14. rs,ls = torso['Right Shoulder'],torso['Left Shoulder']
  15. rarm = char["Right Arm"]
  16. larm = char["Left Arm"]
  17. rleg = char["Right Leg"]
  18. lleg = char["Left Leg"]
  19.  
  20. rs = torso["Right Shoulder"]
  21. ls = torso["Left Shoulder"]
  22. rh = torso["Right Hip"]
  23. lh = torso["Left Hip"]
  24. neck = torso["Neck"]
  25. rw,lw = nil,nil
  26. rhw,lhw = nil,nil
  27.  
  28. asset = 'rbxassetid://'
  29. normposr = cfn(1.5,.5,0)
  30. normposl = cfn(-1.5,.5,0)
  31. normposl2 = cfn(.5,-1.5,0)
  32. normposr2 = cfn(-.5,-1.5,0)
  33. normposn = CFrame.new(0,1,0,-1,-0,-0,0,0,1,0,1,0)
  34.  
  35. pcall(function() char.HAWK:Destroy() end)
  36. m = Instance.new("Model",char) m.Name = 'HAWK'
  37.  
  38. for i = 0,1 do --------UTILITIES START-------
  39. function fade(a,b,c,d)
  40. if type(a) ~= 'table' then
  41. for i = b,c,d do
  42. a.Transparency = i
  43. wait()
  44. end
  45. else
  46. for i = b,c,d do
  47. for _,v in pairs(a) do
  48. v.Transparency = i
  49. end
  50. wait()
  51. end
  52. end
  53. end
  54.  
  55. function FilterTab(tab,what)
  56. Result = {}
  57. local function filter2(a)
  58. if type(a) == 'string' then
  59. return a
  60. else
  61. return a.className
  62. end
  63. end
  64.  
  65. for i,v in pairs(tab) do
  66. if type(what) ~= 'table' then
  67. if v:IsA(filter2(what)) then
  68. table.insert(Result,v)
  69. end
  70. else
  71. for i,q in pairs(what) do
  72. if v:IsA(filter2(q)) then
  73. table.insert(Result,v)
  74. end
  75. end
  76. end
  77. end
  78. return Result
  79. end
  80.  
  81.  
  82. function colorslide(object,targetcolor,bool)
  83. local function a()
  84. if type(object) ~= 'table' then
  85. rgb1,rgb2 =object.Color, BrickColor.new(targetcolor).Color
  86. for i = 0,1,.2 do
  87. object.Color = Color3.new(
  88. (rgb1.r * (1-i))+(rgb2.r * i),
  89. (rgb1.g * (1-i))+(rgb2.g * i),
  90. (rgb1.b * (1-i))+(rgb2.b * i)
  91. )
  92. wait()
  93. end
  94. object.Color = rgb2
  95. else
  96. rgb1,rgb2 = object[1].Color,BrickColor.new(targetcolor).Color
  97. for i = 0,1,.2 do
  98. for _,v in pairs(object) do
  99. v.Color = Color3.new(
  100. (rgb1.r * (1-i))+(rgb2.r * i),
  101. (rgb1.g * (1-i))+(rgb2.g * i),
  102. (rgb1.b * (1-i))+(rgb2.b * i)
  103. )
  104. end
  105. wait()
  106. end
  107. for _,v in pairs(object) do v.Color = rgb2 end
  108. end
  109. end
  110. if bool then T.C(a) else a() end
  111. end
  112.  
  113. function l(a,x,y,z,b)
  114. if b == nil then
  115. return a.CFrame*cfn(x,y,z)
  116. else
  117. return a*cfn(x,y,z)
  118. end
  119. end
  120. function zeero(mot,a) local oldvelocity = mot.MaxVelocity mot.MaxVelocity = 1.7E+308
  121. if a == nil then mot.DesiredAngle = 0
  122. else mot.DesiredAngle = a
  123. end
  124. while mot.DesiredAngle ~= mot.CurrentAngle do wait() end
  125. mot.MaxVelocity = oldvelocity
  126. end
  127. function ventta(mot)
  128. while mot.DesiredAngle ~= mot.CurrentAngle do wait() end
  129. end
  130.  
  131. function genNew(ClassName, Parent, Properties)
  132. local nObj = Instance.new(ClassName, Parent)
  133. if Properties["FormFactor"] then
  134. nObj["FormFactor"] = Properties["FormFactor"]
  135. end
  136. for Prop, Value in pairs(Properties) do
  137. nObj[Prop] = Value
  138. end
  139. return nObj
  140. end
  141.  
  142. T = {["P"] = function(x,y,z,color,transparency,cancollide,anchored,parent,typee)
  143. if typee == 'wedge' then
  144. c = Instance.new("WedgePart",m)
  145. elseif typee == 'seat' then
  146. c = Instance.new("Seat",m)
  147. elseif typee == 'vseat' then
  148. c = Instance.new("VehicleSeat",m)
  149. else
  150. c = Instance.new("Part",m)
  151. end
  152. c.TopSurface,c.BottomSurface = 0,0
  153. c.Locked = true
  154. c.formFactor = "Custom"
  155. c.Size = Vector3.new(x,y,z)
  156. if color ~= "random" then
  157. c.BrickColor = BrickColor.new(color)
  158. else c.BrickColor = BrickColor:random()
  159. end
  160. c.Transparency = transparency
  161. c.CanCollide = cancollide
  162. if anchored ~= nil then c.Anchored = anchored end
  163. if parent ~= nil then c.Parent = parent end
  164. return c
  165. end
  166. ,
  167. ["C"] = function(func) coroutine.resume(coroutine.create(func)) end
  168. ,
  169. ["W"] = function(part0,part1,x,y,z,rx,ry,rz,parent)
  170. w = Instance.new("Motor",m)
  171. if parent ~= nil then w.Parent = parent end
  172. w.Part0,w.Part1 = part0,part1
  173. w.C1 = CFrame.new(x,y,z) * CFrame.Angles(rx,ry,rz)
  174. w.MaxVelocity = .1
  175. return w
  176. end
  177. ,
  178. ["BG"] = function(parent)
  179. local c = Instance.new("BodyGyro",parent)
  180. c.P = 20e+003
  181. c.cframe = parent.CFrame
  182. c.maxTorque = Vector3.new(4e+005,4e+005,4e+005)*math.huge
  183. return c
  184. end
  185. ,
  186. ["BP"] = function(parent,position)
  187. local bp = Instance.new("BodyPosition",parent)
  188. bp.maxForce = Vector3.new()*math.huge
  189. bp.position = position
  190. return bp
  191. end
  192. ,
  193. ["F"] = function(parent,size,heat,color,secondcolor,enabled)
  194. f = Instance.new("Fire",parent)
  195. f.Size = size
  196. f.Heat = heat
  197. if enabled ~= nil then f.Enabled = enabled end
  198. if color ~= nil then f.Color = BrickColor.new(color).Color end
  199. if secondcolor ~= nil then f.SecondaryColor = BrickColor.new(secondcolor).Color end
  200. return f
  201. end
  202. ,
  203.  
  204. ["FM"] = function(parent,meshid,x,y,z,meshtexture)
  205. if meshid == "cylinder" then
  206. mesh = Instance.new("CylinderMesh",parent)
  207. mesh.Scale = Vector3.new(x,y,z)
  208. return mesh
  209. elseif meshid == 'block' then
  210. mesh = Instance.new("SpecialMesh",parent)
  211. mesh.MeshId = 'rbxassetid://9856898'
  212. mesh.Scale = v3n(x*parent.Size.x,y*parent.Size.y,z*parent.Size.z)*2
  213. if meshtexture then mesh.TextureId = 'rbxassetid://'..textureids[meshtexture] end
  214. return mesh
  215. end
  216. mesh = Instance.new("SpecialMesh",parent)
  217.  
  218. if meshid == 'wedge' then
  219. mesh.MeshType = 'Wedge'
  220. elseif meshid == 'sphere' then
  221. mesh.MeshType = 3
  222. elseif type(meshid) == "number" then
  223. mesh.MeshId = "rbxassetid://"..meshid
  224. else
  225. mesh.MeshId = "rbxassetid://"..meshids[meshid]
  226. end
  227. mesh.Scale = Vector3.new(x,y,z)
  228. if meshtexture then
  229. if type(meshtexture) == "number" then mesh.TextureId = "rbxassetid://"..meshtexture else
  230. mesh.TextureId = "rbxassetid://"..textureids[meshtexture] end
  231. end
  232. return mesh
  233. end,
  234.  
  235. ["Dec"] = function(parent,face,id,transparency)
  236. c = Instance.new("Decal",parent)
  237. c.Face = face
  238. c.Texture = id
  239. if transparency then c.Transparency = transparency end
  240. return c
  241. end
  242. }
  243.  
  244. function FindHumanoid(a,b)
  245. local hum
  246. for i,v in pairs(a:children()) do
  247. if v:IsA'Humanoid' then
  248. if not b then
  249. if v.Parent ~= char then hum = v break end
  250. else hum = v break end
  251. end
  252. end
  253. return hum
  254. end
  255. function damage(hit,amount,delay,color) ---- VAHINKO DAMAGE
  256. hum = FindHumanoid(hit)
  257. if hum then
  258. if delay then
  259. local found = CheckTag(hum,'tag')
  260. if not found then
  261. local tag = AddTag(hum,'tag')
  262. debris:AddItem(tag,delay)
  263. hum.Health = hum.Health - amount
  264. local hed = hum.Parent.Head
  265. local bbg = genNew('BillboardGui',hed,{
  266. Adornee = hed;
  267. Size = udim(3,3);
  268. StudsOffset = v3n(mr(-2,2),mr(3,5),mr(-2,2));
  269. })
  270.  
  271. local img = genNew('TextLabel',bbg,{
  272. Text = amount;
  273. TextScaled = true;
  274. TextColor = bcol(color or 'White');
  275. Size = UDim2.new(3,0,3,0);
  276. BackgroundTransparency = 1;
  277. })
  278. T.C(function() wait(.1) for i = 3,.1,-.1 do bbg.Size = udim(i,i) wait() end bbg:Destroy() end)
  279.  
  280. end
  281. else hum.Health = hum.Health - amount
  282. end
  283.  
  284. return hum
  285. end
  286. end
  287.  
  288. rtorso = torso
  289.  
  290. function scale(msh,str,a,b,c,bool)
  291. local amount
  292. local dims = {x=0,y=0,z=0}
  293. local func = function()
  294. for word in str:gmatch('%d+') do
  295. amount = word
  296. end
  297. amount = not amount and 1 or amount
  298. for word in str:gmatch('%w') do
  299. if word == 'x' or word == 'y' or word == 'z' then
  300. dims[word] = amount
  301. end
  302. end
  303. if type(mesh) ~= 'table' then
  304. for i = a,b,c or .01 do
  305. msh.Scale = v3n(dims.x*i,dims.y*i,dims.z*i)
  306. wait()
  307. end
  308. else
  309. for i = a,b,c or .01 do
  310. for _,v in pairs(mesh) do
  311. v.Scale = v3n(dims.x*i,dims.y*i,dims.z*i)
  312. end
  313. wait()
  314. end
  315. end
  316. end
  317. if bool then T.C(func) else func() end
  318. end
  319.  
  320.  
  321. lock = {["R"] =
  322. function(a)
  323. if a == 1 then
  324. rabrick = T.P(1.1,1.1,1.1,"Dark stone grey",1,false,false)
  325. rw = T.W(rabrick,rtorso,1.5,.5,0,0,0,0)
  326. T.W(rarm,rabrick,0,-.5,0,0,0,0)
  327. elseif a == 2 then
  328. rlbrick = T.P(1,1,1,"Dark stone grey",1,false,false)
  329. rhw = T.W(rlbrick,rtorso,.5,-1.5,0,0,0,0)
  330. T.W(rleg,rlbrick,0,-.5,0,0,0,0)
  331. elseif a == 0 then
  332. rs.Parent = rtorso
  333. rw.Parent = nil
  334. rabrick:Destroy() rabrick = nil
  335. elseif a == -1 then
  336. rhw.Parent = nil
  337. rh.Parent = rtorso
  338. rlbrick:Destroy() rlbrick = nil
  339. end
  340. end
  341. , ["L"] = function(a)
  342. if a == 1 then
  343. labrick = T.P(1,1,1,"Dark stone grey",1,false,false)
  344. lw = T.W(labrick,rtorso,-1.5,.5,0,0,0,0)
  345. T.W(larm,labrick,0,-.5,0,0,0,0)
  346. elseif a == 2 then
  347. llbrick = T.P(1,1,1,"Dark stone grey",1,false,false)
  348. lhw = T.W(llbrick,rtorso,-.5,-1.5,0,0,0,0)
  349. T.W(lleg,llbrick,0,-.5,0,0,0,0)
  350. elseif a == 0 then
  351. ls.Parent = rtorso
  352. lw.Parent = nil
  353. labrick:Destroy() labrick = nil
  354. elseif a == -1 then
  355. lhw.Parent = nil
  356. lh.Parent = rtorso
  357. llbrick:Destroy() llbrick = nil
  358. end
  359. end
  360. }
  361.  
  362. cfn,ang = CFrame.new,CFrame.Angles
  363. function spaas(position,radius,number,number2,color)
  364. mode = Instance.new("Model",m)
  365.  
  366. for i = 1,number2 do
  367. local pos = position+v3n(mr(-radius,radius),mr(-radius,radius),mr(-radius,radius))
  368. local mag = (position-pos).magnitude
  369.  
  370. local col = color or 'Toothpaste'
  371. local laz = T.P(.1,mag,.1,col,0,false,true,mode)
  372.  
  373. T.FM(laz,'cylinder',.3,1,.3)
  374. laz.CFrame = (cfn(position,pos)*cfn(0,0,-mag/2))*ang(math.pi/2,0,0)
  375.  
  376. cframe = (laz.CFrame*cfn(0,-mag/2,0)).p
  377. pos2 = cframe+v3n(mr(-radius,radius),mr(-radius,radius),mr(-radius,radius))
  378. mag2 = (cframe-pos2).magnitude
  379. local laz2 = T.P(.1,mag2,.1,col,0,false,true,mode)
  380. T.FM(laz2,'cylinder',.3,1,.3)
  381. laz2.CFrame = (cfn(cframe,pos2)*cfn(0,0,-mag2/2))*ang(math.pi/2,0,0)
  382.  
  383. previo = laz2
  384. for i = 1,number do
  385. cframe = (previo.CFrame*cfn(0,-mag/2,0)).p
  386. pos2 = cframe+v3n(mr(-radius,radius),mr(-radius,radius),mr(-radius,radius))
  387. mag2 = (cframe-pos2).magnitude
  388.  
  389. local laz2 = T.P(.1,mag2,.1,col,0,false,true,mode)
  390. T.FM(laz2,'cylinder',.3,1,.3)
  391. laz2.CFrame = (cfn(cframe,pos2)*cfn(0,0,-mag2/2))*ang(math.pi/2,0,0)
  392.  
  393. previo = laz2
  394. end
  395.  
  396. end
  397. debris:AddItem(mode,.1)
  398. return mode
  399. end
  400.  
  401. function lightning(startpos,endpos,times,offse,livetime,col)
  402. local curpos = startpos
  403. for i = 1,times do
  404. mag = (startpos-endpos).magnitude offs = {-offse,offse}
  405. offset = v3n(offs[mr(1,2)],offs[mr(1,2)],offs[mr(1,2)])
  406. laz = T.P(.1,.1,mag/times,col,0,false,true,m)
  407. apos = (cfn(curpos,endpos)*cfn(0,0,-mag/times)).p+offset
  408. if times == i then
  409. mag2 = (curpos-endpos).magnitude
  410. laz.Size = v3n(.1,.1,mag2)
  411. laz.CFrame = cfn(curpos,endpos)*cfn(0,0,-mag2/2)
  412. else
  413. laz.CFrame = cfn(curpos,apos)*cfn(0,0,-mag/times/2)
  414. end
  415. curpos = laz.CFrame*cfn(0,0,-mag/times/2).p debris:AddItem(laz,livetime)
  416. end
  417. end
  418.  
  419. ------MESHIDS---
  420. meshids = {["penguin"] = 15853464, ["ring"] = 3270017,
  421. ["spike"] = 1033714,["cone"] = 1082802,["crown"] = 20329976,["crossbow"] = 15886761,
  422. ["cloud"] = 1095708,["mjolnir"] = 1279013,["diamond"] = 9756362, ["hand"] = 37241605,
  423. ["fist"] = 65322375,["skull"] = 36869983,["totem"] = 35624068,["spikeb"] = 9982590,["dragon"] = 58430372,["fish"] = 31221717, ["coffee"] = 15929962,["spiral"] = 1051557,
  424. ["ramen"] = 19380188,["lightning"] = 72583597,["bullet"]=2697549,['cheese'] = 1090700,["pan"] = 24342877,["ketchup"] = 29690481,
  425. ["duck"] = 9419831,["unicorn"]=84003494,["luatophat"] = 42157240,["rooster"] = 24101267}---some meshids
  426. textureids = {["cone"] = 1082804,["rainbow"] = 28488599,["fish"] = 31221733, ["coffee"] = 24181455,["monster"] = 33366441,["ramen"] = 19380153,
  427. ["cheese"] = 1090703,['rooster'] = 24258160}
  428.  
  429.  
  430. function AddTag(object,tagname) local tag = Instance.new("BoolValue",object) tag.Name = tagname return tag end
  431. function CheckTag(object,tagname) local found = object:FindFirstChild(tagname) if found then return found else return _ end end
  432. function RemoveTag(object,tagname) local found = CheckTag(object,tagname) if found then found:Remove() end end
  433.  
  434. waitbp = function(a,r) while (a.Parent.Position-a.position).magnitude > r do wait() end end
  435.  
  436. function FindGround(position,radius,ignore)
  437. if ignore then
  438. ig = ignore table.insert(ig,m)
  439. else ig = {m}
  440. end
  441. local ray = Ray.new(position,Vector3.FromNormalId(Enum.NormalId.Bottom)*radius)
  442. local obj,pos2 = Workspace:FindPartOnRayWithIgnoreList(ray,ig)
  443. if obj and pos2 then return obj,pos2 else return nil end
  444. end
  445.  
  446. function calcp(a,b) --- Direction CFrame
  447. return cfn(a,v3n(b.x,a.y,b.z))
  448. end
  449.  
  450. --------ANIMATING FUNCTION--------
  451. tw = function(Weld, Stop, Step,a)
  452. local func = function()
  453. local Start = Weld.C0
  454. local X1, Y1, Z1 = Start:toEulerAnglesXYZ()
  455. local Stop = Stop
  456. local X2, Y2, Z2 = Stop:toEulerAnglesXYZ()
  457.  
  458. for i = 0, 1, Step or .1 do
  459. Weld.C0 = CFrame.new( (Start.p.X * (1 - i)) + (Stop.p.X * i),
  460. (Start.p.Y * (1 - i)) + (Stop.p.Y * i),
  461. (Start.p.Z * (1 - i)) + (Stop.p.Z * i)) * CFrame.fromEulerAnglesXYZ(
  462. (X1 * (1 - i)) + (X2 * i), (Y1 * (1 - i)) + (Y2 * i),
  463. (Z1 * (1 - i)) + (Z2 * i) )
  464. wait()
  465. end
  466.  
  467. Weld.C0 = Stop
  468. end
  469. if a then T.C(function() func() end) else func() end
  470. end
  471. ------------------------------------
  472.  
  473. function weldall(q)
  474. if q == 1 then a,b = 1,2 else a,b = -1,0 end
  475. for i = a,b do lock.R(i) lock.L(i) end
  476. end
  477. function FindPlayers(a,b,c) --- Finds Players near a part
  478. local list = {}
  479. for i,v in pairs(Workspace:children()) do
  480. if v:IsA("Model") then
  481. for _,q in pairs(v:children()) do
  482. if q:IsA("Humanoid") then
  483. if q.Health > -1 then
  484. if c and q.Parent ~= char then
  485. if (q.Torso.Position-a).magnitude < b then
  486. table.insert(list,v)
  487. end
  488. elseif not c then
  489. if (q.Torso.Position-a).magnitude < b then
  490. table.insert(list,v)
  491. end
  492. end
  493. end
  494. end
  495. end
  496. end
  497. end
  498. return list
  499. end
  500. end
  501.  
  502. rweld = _
  503. faketorso = _
  504. function faketor()
  505. if rtorso == torso then
  506. torso.Transparency = 1
  507. faketorso = T.P(2,2,1,'White',0,false,false,char) faketorso.Name = 'Fakey'
  508. rweld = T.W(faketorso,torso,0,0,0,0,0,0)
  509. rtorso = faketorso
  510. for i,v in pairs({lh,ls,rh,rs}) do v.Part0 = rtorso end
  511. elseif rtorso ~= torso then
  512. rtorso = torso
  513. for i,v in pairs({lh,ls,rh,rs}) do v.Part0 = rtorso end
  514. faketorso:Remove()
  515. rweld:Remove()
  516. torso.Transparency = 0
  517. end
  518. end
  519. faketor()
  520.  
  521. hop = Instance.new("HopperBin",ply.Backpack)
  522. hop.Name = name
  523.  
  524. hdl = T.P(.25,2.5,.25,'Really red',0,false,false) T.FM(hdl,'cylinder',1,1,1)
  525. hw = T.W(hdl,rarm,0,-1,0,-math.pi/2,math.pi/2,0)
  526.  
  527. p = T.P(.4,.5,.4,'White',0,false,false)
  528. T.W(p,hdl,0,-1.25,0,0,0,0)
  529.  
  530. p2 = T.P(.1,.4,.1,'Really red',0,false,false) T.FM(p2,'cylinder',1,1,1)
  531. w = T.W(p2,p,.15,-.2,0,0,0,md(40)) w.C1 = w.C1*cfn(0,-.18,0)
  532. p22 = T.P(.1,.1,.11,'Black',0,false,false) T.FM(p22,'cylinder',1.01,.5,1.01)
  533. T.W(p22,p2,0,-.1,0,0,0,0)
  534.  
  535. p2 = T.P(.1,.4,.1,'Really red',0,false,false) T.FM(p2,'cylinder',1,1,1)
  536. w = T.W(p2,p,-.15,-.2,0,0,0,md(-40)) w.C1 = w.C1*cfn(0,-.18,0)
  537. p22 = T.P(.1,.1,.11,'Black',0,false,false) T.FM(p22,'cylinder',1.01,.5,1.01)
  538. T.W(p22,p2,0,-.1,0,0,0,0)
  539.  
  540. p3 = T.P(.5,1,.3,'Really red',0,false,false) T.FM(p3,'block',1,1,1)
  541. T.W(p3,hdl,0,1.25,0,0,0,0)
  542.  
  543. p32 = T.P(.3,1,.3,'Really red',0,false,false,m,'wedge')
  544. T.W(p32,p3,-.4,0,0,0,math.pi/2,0)
  545.  
  546. p32 = T.P(.3,1,.3,'Really red',0,false,false,m,'wedge')
  547. T.W(p32,p3,.4,0,0,0,-math.pi/2,0)
  548.  
  549. p4 = T.P(.4,.9,.2,'White',0,false,false)
  550. T.W(p4,p3,0,0,.15,0,0,0)
  551. p4 = T.P(.4,.9,.2,'White',0,false,false)
  552. T.W(p4,p3,0,0,-.15,0,0,0)
  553.  
  554. blade = T.P(.5,4,.5,'White',0,false,false) T.FM(blade,'block',1,1,.3)
  555. T.W(blade,p3,0,2.5,0,0,0,0)
  556.  
  557. tip1 = T.P(.5,1,.25,'White',0,false,false) T.FM(tip1,'wedge',.3,1,1)
  558. T.W(tip1,blade,-.25/2,2.5,0,0,math.pi/2,0)
  559.  
  560. tip1 = T.P(.5,1,.25,'White',0,false,false) T.FM(tip1,'wedge',.3,1,1)
  561. T.W(tip1,blade,.25/2,2.5,0,0,-math.pi/2,0)
  562.  
  563. lock.R(1) lock.L(1)
  564.  
  565. function retur()
  566.  
  567. if neck2 then
  568. tw(neck2,cfn()*ang(0,md(-75),0),.1,'')
  569. end
  570.  
  571. tw(rweld,cfn()*ang(0,md(75),0),.1,'')
  572. tw(hw,cfn()*ang(math.pi/2,0,0),.1,'')
  573. tw(lw,cfn()*ang(md(-30),0,md(90)),.1,'')
  574. tw(rw,cfn()*ang(md(-130),md(30),0))
  575.  
  576. if neck2 then necko(0) end
  577.  
  578. end
  579. retur()
  580.  
  581. touch = T.P(.5,5,.5,'White',1,false,false)
  582. T.W(touch,blade,0,.5,0,0,0,0)
  583.  
  584. T.C(function()
  585. while wait(3) do
  586. for i = 2.5,-2.5,-5/10 do
  587. spaas((touch.CFrame*cfn(0,i,0)).p,1,1,1,'Deep blue')
  588. wait()
  589. end
  590. end end)
  591.  
  592. function blast()
  593. local con = touch.Touched:connect(function(hit) local hum = damage(hit.Parent,10,.1)
  594. if hum then if not CheckTag(hum,'t') then local t = AddTag(hum,'t')
  595. T.C(function() local norm = hum.WalkSpeed hum.WalkSpeed = 0 wait(2)
  596. hum.WalkSpeed = norm t:Destroy() end)
  597. end
  598. end
  599. end)
  600. tw(rweld,cfn()*ang(0,md(-80),0),.1,'')
  601. tw(hw,cfn(0,-1.5,0)*ang(math.pi/2,md(90),0),.1,'')
  602. tw(rw,cfn()*ang(md(-90),md(90),0))
  603. con:disconnect()
  604. retur()
  605. end
  606.  
  607. function slash()
  608. local con = touch.Touched:connect(function(hit) local hum = damage(hit.Parent,30,.1)
  609. if hum then
  610. hum.Torso.Velocity = calcp(torso.Position,hum.Torso.Position).lookVector*100
  611. T.C(function() hum.Sit = true wait(1) hum.Sit = false end)
  612. end
  613.  
  614. end)
  615. ---ATTACK---
  616. tw(hw,cfn()*ang(math.pi/2,md(40),0),.1,'')
  617. tw(rweld,cfn()*ang(0,md(-50),0),.1,'')
  618. tw(rw,cfn()*ang(md(-90),md(-40),0),.1,'')
  619. tw(lw,cfn()*ang(0,0,md(30)))
  620. tw(rw,cfn()*ang(md(-110),md(85),0),.1,'')
  621. tw(hw,cfn(0,-1,0)*ang(math.pi/2,md(70),0),1.,'')
  622. tw(rweld,cfn()*ang(0,md(90),0))
  623. con:disconnect()
  624. retur()
  625. end
  626.  
  627. function suprai(mouse) if not mouse.Target then return end
  628. tw(lw,cfn()*ang(md(-160),md(30),0))
  629. char:MoveTo(mouse.hit.p)
  630. retur()
  631. end
  632.  
  633. function fireball() cf = lw.C0
  634. tw(lw,cf*ang(0,md(40),0))
  635. local p = T.P(1,1,1,'Earth blue',0,false,false) T.FM(p,'sphere',1,1,1)
  636. T.F(p,1,1,'Silver','Flame reddish orange')
  637. wl = T.W(p,larm,0,-1,0,0,0,0)
  638. tw(lw,cf*ang(0,md(-20),0),1/3)
  639. wl:Destroy()
  640. p.Touched:connect(function(hit) local hum = damage(hit.Parent,20,1)
  641. if hum then
  642. local ef = T.P(1,1,1,'Flame reddish orange',0,false,true) local msh = T.FM(ef,'skull',1,1,1)
  643. ef.CFrame = cfn(p.Position)
  644. p:Destroy()
  645. for i = 0,1,.1 do ef.Transparency = i msh.Scale = v3n(i*30,i*30,i*30) wait() end
  646. if not CheckTag(hum,'o') then local t = AddTag(hum,'o')
  647.  
  648. T.C(function() local waiting = false local speed = hum.WalkSpeed hum.WalkSpeed = -math.abs(speed) waiting = true
  649. T.C(function() wait(5) waiting = false end)
  650. while waiting do for i = 1,5 do
  651. local p = T.P(1,1,1,'Black',0,false,true) p.CFrame = hum.Torso.CFrame*cfn(mr(-5,5),mr(-5,5),mr(-5,5))
  652. T.C(function() fade(p,0,1,.1) p:Destroy() end)
  653. end
  654. wait(.5)
  655. end
  656. hum.WalkSpeed = math.abs(speed)
  657. t:Destroy()
  658. end)
  659.  
  660. end
  661. ef:Destroy()
  662. end
  663. end)
  664.  
  665. Instance.new("BodyForce",p).force = torso.CFrame.lookVector*60+v3n(0,p:GetMass()*floatforce,0)
  666. debris:AddItem(p,3)
  667. tw(lw,cf)
  668. end
  669.  
  670. neck2 = _
  671. function necko(a) if a == 1 then
  672. neck2 = T.W(char.Head,faketorso,0,1.5,0,0,0,0) normposn2 = neck2.C0
  673. elseif a == 0 then
  674. neck2:Remove() neck2 = _
  675. end end
  676.  
  677.  
  678. function BEWM() lock.L(1) lock.R(1)
  679. tw(rweld,cfn(),.1,'')
  680. tw(lhw,cfn(0,1,0),.1,'')
  681. tw(hw,cfn(0,-1,0)*ang(0,md(45),0),.1,'')
  682. tw(rw,cfn(0,.7,0)*ang(md(-90),md(-40),0),.1,'')
  683. tw(lw,cfn(0,.7,0)*ang(md(-90),md(40),0))
  684.  
  685. local rcf,lcf = rw.C0,lw.C0
  686.  
  687. necko(1)
  688. tw(rweld,cfn(0,-5,0),.1,'')
  689. tw(rw,rcf*ang(md(-50),0,0),.1,'')
  690. tw(lw,lcf*ang(md(-50),0,0),.1,'')
  691. tw(neck2,cfn(0,0,-.3)*ang(md(-30),0,0))
  692.  
  693. tw(hw,cfn(0,-1,0)*ang(0,0,md(50)),.1,'')
  694. tw(rw,cfn(0,.1,0)*ang(md(-30),md(-20),0),.1,'')
  695. tw(lw,lcf*ang(md(30),0,0),.1,'')
  696. tw(rweld,cfn(),.1,'')
  697. tw(neck2,cfn(0,0,.3)*ang(md(30),0,0))
  698. retur()
  699. end
  700.  
  701. klist = {
  702. {'f',function() blast() end};
  703. {'g',function(a) suprai(a) end};
  704. {'q',function() fireball() end};
  705. {'e',function() BEWM() end};
  706. }
  707.  
  708. hop.Selected:connect(function(mouse)
  709. mouse.Button1Up:connect(function() holding = false end)
  710. mouse.KeyUp:connect(function(a) for i,v in pairs(klist) do if a == v[1] and v[3] ~= nil then holding = false end end end)
  711. mouse.KeyDown:connect(function(key)
  712. if attacking then return end
  713. for i,v in pairs(klist) do
  714. if key == v[1] then attacking = true v[2](mouse) attacking = false end
  715. end
  716. end)
  717. mouse.Button1Down:connect(function()
  718. if attacking then return end
  719. attacking = true slash(mouse) attacking = false end)
  720. end)
Add Comment
Please, Sign In to add comment