Advertisement
Maximalio

Untitled

Mar 19th, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 49.45 KB | None | 0 0
  1.  
  2. Player=game:GetService("Players").LocalPlayer
  3. Character=Player.Character
  4. PlayerGui=Player.PlayerGui
  5. Backpack=Player.Backpack
  6. Torso=Character.Torso
  7. Head=Character.Head
  8. Humanoid=Character.Humanoid
  9. m=Instance.new('Model',Character)
  10. LeftArm=Character["Left Arm"]
  11. LeftLeg=Character["Left Leg"]
  12. RightArm=Character["Right Arm"]
  13. RightLeg=Character["Right Leg"]
  14. LS=Torso["Left Shoulder"]
  15. LH=Torso["Left Hip"]
  16. RS=Torso["Right Shoulder"]
  17. RH=Torso["Right Hip"]
  18. Face = Head.face
  19. Neck=Torso.Neck
  20. it=Instance.new
  21. attacktype=1
  22. vt=Vector3.new
  23. cf=CFrame.new
  24. euler=CFrame.fromEulerAnglesXYZ
  25. angles=CFrame.Angles
  26. cloaked=false
  27. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  28. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  29. LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
  30. LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
  31. RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
  32. RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
  33. RootPart=Character.HumanoidRootPart
  34. RootJoint=RootPart.RootJoint
  35. RootCF=euler(-1.57,0,3.14)
  36. attack = false
  37. attackdebounce = false
  38. deb=false
  39. equipped=true
  40. hand=false
  41. MMouse=nil
  42. combo=0
  43. mana=0
  44. trispeed=.2
  45. attackmode='none'
  46. local idle=0
  47. local Anim="Idle"
  48. local Effects={}
  49. local gun=false
  50. local shoot=false
  51. player=nil
  52. mana=0
  53. local CurrentMode = "Unsheathed"
  54.  
  55. mouse=Player:GetMouse()
  56. --save shoulders
  57. RSH, LSH=nil, nil
  58. --welds
  59. RW, LW=Instance.new("Weld"), Instance.new("Weld")
  60. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  61. LH=Torso["Left Hip"]
  62. RH=Torso["Right Hip"]
  63. TorsoColor=Torso.BrickColor
  64. function NoOutline(Part)
  65. Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
  66. end
  67. player=Player
  68. ch=Character
  69. RSH=ch.Torso["Right Shoulder"]
  70. LSH=ch.Torso["Left Shoulder"]
  71. --
  72. RSH.Parent=nil
  73. LSH.Parent=nil
  74. --
  75. RW.Name="Right Shoulder"
  76. RW.Part0=ch.Torso
  77. RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  78. RW.C1=cf(0, 0.5, 0)
  79. RW.Part1=ch["Right Arm"]
  80. RW.Parent=ch.Torso
  81. --
  82. LW.Name="Left Shoulder"
  83. LW.Part0=ch.Torso
  84. LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  85. LW.C1=cf(0, 0.5, 0)
  86. LW.Part1=ch["Left Arm"]
  87. LW.Parent=ch.Torso
  88.  
  89. local function weldBetween(a, b)
  90. local weldd = Instance.new("ManualWeld")
  91. weldd.Part0 = a
  92. weldd.Part1 = b
  93. weldd.C0 = CFrame.new()
  94. weldd.C1 = b.CFrame:inverse() * a.CFrame
  95. weldd.Parent = a
  96. return weldd
  97. end
  98.  
  99. function nooutline(part)
  100. part.TopSurface,part.BottomSurface,part.LeftSurface,part.RightSurface,part.FrontSurface,part.BackSurface = 10,10,10,10,10,10
  101. end
  102.  
  103. function part(formfactor,parent,material,reflectance,transparency,brickcolor,name,size)
  104. local fp=it("Part")
  105. fp.formFactor=formfactor
  106. fp.Parent=parent
  107. fp.Reflectance=reflectance
  108. fp.Transparency=transparency
  109. fp.CanCollide=false
  110. fp.Locked=true
  111. fp.BrickColor=BrickColor.new(tostring(brickcolor))
  112. fp.Name=name
  113. fp.Size=size
  114. fp.Position=Character.Torso.Position
  115. nooutline(fp)
  116. fp.Material=material
  117. fp:BreakJoints()
  118. return fp
  119. end
  120.  
  121. function swait(num)
  122. if num==0 or num==nil then
  123. game:service'RunService'.Heartbeat:wait(0)
  124. else
  125. for i=0,num do
  126. game:service'RunService'.Heartbeat:wait(0)
  127. end
  128. end
  129. end
  130.  
  131. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  132. local mesh=it(Mesh)
  133. mesh.Parent=part
  134. if Mesh=="SpecialMesh" then
  135. mesh.MeshType=meshtype
  136. mesh.MeshId=meshid
  137. end
  138. mesh.Offset=offset
  139. mesh.Scale=scale
  140. return mesh
  141. end
  142.  
  143. function weld(parent,part0,part1,c0,c1)
  144. local weld=it("Weld")
  145. weld.Parent=parent
  146. weld.Part0=part0
  147. weld.Part1=part1
  148. weld.C0=c0
  149. weld.C1=c1
  150. return weld
  151. end
  152.  
  153.  
  154. local function CFrameFromTopBack(at, top, back)
  155. local right = top:Cross(back)
  156. return CFrame.new(at.x, at.y, at.z,
  157. right.x, top.x, back.x,
  158. right.y, top.y, back.y,
  159. right.z, top.z, back.z)
  160. end
  161.  
  162. function Triangle(a, b, c)
  163. local edg1 = (c-a):Dot((b-a).unit)
  164. local edg2 = (a-b):Dot((c-b).unit)
  165. local edg3 = (b-c):Dot((a-c).unit)
  166. if edg1 <= (b-a).magnitude and edg1 >= 0 then
  167. a, b, c = a, b, c
  168. elseif edg2 <= (c-b).magnitude and edg2 >= 0 then
  169. a, b, c = b, c, a
  170. elseif edg3 <= (a-c).magnitude and edg3 >= 0 then
  171. a, b, c = c, a, b
  172. else
  173. assert(false, "unreachable")
  174. end
  175.  
  176. local len1 = (c-a):Dot((b-a).unit)
  177. local len2 = (b-a).magnitude - len1
  178. local width = (a + (b-a).unit*len1 - c).magnitude
  179.  
  180. local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit)
  181.  
  182. local list = {}
  183.  
  184. if len1 > 0.01 then
  185. local w1 = Instance.new('WedgePart', m)
  186. game:GetService("Debris"):AddItem(w1,5)
  187. w1.Material = "SmoothPlastic"
  188. w1.FormFactor = 'Custom'
  189. w1.BrickColor = BrickColor.new("Institutional white")
  190. w1.Transparency = 0
  191. w1.Reflectance = 0
  192. w1.Material = "Neon"
  193. w1.CanCollide = false
  194. NoOutline(w1)
  195. local sz = Vector3.new(0.2, width, len1)
  196. w1.Size = sz
  197. local sp = Instance.new("SpecialMesh",w1)
  198. sp.MeshType = "Wedge"
  199. sp.Scale = Vector3.new(0,1,1) * sz/w1.Size
  200. w1:BreakJoints()
  201. w1.Anchored = true
  202. w1.Parent = workspace
  203. w1.Transparency = 0.3
  204. table.insert(Effects,{w1,"Disappear",.03})
  205. w1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2)
  206. table.insert(list,w1)
  207. end
  208. if len2 > 0.01 then
  209. local w2 = Instance.new('WedgePart', m)
  210. game:GetService("Debris"):AddItem(w2,5)
  211. w2.Material = "SmoothPlastic"
  212. w2.FormFactor = 'Custom'
  213. w2.BrickColor = BrickColor.new("Institutional white")
  214. w2.Transparency = 0
  215. w2.Reflectance = 0
  216. w2.Material = "Neon"
  217. w2.CanCollide = false
  218. NoOutline(w2)
  219. local sz = Vector3.new(0.2, width, len2)
  220. w2.Size = sz
  221. local sp = Instance.new("SpecialMesh",w2)
  222. sp.MeshType = "Wedge"
  223. sp.Scale = Vector3.new(0,1,1) * sz/w2.Size
  224. w2:BreakJoints()
  225. w2.Anchored = true
  226. w2.Parent = workspace
  227. w2.Transparency = 0.3
  228. table.insert(Effects,{w2,"Disappear",.03})
  229. w2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2)
  230. table.insert(list,w2)
  231. end
  232. return unpack(list)
  233. end
  234.  
  235.  
  236. so = function(id,par,vol,pit)
  237. coroutine.resume(coroutine.create(function()
  238. local sou = Instance.new("Sound",par or workspace)
  239. sou.Volume=vol
  240. sou.Pitch=pit or 1
  241. sou.SoundId=id
  242. swait()
  243. sou:play()
  244. game:GetService("Debris"):AddItem(sou,6)
  245. end))
  246. end
  247.  
  248. function clerp(a,b,t)
  249. local qa = {QuaternionFromCFrame(a)}
  250. local qb = {QuaternionFromCFrame(b)}
  251. local ax, ay, az = a.x, a.y, a.z
  252. local bx, by, bz = b.x, b.y, b.z
  253. local _t = 1-t
  254. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  255. end
  256.  
  257. function QuaternionFromCFrame(cf)
  258. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  259. local trace = m00 + m11 + m22
  260. if trace > 0 then
  261. local s = math.sqrt(1 + trace)
  262. local recip = 0.5/s
  263. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  264. else
  265. local i = 0
  266. if m11 > m00 then
  267. i = 1
  268. end
  269. if m22 > (i == 0 and m00 or m11) then
  270. i = 2
  271. end
  272. if i == 0 then
  273. local s = math.sqrt(m00-m11-m22+1)
  274. local recip = 0.5/s
  275. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  276. elseif i == 1 then
  277. local s = math.sqrt(m11-m22-m00+1)
  278. local recip = 0.5/s
  279. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  280. elseif i == 2 then
  281. local s = math.sqrt(m22-m00-m11+1)
  282. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  283. end
  284. end
  285. end
  286.  
  287. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  288. local xs, ys, zs = x + x, y + y, z + z
  289. local wx, wy, wz = w*xs, w*ys, w*zs
  290. local xx = x*xs
  291. local xy = x*ys
  292. local xz = x*zs
  293. local yy = y*ys
  294. local yz = y*zs
  295. local zz = z*zs
  296. 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))
  297. end
  298.  
  299. function QuaternionSlerp(a, b, t)
  300. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  301. local startInterp, finishInterp;
  302. if cosTheta >= 0.0001 then
  303. if (1 - cosTheta) > 0.0001 then
  304. local theta = math.acos(cosTheta)
  305. local invSinTheta = 1/math.sin(theta)
  306. startInterp = math.sin((1-t)*theta)*invSinTheta
  307. finishInterp = math.sin(t*theta)*invSinTheta
  308. else
  309. startInterp = 1-t
  310. finishInterp = t
  311. end
  312. else
  313. if (1+cosTheta) > 0.0001 then
  314. local theta = math.acos(-cosTheta)
  315. local invSinTheta = 1/math.sin(theta)
  316. startInterp = math.sin((t-1)*theta)*invSinTheta
  317. finishInterp = math.sin(t*theta)*invSinTheta
  318. else
  319. startInterp = t-1
  320. finishInterp = t
  321. end
  322. end
  323. 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
  324. end
  325.  
  326. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  327. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  328. end
  329.  
  330. Damagefunc=function(Part,hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,decreaseblock)
  331. if hit.Parent==nil then
  332. return
  333. end
  334. local h=hit.Parent:FindFirstChild("Humanoid")
  335. for _,v in pairs(hit.Parent:children()) do
  336. if v:IsA("Humanoid") then
  337. h=v
  338. end
  339. end
  340. if hit.Parent.Parent:FindFirstChild("Torso")~=nil then
  341. h=hit.Parent.Parent:FindFirstChild("Humanoid")
  342. end
  343. if hit.Parent.className=="Hat" then
  344. hit=hit.Parent.Parent:findFirstChild("Head")
  345. end
  346. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  347. if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end
  348. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  349. return
  350. end]]
  351. -- hs(hit,1.2)
  352. local c=Instance.new("ObjectValue")
  353. c.Name="creator"
  354. c.Value=game:service("Players").LocalPlayer
  355. c.Parent=h
  356. game:GetService("Debris"):AddItem(c,.5)
  357. local Damage=math.random(minim,maxim)
  358. -- h:TakeDamage(Damage)
  359. local blocked=false
  360. local block=hit.Parent:findFirstChild("Block")
  361. if block~=nil then
  362. print(block.className)
  363. if block.className=="NumberValue" then
  364. if block.Value>0 then
  365. blocked=true
  366. if decreaseblock==nil then
  367. block.Value=block.Value-1
  368. end
  369. end
  370. end
  371. if block.className=="IntValue" then
  372. if block.Value>0 then
  373. blocked=true
  374. if decreaseblock~=nil then
  375. block.Value=block.Value-1
  376. end
  377. end
  378. end
  379. end
  380. if blocked==false then
  381. -- h:TakeDamage(Damage)
  382. h.Health=h.Health-Damage
  383. ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, Part.BrickColor.Color)
  384. else
  385. h.Health=h.Health-(Damage/2)
  386. ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, BrickColor.new("Bright blue").Color)
  387. end
  388. if Type=="Knockdown" then
  389. local hum=hit.Parent.Humanoid
  390. hum.PlatformStand=true
  391. coroutine.resume(coroutine.create(function(HHumanoid)
  392. swait(1)
  393. HHumanoid.PlatformStand=false
  394. end),hum)
  395. local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
  396. --hit.CFrame=CFrame.new(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
  397. local bodvol=Instance.new("BodyVelocity")
  398. bodvol.velocity=angle*knockback
  399. bodvol.P=5000
  400. bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  401. bodvol.Parent=hit
  402. local rl=Instance.new("BodyAngularVelocity")
  403. rl.P=3000
  404. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  405. rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  406. rl.Parent=hit
  407. game:GetService("Debris"):AddItem(bodvol,.5)
  408. game:GetService("Debris"):AddItem(rl,.5)
  409. elseif Type=="Normal" then
  410. local vp=Instance.new("BodyVelocity")
  411. vp.P=500
  412. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  413. -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback
  414. if KnockbackType==1 then
  415. vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05
  416. elseif KnockbackType==2 then
  417. vp.velocity=Property.CFrame.lookVector*knockback
  418. end
  419. if knockback>0 then
  420. vp.Parent=hit.Parent.Torso
  421. end
  422. game:GetService("Debris"):AddItem(vp,.5)
  423. elseif Type=="Up" then
  424. local bodyVelocity=Instance.new("BodyVelocity")
  425. bodyVelocity.velocity=vt(0,60,0)
  426. bodyVelocity.P=5000
  427. bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  428. bodyVelocity.Parent=hit
  429. game:GetService("Debris"):AddItem(bodyVelocity,1)
  430. local rl=Instance.new("BodyAngularVelocity")
  431. rl.P=3000
  432. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  433. rl.angularvelocity=Vector3.new(math.random(-30,30),math.random(-30,30),math.random(-30,30))
  434. rl.Parent=hit
  435. game:GetService("Debris"):AddItem(rl,.5)
  436. elseif Type=="Snare" then
  437. local bp=Instance.new("BodyPosition")
  438. bp.P=2000
  439. bp.D=100
  440. bp.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  441. bp.position=hit.Parent.Torso.Position
  442. bp.Parent=hit.Parent.Torso
  443. game:GetService("Debris"):AddItem(bp,1)
  444. elseif Type=="Target" then
  445. local Targetting = false
  446. if Targetting==false then
  447. ZTarget=hit.Parent.Torso
  448. coroutine.resume(coroutine.create(function(Part)
  449. so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)
  450. swait(5)
  451. so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)
  452. end),ZTarget)
  453. local TargHum=ZTarget.Parent:findFirstChild("Humanoid")
  454. local targetgui=Instance.new("BillboardGui")
  455. targetgui.Parent=ZTarget
  456. targetgui.Size=UDim2.new(10,100,10,100)
  457. local targ=Instance.new("ImageLabel")
  458. targ.Parent=targetgui
  459. targ.BackgroundTransparency=1
  460. targ.Image="rbxassetid://4834067"
  461. targ.Size=UDim2.new(1,0,1,0)
  462. cam.CameraType="Scriptable"
  463. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  464. local dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
  465. workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  466. Targetting=true
  467. RocketTarget=ZTarget
  468. for i=1,Property do
  469. --while Targetting==true and Humanoid.Health>0 and Character.Parent~=nil do
  470. if Humanoid.Health>0 and Character.Parent~=nil and TargHum.Health>0 and TargHum.Parent~=nil and Targetting==true then
  471. swait()
  472. end
  473. --workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,Head.CFrame.p+rmdir*100)
  474. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  475. dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
  476. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)*cf(0,5,10)*euler(-0.3,0,0)
  477. end
  478. Targetting=false
  479. RocketTarget=nil
  480. targetgui.Parent=nil
  481. cam.CameraType="Custom"
  482. end
  483. end
  484. local debounce=Instance.new("BoolValue")
  485. debounce.Name="DebounceHit"
  486. debounce.Parent=hit.Parent
  487. debounce.Value=true
  488. game:GetService("Debris"):AddItem(debounce,Delay)
  489. c=Instance.new("ObjectValue")
  490. c.Name="creator"
  491. c.Value=Player
  492. c.Parent=h
  493. game:GetService("Debris"):AddItem(c,.5)
  494. end
  495. end
  496.  
  497.  
  498. function ShowDamage(Pos, Text, Time, Color)
  499. local Rate = (1 / 30)
  500. local Pos = (Pos or Vector3.new(0, 0, 0))
  501. local Text = (Text or "")
  502. local Time = (Time or 2)
  503. local Color = (Color or Color3.new(1, 0, 0))
  504. local EffectPart = part("Custom",workspace,"SmoothPlastic",0,1,BrickColor.new(Color),"Effect",vt(0,0,0))
  505. EffectPart.Anchored = true
  506. local BillboardGui = Instance.new("BillboardGui")
  507. BillboardGui.Size = UDim2.new(3, 0, 3, 0)
  508. BillboardGui.Adornee = EffectPart
  509. local TextLabel = Instance.new("TextLabel")
  510. TextLabel.BackgroundTransparency = 1
  511. TextLabel.Size = UDim2.new(1, 0, 1, 0)
  512. TextLabel.Text = Text
  513. TextLabel.TextColor3 = Color
  514. TextLabel.TextScaled = true
  515. TextLabel.Font = Enum.Font.ArialBold
  516. TextLabel.Parent = BillboardGui
  517. BillboardGui.Parent = EffectPart
  518. game.Debris:AddItem(EffectPart, (Time + 0.1))
  519. EffectPart.Parent = game:GetService("Workspace")
  520. Delay(0, function()
  521. local Frames = (Time / Rate)
  522. for Frame = 1, Frames do
  523. wait(Rate)
  524. local Percent = (Frame / Frames)
  525. EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0)
  526. TextLabel.TextTransparency = Percent
  527. end
  528. if EffectPart and EffectPart.Parent then
  529. EffectPart:Destroy()
  530. end
  531. end)
  532. end
  533.  
  534.  
  535.  
  536.  
  537. local Lite = it("PointLight",Torso)
  538. Lite.Color = Color3.new(255, 255, 0)
  539. Lite.Range = 8
  540. Lite.Brightness = 10
  541. Lite.Shadows = true
  542.  
  543. function BreakEffect(brickcolor,cframe,x1,y1,z1)
  544. local prt=part("Custom",workspace,"Neon",0,0,"Institutional white","Effect",vt(0.5,0.5,0.5))
  545. prt.Anchored=true
  546. prt.CFrame=cframe*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  547. local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
  548. coroutine.resume(coroutine.create(function(Part,CF,Numbb,randnumb)
  549. CF=Part.CFrame
  550. Numbb=0
  551. randnumb=math.random()-math.random()
  552. for i=0,1,0.05 do
  553. wait()
  554. CF=CF*cf(0,1,0)
  555. --Part.CFrame=Part.CFrame*euler(0.5,0,0)*cf(0,1,0)
  556. Part.CFrame=CF*euler(Numbb,0,0)
  557. Part.Transparency=i
  558. Numbb=Numbb+randnumb
  559. end
  560. Part.Parent=nil
  561. end),prt)
  562. end
  563. --BreakEffect(BrickColor.new("Institutional white"),Hitbox.CFrame,0.5,math.random(5,20),0.5)
  564.  
  565. function attackone()
  566. attack=true
  567. local con=Hitbox.Touched:connect(function(hit) Damagefunc(Hitbox,hit,500000000,500000000,math.random(10,20),"Normal",RootPart,.2,1) end)
  568. for i=0,1,0.1 do
  569. swait()
  570. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(120),math.rad(0),math.rad(20)),.3)
  571. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(math.rad(-10),math.rad(-20),math.rad(-90)),.3)
  572. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-50),math.rad(-5))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  573. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(120),math.rad(-10))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  574. handleweld.C0=clerp(handleweld.C0,cf(0,-0,.4)*angles(math.rad(70),math.rad(-10),math.rad(0)),.3)
  575. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(-70)),.3)
  576. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-0),math.rad(0),math.rad(50)),.3)
  577. end
  578. so("http://www.roblox.com/asset/?id=260433850",Hitbox,1,1)
  579. so("http://www.roblox.com/asset/?id=260433850",Hitbox,1,1)
  580. hitconasdf = Hitbox.Touched:connect(function(hit)
  581. local hum12 = hit.Parent:FindFirstChild("Humanoid")
  582. if hum12 and not hum12:IsDescendantOf(Character) then
  583. so('http://roblox.com/asset/?id=220833976',Hitbox,1,1)
  584. for i = 1,10 do
  585. BreakEffect(BrickColor.new("Institutional white"),hit.Parent.Torso.CFrame,0.5,math.random(5,20),0.5)
  586. end
  587. hitconasdf:disconnect()
  588. end
  589. end)
  590. for i=0,1,0.1 do
  591. swait()
  592. local blcf = Hitbox.CFrame*CFrame.new(0,.3,0)
  593. if scfr and (Hitbox.Position-scfr.p).magnitude > .1 then
  594. local h = 5
  595. 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)
  596. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  597. 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)
  598. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  599. scfr = blcf
  600. elseif not scfr then
  601. scfr = blcf
  602. end
  603. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(110),math.rad(-90),math.rad(20)),.3)
  604. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(math.rad(-10),math.rad(-20),math.rad(-50)),.3)
  605. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-120),math.rad(5))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  606. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(50),math.rad(10))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  607. handleweld.C0=clerp(handleweld.C0,cf(0,-0,0)*angles(math.rad(-60),math.rad(-10),math.rad(0)),.3)
  608. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(90)),.3)
  609. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-0),math.rad(0),math.rad(-50)),.3)
  610. end
  611. attack=false
  612. con:disconnect()
  613. scfr = nil
  614. pcall(function()
  615. hitconasdf:disconnect()
  616. end)
  617. end
  618.  
  619. function attacktwo()
  620. attack = true
  621. local con=Hitbox.Touched:connect(function(hit) Damagefunc(Hitbox,hit,500000000,500000000,math.random(10,20),"Normal",RootPart,.2,1) end)
  622. for i = 0,1,0.1 do
  623. swait()
  624. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(20),math.rad(0),math.rad(50)),.3)
  625. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-10),math.rad(10),math.rad(-50)),.3)
  626. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -0.5) * angles(math.rad(0), math.rad(120), math.rad(120)), 0.3)
  627. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0.5) * angles(math.rad(-50), math.rad(0), math.rad(-10)), 0.3)
  628. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(-5),math.rad(60),math.rad(20))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  629. LH.C0=clerp(LH.C0,cf(-.8,-1,-.5)*angles(math.rad(0),math.rad(-140),math.rad(10))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  630. handleweld.C0 = clerp(handleweld.C0,cf(0,0,0)* angles(math.rad(4),math.rad(0),math.rad(0)),.3)
  631. end
  632. so("http://www.roblox.com/asset/?id=260433850",Hitbox,1,1)
  633. for i = 0,1,0.1 do
  634. swait()
  635. local blcf = Hitbox.CFrame*CFrame.new(0,.5,0)
  636. if scfr and (Hitbox.Position-scfr.p).magnitude > .1 then
  637. local h = 5
  638. 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)
  639. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  640. 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)
  641. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  642. scfr = blcf
  643. elseif not scfr then
  644. scfr = blcf
  645. end
  646. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,-0.5)* angles(math.rad(30),math.rad(0),math.rad(-50)),.3)
  647. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(50)),.3)
  648. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(-20), math.rad(90)), 0.3)
  649. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-50), math.rad(0), math.rad(-20)), 0.3)
  650. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(-5),math.rad(140),math.rad(-20))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  651. LH.C0=clerp(LH.C0,cf(-1,-0.4,0)*angles(math.rad(0),math.rad(-60),math.rad(-30))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  652. handleweld.C0 = clerp(handleweld.C0,cf(0,0,0)* angles(math.rad(30),math.rad(0),math.rad(0)),.3)
  653. Torso.Velocity=Head.CFrame.lookVector*50
  654. end
  655. Humanoid.Jump = true
  656. for i=0,0.6,.5 do
  657. swait()
  658. so("http://www.roblox.com/asset/?id=260433850",Hitbox,1,1)
  659. for i=0,1,0.1 do
  660. swait()
  661. local blcf = Hitbox.CFrame*CFrame.new(0,.5,0)
  662. if scfr and (Hitbox.Position-scfr.p).magnitude > .1 then
  663. local h = 5
  664. 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)
  665. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  666. 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)
  667. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  668. scfr = blcf
  669. elseif not scfr then
  670. scfr = blcf
  671. end
  672. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,4)*euler(0,1,-6*i), .3)
  673. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  674. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(70), math.rad(90)), 0.3)
  675. LW.C0 = clerp(LW.C0, CFrame.new(.5, 0.5, -.8) * angles(math.rad(0), math.rad(-170), math.rad(-90)), 0.3)
  676. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(-5),math.rad(80),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  677. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-80),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  678. handleweld.C0 = clerp(handleweld.C0,cf(0,0,0)* angles(math.rad(50),math.rad(0),math.rad(0)),.3)
  679. end
  680. end
  681. attack = false
  682. scfr = nil
  683. con:disconnect()
  684. end
  685.  
  686. function Stab()
  687. attack=true
  688. local con=Hitbox.Touched:connect(function(hit) Damagefunc(Hitbox,hit,500000000,500000000,math.random(10,20),"Normal",RootPart,.2,1) end)
  689. for i=0,1,0.1 do
  690. swait()
  691. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(-70)),.3)
  692. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(10),math.rad(0),math.rad(60)),.3)
  693. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(0),math.rad(20),math.rad(90)),.3)
  694. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(0),math.rad(-20),math.rad(-90)),.3)
  695. LH.C0=clerp(LH.C0,cf(-1,-.9,0)*angles(math.rad(0),math.rad(-60),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  696. RH.C0=clerp(RH.C0,cf(1,-.9,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  697. handleweld.C0=clerp(handleweld.C0,cf(0,0,0)*angles(math.rad(20),math.rad(0),math.rad(0)),.3)
  698. end
  699. hitconasdf = Hitbox.Touched:connect(function(hit)
  700. local hum12 = hit.Parent:FindFirstChild("Humanoid")
  701. if hum12 and not hum12:IsDescendantOf(Character) then
  702. so('http://roblox.com/asset/?id=220833976',Hitbox,1,1)
  703. for i = 1,10 do
  704. BreakEffect(BrickColor.new("Institutional white"),hit.Parent.Torso.CFrame,0.5,math.random(5,20),0.5)
  705. end
  706. hitconasdf:disconnect()
  707. end
  708. end)
  709. so("http://www.roblox.com/asset/?id=260433850",Hitbox,1,.9)
  710. so("http://www.roblox.com/asset/?id=260433850",Hitbox,1,.9)
  711. for i=0,1,0.1 do
  712. swait()
  713. local blcf = Hitbox.CFrame*CFrame.new(0,.3,0)
  714. if scfr and (Hitbox.Position-scfr.p).magnitude > .1 then
  715. local h = 5
  716. 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)
  717. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  718. 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)
  719. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  720. scfr = blcf
  721. elseif not scfr then
  722. scfr = blcf
  723. end
  724. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(90)),.4)
  725. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(10),math.rad(0),math.rad(-80)),.4)
  726. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(0),math.rad(0),math.rad(90)),.4)
  727. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(0),math.rad(-20),math.rad(-30)),.4)
  728. LH.C0=clerp(LH.C0,cf(-1,-.9,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.4)
  729. RH.C0=clerp(RH.C0,cf(1,-.9,0)*angles(math.rad(0),math.rad(60),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.4)
  730. handleweld.C0=clerp(handleweld.C0,cf(0,-1,-1)*angles(math.rad(-90),math.rad(0),math.rad(0)),.4)
  731. end
  732. con:disconnect()
  733. attack=false
  734. scfr = nil
  735. pcall(function()
  736. hitconasdf:disconnect()
  737. end)
  738. end
  739.  
  740. function Spin()
  741. attack=true
  742. local con=Hitbox.Touched:connect(function(hit) Damagefunc(Hitbox,hit,500000000,500000000,math.random(10,20),"Normal",RootPart,.2,1) end)
  743. hitconasdf = Hitbox.Touched:connect(function(hit)
  744. local hum12 = hit.Parent:FindFirstChild("Humanoid")
  745. if hum12 and not hum12:IsDescendantOf(Character) then
  746. so('http://roblox.com/asset/?id=220833976',Hitbox,1,1)
  747. for i = 1,10 do
  748. BreakEffect(BrickColor.new("Institutional white"),hit.Parent.Torso.CFrame,0.5,math.random(5,20),0.5)
  749. end
  750. hitconasdf:disconnect()
  751. end
  752. end)
  753. for i=0,1,1 do
  754. so("http://roblox.com/asset/?id=260433850",Hitbox,1,1)
  755. so("http://www.roblox.com/asset/?id=260433850",Hitbox,1,1)
  756. swait()
  757. for i=0,1,0.1 do
  758. swait()
  759. local blcf = Hitbox.CFrame*CFrame.new(0,.3,0)
  760. if scfr and (Hitbox.Position-scfr.p).magnitude > .1 then
  761. local h = 5
  762. 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)
  763. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  764. 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)
  765. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  766. scfr = blcf
  767. elseif not scfr then
  768. scfr = blcf
  769. end
  770. RW.C0=clerp(RW.C0,cf(1,0.5,-.5)*angles(math.rad(90),math.rad(0),math.rad(-50)),.3)
  771. LW.C0=clerp(LW.C0,cf(-1,0.5,-.5)*angles(math.rad(90),math.rad(0),math.rad(50)),.3)
  772. LH.C0=clerp(LH.C0,cf(-1,-.5,-1)*angles(math.rad(-20),math.rad(-90),math.rad(0)),.3)
  773. RH.C0=clerp(RH.C0,cf(1,-.5,-1)*angles(math.rad(-20),math.rad(90),math.rad(0)),.3)
  774. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,5)*euler(6*i,0,0),.5)
  775. handleweld.C0=clerp(handleweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(30)),1)
  776. end
  777. end
  778. attack=false
  779. con:disconnect()
  780. scfr = nil
  781. pcall(function()
  782. hitconasdf:disconnect()
  783. end)
  784. end
  785.  
  786. function ContAttack()
  787. attack=true
  788. local con=Hitbox.Touched:connect(function(hit) Damagefunc(Hitbox,hit,500000000,500000000,math.random(10,20),"Normal",RootPart,.2,1) end)
  789. hitconasdf = Hitbox.Touched:connect(function(hit)
  790. local hum12 = hit.Parent:FindFirstChild("Humanoid")
  791. if hum12 and not hum12:IsDescendantOf(Character) then
  792. so('http://roblox.com/asset/?id=220833976',Hitbox,1,1)
  793. for i = 1,10 do
  794. BreakEffect(BrickColor.new("Institutional white"),hit.Parent.Torso.CFrame,0.5,math.random(5,20),0.5)
  795. end
  796. hitconasdf:disconnect()
  797. end
  798. end)
  799. for i=1,4 do
  800. swait()
  801. for i=0,1,0.2 do
  802. swait()
  803. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(120),math.rad(0),math.rad(20)),.3)
  804. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(math.rad(-10),math.rad(-20),math.rad(-90)),.3)
  805. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-50),math.rad(-5))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  806. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(120),math.rad(-10))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  807. handleweld.C0=clerp(handleweld.C0,cf(0,-0,.4)*angles(math.rad(70),math.rad(-10),math.rad(0)),.3)
  808. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(-70)),.3)
  809. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-0),math.rad(0),math.rad(50)),.3)
  810. end
  811. so("http://www.roblox.com/asset/?id=260433850",Hitbox,1,1)
  812. so("http://www.roblox.com/asset/?id=260433850",Hitbox,1,1)
  813. for i=0,1,0.2 do
  814. swait()
  815. local blcf = Hitbox.CFrame*CFrame.new(0,.3,0)
  816. if scfr and (Hitbox.Position-scfr.p).magnitude > .1 then
  817. local h = 5
  818. 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)
  819. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  820. 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)
  821. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  822. scfr = blcf
  823. elseif not scfr then
  824. scfr = blcf
  825. end
  826. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(110),math.rad(-90),math.rad(20)),.3)
  827. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(math.rad(-10),math.rad(-20),math.rad(-50)),.3)
  828. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-120),math.rad(5))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  829. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(50),math.rad(10))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  830. handleweld.C0=clerp(handleweld.C0,cf(0,-0,0)*angles(math.rad(-60),math.rad(-10),math.rad(0)),.3)
  831. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(90)),.3)
  832. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-0),math.rad(0),math.rad(-50)),.3)
  833. end
  834. for i=0,1,0.2 do
  835. swait()
  836. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(0),math.rad(90),math.rad(90)),.3)
  837. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(math.rad(-10),math.rad(-20),math.rad(-50)),.3)
  838. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-130),math.rad(5))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  839. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(50),math.rad(10))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  840. handleweld.C0=clerp(handleweld.C0,cf(0,-0,0)*angles(math.rad(-30),math.rad(-10),math.rad(0)),.3)
  841. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(70)),.3)
  842. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-0),math.rad(0),math.rad(-50)),.3)
  843. end
  844. so("http://www.roblox.com/asset/?id=260433850",Hitbox,1,.9)
  845. so("http://www.roblox.com/asset/?id=260433850",Hitbox,1,.9)
  846. for i=0,1,0.2 do
  847. swait()
  848. local blcf = Hitbox.CFrame*CFrame.new(0,.3,0)
  849. if scfr and (Hitbox.Position-scfr.p).magnitude > .1 then
  850. local h = 5
  851. 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)
  852. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  853. 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)
  854. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  855. scfr = blcf
  856. elseif not scfr then
  857. scfr = blcf
  858. end
  859. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(0),math.rad(-50),math.rad(90)),.3)
  860. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(math.rad(-10),math.rad(-20),math.rad(-90)),.3)
  861. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-50),math.rad(-5))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  862. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(130),math.rad(-10))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  863. handleweld.C0=clerp(handleweld.C0,cf(0,-0,0)*angles(math.rad(-50),math.rad(10),math.rad(0)),.3)
  864. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(-70)),.3)
  865. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-0),math.rad(0),math.rad(50)),.3)
  866. end
  867. end
  868. attack=false
  869. con:disconnect()
  870. scfr = nil
  871. pcall(function()
  872. hitconasdf:disconnect()
  873. end)
  874. end
  875.  
  876.  
  877. function Sheathe()
  878. attack = true
  879. so("http://www.roblox.com/asset/?id=130785407",Hitbox,1,.9)
  880. CurrentMode = "Sheathed"
  881. for i = 0,1,0.1 do
  882. swait()
  883. handleweld.Part0 = Torso
  884. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  885. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-10),math.rad(0),math.rad(-20)),.3)
  886. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(190),math.rad(0),math.rad(0)),.3)
  887. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(math.rad(-10),math.rad(20),math.rad(-10)),.3)
  888. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-60),math.rad(-5))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  889. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(-10))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  890. handleweld.C0=clerp(handleweld.C0,cf(3,3,0.5)*angles(math.rad(90),math.rad(150),math.rad(90)),.3)
  891. end
  892. attack = false
  893. end
  894.  
  895. function Unsheathe()
  896. attack = true
  897. CurrentMode = "Unsheathed"
  898. so("http://www.roblox.com/asset/?id=130785407",Hitbox,1,.9)
  899. for i = 0,1,0.1 do
  900. swait()
  901. handleweld.Part0 = RightArm
  902. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(-70)),.3)
  903. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(0),math.rad(0),math.rad(60)),.3)
  904. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(200),math.rad(0),math.rad(0)),.3)
  905. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(math.rad(0),math.rad(-30),math.rad(-30)),.3)
  906. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-60),math.rad(-5))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  907. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(-10))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  908. handleweld.C0=clerp(handleweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(30),math.rad(0)),.3)
  909. end
  910. scfr = nil
  911. attack = false
  912. end
  913.  
  914. local Sit = false
  915.  
  916. mouse.Button1Down:connect(function()
  917. if attack==false then
  918. if attacktype==1 and CurrentMode == "Unsheathed" then
  919. attack=true
  920. attacktype=2
  921. attackone()
  922. elseif attacktype==2 and CurrentMode == "Unsheathed" then
  923. attack=true
  924. attacktype=1
  925. attacktwo()
  926. end
  927. end
  928. end)
  929.  
  930.  
  931. mouse.KeyDown:connect(function(k)
  932. k=k:lower()
  933. if k=='q' then
  934. if attack==false and CurrentMode == "Unsheathed" then
  935. Stab()
  936. end
  937. elseif k=='e' then
  938. if attack==false and CurrentMode == "Unsheathed" then
  939. Spin()
  940. end
  941. elseif k=='r' then
  942. if attack==false and CurrentMode == "Unsheathed" then
  943. ContAttack()
  944. end
  945. elseif k=='f' then
  946. if attack==false and CurrentMode == "Unsheathed" then
  947. Sheathe()
  948. elseif k=='f' then
  949. if attack==false and Sit == false and CurrentMode == "Sheathed" then
  950. Unsheathe()
  951. end
  952. end
  953. elseif k=='t' then
  954. if attack==false and Sit == false and CurrentMode == "Sheathed" then
  955. Sit = true
  956. Humanoid.WalkSpeed = 0
  957. elseif k=='t' then
  958. if attack==false and Sit == true and CurrentMode == "Sheathed" then
  959. Sit = false
  960. Humanoid.WalkSpeed = 16
  961. end
  962. end
  963.  
  964. end
  965. end)
  966.  
  967.  
  968. local sine = 0
  969. local change = 1
  970. local val = 0
  971. local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0)
  972. local LHCF = (CFrame.fromEulerAnglesXYZ(0, -1.6, 0))
  973. local cn = CFrame.new
  974. local NeckCF = cn(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  975.  
  976. while true do
  977. swait()
  978. sine = sine + change
  979. local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
  980. local velderp=RootPart.Velocity.y
  981. hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character)
  982. if equipped==true or equipped==false then
  983. if attack==false then
  984. idle=idle+1
  985. else
  986. idle=0
  987. end
  988. if idle>=500 then
  989. if attack==false then
  990. end
  991. end
  992. if RootPart.Velocity.y > 1 and hitfloor==nil then
  993. Anim="Jump"
  994. if attack==false and Sit == false and CurrentMode == "Unsheathed" then
  995. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  996. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-10),math.rad(0),math.rad(0)),.3)
  997. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(50),math.rad(0),math.rad(30)),.3)
  998. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(math.rad(-40),math.rad(5),math.rad(-10))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  999. LH.C0=clerp(LH.C0,cf(-1,-.5,-1)*angles(math.rad(-20),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  1000. handleweld.C0=clerp(handleweld.C0,cf(0,-0,.4)*angles(math.rad(85),math.rad(-10),math.rad(0)),.3)
  1001. end
  1002. if attack==false and Sit == false and CurrentMode == "Sheathed" then
  1003. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(-10),math.rad(0),math.rad(0)),.3)
  1004. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-20),math.rad(0),math.rad(0)),.3)
  1005. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(0),math.rad(0),math.rad(30)),.3)
  1006. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(math.rad(0),math.rad(0),math.rad(-30)),.3)
  1007. LH.C0=clerp(LH.C0,cf(-1,-1,-.2)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-3),math.rad(0),math.rad(0)),.3)
  1008. RH.C0=clerp(RH.C0,cf(1,-1,-.2)*angles(math.rad(0),math.rad(90),math.rad(5))*angles(math.rad(-3),math.rad(0),math.rad(0)),.3)
  1009. handleweld.C0=clerp(handleweld.C0,cf(3,3,0.5)*angles(math.rad(90),math.rad(150),math.rad(90)),.3)
  1010. end
  1011. elseif RootPart.Velocity.y < -1 and hitfloor==nil then
  1012. Anim="Fall"
  1013. if attack==false and Sit == false and CurrentMode == "Unsheathed" then
  1014. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(10),math.rad(0),math.rad(0)),.3)
  1015. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(10),math.rad(0),math.rad(0)),.3)
  1016. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(-5),math.rad(0),math.rad(20)),.3)
  1017. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(math.rad(-40),math.rad(5),math.rad(-10))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  1018. LH.C0=clerp(LH.C0,cf(-1,-.5,-1)*angles(math.rad(-20),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  1019. handleweld.C0=clerp(handleweld.C0,cf(0,-0,.4)*angles(math.rad(85),math.rad(-10),math.rad(0)),.3)
  1020. end
  1021. if attack==false and Sit == false and CurrentMode == "Sheathed" then
  1022. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(10),math.rad(0),math.rad(0)),.3)
  1023. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(20),math.rad(0),math.rad(0)),.3)
  1024. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(0),math.rad(0),math.rad(50)),.3)
  1025. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(math.rad(0),math.rad(0),math.rad(-50)),.3)
  1026. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0)),.3)
  1027. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-75),math.rad(-10)),.3)
  1028. handleweld.C0=clerp(handleweld.C0,cf(3,3,0.5)*angles(math.rad(90),math.rad(150),math.rad(90)),.3)
  1029. end
  1030. elseif torvel<1 and hitfloor~=nil then
  1031. Anim="Idle"
  1032. if attack==false and Sit == false and CurrentMode == "Unsheathed" then
  1033. --[[Neck.C0=clerp(Neck.C0,necko*angles(math.rad(-10),0,0),.3)
  1034. Neck.C1=clerp(Neck.C1,necko2*angles(0,0,0),.3)
  1035. RootJoint.C0=clerp(RootJoint.C0,RootCF*angles(math.rad(15),0,0),.3)
  1036. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(0,0,0.1),.3)
  1037. RW.C1=clerp(LW.C1,cf(0,0.5,0)*angles(0,0,0),.3)
  1038. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(90),0,math.rad(45)),.3)
  1039. LW.C1=clerp(LW.C1,cf(0,0.5,0)*angles(0,0,0),.3)
  1040. RH.C0=clerp(RH.C0,cf(1,-.5,-.5)*angles(math.rad(15),math.rad(90),0),.3)
  1041. RH.C1=clerp(RH.C1,RHC1,.3)
  1042. LH.C0=clerp(LH.C0,cf(1,-.5,0)*angles(math.rad(15),math.rad(-90),0),.3)
  1043. LH.C1=clerp(LH.C1,LHC1,.3)]]
  1044. idleanim=.4
  1045. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-0.5-idleanim)*euler(0.4+(idleanim/2),0,-0.4),.3)
  1046. --RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  1047. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(-idleanim/2,0,0.4),.3)
  1048. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(-25),math.rad(-35),math.rad(45)),.3)
  1049. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(math.rad(90),math.rad(0),math.rad(45)),.3)
  1050. RH.C0=clerp(RH.C0,cf(1,-1,-idleanim)*euler(-0.2-(idleanim/2),1.57,0),.3)
  1051. LH.C0=clerp(LH.C0,cf(-1,-.5+idleanim,0)*euler(0.5+(idleanim/2),-1.2,0)*euler(-.2,0,0),.3)
  1052. handleweld.C0=clerp(handleweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  1053. end
  1054. if attack==false and Sit == false and CurrentMode == "Sheathed" then
  1055. RootJoint.C0=clerp(RootJoint.C0,RootCF*angles(math.rad(0),math.rad(0),math.rad(-45)),.3)
  1056. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(0),math.rad(0),math.rad(45)),.3)
  1057. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(-2),math.rad(-25),math.rad(15)),.3)
  1058. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(0),math.rad(0),math.rad(-5)),.3)
  1059. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  1060. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  1061. handleweld.C0=clerp(handleweld.C0,cf(3,3,0.5)*angles(math.rad(90),math.rad(150),math.rad(90)),.3)
  1062. end
  1063. if attack==false and Sit == true and CurrentMode == "Sheathed" then
  1064. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-2)*angles(math.rad(-10),math.rad(0),math.rad(0)),.3)
  1065. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(10),math.rad(0),math.rad(0)),.3)
  1066. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(-10),math.rad(0),math.rad(5)),.3)
  1067. LW.C0=clerp(LW.C0,cf(-1.3,0.5,0)*euler(math.rad(90),math.rad(0),math.rad(30)),.3)
  1068. LH.C0=clerp(LH.C0,cf(-1,.7,-.5)*angles(math.rad(0),math.rad(-90),math.rad(-10))*angles(math.rad(-3),math.rad(0),math.rad(0)),.3)
  1069. RH.C0=clerp(RH.C0,cf(1,-.5,-.5)*angles(math.rad(0),math.rad(90),math.rad(70))*angles(math.rad(-3),math.rad(0),math.rad(0)),.3)
  1070. handleweld.C0=clerp(handleweld.C0,cf(3,3,0.5)*angles(math.rad(90),math.rad(150),math.rad(90)),.3)
  1071. end
  1072. elseif torvel>2 and hitfloor~=nil then
  1073. Anim="Walk"
  1074. if attack==false and Sit == false and CurrentMode == "Unsheathed" then
  1075. change=2
  1076. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(2 * math.cos((sine) / 7))), 0.3)
  1077. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5 + 3 * math.cos((sine) / 23)), math.rad(0), math.rad(-2 * math.cos((sine) / 7))), 0.3)
  1078. RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.7, 0) * angles(math.rad(0), math.rad(110), math.rad(205)), 0.3)
  1079. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-30 * math.cos((sine) / 10)), math.rad(0), math.rad(-5)), 0.3)
  1080. RH.C0 = clerp(RH.C0, cn(1, -1 - 0.3 * math.cos((sine) / 8) / 2, -0.03 + math.sin((sine) / 8) / 2) * RHCF * angles(math.rad(-2), math.rad(0), math.rad(-10) - math.sin((sine) / 8)), 0.3)
  1081. LH.C0 = clerp(LH.C0, cn(-1, -1 + 0.3 * math.cos((sine) / 8) / 2, -0.03 - math.sin((sine) / 8) / 2) * LHCF * angles(math.rad(-2), math.rad(0), math.rad(10) - math.sin((sine) / 8)), 0.3)
  1082. handleweld.C0 = clerp(handleweld.C0, CFrame.new(0, 0, 0) * angles(math.rad(23), math.rad(-20), math.rad(0)), 0.3)
  1083. end
  1084. if attack==false and Sit == false and CurrentMode == "Sheathed" then
  1085. idleanim=-1
  1086. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*euler(0.4,0,0),.3)
  1087. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(-0.2,0,0),.3)
  1088. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(0),math.rad(-35),math.rad(45)),.3)
  1089. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(math.rad(0),math.rad(35),math.rad(-45)),.3)
  1090. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0.2,1.57,0),.3)
  1091. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0.5,-1.57,0)*euler(0,0,0),.3)
  1092. handleweld.C0=clerp(handleweld.C0,cf(3,3,0.5)*angles(math.rad(90),math.rad(150),math.rad(90)),.3)
  1093. end
  1094. end
  1095. end
  1096. if #Effects>0 then
  1097. for e=1,#Effects do
  1098. if Effects[e]~=nil then
  1099. local Thing=Effects[e]
  1100. if Thing~=nil then
  1101. local Part=Thing[1]
  1102. local Mode=Thing[2]
  1103. local Delay=Thing[3]
  1104. local IncX=Thing[4]
  1105. local IncY=Thing[5]
  1106. local IncZ=Thing[6]
  1107. if Thing[1].Transparency<=1 then
  1108. if Thing[2]=="Block1" then
  1109. Thing[1].CFrame=Thing[1].CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  1110. Mesh=Thing[1].Mesh
  1111. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  1112. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1113. elseif Thing[2]=="Cylinder" then
  1114. Mesh=Thing[1].Mesh
  1115. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  1116. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1117. elseif Thing[2]=="Blood" then
  1118. Mesh=Thing[7]
  1119. Thing[1].CFrame=Thing[1].CFrame*cf(0,.5,0)
  1120. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  1121. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1122. elseif Thing[2]=="Elec" then
  1123. Mesh=Thing[1].Mesh
  1124. Mesh.Scale=Mesh.Scale+vt(Thing[7],Thing[8],Thing[9])
  1125. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1126. elseif Thing[2]=="Disappear" then
  1127. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1128. end
  1129. else
  1130. Part.Parent=nil
  1131. table.remove(Effects,e)
  1132. end
  1133. end
  1134. end
  1135. end
  1136. end
  1137. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement