Noob_666

Ghosdeeri's blade (MODIFIED BY ME!)

Mar 26th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 77.60 KB | None | 0 0
  1. --I will pretty soon be adding the Ghosdeeri pumpkin hat to this, be patient for now.
  2.  
  3. game.Chat:Chat(game.Players.LocalPlayer.Character.Head,"Hello there, my name is Ghosdeeri, and this is my blade, you will soon be cut into little pieces with it. :)", "White")
  4. wait(2.6)
  5. game.Chat:Chat(game.Players.LocalPlayer.Character.Head,"So, better prepare for an INSTANT death, mortal!", "White")
  6. Player=game:GetService("Players").LocalPlayer
  7. Character=Player.Character
  8. PlayerGui=Player.PlayerGui
  9. Backpack=Player.Backpack
  10. Torso=Character.Torso
  11. Head=Character.Head
  12. Humanoid=Character.Humanoid
  13. print('Player is Eliagable')
  14. LeftArm=Character["Left Arm"]
  15. LeftLeg=Character["Left Leg"]
  16. RightArm=Character["Right Arm"]
  17. RightLeg=Character["Right Leg"]
  18. LS=Torso["Left Shoulder"]
  19. LH=Torso["Left Hip"]
  20. RS=Torso["Right Shoulder"]
  21. RH=Torso["Right Hip"]
  22. Neck=Torso.Neck
  23. it=Instance.new
  24. vt=Vector3.new
  25. cf=CFrame.new
  26. euler=CFrame.fromEulerAnglesXYZ
  27. angles=CFrame.Angles
  28. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  29. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  30. LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
  31. LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
  32. RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
  33. RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
  34. RootPart=Character.HumanoidRootPart
  35. RootJoint=RootPart.RootJoint
  36. RootCF=euler(-1.57,0,3.14)
  37. attack=false
  38. attackdebounce=false
  39. MMouse=nil
  40. combo=0
  41. local Anim="Idle"
  42. local Effects={}
  43. equipped=false
  44. local idle=0
  45. local hold=false
  46. local con1=nil
  47. local con2=nil
  48. local Mode="Binary"
  49. local idleanim=0
  50. local idleanim2=false
  51. local impulse=1
  52. local hitfloor,posfloor=nil,nil
  53. local damcount=0
  54. local guard=false
  55. --player
  56. player=nil
  57. --save shoulders
  58. RSH, LSH=nil, nil
  59. --welds
  60. RW, LW=Instance.new("Weld"), Instance.new("Weld")
  61. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  62. LH=Torso["Left Hip"]
  63. RH=Torso["Right Hip"]
  64. Asset="http://www.roblox.com/asset/?id="
  65. Health=1000000
  66. Humanoid.MaxHealth=1000000
  67. Humanoid.Health=1000000
  68. coroutine.resume(coroutine.create(function()
  69. for i=1,20 do
  70. Humanoid.MaxHealth=1000000
  71. Humanoid.Health=1000000
  72. end
  73. Humanoid.MaxHealth=1000000
  74. Humanoid.Health=1000000
  75. Humanoid:TakeDamage(0)
  76. Humanoid.Health=Health
  77. end))
  78. Humanoid.Health=Health
  79.  
  80. function swait(num)
  81. if num==0 or num==nil then
  82. game:service'RunService'.RenderStepped:wait()
  83. else
  84. for i=0,num do
  85. game:service'RunService'.RenderStepped:wait()
  86. end
  87. end
  88. end
  89.  
  90. if Character:findFirstChild("Blood",true) ~= nil then
  91. Character:findFirstChild("Blood",true).Parent = nil
  92. end
  93. if Character:findFirstChild("Demon Blade",true) ~= nil then
  94. Character:findFirstChild("Demon Blade",true).Parent = nil
  95. end
  96. if Player.PlayerGui:findFirstChild("WeaponGUI",true) ~= nil then
  97. Player.PlayerGui:findFirstChild("WeaponGUI",true).Parent = nil
  98. end
  99.  
  100.  
  101. function NoOutline(Part)
  102. Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
  103. end
  104.  
  105. function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
  106. local fp=it("Part")
  107. fp.formFactor=formfactor
  108. fp.Parent=parent
  109. fp.Reflectance=reflectance
  110. fp.Transparency=transparency
  111. fp.CanCollide=false
  112. fp.Locked=true
  113. fp.BrickColor=brickcolor
  114. fp.Name=name
  115. fp.Size=size
  116. fp.Position=Torso.Position
  117. NoOutline(fp)
  118. fp.Material="Granite"
  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. local fengui=it("GuiMain")
  145. fengui.Parent=Player.PlayerGui
  146. fengui.Name="WeaponGUI"
  147.  
  148. local Color1=BrickColor.new("White")
  149. local Color2=BrickColor.new("Black")
  150. local Colorr3=BrickColor.new("Black")
  151. local Color4=BrickColor.new("White")
  152.  
  153. local model1=Instance.new("Model")
  154. model1.Parent=Character
  155. model1.Name="Ghosdeeri"
  156. BSword={}
  157. BSwordWelds={}
  158. local model2=Instance.new("Model")
  159. model2.Parent=nil
  160. model2.Name="Demon Blade"
  161. DBlade={}
  162. DBladeWelds={}
  163.  
  164. prt1=part(3,model1,0,1,Color1,"Part1",vt())
  165. prt2=part(3,model1,0,0,Color2,"Part2",vt())
  166. prt3=part(3,model1,0,0,Color2,"Part3",vt())
  167. prt4=part(3,model1,0,0,Colorr3,"Part4",vt())
  168. prt5=part(3,model1,0,0,Colorr3,"Part5",vt())
  169. prt6=part(3,model1,0.7,0,Color4,"Part6",vt())
  170. prt7=part(3,model1,0.7,0,Color4,"Part7",vt())
  171. prt8=part(3,model1,0.7,0,Color4,"Part8",vt())
  172. prt9=part(3,model1,0.7,0,Color4,"Part9",vt())
  173. prt10=part(3,model1,0,0,Colorr3,"Part10",vt())
  174. prt11=part(3,model1,0,0,Colorr3,"Part11",vt())
  175. prt12=part(3,model1,0,0,Colorr3,"Part12",vt())
  176.  
  177. prtd1=part(3,model2,0,0.4,BrickColor.new("White"),"DPart1",vt())
  178. prtd2=part(3,model2,0,0,BrickColor.new("Really Really black"),"DPart2",vt())
  179. prtd3=part(3,model2,0,0,BrickColor.new("Really Really black"),"DPart3",vt())
  180. prtd4=part(3,model2,0,0,BrickColor.new("Really Really black"),"DPart4",vt())
  181. prtd5=part(3,model2,0,0,BrickColor.new("Really Really black"),"DPart5",vt())
  182. prtd6=part(3,model2,0,0,BrickColor.new("Really Really black"),"DPart6",vt())
  183. prtd7=part(3,model2,0.8,0,BrickColor.new("White"),"DPart7",vt())
  184. prtd8=part(3,model2,0.8,0,BrickColor.new("White"),"DPart8",vt())
  185. prtd9=part(3,model2,0.5,0.2,BrickColor.new("White"),"DPart9",vt())
  186. prtd10=part(3,model2,0.5,0.2,BrickColor.new("White"),"DPart10",vt())
  187. prtd11=part(3,model2,0.5,0,BrickColor.new("White"),"DPart11",vt())
  188. prtd12=part(3,model2,0,0,BrickColor.new("White"),"DPart12",vt())
  189. for _,c in pairs(model2:children()) do
  190. if c.className=="Part" then
  191. table.insert(DBlade,c)
  192. end
  193. end
  194. light=it("PointLight")
  195. light.Brightness=.8
  196. light.Color=Color3.new(255/255,50/255,0)
  197. --light.Color=BrickColor.new("Blue")
  198. light.Range=10
  199. light.Parent=prtd9
  200.  
  201. msh1=mesh("BlockMesh",prt1,"","",vt(0,0,0),vt(1,1,1))
  202. msh2=mesh("CylinderMesh",prt2,"","",vt(0,0,0),vt(2,10,2))
  203. msh3=mesh("SpecialMesh",prt3,"Head","",vt(0,0,0),vt(2.5,2,2.5))
  204. msh4=mesh("SpecialMesh",prt4,"Sphere","",vt(0,0,0),vt(3,3,3))
  205. msh5=mesh("SpecialMesh",prt5,"FileMesh","http://www.roblox.com/asset/?id=9756362",vt(0,0,0),vt(0.5,0.5,1))
  206. msh6=mesh("BlockMesh",prt6,"","",vt(0,0,0),vt(.5,20,1))
  207. msh7=mesh("BlockMesh",prt7,"","",vt(0,0,0),vt(.5,20,1))
  208. msh8=mesh("SpecialMesh",prt8,"Wedge","",vt(0,0,0),vt(.5,5,1))
  209. msh9=mesh("SpecialMesh",prt9,"Wedge","",vt(0,0,0),vt(.5,5,1))
  210. msh10=mesh("BlockMesh",prt10,"","",vt(0,0,0),vt(.6,20,0.2))
  211. msh11=mesh("SpecialMesh",prt11,"Wedge","",vt(0,0,0),vt(.6,5,0.1))
  212. msh12=mesh("SpecialMesh",prt12,"Wedge","",vt(0,0,0),vt(.6,5,0.1))
  213.  
  214. mshd1=mesh("BlockMesh",prtd1,"","",vt(0,0,0),vt(5.01,3,5.01))
  215. mshd2=mesh("BlockMesh",prtd2,"","",vt(0,0,0),vt(5.1,3,5.1))
  216. mshd3=mesh("SpecialMesh",prtd3,"Wedge","",vt(0,0,0),vt(5.05,4,3))
  217. mshd4=mesh("SpecialMesh",prtd4,"Wedge","",vt(0,0,0),vt(5.05,4,3))
  218. mshd5=mesh("SpecialMesh",prtd5,"Wedge","",vt(0,0,0),vt(5.5,6,6))
  219. mshd6=mesh("SpecialMesh",prtd6,"Wedge","",vt(0,0,0),vt(5.5,6,6))
  220. mshd7=mesh("BlockMesh",prtd7,"","",vt(0,0,0),vt(3,20,1))
  221. mshd8=mesh("SpecialMesh",prtd8,"Wedge","",vt(0,0,0),vt(1,3,5))
  222. mshd9=mesh("BlockMesh",prtd9,"","",vt(0,0,0),vt(4.5,20,.1))
  223. mshd10=mesh("SpecialMesh",prtd10,"Wedge","",vt(0,0,0),vt(.1,4.5,8))
  224. mshd11=mesh("CylinderMesh",prtd11,"","",vt(0,0,0),vt(4,5.8,4))
  225. mshd12=mesh("CylinderMesh",prtd12,"","",vt(0,0,0),vt(3,5.9,3))
  226.  
  227. wld1=weld(prt1,prt1,Torso,euler(3.7,1.57,0)*cf(-1.5,-2.3,-.5))
  228. wld2=weld(prt2,prt2,prt1,euler(0,0,0)*cf(0,0,0))
  229. wld3=weld(prt3,prt3,prt2,euler(0,0,0)*cf(0,1,0))
  230. wld4=weld(prt4,prt4,prt2,euler(0,0,0)*cf(0,-1,0))
  231. wld5=weld(prt5,prt5,prt4,euler(0,0,0)*cf(0,-0.2,0))
  232. wld6=weld(prt6,prt6,prt5,euler(0,0,0)*cf(0,-2,0.1))
  233. wld7=weld(prt7,prt7,prt5,euler(0,0,0)*cf(0,-2,-0.1))
  234. wld8=weld(prt8,prt8,prt6,euler(0,0,0)*cf(0,-2.5,0))
  235. wld9=weld(prt9,prt9,prt7,euler(0,3.14,0)*cf(0,-2.5,0))
  236. wld10=weld(prt10,prt10,prt5,euler(0,0,0)*cf(0,-2,0))
  237. wld11=weld(prt11,prt11,prt10,euler(0,0,0)*cf(0,-2.5,0.01))
  238. wld12=weld(prt12,prt12,prt10,euler(0,3.14,0)*cf(0,-2.5,-0.01))
  239.  
  240. wldd1=weld(prtd1,prtd1,RightArm,euler(0,0,0)*cf(0,.21,0))
  241. wldd2=weld(prtd1,prtd2,prtd1,euler(0,0,0)*cf(0,.5,0))
  242. wldd3=weld(prtd1,prtd3,prtd2,euler(0,1.57,0)*cf(.21,-.6,0))
  243. wldd4=weld(prtd1,prtd4,prtd2,euler(0,-1.57,0)*cf(-.21,-.6,0))
  244. wldd5=weld(prtd1,prtd5,prtd2,euler(0,-1.57,0)*cf(.1,-.1,0))
  245. wldd6=weld(prtd1,prtd6,prtd5,euler(0,0,3.14)*cf(0,1.2,0))
  246. wldd7=weld(prtd1,prtd7,prtd2,euler(0,0,0)*cf(0,2.5,0))
  247. wldd8=weld(prtd1,prtd8,prtd7,euler(1.57,1.57,0)*cf(0,2.5,0))
  248. wldd9=weld(prtd1,prtd9,prtd7,euler(0,0,0)*cf(0,0,0))
  249. wldd10=weld(prtd1,prtd10,prtd8,euler(0,0,0)*cf(0,0,0.3))
  250. wldd11=weld(prtd1,prtd11,prtd1,euler(1.57,0,0)*cf(0,1,0))
  251. wldd12=weld(prtd1,prtd12,prtd11,euler(0,0,0)*cf(0,0,0))
  252. for _,c in pairs(prtd1:children()) do
  253. if c.className=="Weld" then
  254. table.insert(DBladeWelds,c)
  255. print(c)
  256. end
  257. end
  258.  
  259. for i=-.9,.9,0.2 do
  260. prt13=part(3,model1,0,0,Color1,"Part13",vt())
  261. msh13=mesh("CylinderMesh",prt13,"","",vt(0,0,0),vt(2.2,1,2.2))
  262. wld13=weld(prt13,prt13,prt1,euler(math.random(-10,10)/100,math.random(-10,10)/100,math.random(-10,10)/100)*cf(0,i,0))
  263. end
  264.  
  265. local hitbox1=part(3,nil,0,1,BrickColor.new("Really black"),"Hitbox",vt(1,1,1))
  266. local hitbox2=part(3,nil,0,1,BrickColor.new("Really black"),"Hitbox",vt(1,1,1))
  267.  
  268. if (script.Parent.className~="HopperBin") then
  269. Tool=Instance.new("HopperBin")
  270. Tool.Parent=Backpack
  271. Tool.Name="Ghosdeeri"
  272. script.Parent=Tool
  273. end
  274. Bin=script.Parent
  275. --Bin=Tool
  276.  
  277. local bodvel=Instance.new("BodyVelocity")
  278. bodvel.Name="FixerVel"
  279. local bg=Instance.new("BodyGyro")
  280. bg.Name="FixerGyro"
  281.  
  282. so = function(id,par,vol,pit)
  283. coroutine.resume(coroutine.create(function()
  284. local sou = Instance.new("Sound",par or workspace)
  285. sou.Parent=par
  286. sou.Volume=vol
  287. sou.Pitch=pit or 1
  288. sou.SoundId=id
  289. swait()
  290. sou:Play()
  291. game:GetService("Debris"):AddItem(sou,6)
  292. end))
  293. end
  294.  
  295. function clerp(a,b,t)
  296. local qa = {QuaternionFromCFrame(a)}
  297. local qb = {QuaternionFromCFrame(b)}
  298. local ax, ay, az = a.x, a.y, a.z
  299. local bx, by, bz = b.x, b.y, b.z
  300. local _t = 1-t
  301. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  302. end
  303.  
  304. function QuaternionFromCFrame(cf)
  305. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  306. local trace = m00 + m11 + m22
  307. if trace > 0 then
  308. local s = math.sqrt(1 + trace)
  309. local recip = 0.5/s
  310. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  311. else
  312. local i = 0
  313. if m11 > m00 then
  314. i = 1
  315. end
  316. if m22 > (i == 0 and m00 or m11) then
  317. i = 2
  318. end
  319. if i == 0 then
  320. local s = math.sqrt(m00-m11-m22+1)
  321. local recip = 0.5/s
  322. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  323. elseif i == 1 then
  324. local s = math.sqrt(m11-m22-m00+1)
  325. local recip = 0.5/s
  326. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  327. elseif i == 2 then
  328. local s = math.sqrt(m22-m00-m11+1)
  329. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  330. end
  331. end
  332. end
  333.  
  334. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  335. local xs, ys, zs = x + x, y + y, z + z
  336. local wx, wy, wz = w*xs, w*ys, w*zs
  337. local xx = x*xs
  338. local xy = x*ys
  339. local xz = x*zs
  340. local yy = y*ys
  341. local yz = y*zs
  342. local zz = z*zs
  343. return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy))
  344. end
  345.  
  346. function QuaternionSlerp(a, b, t)
  347. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  348. local startInterp, finishInterp;
  349. if cosTheta >= 0.0001 then
  350. if (1 - cosTheta) > 0.0001 then
  351. local theta = math.acos(cosTheta)
  352. local invSinTheta = 1/math.sin(theta)
  353. startInterp = math.sin((1-t)*theta)*invSinTheta
  354. finishInterp = math.sin(t*theta)*invSinTheta  
  355. else
  356. startInterp = 1-t
  357. finishInterp = t
  358. end
  359. else
  360. if (1+cosTheta) > 0.0001 then
  361. local theta = math.acos(-cosTheta)
  362. local invSinTheta = 1/math.sin(theta)
  363. startInterp = math.sin((t-1)*theta)*invSinTheta
  364. finishInterp = math.sin(t*theta)*invSinTheta
  365. else
  366. startInterp = t-1
  367. finishInterp = t
  368. end
  369. end
  370. return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp
  371. end
  372.  
  373. function hideanim()
  374. equipped=false
  375. attack=true
  376. if Mode=="Binary" then
  377. so("rbxasset://sounds\\unsheath.wav",prt1,1,.8)
  378. for i=0,1,0.1 do
  379. swait()
  380. wld1.C0=clerp(wld1.C0,euler(.2,0,-.5)*cf(0,1,0),.3)
  381. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(-0.4,0,-0.5),.3)
  382. RW.C0=clerp(RW.C0,cf(1.3,0.5,0.2)*euler(3.4,0,0),.3)
  383. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,0),.3)
  384. end
  385. wld1.Part1=Torso
  386. wld1.C0=euler(3.7,1.57,0)*cf(-1.5,-2.3,-.5)
  387. for i=0,1,0.2 do
  388. swait()
  389. RW.C0=clerp(RW.C0,cf(1.3,0.5,0.2)*euler(0.5,0,0),.3)
  390. end
  391. for i=0,1,0.1 do
  392. swait()
  393. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.4)
  394. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,0),.4)
  395. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,0),.4)
  396. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,0),.4)
  397. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0),.3)
  398. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0),.3)
  399. end
  400. --wld1=weld(prt1,prt1,RightArm,euler(1.57,0,0)*cf(0,1,-0.3))
  401. else
  402. for i=0,1,0.1 do
  403. swait()
  404. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-0.5)*euler(0.4,0,-0.4),.3)
  405. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,-0.8),.3)
  406. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.4,-0.5,1)*euler(.5,0,0),.3)
  407. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-0.2,0,-0.2),.3)
  408. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(-0.2,1.57,0),.3)
  409. LH.C0=clerp(LH.C0,cf(-1,-.5,0)*euler(0.5,-1.2,0)*euler(-.2,0,0),.3)
  410. end
  411. so("http://roblox.com/asset/?id=161006163",RightArm,1,.4)
  412. so("http://roblox.com/asset/?id=160867463",RightArm,1,1.2)
  413. for i=0,1,0.015 do
  414. swait()
  415. for i=1,3 do
  416. if math.random(1,5)==1 then
  417. MagicBlock(BrickColor.new("Really Really black"),RightArm.CFrame*cf(math.random(-100,100)/100,0-math.random(0,700)/100,math.random(-100,100)/100),math.random(30,80)/100,math.random(30,80)/100,math.random(30,80)/100,.5,.5,.5,0.05)
  418. else
  419. MagicBlock(BrickColor.new("Bright red"),RightArm.CFrame*cf(math.random(-100,100)/100,-math.random(0,700)/100,math.random(-100,100)/100),math.random(30,80)/100,math.random(30,80)/100,math.random(30,80)/100,.5,.5,.5,0.05)
  420. end
  421. end
  422. end
  423. model2.Parent=nil
  424. for i=0,1,0.1 do
  425. swait()
  426. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.4)
  427. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,0),.4)
  428. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,0),.4)
  429. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,0),.4)
  430. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0),.3)
  431. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0),.3)
  432. end
  433. end
  434. Torso.Neck.C0=necko
  435. Torso.Neck.C1=necko2
  436. RootJoint.C0=RootCF
  437. RW.C0=cf(1.5,0.5,0)*euler(0,0,0)
  438. RW.C1=cf(0,0.5,0)*euler(0,0,0)
  439. LW.C0=cf(-1.5,0.5,0)*euler(0,0,0)
  440. LW.C1=cf(0,0.5,0)*euler(0,0,0)
  441. RH.C0=RHC0
  442. RH.C1=RHC1
  443. LH.C0=LHC0
  444. LH.C1=LHC1
  445. Mode="Binary"
  446. attack=false
  447. end
  448.  
  449. function equipanim()
  450. equipped=true
  451. attack=true
  452. for i=0,1,0.2 do
  453. swait()
  454. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(-0.4,0,-0.5),.3)
  455. RW.C0=clerp(RW.C0,cf(1.3,0.5,0.2)*euler(3,0,0),.4)
  456. end
  457. for i=0,1,0.1 do
  458. swait()
  459. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(-0.5,0,-0.6),.3)
  460. RW.C0=clerp(RW.C0,cf(1.3,0.5,0.2)*euler(3.4,0,0),.3)
  461. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-0.5),.3)
  462. end
  463. so("rbxasset://sounds\\unsheath.wav",prt1,1,.6)
  464. wld1.Part1=RightArm
  465. wld1.C0=euler(.2,0,-.5)*cf(0,1,0)
  466. for i=0,1,0.1 do
  467. swait()
  468. wld1.C0=clerp(wld1.C0,euler(1.57,0,0)*cf(0,1,0),.3)
  469. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0.2,0,-0.5),.3)
  470. RW.C0=clerp(RW.C0,cf(1.3,0.5,0.2)*euler(.5,-0.5,0),.3)
  471. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-0.5),.3)
  472. end
  473. for i=0,1,0.1 do
  474. swait()
  475. wld1.C0=clerp(wld1.C0,euler(1.57,0,0)*cf(0,1,-0.3),.3)
  476. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,0.5),.3)
  477. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-0.5),.3)
  478. RW.C0=clerp(RW.C0,cf(1,0.5,-0.5)*euler(1,-0.5,-0.7),.3)
  479. LW.C0=clerp(LW.C0,cf(-1,0.5,-0.5)*euler(1,-0.5,0.5),.3)
  480. end
  481. --wld1=weld(prt1,prt1,RightArm,euler(1.57,0,0)*cf(0,1,-0.3))
  482. wld1.C0=euler(1.57,0,0)*cf(0,1,-0.3)
  483. Torso.Neck.C0=necko*euler(0,0,0.5)
  484. RootJoint.C0=RootCF*euler(0,0,-0.5)
  485. RW.C0=cf(1,0.5,-0.5)*euler(1,-0.5,-0.7)
  486. RW.C1=cf(0,0.5,0)*euler(0,0,0)
  487. LW.C0=cf(-1,0.5,-0.5)*euler(1,-0.5,0.5)
  488. LW.C1=cf(0,0.5,0)*euler(0,0,0)
  489. attack=false
  490. end
  491.  
  492. function Stomp()
  493. Humanoid.WalkSpeed=0
  494. Torso.Velocity=RootPart.CFrame.lookVector*0
  495. so("http://roblox.com/asset/?id=157878578",Torso,1,0.8)
  496. so("http://roblox.com/asset/?id=2760979",Torso,1,0.4)
  497. --so("http://roblox.com/asset/?id=2101148",Torso,1,0.6)
  498. MagicWave(BrickColor.new("White"),cf(Torso.Position)*cf(0,-1,0),1,1,1,1.5,1,1.5,0.05)
  499. Dam=math.random(5,10)
  500. Humanoid.Health=Humanoid.Health-Dam
  501. MagniDamage(Torso,50,50,50,math.random(10000,200000),"Knockdown")
  502. --[[for i=0,1,0.2 do
  503. swait()
  504. if Mode=="Binary" then
  505. wld1.C0=clerp(wld1.C0,euler(0.4,0,-0.5)*cf(0,1,0),.3)
  506. end
  507. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(3,0,0.5),.3)
  508. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-1.2),.3)
  509. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0.4,0,0),.3)
  510. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-1)*euler(0,0,0),.3)
  511. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(-1.2,1.57,0),.3)
  512. LH.C0=clerp(LH.C0,cf(-1.1,-.5,-0.5)*euler(-0.2,-1.3,0),.3)
  513. end
  514. for i=0,1,0.1 do
  515. swait()
  516. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0.6,0,0),.3)
  517. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-1.2)*euler(0,0,0),.3)
  518. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(-1.4,1.57,0),.3)
  519. LH.C0=clerp(LH.C0,cf(-1.2,-.2,-0.5)*euler(-0.3,-1.3,0),.3)
  520. end]]
  521. swait(10)
  522. Humanoid.WalkSpeed=22
  523. end
  524.  
  525. function attackone()
  526. attack=true
  527. for i=0,1,0.1 do
  528. swait()
  529. wld1.C0=clerp(wld1.C0,euler(1.2,0,0)*cf(0,1,-0.3),.3)
  530. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0.1,0,1),.3)
  531. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-1),.3)
  532. RW.C0=clerp(RW.C0,cf(1,0.5,-0.5)*euler(2,-0.5,-0.2),.3)
  533. LW.C0=clerp(LW.C0,cf(-.5,0.5,-0.5)*euler(2.5,-0.5,0.8),.3)
  534. RH.C0=clerp(RH.C0,RHC0*euler(-.2,0,0),.3)
  535. LH.C0=clerp(LH.C0,LHC0*euler(-.2,0,0),.3)
  536. end
  537. hitbox1.Parent=model1
  538. hitbox1.Size=vt(1,5,1)
  539. hitbox1.Transparency=1
  540. hitbox1.CFrame=prt10.CFrame
  541. --con1=hitbox1.Touched:connect(function(hit) Damagefunc(hit,10000,200000,math.random(1,5),"Normal",RootPart,.5,1) end)
  542. con1=hitbox1.Touched:connect(function(hit) Damagefunc(hit,10000,200000,math.random(1,5),"Normal",RootPart,.5,1) end)
  543. so("http://roblox.com/asset/?id=161006212",prt10,1,.7)
  544. blcf=nil
  545. scfr=nil
  546. for i=0,1,0.25 do
  547. swait()
  548. local blcf = prt10.CFrame*CFrame.new(0,.5,0)
  549. if scfr and (prt10.Position-scfr.p).magnitude > .1 then
  550. local h = 5
  551. local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
  552. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  553. local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
  554. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  555. scfr = blcf
  556. elseif not scfr then
  557. scfr = blcf
  558. end
  559. hitbox1.CFrame=prt10.CFrame
  560. wld1.C0=clerp(wld1.C0,euler(1.8,0,0)*cf(0,1,-0.3),.3)
  561. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0.1,0,-.3),.3)
  562. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,.3),.3)
  563. RW.C0=clerp(RW.C0,cf(1,0.5,-0.5)*euler(.5,-.3,-.3),.3)
  564. LW.C0=clerp(LW.C0,cf(-0.8,0.2,-0.5)*euler(.5,-0.5,1),.3)
  565. end
  566. for i=0,1,0.1 do
  567. swait()
  568. local blcf = prt10.CFrame*CFrame.new(0,.5,0)
  569. if scfr and (prt10.Position-scfr.p).magnitude > .1 then
  570. local h = 5
  571. local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
  572. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  573. local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
  574. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  575. scfr = blcf
  576. elseif not scfr then
  577. scfr = blcf
  578. end
  579. hitbox1.CFrame=prt10.CFrame
  580. wld1.C0=clerp(wld1.C0,euler(2,0,0)*cf(0,1,-0.3),.3)
  581. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0.1,0,-.9),.3)
  582. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,.9),.3)
  583. RW.C0=clerp(RW.C0,cf(1,0.5,-0.5)*euler(.5,-.8,-.3),.3)
  584. LW.C0=clerp(LW.C0,cf(-1,0.5,-0.5)*euler(1.1,-0.5,.7),.3)
  585. end
  586. con1:disconnect()
  587. hitbox1.Parent=nil
  588. attack=false
  589. end
  590.  
  591. function attacktwo()
  592. attack=true
  593. for i=0,1,0.1 do
  594. swait()
  595. wld1.C0=clerp(wld1.C0,euler(1.57,0,0)*cf(0,1,-0.3),.3)
  596. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0.1,0,-1.2),.3)
  597. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,1.2),.3)
  598. RW.C0=clerp(RW.C0,cf(1,0.5,-0.5)*euler(.5,1.8,1.5),.3)
  599. LW.C0=clerp(LW.C0,cf(-1,0.5,-0.5)*euler(1.5,-0.5,.8),.3)
  600. RH.C0=clerp(RH.C0,RHC0*euler(-.2,0,0),.3)
  601. LH.C0=clerp(LH.C0,LHC0*euler(-.2,0,0),.3)
  602. end
  603. hitbox1.Parent=model1
  604. hitbox1.Size=vt(1,5,1)
  605. hitbox1.Transparency=1
  606. hitbox1.CFrame=prt10.CFrame
  607. con1=hitbox1.Touched:connect(function(hit) Damagefunc(hit,10000,200000,math.random(1,5),"Normal",RootPart,.5,1) end)
  608. so("http://roblox.com/asset/?id=161006212",prt10,1,.8)
  609. blcf=nil
  610. scfr=nil
  611. for i=0,1,0.1 do
  612. swait()
  613. local blcf = prt10.CFrame*CFrame.new(0,.5,0)
  614. if scfr and (prt10.Position-scfr.p).magnitude > .1 then
  615. local h = 5
  616. local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
  617. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  618. local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
  619. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  620. scfr = blcf
  621. elseif not scfr then
  622. scfr = blcf
  623. end
  624. hitbox1.CFrame=prt10.CFrame
  625. wld1.C0=clerp(wld1.C0,euler(2.2,0,0)*cf(0,.8,-0.3),.3)
  626. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0.1,0,1),.3)
  627. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-1),.3)
  628. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.2,1.2,0)*euler(-1.5,0,0),.3)
  629. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(.2,-.2,-1.4),.3)
  630. end
  631. con1:disconnect()
  632. hitbox1.Parent=nil
  633. attack=false
  634. end
  635.  
  636. function attackthree()
  637. attack=true
  638. for i=0,1,0.1 do
  639. swait()
  640. wld1.C0=clerp(wld1.C0,euler(1.57,0,-.785)*cf(0,.8,0),.3)
  641. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(-0.2,0,0),.3)
  642. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  643. RW.C0=clerp(RW.C0,cf(1,1,0)*euler(2.8,0,-.785),.3)
  644. LW.C0=clerp(LW.C0,cf(-1,1,0)*euler(2.8,0,.785),.3)
  645. RH.C0=clerp(RH.C0,RHC0*euler(-.2,0,0),.3)
  646. LH.C0=clerp(LH.C0,LHC0*euler(-.2,0,0),.3)
  647. end
  648. hitbox1.Parent=model1
  649. hitbox1.Size=vt(1,5,1)
  650. hitbox1.Transparency=1
  651. hitbox1.CFrame=prt10.CFrame
  652. con1=hitbox1.Touched:connect(function(hit) Damagefunc(hit,10000,200000,math.random(1,5),"Normal",RootPart,.5,1) end)
  653. so("http://roblox.com/asset/?id=161006212",prt10,1,.9)
  654. blcf=nil
  655. scfr=nil
  656. for i=0,1,0.25 do
  657. swait()
  658. local blcf = prt10.CFrame*CFrame.new(0,.5,0)
  659. if scfr and (prt10.Position-scfr.p).magnitude > .1 then
  660. local h = 5
  661. local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
  662. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  663. local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
  664. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  665. scfr = blcf
  666. elseif not scfr then
  667. scfr = blcf
  668. end
  669. hitbox1.CFrame=prt10.CFrame
  670. wld1.C0=clerp(wld1.C0,euler(1.7,0,0)*cf(0,1,0),.4)
  671. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0.2,0,-.6),.4)
  672. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,.6),.4)
  673. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(.5,0,.2),.4)
  674. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-.2),.4)
  675. end
  676. for i=0,1,0.2 do
  677. swait()
  678. local blcf = prt10.CFrame*CFrame.new(0,.5,0)
  679. if scfr and (prt10.Position-scfr.p).magnitude > .1 then
  680. local h = 5
  681. local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
  682. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  683. local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
  684. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  685. scfr = blcf
  686. elseif not scfr then
  687. scfr = blcf
  688. end
  689. hitbox1.CFrame=prt10.CFrame
  690. wld1.C0=clerp(wld1.C0,euler(2,0,0)*cf(0,.7,-.3),.4)
  691. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0.4,0,-.8),.4)
  692. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,.8),.4)
  693. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(.2,-.4,.4),.4)
  694. end
  695. con1:disconnect()
  696. hitbox1.Parent=nil
  697. attack=false
  698. end
  699.  
  700. function SpinSlash()
  701. attack=true
  702. for i=0,1,0.1 do
  703. swait()
  704. wld1.C0=clerp(wld1.C0,euler(1.57,0,0)*cf(0,1,-0.3),.4)
  705. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(-0.3,0,0.8),.4)
  706. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.5)*euler(0.2,0,-0.8),.4)
  707. RW.C0=clerp(RW.C0,cf(1,0.5,-0.5)*euler(2.2,-1.2,0)*euler(0,0,1),.4)
  708. LW.C0=clerp(LW.C0,cf(.1,0.5,-0.8)*euler(1.8,-0.5,1),.4)
  709. --RH.C0=clerp(RH.C0,RHC0*cf(0,0,0)*euler(0.2,0.2,.5),.3)
  710. --LH.C0=clerp(LH.C0,LHC0*cf(.5,0.2,0)*euler(0,.5,0.2),.3)
  711. end
  712. hitbox1.Parent=model1
  713. hitbox1.Size=vt(1,5,1)
  714. hitbox1.Transparency=1
  715. hitbox1.CFrame=prt10.CFrame
  716. con1=hitbox1.Touched:connect(function(hit) Damagefunc(hit,10000,150000,math.random(1,5),"Normal",RootPart,.2,1) end)
  717. blcf=nil
  718. scfr=nil
  719. so("http://roblox.com/asset/?id=161006212",prt10,1,.6)
  720. repeat
  721. hitbox1.Parent=model1
  722. hitbox1.Size=vt(1,5,1)
  723. hitbox1.Transparency=1
  724. hitbox1.CFrame=prt10.CFrame
  725. for i=0,1,0.15 do
  726. swait()
  727. local blcf = prt10.CFrame*CFrame.new(0,.5,0)
  728. if scfr and (prt10.Position-scfr.p).magnitude > .1 then
  729. local h = 5
  730. local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
  731. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  732. local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
  733. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  734. scfr = blcf
  735. elseif not scfr then
  736. scfr = blcf
  737. end
  738. hitbox1.CFrame=prt10.CFrame
  739. wld1.C0=clerp(wld1.C0,euler(1.2,0,0)*cf(0,1,-0.3),.3)
  740. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0.3,0,0),.3)
  741. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.5)*euler(0,0,2.3),.25)
  742. RW.C0=clerp(RW.C0,cf(1,0.5,-0.5)*euler(1.57,-1.57,0)*euler(-0.5,0,0),.3)
  743. LW.C0=clerp(LW.C0,cf(-1,0.5,-0.5)*euler(1.57,-1.57,0)*euler(0.5,0,0),.3)
  744. RH.C0=clerp(RH.C0,RHC0,.3)
  745. LH.C0=clerp(LH.C0,LHC0,.3)
  746. end
  747. for i=0,1,0.05 do
  748. swait()
  749. if i>=0.45 and i<=0.5 then
  750. so("http://roblox.com/asset/?id=161006212",prt10,1,.7)
  751. end
  752. local blcf = prt10.CFrame*CFrame.new(0,.5,0)
  753. if scfr and (prt10.Position-scfr.p).magnitude > .1 then
  754. local h = 5
  755. local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
  756. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  757. local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
  758. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  759. scfr = blcf
  760. elseif not scfr then
  761. scfr = blcf
  762. end
  763. hitbox1.CFrame=prt10.CFrame
  764. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.5)*euler(0,0,2.3+6*i),1)
  765. end
  766. until hold==false
  767. con1:disconnect()
  768. hitbox1.Parent=nil
  769. attack=false
  770. end
  771.  
  772. function BinarySwing()
  773. attack=true
  774. for i=0,1,0.1 do
  775. swait()
  776. wld1.C0=clerp(wld1.C0,euler(1.57,0,0)*cf(0,1,-0.3),.3)
  777. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,0.8),.3)
  778. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-1)*euler(0,0,-0.8),.3)
  779. RW.C0=clerp(RW.C0,cf(1,0.5,-0.5)*euler(.5,-2,0)*euler(.5,0,0),.3)
  780. LW.C0=clerp(LW.C0,cf(-.2,-.1,-0.5)*euler(1,-1.8,0)*euler(.9,0,0),.3)
  781. RH.C0=clerp(RH.C0,RHC0*cf(.2,1,.1)*euler(0,-.5,-.2),.3)
  782. LH.C0=clerp(LH.C0,LHC0*cf(-.2,1,.1)*euler(0,.5,.2),.3)
  783. end
  784. Humanoid.Jump=true
  785. bodvol=Instance.new("BodyVelocity")
  786. bodvol.Parent=RootPart
  787. bodvol.velocity=vt(0,1,0)*100
  788. bodvol.P=5000
  789. bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  790. --Torso.Velocity=vt(0,1,0)*100
  791. hitbox1.Parent=model1
  792. hitbox1.Size=vt(1,5,1)
  793. hitbox1.Transparency=1
  794. hitbox1.CFrame=prt10.CFrame
  795. con1=hitbox1.Touched:connect(function(hit) Damagefunc(hit,20,30,math.random(10000,200000),"Normal",RootPart,.2,1) end)
  796. so("http://roblox.com/asset/?id=161006212",prt10,1,.8)
  797. blcf=nil
  798. scfr=nil
  799. for i=0,1,0.1 do
  800. swait()
  801. local blcf = prt10.CFrame*CFrame.new(0,.5,0)
  802. if scfr and (prt10.Position-scfr.p).magnitude > .1 then
  803. local h = 5
  804. local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
  805. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  806. local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
  807. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  808. scfr = blcf
  809. elseif not scfr then
  810. scfr = blcf
  811. end
  812. hitbox1.CFrame=prt10.CFrame
  813. RW.C0=clerp(RW.C0,cf(1,0.5,-0.5)*euler(3,-2.4,0)*euler(.1,0,0),.3)
  814. LW.C0=clerp(LW.C0,cf(-.2,.8,-0.5)*euler(3.1,-1.8,0)*euler(.9,0,0),.3)
  815. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,-0.8),.3)
  816. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*euler(0,0,1.3),.3)
  817. RH.C0=clerp(RH.C0,RHC0,.3)
  818. LH.C0=clerp(LH.C0,LHC0,.3)
  819. end
  820. con1:disconnect()
  821. hitbox1.Parent=nil
  822. bodvol.Parent=nil
  823. attack=false
  824. end
  825.  
  826. function BinaryImpulse()
  827. attack=true
  828. if impulse==1 then
  829. impulse=2
  830. Humanoid.Jump=true
  831. for i=0,1,0.2 do
  832. swait()
  833. wld1.C0=clerp(wld1.C0,euler(1.57,0,0)*cf(0,1,-0.3),.45)
  834. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,0),.45)
  835. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0.5,0),.45)
  836. RW.C0=clerp(RW.C0,cf(1,0.5,-0.5)*euler(1.5,-1.5,0)*euler(.5,0,0),.45)
  837. LW.C0=clerp(LW.C0,cf(0,0.5,-0.7)*euler(1.5,-1.5,0)*euler(.7,0,0),.45)
  838. RH.C0=clerp(RH.C0,RHC0*euler(-.2,0,0),.45)
  839. LH.C0=clerp(LH.C0,LHC0*euler(-.2,0,0),.45)
  840. end
  841. blcf=nil
  842. scfr=nil
  843. hitbox1.Parent=model1
  844. hitbox1.Size=vt(1,5,1)
  845. hitbox1.Transparency=1
  846. hitbox1.CFrame=prt10.CFrame
  847. con1=hitbox1.Touched:connect(function(hit) Damagefunc(hit,20000,300000,math.random(10,20),"Normal",RootPart,.5,1) end)
  848. for i=1,3 do
  849. so("http://roblox.com/asset/?id=161006212",prt10,1,1)
  850. for i=0,1,0.1 do
  851. swait()
  852. local blcf = prt10.CFrame*CFrame.new(0,.5,0)
  853. if scfr and (prt10.Position-scfr.p).magnitude > .1 then
  854. local h = 5
  855. local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
  856. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  857. local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
  858. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  859. scfr = blcf
  860. elseif not scfr then
  861. scfr = blcf
  862. end
  863. hitbox1.CFrame=prt10.CFrame
  864. RW.C0=clerp(RW.C0,cf(1,0.5,-0.5)*euler(1.5,-1.5,0)*euler(-.5,0,0),.3)
  865. LW.C0=clerp(LW.C0,cf(-1,0.5,-0.5)*euler(1.5,-1.5,0)*euler(.5,0,0),.3)
  866. RootJoint.C0=RootCF*euler(0,0.5,6.6*i)
  867. end
  868. end
  869. con1:disconnect()
  870. hitbox1.Parent=nil
  871. elseif impulse==2 then
  872. impulse=3
  873. Humanoid.Jump=true
  874. for i=0,1,0.2 do
  875. swait()
  876. wld1.C0=clerp(wld1.C0,euler(1.57,0,0)*cf(0,1,-0.3),.45)
  877. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,0),.45)
  878. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,-0.5,0),.45)
  879. RW.C0=clerp(RW.C0,cf(1,0.5,-0.5)*euler(1.5,-1.5,0)*euler(.5,0,0),.45)
  880. LW.C0=clerp(LW.C0,cf(0,0.5,-0.7)*euler(1.5,-1.5,0)*euler(.7,0,0),.45)
  881. RH.C0=clerp(RH.C0,RHC0*euler(-.2,0,0),.45)
  882. LH.C0=clerp(LH.C0,LHC0*euler(-.2,0,0),.45)
  883. end
  884. blcf=nil
  885. scfr=nil
  886. hitbox1.Parent=model1
  887. hitbox1.Size=vt(1,5,1)
  888. hitbox1.Transparency=1
  889. hitbox1.CFrame=prt10.CFrame
  890. con1=hitbox1.Touched:connect(function(hit) Damagefunc(hit,50,50,math.random(10000,200000),"Normal",RootPart,.5,1) end)
  891. for i=1,3 do
  892. so("http://roblox.com/asset/?id=161006212",prt10,1,1.05)
  893. for i=0,1,0.1 do
  894. swait()
  895. local blcf = prt10.CFrame*CFrame.new(0,.5,0)
  896. if scfr and (prt10.Position-scfr.p).magnitude > .1 then
  897. local h = 5
  898. local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
  899. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  900. local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
  901. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  902. scfr = blcf
  903. elseif not scfr then
  904. scfr = blcf
  905. end
  906. hitbox1.CFrame=prt10.CFrame
  907. RW.C0=clerp(RW.C0,cf(1,0.5,-0.5)*euler(1.5,-1.5,0)*euler(-.5,0,0),.3)
  908. LW.C0=clerp(LW.C0,cf(-1,0.5,-0.5)*euler(1.5,-1.5,0)*euler(.5,0,0),.3)
  909. RootJoint.C0=RootCF*euler(0,-0.5,6.6*i)
  910. end
  911. end
  912. con1:disconnect()
  913. hitbox1.Parent=nil
  914. elseif impulse==3 then
  915. impulse=1
  916. for i=0,1,0.2 do
  917. swait()
  918. wld1.C0=clerp(wld1.C0,euler(1.57,0,-0.785)*cf(0,1,-0.3),.45)
  919. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(-0.4,0,0),.45)
  920. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.45)
  921. RW.C0=clerp(RW.C0,cf(1,0.8,-0.5)*euler(3,0,-0.785),.45)
  922. LW.C0=clerp(LW.C0,cf(-1,0.8,-0.5)*euler(3,0,0.785),.45)
  923. RH.C0=clerp(RH.C0,RHC0*euler(-.2,0,0),.45)
  924. LH.C0=clerp(LH.C0,LHC0*euler(-.2,0,0),.45)
  925. end
  926. Humanoid.Jump=true
  927. blcf=nil
  928. scfr=nil
  929. hitbox1.Parent=model1
  930. hitbox1.Size=vt(1,5,1)
  931. hitbox1.Transparency=1
  932. hitbox1.CFrame=prt10.CFrame
  933. con1=hitbox1.Touched:connect(function(hit) Damagefunc(hit,50,50,math.random(20000,300000),"Normal",RootPart,.5,1) end)
  934. for i=1,3 do
  935. so("http://roblox.com/asset/?id=161006195",prt10,1,1)
  936. for i=0,1,0.1 do
  937. swait()
  938. local blcf = prt10.CFrame*CFrame.new(0,.5,0)
  939. if scfr and (prt10.Position-scfr.p).magnitude > .1 then
  940. local h = 5
  941. local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
  942. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  943. local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
  944. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  945. scfr = blcf
  946. elseif not scfr then
  947. scfr = blcf
  948. end
  949. hitbox1.CFrame=prt10.CFrame
  950. wld1.C0=clerp(wld1.C0,euler(2,0,-0.785)*cf(0,1,-0.3),.45)
  951. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0.2,0,0),.45)
  952. RW.C0=clerp(RW.C0,cf(1,0.3,-0.5)*euler(.5,0,-0.785),.3)
  953. LW.C0=clerp(LW.C0,cf(-1,0.3,-0.5)*euler(.5,0,0.785),.3)
  954. RootJoint.C0=RootCF*euler(6.28*i,0,0)
  955. end
  956. end
  957. con1:disconnect()
  958. hitbox1.Parent=nil
  959. end
  960. attack=false
  961. end
  962.  
  963. function Bash()
  964. attack=true
  965. for i=0,1,0.1 do
  966. swait()
  967. wld1.C0=clerp(wld1.C0,euler(1.1,0,0)*cf(0,1,-0.4),.3)
  968. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,1)*euler(0.5,0,0),.3)
  969. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-1.4),.3)
  970. RW.C0=clerp(RW.C0,cf(1,0.5,-0.5)*euler(1.4,-1.4,0)*euler(-.6,0,0),.3)
  971. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1,-1,0)*euler(.5,0,0),.3)
  972. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,2.5,0),.3)
  973. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1,0),.3)
  974. end
  975. Torso.Velocity=RootPart.CFrame.lookVector*200
  976. so("http://roblox.com/asset/?id=2767090",Torso,1,.7)
  977. MagicWave(Color4,RootPart.CFrame*euler(1.57,0,0),1,1,1,1,1,1,0.05)
  978. hit=nil
  979. for i=1,20 do
  980. if hit==nil then
  981. swait()
  982. end
  983. hit,pos=rayCast(RootPart.Position,RootPart.CFrame.lookVector,6,Character)
  984. end
  985. Torso.Velocity=RootPart.CFrame.lookVector*0
  986. Humanoid.WalkSpeed=0
  987. for i=0,1,0.1 do
  988. swait()
  989. wld1.C0=clerp(wld1.C0,euler(1.1,0,0)*cf(0,1,-0.4),.3)
  990. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,1.4)*euler(-0.2,0,0),.3)
  991. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-1.4),.3)
  992. RW.C0=clerp(RW.C0,cf(1,0.5,-0.5)*euler(3,-1.4,0)*euler(-.6,0,0),.3)
  993. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(2.3,-1.4,0)*euler(.5,0,0),.3)
  994. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0),.3)
  995. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0),.3)
  996. end
  997. so("http://roblox.com/asset/?id=161006195",prt10,1,.5)
  998. blcf=nil
  999. scfr=nil
  1000. for i=0,1,0.2 do
  1001. swait()
  1002. local blcf = prt10.CFrame*CFrame.new(0,.5,0)
  1003. if scfr and (prt10.Position-scfr.p).magnitude > .1 then
  1004. local h = 5
  1005. local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
  1006. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  1007. local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
  1008. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  1009. scfr = blcf
  1010. elseif not scfr then
  1011. scfr = blcf
  1012. end
  1013. wld1.C0=clerp(wld1.C0,euler(2.2,0,0)*cf(0,.8,-0.3),.45)
  1014. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,1.4)*euler(0.4,0,0),.45)
  1015. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-1.3)*euler(0,0,-1.4),.45)
  1016. RW.C0=clerp(RW.C0,cf(.5,0.2,-0.5)*euler(3,-1.4,0)*euler(-2.7,0,0),.45)
  1017. LW.C0=clerp(LW.C0,cf(-1.2,0.1,-0.3)*euler(0,-1.4,0)*euler(.5,0,0),.45)
  1018. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(-1.2,1.57,0),.45)
  1019. LH.C0=clerp(LH.C0,cf(-1.1,0.4,-0.8)*euler(-0.05,-1.57,0),.45)
  1020. end
  1021. hit,pos=rayCast(prt10.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,100,Character)
  1022. if hit~=nil then
  1023. local ref=part(3,workspace,0,1,BrickColor.new("Really black"),"Effect",vt())
  1024. ref.Anchored=true
  1025. ref.CFrame=cf(pos)
  1026. game:GetService("Debris"):AddItem(ref,3)
  1027. for i=1,10 do
  1028. Col=hit.BrickColor
  1029. local groundpart=part(3,workspace,0,0,Col,"Ground",vt(math.random(50,200)/100,math.random(50,200)/100,math.random(50,200)/100))
  1030. groundpart.Anchored=true
  1031. groundpart.Material=hit.Material
  1032. groundpart.CanCollide=true
  1033. groundpart.CFrame=cf(pos)*cf(math.random(-500,500)/100,0,math.random(-500,500)/100)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  1034. game:GetService("Debris"):AddItem(groundpart,5)
  1035. end
  1036. so("http://roblox.com/asset/?id=157878578",ref,.6,1.2)
  1037. MagicWave(hit.BrickColor,cf(pos),1,1,1,.7,.7,.7,0.05)
  1038. MagniDamage(ref,50,50,50,math.random(10000,200000),"Knockdown")
  1039. end
  1040. swait(50)
  1041. Humanoid.WalkSpeed=22
  1042. attack=false
  1043. end
  1044.  
  1045. function UnleashTheDemon()
  1046. game.Chat:Chat(game.Players.LocalPlayer.Character.Head,"Now, you're in for a show, you'll be sent to the abyss of infinity, when I'm done with you!", "Blue")
  1047. wait(2.6)
  1048. game.Chat:Chat(game.Players.LocalPlayer.Character.Head,"GHOSDEERI, THE CURSED SPIRIT, HAS AWOKEN!", "Blue")
  1049. attack=true
  1050. so("rbxasset://sounds\\unsheath.wav",prt1,1,.8)
  1051. for i=0,1,0.1 do
  1052. swait()
  1053. wld1.C0=clerp(wld1.C0,euler(.2,0,-.5)*cf(0,1,0),.3)
  1054. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(-0.4,0,-0.5),.3)
  1055. RW.C0=clerp(RW.C0,cf(1.3,0.5,0.2)*euler(3.4,0,0),.3)
  1056. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,0),.3)
  1057. RH.C0=clerp(RH.C0,RHC0,.4)
  1058. LH.C0=clerp(LH.C0,LHC0,.4)
  1059. end
  1060. wld1.Part1=Torso
  1061. wld1.C0=euler(3.7,1.57,0)*cf(-1.5,-2.3,-.5)
  1062. for i=0,1,0.1 do
  1063. swait()
  1064. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  1065. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0.4,0,-0.4),.3)
  1066. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.3,0,0),.3)
  1067. LW.C0=clerp(LW.C0,cf(-1,0.5,-0.5)*euler(1.4,-1.57,0)*euler(1.2,0,0),.3)
  1068. end
  1069. so("http://roblox.com/asset/?id=178452217",RightArm,.5,.4)
  1070. so("http://roblox.com/asset/?id=168586586",RightArm,.5,.6)
  1071. so("http://roblox.com/asset/?id=160740121",RightArm,1,.8)
  1072. num=0
  1073. for i=0,1,0.01 do
  1074. swait()
  1075. if num>=10 then
  1076. num=0
  1077. MagicWave(BrickColor.new("Really Really black"),cf(Torso.Position)*cf(0,-1,0)*euler(0,math.random(-50,50),0),1,1,1,1,.5,1,0.05)
  1078. end
  1079. for i=1,2 do
  1080. if math.random(1,5)==1 then
  1081. MagicBlock(BrickColor.new("Really Really black"),RightArm.CFrame*cf(math.random(-100,100)/100,-math.random(0,700)/100,math.random(-100,100)/100),math.random(30,80)/100,math.random(30,80)/100,math.random(30,80)/100,.5,.5,.5,0.05)
  1082. else
  1083. MagicBlock(BrickColor.new("Blue"),RightArm.CFrame*cf(math.random(-100,100)/100,-math.random(0,700)/100,math.random(-100,100)/100),math.random(30,80)/100,math.random(30,80)/100,math.random(30,80)/100,.5,.5,.5,0.05)
  1084. end
  1085. end
  1086. num=num+1
  1087. end
  1088. so("http://roblox.com/asset/?id=168586621",RightArm,1,.5)
  1089. so("http://roblox.com/asset/?id=160867463",RightArm,1,.8)
  1090. for i=1,4 do
  1091. MagicBlock(BrickColor.new("Blue"),RightArm.CFrame*cf(0,-.5-math.random(0,500)/100,0),2,2,2,.5,.5,.5,0.05)
  1092. end
  1093. MagicWave(BrickColor.new("Blue"),cf(Torso.Position)*cf(0,-1,0)*euler(0,math.random(-50,50),0),1,1,1,.5,.3,.5,0.01)
  1094. Mode="Demon"
  1095. model2.Parent=Character
  1096. for i=1,#DBlade do
  1097. DBlade[i].Parent=model2
  1098. DBladeWelds[i].Parent=DBlade[1]
  1099. end
  1100. for i=0,1,0.1 do
  1101. swait()
  1102. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-0.4),.3)
  1103. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,0.4),.3)
  1104. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.2,-0.5,1),.3)
  1105. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.4,0.5,-1.3),.3)
  1106. end
  1107. swait(50)
  1108. attack=false
  1109. end
  1110.  
  1111. function Demonattackone()
  1112. attack=true
  1113. --[[
  1114. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-0.5)*euler(0.4,0,-0.4),.3)
  1115. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,0.4),.3)
  1116. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.4,-0.5,1)*euler(.1,0,0),.3)
  1117. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-0.2,0,-0.2),.3)
  1118. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(-0.2,1.57,0),.3)
  1119. LH.C0=clerp(LH.C0,cf(-1,-.5,0)*euler(0.5,-1.2,0)*euler(-.2,0,0),.3)
  1120. ]]
  1121. for i=0,1,0.1 do
  1122. swait()
  1123. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-0.5)*euler(0.4,0,-1),.3)
  1124. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,0.7),.3)
  1125. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.4,-0.5,1)*euler(.3,0,.5),.3)
  1126. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(.7,0,-0.7),.3)
  1127. RH.C0=clerp(RH.C0,cf(1,-1,-.6)*euler(-.3,1.57,0)*euler(0,.5,0),.3)
  1128. LH.C0=clerp(LH.C0,cf(-1,-.3,0)*euler(0.5,-.8,0)*euler(-.5,0,0),.3)
  1129. end
  1130. hitbox2.Parent=model2
  1131. hitbox2.Size=vt(1,6,1)
  1132. hitbox2.Transparency=1
  1133. hitbox2.CFrame=prtd7.CFrame
  1134. con1=hitbox2.Touched:connect(function(hit) Damagefunc(hit,50,50,math.random(100000,500000),"Lifesteal",RootPart,.5,1) end)
  1135. so("http://roblox.com/asset/?id=28144425",prtd7,1,.7)
  1136. blcf=nil
  1137. scfr=nil
  1138. for i=0,1,0.08 do
  1139. swait()
  1140. local blcf = prtd7.CFrame*CFrame.new(0,-.5,0)
  1141. if scfr and (prtd7.Position-scfr.p).magnitude > .1 then
  1142. local h = 5
  1143. local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
  1144. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  1145. local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
  1146. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  1147. scfr = blcf
  1148. elseif not scfr then
  1149. scfr = blcf
  1150. end
  1151. hitbox2.CFrame=prtd7.CFrame
  1152. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-0.5)*euler(0.2,0,1),.3)
  1153. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,-0.7),.3)
  1154. RW.C0=clerp(RW.C0,cf(1,0.5,-0.5)*euler(1.4,-0.5,1)*euler(1.3,0,-1.7),.3)
  1155. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.7,0,-0.7),.3)
  1156. RH.C0=clerp(RH.C0,cf(1,-.6,0)*euler(-.3,1.57,0)*euler(0,-1,0),.3)
  1157. LH.C0=clerp(LH.C0,cf(-1,-1,-0.3)*euler(-0.3,-2.3,0)*euler(0,0,0),.3)
  1158. end
  1159. con1:disconnect()
  1160. hitbox2.Parent=nil
  1161. attack=false
  1162. end
  1163.  
  1164. function Demonattacktwo()
  1165. attack=true
  1166. for i=0,1,0.1 do
  1167. swait()
  1168. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-0.4)*euler(0.1,0,1.2),.3)
  1169. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,-0.7),.3)
  1170. RW.C0=clerp(RW.C0,cf(1,0.5,-0.5)*euler(1.4,-1.2,.6)*euler(1.1,0,-1.7),.3)
  1171. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.7,0,-0.7),.3)
  1172. RH.C0=clerp(RH.C0,cf(1,-.6,0)*euler(-.1,1.57,0)*euler(0,-1,0),.3)
  1173. LH.C0=clerp(LH.C0,cf(-1,-1,-0.3)*euler(-0.1,-2.3,0)*euler(0,0,0),.3)
  1174. end
  1175. hitbox2.Parent=model2
  1176. hitbox2.Size=vt(1,6,1)
  1177. hitbox2.Transparency=1
  1178. hitbox2.CFrame=prtd7.CFrame
  1179. con1=hitbox2.Touched:connect(function(hit) Damagefunc(hit,50,50,math.random(100000,500000),"Lifesteal",RootPart,.5,1) end)
  1180. so("http://roblox.com/asset/?id=28144425",prtd7,1,.5)
  1181. blcf=nil
  1182. scfr=nil
  1183. for i=0,1,0.1 do
  1184. swait()
  1185. local blcf = prtd7.CFrame*CFrame.new(0,-.5,0)
  1186. if scfr and (prtd7.Position-scfr.p).magnitude > .1 then
  1187. local h = 5
  1188. local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
  1189. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  1190. local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
  1191. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  1192. scfr = blcf
  1193. elseif not scfr then
  1194. scfr = blcf
  1195. end
  1196. hitbox2.CFrame=prtd7.CFrame
  1197. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-0.4)*euler(0.1,0,-0.8),.3)
  1198. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,0.7),.3)
  1199. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.4,-.8,.6)*euler(0.5,0,.5),.3)
  1200. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.7,0,-0.7),.3)
  1201. RH.C0=clerp(RH.C0,cf(1,-.8,-0.3)*euler(-0.2,1.57,0),.3)
  1202. LH.C0=clerp(LH.C0,cf(-1,-.6,-0.2)*euler(0.2,-1.2,0)*euler(-.2,0,0),.3)
  1203. end
  1204. con1:disconnect()
  1205. hitbox2.Parent=nil
  1206. attack=false
  1207. end
  1208.  
  1209. function Demonattackthree()
  1210. attack=true
  1211. for i=0,1,0.1 do
  1212. swait()
  1213. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-0.5)*euler(0.1,0,-0.2),.3)
  1214. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,0.4),.3)
  1215. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(2.9,-1.8,0)*euler(.5,0,0),.3)
  1216. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-0.4,0,-0.2),.3)
  1217. RH.C0=clerp(RH.C0,cf(1,-.7,-.3)*euler(-0.2,1.57,0),.3)
  1218. LH.C0=clerp(LH.C0,cf(-1,-.7,0)*euler(0.2,-1.2,0)*euler(-.2,0,0),.3)
  1219. end
  1220. Humanoid.WalkSpeed=0
  1221. hitbox2.Parent=model2
  1222. hitbox2.Size=vt(1,6,1)
  1223. hitbox2.Transparency=1
  1224. hitbox2.CFrame=prtd7.CFrame
  1225. con1=hitbox2.Touched:connect(function(hit) Damagefunc(hit,50,50,math.random(100000,500000),"Lifesteal",RootPart,.5,1) end)
  1226. so("http://roblox.com/asset/?id=28144425",prtd7,1,.6)
  1227. blcf=nil
  1228. scfr=nil
  1229. for i=0,1,0.15 do
  1230. swait()
  1231. local blcf = prtd7.CFrame*CFrame.new(0,-.5,0)
  1232. if scfr and (prtd7.Position-scfr.p).magnitude > .1 then
  1233. local h = 5
  1234. local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
  1235. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  1236. local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
  1237. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  1238. scfr = blcf
  1239. elseif not scfr then
  1240. scfr = blcf
  1241. end
  1242. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-0.8)*euler(0.5,0,0.6),.4)
  1243. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0.1,0,-0.6),.4)
  1244. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.55,-1.5,0)*euler(.3,0,0),.4)
  1245. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-0.4,0,-0.2),.4)
  1246. RH.C0=clerp(RH.C0,cf(1,-.1,-.4)*euler(0.4,1.57,0)*euler(-.2,0,0),.4)
  1247. LH.C0=clerp(LH.C0,cf(-1,-.9,0)*euler(-0.2,-1.2,0)*euler(-.2,0,0),.4)
  1248. if i==0.6 then
  1249. hit,pos=rayCast(prtd8.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character)
  1250. if hit~=nil then
  1251. local ref=part(3,workspace,0,1,BrickColor.new("Really black"),"Effect",vt())
  1252. ref.Anchored=true
  1253. ref.CFrame=cf(pos)
  1254. game:GetService("Debris"):AddItem(ref,3)
  1255. for i=1,5 do
  1256. Col=hit.BrickColor
  1257. local groundpart=part(3,workspace,0,0,Col,"Ground",vt(math.random(50,200)/100,math.random(50,200)/100,math.random(50,200)/100))
  1258. groundpart.Anchored=true
  1259. groundpart.Material=hit.Material
  1260. groundpart.CanCollide=true
  1261. groundpart.CFrame=cf(pos)*cf(math.random(-200,200)/100,0,math.random(-200,200)/100)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  1262. game:GetService("Debris"):AddItem(groundpart,3)
  1263. end
  1264. so("http://roblox.com/asset/?id=157878578",ref,.6,1.5)
  1265. MagicWave(hit.BrickColor,cf(pos),1,1,1,.7,.7,.7,0.05)
  1266. MagniDamage(ref,50,50,50,math.random(100000,200000),"Normal")
  1267. end
  1268. end
  1269. end
  1270. con1:disconnect()
  1271. hitbox2.Parent=nil
  1272. swait(10)
  1273. Humanoid.WalkSpeed=22
  1274. attack=false
  1275. end
  1276.  
  1277. function LetItBuild()
  1278. attack=true
  1279. for i=0,1,0.1 do
  1280. swait()
  1281. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-0.8)*euler(0.2,0,-1),.3)
  1282. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,1),.3)
  1283. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.5,-0.5,1.5)*euler(.6,0,.4),.3)
  1284. LW.C0=clerp(LW.C0,cf(0,0.5,-0.5)*euler(1.57,-1.57,0)*euler(1.5,0,0),.3)
  1285. RH.C0=clerp(RH.C0,cf(1,-.6,-.5)*euler(-0.2,2,0)*euler(0,0,0),.3)
  1286. LH.C0=clerp(LH.C0,cf(-1,-.2,0)*euler(0.5,-.6,0)*euler(-.4,0,0),.3)
  1287. end
  1288. local num=0
  1289. local magik=0
  1290. local num2=0
  1291. while holdx==true do
  1292. swait()
  1293. if magik<25 then
  1294. if num>=10 then
  1295. Humanoid:TakeDamage(0)
  1296. pos1=Torso.Position+vt(math.random(-200,200)/100,math.random(-200,200)/100,math.random(-200,200)/100)
  1297. pos2=prtd8.Position--+vt(math.random(-50,50)/100,math.random(-50,50)/100,math.random(-50,50)/100)
  1298. Lightning(pos1,pos2,5,3,"Really red",.1,.5,.5)
  1299. MagicCircle(BrickColor.new("Really red"),cf(pos1),5,5,5,1,1,1,.1)
  1300. MagicBlood(BrickColor.new("Really red"),Torso.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),.1,.1,.1,.1,2,.1,0.05)
  1301. so("http://www.roblox.com/asset/?id=178452221",Torso,.1,1.5)
  1302. magik=magik+1
  1303. num=0
  1304. end
  1305. end
  1306. num=num+1
  1307. num2=num2+magik
  1308. if num2>=50 then
  1309. MagicBlood(BrickColor.new("Really Really black"),cf(prtd8.Position)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),.1,.1,.1,.1,1,.1,0.1)
  1310. num2=0
  1311. end
  1312. --MagicBlock(BrickColor.new("Blue"),cf(prtd8.Position)*cf(math.random(-100,100)/100,math.random(-100,100)/100,math.random(-100,100)/100)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),magik/5,magik/5,magik/5,magik/8,magik/8,magik/8,.1)
  1313. end
  1314. Torso.Velocity=RootPart.CFrame.lookVector*(10*magik)
  1315. blcf=nil
  1316. scfr=nil
  1317. hitbox2.Parent=model2
  1318. hitbox2.Size=vt(1,6,1)
  1319. hitbox2.Transparency=1
  1320. hitbox2.CFrame=prtd7.CFrame
  1321. con1=hitbox2.Touched:connect(function(hit) Damagefunc(hit,math.ceil((200000/200000)),magik,1,"Lifesteal",RootPart,.5,1) end)
  1322. for i=1,3 do
  1323. so("http://roblox.com/asset/?id=28144425",prtd7,1,1)
  1324. for i=0,1,0.1 do
  1325. swait()
  1326. hitbox2.CFrame=prtd7.CFrame
  1327. local blcf = prtd7.CFrame*CFrame.new(0,-.5,0)
  1328. if scfr and (prtd7.Position-scfr.p).magnitude > .1 then
  1329. local h = 5
  1330. local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
  1331. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  1332. local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
  1333. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  1334. scfr = blcf
  1335. elseif not scfr then
  1336. scfr = blcf
  1337. end
  1338. RootJoint.C0=RootCF*cf(0,0,-0.8)*euler(0,0,6.28*i)*euler(0.2,0,-1)
  1339. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.5,-0.5,1.5)*euler(.4,0,0),.3)
  1340. LW.C0=clerp(LW.C0,cf(0,0.5,-0.5)*euler(1.57,-1.57,0)*euler(1.5,0,0),.3)
  1341. RH.C0=clerp(RH.C0,cf(1,-.6,-.5)*euler(-0.2,2,0)*euler(0,0,0),.3)
  1342. LH.C0=clerp(LH.C0,cf(-1,-.2,0)*euler(0.5,-.6,0)*euler(-.4,0,0),.3)
  1343. end
  1344. end
  1345. con1:disconnect()
  1346. hitbox2.Parent=nil
  1347. attack=false
  1348. end
  1349.  
  1350. function YourMoveCreep()
  1351. attack=true
  1352. local pers=nil
  1353. for i=0,1,0.1 do
  1354. swait()
  1355. cost=Humanoid.Health-0
  1356. Humanoid:TakeDamage(0)
  1357. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-0.7)*euler(0.2,0,-1.3),.3)
  1358. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0.2,1.3),.3)
  1359. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(.8,-0.5,1)*euler(.5,0,0),.3)
  1360. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,-0.4,0)*euler(0,0,-1.7),.3)
  1361. RH.C0=clerp(RH.C0,cf(.1,-1,-.9)*euler(-0.2,1.57,0)*euler(-.7,1.57,0),.3)
  1362. LH.C0=clerp(LH.C0,cf(-.8,-.4,0)*euler(0.2,-1.2,0)*euler(-.2,1.4,0),.3)
  1363. end
  1364. local blockprt=part(3,Character,0,1,BrickColor.new("Really Really black"),"Block",vt(8,.1,8))
  1365. blockprt.Anchored=true
  1366. blockprt.CFrame=LeftArm.CFrame*cf(0,-1,0)
  1367. conbl=blockprt.Touched:connect(function(hit)
  1368. if hit.Parent.Parent:findFirstChild("Torso")~=nil then
  1369. hit=hit.Parent.Parent.Torso
  1370. end
  1371. if hit.Parent:findFirstChild("Torso")~=nil and hit.Parent~=Character and guard==true then
  1372. pers=hit
  1373. print("HIT")
  1374. guard=false
  1375. end
  1376. end)
  1377. num=0
  1378. while guard==true do
  1379. swait()
  1380. if num>10 then
  1381. num=0
  1382. MagicBlock(BrickColor.new("Blue"),LeftArm.CFrame*cf(0,-1,0),1,1,1,.7,.7,.7,0.05)
  1383. MagicCircle(BrickColor.new("Really Really black"),LeftArm.CFrame*cf(0,-1,0),1,.1,1,6,0,6,0.1)
  1384. end
  1385. blockprt.CFrame=LeftArm.CFrame*cf(0,-1,0)
  1386. num=num+1
  1387. end
  1388. conbl:disconnect()
  1389. blockprt.Parent=nil
  1390. print(pers)
  1391. if pers~=nil then
  1392. for i=0,1,0.1 do
  1393. swait()
  1394. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-0.7)*euler(-0.2,0,1.6),.3)
  1395. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,-0.2,-1),.3)
  1396. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(.8,-1,1)*euler(1,0,0),.3)
  1397. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-0.5),.3)
  1398. RH.C0=clerp(RH.C0,cf(.1,-1,-.9)*euler(-0.2,1.57,0)*euler(-.7,-1.57,0),.3)
  1399. LH.C0=clerp(LH.C0,cf(-.8,-.4,0)*euler(0.2,-1.2,0)*euler(-.2,1.4,0),.3)
  1400. end
  1401. swait(200)
  1402. end
  1403. attack=false
  1404. end
  1405.  
  1406. function MagniDamage(Part,magni,mindam,maxdam,knock,Type)
  1407. for _,c in pairs(workspace:children()) do
  1408. local hum=c:findFirstChild("Humanoid")
  1409. if hum~=nil then
  1410. local head=c:findFirstChild("Torso")
  1411. if head~=nil then
  1412. local targ=head.Position-Part.Position
  1413. local mag=targ.magnitude
  1414. if mag<=magni and c.Name~=Player.Name then
  1415. Damagefunc(head,mindam,maxdam,knock,Type,Part,.2,1,nil,1)
  1416. end
  1417. end
  1418. end
  1419. end
  1420. end
  1421.  
  1422. function rayCast(Pos, Dir, Max, Ignore)  -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  1423. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  1424. end
  1425.  
  1426. local Point=Torso.CFrame*cf(0,Torso.Size.Y,0)
  1427. LastPoint=Point
  1428. function effect(Color,Ref,LP,P1,returnn)
  1429. local effectsmsh=Instance.new("CylinderMesh")
  1430. effectsmsh.Scale=Vector3.new(0.2,1,0.2)
  1431. effectsmsh.Name="Mesh"
  1432. local effectsg=Instance.new("Part")
  1433. effectsg.formFactor=3
  1434. effectsg.CanCollide=false
  1435. effectsg.Name="Eff"
  1436. effectsg.Locked=true
  1437. effectsg.Anchored=true
  1438. effectsg.Size=Vector3.new(0.5,1,0.5)
  1439. effectsg.Parent=workspace
  1440. effectsmsh.Parent=effectsg
  1441. effectsg.BrickColor=BrickColor.new(Color)
  1442. effectsg.Reflectance=Ref
  1443. local point1=P1
  1444. local mg=(LP.p - point1.p).magnitude
  1445. effectsg.Size=Vector3.new(0.5,mg,0.5)
  1446. effectsg.CFrame=cf((LP.p+point1.p)/2,point1.p) * CFrame.Angles(math.rad(90),0,0)
  1447. effectsmsh.Scale=Vector3.new(0.2,1,0.2)
  1448. game:GetService("Debris"):AddItem(effectsg,2)
  1449. if returnn then return effectsg end
  1450. coroutine.resume(coroutine.create(function(Part,Mesh)
  1451. if not returnn then
  1452. for i=0,1,0.05 do
  1453. wait()
  1454. Part.Transparency=1*i
  1455. Mesh.Scale=Vector3.new(0.5-0.5*i,1,0.5-0.5*i)
  1456. end
  1457. Part.Parent=nil
  1458. end
  1459. end),effectsg,effectsmsh)
  1460. end
  1461.  
  1462. local function CFrameFromTopBack(at, top, back)
  1463. local right = top:Cross(back)
  1464. return CFrame.new(at.x, at.y, at.z,
  1465. right.x, top.x, back.x,
  1466. right.y, top.y, back.y,
  1467. right.z, top.z, back.z)
  1468. end
  1469.  
  1470. function Triangle(a, b, c)
  1471. local edg1 = (c-a):Dot((b-a).unit)
  1472. local edg2 = (a-b):Dot((c-b).unit)
  1473. local edg3 = (b-c):Dot((a-c).unit)
  1474. if edg1 <= (b-a).magnitude and edg1 >= 0 then
  1475. a, b, c = a, b, c
  1476. elseif edg2 <= (c-b).magnitude and edg2 >= 0 then
  1477. a, b, c = b, c, a
  1478. elseif edg3 <= (a-c).magnitude and edg3 >= 0 then
  1479. a, b, c = c, a, b
  1480. else
  1481. assert(false, "unreachable")
  1482. end
  1483.  
  1484. local len1 = (c-a):Dot((b-a).unit)
  1485. local len2 = (b-a).magnitude - len1
  1486. local width = (a + (b-a).unit*len1 - c).magnitude
  1487.  
  1488. local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit)
  1489.  
  1490. local list = {}
  1491.  
  1492. if len2 > 0.01 then
  1493. end
  1494. return unpack(list)
  1495. end
  1496.  --[[
  1497. Things for effects
  1498. put the variables in one table
  1499. like effect={brick,interval,i}
  1500. ]]
  1501. function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  1502. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
  1503. prt.Anchored=true
  1504. prt.CFrame=cframe
  1505. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  1506. game:GetService("Debris"):AddItem(prt,5)
  1507. table.insert(Effects,{prt,"Block1",delay,x3,y3,z3}) --part, type, delay
  1508. --[[coroutine.resume(coroutine.create(function(Part,Mesh,dur)
  1509. for i=0,1,delay do
  1510. wait()
  1511. Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  1512. Part.Transparency=i
  1513. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1514. end
  1515. Part.Parent=nil
  1516. end),prt,msh)]]
  1517. end
  1518.  
  1519. function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  1520. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
  1521. prt.Anchored=true
  1522. prt.CFrame=cframe
  1523. local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
  1524. game:GetService("Debris"):AddItem(prt,5)
  1525. table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3})
  1526. --[[coroutine.resume(coroutine.create(function(Part,Mesh)
  1527. local wld=nil
  1528. for i=0,1,delay do
  1529. wait()
  1530. Part.CFrame=Part.CFrame
  1531. Part.Transparency=i
  1532. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1533. end
  1534. Part.Parent=nil
  1535. end),prt,msh)]]
  1536. end
  1537.  
  1538. function MagicWave(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  1539. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
  1540. prt.Anchored=true
  1541. prt.CFrame=cframe
  1542. local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=20329976",vt(0,0,0),vt(x1,y1,z1))
  1543. game:GetService("Debris"):AddItem(prt,5)
  1544. table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3})
  1545. end
  1546.  
  1547. function MagicCylinder(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  1548. local prt=part(3,Character,0,0,brickcolor,"Effect",vt(0.2,0.2,0.2))
  1549. prt.Anchored=true
  1550. prt.CFrame=cframe
  1551. msh=mesh("SpecialMesh",prt,"Head","",vt(0,0,0),vt(x1,y1,z1))
  1552. game:GetService("Debris"):AddItem(prt,5)
  1553. --table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3})
  1554. Effects[#Effects+1]={prt,"Cylinder",delay,x3,y3,z3} --part, type, delay
  1555. --[[coroutine.resume(coroutine.create(function(Part,Mesh)
  1556. for i=0,1,delay do
  1557. wait()
  1558. Part.CFrame=Part.CFrame
  1559. Part.Transparency=i
  1560. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1561. end
  1562. Part.Parent=nil
  1563. end),prt,msh)]]
  1564. end
  1565.  
  1566. function MagicCylinder2(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  1567. local prt=part(3,Character,0,0,brickcolor,"Effect",vt(0.2,0.2,0.2))
  1568. prt.Anchored=true
  1569. prt.CFrame=cframe
  1570. msh=mesh("CylinderMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  1571. game:GetService("Debris"):AddItem(prt,5)
  1572. --table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3})
  1573. Effects[#Effects+1]={prt,"Cylinder",delay,x3,y3,z3} --part, type, delay
  1574. --[[coroutine.resume(coroutine.create(function(Part,Mesh)
  1575. for i=0,1,delay do
  1576. wait()
  1577. Part.CFrame=Part.CFrame
  1578. Part.Transparency=i
  1579. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1580. end
  1581. Part.Parent=nil
  1582. end),prt,msh)]]
  1583. end
  1584.  
  1585. function MagicBlood(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  1586. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
  1587. prt.Anchored=true
  1588. prt.CFrame=cframe
  1589. local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
  1590. game:GetService("Debris"):AddItem(prt,5)
  1591. table.insert(Effects,{prt,"Blood",delay,x3,y3,z3})
  1592. end
  1593.  
  1594. function ElecEffect(cff,x,y,z)
  1595. local prt=part(3,workspace,0,0,BrickColor.new("Bright red"),"Part",vt(1,1,1))
  1596. prt.Anchored=true
  1597. prt.CFrame=cff*cf(math.random(-x,x),math.random(-y,y),math.random(-z,z))
  1598. prt.CFrame=cf(prt.Position)
  1599. --prt.CFrame=cf(cff)*cf(math.random(-x,x),math.random(-y,y),math.random(-z,z))
  1600. game:GetService("Debris"):AddItem(prt,2)
  1601. xval=math.random()/2
  1602. yval=math.random()/2
  1603. zval=math.random()/2
  1604. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(xval,yval,zval))
  1605. Effects[#Effects+1]={prt,"Elec",0.1,x,y,z,xval,yval,zval} --part, type, delay
  1606. end
  1607.  
  1608. function Lightning(p0,p1,tym,ofs,col,th,tra,last)
  1609. --[[p0=pos1
  1610. p1=pos2
  1611. tym=times
  1612. ofs=offset
  1613. col=color
  1614. th=size
  1615. tra=transparency
  1616. last=lastingtime]]
  1617. local magz = (p0 - p1).magnitude local curpos = p0 local trz = {-ofs,ofs}
  1618. for i=1,tym do
  1619. local li = Instance.new("Part",workspace) li.TopSurface =0 li.BottomSurface = 0 li.Anchored = true  li.Transparency = tra or 0.4 li.BrickColor = BrickColor.new(col)
  1620. li.formFactor = "Custom" li.CanCollide = false li.Size = Vector3.new(th,th,magz/tym) local ofz = Vector3.new(trz[math.random(1,2)],trz[math.random(1,2)],trz[math.random(1,2)])
  1621. local trolpos = CFrame.new(curpos,p1)*CFrame.new(0,0,magz/tym).p+ofz
  1622. if tym == i then
  1623. local magz2 = (curpos - p1).magnitude li.Size = Vector3.new(th,th,magz2)
  1624. li.CFrame = CFrame.new(curpos,p1)*CFrame.new(0,0,-magz2/2)
  1625. else
  1626. li.CFrame = CFrame.new(curpos,trolpos)*CFrame.new(0,0,magz/tym/2)
  1627. end
  1628. curpos = li.CFrame*CFrame.new(0,0,magz/tym/2).p game.Debris:AddItem(li,last)
  1629. end
  1630. end
  1631.  
  1632. Damagefunc=function(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,decreaseblock)
  1633.         if hit.Parent==nil then
  1634.                 return
  1635.         end
  1636.         h=hit.Parent:FindFirstChild("Humanoid")
  1637.         for _,v in pairs(hit.Parent:children()) do
  1638.         if v:IsA("Humanoid") then
  1639.         h=v
  1640.         end
  1641.         end
  1642.         if hit.Parent.Parent:FindFirstChild("Torso")~=nil then
  1643.         h=hit.Parent.Parent:FindFirstChild("Humanoid")
  1644.         end
  1645.         if hit.Parent.className=="Hat" then
  1646.         hit=hit.Parent.Parent:findFirstChild("Head")
  1647.         end
  1648.         -- and hit.Parent~=CannonTarget.Parent or hit.Parent~=RailgunTarget.Parent
  1649.         if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  1650.         if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end
  1651.         --[[                if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  1652.                         return
  1653.                 end]]
  1654. --                        hs(hit,1.2)
  1655.                         so("http://www.roblox.com/asset/?id=10209590",hit,1,math.random(50,100)/100)
  1656.                         --so("rbxasset://sounds\\unsheath.wav",hit,1,math.random(200,250)/100)
  1657.                         c=Instance.new("ObjectValue")
  1658.                         c.Name="creator"
  1659.                         c.Value=game:service("Players").LocalPlayer
  1660.                         c.Parent=h
  1661.                         game:GetService("Debris"):AddItem(c,.5)
  1662.                 Damage=math.random(minim,maxim)
  1663.                 if Mode=="Demon" then
  1664.                 Damage=Damage+damcount
  1665.                 end
  1666. --                h:TakeDamage()
  1667.                 blocked=false
  1668.                 block=hit.Parent:findFirstChild("Block")
  1669.                 if block~=nil then
  1670.                 print(block.className)
  1671.                 if block.className=="NumberValue" then
  1672.                 if block.Value>0 then
  1673.                 blocked=true
  1674.                 if decreaseblock==nil then
  1675.                 block.Value=block.Value-1
  1676.                 end
  1677.                 end
  1678.                 end
  1679.                 if block.className=="IntValue" then
  1680.                 if block.Value>0 then
  1681.                 blocked=true
  1682.                 if decreaseblock~=nil then
  1683.                 block.Value=block.Value-1
  1684.                 end
  1685.                 end
  1686.                 end
  1687.                 end
  1688.                 if blocked==false then
  1689. --                h:TakeDamage(Damage)
  1690.                 h.Health=h.Health-Damage
  1691.                 else
  1692.                 h.Health=h.Health-(Damage/0)
  1693.                 end
  1694.                 if Type=="Knockdown" then
  1695.                 hum=hit.Parent.Humanoid
  1696. hum.PlatformStand=true
  1697. coroutine.resume(coroutine.create(function(HHumanoid)
  1698. swait(1)
  1699. HHumanoid.PlatformStand=false
  1700. end),hum)
  1701.                 local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
  1702. --hit.CFrame=cf(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
  1703. local bodvol=Instance.new("BodyVelocity")
  1704. bodvol.velocity=angle*knockback
  1705. bodvol.P=5000
  1706. bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  1707. bodvol.Parent=hit
  1708. rl=Instance.new("BodyAngularVelocity")
  1709. rl.P=3000
  1710. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  1711. rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  1712. rl.Parent=hit
  1713. game:GetService("Debris"):AddItem(bodvol,.5)
  1714. game:GetService("Debris"):AddItem(rl,.5)
  1715.                 elseif Type=="Normal" then
  1716.                 vp=Instance.new("BodyVelocity")
  1717.                 vp.P=500
  1718.                 vp.maxForce=Vector3.new(math.huge,0,math.huge)
  1719. --                vp.velocity=Character.Torso.CFrame.lookVector*Knockback
  1720.                 if KnockbackType==1 then
  1721.                 vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/100
  1722.                 elseif KnockbackType==2 then
  1723.                 vp.velocity=Property.CFrame.lookVector*knockback
  1724.                 end
  1725.                 if knockback>-100 then
  1726.                         vp.Parent=hit.Parent.Torso
  1727.                 end
  1728.                 game:GetService("Debris"):AddItem(vp,.5)
  1729.                 elseif Type=="Lifesteal" then
  1730.                 for i=1,5 do
  1731.                 MagicBlood(BrickColor.new("Blue"),hit.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),.1,.1,.1,.1,2,.1,0.05)
  1732.                 end
  1733.                 vp=Instance.new("BodyVelocity")
  1734.                 vp.P=500
  1735.                 vp.maxForce=Vector3.new(math.huge,0,math.huge)
  1736.                 if KnockbackType==1 then
  1737.                 vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/250
  1738.                 elseif KnockbackType==2 then
  1739.                 vp.velocity=Property.CFrame.lookVector*knockback
  1740.                 end
  1741.                 if knockback>-250 then
  1742.                         vp.Parent=hit.Parent.Torso
  1743.                 end
  1744.                 game:GetService("Debris"):AddItem(vp,.5)
  1745.                 Heal=math.ceil(Damage/25100)
  1746.                 Humanoid.Health=Humanoid.Health+Heal
  1747.                 elseif Type=="Up" then
  1748.                 local bodyVelocity=Instance.new("BodyVelocity")
  1749.                 bodyVelocity.velocity=vt(0,30,0)
  1750.                 bodyVelocity.P=5000
  1751.                 bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  1752.                 bodyVelocity.Parent=hit
  1753.                 game:GetService("Debris"):AddItem(bodyVelocity,1)
  1754.                 rl=Instance.new("BodyAngularVelocity")
  1755.                 rl.P=3000
  1756.                 rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  1757.                 rl.angularvelocity=Vector3.new(math.random(-5,5),math.random(-5,5),math.random(-5,5))
  1758.                 rl.Parent=hit
  1759.                 game:GetService("Debris"):AddItem(rl,.5)
  1760.                 elseif Type=="Snare" then
  1761.                 bp=Instance.new("BodyPosition")
  1762.                 bp.P=2000
  1763.                 bp.D=100
  1764.                 bp.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  1765.                 bp.position=hit.Parent.Torso.Position
  1766.                 bp.Parent=hit.Parent.Torso
  1767.                 game:GetService("Debris"):AddItem(bp,1)
  1768.                 elseif Type=="Charge" then
  1769.                 Charge=Charge+1
  1770.                 coroutine.resume(coroutine.create(function(Part)
  1771.                 swait(30)
  1772.                 for i=1,5 do
  1773.                 swait(5)
  1774.                 so("rbxasset://sounds\\unsheath.wav",hit,1,2)
  1775.                 MagicCircle(BrickColor.new("Bright red"),hit.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),.2,2,.1,.2,8,.1,0.05)
  1776.                 newdam=math.random(1,5)
  1777.                 if blocked==false then
  1778.                 h:TakeDamage()
  1779.                 else
  1780.                 h:TakeDamage(newdam/0)
  1781.                 end
  1782.                 end
  1783.                 end),hit)
  1784.                 end
  1785.                         debounce=Instance.new("BoolValue")
  1786.                         debounce.Name="DebounceHit"
  1787.                         debounce.Parent=hit.Parent
  1788.                         debounce.Value=true
  1789.                         game:GetService("Debris"):AddItem(debounce,Delay)
  1790.                         c=Instance.new("ObjectValue")
  1791.                         c.Name="creator"
  1792.                         c.Value=Player
  1793.                         c.Parent=h
  1794.                         game:GetService("Debris"):AddItem(c,.5)
  1795.                 CRIT=false
  1796.                 hitDeb=true
  1797.                 AttackPos=6
  1798.         end
  1799. end
  1800.  
  1801. showDamage=function(Char,Dealt,du,Color)
  1802.         m=Instance.new("Model")
  1803.         m.Name=tostring(Dealt)
  1804.         h=Instance.new("Humanoid")
  1805.         h.Health=0
  1806.         h.MaxHealth=0
  1807.         h.Parent=m
  1808.         c=Instance.new("Part")
  1809.         c.Transparency=1
  1810.         c.BrickColor=Color
  1811.         c.Name="Head"
  1812.         c.TopSurface=0
  1813.         c.BottomSurface=0
  1814.         c.formFactor="Plate"
  1815.         c.Size=Vector3.new(1,.4,1)
  1816.         ms=Instance.new("CylinderMesh")
  1817.         ms.Scale=Vector3.new(.8,.8,.8)
  1818.         if CRIT==true then
  1819.                 ms.Scale=Vector3.new(1,1.25,1)
  1820.         end
  1821.         ms.Parent=c
  1822.         c.Reflectance=0
  1823.         Instance.new("BodyGyro").Parent=c
  1824.         c.Parent=m
  1825.         if Char:findFirstChild("Head")~=nil then
  1826.         c.CFrame=cf(Char["Head"].CFrame.p+Vector3.new(0,1.5,0))
  1827.         elseif Char.Parent:findFirstChild("Head")~=nil then
  1828.         c.CFrame=cf(Char.Parent["Head"].CFrame.p+Vector3.new(0,1.5,0))
  1829.         end
  1830.         f=Instance.new("BodyPosition")
  1831.         f.P=2000
  1832.         f.D=100
  1833.         f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  1834.         f.position=c.Position+Vector3.new(0,3,0)
  1835.         f.Parent=c
  1836.         game:GetService("Debris"):AddItem(m,.5+du)
  1837.         c.CanCollide=false
  1838.         m.Parent=workspace
  1839.         c.CanCollide=false
  1840. end
  1841.  
  1842. combo=0
  1843. function ob1d(mouse)
  1844. hold=true
  1845. if attack==true or equipped==false then return end
  1846. if Mode=="Binary" then
  1847. idle=0
  1848. if Anim=="Run" then
  1849. SpinSlash()
  1850. else
  1851. if combo==0 then
  1852. combo=1
  1853. attackone()
  1854. elseif combo==1 then
  1855. combo=2
  1856. attacktwo()
  1857. elseif combo==2 then
  1858. combo=0
  1859. attackthree()
  1860. end
  1861. end
  1862. else
  1863. if combo==0 then
  1864. combo=1
  1865. Demonattackone()
  1866. elseif combo==1 then
  1867. combo=2
  1868. Demonattacktwo()
  1869. elseif combo==2 then
  1870. combo=0
  1871. Demonattackthree()
  1872. end
  1873. end
  1874. coroutine.resume(coroutine.create(function()
  1875. for i=1,20 do
  1876. if attack==false then
  1877. swait()
  1878. end
  1879. end
  1880. if attack==false then
  1881. combo=0
  1882. --equipanim()
  1883. end
  1884. end))
  1885. end
  1886.  
  1887. function ob1u(mouse)
  1888. hold = false
  1889. end
  1890.  
  1891. buttonhold = false
  1892.  
  1893. eul=0
  1894. holdx=false
  1895. equipped=false
  1896. function key(key)
  1897. if key=="c" then
  1898. if guard==true then
  1899. guard=false
  1900. else
  1901. guard=true
  1902. end
  1903. end
  1904. if key=="x" then
  1905. holdx=true
  1906. end
  1907. if attack==true then return end
  1908. if key=="f" then
  1909. if equipped==false then
  1910. equipped=true
  1911. RSH=ch.Torso["Right Shoulder"]
  1912. LSH=ch.Torso["Left Shoulder"]
  1913. --
  1914. RSH.Parent=nil
  1915. LSH.Parent=nil
  1916. --
  1917. RW.Name="Right Shoulder"
  1918. RW.Part0=ch.Torso
  1919. RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  1920. RW.C1=cf(0, 0.5, 0)
  1921. RW.Part1=ch["Right Arm"]
  1922. RW.Parent=ch.Torso
  1923. --
  1924. LW.Name="Left Shoulder"
  1925. LW.Part0=ch.Torso
  1926. LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  1927. LW.C1=cf(0, 0.5, 0)
  1928. LW.Part1=ch["Left Arm"]
  1929. LW.Parent=ch.Torso
  1930. --
  1931. equipanim()
  1932. else
  1933. equipped=false
  1934. hideanim()
  1935. swait(0)
  1936. RW.Parent=nil
  1937. LW.Parent=nil
  1938. RSH.Parent=player.Character.Torso
  1939. LSH.Parent=player.Character.Torso
  1940. end
  1941. end
  1942. if equipped==false then return end
  1943. if Mode=="Binary" then
  1944. if key=="q" then
  1945. idle=500
  1946. end
  1947. if key=="z" and hitfloor~=nil then
  1948. BinarySwing()
  1949. end
  1950. if key=="x" then
  1951. BinaryImpulse()
  1952. end
  1953. if key=="c" then
  1954. Bash()
  1955. end
  1956. if key=="v" then
  1957. UnleashTheDemon()
  1958. end
  1959. end
  1960. if Mode=="Demon" then
  1961. if key=="x" then
  1962. LetItBuild()
  1963. end
  1964. if key=="c" then
  1965. YourMoveCreep()
  1966. end
  1967. end
  1968. if key=="0" then
  1969. Humanoid.WalkSpeed=(180)
  1970. end
  1971. end
  1972.  
  1973. function key2(key)
  1974. if key=="0" then
  1975. Humanoid.WalkSpeed=22
  1976. end
  1977. if key=="x" then
  1978. holdx=false
  1979. end
  1980. end
  1981.  
  1982. function s(mouse)
  1983. mouse.Button1Down:connect(function() ob1d(mouse) end)
  1984. mouse.Button1Up:connect(function() ob1u(mouse) end)
  1985. mouse.KeyDown:connect(key)
  1986. mouse.KeyUp:connect(key2)
  1987.  
  1988. player=Player
  1989. ch=Character
  1990. MMouse=mouse
  1991. end
  1992.  
  1993. function ds(mouse)
  1994. end
  1995.  
  1996. Bin.Selected:connect(s)
  1997. Bin.Deselected:connect(ds)
  1998. print("The blade of Ghosdeeri, has loaded.")
  1999.  
  2000. local thenum=0
  2001. while true do
  2002. swait()
  2003. if Mode=="Demon" then
  2004. if thenum>=5 then
  2005. ElecEffect(prtd7.CFrame,2,4,2)
  2006. thenum=0
  2007. end
  2008. thenum=thenum+1
  2009. for _,c in pairs(Character:children()) do
  2010. for _,v in pairs(c:children()) do
  2011. if v.className=="BodyGyro" or v.className=="BodyPosition" or v.className=="BodyVelocity" or v.className=="BodyAngularVelocity" then
  2012. if v.Name~="FixerVel" and v.Name~="FixerGyro" then
  2013. v.Parent=nil
  2014. end
  2015. end
  2016. end
  2017. end
  2018. end
  2019. local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
  2020. local velderp=RootPart.Velocity.y
  2021. hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character)
  2022. if equipped==true then
  2023. if Anim=="Idle" and attack==false and Mode=="Binary" then
  2024. idle=idle+1
  2025. else
  2026. idle=0
  2027. end
  2028. if idleanim>=0.3 then
  2029. idleanim2=true
  2030. elseif idleanim<=0 then
  2031. idleanim2=false
  2032. end
  2033. if idleanim2==false then
  2034. if Anim=="Walk" then
  2035. idleanim=idleanim+0.005
  2036. elseif Anim=="Idle" then
  2037. idleanim=idleanim+0.003
  2038. end
  2039. else
  2040. if Anim=="Walk" then
  2041. idleanim=idleanim-0.005
  2042. elseif Anim=="Idle" then
  2043. idleanim=idleanim-0.003
  2044. end
  2045. end
  2046. if RootPart.Velocity.y > 1 and hitfloor==nil then
  2047. Anim="Jump"
  2048. if attack==false and Mode=="Binary" then
  2049. wld1.C0=clerp(wld1.C0,euler(0.4,0,-0.5)*cf(0,1,0),.3)
  2050. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(3,0,-0.2),.3)
  2051. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-0.5),.3)
  2052. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(-0.2,0,0),.3)
  2053. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  2054. RH.C0=clerp(RH.C0,cf(1,-0.5,-1)*euler(-0.5,1.57,0),.2)
  2055. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(-0.7,-1.57,0),.2)
  2056. end
  2057. if attack==false and Mode=="Demon" then
  2058. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-0.5)*euler(0.4,0,0),.3)
  2059. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(-0.2,0,0),.3)
  2060. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(.8,-0.5,.8)*euler(.1,0,0),.3)
  2061. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-0.4,0,-0.2),.3)
  2062. RH.C0=clerp(RH.C0,cf(1,-.7,-.1)*euler(0.1,1.57,0),.3)
  2063. LH.C0=clerp(LH.C0,cf(-1,-.3,-.2)*euler(0.4,-1.57,0)*euler(0,0,0),.3)
  2064. end
  2065. elseif RootPart.Velocity.y < -1 and hitfloor==nil then
  2066. Anim="Fall"
  2067. if attack==false and Mode=="Binary" then
  2068. wld1.C0=clerp(wld1.C0,euler(0.4,0,-0.5)*cf(0,1,0),.3)
  2069. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(2.6,0,-0.2),.3)
  2070. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-0.5),.3)
  2071. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0.4,0,0),.3)
  2072. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  2073. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0.4,1.57,0),.2)
  2074. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(-0.2,-1.57,0),.2)
  2075. end
  2076. if attack==false and Mode=="Demon" then
  2077. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-0.5)*euler(0.2,0,0),.3)
  2078. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0.2,0,0),.3)
  2079. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.4,-0.5,1)*euler(.6,0,.5),.3)
  2080. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-0.4,0,-1),.3)
  2081. RH.C0=clerp(RH.C0,cf(1,-.7,-.1)*euler(-0.1,1.57,0),.3)
  2082. LH.C0=clerp(LH.C0,cf(-1,-.6,-.2)*euler(0.8,-1.57,0)*euler(0,0,0),.3)
  2083. end
  2084. elseif torvel<1 and hitfloor~=nil then
  2085. if Anim=="Fall" then
  2086. if velderp<=-70 then
  2087. coroutine.resume(coroutine.create(function()
  2088. Stomp()
  2089. end))
  2090. end
  2091. end
  2092. Anim="Idle"
  2093. if idle<=500 then
  2094. if attack==false and Mode=="Binary" then
  2095. wld1.C0=clerp(wld1.C0,euler(1.57,0,0)*cf(0,1,-0.3),.3)
  2096. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,0.5),.3)
  2097. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-0.5),.3)
  2098. RW.C0=clerp(RW.C0,cf(1,0.5,-0.5)*euler(1-(idleanim/4),-0.5+idleanim,-0.7+(idleanim/2)),.3)
  2099. LW.C0=clerp(LW.C0,cf(-1+idleanim,0.5-idleanim,-0.5)*euler(1-idleanim,-0.5+idleanim,0.5),.3)
  2100. RH.C0=clerp(RH.C0,RHC0,.2)
  2101. LH.C0=clerp(LH.C0,LHC0,.2)
  2102. end
  2103. if attack==false and Mode=="Demon" then
  2104. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-0.5-idleanim)*euler(0.4+(idleanim/2),0,-0.4),.3)
  2105. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(-idleanim/2,0,0.4),.3)
  2106. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.4,-0.5,1)*euler(.1+idleanim,0,0),.3)
  2107. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-0.2,0,-0.2-idleanim),.3)
  2108. RH.C0=clerp(RH.C0,cf(1,-1,-idleanim)*euler(-0.2-(idleanim/2),1.57,0),.3)
  2109. LH.C0=clerp(LH.C0,cf(-1,-.5+idleanim,0)*euler(0.5+(idleanim/2),-1.2,0)*euler(-.2,0,0),.3)
  2110. end
  2111. else
  2112. if attack==false and Mode=="Binary" then
  2113. --wld1.C0=clerp(wld1.C0,euler(.2,0,0.1)*cf(0,.8,.3),.1)
  2114. wld1.C0=clerp(wld1.C0,euler(1.57,0,0)*cf(0,1,-.3),.1)
  2115. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0.1+(idleanim/2),0,0),.1)
  2116. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-1.5)*euler(0.1,0,0),.1)
  2117. --RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.7,0,1.5),.1)
  2118. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,.2),.1)
  2119. LW.C0=clerp(LW.C0,cf(-1.2,0.5,-0.3)*euler(1.4,0,.8),.1)
  2120. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(-1.2,1.57,0),.15)
  2121. LH.C0=clerp(LH.C0,cf(-1.1,0.4,-0.8)*euler(-0.05,-1.57,0),.15)
  2122. end
  2123. end
  2124. elseif torvel>2 and torvel<22 and hitfloor~=nil then
  2125. if Anim=="Fall" then
  2126. if velderp<=-70 then
  2127. coroutine.resume(coroutine.create(function()
  2128. Stomp()
  2129. end))
  2130. end
  2131. end
  2132. Anim="Walk"
  2133. if attack==false and Mode=="Binary" then
  2134. wld1.C0=clerp(wld1.C0,euler(0.4,0,-0.5)*cf(0,1,0),.2)
  2135. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,0),.2)
  2136. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0.1,0,0),.2)
  2137. --RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-0.1,0,0.2),.2)
  2138. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(3-idleanim,0,-0.2+(idleanim/2)),.2)
  2139. LW.C0=clerp(LW.C0,cf(-1,0.5,-0.5)*euler(1.57,-(idleanim/2),1.3-(idleanim/2)),.2)
  2140. RH.C0=clerp(RH.C0,RHC0,.3)
  2141. LH.C0=clerp(LH.C0,LHC0,.3)
  2142. end
  2143. if attack==false and Mode=="Demon" then
  2144. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-0.5)*euler(0.4,0,0),.3)
  2145. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(-0.2,0,0),.3)
  2146. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.5,-0.5,1.5)*euler(.2,0,.2+idleanim),.3)
  2147. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(idleanim,0,-0.2),.3)
  2148. RH.C0=clerp(RH.C0,cf(1,-.5,0)*euler(0.2,1.57,0),.3)
  2149. LH.C0=clerp(LH.C0,cf(-1,-.5,0)*euler(0.5,-1.57,0)*euler(0,0,0),.3)
  2150. end
  2151. elseif torvel>=22 and hitfloor~=nil then
  2152. if Anim=="Fall" then
  2153. if velderp<=-70 then
  2154. coroutine.resume(coroutine.create(function()
  2155. Stomp()
  2156. end))
  2157. end
  2158. end
  2159. Anim="Run"
  2160. if attack==false and Mode=="Binary" then
  2161. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(-0.3,0,0.5),.4)
  2162. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.5)*euler(0.5,0,-0.5),.4)
  2163. wld1.C0=clerp(wld1.C0,euler(1.57,0,0)*cf(0,1,-0.3),.4)
  2164. RW.C0=clerp(RW.C0,cf(1,0.5,-0.5)*euler(1.2,-0.8,-0.2),.4)
  2165. LW.C0=clerp(LW.C0,cf(-.7,0.5,-0.7)*euler(1.2,-0.5,0.8),.4)
  2166. RH.C0=clerp(RH.C0,RHC0*cf(0,0,0)*euler(0.2,0.2,.5),.3)
  2167. --LH.C0=clerp(LH.C0,LHC0*cf(.5,0.5,-.2)*euler(-0.5,0.5,-0.7),.3)
  2168. LH.C0=clerp(LH.C0,LHC0*cf(.5,0.2,0)*euler(0,.5,0.2),.3)
  2169. end
  2170. if attack==false and Mode=="Demon" then
  2171. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-0.8)*euler(0.5,0,-0.4),.3)
  2172. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(-0.2,0,.4),.3)
  2173. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.5,-0.5,1.5)*euler(.2,0,.4),.3)
  2174. LW.C0=clerp(LW.C0,cf(0,0.5,-0.5)*euler(1.57,-1.57,0)*euler(1.5,0,0),.3)
  2175. RH.C0=clerp(RH.C0,cf(1,-.3,-.5)*euler(-0.2,2,0)*euler(0,0,0),.3)
  2176. LH.C0=clerp(LH.C0,cf(-1,-.2,0)*euler(0.5,-1.2,0)*euler(-.2,0,0),.3)
  2177. end
  2178. end
  2179. end
  2180. if #Effects>0 then
  2181. --table.insert(Effects,{prt,"Block1",delay})
  2182. for e=1,#Effects do
  2183. if Effects[e]~=nil then
  2184. --for j=1,#Effects[e] do
  2185. local Thing=Effects[e]
  2186. if Thing~=nil then
  2187. local Part=Thing[1]
  2188. local Mode=Thing[2]
  2189. local Delay=Thing[3]
  2190. local IncX=Thing[4]
  2191. local IncY=Thing[5]
  2192. local IncZ=Thing[6]
  2193. if Thing[1].Transparency<=1 then
  2194. if Thing[2]=="Block1" then
  2195. Thing[1].CFrame=Thing[1].CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  2196. Mesh=Thing[1].Mesh
  2197. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  2198. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  2199. elseif Thing[2]=="Cylinder" then
  2200. Mesh=Thing[1].Mesh
  2201. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  2202. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  2203. elseif Thing[2]=="Blood" then
  2204. Mesh=Thing[1].Mesh
  2205. Thing[1].CFrame=Thing[1].CFrame*cf(0,.5,0)
  2206. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  2207. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  2208. elseif Thing[2]=="Elec" then
  2209. Mesh=Thing[1].Mesh
  2210. Mesh.Scale=Mesh.Scale+vt(Thing[7],Thing[8],Thing[9])
  2211. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  2212. elseif Thing[2]=="Disappear" then
  2213. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  2214. end
  2215. else
  2216. Part.Parent=nil
  2217. table.remove(Effects,e)
  2218. end
  2219. end
  2220. --end
  2221. end
  2222. end
  2223. end
  2224. end
Advertisement
Add Comment
Please, Sign In to add comment