Advertisement
RealPieDiePew

Untitled

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