Advertisement
astronaut32

neo buster cannon

Jun 19th, 2016
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 55.06 KB | None | 0 0
  1. --[MegaBlaster]--
  2. --[Recolored by Cobalt1164]--
  3. --[For Ace]--
  4. Player = game:GetService("Players").LocalPlayer
  5. Character = Player.Character
  6. PlayerGui = Player.PlayerGui
  7. Backpack = Player.Backpack
  8. Torso = Character.Torso
  9. Head = Character.Head
  10. Humanoid = Character.Humanoid
  11. LeftArm = Character["Left Arm"]
  12. LeftLeg = Character["Left Leg"]
  13. RightArm = Character["Right Arm"]
  14. RightLeg = Character["Right Leg"]
  15. LS = Torso["Left Shoulder"]
  16. LH = Torso["Left Hip"]
  17. RS = Torso["Right Shoulder"]
  18. RH = Torso["Right Hip"]
  19. it=Instance.new
  20. vt=Vector3.new
  21. cf=CFrame.new
  22. euler=CFrame.fromEulerAnglesXYZ
  23. angles=CFrame.Angles
  24. attack = false
  25. attackdebounce = false
  26. attacktype = 1
  27. combo = 0
  28. damage = 3
  29. oridamage = 3
  30. walkdebounce = false
  31. sheathed = true
  32. act = {key = {}}
  33. walking = false
  34. hold=false
  35. MMouse=nil
  36. equipped=false
  37. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  38. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  39. con1=nil
  40. con2=nil
  41. con3=nil --lol
  42. mana=400
  43. offset=nil
  44. mode="Normal"
  45. modechange=false
  46. dodging=false
  47. --player
  48. player = nil
  49. --save shoulders
  50. RSH, LSH = nil, nil
  51. --welds
  52. RW, LW = it("Weld"), it("Weld")
  53. RW2, LW2 = it("Weld"), it("Weld")
  54. --what anim
  55. anim = "none"
  56.  
  57. if Character:findFirstChild("Weapon",true) ~= nil then
  58. Character:findFirstChild("Weapon",true).Parent = nil
  59. end
  60. if Player.PlayerGui:findFirstChild("manaGUI",true) ~= nil then
  61. Player.PlayerGui:findFirstChild("manaGUI",true).Parent = nil
  62. end
  63.  
  64. function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
  65. local fp = it("Part")
  66. fp.formFactor = formfactor
  67. fp.Parent = parent
  68. fp.Reflectance = reflectance
  69. fp.Transparency = transparency
  70. fp.CanCollide = false
  71. fp.BrickColor = brickcolor
  72. fp.Name = name
  73. fp.Size = size
  74. fp.Position = Torso.Position
  75. fp.BottomSurface="Smooth"
  76. fp.TopSurface="Smooth"
  77. fp:BreakJoints()
  78. return fp
  79. end
  80.  
  81. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  82. local mesh = it(Mesh)
  83. mesh.Parent = part
  84. if Mesh=="SpecialMesh" then
  85. mesh.MeshType = meshtype
  86. mesh.MeshId = meshid
  87. end
  88. mesh.Offset=offset
  89. mesh.Scale=scale
  90. return mesh
  91. end
  92.  
  93. function weld(parent,part0,part1,c0)
  94. local weld = it("Weld")
  95. weld.Parent = parent
  96. weld.Part0 = part0
  97. weld.Part1 = part1
  98. weld.C0 = c0
  99. return weld
  100. end
  101.  
  102. Ballprt=part(1,nil,0,0.3,BrickColor.new("Really black"),"Ball",vt(3,3,3))
  103. Ballmsh=mesh("SpecialMesh",Ballprt,"Sphere","",vt(0,0,0),vt(1,1,1))
  104. Ballwld=weld(Ballprt,Ballprt,Prt4,cf(0,0,0))
  105.  
  106. local Main=it("Model")
  107. Main.Parent=nil
  108. Main.Name="Weapon"
  109.  
  110. Prt1=part(1,Main,0,0,BrickColor.new("Really black"),"Part1",vt(1,4,1))
  111. Prt2=part(1,Main,0,0,BrickColor.new("Really black"),"Part2",vt(1,1,1))
  112. Prt3=part(1,Main,0,0,BrickColor.new("Really black"),"Part3",vt(1,1,1))
  113. Prt4=part(1,Main,0,0,BrickColor.new("Really black"),"Part4",vt(1,1,1))
  114. Prt5=part(1,Main,0,0,BrickColor.new("Really Really black"),"Part5",vt(1,1,1))
  115. Prt6=part(1,Main,0,0,BrickColor.new("Really black"),"Part6",vt(1,1,1))
  116. Prt7=part(1,Main,0,0,BrickColor.new("Really black"),"Part7",vt(1,1,1))
  117. Prt8=part(1,Main,0,0,BrickColor.new("Really black"),"Part8",vt(1,1,1))
  118. Prt9=part(1,Main,0,0,BrickColor.new("Really black"),"Part9",vt(1,1,1))
  119. Prt10=part(1,Main,0,0,BrickColor.new("Really black"),"Part10",vt(1,1,1))
  120. Prt11=part(1,Main,0,0,BrickColor.new("Really black"),"Part11",vt(1,1,1))
  121. Prt12=part(1,Main,0,0,BrickColor.new("Hot pink"),"Part12",vt(1,1,1))
  122. Prt13=part(1,Main,0,0,BrickColor.new("Hot pink"),"Part13",vt(1,1,1))
  123. Prt14=part(1,Main,0,0,BrickColor.new("Hot pink"),"Part14",vt(1,1,1))
  124. Prt15=part(1,Main,0,0,BrickColor.new("Hot pink"),"Part15",vt(1,1,1))
  125. Prt16=part(1,Main,0,0,BrickColor.new("Hot pink"),"Part16",vt(1,1,1))
  126. Prt17=part(1,Main,0,0,BrickColor.new("Hot pink"),"Part17",vt(1,1,1))
  127. Prt18=part(1,Main,0,0,BrickColor.new("Really black"),"Part18",vt(1,1,1))
  128. Prt19=part(1,Main,0,0,BrickColor.new("Really black"),"Part19",vt(1,1,1))
  129. Prt20=part(1,Main,0.5,0,BrickColor.new("Hot pink"),"Part20",vt(1,1,1))
  130. Prt21=part(1,Main,0.5,0,BrickColor.new("Hot pink"),"Part21",vt(1,1,1))
  131. Prt22=part(1,Main,0,0,BrickColor.new("Hot pink"),"Part22",vt(1,1,1))
  132. Prt23=part(1,Main,0,0,BrickColor.new("Really black"),"Part23",vt(1,1,1))
  133.  
  134. Msh1=mesh("BlockMesh",Prt1,"","",vt(0,0,0),vt(1.1,1.2,1.1))
  135. Msh2=mesh("CylinderMesh",Prt2,"","",vt(0,0,0),vt(1.6,1,1.6))
  136. Msh3=mesh("BlockMesh",Prt3,"","",vt(0,0,0),vt(1.4,1,1))
  137. Msh4=mesh("CylinderMesh",Prt4,"","",vt(0,0,0),vt(1.7,2,1.7))
  138. Msh5=mesh("CylinderMesh",Prt5,"","",vt(0,0,0),vt(1.3,2,1.3))
  139. Msh6=mesh("SpecialMesh",Prt6,"Wedge","",vt(0,0,0),vt(0.5,1.4,0.7))
  140. Msh7=mesh("SpecialMesh",Prt7,"Wedge","",vt(0,0,0),vt(0.5,1,1.2))
  141. Msh8=mesh("SpecialMesh",Prt8,"Wedge","",vt(0,0,0),vt(0.5,1.3,0.7))
  142. Msh9=mesh("SpecialMesh",Prt9,"Wedge","",vt(0,0,0),vt(0.5,1,1.2))
  143. Msh10=mesh("SpecialMesh",Prt10,"Wedge","",vt(0,0,0),vt(0.5,1.3,0.7))
  144. Msh11=mesh("SpecialMesh",Prt11,"Wedge","",vt(0,0,0),vt(0.5,1,1.2))
  145. Msh12=mesh("CylinderMesh",Prt12,"","",vt(0,0,0),vt(1.9,0.3,1.9))
  146. Msh13=mesh("SpecialMesh",Prt13,"Wedge","",vt(0,0,0),vt(0.5,0.7,0.7))
  147. Msh14=mesh("SpecialMesh",Prt14,"Wedge","",vt(0,0,0),vt(0.5,0.7,0.7))
  148. Msh15=mesh("SpecialMesh",Prt15,"Wedge","",vt(0,0,0),vt(0.5,0.7,0.7))
  149. Msh16=mesh("BlockMesh",Prt16,"","",vt(0,0,0),vt(2,0.7,0.3))
  150. Msh17=mesh("BlockMesh",Prt17,"","",vt(0,0,0),vt(2,0.7,0.3))
  151. Msh18=mesh("BlockMesh",Prt18,"","",vt(0,0,0),vt(0.4,0.7,1))
  152. Msh19=mesh("BlockMesh",Prt19,"","",vt(0,0,0),vt(0.5,0.5,2))
  153. Msh20=mesh("BlockMesh",Prt20,"","",vt(0,0,0),vt(0.1,0.5,2))
  154. Msh21=mesh("SpecialMesh",Prt21,"Wedge","",vt(0,0,0),vt(0.1,0.5,0.5))
  155. Msh22=mesh("BlockMesh",Prt22,"","",vt(0,0,0),vt(0.6,0.3,1.8))
  156. Msh23=mesh("BlockMesh",Prt23,"","",vt(0,0,0),vt(1,0.6,1))
  157.  
  158. Wld1=weld(Main,Prt1,RightArm,cf(0,1.8,0))
  159. Wld2=weld(Main,Prt2,Prt1,cf(0,-1,0)*euler(0,0,0))
  160. Wld3=weld(Main,Prt3,Prt2,cf(0,0.3,0)*euler(1.57,0,0))
  161. Wld4=weld(Main,Prt4,Prt1,cf(0,1.4,0)*euler(0,0,0))
  162. Wld5=weld(Main,Prt5,Prt1,cf(0,1.41,0)*euler(0,0,0))
  163. Wld6=weld(Main,Prt6,Prt1,euler(0,-1.57,0)*cf(1,1,0))
  164. Wld7=weld(Main,Prt7,Prt1,euler(1.57,-1.57,0)*cf(1.3,2.2,0))
  165. Wld8=weld(Main,Prt8,Prt1,euler(0,1.57,0)*cf(-1,1,0))
  166. Wld9=weld(Main,Prt9,Prt1,euler(1.57,1.57,0)*cf(-1.3,2.2,0))
  167. Wld10=weld(Main,Prt10,Prt1,euler(0,0,0)*cf(0,1,1))
  168. Wld11=weld(Main,Prt11,Prt1,euler(1.57,0,0)*cf(0,2.2,1.3))
  169. Wld12=weld(Main,Prt12,Prt4,euler(0,0,0)*cf(0,0.7,0))
  170. Wld13=weld(Main,Prt13,Prt1,euler(1.57,-1.57,0)*cf(0.8,0.3,0))
  171. Wld14=weld(Main,Prt14,Prt1,euler(1.57,1.57,0)*cf(-0.8,0.3,0))
  172. Wld15=weld(Main,Prt15,Prt1,euler(1.57,0,0)*cf(0,0.3,0.8))
  173. Wld16=weld(Main,Prt16,Prt4,euler(0,0.785,0)*cf(0,-0.5,0))
  174. Wld17=weld(Main,Prt17,Prt4,euler(0,-0.785,0)*cf(0,-0.5,0))
  175. Wld18=weld(Main,Prt18,Prt4,euler(0.785,0,0)*cf(0,0.5,-0.9))
  176. Wld19=weld(Main,Prt19,Prt18,euler(0.785,0,0)*cf(0,0.4,-0.2))
  177. Wld20=weld(Main,Prt20,Prt19,euler(0,0,0)*cf(0,0.1,0.1))
  178. Wld21=weld(Main,Prt21,Prt20,euler(0,0,3.14)*cf(0,0,1.25))
  179. Wld22=weld(Main,Prt22,Prt19,euler(0,0,0)*cf(0,0,0))
  180. Wld23=weld(Main,Prt23,Prt4,euler(0,0,0)*cf(0,-0.4,-1))
  181.  
  182. local fengui = it("GuiMain")
  183. fengui.Parent = Player.PlayerGui
  184. fengui.Name = "manaGUI"
  185. local fenframe = it("Frame")
  186. fenframe.Parent = fengui
  187. fenframe.BackgroundColor3 = Color3.new(255,255,255)
  188. fenframe.BackgroundTransparency = 1
  189. fenframe.BorderColor3 = Color3.new(17,17,17)
  190. fenframe.Size = UDim2.new(0.0500000007, 0, 0.100000001, 0)
  191. local fentext = it("TextLabel")
  192. fentext.Parent = fenframe
  193. fentext.Text = "Mana("..mana..")"
  194. fentext.BackgroundTransparency = 1
  195. fentext.SizeConstraint = "RelativeXY"
  196. fentext.TextXAlignment = "Center"
  197. fentext.TextYAlignment = "Center"
  198. fentext.Position = UDim2.new(0,80,1,200)
  199. local fentext2 = it("TextLabel")
  200. fentext2.Parent = fenframe
  201. fentext2.Text = " "
  202. fentext2.BackgroundTransparency = 0
  203. fentext2.BackgroundColor3 = Color3.new(0,0,0)
  204. fentext2.SizeConstraint = "RelativeXY"
  205. fentext2.TextXAlignment = "Center"
  206. fentext2.TextYAlignment = "Center"
  207. fentext2.Position = UDim2.new(0,10,1,170)
  208. fentext2.Size = UDim2.new(2.79999995,0,0.210000306,0)
  209. local fentext3 = it("TextLabel")
  210. fentext3.Parent = fenframe
  211. fentext3.Text = " "
  212. fentext3.BackgroundTransparency = 0
  213. fentext3.BackgroundColor3 = Color3.new(1,1,1)
  214. fentext3.SizeConstraint = "RelativeXY"
  215. fentext3.TextXAlignment = "Center"
  216. fentext3.TextYAlignment = "Center"
  217. fentext3.Position = UDim2.new(0,10,1,170)
  218. fentext3.Size = UDim2.new(mana*0.007,0,0.400000006,0)
  219.  
  220. local bg = it("BodyGyro")
  221. bg.Parent = nil
  222.  
  223.  
  224. if (script.Parent.className ~= "HopperBin") then
  225. Tool = it("HopperBin")
  226. Tool.Parent = Backpack
  227. Tool.Name = "Mega Blaster"
  228. script.Parent = Tool
  229. end
  230. Bin = script.Parent
  231.  
  232. function unequipweld()
  233. Main.Parent=nil
  234. end
  235.  
  236. function equipweld()
  237. Main.Parent=Character
  238. Wld1.Parent=Main
  239. end
  240.  
  241. function hideanim()
  242. equipped = false
  243. bg.Parent=nil
  244. unequipweld()
  245. for i = 0 , 1 , 0.1 do
  246. wait(0)
  247. Torso.Neck.C1 = euler(1.57,3.14,0) * cf(0,0,-0.5)
  248. LW.C0 = cf(-1.5,0.5,0) * euler(0,0,0)
  249. LW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  250. RW.C0 = cf(1.5,0.5,0) * euler(0,0,0)
  251. RW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  252. end
  253. Torso.Neck.C0=necko*euler(0,0,0)
  254. end
  255.  
  256. function equipanim(mouse)
  257. equipped = true
  258. for i = 0,1,0.1 do
  259. wait()
  260. LW.C0 = cf(-1.5,0.5,0) * euler(0,0,-0.5*i)
  261. LW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  262. RW.C0 = cf(1.5,0.5,0) * euler(3.14*i,0,0)
  263. RW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  264. end
  265. for i=0,2,0.05 do
  266. wait()
  267. MMMAGIC(RightArm,3,3,3,0,-math.random(0,3)-math.random(),0,BrickColor.new("Really black"))
  268. MMMAGIC(RightArm,3,3,3,0,-math.random(0,3)-math.random(),0,BrickColor.new("Hot pink"))
  269. end
  270. equipweld()
  271. for i = 0,1,0.1 do
  272. wait()
  273. LW.C0 = cf(-1.5,0.5,0) * euler(0,0,-0.5)
  274. LW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  275. RW.C0 = cf(1.5,0.5,0) * euler(3.14-1.9*i,0,0)
  276. RW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  277. end
  278. for i = 0,1,0.1 do
  279. wait()
  280. Torso.Neck.C0=necko*euler(0,0,0)
  281. LW.C0 = cf(-1.5,0.5,0) * euler(0,0,-0.5)
  282. LW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  283. RW.C0 = cf(1.5,0.5,0) * euler(1.24,0,0.5*i)
  284. RW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  285. end
  286. Stance()
  287. end
  288.  
  289. function Stance()
  290. coroutine.resume(coroutine.create(function()
  291. bg.maxTorque = vt(math.huge,math.huge,math.huge)
  292. bg.P = 5000
  293. bg.Parent = Torso
  294. while equipped==true and walking==false and attack==false do
  295. wait()
  296. if modechange==false then
  297. Torso.Neck.C0=necko*euler(0,0,1)
  298. end
  299. local pos4 = vt(MMouse.Hit.p.x,Head.Position.Y,MMouse.Hit.p.z)
  300. if mode=="Shoot" then
  301. local pos4 = Vector3.new(MMouse.Hit.p.x,Head.Position.Y,MMouse.Hit.p.z)
  302. offset=(Torso.Position.y-MMouse.Hit.p.y)/60
  303. mag=(Torso.Position-MMouse.Hit.p).magnitude/80
  304. offset=offset/mag
  305. Torso.Neck.C0=necko*euler(0,-offset,-1.57)
  306. if dodging==false then
  307. bg.cframe = CFrame.new(Head.Position,pos4)*euler(0,1.57,0)
  308. bg.Parent = Torso
  309. LW.C0 = cf(-1.5,0.5,0) * euler(0,0,-0.5)
  310. LW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  311. RW.C0 = cf(1.5,0.5,0) * euler(0,0,1.57)
  312. RW.C1 = cf(0, 0.5, 0) * euler(offset,1.57,0)
  313. end
  314. else
  315. if modechange==false then
  316. bg.cframe = cf(Torso.Position,pos4)*euler(0,-1,0)*cf(0,0,0) --cf(Torso.Position,MMouse.Hit.p) *
  317. end
  318. LW.C0 = cf(-1.5,0.5,0) * euler(0,0,-0.5)
  319. LW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  320. RW.C0 = cf(1.5,0.5,0) * euler(1.24,0,0.5)
  321. RW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  322. end
  323. end
  324. Torso.Neck.C0=necko*euler(0,0,0)
  325. bg.Parent=nil
  326. end))
  327. end
  328.  
  329. function Walking()
  330. attack=true
  331. LW.C0 = cf(-1.5,0.5,0) * euler(0,0,-0.5)
  332. LW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  333. RW.C0 = cf(1.5,0.5,0) * euler(1.24,0,0.5)
  334. RW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  335. walking=true
  336. attack=false
  337. end
  338.  
  339. function Mode()
  340. modechange=true
  341. attack=true
  342. if mode=="Normal" then
  343. mode="Shoot"
  344. Humanoid.WalkSpeed=0
  345. for i = 0,1,0.1 do
  346. wait()
  347. local pos4 = Vector3.new(MMouse.Hit.p.x,Head.Position.Y,MMouse.Hit.p.z)
  348. bg.cframe = CFrame.new(Head.Position,pos4)*euler(0,1.57,0)
  349. bg.Parent = Torso
  350. Torso.Neck.C0=necko*euler(0,0,1-2.57*i)
  351. LW.C0 = cf(-1.5,0.5,0) * euler(0,0,-0.5)
  352. LW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  353. RW.C0 = cf(1.5,0.5,0) * euler(1.24+0.33*i,0,0.5+1.07*i)
  354. RW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  355. end
  356. wait()
  357. elseif mode=="Shoot" then
  358. mode="Normal"
  359. Humanoid.WalkSpeed=16
  360. end
  361. attack=false
  362. modechange=false
  363. Stance()
  364. end
  365.  
  366. function DodgeUp()
  367. CF=Torso.CFrame*euler(0,-1.57,0)
  368. local vel=Instance.new("BodyVelocity")
  369. vel.Parent=Torso
  370. vel.maxForce=Vector3.new(4e+005,4e+005,4e+005)*1
  371. vel.velocity=CF.lookVector*30
  372. for i=0,1,0.2 do
  373. wait()
  374. LW.C0 = cf(-1.5,0.5,0) * euler(0,0,-0.5-0.5*i)
  375. LW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  376. RW.C0 = cf(1.5,0.5,0) * euler(0,0,1.57)
  377. RW.C1 = cf(0, 0.5, 0) * euler(offset,1.57,0)
  378. end
  379. vel.Parent=nil
  380. for i=0,1,0.2 do
  381. wait()
  382. LW.C0 = cf(-1.5,0.5,0) * euler(0,0,-0.5-0.5+0.5*i)
  383. LW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  384. RW.C0 = cf(1.5,0.5,0) * euler(0,0,1.57)
  385. RW.C1 = cf(0, 0.5, 0) * euler(offset,1.57,0)
  386. end
  387. --wait(0.2)
  388. end
  389.  
  390. function DodgeLeft()
  391. CF=Torso.CFrame*euler(0,0,0)
  392. local vel=Instance.new("BodyVelocity")
  393. vel.Parent=Torso
  394. vel.maxForce=Vector3.new(4e+005,4e+005,4e+005)*1
  395. vel.velocity=CF.lookVector*30
  396. for i=0,1,0.2 do
  397. wait()
  398. LW.C0 = cf(-1.5,0.5,0) * euler(-0.5*i,0,-0.5)
  399. LW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  400. RW.C0 = cf(1.5,0.5,0) * euler(0,-0.5*i,1.57)
  401. RW.C1 = cf(0, 0.5, 0) * euler(offset,1.57,0)
  402. end
  403. vel.Parent=nil
  404. for i=0,1,0.2 do
  405. wait()
  406. LW.C0 = cf(-1.5,0.5,0) * euler(-0.5+0.5*i,0,-0.5)
  407. LW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  408. RW.C0 = cf(1.5,0.5,0) * euler(0,-0.5+0.5*i,1.57)
  409. RW.C1 = cf(0, 0.5, 0) * euler(offset,1.57,0)
  410. end
  411. --wait(0.2)
  412. end
  413.  
  414. function DodgeRight()
  415. CF=Torso.CFrame*euler(0,1.57,0)
  416. local vel=Instance.new("BodyVelocity")
  417. vel.Parent=Torso
  418. vel.maxForce=Vector3.new(4e+005,4e+005,4e+005)*1
  419. vel.velocity=CF.lookVector*30
  420. for i=0,1,0.2 do
  421. wait()
  422. LW.C0 = cf(-1.5+0.5*i,0.5,-0.5*i) * euler(0.7*i,0,-0.5+2*i)
  423. LW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  424. RW.C0 = cf(1.5,0.5,0) * euler(0,0,1.57)
  425. RW.C1 = cf(0, 0.5, 0) * euler(offset,1.57,0)
  426. end
  427. vel.Parent=nil
  428. for i=0,1,0.2 do
  429. wait()
  430. LW.C0 = cf(-1.5+0.5-0.5*i,0.5,-0.5+0.5*i) * euler(0.7-0.7*i,0,-0.5+2-2*i)
  431. LW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  432. RW.C0 = cf(1.5,0.5,0) * euler(0,0,1.57)
  433. RW.C1 = cf(0, 0.5, 0) * euler(offset,1.57,0)
  434. end
  435. --wait(0.2)
  436. end
  437.  
  438. function DodgeDown()
  439. CF=Torso.CFrame*euler(0,3.14,0)
  440. local vel=Instance.new("BodyVelocity")
  441. vel.Parent=Torso
  442. vel.maxForce=Vector3.new(4e+005,4e+005,4e+005)*1
  443. vel.velocity=CF.lookVector*30
  444. for i=0,1,0.2 do
  445. wait()
  446. LW.C0 = cf(-1.5,0.5,0) * euler(0.5*i,0,-0.5)
  447. LW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  448. RW.C0 = cf(1.5,0.5,0) * euler(0,0.5*i,1.57)
  449. RW.C1 = cf(0, 0.5, 0) * euler(offset,1.57,0)
  450. end
  451. vel.Parent=nil
  452. for i=0,1,0.2 do
  453. wait()
  454. LW.C0 = cf(-1.5,0.5,0) * euler(0.5-0.5*i,0,-0.5)
  455. LW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  456. RW.C0 = cf(1.5,0.5,0) * euler(0,0.5-0.5*i,1.57)
  457. RW.C1 = cf(0, 0.5, 0) * euler(offset,1.57,0)
  458. end
  459. --wait(0.2)
  460. end
  461.  
  462. function OverchargeBlast()
  463. attack=true
  464. for i=0,1,0.1 do
  465. wait()
  466. local pos4 = vt(MMouse.Hit.p.x,Head.Position.Y,MMouse.Hit.p.z)
  467. Torso.Neck.C0=necko*euler(0,0,1-1*i)
  468. bg.cframe = cf(Torso.Position,pos4)*euler(0,-1+1*i,0)*cf(0,0,0)
  469. bg.Parent = Torso
  470. LW.C0 = cf(-1.5+0.8*i,0.5+0.3*i,-0.5*i) * euler(2.8*i,0,-0.5+1.5*i)
  471. LW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  472. RW.C0 = cf(1.5,0.5,0) * euler(1.24+1.26*i,0,0.5-0.5*i)
  473. RW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  474. end
  475. wait(0.2)
  476. Ballprt.Parent=Main
  477. Ballwld.Parent=Main
  478. Ballwld.Part0=Ballprt
  479. Ballwld.Part1=Prt4
  480. Ballwld.C0=cf(0,3,0)
  481. for i=0,1,0.1 do
  482. wait()
  483. MMMAGIC3(Ballprt.CFrame,1,6,1,0,0,0,BrickColor.new("Really black"))
  484. EVENMOARMAGIX(Ballprt,1,1,1,0,0,0,0,0,0,BrickColor.new("Really black"))
  485. local pos4 = vt(MMouse.Hit.p.x,Head.Position.Y,MMouse.Hit.p.z)
  486. bg.cframe = cf(Torso.Position,pos4)*euler(0,0,0)*cf(0,0,0)
  487. bg.Parent = Torso
  488. LW.C0 = cf(-1.5+0.8,0.5+0.3,-0.5) * euler(2.8-1*i,0,1)
  489. LW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  490. RW.C0 = cf(1.5,0.5,0) * euler(2.5-1*i,0,0)
  491. RW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  492. end
  493. for i=0,10,0.1 do
  494. wait()
  495. MMMAGIC3(Ballprt.CFrame,1,6,1,0,0,0,BrickColor.new("Really black"))
  496. EVENMOARMAGIX(Ballprt,3,3,3,0,0,0,0,0,0,BrickColor.new("Really black"))
  497. MOREMAGIX(Ballprt,0,2,2,2,BrickColor.new("Hot pink"))
  498. local pos4 = vt(MMouse.Hit.p.x,Head.Position.Y,MMouse.Hit.p.z)
  499. bg.cframe = cf(Torso.Position,pos4)*euler(0,0,0)*cf(0,0,0)
  500. bg.Parent = Torso
  501. offset=(Torso.Position.y-MMouse.Hit.p.y)/60
  502. mag=(Torso.Position-MMouse.Hit.p).magnitude/80
  503. offset=offset/mag
  504. Torso.Neck.C0=necko*euler(offset,0,0)
  505. LW.C0 = cf(-1.5+0.8,0.5+0.3,-0.5) * euler(1.8,0,1)
  506. LW.C1 = cf(0, 0.5, 0) * euler(offset,0,0)
  507. RW.C0 = cf(1.5,0.5,0) * euler(1.57,0,0)
  508. RW.C1 = cf(0, 0.5, 0) * euler(offset,0,0)
  509. end
  510. Ballwld.Part1=nil
  511. Ballprt.Parent=nil
  512. wait(0.4)
  513. shoottrail3(Prt4,20)
  514. wait(1)
  515. attack=false
  516. end
  517.  
  518. function ss(pitch)
  519.  
  520. local SlashSound = it("Sound")
  521. SlashSound.SoundId = "rbxasset://sounds\\swordslash.wav"
  522. SlashSound.Parent = workspace
  523. SlashSound.Volume = .7
  524. SlashSound.Pitch = pitch
  525. SlashSound.PlayOnRemove = true
  526. coroutine.resume(coroutine.create(function()
  527. wait(0)
  528. SlashSound.Parent = nil
  529. end))
  530. end
  531. function charge(pitch)
  532.  
  533. local SlashSound = it("Sound")
  534. SlashSound.SoundId = "http://www.roblox.com/asset/?id=2101137"
  535. SlashSound.Parent = workspace
  536. SlashSound.Volume = 1
  537. SlashSound.Pitch = pitch
  538. SlashSound.PlayOnRemove = true
  539. coroutine.resume(coroutine.create(function()
  540. wait(0)
  541. SlashSound.Parent = nil
  542. end))
  543. end
  544. function bewm(pitch)
  545.  
  546. local SlashSound = it("Sound")
  547. SlashSound.SoundId = "http://www.roblox.com/asset/?id=2248511"
  548. SlashSound.Parent = workspace
  549. SlashSound.Volume = .7
  550. SlashSound.Pitch = pitch
  551. SlashSound.PlayOnRemove = true
  552. coroutine.resume(coroutine.create(function()
  553. wait(0)
  554. SlashSound.Parent = nil
  555. end))
  556. end
  557. function abscond(pitch)
  558.  
  559. local SlashSound = it("Sound")
  560. SlashSound.SoundId = "http://www.roblox.com/asset/?id=2767090"
  561. SlashSound.Parent = workspace
  562. SlashSound.Volume = 1
  563. SlashSound.Pitch = pitch
  564. SlashSound.PlayOnRemove = true
  565. coroutine.resume(coroutine.create(function()
  566. wait(0)
  567. SlashSound.Parent = nil
  568. end))
  569. end
  570. function distort(pitch)
  571.  
  572. local SlashSound = it("Sound")
  573. SlashSound.SoundId = "http://www.roblox.com/asset/?id=2974249"
  574. SlashSound.Parent = workspace
  575. SlashSound.Volume = 1
  576. SlashSound.Pitch = pitch
  577. SlashSound.PlayOnRemove = true
  578. coroutine.resume(coroutine.create(function()
  579. wait(0)
  580. SlashSound.Parent = nil
  581. end))
  582. end
  583. function fire1(pitch)
  584.  
  585. local SlashSound = it("Sound")
  586. SlashSound.SoundId = "http://www.roblox.com/asset/?id=2697431"
  587. SlashSound.Parent = workspace
  588. SlashSound.Volume = 0.3
  589. SlashSound.Pitch = pitch
  590. SlashSound.PlayOnRemove = true
  591. coroutine.resume(coroutine.create(function()
  592. wait(0)
  593. SlashSound.Parent = nil
  594. end))
  595. end
  596. function fire2(pitch)
  597.  
  598. local SlashSound = it("Sound")
  599. SlashSound.SoundId = "http://www.roblox.com/asset/?id=48618802 "
  600. SlashSound.Parent = workspace
  601. SlashSound.Volume = 0.5
  602. SlashSound.Pitch = pitch
  603. SlashSound.PlayOnRemove = true
  604. coroutine.resume(coroutine.create(function()
  605. wait(0)
  606. SlashSound.Parent = nil
  607. end))
  608. end
  609. function grip(pitch)
  610.  
  611. local SlashSound = it("Sound")
  612. SlashSound.SoundId = "rbxasset://sounds/swordslash.wav"
  613. SlashSound.Parent = workspace
  614. SlashSound.Volume = 1
  615. SlashSound.Pitch = pitch
  616. SlashSound.PlayOnRemove = true
  617. coroutine.resume(coroutine.create(function()
  618. wait(0)
  619. SlashSound.Parent = nil
  620. end))
  621. end
  622. function reload(pitch)
  623.  
  624. local SlashSound = it("Sound")
  625. SlashSound.SoundId = "http://www.roblox.com/asset/?id=2697295"
  626. SlashSound.Parent = workspace
  627. SlashSound.Volume = 1
  628. SlashSound.Pitch = pitch
  629. SlashSound.PlayOnRemove = true
  630. coroutine.resume(coroutine.create(function()
  631. wait(0)
  632. SlashSound.Parent = nil
  633. end))
  634. end
  635.  
  636. function MMMAGIC(part,x1,y1,z1,x2,y2,z2,color)
  637. local msh1 = it("BlockMesh")
  638. msh1.Scale = vt(0.5,0.5,0.5)
  639. S=it("Part")
  640. S.Name="Effect"
  641. S.formFactor=0
  642. S.Size=vt(x1,y1,z1)
  643. S.BrickColor=color
  644. S.Reflectance = 0
  645. S.TopSurface=0
  646. S.BottomSurface=0
  647. S.Transparency=0
  648. S.Anchored=true
  649. S.CanCollide=false
  650. S.CFrame=part.CFrame*cf(x2,y2,z2)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  651. S.Parent=workspace
  652. msh1.Parent = S
  653. coroutine.resume(coroutine.create(function(Part,CF) for i=1, 9 do Part.Mesh.Scale = Part.Mesh.Scale + vt(0.1,0.1,0.1) Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) Part.Transparency=i*.1 wait() end Part.Parent=nil end),S,S.CFrame)
  654. end
  655.  
  656. function MMAGIC(part,x1,y1,z1,x2,y2,z2,color)
  657. local msh1 = it("BlockMesh")
  658. msh1.Scale = vt(0.5,0.5,0.5)
  659. S=it("Part")
  660. S.Name="Effect"
  661. S.formFactor=0
  662. S.Size=vt(x1,y1,z1)
  663. S.BrickColor=color
  664. S.Reflectance = 0
  665. S.TopSurface=0
  666. S.BottomSurface=0
  667. S.Transparency=0
  668. S.Anchored=true
  669. S.CanCollide=false
  670. S.CFrame=part.CFrame*cf(x2,y2,z2)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  671. S.Parent=Character
  672. msh1.Parent = S
  673. coroutine.resume(coroutine.create(function(Part,CF) for i=1, 9 do Part.Mesh.Scale = Part.Mesh.Scale + vt(0.1,0.1,0.1) Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) Part.Transparency=i*.1 wait() end Part.Parent=nil end),S,S.CFrame)
  674. end
  675.  
  676. function MMMAGIC2(part,x1,y1,z1,x2,y2,z2,color)
  677. local msh1 = it("BlockMesh")
  678. msh1.Scale = vt(0.5,0.5,0.5)
  679. S=it("Part")
  680. S.Name="Effect"
  681. S.formFactor=0
  682. S.Size=vt(x1,y1,z1)
  683. S.BrickColor=color
  684. S.Reflectance = 0
  685. S.TopSurface=0
  686. S.BottomSurface=0
  687. S.Transparency=0
  688. S.Anchored=true
  689. S.CanCollide=false
  690. S.CFrame=part.CFrame*cf(x2,y2,z2)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  691. S.Parent=workspace
  692. msh1.Parent = S
  693. coroutine.resume(coroutine.create(function(Part,CF) for i=1, 9 do Part.Mesh.Scale = Part.Mesh.Scale + vt(0.1,0.1,0.1) Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) Part.Transparency=i*.1 wait() end Part.Parent=nil end),S,S.CFrame)
  694. end
  695.  
  696. function MMMAGIC3(part,x1,y1,z1,x2,y2,z2,color)
  697. local msh1 = it("BlockMesh")
  698. msh1.Scale = vt(0.5,0.5,0.5)
  699. S=it("Part")
  700. S.Name="Effect"
  701. S.formFactor=0
  702. S.Size=vt(x1,y1,z1)
  703. S.BrickColor=color
  704. S.Reflectance = 0
  705. S.TopSurface=0
  706. S.BottomSurface=0
  707. S.Transparency=0
  708. S.Anchored=true
  709. S.CanCollide=false
  710. S.CFrame=part*cf(x2,y2,z2)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  711. S.Parent=Character
  712. msh1.Parent = S
  713. coroutine.resume(coroutine.create(function(Part,CF) for i=1, 9 do Part.Mesh.Scale = Part.Mesh.Scale + vt(0,0.3,0) Part.Transparency=i*.1 wait() end Part.Parent=nil end),S,S.CFrame)
  714. end
  715.  
  716. function UltimaMMMAGIC(part,x1,y1,z1,x2,y2,z2,color)
  717. local msh1 = it("BlockMesh")
  718. msh1.Scale = vt(x1,y1,z1)
  719. S=it("Part")
  720. S.Name="Effect"
  721. S.formFactor=0
  722. S.Size=vt(1,1,1)
  723. S.BrickColor=color
  724. S.Reflectance = 0
  725. S.TopSurface=0
  726. S.BottomSurface=0
  727. S.Transparency=0
  728. S.Anchored=true
  729. S.CanCollide=false
  730. S.CFrame=part.CFrame*cf(x2,y2,z2)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  731. S.Parent=workspace
  732. msh1.Parent = S
  733. coroutine.resume(coroutine.create(function(Part,CF) for i=1, 9 do Part.Mesh.Scale = Part.Mesh.Scale + vt(0.1,0.1,0.1) Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) Part.Transparency=i*.1 wait() end Part.Parent=nil end),S,S.CFrame)
  734. end
  735.  
  736. function MOREMAGIX(part,cframe,x,y,z,color)
  737. p2=it("Part")
  738. p2.Name="Blast"
  739. p2.TopSurface=0
  740. p2.BottomSurface=0
  741. p2.CanCollide=false
  742. p2.Anchored=true
  743. p2.BrickColor=color
  744. p2.Size=vt(x,y,z)
  745. p2.formFactor="Symmetric"
  746. p2.CFrame=part.CFrame*cf(0,cframe,0)
  747. p2.Parent=Character
  748. m=it("BlockMesh")
  749. m.Parent=p2
  750. m.Name="BlastMesh"
  751. coroutine.resume(coroutine.create(function(part,dir) for loll=1, 15 do part.BlastMesh.Scale=part.BlastMesh.Scale-vt(.09,.09,.09) part.Transparency=loll/20 part.CFrame=part.CFrame*cf(dir)*euler(math.random(-100,100)/100, math.random(-100,100)/100, math.random(-100,100)/100) wait() end part.Parent=nil end),p2,vt(math.random(-10,10)/10,math.random(-10,10)/10,math.random(-10,10)/10))
  752. end
  753.  
  754. function EVENMOARMAGIX(part,x1,y1,z1,x2,y2,z2,x3,y3,z3,color)
  755. local msh1 = it("SpecialMesh")
  756. msh1.Scale = vt(0.5,0.5,0.5)
  757. msh1.MeshType = "Sphere"
  758. S=it("Part")
  759. S.Name="Effect"
  760. S.formFactor=0
  761. S.Size=vt(x1,y1,z1)
  762. S.BrickColor=color
  763. S.Reflectance = 0
  764. S.TopSurface=0
  765. S.BottomSurface=0
  766. S.Transparency=0
  767. S.Anchored=true
  768. S.CanCollide=false
  769. S.CFrame=part.CFrame*cf(x2,y2,z2)*euler(x3,y3,z3)
  770. S.Parent=Character
  771. msh1.Parent = S
  772. coroutine.resume(coroutine.create(function(Part,CF) for i=1, 9 do Part.Mesh.Scale = Part.Mesh.Scale + vt(0.15,0.15,0.15) Part.Transparency=i*.1 wait() end Part.Parent=nil end),S,S.CFrame)
  773. end
  774.  
  775. function EVENMOARMAGIX2(part,x1,y1,z1,x2,y2,z2,x3,y3,z3,color)
  776. local msh1 = it("SpecialMesh")
  777. msh1.Scale = vt(0.5,0.5,0.5)
  778. msh1.MeshType = "Sphere"
  779. S=it("Part")
  780. S.Name="Effect"
  781. S.formFactor=0
  782. S.Size=vt(x1,y1,z1)
  783. S.BrickColor=color
  784. S.Reflectance = 0
  785. S.TopSurface=0
  786. S.BottomSurface=0
  787. S.Transparency=0
  788. S.Anchored=true
  789. S.CanCollide=false
  790. S.CFrame=part
  791. S.Parent=workspace
  792. msh1.Parent = S
  793. coroutine.resume(coroutine.create(function(Part,CF) for i=1, 14 do Part.Mesh.Scale = Part.Mesh.Scale + vt(1,1,1) Part.Transparency=Part.Transparency+0.1 wait() end Part.Parent=nil end),S,S.CFrame)
  794. end
  795.  
  796. function ChargeEffect(part,x1,y1,z1,x2,y2,z2,x3,y3,z3,color)
  797. local msh1 = it("SpecialMesh")
  798. msh1.Scale = vt(0.5,0.5,0.5)
  799. msh1.MeshType = "Sphere"
  800. S=it("Part")
  801. S.Name="Effect"
  802. S.formFactor=0
  803. S.Size=vt(x1,y1,z1)
  804. S.BrickColor=color
  805. S.Reflectance = 0
  806. S.TopSurface=0
  807. S.BottomSurface=0
  808. S.Transparency=0
  809. S.Anchored=false
  810. S.CanCollide=false
  811. S.CFrame=part.CFrame*cf(x2,y2,z2)*euler(x3,y3,z3)
  812. S.Parent=modelzorz
  813. msh1.Parent = S
  814. coroutine.resume(coroutine.create(function(Part,CF)
  815. f=it("BodyPosition")
  816. f.P=800
  817. f.D=100
  818. f.maxForce=vt(math.huge,math.huge,math.huge)
  819. f.position=part.Position
  820. f.Parent=Part
  821. for i=0,1,0.1 do
  822. wait()
  823. Part.Transparency=Part.Transparency+0.1
  824. end
  825. Part.Parent=nil
  826. end),S,S.CFrame)
  827. end
  828.  
  829. function ChargeEffect2(part,x1,y1,z1,x2,y2,z2,x3,y3,z3,color)
  830. local msh1 = it("SpecialMesh")
  831. msh1.Scale = vt(0.5,0.5,0.5)
  832. msh1.MeshType = "Sphere"
  833. S=it("Part")
  834. S.Name="Effect"
  835. S.formFactor=0
  836. S.Size=vt(x1,y1,z1)
  837. S.BrickColor=color
  838. S.Reflectance = 0
  839. S.TopSurface=0
  840. S.BottomSurface=0
  841. S.Transparency=0
  842. S.Anchored=false
  843. S.CanCollide=false
  844. S.CFrame=part.CFrame*cf(x2,y2,z2)*euler(x3,y3,z3)
  845. S.Parent=modelzorz
  846. msh1.Parent = S
  847. coroutine.resume(coroutine.create(function(Part,CF)
  848. f=it("BodyPosition")
  849. f.P=800
  850. f.D=100
  851. f.maxForce=vt(math.huge,math.huge,math.huge)
  852. f.position=part.Position+vt(math.random(-30,30),math.random(-30,30),math.random(-30,30))
  853. f.Parent=Part
  854. for i=0,1,0.1 do
  855. wait()
  856. Part.Transparency=Part.Transparency+0.1
  857. end
  858. Part.Parent=nil
  859. end),S,S.CFrame)
  860. end
  861.  
  862. print("Y U NU GIVE CREDIT.")
  863.  
  864. function WaveEffect(part,x1,y1,z1,x2,y2,z2,x3,y3,z3,color)
  865. local msh1 = it("SpecialMesh")
  866. msh1.Scale = vt(x1,y1,z1)
  867. msh1.MeshId = "http://www.roblox.com/asset/?id=20329976"
  868. S=it("Part")
  869. S.Name="Effect"
  870. S.formFactor=0
  871. S.Size=vt(1,1,1)
  872. S.BrickColor=color
  873. S.Reflectance = 0
  874. S.TopSurface=0
  875. S.BottomSurface=0
  876. S.Transparency=0
  877. S.Anchored=true
  878. S.CanCollide=false
  879. S.CFrame=part.CFrame*cf(x2,y2,z2)*euler(x3,y3,z3)
  880. S.Parent=workspace
  881. msh1.Parent = S
  882. coroutine.resume(coroutine.create(function(Part,CF) for i=1, 9 do Part.Mesh.Scale = Part.Mesh.Scale + vt(0.3,0.3,0.3) Part.Transparency=i*.1 wait() end Part.Parent=nil end),S,S.CFrame)
  883. end
  884.  
  885. function BlastEffect(part,x1,y1,z1,x2,y2,z2,x3,y3,z3,color)
  886. local msh1 = it("SpecialMesh")
  887. msh1.Scale = vt(x1,y1,z1)
  888. msh1.MeshId = "http://www.roblox.com/asset/?id=1323306"
  889. S=it("Part")
  890. S.Name="Effect"
  891. S.formFactor=0
  892. S.Size=vt(1,1,1)
  893. S.BrickColor=color
  894. S.Reflectance = 0
  895. S.TopSurface=0
  896. S.BottomSurface=0
  897. S.Transparency=0
  898. S.Anchored=true
  899. S.CanCollide=false
  900. S.CFrame=part.CFrame*cf(x2,y2,z2)*euler(x3,y3,z3)
  901. S.Parent=workspace
  902. msh1.Parent = S
  903. coroutine.resume(coroutine.create(function(Part,CF) for i=1, 9 do Part.Mesh.Scale = Part.Mesh.Scale + vt(0.5,0.8,0.5) Part.Transparency=i*.1 wait() end Part.Parent=nil end),S,S.CFrame)
  904. end
  905.  
  906. function DerpMagic(part,x1,y1,z1,x2,y2,z2,color)
  907. local msh1 = it("BlockMesh")
  908. msh1.Scale = vt(0.5,0.5,0.5)
  909. S=it("Part")
  910. S.Name="Effect"
  911. S.formFactor=0
  912. S.Size=vt(x1,y1,z1)
  913. S.BrickColor=color
  914. S.Reflectance = 0
  915. S.TopSurface=0
  916. S.BottomSurface=0
  917. S.Transparency=0
  918. S.Anchored=false
  919. S.CanCollide=false
  920. S.CFrame=part.CFrame
  921. S.Parent=workspace
  922. msh1.Parent = S
  923. W=it("Weld")
  924. W.Parent=S
  925. W.Part0=S
  926. W.Part1=part
  927. W.C0=cf(x2,y2,z2) * euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  928. W.Parent=nil
  929. S.Anchored=true
  930. coroutine.resume(coroutine.create(function(Part,Weld) for i=1, 9 do Part.Mesh.Scale = Part.Mesh.Scale + vt(0.1,0.1,0.1) --[[Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))]] Part.Transparency=i*.1 wait() end Part.Parent=nil Weld.Parent=nil end),S,W)
  931. end
  932.  
  933. DarkRiftF=function(par) --Thank you turdulator for this :D
  934. PWN={}
  935. for _,v in pairs(workspace:children()) do
  936. if v.className=="Model" and v:FindFirstChild("Humanoid")~=nil then
  937. if v.Humanoid.Health>0 and v:FindFirstChild("Torso")~=nil then
  938. if v~=Character and (v.Torso.Position-par.Position).magnitude<=25 then
  939. table.insert(PWN,v.Torso)
  940. end
  941. end
  942. end
  943. end
  944. for _,t in pairs(PWN) do
  945. Mag=(par.Position-t.Position).magnitude/2
  946. t.Parent.Humanoid:TakeDamage(50)
  947. rl=it("BodyAngularVelocity")
  948. rl.P=3000
  949. rl.maxTorque=vt(500000,500000,500000)*5000
  950. rl.angularvelocity=vt(math.random(-20,20),math.random(-20,20),math.random(-20,20))/10
  951. rl.Parent=t
  952. game:GetService("Debris"):AddItem(rl,.1)
  953. if Mag<=2 then
  954. t.Parent.Humanoid:TakeDamage(20)
  955. else
  956. vl=it("BodyVelocity")
  957. vl.P=3000
  958. vl.maxForce=vt(50000000000,50000000000,50000000000)
  959. vl.velocity=(t.Position-par.Position).unit*-(70/(Mag))
  960. vl.Parent=t
  961. game:GetService("Debris"):AddItem(vl,.1)
  962. end
  963. end
  964. wait(.08)
  965. end
  966.  
  967. DBHit=function(hit,Damage) --credits to turdulator for making this function :D
  968. if hit.Parent==nil then
  969. return
  970. end
  971. h=hit.Parent:FindFirstChild("Humanoid")
  972. t=hit.Parent:FindFirstChild("Torso")
  973. if h~=nil and t~=nil then
  974. if h.Parent==Character then
  975. return
  976. end
  977. c=it("ObjectValue")
  978. c.Name="creator"
  979. c.Value=game.Players.LocalPlayer
  980. c.Parent=h
  981. game:GetService("Debris"):AddItem(c,.5)
  982. if math.random(0,99)+math.random()<=7.8 then
  983. CRIT=true
  984. Damage=Damage*100
  985. --[[ Knockback=Knockback*2
  986. r=it("BodyAngularVelocity")
  987. r.P=3000
  988. r.maxTorque=vt(500000000,50000000000,500000000)*50000
  989. r.angularvelocity=vt(math.random(-20,20),math.random(-20,20),math.random(-20,20))
  990. r.Parent=hit.Parent.Torso]]
  991. s=it("Sound")
  992. s.SoundId="http://www.roblox.com/asset/?id=2801263"
  993. s.Volume=1
  994. s.Pitch=2
  995. s.Parent=hit
  996. s.PlayOnRemove=true
  997. s.Parent=nil
  998.  
  999. end
  1000. h:TakeDamage(Damage)
  1001. showDamage(hit.Parent,Damage,30)
  1002. vl=it("BodyVelocity")
  1003. vl.P=4500
  1004. vl.maxForce=vt(math.huge,math.huge,math.huge)
  1005. -- vl.velocity=vt(Torso.Velocity.x,0,Torso.Velocity.z)*1.05+vt(0,3,0)
  1006. vl.velocity=vt(Torso.Velocity.x,0,Torso.Velocity.z)*1.05+vt(0,45,0)
  1007. vl.Parent=t
  1008. game:GetService("Debris"):AddItem(vl,.2)
  1009. rl=it("BodyAngularVelocity")
  1010. rl.P=3000
  1011. rl.maxTorque=vt(500000,500000,500000)*50000000000000
  1012. rl.angularvelocity=vt(math.random(-40,40),math.random(-40,40),math.random(-40,40))
  1013. rl.Parent=t
  1014. game:GetService("Debris"):AddItem(rl,.2)
  1015. else
  1016. if hit.CanCollide==false then
  1017. return
  1018. end
  1019. MagicCom:disconnect()
  1020. -- DBExplode(DB)
  1021. end
  1022. end
  1023.  
  1024. DBHit2=function(hit,Damage) --credits to turdulator for making this function :D
  1025. if hit.Parent==nil then
  1026. return
  1027. end
  1028. h=hit.Parent:FindFirstChild("Humanoid")
  1029. t=hit.Parent:FindFirstChild("Torso")
  1030. if h~=nil and t~=nil then
  1031. if h.Parent==Character then
  1032. return
  1033. end
  1034. c=it("ObjectValue")
  1035. c.Name="creator"
  1036. c.Value=game.Players.LocalPlayer
  1037. c.Parent=h
  1038. game:GetService("Debris"):AddItem(c,.5)
  1039. if math.random(0,99)+math.random()<=7.8 then
  1040. CRIT=true
  1041. Damage=Damage*40
  1042. --[[ Knockback=Knockback*2
  1043. r=it("BodyAngularVelocity")
  1044. r.P=3000
  1045. r.maxTorque=vt(500000000,50000000000,500000000)*50000
  1046. r.angularvelocity=vt(math.random(-20,20),math.random(-20,20),math.random(-20,20))
  1047. r.Parent=hit.Parent.Torso]]
  1048. s=it("Sound")
  1049. s.SoundId="http://www.roblox.com/asset/?id=2801263"
  1050. s.Volume=1
  1051. s.Pitch=2
  1052. s.Parent=hit
  1053. s.PlayOnRemove=true
  1054. s.Parent=nil
  1055.  
  1056. end
  1057. h:TakeDamage(Damage)
  1058. showDamage(hit.Parent,Damage,60)
  1059. vl=it("BodyVelocity")
  1060. vl.P=4500
  1061. vl.maxForce=vt(math.huge,math.huge,math.huge)
  1062. -- vl.velocity=vt(Torso.Velocity.x,0,Torso.Velocity.z)*1.05+vt(0,30,0)
  1063. vl.velocity=Head.CFrame.lookVector*35+Head.Velocity/1.05
  1064. vl.Parent=t
  1065. game:GetService("Debris"):AddItem(vl,.2)
  1066. rl=it("BodyAngularVelocity")
  1067. rl.P=3000
  1068. rl.maxTorque=vt(500000,500000,500000)*50000000000000
  1069. rl.angularvelocity=vt(math.random(-5,5),math.random(-5,5),math.random(-5,5))
  1070. rl.Parent=t
  1071. game:GetService("Debris"):AddItem(rl,.2)
  1072. else
  1073. if hit.CanCollide==false then
  1074. return
  1075. end
  1076. MagicCom:disconnect()
  1077. -- DBExplode(DB)
  1078. end
  1079. end
  1080.  
  1081. DOHHit=function(hit,Damage,Pos) --credits to turdulator for making this function :D
  1082. if hit.Parent==nil then
  1083. return
  1084. end
  1085. h=hit.Parent:FindFirstChild("Humanoid")
  1086. t=hit.Parent:FindFirstChild("Torso")
  1087. if h~=nil and t~=nil then
  1088. if h.Parent==Character then
  1089. return
  1090. end
  1091. c=it("ObjectValue")
  1092. c.Name="creator"
  1093. c.Value=game.Players.LocalPlayer
  1094. c.Parent=h
  1095. game:GetService("Debris"):AddItem(c,.5)
  1096. if math.random(0,99)+math.random()<=7.8 then
  1097. CRIT=true
  1098. Damage=Damage*50
  1099. --[[ Knockback=Knockback*2
  1100. r=it("BodyAngularVelocity")
  1101. r.P=3000
  1102. r.maxTorque=vt(500000000,50000000000,500000000)*50000
  1103. r.angularvelocity=vt(math.random(-20,20),math.random(-20,20),math.random(-20,20))
  1104. r.Parent=hit.Parent.Torso]]
  1105. s=it("Sound")
  1106. s.SoundId="http://www.roblox.com/asset/?id=2801263"
  1107. s.Volume=1
  1108. s.Pitch=2
  1109. s.Parent=hit
  1110. s.PlayOnRemove=true
  1111. s.Parent=nil
  1112.  
  1113. end
  1114. h:TakeDamage(Damage)
  1115. showDamage(hit.Parent,Damage,60)
  1116. vl=it("BodyVelocity")
  1117. vl.P=4500
  1118. vl.maxForce=vt(math.huge,math.huge,math.huge)
  1119. -- vl.velocity=vt(Torso.Velocity.x,0,Torso.Velocity.z)*1.05+vt(0,60,0)
  1120. vl.velocity=Head.CFrame.lookVector+Head.Velocity/1.05
  1121. vl.Parent=t
  1122. game:GetService("Debris"):AddItem(vl,.2)
  1123. rl=it("BodyAngularVelocity")
  1124. rl.P=3000
  1125. rl.maxTorque=vt(500000,500000,500000)*50000000000000
  1126. rl.angularvelocity=vt(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  1127. rl.Parent=t
  1128. game:GetService("Debris"):AddItem(rl,.2)
  1129. else
  1130. if hit.CanCollide==false then
  1131. return
  1132. end
  1133. MagicCom:disconnect()
  1134. -- DBExplode(DB)
  1135. end
  1136. end
  1137.  
  1138. Damagefunc1=function(hit,Damage,Knockback)
  1139. if attackdebounce == false then
  1140. attackdebounce = true
  1141. coroutine.resume(coroutine.create(function()
  1142. wait(0.1)
  1143. attackdebounce = false
  1144. end))
  1145. if hit.Parent==nil then
  1146. return
  1147. end
  1148. CPlayer=Bin
  1149. h=hit.Parent:FindFirstChild("Humanoid")
  1150. if h~=nil and hit.Parent.Name~="Fenrier" and hit.Parent:FindFirstChild("Torso")~=nil then
  1151. Damage=Damage
  1152. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  1153. return
  1154. end]]
  1155. if mana<400 then
  1156. mana=mana+math.random(10,20)
  1157. else
  1158. mana=400
  1159. end
  1160. c=it("ObjectValue")
  1161. c.Name="creator"
  1162. c.Value=game.Players.LocalPlayer
  1163. c.Parent=h
  1164. game:GetService("Debris"):AddItem(c,.5)
  1165. -- print(c.Value)
  1166. if math.random(0,99)+math.random()<=7.8 then
  1167. CRIT=true
  1168. Damage=Damage*500
  1169. --[[ Knockback=Knockback*2
  1170. r=it("BodyAngularVelocity")
  1171. r.P=3000
  1172. r.maxTorque=vt(500000000,50000000000,500000000)*50000
  1173. r.angularvelocity=vt(math.random(-20,20),math.random(-20,20),math.random(-20,20))
  1174. r.Parent=hit.Parent.Torso]]
  1175. s=it("Sound")
  1176. s.SoundId="http://www.roblox.com/asset/?id=2801263"
  1177. s.Volume=1
  1178. s.Pitch=2
  1179. s.Parent=hit
  1180. s.PlayOnRemove=true
  1181. s.Parent=nil
  1182.  
  1183. end
  1184. Damage=Damage+math.random(0,100)
  1185. -- Blood(hit.CFrame*cf(math.random(-10,10)/10,math.random(-10,10)/10,0),math.floor(Damage/50))
  1186. h:TakeDamage(Damage)
  1187. showDamage(hit.Parent,Damage,100)
  1188. vp=it("BodyVelocity")
  1189. vp.P=500
  1190. vp.maxForce=vt(math.huge,0,math.huge)
  1191. -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback
  1192. vp.velocity=Torso.CFrame.lookVector*Knockback+Torso.Velocity/1.05
  1193. if Knockback>0 then
  1194. vp.Parent=hit.Parent.Torso
  1195. end
  1196. game:GetService("Debris"):AddItem(vp,1)
  1197. --[[ r=it("BodyAngularVelocity")
  1198. r.P=3000
  1199. r.maxTorque=vt(500000000,50000000000,500000000)*50000
  1200. r.angularvelocity=vt(math.random(-20,20),math.random(-20,20),math.random(-20,20))
  1201. r.Parent=hit.Parent.Torso]]
  1202. game:GetService("Debris"):AddItem(r,.5)
  1203. c=it("ObjectValue")
  1204. c.Name="creator"
  1205. c.Value=Player
  1206. c.Parent=h
  1207. game:GetService("Debris"):AddItem(c,.5)
  1208. CRIT=false
  1209. hitDeb=true
  1210. AttackPos=6
  1211. end
  1212. end
  1213. end
  1214.  
  1215. DOH=function(hit,Damage,Knockback)
  1216. if attackdebounce == false then
  1217. attackdebounce = true
  1218. coroutine.resume(coroutine.create(function()
  1219. wait(0.2)
  1220. attackdebounce = false
  1221. end))
  1222. if hit.Parent==nil then
  1223. return
  1224. end
  1225. CPlayer=Bin
  1226. h=hit.Parent:FindFirstChild("Humanoid")
  1227. if h~=nil and hit.Parent.Name~="Fenrier" and hit.Parent:FindFirstChild("Torso")~=nil then
  1228. Damage=Damage
  1229. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  1230. return
  1231. end]]
  1232. c=it("ObjectValue")
  1233. c.Name="creator"
  1234. c.Value=game.Players.LocalPlayer
  1235. c.Parent=h
  1236. game:GetService("Debris"):AddItem(c,.5)
  1237. -- print(c.Value)
  1238. if math.random(0,99)+math.random()<=7.8 then
  1239. CRIT=true
  1240. Damage=Damage*100
  1241. --[[ Knockback=Knockback*2
  1242. r=it("BodyAngularVelocity")
  1243. r.P=3000
  1244. r.maxTorque=vt(500000000,50000000000,500000000)*50000
  1245. r.angularvelocity=vt(math.random(-20,20),math.random(-20,20),math.random(-20,20))
  1246. r.Parent=hit.Parent.Torso]]
  1247. s=it("Sound")
  1248. s.SoundId="http://www.roblox.com/asset/?id=2801263"
  1249. s.Volume=1
  1250. s.Pitch=2
  1251. s.Parent=hit
  1252. s.PlayOnRemove=true
  1253. s.Parent=nil
  1254.  
  1255. end
  1256. Damage=Damage+math.random(0,90)
  1257. -- Blood(hit.CFrame*cf(math.random(-10,10)/10,math.random(-10,10)/10,0),math.floor(Damage/90))
  1258. h:TakeDamage(Damage)
  1259. showDamage(hit.Parent,Damage,100)
  1260. vp=it("BodyVelocity")
  1261. vp.P=500
  1262. vp.maxForce=vt(math.huge,0,math.huge)
  1263. -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback
  1264. vp.velocity=Torso.CFrame.lookVector*Knockback+Torso.Velocity/1.05
  1265. if Knockback>0 then
  1266. vp.Parent=hit.Parent.Torso
  1267. end
  1268. game:GetService("Debris"):AddItem(vp,.25)
  1269. --[[ r=it("BodyAngularVelocity")
  1270. r.P=3000
  1271. r.maxTorque=vt(500000000,50000000000,500000000)*50000
  1272. r.angularvelocity=vt(math.random(-20,20),math.random(-20,20),math.random(-20,20))
  1273. r.Parent=hit.Parent.Torso]]
  1274. game:GetService("Debris"):AddItem(r,.5)
  1275. c=it("ObjectValue")
  1276. c.Name="creator"
  1277. c.Value=Player
  1278. c.Parent=h
  1279. game:GetService("Debris"):AddItem(c,.5)
  1280. wait(1)
  1281. DOHeffect(hit,20,30,2,0,0)
  1282. bewm(workspace,1)
  1283. wait(0.1)
  1284. DOHeffect(hit,20,30,-2,0.5,0)
  1285. bewm(workspace,1)
  1286. wait(0.1)
  1287. DOHeffect(hit,20,30,2,1,0)
  1288. bewm(workspace,1)
  1289. wait(0.1)
  1290. DOHeffect(hit,20,30,-2,1.5,0)
  1291. bewm(workspace,1)
  1292. CRIT=false
  1293. hitDeb=true
  1294. AttackPos=6
  1295. end
  1296. end
  1297. end
  1298.  
  1299. showDamage=function(Char,Dealt,du)
  1300. m=it("Model")
  1301. m.Name=tostring(Dealt)
  1302. h=it("Humanoid")
  1303. h.Health=0
  1304. h.MaxHealth=0
  1305. h.Parent=m
  1306. c=it("Part")
  1307. c.Transparency=0
  1308. c.BrickColor=BrickColor:Red()
  1309. if CRIT==true then
  1310. c.BrickColor=BrickColor.new("Hot pink")
  1311. end
  1312. c.Name="Head"
  1313. c.TopSurface=0
  1314. c.BottomSurface=0
  1315. c.formFactor="Plate"
  1316. c.Size=vt(1,.4,1)
  1317. ms=it("CylinderMesh")
  1318. ms.Bevel=.1
  1319. ms.Scale=vt(.8,.8,.8)
  1320. if CRIT==true then
  1321. ms.Scale=vt(1.25,1.5,1.25)
  1322. ms.Bevel=.2
  1323. end
  1324. ms.Parent=c
  1325. c.Reflectance=0
  1326. it("BodyGyro").Parent=c
  1327. c.Parent=m
  1328. c.CFrame=cf(Char["Head"].CFrame.p+vt(0,1.5,0))
  1329. f=it("BodyPosition")
  1330. f.P=2000
  1331. f.D=100
  1332. f.maxForce=vt(math.huge,math.huge,math.huge)
  1333. f.position=c.Position+vt(0,3,0)
  1334. f.Parent=c
  1335. game:GetService("Debris"):AddItem(m,.5+du)
  1336. c.CanCollide=false
  1337. m.Parent=workspace
  1338. c.CanCollide=false
  1339. end
  1340.  
  1341. function shoottrail2(pos1,Damage)
  1342. coroutine.resume(coroutine.create(function()
  1343. spread2 = 0
  1344. range2 = 100
  1345. rangepower = 10
  1346. local spreadvector = (vt(math.random(-spread2,spread2),math.random(-spread2,spread2),math.random(-spread2,spread2)) / 100) * (pos1.Position).magnitude/100
  1347. local dir = Head.CFrame.lookVector+spreadvector
  1348. --local dir = pos1.CFrame.lookVector+spreadvector
  1349. local ammount = 100
  1350. local hit2,pos = rayCast(pos1.Position,dir,10,Main)
  1351. local rangepos = range2
  1352. local function drawtrail(From,To)
  1353. local effectsmsh = it("SpecialMesh")
  1354. local Damg = Damage*250
  1355. effectsmsh.Scale = vt(1,1,1)
  1356. effectsmsh.MeshType="Sphere"
  1357. effectsmsh.Name = "Mesh"
  1358. local effectsg = it("Part")
  1359. effectsg.formFactor = 3
  1360. effectsg.CanCollide = false
  1361. effectsg.Name = "Eff"
  1362. effectsg.Locked = true
  1363. effectsg.Anchored = true
  1364. effectsg.Size = vt(1,0.4,1)
  1365. effectsg.Parent = Main
  1366. effectsmsh.Parent = effectsg
  1367. effectsg.BrickColor = BrickColor.new("Hot pink")
  1368. effectsg.Reflectance = 0.25
  1369. local LP = From
  1370. local point1 = To
  1371. local mg = (LP - point1).magnitude
  1372. effectsmsh.Scale = vt(3,3,3)
  1373. effectsg.CFrame = cf((LP+point1)/2,point1) * CFrame.Angles(math.rad(90),0,0)
  1374. MMMAGIC(effectsg,4,4,4,0,0,0,BrickColor.new("Really black"))
  1375. MOREMAGIX(effectsg,0,2,2,2,BrickColor.new("Hot pink"))
  1376. coroutine.resume(coroutine.create(function()
  1377. --[[for i = 0 , 1 , 0.1 do
  1378. wait()
  1379. effectsg.Transparency = 1*i
  1380. effectsmsh.Scale = vt(1-1*i,mg*5,1-1*i)
  1381. end ]]
  1382. wait()
  1383. effectsg.Transparency = 1
  1384. wait(2)
  1385. effectsg.Parent = nil
  1386. end))
  1387. end
  1388. local newpos = pos1.Position
  1389. local inc = rangepower
  1390. ammount=100
  1391. local Damg = Damage*250
  1392. local decr = 0
  1393. repeat
  1394. wait()
  1395. decr = decr + 1
  1396. rangepos = rangepos - 10
  1397. dir = dir
  1398. --dir = dir
  1399. ammount=ammount-3
  1400. if decr == 2 then
  1401. Damg = Damg/2
  1402. decr=0
  1403. end
  1404. hit2,pos = rayCast(newpos,dir,inc,Main)
  1405. drawtrail(newpos,pos)
  1406. newpos = newpos + (dir * inc)
  1407. if alt==1 then
  1408. inc = 10
  1409. if inc >= 20 then
  1410. inc = inc - 10
  1411. end
  1412. end
  1413. if hit2 ~= nil then
  1414. rangepos = 0
  1415. end
  1416. until rangepos <= 0
  1417. EVENMOARMAGIX2(cf(newpos),2,2,2,0,0,0,0,0,0,BrickColor.new("Really black"))
  1418. local c = game.Workspace:GetChildren();
  1419. for i = 1, #c do
  1420. local hum = c[i]:findFirstChild("Humanoid")
  1421. if hum ~= nil and hum.Health ~= 0 then
  1422. local head = c[i]:findFirstChild("Head");
  1423. if head ~= nil then
  1424. local targ = head.Position - newpos;
  1425. local mag = targ.magnitude;
  1426. if mag <= 10 and c[i].Name ~= Player.Name then
  1427. attackdebounce=false
  1428. Damagefunc1(head,math.floor(Damg),100)
  1429. end
  1430. end
  1431. end
  1432. end
  1433. if hit2 ~= nil then
  1434. local effectsmsh = it("SpecialMesh")
  1435. effectsmsh.MeshId = "http://www.roblox.com/asset/?id=15887356"
  1436. --effectsmsh.Scale = vt(1,1,2.5)
  1437. effectsmsh.Scale = vt(3,3,3)
  1438. local effectsg = it("Part")
  1439. effectsg.formFactor = 3
  1440. effectsg.CanCollide = false
  1441. effectsg.Name = "Arrow"
  1442. effectsg.Locked = true
  1443. effectsg.Transparency = 1
  1444. effectsg.Size = vt(0.2,0.2,0.2)
  1445. effectsg.Parent = Main
  1446. effectsg.BrickColor = BrickColor.new("Really black")
  1447. effectsmsh.Parent = effectsg
  1448. effectsg.CFrame = cf(newpos,pos) + cf(newpos,pos).lookVector*2.5*2
  1449. coroutine.resume(coroutine.create(function()
  1450. wait(0)
  1451. effectsg.Parent = nil
  1452. end))
  1453. local efwel = it("Weld")
  1454. efwel.Parent = effectsg
  1455. efwel.Part0 = effectsg
  1456. efwel.Part1 = hit2
  1457. efwel.Parent = nil
  1458. effectsg.Anchored = true
  1459. --local HitPos = effectsg.Position + cf(newpos,pos).lookVector*0.75
  1460. --local HitPos = prt1.Position + cf(newpos,pos).lookVector*0.75
  1461. local HitPos = Prt4.Position + (Head.CFrame.lookVector * .5)
  1462. local CJ = cf(HitPos)
  1463. local C0 = effectsg.CFrame:inverse() * CJ
  1464. local C1 = hit2.CFrame:inverse() * CJ
  1465. --efwel.C0 = C0
  1466. --efwel.C1 = C1
  1467. --efwel.Parent = effectsg
  1468. if hit2.Parent:FindFirstChild("Humanoid") ~= nil then
  1469. hum = hit2.Parent.Humanoid
  1470. attackdebounce=false
  1471. Damagefunc1(hit2,math.floor(Damg),100)
  1472. elseif hit2.Parent.Parent ~= nil and hit2.Parent.Parent:FindFirstChild("Humanoid") ~= nil then
  1473. hum = hit2.Parent.Parent.Humanoid
  1474. attackdebounce=false
  1475. Damagefunc1(hum,math.floor(Damg),250)
  1476. end
  1477. end
  1478. end))
  1479. end
  1480.  
  1481. function shoottrail3(pos1,Damage)
  1482. coroutine.resume(coroutine.create(function()
  1483. spread2 = 0
  1484. range2 = 1000
  1485. rangepower = 2
  1486. local spreadvector = (vt(math.random(-spread2,spread2),math.random(-spread2,spread2),math.random(-spread2,spread2)) / 100) * (pos1.Position).magnitude/100
  1487. local dir = Head.CFrame.lookVector+spreadvector
  1488. --local dir = pos1.CFrame.lookVector+spreadvector
  1489. local ammount = 100
  1490. local hit2,pos = rayCast(pos1.Position,dir,10,Character)
  1491. local rangepos = range2
  1492. local function drawtrail(From,To)
  1493. local effectsmsh = it("SpecialMesh")
  1494. local Damg = Damage*50
  1495. effectsmsh.Scale = vt(1,1,1)
  1496. effectsmsh.MeshType="Sphere"
  1497. effectsmsh.Name = "Mesh"
  1498. local effectsg = it("Part")
  1499. effectsg.formFactor = 3
  1500. effectsg.CanCollide = false
  1501. effectsg.Name = "Eff"
  1502. effectsg.Locked = true
  1503. effectsg.Anchored = true
  1504. effectsg.Size = vt(1,0.4,1)
  1505. effectsg.Parent = Main
  1506. effectsmsh.Parent = effectsg
  1507. effectsg.BrickColor = BrickColor.new("Really black")
  1508. effectsg.Reflectance = 0
  1509. effectsg.Transparency=0.3
  1510. local LP = From
  1511. local point1 = To
  1512. local mg = (LP - point1).magnitude
  1513. effectsmsh.Scale = vt(3,3,3)
  1514. effectsg.CFrame = cf((LP+point1)/2,point1) * CFrame.Angles(math.rad(90),0,0)
  1515. MMMAGIC3(effectsg.CFrame,1,6,1,0,0,0,BrickColor.new("Really black"))
  1516. EVENMOARMAGIX(effectsg,3,3,3,0,0,0,0,0,0,BrickColor.new("Really black"))
  1517. MOREMAGIX(effectsg,0,2,2,2,BrickColor.new("Hot pink"))
  1518. coroutine.resume(coroutine.create(function()
  1519. --[[for i = 0 , 1 , 0.1 do
  1520. wait()
  1521. effectsg.Transparency = 1*i
  1522. effectsmsh.Scale = vt(1-1*i,mg*5,1-1*i)
  1523. end ]]
  1524. wait()
  1525. effectsg.Transparency = 1
  1526. wait(2)
  1527. effectsg.Parent = nil
  1528. end))
  1529. end
  1530. local newpos = pos1.Position
  1531. local inc = rangepower
  1532. ammount=100
  1533. local Damg = Damage*90
  1534. local decr = 0
  1535. repeat
  1536. wait()
  1537. decr = decr + 1
  1538. rangepos = rangepos - 10
  1539. dir = dir
  1540. --dir = dir
  1541. ammount=ammount-3
  1542. hit2,pos = rayCast(newpos,dir,inc,Character)
  1543. drawtrail(newpos,pos)
  1544. newpos = newpos + (dir * inc)
  1545. if alt==1 then
  1546. inc = 10
  1547. if inc >= 20 then
  1548. inc = inc - 10
  1549. end
  1550. end
  1551. if hit2 ~= nil then
  1552. rangepos = 0
  1553. end
  1554. until rangepos <= 0
  1555. EVENMOARMAGIX2(cf(newpos),5,5,5,0,0,0,0,0,0,BrickColor.new("Really black"))
  1556. local c = game.Workspace:GetChildren();
  1557. for i = 1, #c do
  1558. local hum = c[i]:findFirstChild("Humanoid")
  1559. if hum ~= nil and hum.Health ~= 0 then
  1560. local head = c[i]:findFirstChild("Head");
  1561. if head ~= nil then
  1562. local targ = head.Position - newpos;
  1563. local mag = targ.magnitude;
  1564. if mag <= 30 and c[i].Name ~= Player.Name then
  1565. attackdebounce=false
  1566. Damagefunc1(head,math.floor(Damg),0.1)
  1567. end
  1568. end
  1569. end
  1570. end
  1571. if hit2 ~= nil then
  1572. print(hit2)
  1573. local effectsmsh = it("SpecialMesh")
  1574. effectsmsh.MeshId = "http://www.roblox.com/asset/?id=15887356"
  1575. --effectsmsh.Scale = vt(1,1,2.5)
  1576. effectsmsh.Scale = vt(3,3,3)
  1577. local effectsg = it("Part")
  1578. effectsg.formFactor = 3
  1579. effectsg.CanCollide = false
  1580. effectsg.Name = "Arrow"
  1581. effectsg.Locked = true
  1582. effectsg.Transparency = 1
  1583. effectsg.Size = vt(0.2,0.2,0.2)
  1584. effectsg.Parent = Main
  1585. effectsg.BrickColor = BrickColor.new("Really black")
  1586. effectsmsh.Parent = effectsg
  1587. effectsg.CFrame = cf(newpos,pos) + cf(newpos,pos).lookVector*2.5*2
  1588. coroutine.resume(coroutine.create(function()
  1589. wait(0)
  1590. effectsg.Parent = nil
  1591. end))
  1592. local efwel = it("Weld")
  1593. efwel.Parent = effectsg
  1594. efwel.Part0 = effectsg
  1595. efwel.Part1 = hit2
  1596. efwel.Parent = nil
  1597. effectsg.Anchored = true
  1598. --local HitPos = effectsg.Position + cf(newpos,pos).lookVector*0.75
  1599. --local HitPos = prt1.Position + cf(newpos,pos).lookVector*0.75
  1600. local HitPos = Prt4.Position + (Head.CFrame.lookVector * .5)
  1601. local CJ = cf(HitPos)
  1602. local C0 = effectsg.CFrame:inverse() * CJ
  1603. local C1 = hit2.CFrame:inverse() * CJ
  1604. --efwel.C0 = C0
  1605. --efwel.C1 = C1
  1606. --efwel.Parent = effectsg
  1607. if hit2.Parent:FindFirstChild("Humanoid") ~= nil then
  1608. hum = hit2.Parent.Humanoid
  1609. attackdebounce=false
  1610. Damagefunc1(hit2,math.floor(Damg),100)
  1611. elseif hit2.Parent.Parent ~= nil and hit2.Parent.Parent:FindFirstChild("Humanoid") ~= nil then
  1612. hum = hit2.Parent.Parent.Humanoid
  1613. attackdebounce=false
  1614. Damagefunc1(hum,math.floor(Damg),90)
  1615. end
  1616. end
  1617. end))
  1618. end
  1619.  
  1620.  
  1621. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , Ignore Descendants
  1622. return game.Workspace:FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  1623. end
  1624.  
  1625. hold = false
  1626.  
  1627. function ob1d(mouse)
  1628. if attack == true then return end
  1629. hold=true
  1630. if mode=="Shoot" then
  1631. shoottrail2(Prt4,15)
  1632. attack=true
  1633. for i=0,1,0.4 do
  1634. wait()
  1635. Torso.Neck.C0=necko*euler(0,-offset,-1.57)
  1636. LW.C0 = cf(-1.5,0.5,0) * euler(0,0,-0.5)
  1637. LW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  1638. RW.C0 = cf(1.5,0.5,0) * euler(0,0,1.57)
  1639. RW.C1 = cf(0, 0.5, 0) * euler(offset-0.3*i,1.57,0)
  1640. end
  1641. for i=0,1,0.4 do
  1642. wait()
  1643. Torso.Neck.C0=necko*euler(0,-offset,-1.57)
  1644. LW.C0 = cf(-1.5,0.5,0) * euler(0,0,-0.5)
  1645. LW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  1646. RW.C0 = cf(1.5,0.5,0) * euler(0,0,1.57)
  1647. RW.C1 = cf(0, 0.5, 0) * euler(offset-0.3+0.3*i,1.57,0)
  1648. end
  1649. attack=false
  1650. Stance()
  1651. end
  1652. end
  1653.  
  1654. function ob1u(mouse)
  1655. hold = false
  1656. end
  1657.  
  1658. buttonhold = false
  1659.  
  1660. function Key(key,mouse)
  1661. if attack == true then return end
  1662. if key=="f" then
  1663. Mode()
  1664. end
  1665. if key=="u" then
  1666. OverchargeBlast()
  1667. end
  1668. Stance()
  1669. pcall(function() act.key[key:lower()] = true end)
  1670. local kk = key:lower()
  1671. coroutine.resume(coroutine.create(function()
  1672. if kk == "w" or kk == "a" or kk == "s" or kk == "d" then
  1673. while act.key["w"] == true or act.key["a"] == true or act.key["s"] == true or act.key["d"] == true do
  1674. wait()
  1675. end
  1676. walking = false
  1677. end
  1678. end))
  1679. if kk == "w" or kk == "a" or kk == "s" or kk == "d" then
  1680. if walking == true then return end
  1681. while act.key["w"] == true or act.key["a"] == true or act.key["s"] == true or act.key["d"] == true do
  1682. if mode=="Normal" then
  1683. Walking()
  1684. elseif mode=="Shoot" then
  1685. dodging=true
  1686. Torso.Neck.C0=necko*euler(0,-offset,-1.57)
  1687. if kk=="w" then
  1688. DodgeUp()
  1689. elseif kk=="a" then
  1690. DodgeLeft()
  1691. elseif kk=="s" then
  1692. DodgeRight()
  1693. elseif kk=="d" then
  1694. DodgeDown()
  1695. end
  1696. dodging=false
  1697. Stance()
  1698. end
  1699. wait()
  1700. end
  1701. walking = false
  1702. Stance()
  1703. end
  1704. end
  1705.  
  1706. function Key2(key,mouse)
  1707. pcall(function() act.key[key:lower()] = false end)
  1708. end
  1709.  
  1710. function s(mouse)
  1711. mouse.Button1Down:connect(function() ob1d(mouse) end)
  1712. mouse.Button1Up:connect(function() ob1u(mouse) end)
  1713. mouse.KeyDown:connect(function(key) Key(key,mouse) end)
  1714. --mouse.KeyDown:connect(key2)
  1715. mouse.KeyUp:connect(function(key) Key2(key,mouse) end)
  1716. mouse.KeyUp:connect(function(k) act.keydown = false
  1717. pcall(function() act.key[k:lower()] = false end)
  1718. hold = false
  1719. end)
  1720. MMouse = mouse
  1721. sheathed = false
  1722. player = Player
  1723. ch = Character
  1724. RSH = ch.Torso["Right Shoulder"]
  1725. LSH = ch.Torso["Left Shoulder"]
  1726. RHP = ch.Torso["Right Hip"]
  1727. LHP = ch.Torso["Left Hip"]
  1728. --
  1729. RSH.Parent = nil
  1730. LSH.Parent = nil
  1731. --[[RHP.C0 = cf(-0.5, -1.5, 0) * euler(0,0,0)
  1732. RHP.C1 = cf(0, 0.5, 0)
  1733. LHP.C0 = cf(0.5, -1.5, 0) * euler(0,0,0)
  1734. LHP.C1 = cf(0, 0.5, 0) ]]
  1735. --
  1736. RW.Part0 = ch.Torso
  1737. RW.C0 = cf(1.5, 0.5, 0) --* euler(1.3, 0, -0.5)
  1738. RW.C1 = cf(0, 0.5, 0)
  1739. RW.Part1 = ch["Right Arm"]
  1740. RW.Parent = ch.Torso
  1741. --_G.R = RW
  1742. --
  1743. LW.Part0 = ch.Torso
  1744. LW.C0 = cf(-1.5, 0.5, 0) --* euler(1.7, 0, 0.8)
  1745. LW.C1 = cf(0, 0.5, 0)
  1746. LW.Part1 = ch["Left Arm"]
  1747. LW.Parent = ch.Torso
  1748. --_G.L = LW
  1749. --
  1750. --[[RW2.Part0 = ch.Torso
  1751. RW2.C0 = cf(0.5, -1.5, 0) --* euler(1.7, 0, 0.8)
  1752. RW2.C1 = cf(0, 0.5, 0)
  1753. RW2.Part1 = ch["Right Leg"]
  1754. RW2.Parent = ch.Torso
  1755. --_G.L = LW
  1756. --
  1757. LW2.Part0 = ch.Torso
  1758. LW2.C0 = cf(-0.5, -1.5, 0) --* euler(1.7, 0, 0.8)
  1759. LW2.C1 = cf(0, 0.5, 0)
  1760. LW2.Part1 = ch["Left Leg"]
  1761. LW2.Parent = ch.Torso
  1762. --_G.L = LW
  1763. -- ]]
  1764. equipanim(mouse)
  1765. end
  1766.  
  1767. function ds(mouse)
  1768. sheathed = true
  1769. guardy = false
  1770. walking = nil
  1771. Character.Humanoid.WalkSpeed = 16
  1772. Torso.Neck.C1 = euler(1.57,3.14,0) * cf(0,0,-0.5)
  1773. --[[RHP.C0 = cf(0.5, -1.5, 0) * euler(0,math.rad(90),0)
  1774. RHP.C1 = cf(0, 0, 0)
  1775. LHP.C0 = cf(-0.5, -1.5, 0) * euler(0,math.rad(90),0)
  1776. LHP.C1 = cf(0, 0, 0) ]]
  1777. hideanim()
  1778. RW.Parent = nil
  1779. LW.Parent = nil
  1780. RSH.Parent = player.Character.Torso
  1781. LSH.Parent = player.Character.Torso
  1782. end
  1783.  
  1784. Bin.Selected:connect(s)
  1785. Bin.Deselected:connect(ds)
  1786.  
  1787. increase=0
  1788. --[[while true do
  1789. wait()
  1790. RH.Part0 = Torso
  1791. LH.Part0 = Torso
  1792. if mana < 0 then
  1793. mana = 0
  1794. end
  1795. if mana >= 400 then
  1796. mana=400
  1797. end
  1798. increase = increase + 1
  1799. if increase == 5 then
  1800. if mana < 400 then
  1801. mana = mana + 1
  1802. end
  1803. increase = 0
  1804. end
  1805. fentext3.Size = UDim2.new(mana*0.007,0,0.200000006,0)
  1806. fentext.Text = "Dark Energy("..mana..")"
  1807. end ]]
  1808. -- lego mediafire This acts as a chat filter. Don't ask why I do it. I just do >.>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement