Advertisement
NextFlamePB

ROBLOX Blast Blade Script

Sep 7th, 2015
2,137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 45.35 KB | None | 0 0
  1. Player = game:GetService("Players").LocalPlayer
  2. Character = Player.Character
  3. PlayerGui = Player.PlayerGui
  4. Backpack = Player.Backpack
  5. Torso = Character.Torso
  6. Head = Character.Head
  7. Humanoid = Character.Humanoid
  8. LeftArm = Character["Left Arm"]
  9. LeftLeg = Character["Left Leg"]
  10. RightArm = Character["Right Arm"]
  11. RightLeg = Character["Right Leg"]
  12. LS = Torso["Left Shoulder"]
  13. LH = Torso["Left Hip"]
  14. RS = Torso["Right Shoulder"]
  15. RH = Torso["Right Hip"]
  16. Neck = Torso.Neck
  17. it=Instance.new
  18. vt=Vector3.new
  19. cf=CFrame.new
  20. euler=CFrame.fromEulerAnglesXYZ
  21. angles=CFrame.Angles
  22. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  23. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  24. attack = false
  25. attacktype = 1
  26. damage = 5
  27. oridamage = 50
  28. BladeNumb=0.8
  29. GyroNumb=0
  30. attackdebounce = false
  31. ssdebounce=false
  32. MMouse=nil
  33. Mode="Sword"
  34. cannonmode=false
  35. combo=0
  36. spinning=false
  37. shootmode=true
  38. --player
  39. player = nil
  40. --save shoulders
  41. RSH, LSH = nil, nil
  42. --welds
  43. RW, LW = Instance.new("Weld"), Instance.new("Weld")
  44. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  45.  
  46.  
  47. if Character:findFirstChild("Blast Blade",true) ~= nil then
  48. Character:findFirstChild("Blast Blade",true).Parent = nil
  49. end
  50. if Character:findFirstChild("Block",true) ~= nil then
  51. Character:findFirstChild("Block",true).Parent = nil
  52. end
  53.  
  54.  
  55. function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
  56. local fp = it("Part")
  57. fp.formFactor = formfactor
  58. fp.Parent = parent
  59. fp.Reflectance = reflectance
  60. fp.Transparency = transparency
  61. fp.CanCollide = false
  62. fp.Locked=true
  63. fp.BrickColor = brickcolor
  64. fp.Name = name
  65. fp.Size = size
  66. fp.Position = Torso.Position
  67. fp.BottomSurface="Smooth"
  68. fp.TopSurface="Smooth"
  69. fp:BreakJoints()
  70. return fp
  71. end
  72.  
  73. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  74. local mesh = it(Mesh)
  75. mesh.Parent = part
  76. if Mesh=="SpecialMesh" then
  77. mesh.MeshType = meshtype
  78. mesh.MeshId = meshid
  79. end
  80. mesh.Offset=offset
  81. mesh.Scale=scale
  82. return mesh
  83. end
  84.  
  85. function weld(parent,part0,part1,c0)
  86. local weld = it("Weld")
  87. weld.Parent = parent
  88. weld.Part0 = part0
  89. weld.Part1 = part1
  90. weld.C0 = c0
  91. return weld
  92. end
  93.  
  94. local modelzorz = Instance.new("Model")
  95. modelzorz.Parent = Character
  96. modelzorz.Name = "Blast Blade"
  97.  
  98. local prt1=part(3,modelzorz,0,0,Torso.BrickColor,"Part1",vt(1,1,1))
  99. local prt2=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part2",vt(1,1,1))
  100. local prt3=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part3",vt(0.8,0.5,0.8))
  101. local prt5=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part5",vt(1,1,1))
  102. local prt6=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part6",vt(1,1,1))
  103. local prt7=part(3,modelzorz,0,0,BrickColor.new("Bright red"),"Part7",vt(1,1,1))
  104. local prt8=part(3,modelzorz,0,0,BrickColor.new("Bright red"),"Part8",vt(1,1,1))
  105. local hitbox=part(3,modelzorz,0,1,BrickColor.new("Black"),"Hitbox",vt(1,5,3))
  106.  
  107. local msh1=mesh("CylinderMesh",prt1,"","",vt(0,0,0),vt(0.45,1,0.45))
  108. local msh2=mesh("CylinderMesh",prt2,"","",vt(0,0,0),vt(0.4,2,0.4))
  109. local msh3=mesh("SpecialMesh",prt3,"Head","",vt(0,0,0),vt(1,1,1))
  110. local msh5=mesh("SpecialMesh",prt5,"Head","",vt(0,0,0),vt(0.8,0.5,0.8))
  111. local msh6=mesh("BlockMesh",prt6,"","",vt(0,0,0),vt(0.5,0.5,1.3))
  112. local msh7=mesh("SpecialMesh",prt7,"Sphere","",vt(0,0,0),vt(1.4,1.4,1.4))
  113. local msh8=mesh("SpecialMesh",prt8,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(1.5,1.5,1.5))
  114.  
  115. local wld1=weld(prt1,prt1,Torso,euler(-2.5,1.57,0)*cf(-2,-3,-0.6))
  116. local wld2=weld(prt2,prt2,prt1,euler(0,0,0)*cf(0,0,0))
  117. local wld3=weld(prt3,prt3,prt2,euler(0,0,0)*cf(0,1.2,0))
  118. local wld5=weld(prt5,prt5,prt2,euler(0,0,0)*cf(0,-1,0))
  119. local wld6=weld(prt6,prt6,prt5,euler(0,0,0)*cf(0,-0.2,0))
  120. local wld7=weld(prt7,prt7,prt6,euler(0,0,0)*cf(0,-1,0))
  121. local wld8=weld(prt8,prt8,prt7,euler(0,1.57,0)*cf(0,0,0))
  122. local hitboxwld=weld(hitbox,hitbox,prt7,euler(0,0,0)*cf(0,-1.5,0))
  123.  
  124. numb=0
  125. for i=1,8 do
  126. local prt4=part(3,modelzorz,0.2,0,BrickColor.new("Medium stone grey"),"Part4",vt(1,1,1))
  127. local msh4=mesh("SpecialMesh",prt4,"FileMesh","http://www.roblox.com/asset/?id=1778999",vt(0,0,0),vt(0.3,0.2,0.3))
  128. local wld4=weld(prt4,prt4,prt3,cf(0,-0.4,0)*euler(1.57,numb,0))
  129. numb=numb+0.785
  130. end
  131. numb=0
  132. for i=1,4 do
  133. local prt9=part(3,modelzorz,0,0,BrickColor.new("Bright red"),"Part9",vt(1,1,1))
  134. local msh9=mesh("CylinderMesh",prt9,"","",vt(0,0,0),vt(0.2,2,0.2))
  135. local wld9=weld(prt9,prt9,prt8,cf(0,0,0)*euler(0,0,numb))
  136. numb=numb+0.785
  137. end
  138. numb=0
  139. numb2=0
  140. numb3=0
  141. for i=1,8 do
  142. local prt10=part(3,modelzorz,0.4,0,BrickColor.new("White"),"Part10",vt(1,1,1))
  143. local msh10=mesh("SpecialMesh",prt10,"Wedge","",vt(0,0,0),vt(0.3-numb2,1.5+numb3,1.5-numb3))
  144. local wld10=weld(prt10,prt10,prt6,euler(0,3.14,0)*cf(0,-0.6-numb,-0.8))
  145. coroutine.resume(coroutine.create(function(Weld,Number,Number3)
  146. while true do
  147. wait(0)
  148. wld10.C0=euler(0,3.14,0)*cf(0,-0.6-Number,-BladeNumb+(Number3/2))
  149. end
  150. end),wld10,numb,numb3)
  151. local prt11=part(3,modelzorz,0.4,0,BrickColor.new("White"),"Part11",vt(1,1,1))
  152. local msh11=mesh("SpecialMesh",prt11,"Wedge","",vt(0,0,0),vt(0.3-numb2,1.5+numb3,1.5-numb3))
  153. local wld11=weld(prt11,prt11,prt6,cf(0,-0.6-numb,0.8))
  154. coroutine.resume(coroutine.create(function(Weld,Number,Number3)
  155. while true do
  156. wait(0)
  157. wld11.C0=cf(0,-0.6-Number,BladeNumb-(Number3/2))
  158. end
  159. end),wld11,numb,numb3)
  160. numb=numb+0.6
  161. numb2=numb2+0.01
  162. numb3=numb3-0.1
  163. end
  164. if (script.Parent.className ~= "HopperBin") then
  165. Tool = Instance.new("HopperBin")
  166. Tool.Parent = Backpack
  167. Tool.Name = "Blast Blade"
  168. script.Parent = Tool
  169. end
  170. Bin = script.Parent
  171.  
  172. local bg = it("BodyGyro")
  173. bg.maxTorque = Vector3.new(4e+005,4e+005,4e+005)*math.huge
  174. bg.P = 20e+003
  175. bg.Parent = nil
  176.  
  177. so = function(id,par,vol,pit)
  178. coroutine.resume(coroutine.create(function()
  179. local sou = Instance.new("Sound",par or workspace)
  180. sou.Volume=vol
  181. sou.Pitch=pit or 1
  182. sou.SoundId=id
  183. wait()
  184. sou:play()
  185. wait(6)
  186. sou:Remove()
  187. end))
  188. end
  189.  
  190. function unequipweld()
  191. wld1.Part1=Torso
  192. wld1.C0=euler(-2.5,1.57,0)*cf(-2,-3,-0.6)
  193. wld1.C1=cf(0,0,0)
  194. end
  195.  
  196. function equipweld()
  197. wld1.Part1=RightArm
  198. wld1.C0=euler(1.57+0.4,0,0)*cf(0,1,0)
  199. end
  200.  
  201. function hideanim()
  202. equipped=false
  203. wait(0.1)
  204. bg.Parent=nil
  205. Neck.C0=necko
  206. unequipweld()
  207. end
  208.  
  209. function equipanim()
  210. equipped=true
  211. wait(0.1)
  212. equipweld()
  213. if Mode=="Sword" then
  214. Neck.C0=necko
  215. RW.C0=cf(0.5, 0.5, -0.5) * euler(1,0,0)
  216. RW.C1=cf(0, 0.5, 0) * euler(0,-1.5,0.4)
  217. LW.C0=cf(-1, 0.5, -0.5) * euler(1,0,0)
  218. LW.C1=cf(0, 0.5, 0) * euler(0,0,0)
  219. elseif Mode=="Cannon" then
  220. coroutine.resume(coroutine.create(function()
  221. bg.maxTorque = vt(math.huge,math.huge,math.huge)
  222. bg.P = 9000
  223. bg.Parent = Torso
  224. --wld1.C0 = euler(0,0,0) * cf(0,0,0)
  225. while cannonmode==true do
  226. wait()
  227. local pos4 = vt(workspace.CurrentCamera.CoordinateFrame.X,Head.Position.Y,workspace.CurrentCamera.CoordinateFrame.Z)
  228. bg.cframe = cf(Head.Position,pos4) * euler(0,3.14+GyroNumb,0) * cf(0,0,0) --cf(Torso.Position,MMouse.Hit.p) *
  229. bg.Parent = Head
  230. local pos5 = Vector3.new(MMouse.Hit.p.x,Head.Position.Y,MMouse.Hit.p.z)
  231. offset=(Torso.Position.y-MMouse.Hit.p.y)/60
  232. mag=(Torso.Position-MMouse.Hit.p).magnitude/80
  233. offset=offset/mag
  234. end
  235. for i=0,1,0.1 do
  236. wait()
  237. bg.Parent=nil
  238. end
  239. end))
  240. Neck.C0=necko*euler(0,0,1)
  241. wld1.C0=euler(1.57,0,0)*cf(0,1,0)
  242. RW.C0=cf(1.5, 0.5, 0) * euler(0,1,0)
  243. RW.C1=cf(0, 0.5, 0) * euler(0,0,0)
  244. LW.C0=cf(-1.5, 0.5, -0.5) * euler(1,1,0)
  245. LW.C1=cf(0, 0.5, 0) * euler(0,0,0)
  246. end
  247. end
  248.  
  249. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  250. return game.Workspace:FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  251. end
  252.  
  253. spread=0
  254. range=100
  255. rangepower=25
  256. function shoottrail(mouse,baseprt)
  257. coroutine.resume(coroutine.create(function(v)
  258. local spreadvector = (Vector3.new(math.random(-spread,spread),math.random(-spread,spread),math.random(-spread,spread))) * (baseprt.Position-MMouse.Hit.p).magnitude/100
  259. local dir = CFrame.new((baseprt.Position+MMouse.Hit.p)/2,MMouse.Hit.p+spreadvector)
  260. local hit,pos = rayCast(baseprt.Position,dir.lookVector,10,Character)
  261. local rangepos = range
  262. local function drawtrail(From,To)
  263. local effectsmsh = Instance.new("CylinderMesh")
  264. effectsmsh.Scale = Vector3.new(1,1,1)
  265. effectsmsh.Name = "Mesh"
  266. local effectsg = Instance.new("Part")
  267. effectsg.formFactor = 3
  268. effectsg.CanCollide = false
  269. effectsg.Name = "Eff"
  270. effectsg.Locked = true
  271. effectsg.Anchored = true
  272. effectsg.Size = Vector3.new(0.2,0.2,0.2)
  273. effectsg.Parent = workspace
  274. effectsmsh.Parent = effectsg
  275. effectsg.BrickColor = BrickColor.new("Bright red")
  276. effectsg.Reflectance = 0.25
  277. local LP = From
  278. local point1 = To
  279. local mg = (LP - point1).magnitude
  280. effectsmsh.Scale = Vector3.new(5,mg*5,5)
  281. if shootmode==true then
  282. Lightning(LP,point1,5,1,"Bright red",0.3,0.1)
  283. end
  284. effectsg.CFrame = CFrame.new((LP+point1)/2,point1) * CFrame.Angles(math.rad(90),0,0)
  285. coroutine.resume(coroutine.create(function()
  286. for i = 0 , 1 , 0.2 do
  287. wait()
  288. effectsg.Transparency = 1*i
  289. effectsmsh.Scale = Vector3.new(3-3*i,mg*5,3-3*i)
  290. end
  291. effectsg.Parent = nil
  292. end))
  293. end
  294. local newpos = baseprt.Position
  295. local inc = rangepower
  296. repeat
  297. wait()
  298. rangepos = rangepos - 10
  299. --dir = dir * CFrame.Angles(math.rad(-1),0,0)
  300. hit,pos = rayCast(newpos,dir.lookVector,inc,Character)
  301. drawtrail(newpos,pos)
  302. newpos = newpos + (dir.lookVector * inc)
  303. if hit ~= nil then
  304. if hit.Parent:FindFirstChild("Humanoid") ~= nil then
  305. hum = hit.Parent.Humanoid
  306. tTorso=hit.Parent.Torso
  307. Damagefunc1(hit,10,30)
  308. attackdebounce=false
  309. --ADmg(hum,hit)
  310. elseif hit.Parent.Parent ~= nil and hit.Parent.Parent:FindFirstChild("Humanoid") ~= nil then
  311. hum = hit.Parent.Parent.Humanoid
  312. tTorso=hit.Parent.Parent.Torso
  313. Damagefunc1(hit.Parent.Parent.Torso,10,30)
  314. attackdebounce=false
  315. --ADmg(hum,hit)
  316. end
  317. MagicCircle(BrickColor.new("Bright red"),CFrame.new(newpos),2,2,2,3,3,3)
  318. MagicBlock(BrickColor.new("Bright red"),CFrame.new(newpos),2,2,2,2,2,2)
  319. end
  320. until rangepos <= 0
  321. end))
  322. end
  323.  
  324. function shoottrail2(mouse,baseprt)
  325. coroutine.resume(coroutine.create(function(v)
  326. local spreadvector = (Vector3.new(math.random(-spread,spread),math.random(-spread,spread),math.random(-spread,spread))) * (baseprt.Position-MMouse.Hit.p).magnitude/100
  327. local dir = CFrame.new((baseprt.Position+MMouse.Hit.p)/2,MMouse.Hit.p+spreadvector)
  328. local hit,pos = rayCast(baseprt.Position,dir.lookVector,10,Character)
  329. local rangepos = range*5
  330. local function drawtrail(From,To)
  331. local effectsmsh = Instance.new("SpecialMesh")
  332. effectsmsh.Scale = Vector3.new(1,1,1)
  333. effectsmsh.Name = "Mesh"
  334. effectsmsh.MeshType = "Sphere"
  335. local effectsg = Instance.new("Part")
  336. effectsg.formFactor = 3
  337. effectsg.CanCollide = false
  338. effectsg.Name = "Eff"
  339. effectsg.Locked = true
  340. effectsg.Anchored = true
  341. effectsg.Size = Vector3.new(0.2,0.2,0.2)
  342. effectsg.Parent = workspace
  343. effectsmsh.Parent = effectsg
  344. effectsg.BrickColor = BrickColor.new("Bright red")
  345. effectsg.Reflectance = 0.25
  346. local LP = From
  347. local point1 = To
  348. local mg = (LP - point1).magnitude
  349. effectsmsh.Scale = Vector3.new(7,7,7)
  350. --for i=1,3 do
  351. Lightning(LP,point1,5,1,"Bright red",0.3,0.1)
  352. --end
  353. effectsg.CFrame = CFrame.new((LP+point1)/2,point1) * CFrame.Angles(math.rad(90),0,0)
  354. coroutine.resume(coroutine.create(function()
  355. for i = 0 , 1 , 0.1 do
  356. wait()
  357. effectsg.Transparency = 1*i
  358. effectsmsh.Scale = Vector3.new(10-10*i,mg*5,10-10*i)
  359. end
  360. effectsg.Parent = nil
  361. end))
  362. end
  363. local newpos = baseprt.Position
  364. local inc = rangepower/5
  365. repeat
  366. --wait()
  367. rangepos = rangepos - 10
  368. --dir = dir * CFrame.Angles(math.rad(-1),0,0)
  369. hit,pos = rayCast(newpos,dir.lookVector,inc,Character)
  370. drawtrail(newpos,pos)
  371. newpos = newpos + (dir.lookVector * inc)
  372. if hit ~= nil then
  373. if hit.Parent:FindFirstChild("Humanoid") ~= nil then
  374. hum = hit.Parent.Humanoid
  375. tTorso=hit.Parent.Torso
  376. Damagefunc1(hit,20,40)
  377. attackdebounce=false
  378. --ADmg(hum,hit)
  379. elseif hit.Parent.Parent ~= nil and hit.Parent.Parent:FindFirstChild("Humanoid") ~= nil then
  380. hum = hit.Parent.Parent.Humanoid
  381. tTorso=hit.Parent.Parent.Torso
  382. Damagefunc1(hit.Parent.Parent.Torso,20,40)
  383. attackdebounce=false
  384. --ADmg(hum,hit)
  385. end
  386. MagicCircle(BrickColor.new("Bright red"),CFrame.new(newpos),2,2,2,3,3,3)
  387. MagicBlock(BrickColor.new("Bright red"),CFrame.new(newpos),2,2,2,2,2,2)
  388. end
  389. until rangepos <= 0
  390. end))
  391. end
  392.  
  393. function shoottrail3(mouse,baseprt)
  394. coroutine.resume(coroutine.create(function(v)
  395. local spreadvector = (Vector3.new(math.random(-spread,spread),math.random(-spread,spread),math.random(-spread,spread))) * (baseprt.Position-MMouse.Hit.p).magnitude/100
  396. local dir = CFrame.new((baseprt.Position+MMouse.Hit.p)/2,MMouse.Hit.p+spreadvector)
  397. local hit,pos = rayCast(baseprt.Position,dir.lookVector,10,Character)
  398. local rangepos = range*50
  399. local function drawtrail(From,To)
  400. local effectsmsh = Instance.new("SpecialMesh")
  401. effectsmsh.Scale = Vector3.new(1,1,1)
  402. effectsmsh.Name = "Mesh"
  403. effectsmsh.MeshType = "FileMesh"
  404. effectsmsh.MeshId = "http://www.roblox.com/asset/?id=3270017"
  405. local effectsg = Instance.new("Part")
  406. effectsg.formFactor = 3
  407. effectsg.CanCollide = false
  408. effectsg.Name = "Eff"
  409. effectsg.Locked = true
  410. effectsg.Anchored = true
  411. effectsg.Size = Vector3.new(0.2,0.2,0.2)
  412. effectsg.Parent = workspace
  413. effectsmsh.Parent = effectsg
  414. effectsg.BrickColor = BrickColor.new("Bright red")
  415. effectsg.Reflectance = 0.25
  416. local LP = From
  417. local point1 = To
  418. local mg = (LP - point1).magnitude
  419. effectsmsh.Scale = Vector3.new(2,2,4)
  420. effectsg.CFrame = CFrame.new((LP+point1)/2,point1) * CFrame.Angles(math.rad(90),0,0)
  421. coroutine.resume(coroutine.create(function()
  422. wait()
  423. effectsg.Parent = nil
  424. end))
  425. end
  426. local newpos = baseprt.Position
  427. local inc = rangepower/10
  428. repeat
  429. wait()
  430. rangepos = rangepos - 10
  431. --dir = dir * CFrame.Angles(math.rad(-1),0,0)
  432. hit,pos = rayCast(newpos,dir.lookVector,inc,Character)
  433. drawtrail(newpos,pos)
  434. local list = game.Workspace:children()
  435. local torso = nil
  436. local dist = 100
  437. local temp = nil
  438. local human = nil
  439. local temp2 = nil
  440. for x = 1, #list do
  441. temp2 = list[x]
  442. if (temp2.className == "Model") and (temp2.Name~=Character.Name) then
  443. temp = temp2:findFirstChild("Torso")
  444. human = temp2:findFirstChild("Humanoid")
  445. if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  446. if (temp.Position - pos).magnitude < dist then
  447. torso = temp
  448. dist = (temp.Position - pos).magnitude
  449. end
  450. end
  451. end
  452. end
  453. if torso~=nil then
  454. dir=CFrame.new(pos,torso.Position)
  455. end
  456. newpos = newpos + (dir.lookVector * inc)
  457. if hit ~= nil then
  458. rangepos = 0
  459. if hit.Parent:FindFirstChild("Humanoid") ~= nil then
  460. hum = hit.Parent.Humanoid
  461. tTorso=hit.Parent.Torso
  462. Damagefunc1(hit,20,30)
  463. attackdebounce=false
  464. --ADmg(hum,hit)
  465. elseif hit.Parent.Parent ~= nil and hit.Parent.Parent:FindFirstChild("Humanoid") ~= nil then
  466. hum = hit.Parent.Parent.Humanoid
  467. tTorso=hit.Parent.Parent.Torso
  468. Damagefunc1(hit.Parent.Parent.Torso,20,30)
  469. attackdebounce=false
  470. --ADmg(hum,hit)
  471. end
  472. for i=1,math.random(3,6) do
  473. BreakEffect(BrickColor.new("Bright red"),CFrame.new(newpos),0.5,math.random(5,20),0.5)
  474. end
  475. so("http://roblox.com/asset/?id=3264793",hit,1,math.random()+math.random()+1)
  476. MagicCircle(BrickColor.new("Bright red"),CFrame.new(newpos),2,2,2,3,3,3)
  477. MagicBlock(BrickColor.new("Bright red"),CFrame.new(newpos),2,2,2,2,2,2)
  478. end
  479. until rangepos <= 0
  480. end))
  481. end
  482.  
  483. function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3)
  484. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  485. prt.Anchored=true
  486. prt.CFrame=cframe
  487. local msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  488. coroutine.resume(coroutine.create(function()
  489. for i=0,1,0.1 do
  490. wait()
  491. prt.CFrame=prt.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  492. prt.Transparency=i
  493. msh.Scale=msh.Scale+vt(x3,y3,z3)
  494. end
  495. prt.Parent=nil
  496. end))
  497. end
  498.  
  499. function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3)
  500. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  501. prt.Anchored=true
  502. prt.CFrame=cframe
  503. local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
  504. coroutine.resume(coroutine.create(function()
  505. for i=0,1,0.1 do
  506. wait()
  507. prt.CFrame=prt.CFrame
  508. prt.Transparency=i
  509. msh.Scale=msh.Scale+vt(x3,y3,z3)
  510. end
  511. prt.Parent=nil
  512. end))
  513. end
  514.  
  515. function BlastEffect(brickcolor,cframe,x1,y1,z1,x2,y2,z2)
  516. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  517. prt.Anchored=true
  518. prt.CFrame=cframe
  519. local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=20329976",vt(0,0,0),vt(x1,y1,z1))
  520. coroutine.resume(coroutine.create(function()
  521. for i=0,1,0.05 do
  522. wait()
  523. prt.Transparency=i
  524. msh.Scale=msh.Scale+vt(x2,y2,z2)
  525. end
  526. prt.Parent=nil
  527. end))
  528. end
  529.  
  530. function BreakEffect(brickcolor,cframe,x1,y1,z1)
  531. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  532. prt.Anchored=true
  533. prt.CFrame=cframe*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  534. local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
  535. coroutine.resume(coroutine.create(function(Part,CF,Numbb,randnumb)
  536. CF=Part.CFrame
  537. Numbb=0
  538. randnumb=math.random()-math.random()
  539. for i=0,1,0.05 do
  540. wait()
  541. CF=CF*cf(0,1,0)
  542. --Part.CFrame=Part.CFrame*euler(0.5,0,0)*cf(0,1,0)
  543. Part.CFrame=CF*euler(Numbb,0,0)
  544. Part.Transparency=i
  545. Numbb=Numbb+randnumb
  546. end
  547. Part.Parent=nil
  548. end),prt,CF,Numbb,randnumb)
  549. end
  550.  
  551. function SpecialEffect()
  552. local prt=part(3,workspace,1,0,BrickColor.new("White"),"Part",vt(1,1,1))
  553. prt.Anchored=true
  554. prt.CFrame=Torso.CFrame
  555. local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(0.5,0.5,0.5))
  556. coroutine.resume(coroutine.create(function(Part,Mesh)
  557. for i=0,1,0.2 do
  558. wait(0)
  559. Part.Transparency=i
  560. Mesh.Scale=Mesh.Scale+vt(10,10,10)
  561. end
  562. prt.Parent=nil
  563. end),prt,msh)
  564. end
  565.  
  566. function Lightning(p0,p1,tym,ofs,col,th,tra)
  567. local magz = (p0 - p1).magnitude local curpos = p0 local trz = {-ofs,ofs}
  568. for i=1,tym do
  569. local li = Instance.new("Part",workspace) li.TopSurface =0 li.BottomSurface = 0 li.Anchored = true li.Transparency = tra or 0.4 li.BrickColor = BrickColor.new(col)
  570. li.formFactor = "Custom" li.CanCollide = false li.Size = Vector3.new(th,th,magz/tym) local ofz = Vector3.new(trz[math.random(1,2)],trz[math.random(1,2)],trz[math.random(1,2)])
  571. local trolpos = CFrame.new(curpos,p1)*CFrame.new(0,0,magz/tym).p+ofz
  572. if tym == i then
  573. local magz2 = (curpos - p1).magnitude li.Size = Vector3.new(th,th,magz2)
  574. li.CFrame = CFrame.new(curpos,p1)*CFrame.new(0,0,-magz2/2)
  575. else
  576. li.CFrame = CFrame.new(curpos,trolpos)*CFrame.new(0,0,magz/tym/2)
  577. end
  578. curpos = li.CFrame*CFrame.new(0,0,magz/tym/2).p game.Debris:AddItem(li,.5)
  579. end
  580. end
  581.  
  582. function effect(Color,Ref,LP,P1,returnn)
  583. local effectsmsh = Instance.new("BlockMesh")
  584. effectsmsh.Scale = Vector3.new(0.4,1,0.4)
  585. effectsmsh.Name = "Mesh"
  586. local effectsg = Instance.new("Part")
  587. effectsg.formFactor = 3
  588. effectsg.CanCollide = false
  589. effectsg.Name = "Eff"
  590. effectsg.Locked = true
  591. effectsg.Anchored = true
  592. effectsg.Size = Vector3.new(0.2,1,0.2)
  593. effectsg.Parent = workspace
  594. effectsmsh.Parent = effectsg
  595. effectsg.BrickColor = BrickColor.new(Color)
  596. effectsg.Reflectance = Ref
  597. local point1 = P1
  598. local mg = (LP.p - point1.p).magnitude
  599. effectsg.Size = Vector3.new(0.4,mg,0.4)
  600. effectsg.CFrame = CFrame.new((LP.p+point1.p)/2,point1.p) * CFrame.Angles(math.rad(90),0,0)
  601. if returnn then return effectsg end
  602. coroutine.resume(coroutine.create(function()
  603. if not returnn then
  604. for i = 0 , 1 , 0.2 do
  605. wait()
  606. effectsg.Transparency = 1*i
  607. effectsmsh.Scale = Vector3.new(0.4-0.4*i,1,0.4-0.4*i)
  608. end
  609. wait()
  610. effectsg.Parent = nil
  611. end
  612. end))
  613. end
  614.  
  615. Damagefunc1=function(hit,Damage,Knockback)
  616. if hit.Parent==nil then
  617. return
  618. end
  619. CPlayer=Bin
  620. h=hit.Parent:FindFirstChild("Humanoid")
  621. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  622. if attackdebounce == false then
  623. attackdebounce = true
  624. coroutine.resume(coroutine.create(function()
  625. wait(0.2)
  626. attackdebounce = false
  627. end))
  628. Damage=Damage
  629. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  630. return
  631. end]]
  632. -- hs(hit,1.2)
  633. c=Instance.new("ObjectValue")
  634. c.Name="creator"
  635. c.Value=game.Players.LocalPlayer
  636. c.Parent=h
  637. game:GetService("Debris"):AddItem(c,.5)
  638. Damage=Damage+math.random(0,10)
  639. -- h:TakeDamage(Damage)
  640. blocked=false
  641. block=hit.Parent:findFirstChild("Block")
  642. if block~=nil then
  643. print("herp")
  644. if block.Value>0 then
  645. blocked=true
  646. block.Value=block.Value-1
  647. print(block.Value)
  648. end
  649. end
  650. if blocked==false then
  651. -- h:TakeDamage(Damage)
  652. h.Health=h.Health-Damage
  653. showDamage(hit.Parent,Damage,.5)
  654. else
  655. h:TakeDamage(1)
  656. showDamage(hit.Parent,1,.5)
  657. end
  658. vp=Instance.new("BodyVelocity")
  659. vp.P=500
  660. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  661. -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback
  662. vp.velocity=Head.CFrame.lookVector*Knockback+Head.Velocity/1.05
  663. if Knockback>0 then
  664. vp.Parent=hit.Parent.Torso
  665. end
  666. game:GetService("Debris"):AddItem(vp,.25)
  667. game:GetService("Debris"):AddItem(r,.5)
  668. c=Instance.new("ObjectValue")
  669. c.Name="creator"
  670. c.Value=Player
  671. c.Parent=h
  672. game:GetService("Debris"):AddItem(c,.5)
  673. CRIT=false
  674. hitDeb=true
  675. AttackPos=6
  676. end
  677. end
  678. end
  679. Damagefuncbr=function(hit,Damage,Knockback)
  680. if hit.Parent==nil then
  681. return
  682. end
  683. CPlayer=Bin
  684. h=hit.Parent:FindFirstChild("Humanoid")
  685. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  686. if attackdebounce == false then
  687. attackdebounce = true
  688. coroutine.resume(coroutine.create(function()
  689. wait(0.2)
  690. attackdebounce = false
  691. end))
  692. Damage=Damage
  693. for i=1,math.random(3,6) do
  694. BreakEffect(BrickColor.new("Bright red"),hit.Parent.Torso.CFrame,0.5,math.random(5,20),0.5)
  695. end
  696. coroutine.resume(coroutine.create(function(Part)
  697. for i=1,5 do
  698. wait()
  699. Part.CFrame=Head.CFrame*cf(0,0,-3)
  700. MagicBlock(BrickColor.new("Bright red"),Part.CFrame*cf(0,0,0),1,1,1,1,1,1)
  701. end
  702. end),hit.Parent.Torso)
  703. so("http://roblox.com/asset/?id=3264793",hit.Parent.Torso,1,math.random()+math.random()+1)
  704. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  705. return
  706. end]]
  707. -- hs(hit,1.2)
  708. c=Instance.new("ObjectValue")
  709. c.Name="creator"
  710. c.Value=game.Players.LocalPlayer
  711. c.Parent=h
  712. game:GetService("Debris"):AddItem(c,.5)
  713. Damage=Damage+math.random(0,10)
  714. -- h:TakeDamage(Damage)
  715. blocked=false
  716. block=hit.Parent:findFirstChild("Block")
  717. if block~=nil then
  718. print("herp")
  719. if block.Value>0 then
  720. blocked=true
  721. block.Value=block.Value-1
  722. print(block.Value)
  723. end
  724. end
  725. if blocked==false then
  726. -- h:TakeDamage(Damage)
  727. h.Health=h.Health-Damage
  728. showDamage(hit.Parent,Damage,.5)
  729. else
  730. h:TakeDamage(1)
  731. showDamage(hit.Parent,1,.5)
  732. end
  733. vp=Instance.new("BodyVelocity")
  734. vp.P=500
  735. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  736. -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback
  737. vp.velocity=Head.CFrame.lookVector*Knockback
  738. vp.Parent=hit.Parent.Torso
  739. game:GetService("Debris"):AddItem(vp,1)
  740. c=Instance.new("ObjectValue")
  741. c.Name="creator"
  742. c.Value=Player
  743. c.Parent=h
  744. game:GetService("Debris"):AddItem(c,.5)
  745. CRIT=false
  746. hitDeb=true
  747. AttackPos=6
  748. end
  749. end
  750. end
  751. Damagefunc2=function(hit,Damage,Knockback)
  752. if attackdebounce == false then
  753. -- attackdebounce = true
  754. coroutine.resume(coroutine.create(function()
  755. wait(0.1)
  756. attackdebounce = false
  757. end))
  758. if hit.Parent==nil then
  759. return
  760. end
  761. CPlayer=Bin
  762. blocked=false
  763. h=hit.Parent:FindFirstChild("Humanoid")
  764. if h~=nil and hit.Parent:FindFirstChild("Torso")~=nil then
  765. Damage=Damage
  766. c=it("ObjectValue")
  767. c.Name="creator"
  768. c.Value=game.Players.LocalPlayer
  769. c.Parent=h
  770. game:GetService("Debris"):AddItem(c,.5)
  771. -- print(c.Value)
  772. --[[ if math.random(0,99)+math.random()<=7.8 then
  773. CRIT=true
  774. Damage=Damage*2
  775. s=it("Sound")
  776. s.SoundId="http://www.roblox.com/asset/?id=2801263"
  777. s.Volume=1
  778. s.Pitch=2
  779. s.Parent=hit
  780. s.PlayOnRemove=true
  781. s.Parent=nil
  782.  
  783. end]]
  784. Damage=Damage+math.random(0,10)
  785. -- Blood(hit.CFrame*cf(math.random(-10,10)/10,math.random(-10,10)/10,0),math.floor(Damage/2))
  786. blocked=false
  787. block=hit.Parent:findFirstChild("Block")
  788. if block~=nil then
  789. print("herp")
  790. if block.Value>0 then
  791. blocked=true
  792. block.Value=block.Value-3
  793. print(block.Value)
  794. end
  795. end
  796. if blocked==false then
  797. -- h:TakeDamage(Damage)
  798. h.Health=h.Health-Damage
  799. showDamage(hit.Parent,Damage,.5)
  800. else
  801. h:TakeDamage(1)
  802. showDamage(hit.Parent,1,.5)
  803. end
  804. --if blocked==false then
  805. local angle = (hit.Position-(Torso.Position+Vector3.new(0,0,0))).unit
  806. print(angle)
  807. --hit.CFrame=CFrame.new(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
  808. rl=Instance.new("BodyAngularVelocity")
  809. rl.P=3000
  810. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  811. rl.angularvelocity=Vector3.new(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  812. rl.Parent=hit
  813. coroutine.resume(coroutine.create(function(vel)
  814. wait(0.5)
  815. vel:Remove()
  816. end),rl)
  817. --end
  818. local bodyVelocity=Instance.new("BodyVelocity")
  819. bodyVelocity.velocity=angle*40+Vector3.new(0,0,0)
  820. bodyVelocity.P=5000
  821. bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  822. bodyVelocity.Parent=hit
  823. coroutine.resume(coroutine.create(function(Vel)
  824. wait(0.2)
  825. Vel:Remove()
  826. end),bodyVelocity)
  827. c=it("ObjectValue")
  828. c.Name="creator"
  829. c.Value=Player
  830. c.Parent=h
  831. game:GetService("Debris"):AddItem(c,.5)
  832. CRIT=false
  833. hitDeb=true
  834. AttackPos=6
  835. end
  836. end
  837. end
  838.  
  839. showDamage=function(Char,Dealt,du)
  840. m=Instance.new("Model")
  841. m.Name=tostring(Dealt)
  842. h=Instance.new("Humanoid")
  843. h.Health=0
  844. h.MaxHealth=0
  845. h.Parent=m
  846. c=Instance.new("Part")
  847. c.Transparency=0
  848. c.BrickColor=BrickColor:Red()
  849. if CRIT==true then
  850. c.BrickColor=BrickColor.new("Really red")
  851. end
  852. c.Name="Head"
  853. c.TopSurface=0
  854. c.BottomSurface=0
  855. c.formFactor="Plate"
  856. c.Size=Vector3.new(1,.4,1)
  857. ms=Instance.new("CylinderMesh")
  858. ms.Scale=Vector3.new(.8,.8,.8)
  859. if CRIT==true then
  860. ms.Scale=Vector3.new(1,1.25,1)
  861. end
  862. ms.Parent=c
  863. c.Reflectance=0
  864. Instance.new("BodyGyro").Parent=c
  865. c.Parent=m
  866. c.CFrame=CFrame.new(Char["Head"].CFrame.p+Vector3.new(0,1.5,0))
  867. f=Instance.new("BodyPosition")
  868. f.P=2000
  869. f.D=100
  870. f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  871. f.position=c.Position+Vector3.new(0,3,0)
  872. f.Parent=c
  873. game:GetService("Debris"):AddItem(m,.5+du)
  874. c.CanCollide=false
  875. m.Parent=workspace
  876. c.CanCollide=false
  877. end
  878.  
  879. function oneslash()
  880. attack=true
  881. combo=1
  882. for i=0,1,0.1 do
  883. wait()
  884. Neck.C0=necko*euler(0,0,1*i)
  885. RW.C0=cf(0.5+1*i, 0.5, -0.5+0.5*i) * euler(1+2*i,0,0)
  886. RW.C1=cf(0, 0.5, 0) * euler(0,-1.5+1.5*i,0.4-0.4*i)
  887. LW.C0=cf(-1+1*i, 0.5+0.6*i, -0.5) * euler(1+2*i,0,0)
  888. LW.C1=cf(0, 0.5, 0) * euler(0,0,-1*i)
  889. end
  890. so("http://roblox.com/asset/?id=10209640",prt7,1,0.6)
  891. con1=hitbox.Touched:connect(function(hit) Damagefunc1(hit,25,20) end)
  892. for i=0,1,0.1 do
  893. wait()
  894. Neck.C0=necko*euler(0,0,1-2*i)
  895. RW.C0=cf(1.5, 0.5, 0) * euler(3-3*i,-0.2*i,0)
  896. RW.C1=cf(0, 0.5, 0) * euler(0,0,0)
  897. LW.C0=cf(0.5*i, 1.1-1*i, -0.5) * euler(3-3.5*i,0.5*i,0)
  898. LW.C1=cf(0, 0.5, 0) * euler(0,0,-1)
  899. end
  900. con1:disconnect()
  901. wait(0.2)
  902. --Neck.C0=necko
  903. attack=false
  904. end
  905.  
  906. function twoslash()
  907. attack=true
  908. combo=2
  909. for i=0,1,0.1 do
  910. wait()
  911. Neck.C0=necko*euler(0,0,-1)
  912. RW.C0=cf(1.5-0.5*i, 0.5, -0.5*i) * euler(1.5*i,-0.2+1.77*i,0)
  913. RW.C1=cf(0, 0.5, 0) * euler(-0.5*i,0,0)
  914. LW.C0=cf(0.5-1*i, 0.1+0.4*i, -0.5+0.5*i) * euler(-0.5+2.07*i,0.5+1.07*i,0)
  915. LW.C1=cf(0, 0.5, 0) * euler(0,0,-1+1*i)
  916. end
  917. so("http://roblox.com/asset/?id=10209640",prt7,1,0.7)
  918. con1=hitbox.Touched:connect(function(hit) Damagefunc1(hit,25,30) end)
  919. for i=0,1,0.1 do
  920. wait()
  921. Neck.C0=necko*euler(0,0,-1+2*i)
  922. RW.C0=cf(1.5-0.5, 0.5, -0.5) * euler(1.5,1.57,0)
  923. RW.C1=cf(0, 0.5, 0) * euler(-0.5+2*i,0,0)
  924. LW.C0=cf(-0.5+1*i, 0.5, -1*i) * euler(1.57,1.57,0)
  925. LW.C1=cf(0, 0.5, 0) * euler(1*i,0,0)
  926. end
  927. con1:disconnect()
  928. attack=false
  929. end
  930.  
  931. function Shoot()
  932. attack=true
  933. shoottrail(mouse,prt7)
  934. so("rbxasset://sounds/Launching rocket.wav",prt7,1,3)
  935. for i=0,1,0.2 do
  936. wait()
  937. wld1.C0=euler(1.57,0,0)*cf(0,1,0)
  938. RW.C0=cf(1.5, 0.5, 0) * euler(0,1,0)
  939. RW.C1=cf(0, 0.5, 0) * euler(0.3*i,0,0)
  940. LW.C0=cf(-1.5, 0.5, -0.5) * euler(1-0.3*i,1,0)
  941. end
  942. for i=0,1,0.2 do
  943. wait()
  944. wld1.C0=euler(1.57,0,0)*cf(0,1,0)
  945. RW.C0=cf(1.5, 0.5, 0) * euler(0,1,0)
  946. RW.C1=cf(0, 0.5, 0) * euler(0.3-0.3*i,0,0)
  947. LW.C0=cf(-1.5, 0.5, -0.5) * euler(1-0.3+0.3*i,1,0)
  948. end
  949. attack=false
  950. end
  951.  
  952. function GroundBlast()
  953. attack=true
  954. Humanoid.WalkSpeed=0
  955. for i=0,1,0.1 do
  956. wait()
  957. Neck.C0=necko
  958. wld1.C0=euler(1.57+0.4+2.64*i,0,0)*cf(0,1,0)
  959. RW.C0=cf(0.5+1*i, 0.5, -0.5+0.5*i) * euler(1+2.5*i,0,0)
  960. RW.C1=cf(0, 0.5, 0) * euler(0,-1.5+1.5*i,0.4-0.4*i)
  961. LW.C0=cf(-1+1*i, 0.5+0.5*i, -0.5) * euler(1+2.5*i,0,1*i)
  962. end
  963. so("http://www.roblox.com/asset/?id=2101137",prt7,1,0.75)
  964. for i=1,25 do
  965. wait()
  966. MagicCircle(BrickColor.new("Bright red"),prt7.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),0.1,2,0.1,0.5,5,0.5)
  967. end
  968. for i=0,1,0.2 do
  969. wait()
  970. RW.C0=cf(1.5, 0.5, 0) * euler(3.5-2*i,0,0)
  971. LW.C0=cf(0.3*i, 1-0.5*i, -0.5) * euler(3.5-2.3*i,0,1)
  972. end
  973. so("http://www.roblox.com/asset/?id=2697431",prt7,1,0.2)
  974. BlastPos=prt7.Position+vt(0,-1,0)
  975. MagicCircle(BrickColor.new("Bright red"),prt7.CFrame*cf(0,1,0),1,1,1,10,10,10)
  976. MagicBlock(BrickColor.new("Really red"),prt7.CFrame*cf(0,1,0),1,1,1,5,5,5)
  977. MagicBlock(BrickColor.new("Bright red"),prt7.CFrame*cf(0,1,0),1,1,1,7,7,7)
  978. local c = game.Workspace:GetChildren()
  979. for i = 1, #c do
  980. local hum = c[i]:findFirstChild("Humanoid")
  981. if hum ~= nil and hum.Health ~= 0 then
  982. local head = c[i]:findFirstChild("Head")
  983. if head ~= nil then
  984. local targ = head.Position - BlastPos
  985. local mag = targ.magnitude
  986. if mag <= 20 and c[i].Name ~= Player.Name then
  987. attackdebounce=false
  988. Damagefunc2(head,25,30)
  989. end
  990. end
  991. end
  992. end
  993. wait(0.5)
  994. for i=0,1,0.1 do
  995. wait()
  996. wld1.C0=euler(4.61-2.64*i,0,0)*cf(0,1,0)
  997. RW.C0=cf(1.5-1*i, 0.5, -0.5*i) * euler(1.5-0.5*i,0,0)
  998. RW.C1=cf(0, 0.5, 0) * euler(0,-1.5*i,0.4*i)
  999. LW.C0=cf(0.3-1.3*i, 0.5, -0.5) * euler(1.2-0.2*i,0,1-1*i)
  1000. end
  1001. Humanoid.WalkSpeed=16
  1002. attack=false
  1003. end
  1004.  
  1005. function BreakSlash()
  1006. attack=true
  1007. coroutine.resume(coroutine.create(function()
  1008. bg.maxTorque = vt(math.huge,math.huge,math.huge)
  1009. bg.P = 20000
  1010. bg.Parent = Torso
  1011. --wld1.C0 = euler(0,0,0) * cf(0,0,0)
  1012. while attack==true and spinning==false do
  1013. wait()
  1014. local pos4 = vt(workspace.CurrentCamera.CoordinateFrame.X,Head.Position.Y,workspace.CurrentCamera.CoordinateFrame.Z)
  1015. bg.cframe = cf(Head.Position,pos4) * euler(0,3.14+GyroNumb,0) * cf(0,0,0) --cf(Torso.Position,MMouse.Hit.p) *
  1016. bg.Parent = Head
  1017. local pos5 = Vector3.new(MMouse.Hit.p.x,Head.Position.Y,MMouse.Hit.p.z)
  1018. offset=(Torso.Position.y-MMouse.Hit.p.y)/60
  1019. mag=(Torso.Position-MMouse.Hit.p).magnitude/80
  1020. offset=offset/mag
  1021. end
  1022. for i=0,1,0.1 do
  1023. wait()
  1024. bg.Parent=nil
  1025. end
  1026. end))
  1027. for i=0,1,0.1 do
  1028. wait()
  1029. Neck.C0=necko*euler(0,0,-1*i)
  1030. RW.C0=cf(0.5, 0.5, -0.5) * euler(1+0.57*i,0,0)
  1031. RW.C1=cf(0, 0.5, 0) * euler(0,-1.5,0.4+0.4*i)
  1032. LW.C0=cf(-1, 0.5, -0.5+0.5*i) * euler(1+0.57*i,0,0)
  1033. LW.C1=cf(0, 0.5, 0) * euler(0,0,0)
  1034. end
  1035. wait(0.3)
  1036. so("http://roblox.com/asset/?id=10209640",prt7,1,0.7)
  1037. con1=hitbox.Touched:connect(function(hit) Damagefuncbr(hit,25,1) end)
  1038. for i=0,1,0.1 do
  1039. wait()
  1040. MagicBlock(BrickColor.new("Really red"),hitbox.CFrame*cf(math.random()+math.random(-1,0),math.random()+math.random(-2,1),math.random()+math.random(-1,0)),1,1,1,0.5,0.5,0.5)
  1041. wld1.C0=euler(1.57+0.4+0.4*i,0,0)*cf(0,1,0)
  1042. Neck.C0=necko*euler(0,0,-1+2.57*i)
  1043. RW.C0=cf(0.5+1*i, 0.5, -0.5+0.5*i) * euler(1.57,0,0)
  1044. RW.C1=cf(0, 0.5, 0) * euler(0,-1.5,0.8-1.6*i)
  1045. LW.C0=cf(-1+1.5*i, 0.5, -0.5*i) * euler(1.57,0,0)
  1046. LW.C1=cf(0, 0.5, 0) * euler(0,0,-1*i)
  1047. end
  1048. con1:disconnect()
  1049. DoBreak=false
  1050. for i=1,10 do
  1051. wait()
  1052. if BreakNumb==1 then
  1053. DoBreak=true
  1054. end
  1055. end
  1056. if DoBreak==true then
  1057. for i=0,1,0.2 do
  1058. wait()
  1059. wld1.C0=euler(1.57+0.4+0.4-0.4*i,0,0)*cf(0,1,0)
  1060. Neck.C0=necko*euler(0,0,-1+2.57-2.57*i)
  1061. RW.C0=cf(1.5-1*i, 0.5, -0.5*i) * euler(1.57,0,0)
  1062. RW.C1=cf(0, 0.5, 0) * euler(0,-1.5,0.8-1.6+1.6*i)
  1063. LW.C0=cf(-1+1.5-1.5*i, 0.5, -0.5+0.5*i) * euler(1.57,0,0)
  1064. LW.C1=cf(0, 0.5, 0) * euler(0,0,-1+1*i)
  1065. end
  1066. so("http://www.roblox.com/asset/?id=2101137",prt7,1,0.8)
  1067. for i=0,10 do
  1068. wait()
  1069. MagicBlock(BrickColor.new("Really red"),hitbox.CFrame,1,1,1,2,2,2)
  1070. end
  1071. local vel2 = Instance.new("BodyVelocity")
  1072. vel2.Parent = Torso
  1073. vel2.maxForce = vt(4e+005,4e+005,4e+005)*1
  1074. vel2.velocity = Head.CFrame.lookVector*20
  1075. bg.Parent=Torso
  1076. CF = Torso.CFrame
  1077. con1=hitbox.Touched:connect(function(hit) Damagefuncbr(hit,10,10) end)
  1078. spinning=true
  1079. durnumb=0
  1080. for i=1,5 do
  1081. for i=0,1,0.1 do
  1082. if durnumb==7 then
  1083. so("rbxasset://sounds\\swordlunge.wav",prt7,0.5,0.7)
  1084. durnumb=0
  1085. end
  1086. bg.Parent=Torso
  1087. bg.cframe=CF*euler(0,-6.283*i,0)
  1088. MagicBlock(BrickColor.new("Really red"),hitbox.CFrame*cf(math.random()+math.random(-1,0),math.random()+math.random(-2,1),math.random()+math.random(-1,0)),1,1,1,0.5,0.5,0.5)
  1089. durnumb=durnumb+1
  1090. wait()
  1091. end
  1092. end
  1093. spinning=false
  1094. con1:disconnect()
  1095. vel2.Parent=nil
  1096. bg.Parent=nil
  1097. end
  1098. wait(1)
  1099. bg.P = 9000
  1100. wld1.C0=euler(1.57+0.4,0,0)*cf(0,1,0)
  1101. Neck.C0=necko
  1102. RW.C0=cf(0.5, 0.5, -0.5) * euler(1,0,0)
  1103. RW.C1=cf(0, 0.5, 0) * euler(0,-1.5,0.4)
  1104. LW.C0=cf(-1, 0.5, -0.5) * euler(1,0,0)
  1105. LW.C1=cf(0, 0.5, 0) * euler(0,0,0)
  1106. attack=false
  1107. end
  1108.  
  1109. function GroundWave()
  1110. attack=true
  1111. for i=0,1,0.1 do
  1112. wait()
  1113. wld1.C0=euler(1.57+0.4+2.64*i,0,-0.4*i)*cf(0,1,0)
  1114. RW.C0=cf(0.5, 0.5+1*i, -0.5) * euler(1+2.5*i,0,0)
  1115. RW.C1=cf(0, 0.5, 0) * euler(0,-1.5+1.5*i,0.4)
  1116. LW.C0=cf(-1+0.5*i, 0.5+1*i, -0.5) * euler(1+2.5*i,0,0)
  1117. LW.C1=cf(0, 0.5, 0) * euler(0,0,-0.4*i)
  1118. end
  1119. so("http://roblox.com/asset/?id=10209640",prt7,1,0.6)
  1120. for i=0,1,0.1 do
  1121. wait()
  1122. RW.C0=cf(0.5, 1.5-1*i, -0.5) * euler(3.5-2*i,0,0)
  1123. LW.C0=cf(-0.5, 1.5-1*i, -0.5) * euler(3.5-2*i,0,0)
  1124. end
  1125. coroutine.resume(coroutine.create(function()
  1126. CF=Torso.CFrame
  1127. numb=-5
  1128. BaseCF=CF
  1129. for i=1,8 do
  1130. BaseCF=CF*cf(0,-2,numb)
  1131. local baseprt=part(3,workspace,0,1,BrickColor.new("Black"),"Part1",vt(1,1,1))
  1132. baseprt.Anchored=true
  1133. baseprt.CFrame=BaseCF
  1134. game:GetService("Debris"):AddItem(baseprt,.5)
  1135. local c = game.Workspace:GetChildren()
  1136. for i = 1, #c do
  1137. local hum = c[i]:findFirstChild("Humanoid")
  1138. if hum ~= nil and hum.Health ~= 0 then
  1139. local head = c[i]:findFirstChild("Head")
  1140. if head ~= nil then
  1141. local targ = head.Position - baseprt.Position
  1142. local mag = targ.magnitude
  1143. if mag <= 7 and c[i].Name ~= Player.Name then
  1144. attackdebounce=false
  1145. Damagefunc1(head,10,30)
  1146. end
  1147. end
  1148. end
  1149. end
  1150. so("http://www.roblox.com/asset/?id=2697431",baseprt,5,0.4)
  1151. MagicBlock(BrickColor.new("Bright red"),BaseCF,0.5,0.5,0.5,2,2,2)
  1152. BlastEffect(BrickColor.new("Bright red"),BaseCF,0.5,0.5,0.5,0.5,0.5,0.5)
  1153. numb=numb-3
  1154. wait(0.2)
  1155. end
  1156. end))
  1157. wait(1)
  1158. for i=0,1,0.1 do
  1159. wait()
  1160. wld1.C0=euler(1.57+0.4+2.64-2.64*i,0,-0.4+0.4*i)*cf(0,1,0)
  1161. RW.C0=cf(0.5, 0.5, -0.5) * euler(1.5-0.5*i,0,0)
  1162. RW.C1=cf(0, 0.5, 0) * euler(0,-1.5*i,0.4)
  1163. LW.C0=cf(-0.5-0.5*i, 0.5, -0.5) * euler(1.5-0.5*i,0,0)
  1164. LW.C1=cf(0, 0.5, 0) * euler(0,0,-0.4+0.4*i)
  1165. end
  1166. attack=false
  1167. end
  1168.  
  1169. function MegaBlast()
  1170. attack=true
  1171. so("http://www.roblox.com/asset/?id=2974000",prt7,1,0.6)
  1172. MagicCircle(BrickColor.new("Bright red"),prt7.CFrame,1,1,1,2,2,2)
  1173. for i=1,10 do
  1174. wait(0.1)
  1175. MagicBlock(BrickColor.new("Bright red"),prt7.CFrame*cf(math.random(-1,1),math.random(-1,1),math.random(-1,1)),0,0,0,0.5,0.5,0.5)
  1176. end
  1177. wait(0.5)
  1178. so("http://www.roblox.com/asset/?id=2974249",prt7,1,0.6)
  1179. so("http://www.roblox.com/asset?id=1369158",prt7,1,2)
  1180. shoottrail2(mouse,prt7)
  1181. MagicCircle(BrickColor.new("Bright red"),prt7.CFrame,1,1,1,3,3,3)
  1182. attack=false
  1183. end
  1184.  
  1185. function BreakStab()
  1186. attack=true
  1187. doringeffect=true
  1188. for i=0,1,0.1 do
  1189. wait()
  1190. Neck.C0=necko*euler(0,0,1+1*i)
  1191. RW.C0=cf(1.5, 0.5, 0) * euler(0,1,0.5*i)
  1192. LW.C0=cf(-1.5, 0.5, -0.5) * euler(1,1,0.5*i)
  1193. end
  1194. so("http://www.roblox.com/asset/?id=2101137",prt7,1,0.75)
  1195. MagicCircle(BrickColor.new("Bright red"),prt7.CFrame,1,1,1,2,2,2)
  1196. local ring=part(3,modelzorz,0,1,BrickColor.new("Bright red"),"Ring",vt(1,1,1))
  1197. local ringmsh=mesh("SpecialMesh",ring,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(2,2,4))
  1198. local ringwld=weld(ring,ring,prt7,euler(0,1.57,0))
  1199. coroutine.resume(coroutine.create(function(Part,Weld)
  1200. for i=1,0,-0.02 do
  1201. wait()
  1202. Part.Transparency=i
  1203. Weld.C0=Weld.C0*euler(1,0,0)
  1204. MagicBlock(BrickColor.new("Bright red"),Part.CFrame*cf(0,1,0),0,0,0,0.5,0.5,0.5)
  1205. end
  1206. while doringeffect==true do
  1207. wait()
  1208. Weld.C0=Weld.C0*euler(1,0,0)
  1209. MagicBlock(BrickColor.new("Bright red"),Part.CFrame*cf(0,1,0),0,0,0,0.5,0.5,0.5)
  1210. end
  1211. end),ring,ringwld)
  1212. wait(2)
  1213. doringeffect=false
  1214. for i=0,1,0.1 do
  1215. wait()
  1216. Neck.C0=necko*euler(0,0,2)
  1217. RW.C0=cf(1.5, 0.5, 0) * euler(1.57*i,1+0.57*i,0.5-0.5*i)
  1218. RW.C1=cf(0, 0.5, 0) * euler(0.5*i,0,0)
  1219. LW.C0=cf(-1.5, 0.5, -0.5) * euler(1+0.57*i,1+0.57*i,0.5-0.5*i)
  1220. end
  1221. so("http://roblox.com/asset/?id=10209640",prt7,1,0.7)
  1222. for i=0,1,0.1 do
  1223. wait()
  1224. Neck.C0=necko*euler(0,0,2-2*i)
  1225. end
  1226. ring.Parent=nil
  1227. shoottrail3(mouse,prt7)
  1228. for i=0,1,0.1 do
  1229. wait()
  1230. Neck.C0=necko*euler(0,0,-2*i)
  1231. end
  1232. wait(1)
  1233. for i=0,1,0.1 do
  1234. wait()
  1235. Neck.C0=necko*euler(0,0,-2+3*i)
  1236. RW.C0=cf(1.5, 0.5, 0) * euler(1.57-1.57*i,1.57-0.57*i,0)
  1237. RW.C1=cf(0, 0.5, 0) * euler(0.5-0.5*i,0,0)
  1238. LW.C0=cf(-1.5, 0.5, -0.5) * euler(1.57-0.57*i,1.57-0.57*i,0)
  1239. end
  1240. attack=false
  1241. end
  1242.  
  1243. function ob1d(mouse)
  1244. if attack == true then return end
  1245. hold=true
  1246. if Mode=="Sword" then
  1247. attack=true
  1248. coroutine.resume(coroutine.create(function()
  1249. bg.maxTorque = vt(math.huge,math.huge,math.huge)
  1250. bg.P = 9000
  1251. bg.Parent = Torso
  1252. --wld1.C0 = euler(0,0,0) * cf(0,0,0)
  1253. while attack==true do
  1254. wait()
  1255. local pos4 = vt(workspace.CurrentCamera.CoordinateFrame.X,Head.Position.Y,workspace.CurrentCamera.CoordinateFrame.Z)
  1256. bg.cframe = cf(Head.Position,pos4) * euler(0,3.14+GyroNumb,0) * cf(0,0,0) --cf(Torso.Position,MMouse.Hit.p) *
  1257. bg.Parent = Head
  1258. local pos5 = Vector3.new(MMouse.Hit.p.x,Head.Position.Y,MMouse.Hit.p.z)
  1259. offset=(Torso.Position.y-MMouse.Hit.p.y)/60
  1260. mag=(Torso.Position-MMouse.Hit.p).magnitude/80
  1261. offset=offset/mag
  1262. end
  1263. for i=0,1,0.1 do
  1264. wait()
  1265. bg.Parent=nil
  1266. end
  1267. end))
  1268. if combo==0 then
  1269. oneslash()
  1270. elseif combo==1 then
  1271. twoslash()
  1272. else
  1273. wait(0.3)
  1274. Neck.C0=necko
  1275. RW.C0=cf(0.5, 0.5, -0.5) * euler(1,0,0)
  1276. RW.C1=cf(0, 0.5, 0) * euler(0,-1.5,0.4)
  1277. LW.C0=cf(-1, 0.5, -0.5) * euler(1,0,0)
  1278. LW.C1=cf(0, 0.5, 0) * euler(0,0,0)
  1279. attack=false
  1280. end
  1281. coroutine.resume(coroutine.create(function()
  1282. wait(0.5)
  1283. if attack==false then
  1284. combo=0
  1285. Neck.C0=necko
  1286. RW.C0=cf(0.5, 0.5, -0.5) * euler(1,0,0)
  1287. RW.C1=cf(0, 0.5, 0) * euler(0,-1.5,0.4)
  1288. LW.C0=cf(-1, 0.5, -0.5) * euler(1,0,0)
  1289. LW.C1=cf(0, 0.5, 0) * euler(0,0,0)
  1290. end
  1291. end))
  1292. elseif Mode=="Cannon" then
  1293. Shoot()
  1294. end
  1295. end
  1296.  
  1297. function ob1u(mouse)
  1298. hold = false
  1299. end
  1300.  
  1301. buttonhold = false
  1302.  
  1303. eul=0
  1304. BreakNumb=0
  1305. function key(key)
  1306. if key=="x" then
  1307. BreakNumb=BreakNumb+1
  1308. coroutine.resume(coroutine.create(function()
  1309. wait()
  1310. BreakNumb=0
  1311. end))
  1312. end
  1313. if attack == true then return end
  1314. if key=="f" then
  1315. BreakEffect(BrickColor.new("Bright red"),Torso.CFrame,0.5,math.random(5,20),0.5)
  1316. end
  1317. if Mode=="Sword" then
  1318. if key=="z" then
  1319. GroundBlast()
  1320. end
  1321. if key=="x" then
  1322. BreakSlash()
  1323. end
  1324. if key=="c" then
  1325. GroundWave()
  1326. end
  1327. elseif Mode=="Cannon" then
  1328. if key=="z" then
  1329. MegaBlast()
  1330. end
  1331. if key=="x" then
  1332. BreakStab()
  1333. end
  1334. end
  1335. if key=="v" then
  1336. if Mode=="Sword" then
  1337. Mode="Cannon"
  1338. for i=0,1,0.1 do
  1339. wait()
  1340. wld1.C0=euler(1.57+0.4-0.4*i,0,0)*cf(0,1,0)
  1341. RW.C0=cf(0.5+1*i, 0.5, -0.5+0.5*i) * euler(1+1.5*i,0,0)
  1342. RW.C1=cf(0, 0.5, 0) * euler(0,-1.5+1.5*i,0.4-0.4*i)
  1343. LW.C0=cf(-1+1.3*i, 0.5, -0.5-0.3*i) * euler(1+1.7*i,0,1*i)
  1344. end
  1345. so("rbxasset://sounds\\unsheath.wav",prt7,1,0.5)
  1346. for i=0,1,0.2 do
  1347. wait()
  1348. BladeNumb=0.8+0.7*i
  1349. msh6.Scale=vt(0.5,0.5,1.3+1.4*i)
  1350. RW.C0=cf(1.5, 0.5, 0) * euler(2.5-1*i,0,0)
  1351. LW.C0=cf(0.3, 0.5, -0.8) * euler(2.7-1.2*i,0,1)
  1352. end
  1353. for i=0,1,0.1 do
  1354. wait()
  1355. RW.C0=cf(1.5, 0.5, 0) * euler(2.5-1+0.3*i,0,0)
  1356. LW.C0=cf(0.3, 0.5, -0.8) * euler(2.7-1.2+0.4*i,0,1)
  1357. end
  1358. cannonmode=true
  1359. coroutine.resume(coroutine.create(function()
  1360. bg.maxTorque = vt(math.huge,math.huge,math.huge)
  1361. bg.P = 9000
  1362. bg.Parent = Torso
  1363. --wld1.C0 = euler(0,0,0) * cf(0,0,0)
  1364. while cannonmode==true do
  1365. wait()
  1366. local pos4 = vt(workspace.CurrentCamera.CoordinateFrame.X,Head.Position.Y,workspace.CurrentCamera.CoordinateFrame.Z)
  1367. bg.cframe = cf(Head.Position,pos4) * euler(0,3.14+GyroNumb,0) * cf(0,0,0) --cf(Torso.Position,MMouse.Hit.p) *
  1368. bg.Parent = Head
  1369. local pos5 = Vector3.new(MMouse.Hit.p.x,Head.Position.Y,MMouse.Hit.p.z)
  1370. offset=(Torso.Position.y-MMouse.Hit.p.y)/60
  1371. mag=(Torso.Position-MMouse.Hit.p).magnitude/80
  1372. offset=offset/mag
  1373. end
  1374. for i=0,1,0.1 do
  1375. wait()
  1376. bg.Parent=nil
  1377. end
  1378. end))
  1379. for i=0,1,0.1 do
  1380. wait()
  1381. Neck.C0=necko*euler(0,0,1*i)
  1382. RW.C0=cf(1.5, 0.5, 0) * euler(1.8-1.8*i,1*i,0)
  1383. LW.C0=cf(0.3-1.8*i, 0.5, -0.8+0.3*i) * euler(1.9-0.9*i,1*i,1-1*i)
  1384. end
  1385. elseif Mode=="Cannon" then
  1386. Mode="Sword"
  1387. for i=0,1,0.1 do
  1388. wait()
  1389. Neck.C0=necko*euler(0,0,1-1*i)
  1390. RW.C0=cf(1.5, 0.5, 0) * euler(1.5*i,1-1*i,0)
  1391. LW.C0=cf(-1.5+1.7*i, 0.5, -0.5-0.1*i) * euler(1+0.2*i,1-1*i,1*i)
  1392. end
  1393. cannonmode=false
  1394. so("rbxasset://sounds\\unsheath.wav",prt7,1,0.7)
  1395. for i=0,1,0.1 do
  1396. wait()
  1397. BladeNumb=1.5-0.7*i
  1398. msh6.Scale=vt(0.5,0.5,2.7-1.4*i)
  1399. RW.C0=cf(1.5, 0.5, 0) * euler(1.5+0.5*i,0,0)
  1400. LW.C0=cf(0.2, 0.5+0.2*i, -0.6) * euler(1.2+0.6*i,0,1)
  1401. end
  1402. for i=0,1,0.1 do
  1403. wait()
  1404. wld1.C0=euler(1.57+0.4*i,0,0)*cf(0,1,0)
  1405. RW.C0=cf(1.5-1*i, 0.5, -0.5*i) * euler(2-1*i,0,0)
  1406. RW.C1=cf(0, 0.5, 0) * euler(0,-1.5*i,0.4*i)
  1407. LW.C0=cf(0.2-1.2*i, 0.7-0.2*i, -0.6+0.1*i) * euler(1.8-0.8*i,0,1-1*i)
  1408. end
  1409. end
  1410. end
  1411. wait(5)
  1412. combo=0
  1413. end
  1414.  
  1415. function key2(key)
  1416. end
  1417.  
  1418. function s(mouse)
  1419. mouse.Button1Down:connect(function() ob1d(mouse) end)
  1420. mouse.Button1Up:connect(function() ob1u(mouse) end)
  1421. mouse.KeyDown:connect(key)
  1422. mouse.KeyUp:connect(key2)
  1423. unsheathed = true
  1424. player = Player
  1425. ch = Character
  1426. MMouse = mouse
  1427. RSH = ch.Torso["Right Shoulder"]
  1428. LSH = ch.Torso["Left Shoulder"]
  1429. --
  1430. RSH.Parent = nil
  1431. LSH.Parent = nil
  1432. --
  1433. RW.Part0 = ch.Torso
  1434. RW.C0 = CFrame.new(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  1435. RW.C1 = CFrame.new(0, 0.5, 0)
  1436. RW.Part1 = ch["Right Arm"]
  1437. RW.Parent = ch.Torso
  1438. --_G.R = RW
  1439. --
  1440. LW.Part0 = ch.Torso
  1441. LW.C0 = CFrame.new(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  1442. LW.C1 = CFrame.new(0, 0.5, 0)
  1443. LW.Part1 = ch["Left Arm"]
  1444. LW.Parent = ch.Torso
  1445. --_G.L = LW
  1446. --
  1447. equipanim()
  1448. end
  1449.  
  1450. function ds(mouse)
  1451. hideanim()
  1452. wait(0)
  1453. RW.Parent = nil
  1454. LW.Parent = nil
  1455. RSH.Parent = player.Character.Torso
  1456. LSH.Parent = player.Character.Torso
  1457. end
  1458.  
  1459. Bin.Selected:connect(s)
  1460. Bin.Deselected:connect(ds)
  1461. print("Blast Blade loaded.")
  1462. -- mediafire
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement