Advertisement
TheownerFescripts

e

Sep 19th, 2021
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 27.56 KB | None | 0 0
  1. BladePart=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.20000000298023,0,"Lime green","BladePart",Vector3.new(0.200000003, 0.220000014, 0.800000072))
  2. BladePartweld=weld(m,BladeHandle,BladePart,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.399986267, -5.7220459e-006, 1.70002365, 1.42108547e-014, -0.999998808, -1.77635684e-015, -1, 2.13162821e-014, -2.98022744e-008, 2.98023828e-008, -3.55271368e-015, -0.999998808))
  3. mesh("CylinderMesh",BladePart,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  4. BladePart=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.20000000298023,0,"Lime green","BladePart",Vector3.new(0.200000003, 0.220000014, 0.800000072))
  5. BladePartweld=weld(m,BladeHandle,BladePart,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.400005341, -5.7220459e-006, 1.70001566, 4.33431069e-013, -0.999998093, 1.63424829e-013, -1, -9.23705556e-014, -2.98015639e-008, 2.98019547e-008, 2.14939178e-013, -0.999998093))
  6. mesh("CylinderMesh",BladePart,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  7. BladePart=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.20000000298023,0,"Lime green","BladePart",Vector3.new(0.220000014, 0.200000003, 0.399999976))
  8. BladePartweld=weld(m,BladeHandle,BladePart,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.00168228149, -0.399024963, 1.89990211, 0.999998748, -2.1309047e-006, 0.000802797964, 2.13086582e-006, 0.999997854, 3.29315458e-006, -0.000802962575, -3.21859238e-006, 0.999998093))
  9. mesh("SpecialMesh",BladePart,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  10. BladePart=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.20000000298023,0,"Lime green","BladePart",Vector3.new(0.220000014, 0.200000003, 3.4000001))
  11. BladePartweld=weld(m,BladeHandle,BladePart,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.00168037415, -0.399391174, -0.000123500824, 0.999998748, -2.1309047e-006, 0.000802797964, 2.13086582e-006, 0.999997854, 3.29315458e-006, -0.000802962575, -3.21859238e-006, 0.999998093))
  12. BladePart=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.20000000298023,0,"Lime green","BladePart",Vector3.new(0.220000014, 0.200000003, 0.399999976))
  13. BladePartweld=weld(m,BladeHandle,BladePart,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.00135612488, -0.39358139, 1.89990449, -0.999998927, 2.05645279e-006, 0.000802798022, -2.0555824e-006, -0.999997914, 3.17394552e-006, 0.000802962692, 3.11428425e-006, 0.999998093))
  14. mesh("SpecialMesh",BladePart,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  15. BladePart=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.20000000298023,0,"Really black","BladePart",Vector3.new(0.200000003, 0.520000041, 1.39999998))
  16. BladePartweld=weld(m,BladeHandle,BladePart,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.00136566162, -0.239994049, 2.3998909, 0.999999166, -1.95434222e-006, -0.000799282745, 1.92285847e-006, 0.999998212, -1.86264401e-006, 0.000799447356, 2.07120365e-006, 0.999998033))
  17. mesh("SpecialMesh",BladePart,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  18. BladePart=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.20000000298023,0,"Really black","BladePart",Vector3.new(1.00000012, 0.200000003, 1.00000012))
  19. BladePartweld=weld(m,BladeHandle,BladePart,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-7.62939453e-006, -5.7220459e-006, 1.60001981, 3.26849658e-013, -0.999999404, -3.01980663e-014, -1, -3.05533376e-013, -2.98017593e-008, 2.98018055e-008, 2.84217094e-014, -0.999999404))
  20. mesh("CylinderMesh",BladePart,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  21. BladePart=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.20000000298023,0,"Really black","BladePart",Vector3.new(0.200000003, 0.479999989, 1.39999998))
  22. BladePartweld=weld(m,BladeHandle,BladePart,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.00135612488, -0.260002136, 2.39991736, -0.999998927, 2.05645279e-006, 0.000802798022, -2.0555824e-006, -0.999997914, 3.17394552e-006, 0.000802962692, 3.11428425e-006, 0.999998093))
  23. mesh("SpecialMesh",BladePart,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  24.  
  25. function effect(Color,Ref,LP,P1,returnn)
  26. if LP==nil or P1==nil then return end
  27. local effectsmsh=Instance.new("CylinderMesh")
  28. effectsmsh.Scale=Vector3.new(0.2,1,0.2)
  29. effectsmsh.Name="Mesh"
  30. local effectsg=Instance.new("Part")
  31. NoOutline(effectsg)
  32. effectsg.formFactor=3
  33. effectsg.CanCollide=false
  34. effectsg.Name="Eff"
  35. effectsg.Locked=true
  36. effectsg.Anchored=true
  37. effectsg.Size=Vector3.new(0.5,1,0.5)
  38. effectsg.Parent=workspace
  39. effectsmsh.Parent=effectsg
  40. effectsg.BrickColor=BrickColor.new(Color)
  41. effectsg.Reflectance=Ref
  42. local point1=P1
  43. local mg=(LP.p - point1.p).magnitude
  44. effectsg.Size=Vector3.new(0.5,mg,0.5)
  45. effectsg.CFrame=cf((LP.p+point1.p)/2,point1.p) * CFrame.Angles(math.rad(90),0,0)
  46. effectsmsh.Scale=Vector3.new(0.2,1,0.2)
  47. game:GetService("Debris"):AddItem(effectsg,2)
  48. if returnn then return effectsg end
  49. if not returnn then
  50. table.insert(Effects,{effectsg,"Cylinder",0.2,0.01,0,0.01,effectsmsh})
  51. end
  52. end
  53.  
  54. function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  55. local prt=part(3,workspace,"SmoothPlastic",0,0,brickcolor,"Effect",vt())
  56. prt.Anchored=true
  57. prt.CFrame=cframe
  58. local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
  59. game:GetService("Debris"):AddItem(prt,2)
  60. table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
  61. end
  62.  
  63. function MagicCylinder(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  64. local prt=part(3,workspace,"SmoothPlastic",0,0,brickcolor,"Effect",vt())
  65. prt.Anchored=true
  66. prt.CFrame=cframe
  67. local msh=mesh("CylinderMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  68. game:GetService("Debris"):AddItem(prt,2)
  69. table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
  70. end
  71.  
  72. function MagicHead(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  73. local prt=part(3,workspace,"SmoothPlastic",0,0,brickcolor,"Effect",vt())
  74. prt.Anchored=true
  75. prt.CFrame=cframe
  76. local msh=mesh("SpecialMesh",prt,"Head","",vt(0,0,0),vt(x1,y1,z1))
  77. game:GetService("Debris"):AddItem(prt,2)
  78. table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
  79. end
  80.  
  81. function Shootcombo()
  82. attack = true
  83. for i = 0,1,0.1 do
  84. swait()
  85. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(50)),.3)
  86. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(-50)),.3)
  87. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(90), math.rad(0), math.rad(50)), 0.3)
  88. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-10)), 0.3)
  89. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(50),math.rad(0)),.3)
  90. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-120),math.rad(10)),.3)
  91. end
  92. so("http://www.roblox.com/asset/?id=169445602",BarrelA,.7,1.5)
  93. so("http://www.roblox.com/asset/?id=169445602",BarrelB,.7,1.5)
  94. so("http://www.roblox.com/asset/?id=169380505",BarrelA,.7,1.1)
  95. so("http://www.roblox.com/asset/?id=169380505",BarrelB,.7,1.1)
  96. table.insert(Effects,{BarrelA.CFrame.lookVector,"Shoot",10,BarrelA.Position,5,10,0,1})
  97. table.insert(Effects,{BarrelB.CFrame.lookVector,"Shoot",10,BarrelB.Position,5,10,0,1})
  98. for i = 0,1,0.2 do
  99. swait()
  100. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(50)),.3)
  101. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-5),math.rad(5),math.rad(-50)),.3)
  102. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(130), math.rad(30), math.rad(50)), 0.3)
  103. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-10)), 0.3)
  104. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(50),math.rad(0)),.3)
  105. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-120),math.rad(10)),.3)
  106. end
  107. attack = false
  108. end
  109.  
  110. function BladeAttackOne()
  111. attack = true
  112. local con=Hitbox.Touched:connect(function(hit) Damagefunc(Hitbox,hit,20,30,math.random(5,5),"Normal",RootPart,.2,1) end)
  113. for i = 0,1,0.1 do
  114. swait()
  115. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(-70)),0.4)
  116. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(70)),0.4)
  117. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(30), math.rad(100)),0.4)
  118. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-80)),0.4)
  119. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(120),math.rad(0)),0.4)
  120. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-50),math.rad(0)),0.4)
  121. end
  122. --so("http://roblox.com/asset/?id=206083107",handle,1,1)
  123. so("http://www.roblox.com/asset/?id=200633148",handle,1,.9)
  124. for i = 0,1,0.1 do
  125. swait()
  126. local blcf = Hitbox.CFrame*CFrame.new(0,.5,0)
  127. if scfr and (Hitbox.Position-scfr.p).magnitude > .1 then
  128. local h = 5
  129. 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)
  130. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  131. 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)
  132. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  133. scfr = blcf
  134. elseif not scfr then
  135. scfr = blcf
  136. end
  137. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(80)),0.4)
  138. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(-10),math.rad(-80)),0.4)
  139. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(120), math.rad(90)),0.4)
  140. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-30)),0.4)
  141. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(50),math.rad(0)),0.4)
  142. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-120),math.rad(-10)),0.4)
  143. end
  144. attack = false
  145. con:disconnect()
  146. end
  147.  
  148. function BladeAttackTwo()
  149. attack = true
  150. local con=Hitbox.Touched:connect(function(hit) Damagefunc(Hitbox,hit,20,30,math.random(5,5),"Normal",RootPart,.2,1) end)
  151. for i = 0,1,0.1 do
  152. swait()
  153. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(70)),0.4)
  154. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(-10),math.rad(-70)),0.4)
  155. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(120), math.rad(90)),0.4)
  156. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-30)),0.4)
  157. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(40),math.rad(0)),0.4)
  158. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-140),math.rad(-10)),0.4)
  159. end
  160. --so("http://roblox.com/asset/?id=206083107",handle,1,.9)
  161. so("http://www.roblox.com/asset/?id=200633196",handle,1,1)
  162. for i = 0,1,0.1 do
  163. swait()
  164. local blcf = Hitbox.CFrame*CFrame.new(0,.5,0)
  165. if scfr and (Hitbox.Position-scfr.p).magnitude > .1 then
  166. local h = 5
  167. 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)
  168. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  169. 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)
  170. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  171. scfr = blcf
  172. elseif not scfr then
  173. scfr = blcf
  174. end
  175. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(-80)),0.4)
  176. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(80)),0.4)
  177. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(10), math.rad(90)),0.4)
  178. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-90)),0.4)
  179. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(140),math.rad(0)),0.4)
  180. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-40),math.rad(-10)),0.4)
  181. end
  182. attack = false
  183. con:disconnect()
  184. end
  185.  
  186. function BladeAttackThree()
  187. attack = true
  188. local con=Hitbox.Touched:connect(function(hit) Damagefunc(Hitbox,hit,20,30,math.random(5,5),"Normal",RootPart,.2,1) end)
  189. for i = 0,1,0.1 do
  190. swait()
  191. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(20)),0.4)
  192. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(-20)),.3)
  193. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(170), math.rad(0), math.rad(20)),0.4)
  194. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-30)),0.4)
  195. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0)),0.4)
  196. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(-10)),0.4)
  197. end
  198. --so("http://roblox.com/asset/?id=206083107",handle,1,1.1)
  199. so("http://www.roblox.com/asset/?id=200633196",handle,1,.9)
  200. for i = 0,1,0.1 do
  201. swait()
  202. local blcf = Hitbox.CFrame*CFrame.new(0,.5,0)
  203. if scfr and (Hitbox.Position-scfr.p).magnitude > .1 then
  204. local h = 5
  205. 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)
  206. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  207. 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)
  208. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  209. scfr = blcf
  210. elseif not scfr then
  211. scfr = blcf
  212. end
  213. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(40)),0.4)
  214. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(-40)),.3)
  215. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(10), math.rad(0), math.rad(-10)),0.4)
  216. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-10)),0.4)
  217. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0)),0.4)
  218. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(-10)),0.4)
  219. end
  220. attack = false
  221. con:disconnect()
  222. end
  223.  
  224. function BladeAttackFour()
  225. attack = true
  226. local con=Hitbox.Touched:connect(function(hit) Damagefunc(Hitbox,hit,20,30,math.random(5,5),"Normal",RootPart,.2,1) end)
  227. for i = 0,1,0.1 do
  228. swait()
  229. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(70)),0.4)
  230. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(-70)),.4)
  231. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(120), math.rad(90)),0.4)
  232. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-30)),0.4)
  233. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0)),0.4)
  234. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(-10)),0.4)
  235. end
  236. so("http://www.roblox.com/asset/?id=200633148",handle,1,.8)
  237. Torso.Velocity=Head.CFrame.lookVector*100
  238. for i = 0,1,0.05 do
  239. swait()
  240. local blcf = Hitbox.CFrame*CFrame.new(0,.5,0)
  241. if scfr and (Hitbox.Position-scfr.p).magnitude > .1 then
  242. local h = 5
  243. 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)
  244. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  245. 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)
  246. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  247. scfr = blcf
  248. elseif not scfr then
  249. scfr = blcf
  250. end
  251. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,-1)* angles(math.rad(40),math.rad(0),math.rad(-70)),0.3)
  252. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-20),math.rad(-30),math.rad(70)),.3)
  253. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(20), math.rad(90)),0.3)
  254. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(30), math.rad(0), math.rad(-60)),0.3)
  255. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(60),math.rad(-30)),0.3)
  256. LH.C0=clerp(LH.C0,cf(-1,.2,0)*angles(math.rad(0),math.rad(-40),math.rad(-60)),0.3)
  257. end
  258. con:disconnect()
  259. attack = false
  260. end
  261.  
  262. function ElecEffect(cff,x,y,z)
  263. local prt=part(3,workspace,"SmoothPlastic",0,0,BrickColor.new("Lime green"),"Part",vt(1,1,1))
  264. prt.Anchored=true
  265. prt.CFrame=cff*cf(math.random(-x,x),math.random(-y,y),math.random(-z,z))
  266. prt.CFrame=cf(prt.Position)
  267. --prt.CFrame=cf(cff)*cf(math.random(-x,x),math.random(-y,y),math.random(-z,z))
  268. game:GetService("Debris"):AddItem(prt,2)
  269. xval=math.random()/2
  270. yval=math.random()/2
  271. zval=math.random()/2
  272. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(xval,yval,zval))
  273. Effects[#Effects+1]={prt,"Elec",0.1,x,y,z,xval,yval,zval} --part, type, delay
  274. end
  275.  
  276. function Test()
  277. ElecEffect(Hitbox.CFrame,2,4,2)
  278. end
  279.  
  280. attacktype1 = 1
  281. mouse.Button1Down:connect(function()
  282. if Mode == "Gun" then
  283. if attack==false then
  284. if attacktype1==1 then
  285. attack=true
  286. attacktype1=1
  287. Shootcombo()
  288. end
  289. end
  290. end
  291. if Mode == "Blade" then
  292. if attack==false then
  293. if attacktype==1 then
  294. attack=true
  295. attacktype=2
  296. BladeAttackOne()
  297. elseif attacktype==2 then
  298. attack=true
  299. attacktype=3
  300. BladeAttackTwo()
  301. elseif attacktype==3 then
  302. attack=true
  303. attacktype=4
  304. BladeAttackThree()
  305. elseif attacktype==4 then
  306. attack=true
  307. attacktype=1
  308. BladeAttackFour()
  309. end
  310. end
  311. end
  312. end)
  313.  
  314. mouse.KeyDown:connect(function(k)
  315. k=k:lower()
  316. if k=='f' then
  317. if Mode == "Gun" then
  318. Mode = "Blade"
  319. so("http://www.roblox.com/asset/?id=152052659",handle,1,1)
  320. elseif Mode == "Blade" then
  321. Mode = "Gun"
  322. so("http://www.roblox.com/asset/?id=211134014",handle,1,1)
  323. end
  324. elseif k=='q' then
  325. Test()
  326. end
  327. end)
  328.  
  329.  
  330.  
  331. local sine = 0
  332. local change = 1
  333. local val = 0
  334.  
  335. while true do
  336. swait()
  337. sine = sine + change
  338. local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
  339. local velderp=RootPart.Velocity.y
  340. hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character)
  341. if equipped==true or equipped==false then
  342. if attack==false then
  343. idle=idle+1
  344. else
  345. idle=0
  346. end
  347. if idle>=500 then
  348. if attack==false then
  349. --Sheath()
  350. end
  351. end
  352. if RootPart.Velocity.y > 1 and hitfloor==nil then
  353. Anim="Jump"
  354. if attack==false and Mode == "Gun" then
  355. change=3
  356. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  357. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-10),math.rad(0),math.rad(0)),.3)
  358. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(20)), 0.3)
  359. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-10), math.rad(0), math.rad(-10)), 0.3)
  360. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(-10)),.3)
  361. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(20)),.3)
  362. BladeHandleweld.C0=clerp(BladeHandleweld.C0, CFrame.new(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  363. end
  364. if attack==false and Mode == "Blade" then
  365. change=3
  366. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  367. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-10),math.rad(0),math.rad(0)),.3)
  368. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(20)), 0.3)
  369. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-10), math.rad(0), math.rad(-10)), 0.3)
  370. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(-10)),.3)
  371. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(20)),.3)
  372. BladeHandleweld.C0=clerp(BladeHandleweld.C0, CFrame.new(0, -3, 1.2) * angles(math.rad(180), math.rad(0), math.rad(0)), 0.3)
  373. end
  374. elseif RootPart.Velocity.y < -1 and hitfloor==nil then
  375. Anim="Fall"
  376. if attack==false and Mode == "Gun" then
  377. change=3
  378. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  379. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(0)),.3)
  380. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(20)), 0.3)
  381. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-10), math.rad(0), math.rad(-30)), 0.3)
  382. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(10)),.3)
  383. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(-20)),.3)
  384. BladeHandleweld.C0=clerp(BladeHandleweld.C0, CFrame.new(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  385. end
  386. if attack==false and Mode == "Blade" then
  387. change=3
  388. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  389. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(0)),.3)
  390. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(20)), 0.3)
  391. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-10), math.rad(0), math.rad(-30)), 0.3)
  392. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(10)),.3)
  393. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(-20)),.3)
  394. BladeHandleweld.C0=clerp(BladeHandleweld.C0, CFrame.new(0, -3, 1.2) * angles(math.rad(180), math.rad(0), math.rad(0)), 0.3)
  395. end
  396. elseif torvel<1 and hitfloor~=nil then
  397. Anim="Idle"
  398. if attack==false and Mode == "Gun" then
  399. change=3
  400. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(20)),.3)
  401. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(-20)),.3)
  402. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(20)), 0.3)
  403. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-10), math.rad(0), math.rad(-10)), 0.3)
  404. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(70),math.rad(0)),.3)
  405. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-80),math.rad(10)),.3)
  406. BladeHandleweld.C0=clerp(BladeHandleweld.C0, CFrame.new(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  407. end
  408. if attack==false and Mode == "Blade" then
  409. change=3
  410. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(-40)),.3)
  411. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(40)),.3)
  412. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(60), math.rad(0), math.rad(20)), 0.3)
  413. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(-30)), 0.3)
  414. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(80),math.rad(0)),.3)
  415. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-60),math.rad(-5)),.3)
  416. BladeHandleweld.C0=clerp(BladeHandleweld.C0, CFrame.new(0, -3, 1.2) * angles(math.rad(180), math.rad(0), math.rad(0)), 0.3)
  417. end
  418. elseif torvel>2 and hitfloor~=nil then
  419. Anim="Walk"
  420. if attack==false and Mode == "Gun" then
  421. change=3
  422. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(20),math.rad(0),math.rad(0)),.3)
  423. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-10),math.rad(0),math.rad(-0)),.3)
  424. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(40), math.rad(0), math.rad(20)), 0.3)
  425. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-10)), 0.3)
  426. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(10)),.3)
  427. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(10)),.3)
  428. BladeHandleweld.C0=clerp(BladeHandleweld.C0, CFrame.new(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  429. end
  430. if attack==false and Mode == "Blade" then
  431. change=3
  432. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(20),math.rad(0),math.rad(10)),.3)
  433. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-20),math.rad(1),math.rad(-10)),.3)
  434. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(80), math.rad(5), math.rad(20)), 0.3)
  435. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(10), math.rad(0), math.rad(-20)), 0.3)
  436. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0)),.3)
  437. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0)),.3)
  438. BladeHandleweld.C0=clerp(BladeHandleweld.C0, CFrame.new(0, -3, 1.2) * angles(math.rad(180), math.rad(0), math.rad(0)), 0.3)
  439. end
  440. end
  441. end
  442. if #Effects>0 then
  443. --table.insert(Effects,{prt,"Block1",delay})
  444. for e=1,#Effects do
  445. if Effects[e]~=nil then
  446. --for j=1,#Effects[e] do
  447. local Thing=Effects[e]
  448. if Thing~=nil then
  449. local Part=Thing[1]
  450. local Mode=Thing[2]
  451. local Delay=Thing[3]
  452. local IncX=Thing[4]
  453. local IncY=Thing[5]
  454. local IncZ=Thing[6]
  455. if Thing[2]=="DecreaseStat" then
  456. Thing[5]=Thing[5]-1
  457. if Thing[5]<=0 then
  458. if Thing[1]:findFirstChild("Stats")~=nil then
  459. Thing[1].Stats[Thing[3]].Value=Thing[1].Stats[Thing[3]].Value+Thing[4]
  460. end
  461. table.remove(Effects,e)
  462. end
  463. end
  464. if Thing[2]=="Shoot" then
  465. local Look=Thing[1]
  466. local hit,pos = rayCast(Thing[4],Look,20,m)
  467. local mag=(Thing[4]-pos).magnitude
  468. MagicHead(BrickColor.new("Lime green"),CFrame.new((Thing[4]+pos)/2,pos)*angles(1.57,0,0),1,mag*5,1,.5,0,.5,0.1)
  469. Thing[4]=Thing[4]+(Look*20)
  470. Thing[3]=Thing[3]-1
  471. if hit~=nil then
  472. Thing[3]=0
  473. if Thing[8]==1 then
  474. Damagefunc(Hitbox,hit,Thing[5],Thing[6],Thing[7],"Normal",RootPart,0,2,math.random(1,5),nil,nil,true)
  475. elseif Thing[8]==2 then
  476. Damagefunc(Hitbox,hit,Thing[5],Thing[6],Thing[7],"NormalDecreaseMvmt1",RootPart,0,2,math.random(1,5),nil,nil,true)
  477. end
  478. ref=part(3,workspace,"SmoothPlastic",0,1,BrickColor.new("Lime green"),"Reference",vt())
  479. ref.Anchored=true
  480. ref.CFrame=cf(pos)
  481. MagicCircle(BrickColor.new("Lime green"),cf(pos),5,5,5,1,1,1,0.03)
  482. game:GetService("Debris"):AddItem(ref,1)
  483. end
  484. if Thing[3]<=0 then
  485. table.remove(Effects,e)
  486. end
  487. end
  488. if Thing[2]=="CylinderClang" then
  489. if Thing[3]<=1 then
  490. Thing[1].CFrame=Thing[1].CFrame*CFrame.new(0,2.5*Thing[5],0)*CFrame.fromEulerAnglesXYZ(Thing[6],0,0)
  491. Thing[7]=Thing[1].CFrame
  492. effect("New Yeller",0,Thing[8],Thing[7])
  493. Thing[8]=Thing[7]
  494. Thing[3]=Thing[3]+Thing[4]
  495. else
  496. Part.Parent=nil
  497. table.remove(Effects,e)
  498. end
  499. --[[Mesh=Thing[7]
  500. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  501. Thing[1].Transparency=Thing[1].Transparency+Thing[3]]
  502. end
  503. if Thing[2]~="Shoot" and Thing[2]~="DecreaseStat" then
  504. if Thing[1].Transparency<=1 then
  505. if Thing[2]=="Block1" then
  506. Thing[1].CFrame=Thing[1].CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  507. Mesh=Thing[7]
  508. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  509. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  510. elseif Thing[2]=="Block2" then
  511. Thing[1].CFrame=Thing[1].CFrame
  512. Mesh=Thing[7]
  513. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  514. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  515. elseif Thing[2]=="Cylinder" then
  516. Mesh=Thing[7]
  517. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  518. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  519. elseif Thing[2]=="Blood" then
  520. Mesh=Thing[7]
  521. Thing[1].CFrame=Thing[1].CFrame*cf(0,.5,0)
  522. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  523. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  524. elseif Thing[2]=="Elec" then
  525. Mesh=Thing[1].Mesh
  526. Mesh.Scale=Mesh.Scale+vt(Thing[7],Thing[8],Thing[9])
  527. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  528. elseif Thing[2]=="Disappear" then
  529. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  530. end
  531. else
  532. Part.Parent=nil
  533. table.remove(Effects,e)
  534. end
  535. end
  536. end
  537. --end
  538. end
  539. end
  540. end
  541. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement