XDMANFROMXDWORLD

ROBLOX End of Last Script

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