dicksoutforharambae

Untitled

Jul 29th, 2017
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 38.67 KB | None | 0 0
  1.  
  2. plr=game.Players.LocalPlayer
  3. uis=game:GetService("UserInputService")
  4. repeat wait() until plr.Character
  5. char=plr.Character
  6. torso=char:WaitForChild"Torso"
  7. humanoid=char:WaitForChild"Humanoid"
  8. tool=Instance.new("HopperBin",plr.Backpack)
  9. tool.Name="Yunopack"
  10.  
  11. Anim=nil
  12. attacking=false
  13. equipped=false
  14.  
  15. LS=torso["Left Shoulder"]
  16. LH=torso["Left Hip"]
  17. RS=torso["Right Shoulder"]
  18. RH=torso["Right Hip"]
  19. Neck=torso.Neck
  20. euler=CFrame.fromEulerAnglesXYZ
  21. angles=CFrame.Angles
  22. necko=CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  23. necko2=CFrame.new(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  24. LHC0=CFrame.new(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
  25. LHC1=CFrame.new(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
  26. RHC0=CFrame.new(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
  27. RHC1=CFrame.new(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
  28. RootPart=char.HumanoidRootPart
  29. RootJoint=RootPart.RootJoint
  30. RootCF=CFrame.Angles(-1.57,0,3.14)
  31. RSH, LSH=nil, nil
  32. RW, LW=Instance.new("Weld"), Instance.new("Weld")
  33. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  34. RSH=char.Torso["Right Shoulder"]
  35. LSH=char.Torso["Left Shoulder"]
  36. RSH.Parent=nil
  37. LSH.Parent=nil
  38. RW.Name="Right Shoulder"
  39. RW.Part0=char.Torso
  40. RW.C0=CFrame.new(1.5, 0.5, 0)
  41. RW.C1=CFrame.new(0, 0.5, 0)
  42. RW.Part1=char["Right Arm"]
  43. RW.Parent=char.Torso
  44. LW.Name="Left Shoulder"
  45. LW.Part0=char.Torso
  46. LW.C0=CFrame.new(-1.5, 0.5, 0)
  47. LW.C1=CFrame.new(0, 0.5, 0)
  48. LW.Part1=char["Left Arm"]
  49. LW.Parent=char.Torso
  50. Effects=Instance.new("Model",char)
  51. Effects.Name="Effects"
  52.  
  53. function NoOutline(Part)
  54. Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
  55. end
  56.  
  57. function newPart(parent,brickcolor,transparency,anchored,cancollide,size,name)
  58. local fp=Instance.new("Part")
  59. fp.Parent=parent
  60. fp.Transparency=transparency
  61. fp.Anchored=anchored
  62. fp.CanCollide=cancollide
  63. fp.Locked=true
  64. fp.BrickColor=BrickColor.new(brickcolor)
  65. fp.Name=name
  66. fp.Size=size
  67. fp.Position=torso.Position
  68. NoOutline(fp)
  69. fp.Material="SmoothPlastic"
  70. fp:BreakJoints()
  71. return fp
  72. end
  73.  
  74. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  75. local mesh=Instance.new(Mesh)
  76. mesh.Parent=part
  77. if Mesh=="SpecialMesh" then
  78. mesh.MeshType=meshtype
  79. if meshid then
  80. mesh.MeshId=meshid
  81. end
  82. end
  83. if offset then
  84. mesh.Offset=offset
  85. end
  86. mesh.Scale=scale
  87. return mesh
  88. end
  89.  
  90. function blockmesh(brickcolor,transparency,size,scale,anchored,cancollide)
  91. local p=newPart(Effects,brickcolor,transparency,anchored,cancollide,size,"BlockEffect")
  92. local m=mesh("BlockMesh",p,nil,nil,nil,scale)
  93. game.Debris:AddItem(p,5)
  94. return p,m
  95. end
  96.  
  97. function weld(parent,part0,part1,c0)
  98. local weld=Instance.new("Weld")
  99. weld.Parent=parent
  100. weld.Part0=part0
  101. weld.Part1=part1
  102. weld.C0=c0
  103. return weld
  104. end
  105.  
  106.  
  107. function newWing(name)
  108. local wing=Instance.new("Model",tool)
  109. wing.Name=name
  110. local stick=newPart(wing,"Really black",0,false,false,Vector3.new(0.2,0.2,0.2),"WingStick")
  111. local smesh=mesh("BlockMesh",stick,nil,nil,nil,Vector3.new(0.65, 1.1, 13.05))
  112. local neon1=newPart(wing,"Toothpaste",0,false,false,Vector3.new(0.2,0.2,0.2),"Block")
  113. local mesh1=mesh("BlockMesh",neon1,nil,nil,nil,Vector3.new(0.75, 0.8, 0.75))
  114. local neon2=newPart(wing,"Toothpaste",0.5,false,false,Vector3.new(0.2,0.2,0.2),"Block")
  115. local mesh2=mesh("BlockMesh",neon1,nil,nil,nil,Vector3.new(0.8, 0.9, 0.85))
  116. local hitbox=newPart(wing,"Really black",1,false,false,Vector3.new(0.6,0.6,3.1),"Hitbox")
  117.  
  118. neon1.Material="Neon"
  119. neon2.Material="Neon"
  120.  
  121. weld(stick,neon1,stick,CFrame.new(0,0,1.1))
  122. weld(stick,neon2,stick,CFrame.new(0,0,1.1))
  123. weld(stick,hitbox,stick,CFrame.new(0,0,.2))
  124.  
  125. return wing
  126. end
  127.  
  128. function newThrust(parent,name)
  129. local thrust=newPart(parent,"Really black",0,false,false,Vector3.new(0.2,0.2,0.2),name)
  130. mesh("CylinderMesh",thrust,nil,nil,nil,Vector3.new(0.85, 0.9, 1))
  131. local t1=newPart(parent,"Smoky grey",0,false,false,Vector3.new(0.2,0.2,0.2),"Cylinder")
  132. mesh("CylinderMesh",t1,nil,nil,nil,Vector3.new(1,1,1))
  133. local t2=newPart(parent,"Smoky grey",0,false,false,Vector3.new(0.2,0.2,0.2),"Cylinder")
  134. mesh("CylinderMesh",t2,nil,nil,nil,Vector3.new(1.4, 0.55, 1.15))
  135.  
  136. weld(thrust,t1,thrust,CFrame.new(0,-0.025,0))
  137. weld(thrust,t2,thrust,CFrame.new(0,-0.1,0))
  138.  
  139. return thrust
  140. end
  141.  
  142. function newMod(parent,name)
  143.  
  144.  
  145.  
  146. end
  147.  
  148. local weapon=Instance.new("Model",char)
  149. local base=newPart(weapon,"Really black",0,false,false,Vector3.new(0.38,1.65,0.56),"Base")
  150. mesh("BlockMesh",base,nil,nil,nil,Vector3.new(1,1,1))
  151. local bweld=Instance.new("Weld",char["Torso"])
  152. bweld.Part0=base
  153. bweld.Part1=char["Torso"]
  154. bweld.C0=CFrame.Angles(0,math.rad(90),0)*CFrame.new(0,-.2,-.7)
  155. local b1=newPart(weapon,"Smoky grey",0,false,false,Vector3.new(0.46, 1.71, 0.51),"Block")
  156. mesh("BlockMesh",b1,nil,nil,nil,Vector3.new(1,1,1))
  157. weld(base,b1,base,CFrame.new(0,0,-0.45)*CFrame.Angles(0,0,0))
  158. local b2=newPart(weapon,"Smoky grey",0,false,false,Vector3.new(0.46, 1.71, 0.51),"Block")
  159. mesh("BlockMesh",b2,nil,nil,nil,Vector3.new(1,1,1))
  160. weld(base,b2,base,CFrame.new(0,0,0.45)*CFrame.Angles(0,0,0))
  161.  
  162. b3=newPart(weapon,"Smoky grey",0,false,false,Vector3.new(0.46, 0.75, 0.24),"Block")
  163. mesh("BlockMesh",b1,nil,nil,nil,Vector3.new(1,1,1))
  164. weld(base,b3,base,CFrame.new(0,-0.48,0)*CFrame.Angles(0,0,0))
  165. b4=newPart(weapon,"Smoky grey",0,false,false,Vector3.new(0.2, 0.2, 0.2),"Block")
  166. mesh("BlockMesh",b4,nil,nil,nil,Vector3.new(2.3, 0.65, 0.5))
  167. weld(b3,b4,b3,CFrame.new(0,-.31,0.15)*CFrame.Angles(0,0,0))
  168. b5=newPart(weapon,"Smoky grey",0,false,false,Vector3.new(0.2, 0.2, 0.2),"Block")
  169. mesh("BlockMesh",b5,nil,nil,nil,Vector3.new(2.3, 0.65, 0.5))
  170. weld(b3,b5,b3,CFrame.new(0,-.31,-0.15)*CFrame.Angles(0,0,0))
  171.  
  172. b6=newPart(weapon,"Smoky grey",0,false,false,Vector3.new(0.2, 0.2, 0.2),"Wedge")
  173. mesh("SpecialMesh",b6,"Wedge",nil,nil,Vector3.new(2.3, 0.3, 2))
  174. weld(b4,b6,b4,CFrame.new(0,0,.26)*CFrame.Angles(math.rad(90),math.rad(0),math.rad(0)))
  175. b7=newPart(weapon,"Smoky grey",0,false,false,Vector3.new(0.2, 0.2, 0.2),"Wedge")
  176. mesh("SpecialMesh",b7,"Wedge",nil,nil,Vector3.new(2.3, 0.3, 2))
  177. weld(b5,b7,b5,CFrame.new(0,0,.26)*CFrame.Angles(math.rad(90),math.rad(180),math.rad(0)))
  178.  
  179. local wing1=newWing("Wing1")
  180. local wing2=newWing("Wing2")
  181. local wing3=newWing("Wing3")
  182. local wing4=newWing("Wing4")
  183. local wing5=newWing("Wing5")
  184. local wing6=newWing("Wing6")
  185.  
  186. local stick1=wing1.WingStick
  187. local stick2=wing2.WingStick
  188. local stick3=wing3.WingStick
  189. local stick4=wing4.WingStick
  190. local stick5=wing5.WingStick
  191. local stick6=wing6.WingStick
  192. local thrust1=newThrust(weapon,"Thrust1")
  193. local thrust2=newThrust(weapon,"Thrust2")
  194. local thrust3=newThrust(weapon,"Thrust3")
  195. local thrust4=newThrust(weapon,"Thrust4")
  196.  
  197. weld(base,thrust1,base,CFrame.new(-.1,1,-0.45))
  198. weld(base,thrust2,base,CFrame.new(.1,1,-0.45))
  199. weld(base,thrust3,base,CFrame.new(-.1,1,0.45))
  200. weld(base,thrust4,base,CFrame.new(.1,1,0.45))
  201.  
  202. local whit1=wing1.Hitbox
  203. local whit2=wing2.Hitbox
  204. local whit3=wing3.Hitbox
  205. local whit4=wing4.Hitbox
  206. local whit5=wing5.Hitbox
  207. local whit6=wing6.Hitbox
  208.  
  209. local wings={wing1,wing2,wing3,wing4,wing5,wing6}
  210. local neonbricks={}
  211. for _,v in pairs(weapon:GetChildren()) do
  212. if v:IsA"BasePart" then
  213. if v.BrickColor==BrickColor.new("Toothpaste") then
  214. table.insert(neonbricks,v)
  215. end
  216. end
  217. end
  218. for _,v in pairs(wing1:GetChildren()) do if v.Name=="Block" then table.insert(neonbricks,v) end end
  219. for _,v in pairs(wing2:GetChildren()) do if v.Name=="Block" then table.insert(neonbricks,v) end end
  220. for _,v in pairs(wing3:GetChildren()) do if v.Name=="Block" then table.insert(neonbricks,v) end end
  221. for _,v in pairs(wing4:GetChildren()) do if v.Name=="Block" then table.insert(neonbricks,v) end end
  222. for _,v in pairs(wing5:GetChildren()) do if v.Name=="Block" then table.insert(neonbricks,v) end end
  223. for _,v in pairs(wing6:GetChildren()) do if v.Name=="Block" then table.insert(neonbricks,v) end end
  224.  
  225. repeat wait() until char:WaitForChild"Body Colors"
  226. for _,v in pairs(neonbricks) do
  227. v.BrickColor=BrickColor.new("Cocoa")
  228. end
  229.  
  230. local bweld=Instance.new("Weld",char["Torso"])
  231. bweld.Part0=base
  232. bweld.Part1=char["Torso"]
  233. bweld.C0=CFrame.Angles(0,math.rad(90),0)*CFrame.new(0,-.2,-.7)
  234.  
  235. local w1weld=Instance.new("Weld",char["Torso"])
  236. w1weld.Part0=stick1
  237. w1weld.Part1=char["Torso"]
  238. w1weld.C0=CFrame.Angles(0,math.rad(-90),math.rad(25))*CFrame.new(2.4,-.2-1.2,-.7)
  239.  
  240. local w2weld=Instance.new("Weld",char["Torso"])
  241. w2weld.Part0=stick2
  242. w2weld.Part1=char["Torso"]
  243. w2weld.C0=CFrame.Angles(0,math.rad(90),math.rad(-25))*CFrame.new(-2.4,-.2-1.2,-.7)
  244.  
  245. local w3weld=Instance.new("Weld",char["Torso"])
  246. w3weld.Part0=stick3
  247. w3weld.Part1=char["Torso"]
  248. w3weld.C0=CFrame.Angles(0,math.rad(-90),0)*CFrame.new(2.5,-.2,-.7)
  249.  
  250. local w4weld=Instance.new("Weld",char["Torso"])
  251. w4weld.Part0=stick4
  252. w4weld.Part1=char["Torso"]
  253. w4weld.C0=CFrame.Angles(0,math.rad(90),0)*CFrame.new(-2.5,-.2,-.7)
  254.  
  255. local w5weld=Instance.new("Weld",char["Torso"])
  256. w5weld.Part0=stick5
  257. w5weld.Part1=char["Torso"]
  258. w5weld.C0=CFrame.Angles(0,math.rad(-90),math.rad(-25))*CFrame.new(2.4,-.2+1.2,-.7)
  259.  
  260. local w6weld=Instance.new("Weld",char["Torso"])
  261. w6weld.Part0=stick6
  262. w6weld.Part1=char["Torso"]
  263. w6weld.C0=CFrame.Angles(0,math.rad(90),math.rad(25))*CFrame.new(-2.4,-.2+1.2,-.7)
  264.  
  265. local anglemult=20
  266. w1c0=CFrame.Angles(0,math.rad(-90),math.rad(anglemult))*CFrame.new(2.4,-.2-1.2,-.7)
  267. w2c0=CFrame.Angles(0,math.rad(90),math.rad(-anglemult))*CFrame.new(-2.4,-.2-1.2,-.7)
  268. w3c0=CFrame.Angles(0,math.rad(-90),0)*CFrame.new(2.5,-.2,-.7)
  269. w4c0=CFrame.Angles(0,math.rad(90),0)*CFrame.new(-2.5,-.2,-.7)
  270. w5c0=CFrame.Angles(0,math.rad(-90),math.rad(-anglemult))*CFrame.new(2.4,-.2+1.2,-.7)
  271. w6c0=CFrame.Angles(0,math.rad(90),math.rad(anglemult))*CFrame.new(-2.4,-.2+1.2,-.7)
  272.  
  273. dw1c0=CFrame.Angles(0,math.rad(-90),math.rad(0))*CFrame.new(2.4,-.2-1.2,-.7)
  274. dw2c0=CFrame.Angles(0,math.rad(90),math.rad(-0))*CFrame.new(-2.4,-.2-1.2,-.7)
  275. dw3c0=CFrame.Angles(0,math.rad(-90),0)*CFrame.new(2.5,-.2,-.7)
  276. dw4c0=CFrame.Angles(0,math.rad(90),0)*CFrame.new(-2.5,-.2,-.7)
  277. dw5c0=CFrame.Angles(0,math.rad(-90),math.rad(-0))*CFrame.new(2.4,-.2+1.2,-.7)
  278. dw6c0=CFrame.Angles(0,math.rad(90),math.rad(0))*CFrame.new(-2.4,-.2+1.2,-.7)
  279.  
  280. weapon.Parent=char
  281. for _,v in pairs(wings) do
  282. v.Parent=char
  283. end
  284.  
  285. function clerp(a,b,t)
  286. local qa = {QuaternionFromCFrame(a)}
  287. local qb = {QuaternionFromCFrame(b)}
  288. local ax, ay, az = a.x, a.y, a.z
  289. local bx, by, bz = b.x, b.y, b.z
  290. local _t = 1-t
  291. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  292. end
  293.  
  294. function QuaternionFromCFrame(cf)
  295. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  296. local trace = m00 + m11 + m22
  297. if trace > 0 then
  298. local s = math.sqrt(1 + trace)
  299. local recip = 0.5/s
  300. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  301. else
  302. local i = 0
  303. if m11 > m00 then
  304. i = 1
  305. end
  306. if m22 > (i == 0 and m00 or m11) then
  307. i = 2
  308. end
  309. if i == 0 then
  310. local s = math.sqrt(m00-m11-m22+1)
  311. local recip = 0.5/s
  312. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  313. elseif i == 1 then
  314. local s = math.sqrt(m11-m22-m00+1)
  315. local recip = 0.5/s
  316. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  317. elseif i == 2 then
  318. local s = math.sqrt(m22-m00-m11+1)
  319. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  320. end
  321. end
  322. end
  323.  
  324. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  325. local xs, ys, zs = x + x, y + y, z + z
  326. local wx, wy, wz = w*xs, w*ys, w*zs
  327. local xx = x*xs
  328. local xy = x*ys
  329. local xz = x*zs
  330. local yy = y*ys
  331. local yz = y*zs
  332. local zz = z*zs
  333. 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))
  334. end
  335.  
  336. function QuaternionSlerp(a, b, t)
  337. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  338. local startInterp, finishInterp;
  339. if cosTheta >= 0.0001 then
  340. if (1 - cosTheta) > 0.0001 then
  341. local theta = math.acos(cosTheta)
  342. local invSinTheta = 1/math.sin(theta)
  343. startInterp = math.sin((1-t)*theta)*invSinTheta
  344. finishInterp = math.sin(t*theta)*invSinTheta
  345. else
  346. startInterp = 1-t
  347. finishInterp = t
  348. end
  349. else
  350. if (1+cosTheta) > 0.0001 then
  351. local theta = math.acos(-cosTheta)
  352. local invSinTheta = 1/math.sin(theta)
  353. startInterp = math.sin((t-1)*theta)*invSinTheta
  354. finishInterp = math.sin(t*theta)*invSinTheta
  355. else
  356. startInterp = t-1
  357. finishInterp = t
  358. end
  359. end
  360. 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
  361. end
  362.  
  363. randomangles=function(m)
  364. local rangle=math.rad((math.random()-0.5)*180)
  365. if m then
  366. if m=="raw" then
  367. return rangle
  368. else
  369. return CFrame.new(rangle,rangle,rangle)
  370. end
  371. end
  372. end
  373.  
  374. function rayCast(Pos, Dir, Max, Ignore)
  375. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  376. end
  377.  
  378. function thread(f)
  379. coroutine.resume(coroutine.create(f))
  380. end
  381.  
  382. function swait(num)
  383. if num==0 or num==nil then
  384. game:service'RunService'.Stepped:wait(0)
  385. else
  386. for i=0,num do
  387. game:service'RunService'.Stepped:wait(0)
  388. end
  389. end
  390. end
  391.  
  392. function attack1()
  393. for i=0,1,0.05 do swait()
  394. Neck.C0=clerp(Neck.C0,necko*CFrame.Angles(math.rad(5),0,math.rad(90)),.2)
  395. RootJoint.C0=clerp(RootJoint.C0,RootCF*CFrame.Angles(0.1,0,-math.rad(90)),.2)
  396. RW.C0=clerp(RW.C0,CFrame.new(1.5,0.5,0)*CFrame.Angles(math.rad(10),math.rad(80),math.rad(80)),.2)
  397. RW.C1=clerp(LW.C1,CFrame.new(0,0.5,0)*CFrame.Angles(0,0,0),.2)
  398. LW.C0=clerp(LW.C0,CFrame.new(-1.2,0.5,-.4)*CFrame.Angles(math.rad(0),math.rad(40),math.rad(95)),.2)
  399. LW.C1=clerp(LW.C1,CFrame.new(0,0.5,0)*CFrame.Angles(0,0,0),.2)
  400. RH.C0=clerp(RH.C0,CFrame.new(1,-1,0)*CFrame.Angles(0,math.rad(90),0)*CFrame.Angles(0,math.rad(35),0),.2)
  401. LH.C0=clerp(LH.C0,CFrame.new(-1,-1,0)*CFrame.Angles(0,-math.rad(90),0)*CFrame.Angles(0,math.rad(30),0),.2)
  402. w1weld.C0=clerp(w1weld.C0,w1c0*CFrame.Angles(math.rad(45),0,math.rad(0)),.2)
  403. w2weld.C0=clerp(w2weld.C0,w2c0*CFrame.new(-2,0,0)*CFrame.Angles(0,0,math.rad(-15))*CFrame.Angles(0,math.rad(-45),0),.2)
  404. w3weld.C0=clerp(w3weld.C0,w3c0*CFrame.Angles(math.rad(45),0,math.rad(0)),.2)
  405. w4weld.C0=clerp(w4weld.C0,w4c0*CFrame.new(-2,0,0)*CFrame.Angles(0,0,math.rad(-15))*CFrame.Angles(0,math.rad(-45),0),.2)
  406. w5weld.C0=clerp(w5weld.C0,w5c0*CFrame.Angles(math.rad(45),0,math.rad(0)),.2)
  407. w6weld.C0=clerp(w6weld.C0,w6c0*CFrame.new(-2,0,0)*CFrame.Angles(0,0,math.rad(-15))*CFrame.Angles(0,math.rad(-45),0),.2)
  408. end
  409.  
  410. local hitboxTouch1=whit2.Touched:connect(function(hit)
  411. if hit.Parent:findFirstChild"Humanoid" and hit.Parent:findFirstChild"Humanoid"~=humanoid then
  412. if hit.Parent:findFirstChild("Ypack_Attack1.1"..plr.Name) then return end
  413. local vhum=hit.Parent.Humanoid
  414. local vtors=hit.Parent:findFirstChild"Torso" if not vtors then return end
  415.  
  416. local str=Instance.new("StringValue",hit.Parent)
  417. str.Name="Ypack_Attack1.1"..plr.Name
  418. game.Debris:AddItem(str,1)
  419.  
  420. vhum.Health=vhum.Health-5
  421.  
  422. end
  423. end)
  424.  
  425. local hitboxTouch2=whit4.Touched:connect(function(hit)
  426. if hit.Parent:findFirstChild"Humanoid" and hit.Parent:findFirstChild"Humanoid"~=humanoid then
  427. if hit.Parent:findFirstChild("Ypack_Attack1.2"..plr.Name) then return end
  428. local vhum=hit.Parent.Humanoid
  429. local vtors=hit.Parent:findFirstChild"Torso" if not vtors then return end
  430.  
  431. local str=Instance.new("StringValue",hit.Parent)
  432. str.Name="Ypack_Attack1.2"..plr.Name
  433. game.Debris:AddItem(str,1)
  434.  
  435. vhum.Health=vhum.Health-5
  436.  
  437. end
  438. end)
  439.  
  440. local hitboxTouch3=whit6.Touched:connect(function(hit)
  441. if hit.Parent:findFirstChild"Humanoid" and hit.Parent:findFirstChild"Humanoid"~=humanoid then
  442. if hit.Parent:findFirstChild("Ypack_Attack1.3"..plr.Name) then return end
  443. local vhum=hit.Parent.Humanoid
  444. local vtors=hit.Parent:findFirstChild"Torso" if not vtors then return end
  445.  
  446. local str=Instance.new("StringValue",hit.Parent)
  447. str.Name="Ypack_Attack1.3"..plr.Name
  448. game.Debris:AddItem(str,1)
  449.  
  450. vhum.Health=vhum.Health-5
  451.  
  452. end
  453. end)
  454.  
  455. for i=0,1.1,0.05 do swait()
  456. Neck.C0=clerp(Neck.C0,necko*CFrame.Angles(math.rad(5),0,-math.rad(90)),.2)
  457. RootJoint.C0=clerp(RootJoint.C0,RootCF*CFrame.Angles(0.1,0,math.rad(90)),.2)
  458. RW.C0=clerp(RW.C0,CFrame.new(1.5,0.5,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(90)),.2)
  459. RW.C1=clerp(LW.C1,CFrame.new(0,0.5,0)*CFrame.Angles(0,0,0),.2)
  460. LW.C0=clerp(LW.C0,CFrame.new(-1.2,0.5,-.4)*CFrame.Angles(math.rad(0),math.rad(40),math.rad(95)),.2)
  461. LW.C1=clerp(LW.C1,CFrame.new(0,0.5,0)*CFrame.Angles(0,0,0),.2)
  462. RH.C0=clerp(RH.C0,CFrame.new(1,-1,0)*CFrame.Angles(0,math.rad(90),0)*CFrame.Angles(0,math.rad(-35),0),.2)
  463. LH.C0=clerp(LH.C0,CFrame.new(-1,-1,0)*CFrame.Angles(0,-math.rad(90),0)*CFrame.Angles(0,math.rad(-30),0),.2)
  464. if i>0.1 then
  465. w1weld.C0=clerp(w1weld.C0,w1c0*CFrame.Angles(0,0,math.rad(0)),.2)
  466. w2weld.C0=clerp(w2weld.C0,w2c0*CFrame.new(-2,0,0)*CFrame.Angles(math.rad(45),math.rad(-5),math.rad(-15)),.2)
  467. w3weld.C0=clerp(w3weld.C0,w3c0*CFrame.Angles(0,0,math.rad(0)),.2)
  468. w4weld.C0=clerp(w4weld.C0,w4c0*CFrame.new(-2.5,0,0)*CFrame.Angles(math.rad(0),math.rad(-15),math.rad(-15)),.2)
  469. w5weld.C0=clerp(w5weld.C0,w5c0*CFrame.Angles(0,0,math.rad(0)),.2)
  470. w6weld.C0=clerp(w6weld.C0,w6c0*CFrame.new(-2,0,0)*CFrame.Angles(math.rad(-45),math.rad(-5),math.rad(-15)),.2)
  471. end
  472. end
  473.  
  474. wait(0.1)
  475.  
  476. hitboxTouch1:Disconnect()
  477. hitboxTouch2:Disconnect()
  478. hitboxTouch3:Disconnect()
  479.  
  480. attacking=false
  481. end
  482.  
  483. function attack2()
  484. for i=0,1,0.05 do swait()
  485. Neck.C0=clerp(Neck.C0,necko*CFrame.Angles(math.rad(5),0,-math.rad(90)),.2)
  486. RootJoint.C0=clerp(RootJoint.C0,RootCF*CFrame.Angles(0.1,0,math.rad(90)),.2)
  487. RW.C0=clerp(RW.C0,CFrame.new(1.5,0.5,0)*CFrame.Angles(math.rad(10),math.rad(80),math.rad(80)),.2)
  488. RW.C1=clerp(LW.C1,CFrame.new(0,0.5,0)*CFrame.Angles(0,0,0),.2)
  489. LW.C0=clerp(LW.C0,CFrame.new(-1.2,0.5,-.4)*CFrame.Angles(math.rad(0),math.rad(40),math.rad(95)),.2)
  490. LW.C1=clerp(LW.C1,CFrame.new(0,0.5,0)*CFrame.Angles(0,0,0),.2)
  491. RH.C0=clerp(RH.C0,CFrame.new(1,-1,0)*CFrame.Angles(0,math.rad(90),0)*CFrame.Angles(0,math.rad(-35),0),.2)
  492. LH.C0=clerp(LH.C0,CFrame.new(-1,-1,0)*CFrame.Angles(0,-math.rad(90),0)*CFrame.Angles(0,math.rad(-30),0),.2)
  493. w1weld.C0=clerp(w1weld.C0,w3c0*CFrame.new(1,-0.6,0)*CFrame.Angles(0,0,math.rad(0)),.2)
  494. w2weld.C0=clerp(w2weld.C0,w2c0,.2)
  495. w3weld.C0=clerp(w3weld.C0,w3c0*CFrame.new(1,0,0)*CFrame.Angles(0,0,math.rad(0)),.2)
  496. w4weld.C0=clerp(w4weld.C0,w4c0,.2)
  497. w5weld.C0=clerp(w5weld.C0,w3c0*CFrame.new(1,0.6,0)*CFrame.Angles(0,0,math.rad(0)),.2)
  498. w6weld.C0=clerp(w6weld.C0,w6c0,.2)
  499. end
  500.  
  501. local hitboxTouch1=whit1.Touched:connect(function(hit)
  502. if hit.Parent:findFirstChild"Humanoid" and hit.Parent:findFirstChild"Humanoid"~=humanoid then
  503. if hit.Parent:findFirstChild("Ypack_Attack2.1"..plr.Name) then return end
  504. local vhum=hit.Parent.Humanoid
  505. local vtors=hit.Parent:findFirstChild"Torso" if not vtors then return end
  506.  
  507. local str=Instance.new("StringValue",hit.Parent)
  508. str.Name="Ypack_Attack2.1"..plr.Name
  509. game.Debris:AddItem(str,1)
  510.  
  511. vhum.Health=vhum.Health-5
  512.  
  513. end
  514. end)
  515.  
  516. local hitboxTouch2=whit3.Touched:connect(function(hit)
  517. if hit.Parent:findFirstChild"Humanoid" and hit.Parent:findFirstChild"Humanoid"~=humanoid then
  518. if hit.Parent:findFirstChild("Ypack_Attack2.2"..plr.Name) then return end
  519. local vhum=hit.Parent.Humanoid
  520. local vtors=hit.Parent:findFirstChild"Torso" if not vtors then return end
  521.  
  522. local str=Instance.new("StringValue",hit.Parent)
  523. str.Name="Ypack_Attack2.2"..plr.Name
  524. game.Debris:AddItem(str,1)
  525.  
  526. vhum.Health=vhum.Health-5
  527.  
  528. end
  529. end)
  530.  
  531. local hitboxTouch3=whit5.Touched:connect(function(hit)
  532. if hit.Parent:findFirstChild"Humanoid" and hit.Parent:findFirstChild"Humanoid"~=humanoid then
  533. if hit.Parent:findFirstChild("Ypack_Attack3.3"..plr.Name) then return end
  534. local vhum=hit.Parent.Humanoid
  535. local vtors=hit.Parent:findFirstChild"Torso" if not vtors then return end
  536.  
  537. local str=Instance.new("StringValue",hit.Parent)
  538. str.Name="Ypack_Attack3.3"..plr.Name
  539. game.Debris:AddItem(str,1)
  540.  
  541. vhum.Health=vhum.Health-5
  542.  
  543. end
  544. end)
  545.  
  546.  
  547. for i=0,2,0.05 do swait()
  548. Neck.C0=clerp(Neck.C0,necko*CFrame.Angles(math.rad(5),0,math.rad(90)),.2)
  549. RootJoint.C0=clerp(RootJoint.C0,RootCF*CFrame.Angles(0,0,-math.rad(90)),.2)
  550. RW.C0=clerp(RW.C0,CFrame.new(1.5,0.5,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(90)),.2)
  551. RW.C1=clerp(LW.C1,CFrame.new(0,0.5,0)*CFrame.Angles(0,0,0),.2)
  552. LW.C0=clerp(LW.C0,CFrame.new(-1.5,0.5,0)*CFrame.Angles(math.rad(0),math.rad(180),math.rad(95)),.2)
  553. LW.C1=clerp(LW.C1,CFrame.new(0,0.5,0)*CFrame.Angles(0,0,0),.2)
  554. RH.C0=clerp(RH.C0,CFrame.new(1,-1,0)*CFrame.Angles(0,math.rad(90),0)*CFrame.Angles(0,math.rad(35),0),.2)
  555. LH.C0=clerp(LH.C0,CFrame.new(-1,-1,0)*CFrame.Angles(0,-math.rad(90),0)*CFrame.Angles(0,math.rad(30),0),.2)
  556. if i>0.7 then
  557. w1weld.C0=clerp(w1weld.C0,w3c0*CFrame.new(12,-0.6,0)*CFrame.Angles(0,0,math.rad(0)),.2)
  558. w2weld.C0=clerp(w2weld.C0,w2c0,.2)
  559. w3weld.C0=clerp(w3weld.C0,w3c0*CFrame.new(12,0,0)*CFrame.Angles(0,0,math.rad(0)),.2)
  560. w4weld.C0=clerp(w4weld.C0,w4c0,.2)
  561. w5weld.C0=clerp(w5weld.C0,w3c0*CFrame.new(12,0.6,0)*CFrame.Angles(0,0,math.rad(0)),.2)
  562. w6weld.C0=clerp(w6weld.C0,w6c0,.2)
  563. end
  564. end
  565.  
  566. wait(0)
  567.  
  568. hitboxTouch1:disconnect()
  569. hitboxTouch2:disconnect()
  570. hitboxTouch3:disconnect()
  571.  
  572. attacking=false
  573. end
  574.  
  575. function attack3()
  576. for i=0,1,0.05 do swait()
  577. Neck.C0=clerp(Neck.C0,necko*CFrame.Angles(math.rad(5),0,-math.rad(0)),.2)
  578. RootJoint.C0=clerp(RootJoint.C0,RootCF*CFrame.Angles(0.1,0,math.rad(0)),.2)
  579. RW.C0=clerp(RW.C0,CFrame.new(1.5,0.5,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(90)),.2)
  580. RW.C1=clerp(LW.C1,CFrame.new(0,0.5,0)*CFrame.Angles(0,0,0),.2)
  581. LW.C0=clerp(LW.C0,CFrame.new(-1.5,0.5,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(-90)),.2)
  582. LW.C1=clerp(LW.C1,CFrame.new(0,0.5,0)*CFrame.Angles(0,0,0),.2)
  583. RH.C0=clerp(RH.C0,CFrame.new(1,-1,0)*CFrame.Angles(0,math.rad(90),0)*CFrame.Angles(0,math.rad(0),0),.2)
  584. LH.C0=clerp(LH.C0,CFrame.new(-1,-1,0)*CFrame.Angles(0,-math.rad(90),0)*CFrame.Angles(0,math.rad(0),0),.2)
  585. w1weld.C0=clerp(w1weld.C0,w1c0*CFrame.new(2,0,0)*CFrame.Angles(0,0,math.rad(0))*CFrame.Angles(0,math.rad(0),0),.2)
  586. w2weld.C0=clerp(w2weld.C0,w2c0*CFrame.new(-2,0,0)*CFrame.Angles(0,0,math.rad(0))*CFrame.Angles(0,math.rad(-0),0),.2)
  587. w3weld.C0=clerp(w3weld.C0,w3c0*CFrame.new(2,0,0)*CFrame.Angles(0,0,math.rad(0))*CFrame.Angles(0,math.rad(0),0),.2)
  588. w4weld.C0=clerp(w4weld.C0,w4c0*CFrame.new(-2,0,0)*CFrame.Angles(0,0,math.rad(0))*CFrame.Angles(0,math.rad(-0),0),.2)
  589. w5weld.C0=clerp(w5weld.C0,w5c0*CFrame.new(2,0,0)*CFrame.Angles(0,0,math.rad(0))*CFrame.Angles(0,math.rad(0),0),.2)
  590. w6weld.C0=clerp(w6weld.C0,w6c0*CFrame.new(-2,0,0)*CFrame.Angles(0,0,math.rad(0))*CFrame.Angles(0,math.rad(-0),0),.2)
  591. end
  592.  
  593. for i=0,1,0.05 do swait()
  594. w1weld.C0=clerp(w1weld.C0,w1c0*CFrame.new(-1,0,3)*CFrame.Angles(0,0,math.rad(0))*CFrame.Angles(0,math.rad(0),0),.2)
  595. w2weld.C0=clerp(w2weld.C0,w2c0*CFrame.new(1,0,3)*CFrame.Angles(0,0,math.rad(0))*CFrame.Angles(0,math.rad(-0),0),.2)
  596. w3weld.C0=clerp(w3weld.C0,w3c0*CFrame.new(-1,0,3)*CFrame.Angles(0,0,math.rad(0))*CFrame.Angles(0,math.rad(0),0),.2)
  597. w4weld.C0=clerp(w4weld.C0,w4c0*CFrame.new(1,0,3)*CFrame.Angles(0,0,math.rad(0))*CFrame.Angles(0,math.rad(-0),0),.2)
  598. w5weld.C0=clerp(w5weld.C0,w5c0*CFrame.new(-1,0,3)*CFrame.Angles(0,0,math.rad(0))*CFrame.Angles(0,math.rad(0),0),.2)
  599. w6weld.C0=clerp(w6weld.C0,w6c0*CFrame.new(1,0,3)*CFrame.Angles(0,0,math.rad(0))*CFrame.Angles(0,math.rad(-0),0)*CFrame.Angles(0,math.rad(-0),0),.2)
  600. end
  601.  
  602. local hitboxTouch1=whit1.Touched:connect(function(hit)
  603. if hit.Parent:findFirstChild"Humanoid" and hit.Parent:findFirstChild"Humanoid"~=humanoid then
  604. if hit.Parent:findFirstChild("Ypack_Attack31.1"..plr.Name) then return end
  605. local vhum=hit.Parent.Humanoid
  606. local vtors=hit.Parent:findFirstChild"Torso" if not vtors then return end
  607.  
  608. local str=Instance.new("StringValue",hit.Parent)
  609. str.Name="Ypack_Attack31.1"..plr.Name
  610. game.Debris:AddItem(str,1)
  611.  
  612. vhum.Health=vhum.Health-5
  613.  
  614. end
  615. end)
  616.  
  617. local hitboxTouch2=whit3.Touched:connect(function(hit)
  618. if hit.Parent:findFirstChild"Humanoid" and hit.Parent:findFirstChild"Humanoid"~=humanoid then
  619. if hit.Parent:findFirstChild("Ypack_Attack31.2"..plr.Name) then return end
  620. local vhum=hit.Parent.Humanoid
  621. local vtors=hit.Parent:findFirstChild"Torso" if not vtors then return end
  622.  
  623. local str=Instance.new("StringValue",hit.Parent)
  624. str.Name="Ypack_Attack31.2"..plr.Name
  625. game.Debris:AddItem(str,1)
  626.  
  627. vhum.Health=vhum.Health-5
  628.  
  629. end
  630. end)
  631.  
  632. local hitboxTouch3=whit5.Touched:connect(function(hit)
  633. if hit.Parent:findFirstChild"Humanoid" and hit.Parent:findFirstChild"Humanoid"~=humanoid then
  634. if hit.Parent:findFirstChild("Ypack_Attack31.3"..plr.Name) then return end
  635. local vhum=hit.Parent.Humanoid
  636. local vtors=hit.Parent:findFirstChild"Torso" if not vtors then return end
  637.  
  638. local str=Instance.new("StringValue",hit.Parent)
  639. str.Name="Ypack_Attack31.3"..plr.Name
  640. game.Debris:AddItem(str,1)
  641.  
  642. vhum.Health=vhum.Health-5
  643.  
  644. end
  645. end)
  646.  
  647. local hitboxTouch4=whit2.Touched:connect(function(hit)
  648. if hit.Parent:findFirstChild"Humanoid" and hit.Parent:findFirstChild"Humanoid"~=humanoid then
  649. if hit.Parent:findFirstChild("Ypack_Attack3.1"..plr.Name) then return end
  650. local vhum=hit.Parent.Humanoid
  651. local vtors=hit.Parent:findFirstChild"Torso" if not vtors then return end
  652.  
  653. local str=Instance.new("StringValue",hit.Parent)
  654. str.Name="Ypack_Attack3.1"..plr.Name
  655. game.Debris:AddItem(str,1)
  656.  
  657. vhum.Health=vhum.Health-5
  658.  
  659. end
  660. end)
  661.  
  662. local hitboxTouch5=whit4.Touched:connect(function(hit)
  663. if hit.Parent:findFirstChild"Humanoid" and hit.Parent:findFirstChild"Humanoid"~=humanoid then
  664. if hit.Parent:findFirstChild("Ypack_Attack3.2"..plr.Name) then return end
  665. local vhum=hit.Parent.Humanoid
  666. local vtors=hit.Parent:findFirstChild"Torso" if not vtors then return end
  667.  
  668. local str=Instance.new("StringValue",hit.Parent)
  669. str.Name="Ypack_Attack3.2"..plr.Name
  670. game.Debris:AddItem(str,1)
  671.  
  672. vhum.Health=vhum.Health-5
  673.  
  674. end
  675. end)
  676.  
  677. local hitboxTouch6=whit6.Touched:connect(function(hit)
  678. if hit.Parent:findFirstChild"Humanoid" and hit.Parent:findFirstChild"Humanoid"~=humanoid then
  679. if hit.Parent:findFirstChild("Ypack_Attack3.3"..plr.Name) then return end
  680. local vhum=hit.Parent.Humanoid
  681. local vtors=hit.Parent:findFirstChild"Torso" if not vtors then return end
  682.  
  683. local str=Instance.new("StringValue",hit.Parent)
  684. str.Name="Ypack_Attack3.3"..plr.Name
  685. game.Debris:AddItem(str,1)
  686.  
  687. vhum.Health=vhum.Health-5
  688.  
  689. end
  690. end)
  691.  
  692. for i=0,1,0.05 do swait()
  693. Neck.C0=clerp(Neck.C0,necko*CFrame.Angles(math.rad(5),0,math.rad(0)),.2)
  694. RootJoint.C0=clerp(RootJoint.C0,RootCF*CFrame.Angles(0.1,0,-math.rad(0)),.2)
  695. RW.C0=clerp(RW.C0,CFrame.new(1.2,0.5,-.4)*CFrame.Angles(math.rad(10),math.rad(80),math.rad(80)),.2)
  696. RW.C1=clerp(LW.C1,CFrame.new(0,0.5,0)*CFrame.Angles(0,0,0),.2)
  697. LW.C0=clerp(LW.C0,CFrame.new(-1.2,0.5,-.4)*CFrame.Angles(math.rad(10),math.rad(-80),math.rad(-80)),.2)
  698. LW.C1=clerp(LW.C1,CFrame.new(0,0.5,0)*CFrame.Angles(0,0,0),.2)
  699. RH.C0=clerp(RH.C0,CFrame.new(1,-1,0)*CFrame.Angles(0,math.rad(90),0)*CFrame.Angles(0,math.rad(-0),0),.2)
  700. LH.C0=clerp(LH.C0,CFrame.new(-1,-1,0)*CFrame.Angles(0,-math.rad(90),0)*CFrame.Angles(0,math.rad(-0),0),.2)
  701. w1weld.C0=clerp(w1weld.C0,w1c0*CFrame.new(-1,0,17)*CFrame.Angles(0,0,math.rad(0))*CFrame.Angles(0,math.rad(0),0),.2)
  702. w2weld.C0=clerp(w2weld.C0,w2c0*CFrame.new(1,0,17)*CFrame.Angles(0,0,math.rad(0))*CFrame.Angles(0,math.rad(-0),0),.2)
  703. w3weld.C0=clerp(w3weld.C0,w3c0*CFrame.new(-1,0,17)*CFrame.Angles(0,0,math.rad(0))*CFrame.Angles(0,math.rad(0),0),.2)
  704. w4weld.C0=clerp(w4weld.C0,w4c0*CFrame.new(1,0,17)*CFrame.Angles(0,0,math.rad(0))*CFrame.Angles(0,math.rad(-0),0),.2)
  705. w5weld.C0=clerp(w5weld.C0,w5c0*CFrame.new(-1,0,17)*CFrame.Angles(0,0,math.rad(0))*CFrame.Angles(0,math.rad(0),0),.2)
  706. w6weld.C0=clerp(w6weld.C0,w6c0*CFrame.new(1,0,17)*CFrame.Angles(0,0,math.rad(0))*CFrame.Angles(0,math.rad(-0),0)*CFrame.Angles(0,math.rad(-0),0),.2)
  707. end
  708.  
  709. wait(0.2)
  710. hitboxTouch1:Disconnect()
  711. hitboxTouch2:Disconnect()
  712. hitboxTouch3:Disconnect()
  713. hitboxTouch4:Disconnect()
  714. hitboxTouch5:Disconnect()
  715. hitboxTouch6:Disconnect()
  716.  
  717. attacking=false
  718. end
  719.  
  720. function dequip()
  721. attacking=true
  722. for i=0,2,0.05 do
  723. swait()
  724. Neck.C0=clerp(Neck.C0,necko*euler(0,0,0),.2)
  725. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.2)
  726. RW.C0=clerp(RW.C0,CFrame.new(1.5,0.5,0)*euler(0,0,0),.2)
  727. RW.C1=clerp(LW.C1,CFrame.new(0,0.5,0)*euler(0,0,0),.2)
  728. LW.C0=clerp(LW.C0,CFrame.new(-1.5,0.5,0)*euler(0,0,0),.2)
  729. LW.C1=clerp(LW.C1,CFrame.new(0,0.5,0)*euler(0,0,0),.2)
  730. RH.C0=clerp(RH.C0,RHC0,.4)
  731. RH.C1=clerp(RH.C1,RHC1,.4)
  732. LH.C0=clerp(LH.C0,LHC0,.4)
  733. LH.C1=clerp(LH.C1,LHC1,.4)
  734.  
  735. w1weld.C0=clerp(w1weld.C0,dw3c0*CFrame.new(0,-.7,0),.12)
  736. w2weld.C0=clerp(w2weld.C0,dw4c0*CFrame.new(0,-.7,0),.12)
  737. w3weld.C0=clerp(w3weld.C0,dw3c0*CFrame.new(0,-.7,0),.12)
  738. w4weld.C0=clerp(w4weld.C0,dw4c0*CFrame.new(0,-.7,0),.12)
  739. w5weld.C0=clerp(w5weld.C0,dw3c0*CFrame.new(0,-.7,0),.12)
  740. w6weld.C0=clerp(w6weld.C0,dw4c0*CFrame.new(0,-.7,0),.12)
  741.  
  742. end
  743. for i=0,2,0.05 do swait()
  744. w1weld.C0=clerp(w1weld.C0,dw3c0*CFrame.new(-.7,-.7,0),.12)
  745. w2weld.C0=clerp(w2weld.C0,dw4c0*CFrame.new(.7,-.7,0),.12)
  746. w3weld.C0=clerp(w3weld.C0,dw3c0*CFrame.new(-.7,-.7,0),.12)
  747. w4weld.C0=clerp(w4weld.C0,dw4c0*CFrame.new(.7,-.7,0),.12)
  748. w5weld.C0=clerp(w5weld.C0,dw3c0*CFrame.new(-.7,-.7,0),.12)
  749. w6weld.C0=clerp(w6weld.C0,dw4c0*CFrame.new(.7,-.7,0),.12)
  750. end
  751. attacking=false
  752. equipped=false
  753. end
  754.  
  755. function equip()
  756. attacking=true
  757. for i=0,2,0.05 do
  758. swait()
  759. Neck.C0=clerp(Neck.C0,necko*euler(0,0,0),.2)
  760. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.2)
  761. RW.C0=clerp(RW.C0,CFrame.new(1.5,0.5,0)*euler(0,0,0),.2)
  762. RW.C1=clerp(LW.C1,CFrame.new(0,0.5,0)*euler(0,0,0),.2)
  763. LW.C0=clerp(LW.C0,CFrame.new(-1.5,0.5,0)*euler(0,0,0),.2)
  764. LW.C1=clerp(LW.C1,CFrame.new(0,0.5,0)*euler(0,0,0),.2)
  765. RH.C0=clerp(RH.C0,RHC0,.4)
  766. RH.C1=clerp(RH.C1,RHC1,.4)
  767. LH.C0=clerp(LH.C0,LHC0,.4)
  768. LH.C1=clerp(LH.C1,LHC1,.4)
  769.  
  770. w1weld.C0=clerp(w1weld.C0,dw3c0*CFrame.new(0,-.7,0),.12)
  771. w2weld.C0=clerp(w2weld.C0,dw4c0*CFrame.new(0,-.7,0),.12)
  772. w3weld.C0=clerp(w3weld.C0,dw3c0*CFrame.new(0,-.7,0),.12)
  773. w4weld.C0=clerp(w4weld.C0,dw4c0*CFrame.new(0,-.7,0),.12)
  774. w5weld.C0=clerp(w5weld.C0,dw3c0*CFrame.new(0,-.7,0),.12)
  775. w6weld.C0=clerp(w6weld.C0,dw4c0*CFrame.new(0,-.7,0),.12)
  776.  
  777. end
  778. equipped=true
  779. attacking=false
  780. end
  781.  
  782. dequip()
  783.  
  784. toolequipped=function()
  785. if tool.Active==true then
  786. return true
  787. else
  788. return false
  789. end
  790. end
  791.  
  792. equipbutton=uis.InputBegan:connect(function(key,global)
  793. if toolequipped()==false then return end
  794. if key.KeyCode==Enum.KeyCode.F then
  795. if equipped==true then
  796. if attacking==true then return end
  797. dequip()
  798. else
  799. if attacking==true then return end
  800. equip()
  801. end
  802. end
  803. end)
  804.  
  805. counter=1
  806. function keyDown(key,global)
  807. if global then return end
  808. if attacking then return end
  809. if not equipped then return end
  810.  
  811. if key.UserInputType==Enum.UserInputType.MouseButton1 then
  812. attacking=true
  813.  
  814. if counter==1 then
  815. attack1()
  816. end
  817.  
  818. if counter==2 then
  819. attack2()
  820. end
  821.  
  822. if counter==3 then
  823. attack3()
  824. end
  825.  
  826. counter=counter+1
  827. if counter>3 then counter=1 end
  828. end
  829.  
  830. end
  831. uis.InputBegan:connect(keyDown)
  832.  
  833.  
  834.  
  835. thread(function()
  836. local sinecount=0
  837. local normcount=0
  838. while true do swait()
  839.  
  840. sinecount=sinecount+1
  841. normcount=normcount+1
  842. local sinewave=math.sin(sinecount/75)*0.2
  843.  
  844. if equipped==true then
  845. if attacking==false then
  846. local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
  847. local hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,char)
  848.  
  849. if RootPart.Velocity.y > 1 and hitfloor==nil then
  850. Anim="Jump"
  851. sinewave=0
  852. Neck.C0=clerp(Neck.C0,necko*CFrame.Angles(math.rad(-15),0,math.rad(0)),.1)
  853. LW.C0=clerp(LW.C0,CFrame.new(-1.5,0.5,0)*CFrame.Angles(-math.rad(17),0,-math.rad(12)),.2)
  854. LW.C1=clerp(LW.C1,CFrame.new(0,0.5,0)*CFrame.Angles(0,0,0),.2)
  855. RW.C0=clerp(RW.C0,CFrame.new(1.5,0.5,0)*CFrame.Angles(-math.rad(17),0,math.rad(12)),.2)
  856. RW.C1=clerp(LW.C1,CFrame.new(0,0.5,0)*CFrame.Angles(0,0,0),.2)
  857. RootJoint.C0=clerp(RootJoint.C0,RootCF*CFrame.Angles(0,0,0),.2)
  858. RH.C0=clerp(RH.C0,CFrame.new(1,-1,0)*CFrame.Angles(math.rad(-12),math.rad(90),0),.2)
  859. LH.C0=clerp(LH.C0,CFrame.new(-1,-1,0)*CFrame.Angles(math.rad(12),-math.rad(90),0),.2)
  860. w1weld.C0=clerp(w1weld.C0,w1c0*CFrame.Angles(0,math.rad(-10),math.rad(-10)),.2)
  861. w2weld.C0=clerp(w2weld.C0,w2c0*CFrame.Angles(0,math.rad(10),math.rad(10)),.2)
  862. w3weld.C0=clerp(w3weld.C0,w3c0*CFrame.Angles(0,math.rad(-13),math.rad(-10)),.2)
  863. w4weld.C0=clerp(w4weld.C0,w4c0*CFrame.Angles(0,math.rad(13),math.rad(10)),.2)
  864. w5weld.C0=clerp(w5weld.C0,w5c0*CFrame.Angles(0,math.rad(-17),math.rad(-10)),.2)
  865. w6weld.C0=clerp(w6weld.C0,w6c0*CFrame.Angles(0,math.rad(17),math.rad(10)),.2)
  866.  
  867. elseif RootPart.Velocity.y < -1 and hitfloor==nil then
  868. Anim="Fall"
  869. sinewave=0
  870. Neck.C0=clerp(Neck.C0,necko*CFrame.Angles(math.rad(23),0,0),.2)
  871. Neck.C1=clerp(Neck.C1,necko2*CFrame.Angles(0,0,0),.2)
  872. RootJoint.C0=clerp(RootJoint.C0,RootCF*CFrame.Angles(0,0,0),.2)
  873. RW.C0=clerp(RW.C0,CFrame.new(1.5,0.5,0)*CFrame.Angles(-math.rad(17),0,math.rad(12)),.2)
  874. RW.C1=clerp(LW.C1,CFrame.new(0,0.5,0)*CFrame.Angles(0,0,0),.2)
  875. LW.C0=clerp(LW.C0,CFrame.new(-1.5,0.5,0)*CFrame.Angles(-math.rad(17),0,-math.rad(12)),.2)
  876. LW.C1=clerp(LW.C1,CFrame.new(0,0.5,0)*CFrame.Angles(0,0,0),.2)
  877. RH.C0=clerp(RH.C0,CFrame.new(1,-1,0)*CFrame.Angles(math.rad(24),math.rad(90),0),.2)
  878. LH.C0=clerp(LH.C0,CFrame.new(-1,-1,0)*CFrame.Angles(math.rad(-12),-math.rad(90),0),.2)
  879. w1weld.C0=clerp(w1weld.C0,w1c0*CFrame.Angles(0,math.rad(-8),math.rad(10)),.05)
  880. w2weld.C0=clerp(w2weld.C0,w2c0*CFrame.Angles(0,math.rad(8),math.rad(-10)),.05)
  881. w3weld.C0=clerp(w3weld.C0,w3c0*CFrame.Angles(0,math.rad(-11),math.rad(10)),.05)
  882. w4weld.C0=clerp(w4weld.C0,w4c0*CFrame.Angles(0,math.rad(11),math.rad(-10)),.05)
  883. w5weld.C0=clerp(w5weld.C0,w5c0*CFrame.Angles(0,math.rad(-15),math.rad(10)),.05)
  884. w6weld.C0=clerp(w6weld.C0,w6c0*CFrame.Angles(0,math.rad(15),math.rad(-10)),.05)
  885.  
  886. elseif torvel<1 and hitfloor~=nil then
  887. Anim="Idle"
  888. Neck.C0=clerp(Neck.C0,necko*CFrame.Angles(math.rad(10),0,math.rad(0)),.05)
  889. RootJoint.C0=clerp(RootJoint.C0,RootCF*CFrame.new(0,0,2+sinewave)*CFrame.Angles(0,0,math.rad(0)),.05)
  890. RW.C0=clerp(RW.C0,CFrame.new(1.5,0.5,0)*CFrame.Angles(math.rad(15),math.rad(15),math.rad(15)),.2)
  891. RW.C1=clerp(LW.C1,CFrame.new(0,0.5,0)*CFrame.Angles(0,0,0),.2)
  892. LW.C0=clerp(LW.C0,CFrame.new(-1.5,0.5,0)*CFrame.Angles(math.rad(15),math.rad(-15),math.rad(-15)),.2)
  893. LW.C1=clerp(LW.C1,CFrame.new(0,0.5,0)*CFrame.Angles(0,0,0),.2)
  894. RH.C0=clerp(RH.C0,CFrame.new(1,-1,0)*CFrame.Angles(0,math.rad(90),0)*CFrame.Angles(math.rad(-5),0,math.rad(3)),.2)
  895. LH.C0=clerp(LH.C0,CFrame.new(-1,-1,0)*CFrame.Angles(0,-math.rad(90),0)*CFrame.Angles(math.rad(-5),0,math.rad(-3)),.2)
  896. w1weld.C0=clerp(w1weld.C0,w1c0*CFrame.new(sinewave/4,0,-.3)*CFrame.Angles(0,math.rad(12),-sinewave/3),.05)
  897. w2weld.C0=clerp(w2weld.C0,w2c0*CFrame.new(-sinewave/4,0,-.3)*CFrame.Angles(0,math.rad(-12),sinewave/3),.05)
  898. w3weld.C0=clerp(w3weld.C0,w3c0*CFrame.new(sinewave/2,0,-.3)*CFrame.Angles(0,math.rad(15),-sinewave/3),.05)
  899. w4weld.C0=clerp(w4weld.C0,w4c0*CFrame.new(-sinewave/2,0,-.3)*CFrame.Angles(0,math.rad(-15),sinewave/3),.05)
  900. w5weld.C0=clerp(w5weld.C0,w5c0*CFrame.new(sinewave/4,0,-.3)*CFrame.Angles(0,math.rad(20),-sinewave/3),.05)
  901. w6weld.C0=clerp(w6weld.C0,w6c0*CFrame.new(-sinewave/4,0,-.3)*CFrame.Angles(0,math.rad(-20),sinewave/3),.05)
  902.  
  903. if normcount%5==0 then
  904. local cthrust=thrust1
  905. local now=cthrust.CFrame*CFrame.new(0,-3,0)
  906. local b1,m1=blockmesh((math.random()>0.5 and "Deep orange" or "Bright yellow"),0.2,Vector3.new(0.2,0.2,0.2),Vector3.new(2,2,2),true,false)
  907. b1.CFrame=cthrust.CFrame*CFrame.new(0,-cthrust.Size.Y,0)
  908. local now=cthrust.CFrame*CFrame.new(0,-cthrust.Size.Y,0)
  909. thread(function()
  910. for i=1,30 do swait()
  911. m1.Scale=m1.Scale+Vector3.new(-2/30,-2/30,-2/30)
  912. b1.CFrame=now*CFrame.new(Vector3.new(0,(-3/30)*i,0),Vector3.new(randomangles("raw"),randomangles("raw"),randomangles("raw")))
  913. b1.Transparency=b1.Transparency+0.8/30
  914. end
  915. b1:Destroy()
  916. end)
  917. end
  918. if normcount%5==0 then
  919. local cthrust=thrust2
  920. local now=cthrust.CFrame*CFrame.new(0,-3,0)
  921. local b1,m1=blockmesh((math.random()>0.5 and "Deep orange" or "Bright yellow"),0.2,Vector3.new(0.2,0.2,0.2),Vector3.new(2,2,2),true,false)
  922. b1.CFrame=cthrust.CFrame*CFrame.new(0,-cthrust.Size.Y,0)
  923. local now=cthrust.CFrame*CFrame.new(0,-cthrust.Size.Y,0)
  924. thread(function()
  925. for i=1,30 do swait()
  926. m1.Scale=m1.Scale+Vector3.new(-2/30,-2/30,-2/30)
  927. b1.CFrame=now*CFrame.new(Vector3.new(0,(-3/30)*i,0),Vector3.new(randomangles("raw"),randomangles("raw"),randomangles("raw")))
  928. b1.Transparency=b1.Transparency+0.8/30
  929. end
  930. b1:Destroy()
  931. end)
  932. end
  933. if normcount%5==0 then
  934. local cthrust=thrust3
  935. local now=cthrust.CFrame*CFrame.new(0,-3,0)
  936. local b1,m1=blockmesh((math.random()>0.5 and "Deep orange" or "Bright yellow"),0.2,Vector3.new(0.2,0.2,0.2),Vector3.new(2,2,2),true,false)
  937. b1.CFrame=cthrust.CFrame*CFrame.new(0,-cthrust.Size.Y,0)
  938. local now=cthrust.CFrame*CFrame.new(0,-cthrust.Size.Y,0)
  939. thread(function()
  940. for i=1,30 do swait()
  941. m1.Scale=m1.Scale+Vector3.new(-2/30,-2/30,-2/30)
  942. b1.CFrame=now*CFrame.new(Vector3.new(0,(-3/30)*i,0),Vector3.new(randomangles("raw"),randomangles("raw"),randomangles("raw")))
  943. b1.Transparency=b1.Transparency+0.8/30
  944. end
  945. b1:Destroy()
  946. end)
  947. end
  948. if normcount%5==0 then
  949. local cthrust=thrust4
  950. local now=cthrust.CFrame*CFrame.new(0,-3,0)
  951. local b1,m1=blockmesh((math.random()>0.5 and "Deep orange" or "Bright yellow"),0.2,Vector3.new(0.2,0.2,0.2),Vector3.new(2,2,2),true,false)
  952. b1.CFrame=cthrust.CFrame*CFrame.new(0,-cthrust.Size.Y,0)
  953. local now=cthrust.CFrame*CFrame.new(0,-cthrust.Size.Y,0)
  954. thread(function()
  955. for i=1,30 do swait()
  956. m1.Scale=m1.Scale+Vector3.new(-2/30,-2/30,-2/30)
  957. b1.CFrame=now*CFrame.new(Vector3.new(0,(-2/30)*i,0),Vector3.new(randomangles("raw"),randomangles("raw"),randomangles("raw")))
  958. b1.Transparency=b1.Transparency+0.8/30
  959. end
  960. b1:Destroy()
  961. end)
  962. end
  963.  
  964. elseif torvel>2 and torvel<22 and hitfloor~=nil then
  965. Anim="Walk"
  966. sinewave=0
  967. Neck.C0=clerp(Neck.C0,necko*CFrame.Angles(math.rad(5),0,math.rad(30)),.1)
  968. RootJoint.C0=clerp(RootJoint.C0,RootCF*CFrame.Angles(0.1,0,-math.rad(30)),.1)
  969. RW.C0=clerp(RW.C0,CFrame.new(1.5,0.5,0)*CFrame.Angles(math.rad(10),math.rad(30),math.rad(10)),.1)
  970. RW.C1=clerp(LW.C1,CFrame.new(0,0.5,0)*CFrame.Angles(0,0,0),.2)
  971. LW.C0=clerp(LW.C0,CFrame.new(-1.2,0.5,-.4)*CFrame.Angles(math.rad(0),math.rad(40),math.rad(95)),.2)
  972. LW.C1=clerp(LW.C1,CFrame.new(0,0.5,0)*CFrame.Angles(0,0,0),.2)
  973. RH.C0=clerp(RH.C0,CFrame.new(1,-1,0)*CFrame.Angles(0,math.rad(90),0)*CFrame.Angles(0,math.rad(30),0),.1)
  974. LH.C0=clerp(LH.C0,CFrame.new(-1,-1,0)*CFrame.Angles(0,-math.rad(90),0)*CFrame.Angles(0,math.rad(30),0),.1)
  975. w1weld.C0=clerp(w1weld.C0,w1c0*CFrame.Angles(0,0,math.rad(15)),.1)
  976. w2weld.C0=clerp(w2weld.C0,w2c0*CFrame.Angles(0,0,math.rad(-15)),.1)
  977. w3weld.C0=clerp(w3weld.C0,w3c0*CFrame.Angles(0,0,math.rad(15)),.1)
  978. w4weld.C0=clerp(w4weld.C0,w4c0*CFrame.Angles(0,0,math.rad(-15)),.1)
  979. w5weld.C0=clerp(w5weld.C0,w5c0*CFrame.Angles(0,0,math.rad(15)),.1)
  980. w6weld.C0=clerp(w6weld.C0,w6c0*CFrame.Angles(0,0,math.rad(-15)),.1)
  981.  
  982. end
  983. end
  984. end
  985. end
  986. end)
Add Comment
Please, Sign In to add comment