Advertisement
Maximalio

Untitled

Mar 19th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 49.44 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. local Lite = it("PointLight",Torso)
  535. Lite.Color = Color3.new(255, 255, 0)
  536. Lite.Range = 8
  537. Lite.Brightness = 10
  538. Lite.Shadows = true
  539.  
  540. function BreakEffect(brickcolor,cframe,x1,y1,z1)
  541. local prt=part("Custom",workspace,"Neon",0,0,"Institutional white","Effect",vt(0.5,0.5,0.5))
  542. prt.Anchored=true
  543. prt.CFrame=cframe*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  544. local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
  545. coroutine.resume(coroutine.create(function(Part,CF,Numbb,randnumb)
  546. CF=Part.CFrame
  547. Numbb=0
  548. randnumb=math.random()-math.random()
  549. for i=0,1,0.05 do
  550. wait()
  551. CF=CF*cf(0,1,0)
  552. --Part.CFrame=Part.CFrame*euler(0.5,0,0)*cf(0,1,0)
  553. Part.CFrame=CF*euler(Numbb,0,0)
  554. Part.Transparency=i
  555. Numbb=Numbb+randnumb
  556. end
  557. Part.Parent=nil
  558. end),prt)
  559. end
  560. --BreakEffect(BrickColor.new("Institutional white"),Hitbox.CFrame,0.5,math.random(5,20),0.5)
  561.  
  562. function attackone()
  563. attack=true
  564. local con=Hitbox.Touched:connect(function(hit) Damagefunc(Hitbox,hit,500000000,500000000,math.random(10,20),"Normal",RootPart,.2,1) end)
  565. for i=0,1,0.1 do
  566. swait()
  567. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(120),math.rad(0),math.rad(20)),.3)
  568. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(math.rad(-10),math.rad(-20),math.rad(-90)),.3)
  569. 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)
  570. 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)
  571. handleweld.C0=clerp(handleweld.C0,cf(0,-0,.4)*angles(math.rad(70),math.rad(-10),math.rad(0)),.3)
  572. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(-70)),.3)
  573. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-0),math.rad(0),math.rad(50)),.3)
  574. end
  575. so("http://www.roblox.com/asset/?id=260433850",Hitbox,1,1)
  576. so("http://www.roblox.com/asset/?id=260433850",Hitbox,1,1)
  577. hitconasdf = Hitbox.Touched:connect(function(hit)
  578. local hum12 = hit.Parent:FindFirstChild("Humanoid")
  579. if hum12 and not hum12:IsDescendantOf(Character) then
  580. so('http://roblox.com/asset/?id=220833976',Hitbox,1,1)
  581. for i = 1,10 do
  582. BreakEffect(BrickColor.new("Institutional white"),hit.Parent.Torso.CFrame,0.5,math.random(5,20),0.5)
  583. end
  584. hitconasdf:disconnect()
  585. end
  586. end)
  587. for i=0,1,0.1 do
  588. swait()
  589. local blcf = Hitbox.CFrame*CFrame.new(0,.3,0)
  590. if scfr and (Hitbox.Position-scfr.p).magnitude > .1 then
  591. local h = 5
  592. 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)
  593. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  594. 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)
  595. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  596. scfr = blcf
  597. elseif not scfr then
  598. scfr = blcf
  599. end
  600. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(110),math.rad(-90),math.rad(20)),.3)
  601. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(math.rad(-10),math.rad(-20),math.rad(-50)),.3)
  602. 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)
  603. 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)
  604. handleweld.C0=clerp(handleweld.C0,cf(0,-0,0)*angles(math.rad(-60),math.rad(-10),math.rad(0)),.3)
  605. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(90)),.3)
  606. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-0),math.rad(0),math.rad(-50)),.3)
  607. end
  608. attack=false
  609. con:disconnect()
  610. scfr = nil
  611. pcall(function()
  612. hitconasdf:disconnect()
  613. end)
  614. end
  615.  
  616. function attacktwo()
  617. attack = true
  618. local con=Hitbox.Touched:connect(function(hit) Damagefunc(Hitbox,hit,500000000,500000000,math.random(10,20),"Normal",RootPart,.2,1) end)
  619. for i = 0,1,0.1 do
  620. swait()
  621. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(20),math.rad(0),math.rad(50)),.3)
  622. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-10),math.rad(10),math.rad(-50)),.3)
  623. 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)
  624. 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)
  625. 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)
  626. 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)
  627. handleweld.C0 = clerp(handleweld.C0,cf(0,0,0)* angles(math.rad(4),math.rad(0),math.rad(0)),.3)
  628. end
  629. so("http://www.roblox.com/asset/?id=260433850",Hitbox,1,1)
  630. for i = 0,1,0.1 do
  631. swait()
  632. local blcf = Hitbox.CFrame*CFrame.new(0,.5,0)
  633. if scfr and (Hitbox.Position-scfr.p).magnitude > .1 then
  634. local h = 5
  635. 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)
  636. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  637. 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)
  638. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  639. scfr = blcf
  640. elseif not scfr then
  641. scfr = blcf
  642. end
  643. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,-0.5)* angles(math.rad(30),math.rad(0),math.rad(-50)),.3)
  644. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(50)),.3)
  645. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(-20), math.rad(90)), 0.3)
  646. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-50), math.rad(0), math.rad(-20)), 0.3)
  647. 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)
  648. 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)
  649. handleweld.C0 = clerp(handleweld.C0,cf(0,0,0)* angles(math.rad(30),math.rad(0),math.rad(0)),.3)
  650. Torso.Velocity=Head.CFrame.lookVector*50
  651. end
  652. Humanoid.Jump = true
  653. for i=0,0.6,.5 do
  654. swait()
  655. so("http://www.roblox.com/asset/?id=260433850",Hitbox,1,1)
  656. for i=0,1,0.1 do
  657. swait()
  658. local blcf = Hitbox.CFrame*CFrame.new(0,.5,0)
  659. if scfr and (Hitbox.Position-scfr.p).magnitude > .1 then
  660. local h = 5
  661. local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
  662. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  663. local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
  664. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  665. scfr = blcf
  666. elseif not scfr then
  667. scfr = blcf
  668. end
  669. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,4)*euler(0,1,-6*i), .3)
  670. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  671. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(70), math.rad(90)), 0.3)
  672. LW.C0 = clerp(LW.C0, CFrame.new(.5, 0.5, -.8) * angles(math.rad(0), math.rad(-170), math.rad(-90)), 0.3)
  673. 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)
  674. 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)
  675. handleweld.C0 = clerp(handleweld.C0,cf(0,0,0)* angles(math.rad(50),math.rad(0),math.rad(0)),.3)
  676. end
  677. end
  678. attack = false
  679. scfr = nil
  680. con:disconnect()
  681. end
  682.  
  683. function Stab()
  684. attack=true
  685. local con=Hitbox.Touched:connect(function(hit) Damagefunc(Hitbox,hit,500000000,500000000,math.random(10,20),"Normal",RootPart,.2,1) end)
  686. for i=0,1,0.1 do
  687. swait()
  688. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(-70)),.3)
  689. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(10),math.rad(0),math.rad(60)),.3)
  690. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(0),math.rad(20),math.rad(90)),.3)
  691. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(0),math.rad(-20),math.rad(-90)),.3)
  692. 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)
  693. 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)
  694. handleweld.C0=clerp(handleweld.C0,cf(0,0,0)*angles(math.rad(20),math.rad(0),math.rad(0)),.3)
  695. end
  696. hitconasdf = Hitbox.Touched:connect(function(hit)
  697. local hum12 = hit.Parent:FindFirstChild("Humanoid")
  698. if hum12 and not hum12:IsDescendantOf(Character) then
  699. so('http://roblox.com/asset/?id=220833976',Hitbox,1,1)
  700. for i = 1,10 do
  701. BreakEffect(BrickColor.new("Institutional white"),hit.Parent.Torso.CFrame,0.5,math.random(5,20),0.5)
  702. end
  703. hitconasdf:disconnect()
  704. end
  705. end)
  706. so("http://www.roblox.com/asset/?id=260433850",Hitbox,1,.9)
  707. so("http://www.roblox.com/asset/?id=260433850",Hitbox,1,.9)
  708. for i=0,1,0.1 do
  709. swait()
  710. local blcf = Hitbox.CFrame*CFrame.new(0,.3,0)
  711. if scfr and (Hitbox.Position-scfr.p).magnitude > .1 then
  712. local h = 5
  713. 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)
  714. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  715. 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)
  716. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  717. scfr = blcf
  718. elseif not scfr then
  719. scfr = blcf
  720. end
  721. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(90)),.4)
  722. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(10),math.rad(0),math.rad(-80)),.4)
  723. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(0),math.rad(0),math.rad(90)),.4)
  724. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(0),math.rad(-20),math.rad(-30)),.4)
  725. 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)
  726. 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)
  727. handleweld.C0=clerp(handleweld.C0,cf(0,-1,-1)*angles(math.rad(-90),math.rad(0),math.rad(0)),.4)
  728. end
  729. con:disconnect()
  730. attack=false
  731. scfr = nil
  732. pcall(function()
  733. hitconasdf:disconnect()
  734. end)
  735. end
  736.  
  737. function Spin()
  738. attack=true
  739. local con=Hitbox.Touched:connect(function(hit) Damagefunc(Hitbox,hit,500000000,500000000,math.random(10,20),"Normal",RootPart,.2,1) end)
  740. hitconasdf = Hitbox.Touched:connect(function(hit)
  741. local hum12 = hit.Parent:FindFirstChild("Humanoid")
  742. if hum12 and not hum12:IsDescendantOf(Character) then
  743. so('http://roblox.com/asset/?id=220833976',Hitbox,1,1)
  744. for i = 1,10 do
  745. BreakEffect(BrickColor.new("Institutional white"),hit.Parent.Torso.CFrame,0.5,math.random(5,20),0.5)
  746. end
  747. hitconasdf:disconnect()
  748. end
  749. end)
  750. for i=0,1,1 do
  751. so("http://roblox.com/asset/?id=260433850",Hitbox,1,1)
  752. so("http://www.roblox.com/asset/?id=260433850",Hitbox,1,1)
  753. swait()
  754. for i=0,1,0.1 do
  755. swait()
  756. local blcf = Hitbox.CFrame*CFrame.new(0,.3,0)
  757. if scfr and (Hitbox.Position-scfr.p).magnitude > .1 then
  758. local h = 5
  759. 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)
  760. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  761. 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)
  762. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  763. scfr = blcf
  764. elseif not scfr then
  765. scfr = blcf
  766. end
  767. RW.C0=clerp(RW.C0,cf(1,0.5,-.5)*angles(math.rad(90),math.rad(0),math.rad(-50)),.3)
  768. LW.C0=clerp(LW.C0,cf(-1,0.5,-.5)*angles(math.rad(90),math.rad(0),math.rad(50)),.3)
  769. LH.C0=clerp(LH.C0,cf(-1,-.5,-1)*angles(math.rad(-20),math.rad(-90),math.rad(0)),.3)
  770. RH.C0=clerp(RH.C0,cf(1,-.5,-1)*angles(math.rad(-20),math.rad(90),math.rad(0)),.3)
  771. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,5)*euler(6*i,0,0),.5)
  772. handleweld.C0=clerp(handleweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(30)),1)
  773. end
  774. end
  775. attack=false
  776. con:disconnect()
  777. scfr = nil
  778. pcall(function()
  779. hitconasdf:disconnect()
  780. end)
  781. end
  782.  
  783. function ContAttack()
  784. attack=true
  785. local con=Hitbox.Touched:connect(function(hit) Damagefunc(Hitbox,hit,500000000,500000000,math.random(10,20),"Normal",RootPart,.2,1) end)
  786. hitconasdf = Hitbox.Touched:connect(function(hit)
  787. local hum12 = hit.Parent:FindFirstChild("Humanoid")
  788. if hum12 and not hum12:IsDescendantOf(Character) then
  789. so('http://roblox.com/asset/?id=220833976',Hitbox,1,1)
  790. for i = 1,10 do
  791. BreakEffect(BrickColor.new("Institutional white"),hit.Parent.Torso.CFrame,0.5,math.random(5,20),0.5)
  792. end
  793. hitconasdf:disconnect()
  794. end
  795. end)
  796. for i=1,4 do
  797. swait()
  798. for i=0,1,0.2 do
  799. swait()
  800. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(120),math.rad(0),math.rad(20)),.3)
  801. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(math.rad(-10),math.rad(-20),math.rad(-90)),.3)
  802. 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)
  803. 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)
  804. handleweld.C0=clerp(handleweld.C0,cf(0,-0,.4)*angles(math.rad(70),math.rad(-10),math.rad(0)),.3)
  805. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(-70)),.3)
  806. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-0),math.rad(0),math.rad(50)),.3)
  807. end
  808. so("http://www.roblox.com/asset/?id=260433850",Hitbox,1,1)
  809. so("http://www.roblox.com/asset/?id=260433850",Hitbox,1,1)
  810. for i=0,1,0.2 do
  811. swait()
  812. local blcf = Hitbox.CFrame*CFrame.new(0,.3,0)
  813. if scfr and (Hitbox.Position-scfr.p).magnitude > .1 then
  814. local h = 5
  815. 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)
  816. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  817. 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)
  818. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  819. scfr = blcf
  820. elseif not scfr then
  821. scfr = blcf
  822. end
  823. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(110),math.rad(-90),math.rad(20)),.3)
  824. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(math.rad(-10),math.rad(-20),math.rad(-50)),.3)
  825. 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)
  826. 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)
  827. handleweld.C0=clerp(handleweld.C0,cf(0,-0,0)*angles(math.rad(-60),math.rad(-10),math.rad(0)),.3)
  828. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(90)),.3)
  829. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-0),math.rad(0),math.rad(-50)),.3)
  830. end
  831. for i=0,1,0.2 do
  832. swait()
  833. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(0),math.rad(90),math.rad(90)),.3)
  834. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(math.rad(-10),math.rad(-20),math.rad(-50)),.3)
  835. 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)
  836. 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)
  837. handleweld.C0=clerp(handleweld.C0,cf(0,-0,0)*angles(math.rad(-30),math.rad(-10),math.rad(0)),.3)
  838. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(70)),.3)
  839. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-0),math.rad(0),math.rad(-50)),.3)
  840. end
  841. so("http://www.roblox.com/asset/?id=260433850",Hitbox,1,.9)
  842. so("http://www.roblox.com/asset/?id=260433850",Hitbox,1,.9)
  843. for i=0,1,0.2 do
  844. swait()
  845. local blcf = Hitbox.CFrame*CFrame.new(0,.3,0)
  846. if scfr and (Hitbox.Position-scfr.p).magnitude > .1 then
  847. local h = 5
  848. 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)
  849. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  850. 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)
  851. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  852. scfr = blcf
  853. elseif not scfr then
  854. scfr = blcf
  855. end
  856. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(0),math.rad(-50),math.rad(90)),.3)
  857. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(math.rad(-10),math.rad(-20),math.rad(-90)),.3)
  858. 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)
  859. 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)
  860. handleweld.C0=clerp(handleweld.C0,cf(0,-0,0)*angles(math.rad(-50),math.rad(10),math.rad(0)),.3)
  861. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(-70)),.3)
  862. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-0),math.rad(0),math.rad(50)),.3)
  863. end
  864. end
  865. attack=false
  866. con:disconnect()
  867. scfr = nil
  868. pcall(function()
  869. hitconasdf:disconnect()
  870. end)
  871. end
  872.  
  873.  
  874. function Sheathe()
  875. attack = true
  876. so("http://www.roblox.com/asset/?id=130785407",Hitbox,1,.9)
  877. CurrentMode = "Sheathed"
  878. for i = 0,1,0.1 do
  879. swait()
  880. handleweld.Part0 = Torso
  881. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  882. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-10),math.rad(0),math.rad(-20)),.3)
  883. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(190),math.rad(0),math.rad(0)),.3)
  884. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(math.rad(-10),math.rad(20),math.rad(-10)),.3)
  885. 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)
  886. 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)
  887. handleweld.C0=clerp(handleweld.C0,cf(3,3,0.5)*angles(math.rad(90),math.rad(150),math.rad(90)),.3)
  888. end
  889. attack = false
  890. end
  891.  
  892. function Unsheathe()
  893. attack = true
  894. CurrentMode = "Unsheathed"
  895. so("http://www.roblox.com/asset/?id=130785407",Hitbox,1,.9)
  896. for i = 0,1,0.1 do
  897. swait()
  898. handleweld.Part0 = RightArm
  899. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(-70)),.3)
  900. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(0),math.rad(0),math.rad(60)),.3)
  901. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(200),math.rad(0),math.rad(0)),.3)
  902. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(math.rad(0),math.rad(-30),math.rad(-30)),.3)
  903. 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)
  904. 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)
  905. handleweld.C0=clerp(handleweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(30),math.rad(0)),.3)
  906. end
  907. scfr = nil
  908. attack = false
  909. end
  910.  
  911. local Sit = false
  912.  
  913. mouse.Button1Down:connect(function()
  914. if attack==false then
  915. if attacktype==1 and CurrentMode == "Unsheathed" then
  916. attack=true
  917. attacktype=2
  918. attackone()
  919. elseif attacktype==2 and CurrentMode == "Unsheathed" then
  920. attack=true
  921. attacktype=1
  922. attacktwo()
  923. end
  924. end
  925. end)
  926.  
  927.  
  928. mouse.KeyDown:connect(function(k)
  929. k=k:lower()
  930. if k=='q' then
  931. if attack==false and CurrentMode == "Unsheathed" then
  932. Stab()
  933. end
  934. elseif k=='e' then
  935. if attack==false and CurrentMode == "Unsheathed" then
  936. Spin()
  937. end
  938. elseif k=='r' then
  939. if attack==false and CurrentMode == "Unsheathed" then
  940. ContAttack()
  941. end
  942. elseif k=='f' then
  943. if attack==false and CurrentMode == "Unsheathed" then
  944. Sheathe()
  945. elseif k=='f' then
  946. if attack==false and Sit == false and CurrentMode == "Sheathed" then
  947. Unsheathe()
  948. end
  949. end
  950. elseif k=='t' then
  951. if attack==false and Sit == false and CurrentMode == "Sheathed" then
  952. Sit = true
  953. Humanoid.WalkSpeed = 0
  954. elseif k=='t' then
  955. if attack==false and Sit == true and CurrentMode == "Sheathed" then
  956. Sit = false
  957. Humanoid.WalkSpeed = 16
  958. end
  959. end
  960.  
  961. end
  962. end)
  963.  
  964.  
  965. local sine = 0
  966. local change = 1
  967. local val = 0
  968. local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0)
  969. local LHCF = (CFrame.fromEulerAnglesXYZ(0, -1.6, 0))
  970. local cn = CFrame.new
  971. local NeckCF = cn(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  972.  
  973. while true do
  974. swait()
  975. sine = sine + change
  976. local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
  977. local velderp=RootPart.Velocity.y
  978. hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character)
  979. if equipped==true or equipped==false then
  980. if attack==false then
  981. idle=idle+1
  982. else
  983. idle=0
  984. end
  985. if idle>=500 then
  986. if attack==false then
  987. end
  988. end
  989. if RootPart.Velocity.y > 1 and hitfloor==nil then
  990. Anim="Jump"
  991. if attack==false and Sit == false and CurrentMode == "Unsheathed" then
  992. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  993. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-10),math.rad(0),math.rad(0)),.3)
  994. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(50),math.rad(0),math.rad(30)),.3)
  995. 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)
  996. 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)
  997. handleweld.C0=clerp(handleweld.C0,cf(0,-0,.4)*angles(math.rad(85),math.rad(-10),math.rad(0)),.3)
  998. end
  999. if attack==false and Sit == false and CurrentMode == "Sheathed" then
  1000. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(-10),math.rad(0),math.rad(0)),.3)
  1001. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-20),math.rad(0),math.rad(0)),.3)
  1002. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(0),math.rad(0),math.rad(30)),.3)
  1003. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(math.rad(0),math.rad(0),math.rad(-30)),.3)
  1004. 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)
  1005. 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)
  1006. handleweld.C0=clerp(handleweld.C0,cf(3,3,0.5)*angles(math.rad(90),math.rad(150),math.rad(90)),.3)
  1007. end
  1008. elseif RootPart.Velocity.y < -1 and hitfloor==nil then
  1009. Anim="Fall"
  1010. if attack==false and Sit == false and CurrentMode == "Unsheathed" then
  1011. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(10),math.rad(0),math.rad(0)),.3)
  1012. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(10),math.rad(0),math.rad(0)),.3)
  1013. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(-5),math.rad(0),math.rad(20)),.3)
  1014. 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)
  1015. 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)
  1016. handleweld.C0=clerp(handleweld.C0,cf(0,-0,.4)*angles(math.rad(85),math.rad(-10),math.rad(0)),.3)
  1017. end
  1018. if attack==false and Sit == false and CurrentMode == "Sheathed" then
  1019. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(10),math.rad(0),math.rad(0)),.3)
  1020. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(20),math.rad(0),math.rad(0)),.3)
  1021. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(0),math.rad(0),math.rad(50)),.3)
  1022. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(math.rad(0),math.rad(0),math.rad(-50)),.3)
  1023. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0)),.3)
  1024. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-75),math.rad(-10)),.3)
  1025. handleweld.C0=clerp(handleweld.C0,cf(3,3,0.5)*angles(math.rad(90),math.rad(150),math.rad(90)),.3)
  1026. end
  1027. elseif torvel<1 and hitfloor~=nil then
  1028. Anim="Idle"
  1029. if attack==false and Sit == false and CurrentMode == "Unsheathed" then
  1030. --[[Neck.C0=clerp(Neck.C0,necko*angles(math.rad(-10),0,0),.3)
  1031. Neck.C1=clerp(Neck.C1,necko2*angles(0,0,0),.3)
  1032. RootJoint.C0=clerp(RootJoint.C0,RootCF*angles(math.rad(15),0,0),.3)
  1033. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(0,0,0.1),.3)
  1034. RW.C1=clerp(LW.C1,cf(0,0.5,0)*angles(0,0,0),.3)
  1035. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(90),0,math.rad(45)),.3)
  1036. LW.C1=clerp(LW.C1,cf(0,0.5,0)*angles(0,0,0),.3)
  1037. RH.C0=clerp(RH.C0,cf(1,-.5,-.5)*angles(math.rad(15),math.rad(90),0),.3)
  1038. RH.C1=clerp(RH.C1,RHC1,.3)
  1039. LH.C0=clerp(LH.C0,cf(1,-.5,0)*angles(math.rad(15),math.rad(-90),0),.3)
  1040. LH.C1=clerp(LH.C1,LHC1,.3)]]
  1041. idleanim=.4
  1042. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-0.5-idleanim)*euler(0.4+(idleanim/2),0,-0.4),.3)
  1043. --RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  1044. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(-idleanim/2,0,0.4),.3)
  1045. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(-25),math.rad(-35),math.rad(45)),.3)
  1046. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(math.rad(90),math.rad(0),math.rad(45)),.3)
  1047. RH.C0=clerp(RH.C0,cf(1,-1,-idleanim)*euler(-0.2-(idleanim/2),1.57,0),.3)
  1048. LH.C0=clerp(LH.C0,cf(-1,-.5+idleanim,0)*euler(0.5+(idleanim/2),-1.2,0)*euler(-.2,0,0),.3)
  1049. handleweld.C0=clerp(handleweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  1050. end
  1051. if attack==false and Sit == false and CurrentMode == "Sheathed" then
  1052. RootJoint.C0=clerp(RootJoint.C0,RootCF*angles(math.rad(0),math.rad(0),math.rad(-45)),.3)
  1053. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(0),math.rad(0),math.rad(45)),.3)
  1054. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(-2),math.rad(-25),math.rad(15)),.3)
  1055. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(0),math.rad(0),math.rad(-5)),.3)
  1056. 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)
  1057. 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)
  1058. handleweld.C0=clerp(handleweld.C0,cf(3,3,0.5)*angles(math.rad(90),math.rad(150),math.rad(90)),.3)
  1059. end
  1060. if attack==false and Sit == true and CurrentMode == "Sheathed" then
  1061. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-2)*angles(math.rad(-10),math.rad(0),math.rad(0)),.3)
  1062. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(10),math.rad(0),math.rad(0)),.3)
  1063. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(-10),math.rad(0),math.rad(5)),.3)
  1064. LW.C0=clerp(LW.C0,cf(-1.3,0.5,0)*euler(math.rad(90),math.rad(0),math.rad(30)),.3)
  1065. 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)
  1066. 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)
  1067. handleweld.C0=clerp(handleweld.C0,cf(3,3,0.5)*angles(math.rad(90),math.rad(150),math.rad(90)),.3)
  1068. end
  1069. elseif torvel>2 and hitfloor~=nil then
  1070. Anim="Walk"
  1071. if attack==false and Sit == false and CurrentMode == "Unsheathed" then
  1072. change=2
  1073. 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)
  1074. 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)
  1075. RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.7, 0) * angles(math.rad(0), math.rad(110), math.rad(205)), 0.3)
  1076. 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)
  1077. 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)
  1078. 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)
  1079. handleweld.C0 = clerp(handleweld.C0, CFrame.new(0, 0, 0) * angles(math.rad(23), math.rad(-20), math.rad(0)), 0.3)
  1080. end
  1081. if attack==false and Sit == false and CurrentMode == "Sheathed" then
  1082. idleanim=-1
  1083. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*euler(0.4,0,0),.3)
  1084. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(-0.2,0,0),.3)
  1085. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(0),math.rad(-35),math.rad(45)),.3)
  1086. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(math.rad(0),math.rad(35),math.rad(-45)),.3)
  1087. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0.2,1.57,0),.3)
  1088. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0.5,-1.57,0)*euler(0,0,0),.3)
  1089. handleweld.C0=clerp(handleweld.C0,cf(3,3,0.5)*angles(math.rad(90),math.rad(150),math.rad(90)),.3)
  1090. end
  1091. end
  1092. end
  1093. if #Effects>0 then
  1094. for e=1,#Effects do
  1095. if Effects[e]~=nil then
  1096. local Thing=Effects[e]
  1097. if Thing~=nil then
  1098. local Part=Thing[1]
  1099. local Mode=Thing[2]
  1100. local Delay=Thing[3]
  1101. local IncX=Thing[4]
  1102. local IncY=Thing[5]
  1103. local IncZ=Thing[6]
  1104. if Thing[1].Transparency<=1 then
  1105. if Thing[2]=="Block1" then
  1106. Thing[1].CFrame=Thing[1].CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  1107. Mesh=Thing[1].Mesh
  1108. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  1109. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1110. elseif Thing[2]=="Cylinder" then
  1111. Mesh=Thing[1].Mesh
  1112. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  1113. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1114. elseif Thing[2]=="Blood" then
  1115. Mesh=Thing[7]
  1116. Thing[1].CFrame=Thing[1].CFrame*cf(0,.5,0)
  1117. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  1118. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1119. elseif Thing[2]=="Elec" then
  1120. Mesh=Thing[1].Mesh
  1121. Mesh.Scale=Mesh.Scale+vt(Thing[7],Thing[8],Thing[9])
  1122. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1123. elseif Thing[2]=="Disappear" then
  1124. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1125. end
  1126. else
  1127. Part.Parent=nil
  1128. table.remove(Effects,e)
  1129. end
  1130. end
  1131. end
  1132. end
  1133. end
  1134. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement