Advertisement
memberhero

Rock

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