Advertisement
M1XTExploits

Untitled

Nov 25th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 111.71 KB | None | 0 0
  1. --[[Orinthion Sword and Shield created by Brannon1964802.]]--
  2.  
  3. wait(1/60)
  4. Player=game:GetService("Players").LocalPlayer
  5. Character=Player.Character
  6. PlayerGui=Player.PlayerGui
  7. Backpack=Player.Backpack
  8. Torso=Character.Torso
  9. Head=Character.Head
  10. Humanoid=Character.Humanoid
  11. LeftArm=Character["Left Arm"]
  12. LeftLeg=Character["Left Leg"]
  13. RightArm=Character["Right Arm"]
  14. RightLeg=Character["Right Leg"]
  15. LS=Torso["Left Shoulder"]
  16. LH=Torso["Left Hip"]
  17. RS=Torso["Right Shoulder"]
  18. RH=Torso["Right Hip"]
  19. Face=Head.face
  20. Neck=Torso.Neck
  21. it=Instance.new
  22. attacktype=1
  23. vt=Vector3.new
  24. cf=CFrame.new
  25. euler=CFrame.fromEulerAnglesXYZ
  26. angles=CFrame.Angles
  27. necko=cf(0,1,0,-1,-0,-0,0,0,1,0,1,0)
  28. RootCF=angles(math.rad(-90),0,math.rad(180))
  29. --necko2=cf(0,-0.5,0,-1,-0,-0,0,0,1,0,1,0)
  30. --LHC0=cf(-1,-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. LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
  34. RootPart=Character.HumanoidRootPart
  35. RootJoint=RootPart.RootJoint
  36. attack=false
  37. equipped=false
  38. Mouse=Player:GetMouse()
  39. local idle=0
  40. local Anim="Idle"
  41. local ShotTarget=RootPart
  42. player=nil
  43.  
  44. --[[Saz's Artificial Heartbeat]]--
  45.  
  46. ArtificialHB=Instance.new("BindableEvent",script)
  47. ArtificialHB.Name="ArtificialHB"
  48.  
  49. script:WaitForChild("ArtificialHB")
  50.  
  51. frame=1/60 --1/30 is old Heartbeat and 1/60 is like Renderstepped speed
  52. tf=0
  53. allowframeloss=false
  54. tossremainder=false
  55. lastframe=tick()
  56. script.ArtificialHB:Fire()
  57.  
  58. game:GetService("RunService").Heartbeat:connect(function(s,p)
  59. tf=tf+s
  60. if tf>=frame then
  61. if allowframeloss then
  62. script.ArtificialHB:Fire()
  63. lastframe=tick()
  64. else
  65. for i=1,math.floor(tf/frame) do
  66. script.ArtificialHB:Fire()
  67. end
  68. lastframe=tick()
  69. end
  70. if tossremainder then
  71. tf=0
  72. else
  73. tf=tf-frame*math.floor(tf/frame)
  74. end
  75. end
  76. end)
  77. ----------------------------------------
  78.  
  79. --[[HB wait]]--
  80. local animationspeed=2 --The speed the script goes and stuff.
  81.  
  82. function hbwait(number)
  83. if number==0 or number==nil then
  84. game:GetService("RunService").Stepped:wait()
  85. --ArtificialHB.Event:wait()
  86. else
  87. for i=0,number do
  88. game:GetService("RunService").Stepped:wait()
  89. --ArtificialHB.Event:wait()
  90. end
  91. end
  92. end
  93. ----------------------------------------
  94.  
  95. --[[Stats and Other Values]]--
  96. local Stats=Instance.new("Folder",Character)
  97. Stats.Name="Stats"
  98. local Defense=Instance.new("NumberValue",Stats)
  99. Defense.Name="Defense"
  100. Defense.Value=0.6
  101. local Movement=Instance.new("NumberValue",Stats)
  102. Movement.Name="Movement"
  103. Movement.Value=1
  104. local Damage=Instance.new("NumberValue",Stats)
  105. Damage.Name="Damage"
  106. Damage.Value=1
  107. local Mana=Instance.new("NumberValue",Stats)
  108. Mana.Name="Mana"
  109. Mana.Value=0
  110. local Rooted=Instance.new("BoolValue",Stats)
  111. Rooted.Name="Rooted"
  112. Rooted.Value=false
  113. local BlockValue=Instance.new("BoolValue",Stats)
  114. BlockValue.Name="BlockValue"
  115. BlockValue.Value=false
  116. local StaggerHitAnim=Instance.new("BoolValue",Stats)
  117. StaggerHitAnim.Name="StaggerHitAnim"
  118. StaggerHitAnim.Value=false
  119. local StaggerAnim=Instance.new("BoolValue",Stats)
  120. StaggerAnim.Name="StaggerAnim"
  121. StaggerAnim.Value=false
  122. local StunAnim=Instance.new("BoolValue",Stats)
  123. StunAnim.Name="StunAnim"
  124. StunAnim.Value=false
  125. local StunValue=Instance.new("NumberValue",Stats)
  126. StunValue.Name="StunValue"
  127. StunValue.Value=0
  128. local CanCrit=Instance.new("BoolValue",Stats)
  129. CanCrit.Name="CanCrit"
  130. CanCrit.Value=true
  131. local CritChance=Instance.new("NumberValue",Stats)
  132. CritChance.Name="CritChance"
  133. CritChance.Value=10
  134. local CanPenetrateArmor=Instance.new("BoolValue",Stats)
  135. CanPenetrateArmor.Name="CanPenetrateArmor"
  136. CanPenetrateArmor.Value=false
  137. local AntiTeamKill=Instance.new("BoolValue",Stats)
  138. AntiTeamKill.Name="AntiTeamKill"
  139. AntiTeamKill.Value=false
  140. ----------------------------------------
  141.  
  142. --[[Ignore these values.]]--
  143. local LastPoint=nil
  144. local staggerhitanim=false
  145. local staggeranim=false
  146. local stunanim=false
  147. local CritChanceNumber=0
  148. local CustomColor=Torso.BrickColor
  149. local Colorpart1=CustomColor.r
  150. local Colorpart2=CustomColor.g
  151. local Colorpart3=CustomColor.b
  152. local InverseColor=BrickColor.new(Color3.new(1-Colorpart1,1-Colorpart2,1-Colorpart3))
  153. local idleangle=0
  154. local idlen=0
  155. local donum=0
  156. local sine=0
  157. local change=2/animationspeed
  158. local walkinganim=false
  159. local handidle=false
  160. local walk=0
  161. local someangle=0
  162. local change2=1
  163. local stundelay=0
  164. local manadelay=0
  165. local robloxidleanimation=Instance.new("Animation",Torso)
  166. robloxidleanimation.Name="robloxidleanimation"
  167. robloxidleanimation.AnimationId="http://www.roblox.com/asset/?id=180435571"
  168. local Animator=Humanoid:FindFirstChild("Animator")
  169. local Animate=Character:FindFirstChild("Animate")
  170. ----------------------------------------
  171.  
  172. --[[Damage Function Sounds]]--
  173. local HitPlayerSounds={199149137,199149186,199149221,199149235,199149269,199149297}
  174. local HitArmorSounds={199149321,199149338,199149367,199149409,199149452}
  175. local HitWeaponSounds={199148971,199149025,199149072,199149109,199149119}
  176. local HitBlockSounds={199148933,199148947}
  177. ----------------------------------------
  178.  
  179. --[[Gui Stuff]]--
  180. local cooldown1=0
  181. local cooldown2=0
  182. local cooldown3=0
  183. local cooldown4=0
  184. local scrn=Instance.new('ScreenGui',PlayerGui)
  185. local ud=UDim2.new
  186. local c3=Color3.new
  187. local skillcolorscheme=c3(1,1,1)
  188. function subtractmana(k)
  189. if Mana.Value>=k then
  190. Mana.Value=Mana.Value-k
  191. end
  192. end
  193. ----------------------------------------
  194.  
  195. --[[Gui Settings]]--
  196. local co1=0 --How long it takes for the skill to cool down.
  197. local co2=0
  198. local co3=0
  199. local co4=0
  200. local maxmana=0 --Maximum amount of mana you can have.
  201. local maxstun=1 --Maximum amount of stun you can have.
  202. local recovermana=0 --Amount of mana you gain.
  203. local losestun=0 --Amount of stun you lose.
  204. local stunwait=0 --Delay between losing stun.
  205. local manawait=0 --Delay between gaining mana.
  206. local skill1mana=0 --How much mana is required to use the skill.
  207. local skill2mana=0
  208. local skill3mana=0
  209. local skill4mana=0
  210. local menuupdatespeed=0 --The speed the guis go to update to their size and position.
  211. local constantupdate=false --If true, then the bars will constantly update.
  212. local showstats=false --If true, then the menu will show your movement, defense, damage, and stun.
  213. local allowstunbar=false --If true, then shows the stun bar.
  214. ----------------------------------------
  215.  
  216. --[[Gui Functions]]--
  217. function makeframe(par,trans,pos,size,color,name)
  218. local frame=Instance.new('Frame')
  219. frame.Parent=par
  220. frame.BackgroundTransparency=trans
  221. frame.BorderSizePixel=0
  222. frame.Position=pos
  223. frame.Size=size
  224. frame.BackgroundColor3=color
  225. frame.Name=name
  226. return frame
  227. end
  228.  
  229. function makelabel(par,text,trans,stroketrans,name)
  230. local label=Instance.new('TextLabel')
  231. label.Parent=par
  232. label.BackgroundTransparency=1
  233. label.Size=ud(1,0,1,0)
  234. label.Position=ud(0,0,0,0)
  235. label.TextColor3=c3(255,255,255)
  236. label.TextStrokeTransparency=stroketrans
  237. label.TextTransparency=trans
  238. label.FontSize=Enum.FontSize.Size32
  239. label.Font=Enum.Font.Legacy
  240. label.BorderSizePixel=0
  241. label.TextScaled=true
  242. label.Text=text
  243. label.Name=name
  244. return label
  245. end
  246. ----------------------------------------
  247.  
  248. --[[The Gui]]--
  249. framesk1=makeframe(scrn,0.5,ud(0.23,0,0.93,0),ud(0.26,0,0,0),c3(Colorpart1,Colorpart2,Colorpart3),"Frame 1")
  250. framesk2=makeframe(scrn,0.5,ud(0.5,0,0.93,0),ud(0.26,0,0,0),c3(Colorpart1,Colorpart2,Colorpart3),"Frame 2")
  251. framesk3=makeframe(scrn,0.5,ud(0.5,0,0.86,0),ud(0.26,0,0,0),c3(Colorpart1,Colorpart2,Colorpart3),"Frame 3")
  252. framesk4=makeframe(scrn,0.5,ud(0.23,0,0.86,0),ud(0.26,0,0,0),c3(Colorpart1,Colorpart2,Colorpart3),"Frame 4")
  253. bar1=makeframe(framesk1,0,ud(0,0,0,0),ud(0,0,1,0),c3(Colorpart1,Colorpart2,Colorpart3),"Bar 1")
  254. bar2=makeframe(framesk2,0,ud(0,0,0,0),ud(0,0,1,0),c3(Colorpart1,Colorpart2,Colorpart3),"Bar 2")
  255. bar3=makeframe(framesk3,0,ud(0,0,0,0),ud(0,0,1,0),c3(Colorpart1,Colorpart2,Colorpart3),"Bar 3")
  256. bar4=makeframe(framesk4,0,ud(0,0,0,0),ud(0,0,1,0),c3(Colorpart1,Colorpart2,Colorpart3),"Bar 4")
  257. text1=makelabel(framesk1,"[C] Ability 3",1,1,"Text 1")
  258. text2=makelabel(framesk2,"[V] Ability 4",1,1,"Text 2")
  259. text3=makelabel(framesk3,"[X] Ability 2",1,1,"Text 3")
  260. text4=makelabel(framesk4,"[Z] Ability 1",1,1,"Text 4")
  261. manabar=makeframe(scrn,0.5,ud(0.23,0,0.82,0),ud(0.26,0,0,0),c3(Colorpart1,Colorpart2,Colorpart3),"Mana Bar")
  262. manacover=makeframe(manabar,0,ud(0,0,0,0),ud(0,0,1,0),c3(Colorpart1,Colorpart2,Colorpart3),"Mana Cover")
  263. manatext=makelabel(manabar,"Mana",1,1,"Mana Text")
  264. healthbar=makeframe(scrn,0.5,ud(0.5,0,0.82,0),ud(0.26,0,0,0),c3(255/255,50/255,50/255),"Health Bar")
  265. healthcover=makeframe(healthbar,0,ud(0,0,0,0),ud(0,0,1,0),c3(255/255,50/255,50/255),"Health Cover")
  266. healthtext=makelabel(healthbar,"Health",1,1,"Health Text")
  267. if allowstunbar==true then
  268. stunframe=makeframe(scrn,0.5,ud(0.5,0,0.78,0),ud(0.26,0,0,0),c3(255/255,255/255,50/255),"Stun Frame")
  269. stunbar=makeframe(stunframe,0,ud(0,0,0,0),ud(0,0,1,0),c3(255/255,255/255,50/255),"Stun Bar")
  270. stuntext=makelabel(stunframe,"Stun",1,1,"Stun Text")
  271. end
  272. if showstats==true then
  273. defenseframe=makeframe(scrn,0.5,ud(0.23,0,0.78,0),ud(0.075,0,0,0),c3(100/255,100/255,255/255),"Defense Frame")
  274. damageframe=makeframe(scrn,0.5,ud(0.3225,0,0.78,0),ud(0.075,0,0,0),c3(255/255,100/255,100/255),"Damage Frame")
  275. movementframe=makeframe(scrn,0.5,ud(0.415,0,0.78,0),ud(0.075,0,0,0),c3(100/255,255/255,100/255),"Movement Frame")
  276. --[[
  277. defensecover=makeframe(defenseframe,0,ud(0,0,0,0),ud(1,0,1,0),c3(100/255,100/255,255/255),"Defense Cover")
  278. damagecover=makeframe(damageframe,0,ud(0,0,0,0),ud(1,0,1,0),c3(255/255,100/255,100/255),"Damage Cover")
  279. movementcover=makeframe(movementframe,0,ud(0,0,0,0),ud(1,0,1,0),c3(100/255,255/255,100/255),"Movement Cover")
  280. --]]
  281. defensetext=makelabel(defenseframe,"Defense: "..Defense.Value,1,1,"Defense Text")
  282. damagetext=makelabel(damageframe,"Damage: "..Damage.Value,1,1,"Damage Text")
  283. movementtext=makelabel(movementframe,"Movement: "..Movement.Value,1,1,"Movement Text")
  284. end
  285. ----------------------------------------
  286.  
  287. function NoOutline(Part)
  288. Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
  289. end
  290.  
  291. local function weldBetween(a, b)
  292. local weldd = Instance.new("ManualWeld")
  293. weldd.Part0 = a
  294. weldd.Part1 = b
  295. weldd.C0 = CFrame.new()
  296. weldd.C1 = b.CFrame:inverse() * a.CFrame
  297. weldd.Parent = a
  298. return weldd
  299. end
  300.  
  301. function nooutline(part)
  302. part.TopSurface,part.BottomSurface,part.LeftSurface,part.RightSurface,part.FrontSurface,part.BackSurface = 10,10,10,10,10,10
  303. end
  304.  
  305. function part(formfactor,parent,material,reflectance,transparency,brickcolor,name,size)
  306. local fp=it("Part")
  307. fp.formFactor=formfactor
  308. fp.Parent=parent
  309. fp.Reflectance=reflectance
  310. fp.Transparency=transparency
  311. fp.CanCollide=false
  312. fp.Locked=true
  313. fp.BrickColor=BrickColor.new(tostring(brickcolor))
  314. fp.Name=name
  315. fp.Size=size
  316. fp.Position=Character.Torso.Position
  317. nooutline(fp)
  318. fp.Material=material
  319. fp:BreakJoints()
  320. return fp
  321. end
  322.  
  323. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  324. local mesh=it(Mesh)
  325. mesh.Parent=part
  326. if Mesh=="SpecialMesh" then
  327. mesh.MeshType=meshtype
  328. mesh.MeshId=meshid
  329. end
  330. mesh.Offset=offset
  331. mesh.Scale=scale
  332. return mesh
  333. end
  334.  
  335. function weld(parent,part0,part1,c0,c1)
  336. local weld=it("Motor")
  337. weld.Parent=parent
  338. weld.Part0=part0
  339. weld.Part1=part1
  340. weld.C0=c0
  341. weld.C1=c1
  342. return weld
  343. end
  344.  
  345. m=Instance.new("Model",Character)
  346. m.Name="Orinthion Sword and Shield"
  347.  
  348. --workspace.CurrentCamera.CameraSubject=Head
  349.  
  350. local swordhandle=part(3,m,"SmoothPlastic",0,0,"Really black","Sword Handle",vt())
  351. local swordhandlemesh=mesh("SpecialMesh",swordhandle,"FileMesh","http://www.roblox.com/asset/?id=92542050",vt(0,2.5,0),vt(0.7,0.7,0.7))
  352. swordhandlemesh.TextureId="http://www.roblox.com/asset/?id=92537877"
  353. local swordhandleweld=weld(RightArm,RightArm,swordhandle,cf(0,-1,0)*angles(math.rad(-90),0,0),cf(0,0,0))
  354. local Hitbox=part(3,m,"SmoothPlastic",0,1,"Really black","Hitbox",vt())
  355. local Hitboxweld=weld(swordhandle,swordhandle,Hitbox,cf(0,3.4,0),cf(0,0,0))
  356. local shieldhandle=part(3,m,"SmoothPlastic",0,0,"Really black","Shield Handle",vt())
  357. local shieldhandlemesh=mesh("SpecialMesh",shieldhandle,"FileMesh","http://www.roblox.com/asset/?id=92537560",vt(0,0,0),vt(0.6,0.6,0.6))
  358. shieldhandlemesh.TextureId="http://www.roblox.com/asset/?id=92537839"
  359. local shieldhandleweld=weld(LeftArm,LeftArm,shieldhandle,cf(-0.5,0,0)*angles(0,math.rad(90),math.rad(-90)),cf(0,0,0))
  360.  
  361. Effects=Instance.new("Folder",m)
  362. Effects.Name="Effects"
  363.  
  364. Humanoid.Died:connect(function()
  365. attack=true
  366. for _,v in pairs (Character:GetChildren()) do
  367. if v:IsA"Model" then
  368. m:Destroy()
  369. end
  370. end
  371. end)
  372.  
  373. for i,v in pairs(Character:GetChildren()) do
  374. if v.ClassName=="Model" then
  375. for _,c in pairs(v:GetChildren()) do
  376. if c.ClassName=="Part" then
  377. c.CustomPhysicalProperties=PhysicalProperties.new(0.001,0.001,0.001,0.001,0.001)
  378. end
  379. end
  380. end
  381. end
  382.  
  383. --print("Orinthion Sword and Shield loaded.")
  384.  
  385. function so(id,par,vol,pit)
  386. coroutine.resume(coroutine.create(function()
  387. local sou=Instance.new("Sound",par or workspace)
  388. sou.Volume=vol
  389. sou.Pitch=pit or 1
  390. sou.SoundId="http://roblox.com/asset/?id="..id
  391. hbwait()
  392. sou:play()
  393. game:GetService("Debris"):AddItem(sou,10)
  394. end))
  395. end
  396.  
  397. function clerp(a,b,t)
  398. local qa = {QuaternionFromCFrame(a)}
  399. local qb = {QuaternionFromCFrame(b)}
  400. local ax, ay, az = a.x, a.y, a.z
  401. local bx, by, bz = b.x, b.y, b.z
  402. local _t = 1-t
  403. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  404. end
  405.  
  406. function QuaternionFromCFrame(cf)
  407. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  408. local trace = m00 + m11 + m22
  409. if trace > 0 then
  410. local s = math.sqrt(1 + trace)
  411. local recip = 0.5/s
  412. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  413. else
  414. local i = 0
  415. if m11 > m00 then
  416. i = 1
  417. end
  418. if m22 > (i == 0 and m00 or m11) then
  419. i = 2
  420. end
  421. if i == 0 then
  422. local s = math.sqrt(m00-m11-m22+1)
  423. local recip = 0.5/s
  424. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  425. elseif i == 1 then
  426. local s = math.sqrt(m11-m22-m00+1)
  427. local recip = 0.5/s
  428. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  429. elseif i == 2 then
  430. local s = math.sqrt(m22-m00-m11+1)
  431. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  432. end
  433. end
  434. end
  435.  
  436. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  437. local xs, ys, zs = x + x, y + y, z + z
  438. local wx, wy, wz = w*xs, w*ys, w*zs
  439. local xx = x*xs
  440. local xy = x*ys
  441. local xz = x*zs
  442. local yy = y*ys
  443. local yz = y*zs
  444. local zz = z*zs
  445. 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))
  446. end
  447.  
  448. function QuaternionSlerp(a, b, t)
  449. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  450. local startInterp, finishInterp;
  451. if cosTheta >= 0.0001 then
  452. if (1 - cosTheta) > 0.0001 then
  453. local theta = math.acos(cosTheta)
  454. local invSinTheta = 1/math.sin(theta)
  455. startInterp = math.sin((1-t)*theta)*invSinTheta
  456. finishInterp = math.sin(t*theta)*invSinTheta
  457. else
  458. startInterp = 1-t
  459. finishInterp = t
  460. end
  461. else
  462. if (1+cosTheta) > 0.0001 then
  463. local theta = math.acos(-cosTheta)
  464. local invSinTheta = 1/math.sin(theta)
  465. startInterp = math.sin((t-1)*theta)*invSinTheta
  466. finishInterp = math.sin(t*theta)*invSinTheta
  467. else
  468. startInterp = t-1
  469. finishInterp = t
  470. end
  471. end
  472. 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
  473. end
  474.  
  475. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  476. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  477. end
  478.  
  479. function DamageStatLabel(labeltype,cframe,text,color)
  480. local c=part(3,Effects,"SmoothPlastic",0,1,"Really black","Effect",vt(0,0,0))
  481. c.CFrame=cf(cframe.p+vt(0,1.5,0))
  482. game:GetService("Debris"):AddItem(c,5)
  483. Instance.new("BodyGyro",c)
  484. local f=Instance.new("BodyPosition",c)
  485. f.P=2000
  486. f.D=100
  487. f.maxForce=vt(math.huge,math.huge,math.huge)
  488. if labeltype=="Normal" then
  489. f.position=c.Position+vt(math.random(-2,2),6,math.random(-2,2))
  490. elseif labeltype=="Debuff" then
  491. f.position=c.Position+vt(math.random(-2,2),8,math.random(-2,2))
  492. elseif labeltype=="Interruption" then
  493. f.position=c.Position+vt(math.random(-2,2),8,math.random(-2,2))
  494. end
  495. game:GetService("Debris"):AddItem(c,5)
  496. local bg=Instance.new('BillboardGui',c)
  497. bg.Adornee=c
  498. bg.Size=UDim2.new(2.5,0,2.5,0)
  499. bg.StudsOffset=vt(-2,2,0)
  500. bg.AlwaysOnTop=false
  501. local tl=Instance.new('TextLabel',bg)
  502. tl.BackgroundTransparency=1
  503. tl.Size=UDim2.new(2.5,0,2.5,0)
  504. tl.Text=text
  505. tl.Font=Enum.Font.SourceSans
  506. tl.FontSize=Enum.FontSize.Size42
  507. tl.TextColor3=color
  508. tl.TextScaled=false
  509. tl.TextStrokeTransparency=0
  510. tl.TextScaled=true
  511. tl.TextWrapped=true
  512. f.Parent=c
  513. coroutine.resume(coroutine.create(function(Part,BodyPosition,TextLabel)
  514. wait(0.25)
  515. for i=1,5 do
  516. wait()
  517. BodyPosition.position=Part.Position-vt(0,0.5,0)
  518. end
  519. wait(1.25)
  520. for i=1,5 do
  521. wait()
  522. TextLabel.TextTransparency=TextLabel.TextTransparency+0.2
  523. TextLabel.TextStrokeTransparency=TextLabel.TextStrokeTransparency+0.2
  524. BodyPosition.position=Part.Position+vt(0,0.5,0)
  525. end
  526. Part.Parent=nil
  527. end),c,f,tl)
  528. end
  529.  
  530. function IncreaseStat(Location,Stat,Amount,Duration,ShowTheStat)
  531. if Location:FindFirstChild("Stats")~=nil then
  532. if Location.Stats:FindFirstChild("BlockValue")~=nil then
  533. if Location.Stats:FindFirstChild("BlockValue").Value~=true then
  534. if Location.Stats[Stat]~=nil then
  535. Location.Stats[Stat].Value=Location.Stats[Stat].Value+Amount
  536. if ShowTheStat==true then
  537. if Stat=="Defense" then
  538. DamageStatLabel("Debuff",Location.Head.CFrame,"+Defense",c3(1,1,1))
  539. elseif Stat=="Damage" then
  540. DamageStatLabel("Debuff",Location.Head.CFrame,"+Damage",c3(1,1,1))
  541. elseif Stat=="Movement" then
  542. DamageStatLabel("Debuff",Location.Head.CFrame,"+Movement",c3(1,1,1))
  543. end
  544. end
  545. coroutine.resume(coroutine.create(function(CurrentDecrease)
  546. wait(Duration)
  547. CurrentDecrease.Value=CurrentDecrease.Value-Amount
  548. end),Location.Stats[Stat])
  549. end
  550. else
  551. DamageStatLabel("Interruption",Location.Head.CFrame,"Blocked!",Color3.new(0,100/255,255/255))
  552. end
  553. end
  554. end
  555. end
  556.  
  557. function DecreaseStat(Location,Stat,Amount,Duration,ShowTheStat)
  558. if Location:FindFirstChild("Stats")~=nil then
  559. if Location.Stats:FindFirstChild("BlockValue")~=nil then
  560. if Location.Stats:FindFirstChild("BlockValue").Value~=true then
  561. if Location.Stats[Stat]~=nil then
  562. Location.Stats[Stat].Value=Location.Stats[Stat].Value-Amount
  563. if ShowTheStat==true then
  564. if Stat=="Defense" then
  565. DamageStatLabel("Debuff",Location.Head.CFrame,"-Defense",c3(1,1,1))
  566. elseif Stat=="Damage" then
  567. DamageStatLabel("Debuff",Location.Head.CFrame,"-Damage",c3(1,1,1))
  568. elseif Stat=="Movement" then
  569. DamageStatLabel("Debuff",Location.Head.CFrame,"-Movement",c3(1,1,1))
  570. end
  571. end
  572. coroutine.resume(coroutine.create(function(CurrentDecrease)
  573. wait(Duration)
  574. CurrentDecrease.Value=CurrentDecrease.Value+Amount
  575. end),Location.Stats[Stat])
  576. end
  577. else
  578. DamageStatLabel("Interruption",Location.Head.CFrame,"Blocked!",Color3.new(0,100/255,255/255))
  579. end
  580. end
  581. end
  582. end
  583.  
  584. function GetDistance(Part1,Part2,magnitude)
  585. local target=Part1.Position-Part2.Position
  586. local mag=target.magnitude
  587. if mag<=magnitude then
  588. return true
  589. else
  590. return false
  591. end
  592. end
  593.  
  594. --Usage: Damagefunc(hit,5,10,math.random(5,10),"Normal",Part,0.5,1,math.random(5,10),nil,true,false,nil,0,0,false)
  595.  
  596. Damagefunc=function(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,incstun,stagger,staggerhit,ranged,DecreaseTheStat,DecreaseAmount,DecreaseDuration,ShowDecreasedStat)
  597. if hit.Parent==nil then
  598. return
  599. end
  600. h=hit.Parent:FindFirstChild("Humanoid")
  601. for _,v in pairs(hit.Parent:GetChildren()) do
  602. if v:IsA("Humanoid") then
  603. h=v
  604. end
  605. end
  606. if hit.Name=="Hitbox" and ranged~=true and hit.Parent~=m then
  607. StaggerHitAnim.Value=true
  608. so(HitWeaponSounds[math.random(1,#HitWeaponSounds)],hit,1,1)
  609. return
  610. end
  611. if AntiTeamKill.Value==true then
  612. if game.Players:FindFirstChild(hit.Parent.Name)~=nil then
  613. opponent=game.Players:FindFirstChild(hit.Parent.Name)
  614. end
  615. if opponent~=nil then
  616. if opponent.TeamColor==Player.TeamColor then
  617. return
  618. end
  619. end
  620. end
  621. if hit.Parent.Parent:FindFirstChild("Torso")~=nil then
  622. h=hit.Parent.Parent:FindFirstChild("Humanoid")
  623. end
  624. if hit.Parent.className=="Hat" then
  625. hit=hit.Parent.Parent:FindFirstChild("Head")
  626. end
  627. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  628. if hit.Parent:FindFirstChild("DebounceHit")~=nil then
  629. if hit.Parent.DebounceHit.Value==true then
  630. return
  631. end
  632. end
  633. if hit.Parent:FindFirstChild("Humanoid")~=nil then
  634. if hit.Parent:FindFirstChild("Humanoid").Health<=0 then
  635. return
  636. end
  637. end
  638. if hit.Parent:FindFirstChild("Stats")~=nil then
  639. if hit.Parent.Stats:FindFirstChild("StunValue")~=nil then
  640. hit.Parent.Stats:FindFirstChild("StunValue").Value=hit.Parent.Stats:FindFirstChild("StunValue").Value+incstun
  641. end
  642. end
  643. if hit.Parent:FindFirstChild("Stats")~=nil then
  644. if hit.Parent.Stats:FindFirstChild("StaggerAnim")~=nil then
  645. if stagger==true then
  646. hit.Parent.Stats:FindFirstChild("StaggerAnim").Value=true
  647. end
  648. end
  649. end
  650. if hit.Parent:FindFirstChild("Stats")~=nil then
  651. if hit.Parent.Stats:FindFirstChild("BlockValue")~=nil then
  652. if hit.Parent.Stats:FindFirstChild("BlockValue").Value==true then
  653. if hit.Parent.Stats:FindFirstChild("BlockDebounce")==nil then
  654. DamageStatLabel("Interruption",hit.Parent.Head.CFrame,"Blocked!",Color3.new(0,100/255,255/255))
  655. local BlockDebounce=Instance.new("BoolValue",hit.Parent.Stats)
  656. BlockDebounce.Name="BlockDebounce"
  657. BlockDebounce.Value=true
  658. game:GetService("Debris"):AddItem(BlockDebounce,0.1)
  659. end
  660. if ranged~=true then
  661. if hit.Parent.Stats:FindFirstChild("BlockDebounce2")==nil then
  662. local BlockDebounce2=Instance.new("BoolValue",hit.Parent.Stats)
  663. BlockDebounce2.Name="BlockDebounce2"
  664. BlockDebounce2.Value=true
  665. game:GetService("Debris"):AddItem(BlockDebounce2,0.1)
  666. so(HitBlockSounds[math.random(1,#HitBlockSounds)],hit,1,1)
  667. end
  668. hit.Parent.Stats:FindFirstChild("BlockValue").Value=false
  669. StaggerAnim.Value=true
  670. end
  671. return
  672. end
  673. end
  674. end
  675. if DecreaseTheStat~=nil then
  676. if hit.Parent:FindFirstChild("Stats")~=nil then
  677. if DecreaseTheStat=="Defense" then
  678. DecreaseStat(hit.Parent,"Defense",DecreaseAmount,DecreaseDuration,ShowDecreasedStat)
  679. elseif DecreaseTheStat=="Damage" then
  680. DecreaseStat(hit.Parent,"Damage",DecreaseAmount,DecreaseDuration,ShowDecreasedStat)
  681. elseif DecreaseTheStat=="Movement" then
  682. DecreaseStat(hit.Parent,"Movement",DecreaseAmount,DecreaseDuration,ShowDecreasedStat)
  683. end
  684. end
  685. end
  686. local D=math.random(minim,maxim)*Damage.Value
  687. if hit.Parent:FindFirstChild("Stats")~=nil then
  688. if hit.Parent.Stats:FindFirstChild("Defense") then
  689. if CanPenetrateArmor.Value==true then
  690. D=D
  691. else
  692. D=D/hit.Parent.Stats:FindFirstChild("Defense").Value
  693. end
  694. elseif hit.Parent.Stats:FindFirstChild("Defense")==nil then
  695. D=D
  696. end
  697. end
  698. if CanCrit.Value==true then
  699. CritChanceNumber=math.random(1,CritChance.Value)
  700. if CritChanceNumber==CritChance.Value then
  701. D=D*2
  702. end
  703. end
  704. D=math.floor(D)
  705. h.Health=h.Health-D
  706. if D<=3 and staggerhit==true then
  707. if ranged~=true then
  708. StaggerHitAnim.Value=true
  709. end
  710. if ranged~=true then
  711. so(HitArmorSounds[math.random(1,#HitArmorSounds)],hit,1,1)
  712. end
  713. elseif D>3 and ranged~=true then
  714. so(HitPlayerSounds[math.random(1,#HitPlayerSounds)],hit,1,1)
  715. end
  716. if D>3 and D<20 then
  717. if CanCrit.Value==true and CritChanceNumber==CritChance.Value then
  718. DamageStatLabel("Normal",hit.Parent.Head.CFrame,"Crit! "..D,Color3.new(200/255,0,0))
  719. so("296102734",hit,1,1)
  720. else
  721. DamageStatLabel("Normal",hit.Parent.Head.CFrame,D,Color3.new(255/255,220/255,0))
  722. end
  723. elseif D>=20 then
  724. if CanCrit.Value==true and CritChanceNumber==CritChance.Value then
  725. DamageStatLabel("Normal",hit.Parent.Head.CFrame,"Crit! "..D,Color3.new(200/255,0,0))
  726. so("296102734",hit,1,1)
  727. else
  728. DamageStatLabel("Normal",hit.Parent.Head.CFrame,D,Color3.new(255/255,0,0))
  729. end
  730. elseif D<=3 then
  731. if CanCrit.Value==true and CritChanceNumber==CritChance.Value then
  732. DamageStatLabel("Normal",hit.Parent.Head.CFrame,"Crit! "..D,Color3.new(200/255,0,0))
  733. so("296102734",hit,1,1)
  734. else
  735. DamageStatLabel("Normal",hit.Parent.Head.CFrame,D,Color3.new(225/255,225/255,225/255))
  736. end
  737. else
  738. end
  739. if Type=="Normal" then
  740. local vp=Instance.new("BodyVelocity")
  741. vp.P=500
  742. vp.maxForce=vt(math.huge,0,math.huge)
  743. if KnockbackType==1 then
  744. vp.Velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05
  745. elseif KnockbackType==2 then
  746. vp.Velocity=Property.CFrame.lookVector*knockback
  747. end
  748. if knockback>0 then
  749. vp.Parent=hit.Parent.Torso
  750. end
  751. game:GetService("Debris"):AddItem(vp,0.5)
  752. elseif Type=="ShieldBlast" then
  753. local vp=Instance.new("BodyVelocity")
  754. vp.P=500
  755. vp.maxForce=vt(10000,10000,10000)
  756. vp.Velocity=((hit.Position-Property.Position).unit+vt(0,1,0))*knockback
  757. if knockback>0 then
  758. vp.Parent=hit.Parent.Torso
  759. end
  760. game:GetService("Debris"):AddItem(vp,0.5)
  761. elseif Type=="ElectricGroundSmash" then
  762. local vp=Instance.new("BodyVelocity")
  763. vp.P=500
  764. vp.maxForce=vt(0,math.huge,0)
  765. vp.Velocity=vt(0,1,0)*knockback
  766. if knockback>0 then
  767. vp.Parent=hit.Parent.Torso
  768. end
  769. game:GetService("Debris"):AddItem(vp,0.5)
  770. elseif Type=="ElectricBlast" then
  771. local vp=Instance.new("BodyVelocity")
  772. vp.P=500
  773. vp.maxForce=vt(10000,0,10000)
  774. vp.Velocity=(hit.Position-Property.Position).unit*knockback
  775. if knockback>0 then
  776. vp.Parent=hit.Parent.Torso
  777. end
  778. game:GetService("Debris"):AddItem(vp,0.5)
  779. end
  780. local DebounceHit=Instance.new("BoolValue",hit.Parent)
  781. DebounceHit.Name="DebounceHit"
  782. DebounceHit.Value=true
  783. game:GetService("Debris"):AddItem(DebounceHit,Delay)
  784. end
  785. end
  786.  
  787. --Usage: MagniDamage(Part,5,5,10,math.random(5,10),"Normal",Part,0.5,1,math.random(5,10),nil,true,false,nil,0,0,false)
  788. function MagniDamage(Part,magni,mindam,maxdam,knock,Type,Property,Delay,KnockbackType,incstun,stagger,staggerhit,ranged,MagicDecreaseTheStat,MagicDecreaseAmount,MagicDecreaseDuration,MagicShowDecreasedStat)
  789. for _,c in pairs(workspace:GetChildren()) do
  790. local hum=c:FindFirstChild("Humanoid")
  791. local head=nil
  792. if hum~=nil then
  793. head=c:FindFirstChild("Torso")
  794. if head~=nil then
  795. local targ=head.Position-Part.Position
  796. local mag=targ.magnitude
  797. if mag<=magni and c.Name~=Player.Name then
  798. Damagefunc(head,mindam,maxdam,knock,Type,Property,Delay,KnockbackType,incstun,stagger,staggerhit,ranged,MagicDecreaseTheStat,MagicDecreaseAmount,MagicDecreaseDuration,MagicShowDecreasedStat)
  799. end
  800. end
  801. for _,d in pairs(c:GetChildren()) do
  802. if d.ClassName=="Model" and ranged~=true then
  803. head=d:FindFirstChild("Hitbox")
  804. if head~=nil then
  805. local targ=head.Position-Part.Position
  806. local mag=targ.magnitude
  807. if mag<=magni and c.Name~=Player.Name then
  808. local hitrefpart=part(3,Effects,"SmoothPlastic",0,1,"Really black","Effect",vt())
  809. hitrefpart.Anchored=true
  810. hitrefpart.CFrame=cf(head.Position)
  811. so(HitWeaponSounds[math.random(1,#HitWeaponSounds)],hitrefpart,1,1)
  812. StaggerHitAnim.Value=true
  813. end
  814. end
  815. end
  816. end
  817. end
  818. end
  819. end
  820.  
  821. --[[Effects]]--
  822. function Lightning(p0,p1,tym,ofs,brickcolor,material,th,tra,last)
  823. --[[p0=pos1
  824. p1=pos2
  825. tym=times
  826. ofs=offset
  827. col=color
  828. th=size
  829. tra=transparency
  830. last=lastingtime]]
  831. local magz=(p0-p1).magnitude
  832. local curpos=p0
  833. local trz={-ofs,ofs}
  834. for i=1,tym do
  835. local li=part(3,Effects,material,0,0,brickcolor,"Effect",vt(th,th,magz/tym))
  836. li.Anchored=true
  837. local ofz=vt(trz[math.random(1,2)],trz[math.random(1,2)],trz[math.random(1,2)])
  838. local trolpos=cf(curpos,p1)*cf(0,0,magz/tym).p+ofz
  839. if tym==i then
  840. local magz2=(curpos-p1).magnitude
  841. li.Size=vt(th,th,magz2)
  842. li.CFrame=cf(curpos,p1)*cf(0,0,-magz2/2)
  843. else
  844. li.CFrame=cf(curpos,trolpos)*cf(0,0,magz/tym/2)
  845. end
  846. curpos=li.CFrame*cf(0,0,magz/tym/2).p
  847. game.Debris:AddItem(li,last)
  848. coroutine.resume(coroutine.create(function()
  849. while li.Transparency~=1 do
  850. --local StartTransparency=tra
  851. for i=0,1,last do
  852. hbwait()
  853. li.Transparency=li.Transparency+(0.1/last)
  854. end
  855. end
  856. end))
  857. end
  858. end
  859.  
  860. function MagicRing(brickcolor,material,cframe,x1,y1,z1,x3,y3,z3,delay)
  861. local prt=part(3,Effects,material,0,0,brickcolor,"Effect",vt())
  862. prt.Anchored=true
  863. prt.CFrame=cframe
  864. local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(x1,y1,z1))
  865. game:GetService("Debris"):AddItem(prt,10)
  866. coroutine.resume(coroutine.create(function(Part,Mesh)
  867. for i=0,1,delay do
  868. hbwait()
  869. Part.CFrame=Part.CFrame
  870. Part.Transparency=i
  871. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  872. end
  873. Part.Parent=nil
  874. end),prt,msh)
  875. end
  876.  
  877. function MagicWave(brickcolor,material,cframe,x1,y1,z1,x3,y3,z3,delay)
  878. local prt=part(3,Effects,material,0,0,brickcolor,"Effect",vt())
  879. prt.Anchored=true
  880. prt.CFrame=cframe
  881. local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=20329976",vt(0,0,(-0.1*z1)),vt(x1,y1,z1))
  882. game:GetService("Debris"):AddItem(prt,10)
  883. coroutine.resume(coroutine.create(function(Part,Mesh)
  884. for i=0,1,delay do
  885. hbwait()
  886. Part.CFrame=Part.CFrame
  887. Part.Transparency=i
  888. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  889. end
  890. Part.Parent=nil
  891. end),prt,msh)
  892. end
  893.  
  894. function MagicBlock(brickcolor,material,rotate,cframe,x1,y1,z1,x3,y3,z3,delay)
  895. local prt=part(3,Effects,material,0,0,brickcolor,"Effect",vt())
  896. prt.Anchored=true
  897. prt.CFrame=cframe*angles(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  898. local msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  899. game:GetService("Debris"):AddItem(prt,10)
  900. coroutine.resume(coroutine.create(function(Part,Mesh)
  901. for i=0,1,delay do
  902. hbwait()
  903. if rotate==true then
  904. Part.CFrame=Part.CFrame*angles(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  905. else
  906. end
  907. Part.Transparency=i
  908. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  909. end
  910. Part.Parent = nil
  911. end),prt,msh)
  912. end
  913.  
  914. function MagicBlock2(brickcolor,material,rotate,cframe,x1,y1,z1,x3,y3,z3,delay)
  915. local prt=part(3,Effects,material,0,0,brickcolor,"Effect",vt())
  916. prt.Anchored=true
  917. prt.CFrame=cframe*angles(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  918. local msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  919. game:GetService("Debris"):AddItem(prt,10)
  920. CF=prt.CFrame
  921. num=math.random(5,20)
  922. coroutine.resume(coroutine.create(function(Part,Mesh,CF2,Num)
  923. for i=0,1,delay do
  924. hbwait()
  925. if rotate==true then
  926. Part.CFrame=CF2*cf(0,i*Num,0)*angles(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  927. else
  928. Part.CFrame=CF2*cf(0,i*Num,0)
  929. end
  930. Part.Transparency=i
  931. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  932. end
  933. Part.Parent=nil
  934. end),prt,msh,CF,num)
  935. end
  936.  
  937. function MagicCylinder(brickcolor,material,cframe,x1,y1,z1,x3,y3,z3,delay)
  938. local prt=part(3,Effects,material,0,0,brickcolor,"Effect",vt())
  939. prt.Anchored=true
  940. prt.CFrame=cframe
  941. local msh=mesh("CylinderMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  942. game:GetService("Debris"):AddItem(prt,10)
  943. coroutine.resume(coroutine.create(function(Part,Mesh)
  944. for i=0,1,delay do
  945. hbwait()
  946. Part.Transparency=i
  947. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  948. end
  949. Part.Parent=nil
  950. end),prt,msh)
  951. end
  952.  
  953. function MagicCircle(brickcolor,material,cframe,x1,y1,z1,x3,y3,z3,delay)
  954. local prt=part(3,Effects,material,0,0,brickcolor,"Effect",vt())
  955. prt.Anchored=true
  956. prt.CFrame=cframe
  957. local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
  958. game:GetService("Debris"):AddItem(prt,10)
  959. coroutine.resume(coroutine.create(function(Part,Mesh)
  960. for i=0,1,delay do
  961. hbwait()
  962. Part.Transparency=i
  963. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  964. end
  965. Part.Parent=nil
  966. end),prt,msh)
  967. end
  968.  
  969. function MagicHead(brickcolor,material,cframe,x1,y1,z1,x3,y3,z3,delay)
  970. local prt=part(3,Effects,material,0,0,brickcolor,"Effect",vt())
  971. prt.Anchored=true
  972. prt.CFrame=cframe
  973. local msh=mesh("SpecialMesh",prt,"Head","",vt(0,0,0),vt(x1,y1,z1))
  974. game:GetService("Debris"):AddItem(prt,10)
  975. coroutine.resume(coroutine.create(function(Part,Mesh)
  976. for i=0,1,delay do
  977. hbwait()
  978. Part.Transparency=i
  979. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  980. end
  981. Part.Parent=nil
  982. end),prt,msh)
  983. end
  984.  
  985. function BreakEffect(brickcolor,material,rotate,cframe,x1,y1,z1,delay)
  986. local prt=part(3,Effects,material,0,0,brickcolor,"Effect",vt())
  987. prt.Anchored=true
  988. prt.CFrame=cframe*angles(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  989. local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
  990. game:GetService("Debris"):AddItem(prt,10)
  991. coroutine.resume(coroutine.create(function(Part,CF,Numbb,randnumb)
  992. CF=Part.CFrame
  993. Numbb=0
  994. randnumb=math.random()-math.random()
  995. for i=0,1,delay do
  996. hbwait()
  997. CF=CF*cf(0,1,0)
  998. if rotate==true then
  999. Part.CFrame=CF*angles(Numbb,0,0)
  1000. elseif rotate==false then
  1001. Part.CFrame=CF
  1002. end
  1003. Part.Transparency=i
  1004. Numbb=Numbb+randnumb
  1005. end
  1006. Part.Parent=nil
  1007. end),prt,CF,Numbb,randnumb)
  1008. end
  1009.  
  1010. function ElecEffect(brickcolor,material,cf,x,y,z,delay)
  1011. local prt=part(3,Effects,material,0,0,brickcolor,"Effect",vt())
  1012. prt.Anchored=true
  1013. prt.CFrame=cf
  1014. xval=math.random()
  1015. yval=math.random()
  1016. zval=math.random()
  1017. local msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x,y,z))
  1018. game:GetService("Debris"):AddItem(prt,10)
  1019. coroutine.resume(coroutine.create(function(Part,Mesh,xvaal,yvaal,zvaal)
  1020. for i=0,1,delay do
  1021. hbwait()
  1022. Part.CFrame=Part.CFrame
  1023. xvaal=xvaal-0.1*(delay*10)
  1024. yvaal=yvaal-0.1*(delay*10)
  1025. zvaal=zvaal-0.1*(delay*10)
  1026. Mesh.Scale=Mesh.Scale+vt(xvaal,yvaal,zvaal)
  1027. Part.Transparency=i
  1028. end
  1029. Part.Parent=nil
  1030. end),prt,msh,xval,yval,zval)
  1031. end
  1032.  
  1033. function TrailEffect(brickcolor,material,currentcf,oldcf,meshtype,reflectance,size,x,y,z,delay)
  1034. local magnitudecframe=(currentcf.p-oldcf.p).magnitude
  1035. local prt=part(3,Effects,material,reflectance,0,brickcolor,"Effect",vt(1,magnitudecframe,1))
  1036. prt.Anchored=true
  1037. prt.CFrame=cf((currentcf.p+oldcf.p)/2,oldcf.p)*angles(math.rad(90),0,0)
  1038. local TheMeshType="BlockMesh"
  1039. if meshtype=="Cylinder" then
  1040. TheMeshType="CylinderMesh"
  1041. end
  1042. local msh=mesh(TheMeshType,prt,"","",vt(0,0,0),vt(0+size,1,0+size))
  1043. game:GetService("Debris"):AddItem(prt,10)
  1044. coroutine.resume(coroutine.create(function(Part,Mesh,TheCurrentCFrame,TheLastCFrame)
  1045. for i=0,1,delay do
  1046. hbwait()
  1047. Part.Transparency=i
  1048. Mesh.Scale=Mesh.Scale+vt(x,y,z)
  1049. end
  1050. Part.Parent=nil
  1051. end),prt,msh,currentcf,oldcf)
  1052. end
  1053.  
  1054. function ClangEffect(brickcolor,material,cframe,angle,duration,size,power,reflectance,x,y,z,delay)
  1055. local prt=part(3,Effects,material,0,1,brickcolor,"Effect",vt())
  1056. prt.Anchored=true
  1057. prt.CFrame=cframe
  1058. local msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(0,0,0))
  1059. game:GetService("Debris"):AddItem(prt,10)
  1060. local TheLastPoint=cframe
  1061. coroutine.resume(coroutine.create(function(Part)
  1062. for i=1,duration do
  1063. hbwait()
  1064. Part.CFrame=Part.CFrame*angles(math.rad(angle),0,0)*cf(0,power,0)
  1065. TrailEffect(brickcolor,material,Part.CFrame,TheLastPoint,"Cylinder",reflectance,size,x,y,z,delay)
  1066. TheLastPoint=Part.CFrame
  1067. end
  1068. Part.Parent=nil
  1069. end),prt)
  1070. end
  1071.  
  1072. function MagicCone(brickcolor,material,cframe,x1,y1,z1,x3,y3,z3,delay)
  1073. local prt=part(3,Effects,material,0,0,brickcolor,"Effect",vt())
  1074. prt.Anchored=true
  1075. prt.CFrame=cframe
  1076. local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=1778999",vt(0,0,0),vt(x1,y1,z1))
  1077. game:GetService("Debris"):AddItem(prt,10)
  1078. coroutine.resume(coroutine.create(function(Part,Mesh)
  1079. for i=0,1,delay do
  1080. hbwait()
  1081. Part.Transparency=i
  1082. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1083. end
  1084. Part.Parent=nil
  1085. end),prt,msh)
  1086. end
  1087.  
  1088. function MagicFlatCone(brickcolor,material,cframe,x1,y1,z1,x3,y3,z3,delay)
  1089. local prt=part(3,Effects,material,0,0,brickcolor,"Effect",vt())
  1090. prt.Anchored=true
  1091. prt.CFrame=cframe
  1092. local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=1033714",vt(0,0,0),vt(x1,y1,z1))
  1093. game:GetService("Debris"):AddItem(prt,10)
  1094. coroutine.resume(coroutine.create(function(Part,Mesh)
  1095. for i=0,1,delay do
  1096. hbwait()
  1097. Part.Transparency=i
  1098. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1099. end
  1100. Part.Parent=nil
  1101. end),prt,msh)
  1102. end
  1103.  
  1104. function MagicSpikedCrown(brickcolor,material,cframe,x1,y1,z1,x3,y3,z3,delay)
  1105. local prt=part(3,Effects,material,0,0,brickcolor,"Effect",vt())
  1106. prt.Anchored=true
  1107. prt.CFrame=cframe
  1108. local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=1323306",vt(0,0,0),vt(x1,y1,z1))
  1109. game:GetService("Debris"):AddItem(prt,10)
  1110. coroutine.resume(coroutine.create(function(Part,Mesh)
  1111. for i=0,1,delay do
  1112. hbwait()
  1113. Part.Transparency=i
  1114. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1115. end
  1116. Part.Parent=nil
  1117. end),prt,msh)
  1118. end
  1119.  
  1120. function MagicCrown(brickcolor,material,cframe,x1,y1,z1,x3,y3,z3,delay)
  1121. local prt=part(3,Effects,material,0,0,brickcolor,"Effect",vt())
  1122. prt.Anchored=true
  1123. prt.CFrame=cframe
  1124. local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=1078075",vt(0,0,0),vt(x1,y1,z1))
  1125. game:GetService("Debris"):AddItem(prt,10)
  1126. coroutine.resume(coroutine.create(function(Part,Mesh)
  1127. for i=0,1,delay do
  1128. hbwait()
  1129. Part.Transparency=i
  1130. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1131. end
  1132. Part.Parent=nil
  1133. end),prt,msh)
  1134. end
  1135.  
  1136. function MagicSkull(brickcolor,material,cframe,x1,y1,z1,x3,y3,z3,delay)
  1137. local prt=part(3,Effects,material,0,0,brickcolor,"Effect",vt())
  1138. prt.Anchored=true
  1139. prt.CFrame=cframe
  1140. local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=4770583",vt(0,0,0),vt(x1,y1,z1))
  1141. game:GetService("Debris"):AddItem(prt,10)
  1142. coroutine.resume(coroutine.create(function(Part,Mesh)
  1143. for i=0,1,delay do
  1144. hbwait()
  1145. Part.Transparency=i
  1146. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1147. end
  1148. Part.Parent=nil
  1149. end),prt,msh)
  1150. end
  1151. ----------------------------------------
  1152.  
  1153. --[[Projectile or something similar]]--
  1154. --[[
  1155. local spread=vt(0,0,0)
  1156. local MainPos=Part.Position
  1157. local MainPos2=Mouse.Hit.p+spread
  1158. local MouseLook=cf((MainPos+MainPos2)/2,MainPos2)
  1159. local speed=2
  1160. local num=30
  1161. coroutine.resume(coroutine.create(function()
  1162. repeat
  1163. hbwait()
  1164. local hit,pos=rayCast(MainPos,MouseLook.lookVector,speed,ShotTarget.Parent)
  1165. local mag=(MainPos-pos).magnitude
  1166. MagicCylinder(CustomColor,cf((MainPos+pos)/2,pos)*angles(math.rad(90),0,0),1,mag*(speed/(speed/2)),1,0,0,0,0.1)
  1167. MainPos=MainPos+(MouseLook.lookVector*speed)
  1168. MouseLook=MouseLook*angles(math.rad(-1),0,0)
  1169. num=num-1
  1170. if hit~=nil then
  1171. num=0
  1172. local refpart=part(3,workspace,"SmoothPlastic",0,1,BrickColor.new("Really black"),"Effect",vt())
  1173. refpart.Anchored=true
  1174. refpart.CFrame=cf(pos)
  1175. game:GetService("Debris"):AddItem(refpart,0.1)
  1176. elseif num<=0 then
  1177. local refpart=part(3,workspace,"SmoothPlastic",0,1,BrickColor.new("Really black"),"Effect",vt())
  1178. refpart.Anchored=true
  1179. refpart.CFrame=cf(pos)
  1180. game:GetService("Debris"):AddItem(refpart,0.1)
  1181. end
  1182. until num<=0
  1183. end))
  1184. ]]--
  1185. --------------------------------
  1186.  
  1187. --[[Laser]]--
  1188. --[[
  1189. local spread=vt(0,0,0) --How much spread the laser has. Set all to 0 for no spread.
  1190. local range=999
  1191. local MainPos=Part.Position --The Part the laser starts at.
  1192. local MainPos2=Mouse.Hit.p+spread --Where the laser will go to.
  1193. local MouseLook=cf((MainPos+MainPos2)/2,MainPos2) --Ignore this.
  1194. local hit,pos=rayCast(MainPos,MouseLook.lookVector,range,ShotTarget.Parent) --Also ignore this.
  1195. local mag=(MainPos-pos).magnitude
  1196. MagicCylinder(CustomColor,cf((MainPos+pos)/2,pos)*angles(math.rad(90),0,0),1,mag*5,1,0,0,0,0.1)
  1197. if hit~=nil then
  1198. local refpart=part(3,workspace,"SmoothPlastic",0,1,BrickColor.new("Really black"),"Effect",vt())
  1199. refpart.Anchored=true
  1200. refpart.CFrame=cf(pos)
  1201. game:GetService("Debris"):AddItem(refpart,0.1)
  1202. end
  1203. ]]--
  1204. --------------------------------
  1205.  
  1206. --[[Customization]]--
  1207. --[[Only choose one of these options or conflict will occur.]]--
  1208. local startequipped=true --Makes the Player start with their weapon equipped.
  1209. local startequippedwithequipanimation=false --Makes the Player start with their weapon equipped and plays the equip animation.
  1210. ----------------------------------------
  1211. --[[Only choose one of these options or conflict will occur.]]--
  1212. local disableanimator=true --Disables the animator script and the Player will NOT have their idle animation playing.
  1213. local disableanimate=false --Disables the animate script, but the Player will still have their idle animation playing.
  1214. ----------------------------------------
  1215. --[[Set this to true if you want an alternate walk.]]--
  1216. local alternatewalk=false --If true, then the walking function uses a different walking animation. If false, then it will use the default walking animation.
  1217. ----------------------------------------
  1218. --[[Gui stuff]]--
  1219. local hidemenu=false --Hides the menus on your screen, but does NOT disable it (Unless if it's already disabled).
  1220. local allowmenutofunction=false --Allows the menu to run, but only shows the mana and health bars.
  1221. local allowabilitiestofunction=false --Allows abilities with cooldowns. Doesn't work if "allowmenutofunction" is set to false.
  1222. ----------------------------------------
  1223. --[[Other Customization]]--
  1224. local canunequiporequip=false --Allows or restricts the Player to equip or unequip their weapon.
  1225. local allowidle=false --Allows the idle animation to run while the Player has their weapon equipped. Most noticable with the animator disabled.
  1226. local allowwalking=false --Allows the walking animation to run while the Player walks. Noticable with either the animate or animator disabled.
  1227. local disablemovingarms=false --Allows or restricts the arms from moving. Most noticable when both the animate and animator are not disabled.
  1228. local usemotorsinsteadofwelds=false --If true, then uses motors instead of welds. Pretty self-explanatory.
  1229. local leftarm=false --Allows the left arm to move around while you walk.
  1230. local rightarm=false --Allows the right arm to move around while you walk.
  1231. local allowhopperbin=false --If true, then creates a tool in the Player's inventory, which they must select to use the weapon.
  1232. local showstunbar=false --If true, then a stun mechanic will be put in place. Requires "allowstunbar" to be set to true.
  1233. local walkspeeddependsonmovementvalue=false --If true, then walkspeed will depend on the movement's value.
  1234. local alternatemanaregensystem=false --If true, then uses an alternate mana regen that adds the desired mana after a desired delay.
  1235. local showhealthmanaandstunnumbers=false --If true, then shows how much mana and health you have in a number box.
  1236. local changebarcolorsifnotenoughmana=false --If true, then if you do not have enough mana for an ability the bar will turn grey.
  1237. local disablejump=false --If true, then disables jumping.
  1238. ----------------------------------------
  1239. --[[End of Customization]]--
  1240.  
  1241. if hidemenu==true then
  1242. for _,v in pairs (scrn:GetChildren()) do
  1243. if v.ClassName=="Frame" or v.ClassName=="TextLabel" then
  1244. v.Visible=false
  1245. end
  1246. end
  1247. end
  1248.  
  1249. Humanoid.Changed:connect(function(Jump)
  1250. if Jump=="Jump" and disablejump==true then
  1251. Humanoid.Jump=false
  1252. end
  1253. end)
  1254.  
  1255. if allowmenutofunction==true then
  1256. for _,v in pairs (scrn:GetChildren()) do
  1257. if v.ClassName=="Frame" then
  1258. for _,b in pairs (v:GetChildren()) do
  1259. if b.ClassName=="TextLabel" then
  1260. coroutine.resume(coroutine.create(function(TheTextLabel)
  1261. wait(menuupdatespeed)
  1262. for i=1,0,-0.1 do
  1263. hbwait()
  1264. TheTextLabel.TextTransparency=i
  1265. TheTextLabel.TextStrokeTransparency=i
  1266. end
  1267. TheTextLabel.TextTransparency=0
  1268. TheTextLabel.TextStrokeTransparency=0
  1269. end),b)
  1270. if showstats==true then
  1271. coroutine.resume(coroutine.create(function(TheTextLabel)
  1272. wait(menuupdatespeed)
  1273. for i=1,0,-0.1 do
  1274. hbwait()
  1275. TheTextLabel.TextTransparency=i
  1276. TheTextLabel.TextStrokeTransparency=i
  1277. end
  1278. TheTextLabel.TextTransparency=0
  1279. TheTextLabel.TextStrokeTransparency=0
  1280. end),b)
  1281. end
  1282. if showstunbar==true then
  1283. coroutine.resume(coroutine.create(function(TheTextLabel)
  1284. wait(menuupdatespeed)
  1285. for i=1,0,-0.1 do
  1286. hbwait()
  1287. TheTextLabel.TextTransparency=i
  1288. TheTextLabel.TextStrokeTransparency=i
  1289. end
  1290. TheTextLabel.TextTransparency=0
  1291. TheTextLabel.TextStrokeTransparency=0
  1292. end),b)
  1293. end
  1294. if allowabilitiestofunction==true then
  1295. coroutine.resume(coroutine.create(function(TheTextLabel)
  1296. wait(menuupdatespeed)
  1297. for i=1,0,-0.1 do
  1298. hbwait()
  1299. TheTextLabel.TextTransparency=i
  1300. TheTextLabel.TextStrokeTransparency=i
  1301. end
  1302. TheTextLabel.TextTransparency=0
  1303. TheTextLabel.TextStrokeTransparency=0
  1304. end),b)
  1305. end
  1306. end
  1307. end
  1308. end
  1309. end
  1310. end
  1311.  
  1312. if allowhopperbin==true then
  1313. if (script.Parent.className~="HopperBin") then
  1314. Tool=Instance.new("HopperBin")
  1315. Tool.Parent=Backpack
  1316. Tool.Name="Orinthion Sword and Shield"
  1317. script.Parent=Tool
  1318. end
  1319. Bin=script.Parent
  1320. end
  1321.  
  1322. if disablemovingarms==true then
  1323. RWC0=cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0))
  1324. LWC0=cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0))
  1325. RSH, LSH=nil, nil
  1326. if usemotorsinsteadofwelds==true then
  1327. RW=Instance.new("Motor")
  1328. LW=Instance.new("Motor")
  1329. else
  1330. RW=Instance.new("Weld")
  1331. LW=Instance.new("Weld")
  1332. end
  1333. RW.Name="Right Shoulder"
  1334. LW.Name="Left Shoulder"
  1335. RSH=Torso["Right Shoulder"]
  1336. LSH=Torso["Left Shoulder"]
  1337. --
  1338. RSH.Parent=Torso
  1339. LSH.Parent=Torso
  1340. --
  1341. RW.Name="Right Shoulder"
  1342. RW.Part0=Torso
  1343. RW.C0=cf(1.5,0.5,0)
  1344. RW.C1=cf(0,0.5,0)
  1345. RW.Part1=Character["Right Arm"]
  1346. RW.Parent=nil
  1347. --
  1348. LW.Name="Left Shoulder"
  1349. LW.Part0=Torso
  1350. LW.C0=cf(-1.5, 0.5, 0)
  1351. LW.C1=cf(0, 0.5, 0)
  1352. LW.Part1=Character["Left Arm"]
  1353. LW.Parent=nil
  1354. --
  1355. else
  1356. RW=Torso["Right Shoulder"]
  1357. LW=Torso["Left Shoulder"]
  1358. RWC0=cf(-0.5,0,0)*angles(math.rad(0),math.rad(90),math.rad(0))
  1359. LWC0=cf(0.5,0,0)*angles(math.rad(0),math.rad(-90),math.rad(0))
  1360. end
  1361.  
  1362. if allowidle==true then
  1363. coroutine.resume(coroutine.create(function()
  1364. while true do
  1365. for i=0,1,0.08 do
  1366. wait()
  1367. idleangle=idleangle+0.005*idlen
  1368. idlen=idlen-1/10
  1369. end
  1370. idlen=0
  1371. for i=0,1,0.08 do
  1372. wait()
  1373. idleangle=idleangle-0.005*idlen
  1374. idlen=idlen-1/10
  1375. end
  1376. idlen=0
  1377. idleangle=0
  1378. end
  1379. end))
  1380. end
  1381.  
  1382. if startequipped==true then
  1383. for _,v in pairs (m:GetChildren()) do
  1384. if v.ClassName=="Part" and v.Name~="Hitbox" and v.Name~="Handle" then
  1385. v.Transparency=0
  1386. end
  1387. end
  1388. elseif startequippedwithequipanimation==true then
  1389. for _,v in pairs (m:GetChildren()) do
  1390. if v.ClassName=="Part" and v.Name~="Hitbox" and v.Name~="Handle" then
  1391. coroutine.resume(coroutine.create(function(Part)
  1392. for i=1,0,-0.1 do
  1393. hbwait()
  1394. Part.Transparency=i
  1395. end
  1396. Part.Transparency=0
  1397. end),v)
  1398. end
  1399. end
  1400. end
  1401.  
  1402. function equipanim()
  1403. attack=true
  1404. Movement.Value=Movement.Value-0.1
  1405. Defense.Value=Defense.Value+0.4
  1406. for i=0,1,0.08/animationspeed do
  1407. hbwait()
  1408. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),0.3/animationspeed)
  1409. Neck.C0=clerp(Neck.C0,necko*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),0.3/animationspeed)
  1410. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(0),math.rad(0),math.rad(0))*RWC0,0.3/animationspeed)
  1411. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(0),math.rad(0),math.rad(0))*LWC0,0.3/animationspeed)
  1412. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0)),0.3/animationspeed)
  1413. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0)),0.3/animationspeed)
  1414. end
  1415. attack=false
  1416. end
  1417.  
  1418. function unequipanim()
  1419. attack=true
  1420. for i=0,1,0.08/animationspeed do
  1421. hbwait()
  1422. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),0.3/animationspeed)
  1423. Neck.C0=clerp(Neck.C0,necko*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),0.3/animationspeed)
  1424. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(0),math.rad(0),math.rad(0))*RWC0,0.3/animationspeed)
  1425. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(0),math.rad(0),math.rad(0))*LWC0,0.3/animationspeed)
  1426. RW.C1=clerp(RW.C1,cf(0,0.5,0)*angles(math.rad(0),math.rad(0),math.rad(0))*RWC0,0.3/animationspeed)
  1427. LW.C1=clerp(LW.C1,cf(0,0.5,0)*angles(math.rad(0),math.rad(0),math.rad(0))*LWC0,0.3/animationspeed)
  1428. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0)),0.3/animationspeed)
  1429. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0)),0.3/animationspeed)
  1430. end
  1431. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),1)
  1432. Neck.C0=clerp(Neck.C0,necko*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),1)
  1433. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(0),math.rad(0),math.rad(0))*RWC0,1)
  1434. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(0),math.rad(0),math.rad(0))*LWC0,1)
  1435. RW.C1=clerp(RW.C1,cf(0,0.5,0)*angles(math.rad(0),math.rad(0),math.rad(0))*RWC0,1)
  1436. LW.C1=clerp(LW.C1,cf(0,0.5,0)*angles(math.rad(0),math.rad(0),math.rad(0))*LWC0,1)
  1437. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0)),1)
  1438. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0)),1)
  1439. RH.C1=clerp(RH.C1,RHC1*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0)),1)
  1440. LH.C1=clerp(LH.C1,LHC1*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0)),1)
  1441. Movement.Value=Movement.Value+0.1
  1442. Defense.Value=Defense.Value-0.4
  1443. attack=false
  1444. end
  1445.  
  1446. if startequipped==true then
  1447. equipped=true
  1448. if disableanimate==true then
  1449. Animate.Disabled=true
  1450. local idleanimation=Humanoid:LoadAnimation(Torso.robloxidleanimation)
  1451. idleanimation:Play()
  1452. end
  1453. if disableanimator==true then
  1454. Animator.Parent=nil
  1455. end
  1456. if disablemovingarms==true then
  1457. RW.Parent=Torso
  1458. LW.Parent=Torso
  1459. RSH.Parent=nil
  1460. LSH.Parent=nil
  1461. end
  1462. Movement.Value=Movement.Value-0.1
  1463. Defense.Value=Defense.Value+0.4
  1464. elseif startequippedwithequipanimation==true then
  1465. equipped=true
  1466. if disableanimate==true then
  1467. Animate.Disabled=true
  1468. local idleanimation=Humanoid:LoadAnimation(Torso.robloxidleanimation)
  1469. idleanimation:Play()
  1470. end
  1471. if disableanimator==true then
  1472. Animator.Parent=nil
  1473. end
  1474. if disablemovingarms==true then
  1475. RW.Parent=Torso
  1476. LW.Parent=Torso
  1477. RSH.Parent=nil
  1478. LSH.Parent=nil
  1479. end
  1480. coroutine.resume(coroutine.create(function()
  1481. hbwait()
  1482. equipanim()
  1483. end))
  1484. end
  1485.  
  1486. function StaggerHit()
  1487. attack=true
  1488. if Hitbox~=nil then
  1489. for i=1,math.random(2,4) do
  1490. ClangEffect("Bright yellow","Neon",cf(Hitbox.Position)*angles(math.rad(math.random(-50,50)),math.rad(math.random(-50,50)),math.rad(math.random(-50,50))),20,5,0.2,math.random(5,15)/10,0,-0.02,0,-0.02,0.1)
  1491. end
  1492. end
  1493. for i=0,1,0.1/animationspeed do
  1494. hbwait()
  1495. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0+idleangle)*angles(math.rad(-10),math.rad(0),math.rad(-30)),0.3/animationspeed)
  1496. Neck.C0=clerp(Neck.C0,necko*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(30))*angles(math.rad(5),math.rad(0),math.rad(0)),0.3/animationspeed)
  1497. RW.C0=clerp(RW.C0,cf(1.5,0.5+idleangle,0)*angles(math.rad(-30),math.rad(0),math.rad(60))*angles(math.rad(0),math.rad(-30),math.rad(0))*RWC0,0.3/animationspeed)
  1498. LW.C0=clerp(LW.C0,cf(-1.5,0.5+idleangle,0)*angles(math.rad(-20),math.rad(0),math.rad(-20))*angles(math.rad(0),math.rad(20),math.rad(0))*LWC0,0.3/animationspeed)
  1499. RH.C0=clerp(RH.C0,cf(1,-0.9-idleangle,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-10),math.rad(0),math.rad(-20)),0.3/animationspeed)
  1500. LH.C0=clerp(LH.C0,cf(-1,-1-idleangle,0)*angles(math.rad(0),math.rad(-70),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(10)),0.3/animationspeed)
  1501. if StaggerAnim.Value==true or StunAnim.Value==true then
  1502. break
  1503. end
  1504. end
  1505. attack=false
  1506. end
  1507.  
  1508. function Stagger()
  1509. attack=true
  1510. disablejump=true
  1511. if Hitbox~=nil then
  1512. for i=1,math.random(2,4) do
  1513. ClangEffect("Bright yellow","Neon",cf(Hitbox.Position)*angles(math.rad(math.random(-50,50)),math.rad(math.random(-50,50)),math.rad(math.random(-50,50))),20,5,0.2,math.random(5,15)/10,0,-0.02,0,-0.02,0.1)
  1514. end
  1515. end
  1516. attacktype=1
  1517. local staggervelocity=Instance.new("BodyVelocity",Torso)
  1518. staggervelocity.P=500
  1519. staggervelocity.maxForce=vt(math.huge,0,math.huge)
  1520. if Rooted.Value==false then
  1521. staggervelocity.Velocity=RootPart.CFrame.lookVector*-25
  1522. end
  1523. for i=0,1,0.35/animationspeed do
  1524. hbwait()
  1525. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-0.1+idleangle)*angles(math.rad(-20),math.rad(0),math.rad(-30)),0.3/animationspeed)
  1526. Neck.C0=clerp(Neck.C0,necko*cf(0,0,0)*angles(math.rad(5),math.rad(0),math.rad(35))*angles(math.rad(0),math.rad(0),math.rad(0)),0.3/animationspeed)
  1527. RW.C0=clerp(RW.C0,cf(1.5,0.5+idleangle,0)*angles(math.rad(20),math.rad(-30),math.rad(40))*RWC0,0.3/animationspeed)
  1528. LW.C0=clerp(LW.C0,cf(-1.5,0.5+idleangle,0)*angles(math.rad(10),math.rad(5),math.rad(-20))*LWC0,0.3/animationspeed)
  1529. RH.C0=clerp(RH.C0,cf(1,-0.75-idleangle,-0.25)*angles(math.rad(0),math.rad(100),math.rad(0))*angles(math.rad(-20),math.rad(0),math.rad(40)),0.3/animationspeed)
  1530. LH.C0=clerp(LH.C0,cf(-1,-1-idleangle,0.25)*angles(math.rad(0),math.rad(-60),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(10)),0.3/animationspeed)
  1531. end
  1532. for i=0,1,0.2/animationspeed do
  1533. hbwait()
  1534. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-0.2+idleangle)*angles(math.rad(-30),math.rad(0),math.rad(-30)),0.3/animationspeed)
  1535. Neck.C0=clerp(Neck.C0,necko*cf(0,0,0)*angles(math.rad(5),math.rad(0),math.rad(35))*angles(math.rad(0),math.rad(0),math.rad(0)),0.3/animationspeed)
  1536. RW.C0=clerp(RW.C0,cf(1.5,0.5+idleangle,0)*angles(math.rad(20),math.rad(-30),math.rad(40))*RWC0,0.3/animationspeed)
  1537. LW.C0=clerp(LW.C0,cf(-1.5,0.5+idleangle,0)*angles(math.rad(10),math.rad(5),math.rad(-20))*LWC0,0.3/animationspeed)
  1538. RH.C0=clerp(RH.C0,cf(1,-0.75-idleangle,-0.25)*angles(math.rad(0),math.rad(100),math.rad(0))*angles(math.rad(-20),math.rad(0),math.rad(40)),0.3/animationspeed)
  1539. LH.C0=clerp(LH.C0,cf(-1,-0.9-idleangle,0.25)*angles(math.rad(0),math.rad(-60),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(30)),0.3/animationspeed)
  1540. end
  1541. staggervelocity:Destroy()
  1542. for i=0,1,0.015/animationspeed do
  1543. hbwait()
  1544. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-1.8+idleangle)*angles(math.rad(0),math.rad(0),math.rad(-20))*angles(math.rad(-5),math.rad(-5),math.rad(0)),0.3/animationspeed)
  1545. Neck.C0=clerp(Neck.C0,necko*cf(0,0,0)*angles(math.rad(20),math.rad(0),math.rad(20))*angles(math.rad(0),math.rad(5),math.rad(0)),0.3/animationspeed)
  1546. RW.C0=clerp(RW.C0,cf(1.5,0.5+idleangle,0)*angles(math.rad(0),math.rad(0),math.rad(20))*angles(math.rad(0),math.rad(-20),math.rad(0))*RWC0,0.3/animationspeed)
  1547. LW.C0=clerp(LW.C0,cf(-1.5,0.5+idleangle,0)*angles(math.rad(-15),math.rad(0),math.rad(-10))*angles(math.rad(0),math.rad(20),math.rad(0))*LWC0,0.3/animationspeed)
  1548. RH.C0=clerp(RH.C0,cf(1,-0.5-idleangle,-0.5)*angles(math.rad(0),math.rad(80),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(70))*angles(math.rad(0),math.rad(30),math.rad(0)),0.3/animationspeed)
  1549. LH.C0=clerp(LH.C0,cf(-1,0.4-idleangle,-0.5)*angles(math.rad(0),math.rad(-80),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(-10)),0.3/animationspeed)
  1550. if StunAnim.Value==true then
  1551. break
  1552. end
  1553. end
  1554. attacktype=1
  1555. disablejump=false
  1556. attack=false
  1557. end
  1558.  
  1559. function Stun()
  1560. attack=true
  1561. disablejump=true
  1562. attacktype=1
  1563. DamageStatLabel("Interruption",Head.CFrame,"Stunned!",Color3.new(255/255,255/255,0))
  1564. for i=0,1,0.4/animationspeed do
  1565. hbwait()
  1566. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0+idleangle)*angles(math.rad(15),math.rad(0),math.rad(-160)),0.3/animationspeed)
  1567. Neck.C0=clerp(Neck.C0,necko*cf(0,0,0)*angles(math.rad(10),math.rad(0),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0)),0.3/animationspeed)
  1568. RW.C0=clerp(RW.C0,cf(1.5,0.5+idleangle,0)*angles(math.rad(70),math.rad(0),math.rad(15))*RWC0,0.3/animationspeed)
  1569. LW.C0=clerp(LW.C0,cf(-1.5,0.5+idleangle,0)*angles(math.rad(70),math.rad(0),math.rad(-15))*LWC0,0.3/animationspeed)
  1570. RH.C0=clerp(RH.C0,cf(1,-1-idleangle,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(-20)),0.3/animationspeed)
  1571. LH.C0=clerp(LH.C0,cf(-1,-1-idleangle,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(-20)),0.3/animationspeed)
  1572. end
  1573. for i=0,1,0.4/animationspeed do
  1574. hbwait()
  1575. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-0.5+idleangle)*angles(math.rad(45),math.rad(0),math.rad(-170)),0.3/animationspeed)
  1576. Neck.C0=clerp(Neck.C0,necko*cf(0,0,0)*angles(math.rad(5),math.rad(0),math.rad(-30))*angles(math.rad(0),math.rad(0),math.rad(0)),0.3/animationspeed)
  1577. RW.C0=clerp(RW.C0,cf(1.5,0.5+idleangle,0)*angles(math.rad(80),math.rad(0),math.rad(45))*RWC0,0.3/animationspeed)
  1578. LW.C0=clerp(LW.C0,cf(-1.5,0.5+idleangle,0)*angles(math.rad(80),math.rad(0),math.rad(-45))*LWC0,0.3/animationspeed)
  1579. RH.C0=clerp(RH.C0,cf(1,-1-idleangle,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(-40)),0.3/animationspeed)
  1580. LH.C0=clerp(LH.C0,cf(-1,-1-idleangle,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(-20)),0.3/animationspeed)
  1581. end
  1582. for i=0,1,0.4/animationspeed do
  1583. hbwait()
  1584. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-1+idleangle)*angles(math.rad(75),math.rad(0),math.rad(-180)),0.3/animationspeed)
  1585. Neck.C0=clerp(Neck.C0,necko*cf(0,0,0)*angles(math.rad(5),math.rad(0),math.rad(-60))*angles(math.rad(0),math.rad(0),math.rad(0)),0.3/animationspeed)
  1586. RW.C0=clerp(RW.C0,cf(1.5,0.5+idleangle,0)*angles(math.rad(90),math.rad(0),math.rad(75))*RWC0,0.3/animationspeed)
  1587. LW.C0=clerp(LW.C0,cf(-1.5,0.5+idleangle,0)*angles(math.rad(-45),math.rad(0),math.rad(-75))*LWC0,0.3/animationspeed)
  1588. RH.C0=clerp(RH.C0,cf(1,-1-idleangle,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(-40)),0.3/animationspeed)
  1589. LH.C0=clerp(LH.C0,cf(-1,-1-idleangle,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(-30)),0.3/animationspeed)
  1590. end
  1591. gyro=Instance.new("BodyGyro")
  1592. gyro.Parent=nil
  1593. gyro.P=1e7
  1594. gyro.D=1e3
  1595. gyro.MaxTorque=vt(1e7,1e7,1e7)
  1596. gyro.cframe=RootPart.CFrame
  1597. for i=1,70*animationspeed do
  1598. hbwait()
  1599. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-2.5+idleangle)*angles(math.rad(90),math.rad(0),math.rad(-180)),0.3/animationspeed)
  1600. Neck.C0=clerp(Neck.C0,necko*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(-90))*angles(math.rad(0),math.rad(0),math.rad(0)),0.3/animationspeed)
  1601. RW.C0=clerp(RW.C0,cf(1.5,0.5+idleangle,0)*angles(math.rad(90),math.rad(-10),math.rad(90))*RWC0,0.3/animationspeed)
  1602. LW.C0=clerp(LW.C0,cf(-1.5,0.5+idleangle,0)*angles(math.rad(-90),math.rad(0),math.rad(-90))*LWC0,0.3/animationspeed)
  1603. RH.C0=clerp(RH.C0,cf(1,-1-idleangle,0.2)*angles(math.rad(0),math.rad(70),math.rad(0))*angles(math.rad(-10),math.rad(0),math.rad(0)),0.3/animationspeed)
  1604. LH.C0=clerp(LH.C0,cf(-1,-1-idleangle,0)*angles(math.rad(0),math.rad(-100),math.rad(0))*angles(math.rad(-10),math.rad(0),math.rad(0)),0.3/animationspeed)
  1605. end
  1606. for i=0,1,0.5/animationspeed do
  1607. hbwait()
  1608. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-1+idleangle)*angles(math.rad(90),math.rad(0),math.rad(-180)),0.3/animationspeed)
  1609. Neck.C0=clerp(Neck.C0,necko*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(-90))*angles(math.rad(0),math.rad(0),math.rad(0)),0.3/animationspeed)
  1610. RW.C0=clerp(RW.C0,cf(1.5,0.5+idleangle,0)*angles(math.rad(90),math.rad(-10),math.rad(120))*RWC0,0.3/animationspeed)
  1611. LW.C0=clerp(LW.C0,cf(-1.5,0.5+idleangle,0)*angles(math.rad(-90),math.rad(0),math.rad(-120))*LWC0,0.3/animationspeed)
  1612. RH.C0=clerp(RH.C0,cf(1,-1-idleangle,0.2)*angles(math.rad(0),math.rad(70),math.rad(0))*angles(math.rad(-10),math.rad(0),math.rad(-30)),0.3/animationspeed)
  1613. LH.C0=clerp(LH.C0,cf(-1,-1-idleangle,0)*angles(math.rad(0),math.rad(-100),math.rad(0))*angles(math.rad(-10),math.rad(0),math.rad(30)),0.3/animationspeed)
  1614. end
  1615. for i=0,1,0.15/animationspeed do
  1616. hbwait()
  1617. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-1.5+idleangle)*angles(math.rad(30),math.rad(0),math.rad(120)),0.3/animationspeed)
  1618. Neck.C0=clerp(Neck.C0,necko*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(-30))*angles(math.rad(0),math.rad(0),math.rad(0)),0.3/animationspeed)
  1619. RW.C0=clerp(RW.C0,cf(1.5,0.5+idleangle,0)*angles(math.rad(-40),math.rad(0),math.rad(30))*RWC0,0.3/animationspeed)
  1620. LW.C0=clerp(LW.C0,cf(-1.5,0.5+idleangle,0)*angles(math.rad(80),math.rad(0),math.rad(20))*LWC0,0.3/animationspeed)
  1621. RH.C0=clerp(RH.C0,cf(1,-0.5-idleangle,0)*angles(math.rad(0),math.rad(60),math.rad(0))*angles(math.rad(-15),math.rad(0),math.rad(70)),0.3/animationspeed)
  1622. LH.C0=clerp(LH.C0,cf(-1,-0.25-idleangle,-1)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(5),math.rad(0),math.rad(30)),0.3/animationspeed)
  1623. end
  1624. gyro.Parent=nil
  1625. attacktype=1
  1626. disablejump=false
  1627. attack=false
  1628. end
  1629.  
  1630. function EAbility()
  1631. attack=true
  1632. attack=false
  1633. end
  1634.  
  1635. function Attack1()
  1636. attack=true
  1637. --so("341336274",Hitbox,0.5,1)
  1638. for i=0,1,0.12/2 do
  1639. hbwait()
  1640. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0.5,0+idleangle)*angles(math.rad(0),math.rad(0),math.rad(-50)),0.45/animationspeed)
  1641. Neck.C0=clerp(Neck.C0,necko*cf(0,0,0)*angles(math.rad(7.5),math.rad(0),math.rad(50)),0.45/animationspeed)
  1642. RW.C0=clerp(RW.C0,cf(1.5,0.5+idleangle,0)*angles(math.rad(100),math.rad(0),math.rad(50))*angles(math.rad(0),math.rad(-80),math.rad(0))*RWC0,0.45/animationspeed)
  1643. LW.C0=clerp(LW.C0,cf(-1.25,0.5+idleangle,-0.25)*angles(math.rad(70),math.rad(0),math.rad(40))*LWC0,0.45/animationspeed)
  1644. RH.C0=clerp(RH.C0,cf(1,-1-idleangle,0)*angles(math.rad(0),math.rad(80),math.rad(0))*angles(math.rad(-12.5),math.rad(0),math.rad(-2.5)),0.45/animationspeed)
  1645. LH.C0=clerp(LH.C0,cf(-1,-1-idleangle,0)*angles(math.rad(0),math.rad(-40),math.rad(0))*angles(math.rad(-10),math.rad(0),math.rad(-2.5)),0.45/animationspeed)
  1646. swordhandleweld.C0=clerp(swordhandleweld.C0,cf(0,-1,0)*angles(math.rad(-90),0,0),0.45/animationspeed)
  1647. if StaggerHitAnim.Value==true or StaggerAnim.Value==true or StunAnim.Value==true then
  1648. break
  1649. end
  1650. end
  1651. --so("200633029",Hitbox,0.5,1)
  1652. so("200633077",Hitbox,0.5,2)
  1653. --so("341336307",Hitbox,0.5,1)
  1654. so("341336485",Hitbox,0.5,1)
  1655. LastPoint=Hitbox.CFrame*cf(0,2.1,0)
  1656. for i=0,1,0.12/2 do
  1657. hbwait()
  1658. TrailEffect("Cyan","Neon",Hitbox.CFrame*cf(0,2.1,0),LastPoint,"Block",0,0.1,-0.01,0,-0.01,0.1)
  1659. LastPoint=Hitbox.CFrame*cf(0,2.1,0)
  1660. MagniDamage(Hitbox,5,5,10,math.random(5,10),"Normal",RootPart,0.5,1,math.random(5,10),nil,true,false,nil,0,0,false)
  1661. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,-1,-0.5+idleangle)*angles(math.rad(20),math.rad(0),math.rad(40)),0.45/animationspeed)
  1662. Neck.C0=clerp(Neck.C0,necko*cf(0,0,0)*angles(math.rad(7.5),math.rad(0),math.rad(-30))*angles(math.rad(-15),math.rad(0),math.rad(0)),0.45/animationspeed)
  1663. RW.C0=clerp(RW.C0,cf(0.75,0.5+idleangle,-0.75)*angles(math.rad(80),math.rad(0),math.rad(-60))*angles(math.rad(0),math.rad(-60),math.rad(0))*RWC0,0.45/animationspeed)
  1664. LW.C0=clerp(LW.C0,cf(-1.5,0.5+idleangle,0)*angles(math.rad(50),math.rad(0),math.rad(-10))*LWC0,0.45/animationspeed)
  1665. RH.C0=clerp(RH.C0,cf(1,-0.35-idleangle,0)*angles(math.rad(0),math.rad(50),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(22.5)),0.45/animationspeed)
  1666. LH.C0=clerp(LH.C0,cf(-1,-0.8-idleangle,0)*angles(math.rad(0),math.rad(-80),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(-5)),0.45/animationspeed)
  1667. swordhandleweld.C0=clerp(swordhandleweld.C0,cf(0,-1,0)*angles(math.rad(-90),0,0),0.45/animationspeed)
  1668. if StaggerHitAnim.Value==true or StaggerAnim.Value==true or StunAnim.Value==true then
  1669. break
  1670. end
  1671. end
  1672. LastPoint=nil
  1673. attack=false
  1674. end
  1675.  
  1676. function Attack2()
  1677. attack=true
  1678. --so("341336274",Hitbox,0.5,1)
  1679. for i=0,1,0.12/2 do
  1680. hbwait()
  1681. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,-1,1+idleangle)*angles(math.rad(-10),math.rad(0),math.rad(0)),0.45/animationspeed)
  1682. Neck.C0=clerp(Neck.C0,necko*cf(0,0,0)*angles(math.rad(15),math.rad(0),math.rad(0)),0.45/animationspeed)
  1683. RW.C0=clerp(RW.C0,cf(1.5,0.5+idleangle,0)*angles(math.rad(170),math.rad(0),math.rad(5))*angles(math.rad(0),math.rad(-10),math.rad(0))*RWC0,0.45/animationspeed)
  1684. LW.C0=clerp(LW.C0,cf(-1.25,0.5+idleangle,-0.25)*angles(math.rad(80),math.rad(0),math.rad(20))*LWC0,0.45/animationspeed)
  1685. RH.C0=clerp(RH.C0,cf(1,-0.5-idleangle,-0.25)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(17.5)),0.45/animationspeed)
  1686. LH.C0=clerp(LH.C0,cf(-1,-0.75-idleangle,-0.25)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(30)),0.45/animationspeed)
  1687. swordhandleweld.C0=clerp(swordhandleweld.C0,cf(0,-1,0)*angles(math.rad(-90),0,0),0.45/animationspeed)
  1688. if StaggerHitAnim.Value==true or StaggerAnim.Value==true or StunAnim.Value==true then
  1689. break
  1690. end
  1691. end
  1692. --so("200633029",Hitbox,0.5,1)
  1693. so("200633077",Hitbox,0.5,3)
  1694. --so("341336307",Hitbox,0.5,1)
  1695. so("341336485",Hitbox,0.5,1)
  1696. LastPoint=Hitbox.CFrame*cf(0,2.1,0)
  1697. for i=0,1,0.12/2 do
  1698. hbwait()
  1699. TrailEffect("Cyan","Neon",Hitbox.CFrame*cf(0,2.1,0),LastPoint,"Block",0,0.1,-0.01,0,-0.01,0.1)
  1700. LastPoint=Hitbox.CFrame*cf(0,2.1,0)
  1701. MagniDamage(Hitbox,5,5,10,math.random(5,10),"Normal",RootPart,0.5,1,math.random(5,10),nil,true,false,nil,0,0,false)
  1702. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,-2,-0.75+idleangle)*angles(math.rad(15),math.rad(0),math.rad(0)),0.6/animationspeed)
  1703. Neck.C0=clerp(Neck.C0,necko*cf(0,0,0)*angles(math.rad(5),math.rad(0),math.rad(0)),0.6/animationspeed)
  1704. RW.C0=clerp(RW.C0,cf(1.25,0.5+idleangle,-0.25)*angles(math.rad(10),math.rad(0),math.rad(-5))*angles(math.rad(0),math.rad(20),math.rad(0))*RWC0,0.6/animationspeed)
  1705. LW.C0=clerp(LW.C0,cf(-1.5,0.5+idleangle,0)*angles(math.rad(40),math.rad(0),math.rad(-10))*LWC0,0.6/animationspeed)
  1706. RH.C0=clerp(RH.C0,cf(1,-0.2-idleangle,-0.5)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(10)),0.6/animationspeed)
  1707. LH.C0=clerp(LH.C0,cf(-1,-1-idleangle,-0.5)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(50)),0.6/animationspeed)
  1708. swordhandleweld.C0=clerp(swordhandleweld.C0,cf(0,-1,0)*angles(math.rad(-90),0,0),0.6/animationspeed)
  1709. if StaggerHitAnim.Value==true or StaggerAnim.Value==true or StunAnim.Value==true then
  1710. break
  1711. end
  1712. end
  1713. LastPoint=nil
  1714. attack=false
  1715. end
  1716.  
  1717. function Attack3()
  1718. attack=true
  1719. --so("341336274",Hitbox,0.5,1)
  1720. for i=0,1,0.12/2 do
  1721. hbwait()
  1722. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0+idleangle)*angles(math.rad(0),math.rad(0),math.rad(40)),0.45/animationspeed)
  1723. Neck.C0=clerp(Neck.C0,necko*cf(0,0,0)*angles(math.rad(-10),math.rad(0),math.rad(-20)),0.45/animationspeed)
  1724. RW.C0=clerp(RW.C0,cf(0.5,0.5+idleangle,-0.75)*angles(math.rad(130),math.rad(0),math.rad(-60))*angles(math.rad(0),math.rad(40),math.rad(0))*RWC0,0.45/animationspeed)
  1725. LW.C0=clerp(LW.C0,cf(-1.5,0.5+idleangle,0)*angles(math.rad(30),math.rad(0),math.rad(-5))*LWC0,0.45/animationspeed)
  1726. RH.C0=clerp(RH.C0,cf(1,-1-idleangle,0)*angles(math.rad(0),math.rad(50),math.rad(0))*angles(math.rad(-7.5),math.rad(0),math.rad(-2.5)),0.45/animationspeed)
  1727. LH.C0=clerp(LH.C0,cf(-1,-1-idleangle,0)*angles(math.rad(0),math.rad(-80),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(-7.5)),0.45/animationspeed)
  1728. swordhandleweld.C0=clerp(swordhandleweld.C0,cf(0,-1,0)*angles(math.rad(-90),0,0),0.45/animationspeed)
  1729. if StaggerHitAnim.Value==true or StaggerAnim.Value==true or StunAnim.Value==true then
  1730. break
  1731. end
  1732. end
  1733. --so("200633029",Hitbox,0.5,1)
  1734. so("200633077",Hitbox,0.5,1.5)
  1735. --so("341336307",Hitbox,0.5,1)
  1736. so("341336485",Hitbox,0.5,1)
  1737. LastPoint=Hitbox.CFrame*cf(0,2.1,0)
  1738. for i=0,1,0.12/2 do
  1739. hbwait()
  1740. TrailEffect("Cyan","Neon",Hitbox.CFrame*cf(0,2.1,0),LastPoint,"Block",0,0.1,-0.01,0,-0.01,0.1)
  1741. LastPoint=Hitbox.CFrame*cf(0,2.1,0)
  1742. MagniDamage(Hitbox,5,5,10,math.random(5,10),"Normal",RootPart,0.5,1,math.random(5,10),nil,true,false,nil,0,0,false)
  1743. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,-2,-0.5+idleangle)*angles(math.rad(5),math.rad(0),math.rad(-30)),0.45/animationspeed)
  1744. Neck.C0=clerp(Neck.C0,necko*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(20)),0.45/animationspeed)
  1745. RW.C0=clerp(RW.C0,cf(1.5,0.5+idleangle,0)*angles(math.rad(30),math.rad(0),math.rad(70))*angles(math.rad(0),math.rad(40),math.rad(0))*RWC0,0.45/animationspeed)
  1746. LW.C0=clerp(LW.C0,cf(-1.5,0.5+idleangle,0)*angles(math.rad(50),math.rad(0),math.rad(-45))*LWC0,0.45/animationspeed)
  1747. RH.C0=clerp(RH.C0,cf(1,-0.75-idleangle,0)*angles(math.rad(0),math.rad(70),math.rad(0))*angles(math.rad(-30),math.rad(0),math.rad(-15)),0.45/animationspeed)
  1748. LH.C0=clerp(LH.C0,cf(-1,-0.5-idleangle,0)*angles(math.rad(0),math.rad(-60),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(-7.5)),0.45/animationspeed)
  1749. swordhandleweld.C0=clerp(swordhandleweld.C0,cf(0,-1,0)*angles(math.rad(-90),0,0),0.45/animationspeed)
  1750. if StaggerHitAnim.Value==true or StaggerAnim.Value==true or StunAnim.Value==true then
  1751. break
  1752. end
  1753. end
  1754. LastPoint=nil
  1755. attack=false
  1756. end
  1757.  
  1758. function Attack4()
  1759. attack=true
  1760. local shieldangle=math.random(-2,2)
  1761. for i=0,1,0.12/2 do
  1762. hbwait()
  1763. MagicBlock("Cyan","Neon",true,shieldhandle.CFrame,1,1,1,1,1,1,0.1)
  1764. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0+idleangle)*angles(math.rad(0),math.rad(0),math.rad(-40)),0.45/animationspeed)
  1765. Neck.C0=clerp(Neck.C0,necko*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(40)),0.45/animationspeed)
  1766. RW.C0=clerp(RW.C0,cf(1,0.5+idleangle,-0.5)*angles(math.rad(88+shieldangle),math.rad(0),math.rad(-30))*RWC0,0.45/animationspeed)
  1767. LW.C0=clerp(LW.C0,cf(-1,0.5+idleangle,-0.5)*angles(math.rad(88+shieldangle),math.rad(0),math.rad(50))*LWC0,0.45/animationspeed)
  1768. RH.C0=clerp(RH.C0,cf(1,-1-idleangle,0)*angles(math.rad(0),math.rad(70),math.rad(0))*angles(math.rad(-7.5),math.rad(0),math.rad(-2.5)),0.45/animationspeed)
  1769. LH.C0=clerp(LH.C0,cf(-1,-1-idleangle,0)*angles(math.rad(0),math.rad(-50),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(-2.5)),0.45/animationspeed)
  1770. swordhandleweld.C0=clerp(swordhandleweld.C0,cf(0,-1,0)*angles(math.rad(-90),0,0),0.45/animationspeed)
  1771. if StaggerHitAnim.Value==true or StaggerAnim.Value==true or StunAnim.Value==true then
  1772. break
  1773. end
  1774. end
  1775. so("341336274",shieldhandle,0.5,2)
  1776. so("341336307",shieldhandle,0.5,2)
  1777. local Pos1=shieldhandle.Position
  1778. local MousePos=Mouse.hit.p
  1779. local MouseLook=cf((Pos1+MousePos)/2,MousePos)
  1780. local blasthit,blastpos=rayCast(Pos1,MouseLook.lookVector,999,Character)
  1781. local Mag=(Pos1-blastpos).magnitude
  1782. MagicCylinder("Cyan","Neon",cf((Pos1+blastpos)/2,blastpos)*angles(math.rad(90),0,0),5,Mag*5,5,0.1,0,0.1,0.05)
  1783. if blasthit~=nil and blasthit.Name~="Effect" then
  1784. local refpart=part(3,Effects,"SmoothPlastic",0,1,"Really black","Effect",vt())
  1785. refpart.Anchored=true
  1786. refpart.CFrame=cf(blastpos)
  1787. game:GetService("Debris"):AddItem(refpart,5)
  1788. so("341336499",refpart,0.5,3)
  1789. MagicCircle("Cyan","Neon",refpart.CFrame,10,10,10,1,1,1,0.05)
  1790. MagicBlock("Cyan","Neon",true,refpart.CFrame,5,5,5,0.5,0.5,0.5,0.05)
  1791. MagniDamage(refpart,3,5,10,0,"Normal",RootPart,0.5,1,math.random(5,10),nil,true,true,nil,0,0,false)
  1792. end
  1793. for i=0,1,0.12/2 do
  1794. hbwait()
  1795. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0.2,-0.15+idleangle)*angles(math.rad(-10),math.rad(0),math.rad(-40)),0.45/animationspeed)
  1796. Neck.C0=clerp(Neck.C0,necko*cf(0,0,0)*angles(math.rad(10),math.rad(0),math.rad(40)),0.45/animationspeed)
  1797. RW.C0=clerp(RW.C0,cf(1,0.5+idleangle,-0.5)*angles(math.rad(98+shieldangle),math.rad(0),math.rad(-30))*RWC0,0.45/animationspeed)
  1798. LW.C0=clerp(LW.C0,cf(-1,0.5+idleangle,-0.5)*angles(math.rad(98+shieldangle),math.rad(0),math.rad(50))*LWC0,0.45/animationspeed)
  1799. RH.C0=clerp(RH.C0,cf(1,-0.7-idleangle,0)*angles(math.rad(0),math.rad(70),math.rad(0))*angles(math.rad(-17.5),math.rad(0),math.rad(-2.5)),0.45/animationspeed)
  1800. LH.C0=clerp(LH.C0,cf(-1,-1-idleangle,0)*angles(math.rad(0),math.rad(-50),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(7.5)),0.45/animationspeed)
  1801. swordhandleweld.C0=clerp(swordhandleweld.C0,cf(0,-1,0)*angles(math.rad(-90),0,0),0.45/animationspeed)
  1802. if StaggerHitAnim.Value==true or StaggerAnim.Value==true or StunAnim.Value==true then
  1803. break
  1804. end
  1805. end
  1806. attack=false
  1807. end
  1808.  
  1809. function Move1()
  1810. attack=true
  1811. --so("341336274",Hitbox,0.5,1)
  1812. for i=0,1,0.12/2 do
  1813. hbwait()
  1814. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,-1,1+idleangle)*angles(math.rad(-10),math.rad(0),math.rad(0)),0.45/animationspeed)
  1815. Neck.C0=clerp(Neck.C0,necko*cf(0,0,0)*angles(math.rad(-10),math.rad(0),math.rad(0)),0.45/animationspeed)
  1816. RW.C0=clerp(RW.C0,cf(1.5,0.5+idleangle,0)*angles(math.rad(170),math.rad(0),math.rad(5))*RWC0,0.45/animationspeed)
  1817. LW.C0=clerp(LW.C0,cf(-1.25,0.5+idleangle,-0.25)*angles(math.rad(70),math.rad(0),math.rad(40))*LWC0,0.45/animationspeed)
  1818. RH.C0=clerp(RH.C0,cf(1,-1-idleangle,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(-20)),0.45/animationspeed)
  1819. LH.C0=clerp(LH.C0,cf(-1,-0.5-idleangle,-0.5)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(5)),0.45/animationspeed)
  1820. swordhandleweld.C0=clerp(swordhandleweld.C0,cf(0,-1,0)*angles(math.rad(-90),0,0),0.45/animationspeed)
  1821. if StaggerHitAnim.Value==true or StaggerAnim.Value==true or StunAnim.Value==true then
  1822. break
  1823. end
  1824. end
  1825. --so("200633029",Hitbox,0.5,1)
  1826. so("200633077",Hitbox,0.5,1.7)
  1827. --so("341336307",Hitbox,0.5,1)
  1828. so("341336485",Hitbox,0.5,1)
  1829. LastPoint=Hitbox.CFrame*cf(0,2.1,0)
  1830. for i=0,1,0.24/2 do
  1831. hbwait()
  1832. TrailEffect("Cyan","Neon",Hitbox.CFrame*cf(0,2.1,0),LastPoint,"Block",0,0.1,-0.01,0,-0.01,0.1)
  1833. LastPoint=Hitbox.CFrame*cf(0,2.1,0)
  1834. MagniDamage(Hitbox,5,5,10,math.random(5,10),"Normal",RootPart,0.5,1,math.random(5,10),nil,true,false,nil,0,0,false)
  1835. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,-2,-1+idleangle)*angles(math.rad(10),math.rad(0),math.rad(0)),0.6/animationspeed)
  1836. Neck.C0=clerp(Neck.C0,necko*cf(0,0,0)*angles(math.rad(10),math.rad(0),math.rad(0)),0.6/animationspeed)
  1837. RW.C0=clerp(RW.C0,cf(1.25,0.5+idleangle,-0.25)*angles(math.rad(0),math.rad(0),math.rad(5))*RWC0,0.6/animationspeed)
  1838. LW.C0=clerp(LW.C0,cf(-1.5,0.5+idleangle,0)*angles(math.rad(5),math.rad(0),math.rad(-15))*LWC0,0.6/animationspeed)
  1839. RH.C0=clerp(RH.C0,cf(1,-1-idleangle,-0.5)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(-60)),0.6/animationspeed)
  1840. LH.C0=clerp(LH.C0,cf(-1,0-idleangle,-0.5)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(5)),0.6/animationspeed)
  1841. swordhandleweld.C0=clerp(swordhandleweld.C0,cf(0,-1,0)*angles(math.rad(-90),0,0),0.6/animationspeed)
  1842. if StaggerHitAnim.Value==true or StaggerAnim.Value==true or StunAnim.Value==true then
  1843. break
  1844. end
  1845. end
  1846. if StaggerHitAnim.Value~=true and StaggerAnim.Value~=true and StunAnim.Value~=true then
  1847. local swordhit,swordpos=rayCast(RootPart.Position,cf(RootPart.Position,RootPart.Position+vt(0,-1,0)).lookVector,4,Character)
  1848. if swordhit~=nil and swordhit.Name~="Effect" then
  1849. local refpart=part(3,Effects,"SmoothPlastic",0,1,"Really black","Effect",vt())
  1850. refpart.Anchored=true
  1851. refpart.CFrame=RootPart.CFrame*cf(1.1,0,0)
  1852. game:GetService("Debris"):AddItem(refpart,5)
  1853. coroutine.resume(coroutine.create(function(Origin)
  1854. local increment=-10.1
  1855. for i=1,4 do
  1856. local refpart2=part(3,Effects,"SmoothPlastic",0,1,"Really black","Effect",vt())
  1857. refpart2.Anchored=true
  1858. refpart2.CFrame=refpart.CFrame*cf(0,0,increment)
  1859. game:GetService("Debris"):AddItem(refpart,5)
  1860. local refpart2hit,refpart2pos=rayCast(refpart2.Position,cf(refpart2.Position,refpart2.Position+vt(0,-1,0)).lookVector,999,Character)
  1861. if refpart2hit~=nil then
  1862. local refpart3=part(3,Effects,"SmoothPlastic",0,1,"Really black","Effect",vt())
  1863. refpart3.Anchored=true
  1864. refpart3.CFrame=cf(refpart2pos)
  1865. game:GetService("Debris"):AddItem(refpart3,5)
  1866. so("341336499",refpart3,0.5,2)
  1867. MagicWave("Cyan","Neon",refpart3.CFrame,1,0.1,1,0.5,0.01,0.5,0.05)
  1868. MagicSpikedCrown("Cyan","Neon",refpart3.CFrame,1,1,1,0.5,0.5,0.5,0.05)
  1869. MagniDamage(refpart3,10,10,15,math.random(10,20),"ElectricGroundSmash",refpart3,0,1,math.random(5,10),nil,true,true,"Damage",0.1,3,true)
  1870. end
  1871. increment=increment-10
  1872. wait(0.25)
  1873. end
  1874. end),refpart)
  1875. end
  1876. end
  1877. for i=0,1,0.24/2 do
  1878. hbwait()
  1879. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,-2,-1+idleangle)*angles(math.rad(10),math.rad(0),math.rad(0)),0.6/animationspeed)
  1880. Neck.C0=clerp(Neck.C0,necko*cf(0,0,0)*angles(math.rad(10),math.rad(0),math.rad(0)),0.6/animationspeed)
  1881. RW.C0=clerp(RW.C0,cf(1.25,0.5+idleangle,-0.25)*angles(math.rad(0),math.rad(0),math.rad(5))*RWC0,0.6/animationspeed)
  1882. LW.C0=clerp(LW.C0,cf(-1.5,0.5+idleangle,0)*angles(math.rad(5),math.rad(0),math.rad(-15))*LWC0,0.6/animationspeed)
  1883. RH.C0=clerp(RH.C0,cf(1,-1-idleangle,-0.5)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(-60)),0.6/animationspeed)
  1884. LH.C0=clerp(LH.C0,cf(-1,0-idleangle,-0.5)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(5)),0.6/animationspeed)
  1885. swordhandleweld.C0=clerp(swordhandleweld.C0,cf(0,-1,0)*angles(math.rad(-90),0,0),0.6/animationspeed)
  1886. if StaggerHitAnim.Value==true or StaggerAnim.Value==true or StunAnim.Value==true then
  1887. break
  1888. end
  1889. end
  1890. LastPoint=nil
  1891. attack=false
  1892. end
  1893.  
  1894. --[[
  1895. local testpart=Instance.new("Part",workspace.CurrentCamera)
  1896. testpart.Anchored=true
  1897. testpart.CFrame=cf(0,0,-50)
  1898. testpart.Size=Vector3.new(50,50,50)
  1899. --]]
  1900.  
  1901. function Move2()
  1902. attack=true
  1903. for i=0,1,0.12/2 do
  1904. hbwait()
  1905. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0+idleangle)*angles(math.rad(0),math.rad(0),math.rad(-40)),0.45/animationspeed)
  1906. Neck.C0=clerp(Neck.C0,necko*cf(0,0,0)*angles(math.rad(-5),math.rad(0),math.rad(40)),0.45/animationspeed)
  1907. RW.C0=clerp(RW.C0,cf(1.5,0.5+idleangle,0)*angles(math.rad(0),math.rad(0),math.rad(15))*RWC0,0.45/animationspeed)
  1908. LW.C0=clerp(LW.C0,cf(-1,0.5+idleangle,-0.5)*angles(math.rad(120),math.rad(0),math.rad(50))*LWC0,0.45/animationspeed)
  1909. RH.C0=clerp(RH.C0,cf(1,-1-idleangle,0)*angles(math.rad(0),math.rad(70),math.rad(0))*angles(math.rad(-10),math.rad(0),math.rad(5)),0.45/animationspeed)
  1910. LH.C0=clerp(LH.C0,cf(-1,-1-idleangle,0)*angles(math.rad(0),math.rad(-50),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(2.5)),0.45/animationspeed)
  1911. swordhandleweld.C0=clerp(swordhandleweld.C0,cf(0,-1,0)*angles(math.rad(-90),0,0),0.45/animationspeed)
  1912. if StaggerHitAnim.Value==true or StaggerAnim.Value==true or StunAnim.Value==true then
  1913. break
  1914. end
  1915. end
  1916. for i=0,1,0.12/2 do
  1917. hbwait()
  1918. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-1+idleangle)*angles(math.rad(0),math.rad(0),math.rad(-40)),0.45/animationspeed)
  1919. Neck.C0=clerp(Neck.C0,necko*cf(0,0,0)*angles(math.rad(10),math.rad(0),math.rad(40)),0.45/animationspeed)
  1920. RW.C0=clerp(RW.C0,cf(1.5,0.5+idleangle,0)*angles(math.rad(-5),math.rad(0),math.rad(10))*RWC0,0.45/animationspeed)
  1921. LW.C0=clerp(LW.C0,cf(-1,0.5+idleangle,-0.5)*angles(math.rad(90),math.rad(0),math.rad(50))*LWC0,0.45/animationspeed)
  1922. RH.C0=clerp(RH.C0,cf(1,-1-idleangle,-0.5)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-10),math.rad(0),math.rad(-60)),0.45/animationspeed)
  1923. LH.C0=clerp(LH.C0,cf(-1,0-idleangle,-0.5)*angles(math.rad(0),math.rad(-50),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(2.5)),0.45/animationspeed)
  1924. swordhandleweld.C0=clerp(swordhandleweld.C0,cf(0,-1,0)*angles(math.rad(-90),0,0),0.45/animationspeed)
  1925. if StaggerHitAnim.Value==true or StaggerAnim.Value==true or StunAnim.Value==true then
  1926. break
  1927. end
  1928. end
  1929. so("341336144",shieldhandle,0.5,0.75)
  1930. so("341336200",shieldhandle,0.5,0.75)
  1931. local blastchargenum=0
  1932. for i=0,1,0.04/2 do
  1933. hbwait()
  1934. local chargeeffect=part(3,Effects,"Neon",0,1,"Cyan","Effect",vt(0.2,math.random(1,2),0.2))
  1935. chargeeffect.Anchored=true
  1936. chargeeffect.CFrame=shieldhandle.CFrame*angles(math.rad(90),0,0)*angles(math.rad(math.random(-50,50)),math.rad(math.random(-50,50)),math.rad(math.random(-50,50)))*cf(0,-5,0)
  1937. local chargeeffectmesh=mesh("SpecialMesh",chargeeffect,"Sphere","",vt(0,0,0),vt(1,1,1))
  1938. game:GetService("Debris"):AddItem(chargeeffect,2)
  1939. coroutine.resume(coroutine.create(function(Part)
  1940. for i=1,0,-0.1 do
  1941. hbwait()
  1942. Part.Transparency=i
  1943. Part.CFrame=Part.CFrame*cf(0,0.25,0)
  1944. end
  1945. for i=0.5,1,0.1 do
  1946. hbwait()
  1947. Part.Transparency=i
  1948. Part.CFrame=Part.CFrame*cf(0,0.25,0)
  1949. end
  1950. Part.Transparency=1
  1951. Part.Parent=nil
  1952. end),chargeeffect)
  1953. MagicBlock("Cyan","Neon",true,shieldhandle.CFrame*cf(0,0.2,-0.5),blastchargenum,blastchargenum,blastchargenum,0.1,0.1,0.1,0.1)
  1954. blastchargenum=blastchargenum+1/10
  1955. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-1+idleangle)*angles(math.rad(0),math.rad(0),math.rad(-40)),0.45/animationspeed)
  1956. Neck.C0=clerp(Neck.C0,necko*cf(0,0,0)*angles(math.rad(10),math.rad(0),math.rad(40)),0.45/animationspeed)
  1957. RW.C0=clerp(RW.C0,cf(1.5,0.5+idleangle,0)*angles(math.rad(-5),math.rad(0),math.rad(10))*RWC0,0.45/animationspeed)
  1958. LW.C0=clerp(LW.C0,cf(-1,0.5+idleangle,-0.5)*angles(math.rad(90),math.rad(0),math.rad(50))*LWC0,0.45/animationspeed)
  1959. RH.C0=clerp(RH.C0,cf(1,-1-idleangle,-0.5)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-10),math.rad(0),math.rad(-60)),0.45/animationspeed)
  1960. LH.C0=clerp(LH.C0,cf(-1,0-idleangle,-0.5)*angles(math.rad(0),math.rad(-50),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(2.5)),0.45/animationspeed)
  1961. swordhandleweld.C0=clerp(swordhandleweld.C0,cf(0,-1,0)*angles(math.rad(-90),0,0),0.45/animationspeed)
  1962. if StaggerHitAnim.Value==true or StaggerAnim.Value==true or StunAnim.Value==true then
  1963. break
  1964. end
  1965. end
  1966. if StaggerHitAnim.Value~=true and StaggerAnim.Value~=true and StunAnim.Value~=true then
  1967. --so("341336485",shieldhandle,0.5,0.75)
  1968. so("341336243",shieldhandle,1,0.75)
  1969. so("341336307",shieldhandle,0.5,0.75)
  1970. MagicSpikedCrown("Cyan","Neon",shieldhandle.CFrame*cf(0,0.2,-1)*angles(math.rad(-90),0,0),3,1,3,0.1,0,0.1,0.05)
  1971. MagicRing("Cyan","Neon",shieldhandle.CFrame*cf(0,0.2,0),3,3,3,1,1,0,0.1)
  1972. local MainPos=shieldhandle.Position
  1973. local spread=vt(math.random(-500,500)/100,math.random(-500,500)/100,math.random(-500,500)/100)*((MainPos-Mouse.hit.p).magnitude/100)
  1974. local MainPos2=Mouse.Hit.p+spread
  1975. local MouseLook=cf((MainPos+MainPos2)/2,MainPos2)
  1976. local speed=2
  1977. local num=90
  1978. coroutine.resume(coroutine.create(function()
  1979. repeat
  1980. hbwait()
  1981. local hit,pos=rayCast(MainPos,MouseLook.lookVector,speed,ShotTarget.Parent)
  1982. local mag=(MainPos-pos).magnitude
  1983. MagicCylinder("Cyan","Neon",cf((MainPos+pos)/2,pos)*angles(math.rad(90),0,0),10,mag*5,10,-1,0,-1,0.1)
  1984. MainPos=MainPos+(MouseLook.lookVector*speed)
  1985. --MouseLook=MouseLook*angles(math.rad(-1),0,0)
  1986. num=num-1
  1987. if hit~=nil then
  1988. num=0
  1989. local refpart=part(3,Effects,"SmoothPlastic",0,1,"Really black","Effect",vt())
  1990. refpart.Anchored=true
  1991. refpart.CFrame=cf(pos)
  1992. game:GetService("Debris"):AddItem(refpart,5)
  1993. so("341336499",refpart,1,1)
  1994. MagicCircle("Cyan","Neon",refpart.CFrame,200,200,200,1,1,1,0.05)
  1995. MagicBlock("Cyan","Neon",true,refpart.CFrame,100,100,100,0.5,0.5,0.5,0.05)
  1996. MagniDamage(refpart,20,20,30,math.random(10,20),"ShieldBlast",refpart,0,1,math.random(5,10),nil,true,true,"Defense",0.1,10,true)
  1997. end
  1998. until num<=0
  1999. end))
  2000. end
  2001. for i=0,1,0.08/2 do
  2002. hbwait()
  2003. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,1,-1+idleangle)*angles(math.rad(-10),math.rad(0),math.rad(-40)),0.45/animationspeed)
  2004. Neck.C0=clerp(Neck.C0,necko*cf(0,0,0)*angles(math.rad(10),math.rad(0),math.rad(40)),0.45/animationspeed)
  2005. RW.C0=clerp(RW.C0,cf(1.5,0.5+idleangle,0)*angles(math.rad(-15),math.rad(0),math.rad(20))*RWC0,0.45/animationspeed)
  2006. LW.C0=clerp(LW.C0,cf(-1,0.5+idleangle,-0.5)*angles(math.rad(90),math.rad(0),math.rad(50))*LWC0,0.45/animationspeed)
  2007. RH.C0=clerp(RH.C0,cf(1,-1-idleangle,-0.5)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-30),math.rad(0),math.rad(-80)),0.45/animationspeed)
  2008. LH.C0=clerp(LH.C0,cf(-1,-0.5-idleangle,-0.5)*angles(math.rad(0),math.rad(-50),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(-10)),0.45/animationspeed)
  2009. swordhandleweld.C0=clerp(swordhandleweld.C0,cf(0,-1,0)*angles(math.rad(-90),0,0),0.45/animationspeed)
  2010. if StaggerHitAnim.Value==true or StaggerAnim.Value==true or StunAnim.Value==true then
  2011. break
  2012. end
  2013. end
  2014. attack=false
  2015. end
  2016.  
  2017. function Move3()
  2018. attack=true
  2019. for i=0,1,0.12/2 do
  2020. hbwait()
  2021. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-0.25+idleangle)*angles(math.rad(0),math.rad(-5),math.rad(-10)),0.45/animationspeed)
  2022. Neck.C0=clerp(Neck.C0,necko*cf(0,0,0)*angles(math.rad(10),math.rad(0),math.rad(5)),0.45/animationspeed)
  2023. RW.C0=clerp(RW.C0,cf(1.5,0.5+idleangle,0)*angles(math.rad(50),math.rad(0),math.rad(20))*RWC0,0.45/animationspeed)
  2024. LW.C0=clerp(LW.C0,cf(-1.5,0.25+idleangle,0)*angles(math.rad(130),math.rad(0),math.rad(5))*LWC0,0.45/animationspeed)
  2025. RH.C0=clerp(RH.C0,cf(1,-0.75-idleangle,0)*angles(math.rad(0),math.rad(70),math.rad(0))*angles(math.rad(-10),math.rad(0),math.rad(-10)),0.45/animationspeed)
  2026. LH.C0=clerp(LH.C0,cf(-1,-0.8-idleangle,-0.25)*angles(math.rad(0),math.rad(-80),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(-5)),0.45/animationspeed)
  2027. swordhandleweld.C0=clerp(swordhandleweld.C0,cf(0,-1,0)*angles(math.rad(-55),0,0),0.45/animationspeed)
  2028. if StaggerHitAnim.Value==true or StaggerAnim.Value==true or StunAnim.Value==true then
  2029. break
  2030. end
  2031. end
  2032. for i=0,1,0.12/2 do
  2033. hbwait()
  2034. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-0.1+idleangle)*angles(math.rad(0),math.rad(5),math.rad(10)),0.45/animationspeed)
  2035. Neck.C0=clerp(Neck.C0,necko*cf(0,0,0)*angles(math.rad(-5),math.rad(0),math.rad(-15)),0.45/animationspeed)
  2036. RW.C0=clerp(RW.C0,cf(1.5,0.5+idleangle,0)*angles(math.rad(150),math.rad(0),math.rad(10))*angles(math.rad(0),math.rad(10),math.rad(0))*RWC0,0.45/animationspeed)
  2037. LW.C0=clerp(LW.C0,cf(-1.5,0.5+idleangle,0)*angles(math.rad(20),math.rad(0),math.rad(-10))*LWC0,0.45/animationspeed)
  2038. RH.C0=clerp(RH.C0,cf(1,-1-idleangle,0)*angles(math.rad(0),math.rad(80),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(-2.5)),0.45/animationspeed)
  2039. LH.C0=clerp(LH.C0,cf(-1,-0.9-idleangle,-0.25)*angles(math.rad(0),math.rad(-100),math.rad(0))*angles(math.rad(-10),math.rad(0),math.rad(-5)),0.45/animationspeed)
  2040. swordhandleweld.C0=clerp(swordhandleweld.C0,cf(0,-1,0)*angles(math.rad(-140),0,0),0.45/animationspeed)
  2041. if StaggerHitAnim.Value==true or StaggerAnim.Value==true or StunAnim.Value==true then
  2042. break
  2043. end
  2044. end
  2045. so("306247678",Hitbox,0.5,0.75)
  2046. --so("341336159",Hitbox,0.5,0.75)
  2047. --MagicRing("Cyan","Neon",cf(Hitbox.Position)*cf(0,2.1,0)*angles(math.rad(90),0,0),1,1,1,1,1,0,0.01)
  2048. for i=0,1,0.04/2 do
  2049. hbwait()
  2050. --Lightning(Hitbox.Position+vt(0,2,0),Hitbox.Position+vt(math.random(-20,20),20,math.random(-20,20)),1,1,"Cyan","Neon",1/10,5/10,2)
  2051. --MagicCylinder("Cyan","Neon",Hitbox.CFrame*cf(0,2.1+149,-23.6)*angles(math.rad(-9),0,0),0.5,1500,0.5,1,0,1,0.1)
  2052. --MagicBlock("Cyan","Neon",true,Hitbox.CFrame--[[*cf(0,2.1,0)--]],1,1,1,1,1,1,0.05)
  2053. MagicCircle("Cyan","Neon",Hitbox.CFrame,5,25,5,math.random(5,10)/10,math.random(5,10)/10,math.random(5,10)/10,0.1)
  2054. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-0.1+idleangle)*angles(math.rad(0),math.rad(5),math.rad(10)),0.45/animationspeed)
  2055. Neck.C0=clerp(Neck.C0,necko*cf(0,0,0)*angles(math.rad(-5),math.rad(0),math.rad(-15)),0.45/animationspeed)
  2056. RW.C0=clerp(RW.C0,cf(1.5,0.5+idleangle,0)*angles(math.rad(150),math.rad(0),math.rad(10))*angles(math.rad(0),math.rad(10),math.rad(0))*RWC0,0.45/animationspeed)
  2057. LW.C0=clerp(LW.C0,cf(-1.5,0.5+idleangle,0)*angles(math.rad(20),math.rad(0),math.rad(-10))*LWC0,0.45/animationspeed)
  2058. RH.C0=clerp(RH.C0,cf(1,-1-idleangle,0)*angles(math.rad(0),math.rad(80),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(-2.5)),0.45/animationspeed)
  2059. LH.C0=clerp(LH.C0,cf(-1,-0.9-idleangle,-0.25)*angles(math.rad(0),math.rad(-100),math.rad(0))*angles(math.rad(-10),math.rad(0),math.rad(-5)),0.45/animationspeed)
  2060. swordhandleweld.C0=clerp(swordhandleweld.C0,cf(0,-1,0)*angles(math.rad(-140),0,0),0.45/animationspeed)
  2061. if StaggerHitAnim.Value==true or StaggerAnim.Value==true or StunAnim.Value==true then
  2062. break
  2063. end
  2064. end
  2065. for i=0,1,0.12/2 do
  2066. hbwait()
  2067. MagicCircle("Cyan","Neon",Hitbox.CFrame,5,25,5,math.random(5,10)/10,math.random(5,10)/10,math.random(5,10)/10,0.1)
  2068. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0+idleangle)*angles(math.rad(0),math.rad(0),math.rad(50)),0.45/animationspeed)
  2069. Neck.C0=clerp(Neck.C0,necko*cf(0,0,0)*angles(math.rad(5),math.rad(0),math.rad(-50)),0.45/animationspeed)
  2070. RW.C0=clerp(RW.C0,cf(1,0.5+idleangle,-0.5)*angles(math.rad(110),math.rad(0),math.rad(-50))*angles(math.rad(0),math.rad(60),math.rad(0))*RWC0,0.45/animationspeed)
  2071. LW.C0=clerp(LW.C0,cf(-1.5,0.5+idleangle,0)*angles(math.rad(-15),math.rad(0),math.rad(-10))*LWC0,0.45/animationspeed)
  2072. RH.C0=clerp(RH.C0,cf(1,-1-idleangle,0.25)*angles(math.rad(0),math.rad(40),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(2.5)),0.45/animationspeed)
  2073. LH.C0=clerp(LH.C0,cf(-1,-1-idleangle,0)*angles(math.rad(0),math.rad(-70),math.rad(0))*angles(math.rad(-7.5),math.rad(0),math.rad(5)),0.45/animationspeed)
  2074. swordhandleweld.C0=clerp(swordhandleweld.C0,cf(0,-1,0)*angles(math.rad(-90),0,0),0.45/animationspeed)
  2075. if StaggerHitAnim.Value==true or StaggerAnim.Value==true or StunAnim.Value==true then
  2076. break
  2077. end
  2078. end
  2079. --so("200633029",Hitbox,0.5,1)
  2080. so("200633077",Hitbox,0.5,2.9)
  2081. --so("341336307",Hitbox,0.5,1)
  2082. so("341336485",Hitbox,0.5,1)
  2083. LastPoint=Hitbox.CFrame*cf(0,2.1,0)
  2084. local energywavepart=part(3,Effects,"Neon",0,1,"Cyan","Effect",vt())
  2085. energywavepart.Anchored=true
  2086. energywavepart.CFrame=RootPart.CFrame*cf(0,0,-6.5)--*angles(math.rad(90),math.rad(80),0)
  2087. --local energywavemesh=mesh("SpecialMesh",energywavepart,"FileMesh","http://www.roblox.com/asset/?id=448386996",vt(0,0,0),vt(1/1000,1/20,1/15))
  2088. game:GetService("Debris"):AddItem(energywavepart,1)
  2089. coroutine.resume(coroutine.create(function(Wave)
  2090. local number=100
  2091. so("341336274",Wave,0.75,0.75)
  2092. repeat
  2093. hbwait()
  2094. wavecframe=Wave.CFrame
  2095. --Wave.CFrame=wavecframe*cf(0,-1,0)
  2096. Wave.CFrame=wavecframe*cf(0,0,-1)
  2097. MagicBlock("Cyan","Neon",true,Wave.CFrame,20,20,20,-1,-1,-1,0.05)
  2098. MagniDamage(Wave,4,10,20,math.random(10,20),"ElectricBlast",Wave,1,1,math.random(5,10),nil,true,true,"Movement",0.1,10,true)
  2099. number=number-1
  2100. until number<=0
  2101. end),energywavepart)
  2102. for i=0,1,0.12/2 do
  2103. hbwait()
  2104. TrailEffect("Cyan","Neon",Hitbox.CFrame*cf(0,2.1,0),LastPoint,"Block",0,0.1,-0.01,0,-0.01,0.1)
  2105. LastPoint=Hitbox.CFrame*cf(0,2.1,0)
  2106. MagniDamage(Hitbox,5,5,10,math.random(5,10),"Normal",RootPart,0.5,1,math.random(5,10),nil,true,false,nil,0,0,false)
  2107. --MagicCircle("Cyan","Neon",Hitbox.CFrame,5,25,5,math.random(5,10)/10,math.random(5,10)/10,math.random(5,10)/10,0.1)
  2108. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,-1.5,-0.5+idleangle)*angles(math.rad(5),math.rad(0),math.rad(-40)),0.45/animationspeed)
  2109. Neck.C0=clerp(Neck.C0,necko*cf(0,0,0)*angles(math.rad(5),math.rad(0),math.rad(40)),0.45/animationspeed)
  2110. RW.C0=clerp(RW.C0,cf(1.5,0.5+idleangle,0)*angles(math.rad(50),math.rad(0),math.rad(70))*angles(math.rad(0),math.rad(60),math.rad(0))*RWC0,0.45/animationspeed)
  2111. LW.C0=clerp(LW.C0,cf(-1.5,0.5+idleangle,0)*angles(math.rad(-10),math.rad(0),math.rad(-60))*LWC0,0.45/animationspeed)
  2112. RH.C0=clerp(RH.C0,cf(1,-0.6-idleangle,0)*angles(math.rad(0),math.rad(80),math.rad(0))*angles(math.rad(-12.5),math.rad(0),math.rad(-5)),0.45/animationspeed)
  2113. LH.C0=clerp(LH.C0,cf(-1.1,-0.5-idleangle,0.15)*angles(math.rad(0),math.rad(-50),math.rad(0))*angles(math.rad(-7.5),math.rad(0),math.rad(-7.5)),0.45/animationspeed)
  2114. swordhandleweld.C0=clerp(swordhandleweld.C0,cf(0,-1,0)*angles(math.rad(-150),0,0),0.45/animationspeed)
  2115. if StaggerHitAnim.Value==true or StaggerAnim.Value==true or StunAnim.Value==true then
  2116. break
  2117. end
  2118. end
  2119. LastPoint=nil
  2120. attack=false
  2121. end
  2122.  
  2123. function Move4()
  2124. attack=true
  2125. --[[
  2126. for i=0,1,0.12/2 do
  2127. hbwait()
  2128. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-1+idleangle)*angles(math.rad(10),math.rad(0),math.rad(0)),0.45/animationspeed)
  2129. Neck.C0=clerp(Neck.C0,necko*cf(0,0,0)*angles(math.rad(10),math.rad(0),math.rad(0)),0.45/animationspeed)
  2130. RW.C0=clerp(RW.C0,cf(1.5,0.5+idleangle,0)*angles(math.rad(0),math.rad(0),math.rad(40))*RWC0,0.45/animationspeed)
  2131. LW.C0=clerp(LW.C0,cf(-1.5,0.5+idleangle,0)*angles(math.rad(0),math.rad(0),math.rad(-30))*LWC0,0.45/animationspeed)
  2132. RH.C0=clerp(RH.C0,cf(1,-0-idleangle,-0.5)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(7.5)),0.45/animationspeed)
  2133. LH.C0=clerp(LH.C0,cf(-1,-0.5-idleangle,-0.5)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(25)),0.45/animationspeed)
  2134. swordhandleweld.C0=clerp(swordhandleweld.C0,cf(0,-1,0)*angles(math.rad(-90),0,0),0.45/animationspeed)
  2135. if StaggerHitAnim.Value==true or StaggerAnim.Value==true or StunAnim.Value==true then
  2136. break
  2137. end
  2138. end
  2139. MagicWave("Institutional white","SmoothPlastic",RootPart.CFrame*cf(0,-3,0),5,1,5,0.2,-0.01,0.2,0.025)
  2140. Humanoid.Jump=true
  2141. Torso.Velocity=Vector3.new(0,50,0)+RootPart.CFrame.lookVector*50
  2142. for i=0,1,0.12/2 do
  2143. hbwait()
  2144. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0+idleangle)*angles(math.rad(-5),math.rad(0),math.rad(0)),0.45/animationspeed)
  2145. Neck.C0=clerp(Neck.C0,necko*cf(0,0,0)*angles(math.rad(-5),math.rad(0),math.rad(0)),0.45/animationspeed)
  2146. RW.C0=clerp(RW.C0,cf(1.5,0.5+idleangle,0)*angles(math.rad(-15),math.rad(0),math.rad(15))*RWC0,0.45/animationspeed)
  2147. LW.C0=clerp(LW.C0,cf(-1.5,0.5+idleangle,0)*angles(math.rad(-5),math.rad(0),math.rad(-10))*LWC0,0.45/animationspeed)
  2148. RH.C0=clerp(RH.C0,cf(1,-0.9-idleangle,-0.5)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(1.25),math.rad(0),math.rad(-35)),0.45/animationspeed)
  2149. LH.C0=clerp(LH.C0,cf(-1,-0.8-idleangle,-0.25)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(15)),0.45/animationspeed)
  2150. swordhandleweld.C0=clerp(swordhandleweld.C0,cf(0,-1,0)*angles(math.rad(-90),0,0),0.45/animationspeed)
  2151. if StaggerHitAnim.Value==true or StaggerAnim.Value==true or StunAnim.Value==true then
  2152. break
  2153. end
  2154. end
  2155. ]]--
  2156. for i=0,1,0.12/2 do
  2157. hbwait()
  2158. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-1+idleangle)*angles(math.rad(10),math.rad(0),math.rad(0)),0.45/animationspeed)
  2159. Neck.C0=clerp(Neck.C0,necko*cf(0,0,0)*angles(math.rad(10),math.rad(0),math.rad(0)),0.45/animationspeed)
  2160. RW.C0=clerp(RW.C0,cf(1,0.5+idleangle,-0.5)*angles(math.rad(110),math.rad(0),math.rad(-45))*angles(math.rad(0),math.rad(-180),math.rad(0))*RWC0,0.45/animationspeed)
  2161. LW.C0=clerp(LW.C0,cf(-1,0.5+idleangle,-0.5)*angles(math.rad(110),math.rad(0),math.rad(45))*LWC0,0.45/animationspeed)
  2162. RH.C0=clerp(RH.C0,cf(1,-0-idleangle,-0.5)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(7.5)),0.45/animationspeed)
  2163. LH.C0=clerp(LH.C0,cf(-1,-0.5-idleangle,-0.5)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(25)),0.45/animationspeed)
  2164. swordhandleweld.C0=clerp(swordhandleweld.C0,cf(0,-1,0)*angles(math.rad(-90),0,0)*angles(0,math.rad(-45),0),0.45/animationspeed)
  2165. if StaggerHitAnim.Value==true or StaggerAnim.Value==true or StunAnim.Value==true then
  2166. break
  2167. end
  2168. end
  2169. local move4num=0
  2170. for i=0,1,0.04/2 do
  2171. hbwait()
  2172. if move4num>=5 then
  2173. move4num=0
  2174. MagicWave("Cyan","Neon",RootPart.CFrame*cf(0,-3,0),1,1,1,1,0.1,1,0.05)
  2175. else
  2176. move4num=move4num+1
  2177. end
  2178. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-1+idleangle)*angles(math.rad(10),math.rad(0),math.rad(0)),0.45/animationspeed)
  2179. Neck.C0=clerp(Neck.C0,necko*cf(0,0,0)*angles(math.rad(10),math.rad(0),math.rad(0)),0.45/animationspeed)
  2180. RW.C0=clerp(RW.C0,cf(1,0.5+idleangle,-0.5)*angles(math.rad(110),math.rad(0),math.rad(-45))*angles(math.rad(0),math.rad(-180),math.rad(0))*RWC0,0.45/animationspeed)
  2181. LW.C0=clerp(LW.C0,cf(-1,0.5+idleangle,-0.5)*angles(math.rad(110),math.rad(0),math.rad(45))*LWC0,0.45/animationspeed)
  2182. RH.C0=clerp(RH.C0,cf(1,-0-idleangle,-0.5)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(7.5)),0.45/animationspeed)
  2183. LH.C0=clerp(LH.C0,cf(-1,-0.5-idleangle,-0.5)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(25)),0.45/animationspeed)
  2184. swordhandleweld.C0=clerp(swordhandleweld.C0,cf(0,-1,0)*angles(math.rad(-90),0,0)*angles(0,math.rad(-45),0),0.45/animationspeed)
  2185. if StaggerHitAnim.Value==true or StaggerAnim.Value==true or StunAnim.Value==true then
  2186. break
  2187. end
  2188. end
  2189. attack=false
  2190. end
  2191.  
  2192. hold=false
  2193.  
  2194. Mouse.Button1Down:connect(function()
  2195. --function ob1d(Mouse)
  2196. if attack==true or equipped==false then return end
  2197. hold=true
  2198. if attacktype==1 then
  2199. attacktype=2
  2200. Attack1()
  2201. elseif attacktype==2 then
  2202. attacktype=3
  2203. Attack2()
  2204. elseif attacktype==3 then
  2205. attacktype=4
  2206. Attack3()
  2207. elseif attacktype==4 then
  2208. attacktype=1
  2209. Attack4()
  2210. end
  2211. coroutine.resume(coroutine.create(function()
  2212. for i=1,50 do
  2213. if attack==false then
  2214. hbwait()
  2215. end
  2216. end
  2217. if attack==false then
  2218. attacktype=1
  2219. end
  2220. end))
  2221. --end
  2222. end)
  2223.  
  2224. if allowhopperbin==true then
  2225. function ob1u(Mouse)
  2226. hold=false
  2227. end
  2228. end
  2229.  
  2230. Mouse.KeyDown:connect(function(key)
  2231. --function key(key)
  2232. if key=="f" and canunequiporequip==true and attack==false then
  2233. if equipped==false then
  2234. equipped=true
  2235. if disableanimate==true then
  2236. Animate.Disabled=true
  2237. local idleanimation=Humanoid:LoadAnimation(Torso.robloxidleanimation)
  2238. idleanimation:Play()
  2239. end
  2240. if disableanimator==true then
  2241. Animator.Parent=nil
  2242. end
  2243. if disablemovingarms==true then
  2244. RW.Parent=Torso
  2245. LW.Parent=Torso
  2246. RSH.Parent=nil
  2247. LSH.Parent=nil
  2248. end
  2249. equipanim()
  2250. elseif equipped==true then
  2251. equipped=false
  2252. unequipanim()
  2253. hbwait()
  2254. if disablemovingarms==true then
  2255. RW.Parent=nil
  2256. LW.Parent=nil
  2257. RSH.Parent=Torso
  2258. LSH.Parent=Torso
  2259. end
  2260. if disableanimator==true then
  2261. Animator.Parent=Humanoid
  2262. end
  2263. if disableanimate==true then
  2264. Animate.Disabled=false
  2265. end
  2266. end
  2267. end
  2268. if key=="e" and attack==false and equipped==true then
  2269. EAbility()
  2270. end
  2271. if key=="z" and attack==false and equipped==true and cooldown1>=co1 and Mana.Value>=skill1mana then
  2272. subtractmana(skill1mana)
  2273. cooldown1=0
  2274. Move1()
  2275. end
  2276. if key=="x" and attack==false and equipped==true and cooldown2>=co2 and Mana.Value>=skill2mana then
  2277. subtractmana(skill2mana)
  2278. cooldown2=0
  2279. Move2()
  2280. end
  2281. if key=="c" and attack==false and equipped==true and cooldown3>=co3 and Mana.Value>=skill3mana then
  2282. subtractmana(skill3mana)
  2283. cooldown3=0
  2284. Move3()
  2285. end
  2286. if key=="v" and attack==false and equipped==true and cooldown4>=co4 and Mana.Value>=skill4mana then
  2287. subtractmana(skill4mana)
  2288. cooldown4=0
  2289. Move4()
  2290. end
  2291. if key=="q" then
  2292. Mana.Value=100
  2293. cooldown1=co1
  2294. cooldown2=co2
  2295. cooldown3=co3
  2296. cooldown4=co4
  2297. end
  2298. if key=="p" then
  2299. StaggerHitAnim.Value=true
  2300. end
  2301. if key=="[" then
  2302. StaggerAnim.Value=true
  2303. end
  2304. if key=="]" then
  2305. StunAnim.Value=true
  2306. end
  2307. --end
  2308. end)
  2309.  
  2310. Mouse.KeyUp:connect(function(key2)
  2311. --function key2(key)
  2312. --end
  2313. end)
  2314.  
  2315. if allowhopperbin==true then
  2316. function s(Mouse)
  2317. Mouse.Button1Down:connect(function() ob1d(Mouse) end)
  2318. Mouse.Button1Up:connect(function() ob1u(Mouse) end)
  2319. Mouse.KeyDown:connect(key)
  2320. Mouse.KeyUp:connect(key2)
  2321. end
  2322. end
  2323.  
  2324. if allowhopperbin==true then
  2325. function ds(Mouse)
  2326. end
  2327. end
  2328.  
  2329. if allowhopperbin==true then
  2330. Bin.Selected:connect(s)
  2331. Bin.Deselected:connect(ds)
  2332. end
  2333.  
  2334. --[[GUI functions and other stuff]]--
  2335. function updateskills()
  2336. if allowabilitiestofunction==true then
  2337. if cooldown1<=co1 then
  2338. cooldown1=cooldown1+1/30
  2339. if cooldown1>=co1 then
  2340. cooldown1=co1
  2341. end
  2342. end
  2343. if cooldown2<=co2 then
  2344. cooldown2=cooldown2+1/30
  2345. if cooldown2>=co2 then
  2346. cooldown2=co2
  2347. end
  2348. end
  2349. if cooldown3<=co3 then
  2350. cooldown3=cooldown3+1/30
  2351. if cooldown3>=co3 then
  2352. cooldown3=co3
  2353. end
  2354. end
  2355. if cooldown4<=co4 then
  2356. cooldown4=cooldown4+1/30
  2357. if cooldown4>=co4 then
  2358. cooldown4=co4
  2359. end
  2360. end
  2361. if changebarcolorsifnotenoughmana==true then
  2362. if Mana.Value<=skill1mana then
  2363. bar4.BackgroundColor3=c3(104/255,104/255,104/255)
  2364. else
  2365. bar4.BackgroundColor3=c3(Colorpart1,Colorpart2,Colorpart3)
  2366. end
  2367. if Mana.Value<=skill2mana then
  2368. bar3.BackgroundColor3=c3(104/255,104/255,104/255)
  2369. else
  2370. bar3.BackgroundColor3=c3(Colorpart1,Colorpart2,Colorpart3)
  2371. end
  2372. if Mana.Value<=skill3mana then
  2373. bar1.BackgroundColor3=c3(104/255,104/255,104/255)
  2374. else
  2375. bar1.BackgroundColor3=c3(Colorpart1,Colorpart2,Colorpart3)
  2376. end
  2377. if Mana.Value<=skill4mana then
  2378. bar2.BackgroundColor3=c3(104/255,104/255,104/255)
  2379. else
  2380. bar2.BackgroundColor3=c3(Colorpart1,Colorpart2,Colorpart3)
  2381. end
  2382. elseif changebarcolorsifnotenoughmana==false then
  2383. bar1.BackgroundColor3=c3(Colorpart1,Colorpart2,Colorpart3)
  2384. bar2.BackgroundColor3=c3(Colorpart1,Colorpart2,Colorpart3)
  2385. bar3.BackgroundColor3=c3(Colorpart1,Colorpart2,Colorpart3)
  2386. bar4.BackgroundColor3=c3(Colorpart1,Colorpart2,Colorpart3)
  2387. end
  2388. end
  2389. if alternatemanaregensystem==false then
  2390. if Mana.Value<=maxmana then
  2391. Mana.Value=Mana.Value+recovermana/30
  2392. elseif Mana.Value>=maxmana then
  2393. Mana.Value=maxmana
  2394. end
  2395. elseif alternatemanaregensystem==true then
  2396. if Mana.Value>=maxmana then
  2397. Mana.Value=maxmana
  2398. else
  2399. if manadelay<=manawait then
  2400. manadelay=manadelay+1
  2401. else
  2402. manadelay=0
  2403. Mana.Value=Mana.Value+1
  2404. end
  2405. end
  2406. end
  2407. if allowstunbar==true then
  2408. if StunValue.Value<=0 then
  2409. StunValue.Value=0
  2410. else
  2411. if stundelay<=stunwait then
  2412. stundelay=stundelay+1
  2413. else
  2414. stundelay=0
  2415. StunValue.Value=StunValue.Value-1
  2416. end
  2417. end
  2418. elseif allowstunbar==false then
  2419. StunValue.Value=0
  2420. end
  2421. end
  2422.  
  2423. if allowmenutofunction==true then
  2424. ArtificialHB.Event:connect(function()
  2425. --while true do
  2426. --hbwait()
  2427. updateskills()
  2428. if allowabilitiestofunction==true then
  2429. framesk1:TweenSize(ud(0.26,0,0.06,0),"Out","Quad",menuupdatespeed,constantupdate)
  2430. framesk2:TweenSize(ud(0.26,0,0.06,0),"Out","Quad",menuupdatespeed,constantupdate)
  2431. framesk3:TweenSize(ud(0.26,0,0.06,0),"Out","Quad",menuupdatespeed,constantupdate)
  2432. framesk4:TweenSize(ud(0.26,0,0.06,0),"Out","Quad",menuupdatespeed,constantupdate)
  2433. bar1:TweenSize(ud(1*(cooldown3/co3),0,1,0),"Out","Quad",menuupdatespeed,constantupdate)
  2434. bar2:TweenSize(ud(1*(cooldown4/co4),0,1,0),"Out","Quad",menuupdatespeed,constantupdate)
  2435. bar3:TweenSize(ud(1*(cooldown2/co2),0,1,0),"Out","Quad",menuupdatespeed,constantupdate)
  2436. bar4:TweenSize(ud(1*(cooldown1/co1),0,1,0),"Out","Quad",menuupdatespeed,constantupdate)
  2437. end
  2438. manabar:TweenSize(ud(0.26,0,0.03,0),"Out","Quad",menuupdatespeed,constantupdate)
  2439. manacover:TweenSize(ud(1*(Mana.Value/maxmana),0,1,0),"Out","Quad",menuupdatespeed,constantupdate)
  2440. healthbar:TweenSize(ud(0.26,0,0.03,0),"Out","Quad",menuupdatespeed,constantupdate)
  2441. healthcover:TweenSize(ud(1*(Character.Humanoid.Health/Character.Humanoid.MaxHealth),0,1,0),"Out","Quad",menuupdatespeed,constantupdate)
  2442. if allowstunbar==true then
  2443. if showstunbar==true then
  2444. if stunframe~=nil then
  2445. stunframe:TweenSize(ud(0.26,0,0.03,0),"Out","Quad",menuupdatespeed,constantupdate)
  2446. stunbar:TweenSize(ud(1*(StunValue.Value/maxstun),0,1,0),"Out","Quad",menuupdatespeed,constantupdate)
  2447. end
  2448. end
  2449. end
  2450. if showhealthmanaandstunnumbers==true then
  2451. manatext.Text="Mana ["..math.floor(Mana.Value).."]"
  2452. healthtext.Text="Health ["..math.floor(Humanoid.Health).."]"
  2453. if allowstunbar==true then
  2454. if showstunbar==true then
  2455. stuntext.Text="Stun ["..math.floor(StunValue.Value).."]"
  2456. end
  2457. end
  2458. end
  2459. if showstats==true then
  2460. defenseframe:TweenSize(ud(0.075,0,0.03,0),"Out","Quad",menuupdatespeed,constantupdate)
  2461. damageframe:TweenSize(ud(0.075,0,0.03,0),"Out","Quad",menuupdatespeed,constantupdate)
  2462. movementframe:TweenSize(ud(0.075,0,0.03,0),"Out","Quad",menuupdatespeed,constantupdate)
  2463. defensetext.Text="Defense: "..Defense.Value
  2464. damagetext.Text="Damage: "..Damage.Value
  2465. if Rooted.Value==false then
  2466. movementtext.Text="Movement: "..Movement.Value
  2467. elseif Rooted.Value==true or Movement.Value<=0 then
  2468. movementtext.Text="Movement: 0"
  2469. end
  2470. end
  2471. --end
  2472. end)
  2473. end
  2474. --------------------------------
  2475.  
  2476. function positiveangle(thingy)
  2477. if thingy>0 then thingy=0 end
  2478. return thingy
  2479. end
  2480.  
  2481. function negativeangle(thingy)
  2482. if thingy<0 then thingy=0 end
  2483. return thingy
  2484. end
  2485.  
  2486. --ArtificialHB.Event:connect(function()
  2487. while true do
  2488. hbwait()
  2489. if Hitbox~=nil then
  2490. if attack==true then
  2491. Hitbox.Name="Hitbox"
  2492. elseif attack==false then
  2493. Hitbox.Name="NilHitbox"
  2494. end
  2495. end
  2496. if Humanoid.Health>0 then
  2497. if walkspeeddependsonmovementvalue==true then
  2498. if Movement.Value<0 or StaggerAnim.Value==true or StunAnim.Value==true or StaggerHitAnim.Value==true or Rooted.Value==true then
  2499. Humanoid.WalkSpeed=0
  2500. else
  2501. Humanoid.WalkSpeed=16*Movement.Value
  2502. end
  2503. end
  2504. if StunValue.Value>=maxstun then
  2505. StunValue.Value=0
  2506. StunAnim.Value=true
  2507. end
  2508. if StaggerAnim.Value==true and staggeranim==false then
  2509. coroutine.resume(coroutine.create(function()
  2510. staggeranim=true
  2511. while attack==true do
  2512. hbwait()
  2513. end
  2514. Stagger()
  2515. StaggerAnim.Value=false
  2516. staggeranim=false
  2517. end))
  2518. end
  2519. if StaggerHitAnim.Value==true and staggerhitanim==false then
  2520. coroutine.resume(coroutine.create(function()
  2521. staggerhitanim=true
  2522. while attack==true do
  2523. hbwait()
  2524. end
  2525. StaggerHit()
  2526. StaggerHitAnim.Value=false
  2527. staggerhitanim=false
  2528. end))
  2529. end
  2530. if StunAnim.Value==true and stunanim==false or StunValue.Value>=100 then
  2531. coroutine.resume(coroutine.create(function()
  2532. StunValue.Value=0
  2533. stunanim=true
  2534. while attack==true do
  2535. hbwait()
  2536. end
  2537. Stun()
  2538. StunAnim.Value=false
  2539. stunanim=false
  2540. end))
  2541. end
  2542. sine=sine+change
  2543. someangle=(someangle%100)+change2/10
  2544. local torvel=(RootPart.Velocity*vt(1,0,1)).magnitude
  2545. local velderp=RootPart.Velocity.y
  2546. local lv=Torso.CFrame:pointToObjectSpace(Torso.Velocity+Torso.Position)
  2547. hitfloor,posfloor=rayCast(RootPart.Position,(cf(RootPart.Position,RootPart.Position-vt(0,1,0))).lookVector,4,Character)
  2548. if donum>=.5 then
  2549. handidle=true
  2550. elseif donum<=0 then
  2551. handidle=false
  2552. end
  2553. if handidle==false then
  2554. donum=donum+0.003/animationspeed
  2555. else
  2556. donum=donum-0.003/animationspeed
  2557. end
  2558. if equipped==true or equipped==false then
  2559. if attack==false then
  2560. idle=idle+1
  2561. else
  2562. idle=0
  2563. end
  2564. --------------------------------
  2565. if leftarm==true then
  2566. if Anim=="Walk" and equipped==true and attack==false then
  2567. if alternatewalk==false then
  2568. if walkinganim==true then
  2569. LW.C1=clerp(LW.C1,LWC0*cf(0,0.5,0)*angles(math.rad(30),math.rad(0),math.rad(0)),0.2*(Humanoid.WalkSpeed/16)/animationspeed)
  2570. else
  2571. LW.C1=clerp(LW.C1,LWC0*cf(0,0.5,0)*angles(math.rad(-60),math.rad(0),math.rad(0)),0.2*(Humanoid.WalkSpeed/16)/animationspeed)
  2572. end
  2573. else
  2574. if walkinganim==true then
  2575. LW.C1=clerp(LW.C1,LWC0*cf(0,0.5,0)*angles(math.rad(45),math.rad(0),math.rad(0)),0.2*(Humanoid.WalkSpeed/16)/animationspeed)
  2576. else
  2577. LW.C1=clerp(LW.C1,LWC0*cf(0,0.5,0)*angles(math.rad(-45),math.rad(0),math.rad(0)),0.2*(Humanoid.WalkSpeed/16)/animationspeed)
  2578. end
  2579. end
  2580. elseif Anim~="Walk" and equipped==true or attack==true or leftarm==false then
  2581. LW.C1=clerp(LW.C1,LWC0*cf(0,0.5,0)*angles(math.rad(0),math.rad(0),math.rad(0)),0.2/animationspeed)
  2582. end
  2583. end
  2584. --------------------------------
  2585. if rightarm==true then
  2586. if Anim=="Walk" and equipped==true and attack==false then
  2587. if alternatewalk==false then
  2588. if walkinganim==true then
  2589. RW.C1=clerp(RW.C1,RWC0*cf(0,0.5,0)*angles(math.rad(-60),math.rad(0),math.rad(0)),0.2*(Humanoid.WalkSpeed/16)/animationspeed)
  2590. else
  2591. RW.C1=clerp(RW.C1,RWC0*cf(0,0.5,0)*angles(math.rad(30),math.rad(0),math.rad(0)),0.2*(Humanoid.WalkSpeed/16)/animationspeed)
  2592. end
  2593. else
  2594. if walkinganim==true then
  2595. RW.C1=clerp(RW.C1,RWC0*cf(0,0.5,0)*angles(math.rad(-45),math.rad(0),math.rad(0)),0.2*(Humanoid.WalkSpeed/16)/animationspeed)
  2596. else
  2597. RW.C1=clerp(RW.C1,RWC0*cf(0,0.5,0)*angles(math.rad(45),math.rad(0),math.rad(0)),0.2*(Humanoid.WalkSpeed/16)/animationspeed)
  2598. end
  2599. end
  2600. elseif Anim~="Walk" and equipped==true or attack==true or rightarm==false then
  2601. RW.C1=clerp(RW.C1,RWC0*cf(0,0.5,0)*angles(math.rad(0),math.rad(0),math.rad(0)),0.2/animationspeed)
  2602. end
  2603. end
  2604. --------------------------------
  2605. if allowwalking==true then
  2606. if Anim=="Walk" and equipped==true then
  2607. if alternatewalk==false then
  2608. if walkinganim==true then
  2609. RH.C1=clerp(RH.C1,RHC1*cf(0.2,-0.2,0)*angles(math.rad(0),math.rad(0),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(60)),0.2*(Humanoid.WalkSpeed/16)/animationspeed)
  2610. LH.C1=clerp(LH.C1,LHC1*cf(0.1,0.2,0)*angles(math.rad(0),math.rad(0),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(60)),0.2*(Humanoid.WalkSpeed/16)/animationspeed)
  2611. else
  2612. RH.C1=clerp(RH.C1,RHC1*cf(-0.1,0.2,0)*angles(math.rad(0),math.rad(0),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(-60)),0.2*(Humanoid.WalkSpeed/16)/animationspeed)
  2613. LH.C1=clerp(LH.C1,LHC1*cf(-0.2,-0.2,0)*angles(math.rad(0),math.rad(0),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(-60)),0.2*(Humanoid.WalkSpeed/16)/animationspeed)
  2614. end
  2615. else
  2616. if walkinganim==true then
  2617. RH.C1=clerp(RH.C1,RHC1*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(45)),0.2*(Humanoid.WalkSpeed/16)/animationspeed)
  2618. LH.C1=clerp(LH.C1,LHC1*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(45)),0.2*(Humanoid.WalkSpeed/16)/animationspeed)
  2619. else
  2620. RH.C1=clerp(RH.C1,RHC1*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(-45)),0.2*(Humanoid.WalkSpeed/16)/animationspeed)
  2621. LH.C1=clerp(LH.C1,LHC1*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(-45)),0.2*(Humanoid.WalkSpeed/16)/animationspeed)
  2622. end
  2623. end
  2624. elseif Anim~="Walk" and equipped==true then
  2625. RH.C1=clerp(RH.C1,RHC1*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0)),0.2/animationspeed)
  2626. LH.C1=clerp(LH.C1,LHC1*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0)),0.2/animationspeed)
  2627. end
  2628. end
  2629. --------------------------------
  2630. if Anim=="Walk" and equipped==true then
  2631. RootJoint.C1=clerp(RootJoint.C1,RootCF*cf(0,0,-0.1*math.cos(sine/3)+idleangle),0.2/animationspeed)
  2632. Neck.C1=clerp(Neck.C1,necko*cf(0,0,-1.5)*angles(math.rad(2*math.sin(sine/3)),math.rad(0),math.rad(0)),0.2/animationspeed)
  2633. RH.C1=clerp(RH.C1,RHC1*cf(0.25*math.cos(sine/6),-0.25*math.sin(sine/6),0)*angles(math.rad(0),math.rad(0),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(60*math.cos(sine/6))),0.2/animationspeed)
  2634. LH.C1=clerp(LH.C1,LHC1*cf(0.25*math.cos(sine/6),0.25*math.sin(sine/6),0)*angles(math.rad(0),math.rad(0),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(60*math.cos(sine/6))),0.2/animationspeed)
  2635. elseif Anim~="Walk" or equipped~=true then
  2636. RootJoint.C1=clerp(RootJoint.C1,RootCF*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),0.2/animationspeed)
  2637. Neck.C1=clerp(Neck.C1,necko*cf(0,0,-1.5)*angles(math.rad(0),math.rad(0),math.rad(0)),0.2/animationspeed)
  2638. RH.C1=clerp(RH.C1,RHC1*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0)),0.2/animationspeed)
  2639. LH.C1=clerp(LH.C1,LHC1*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0)),0.2/animationspeed)
  2640. end
  2641. if velderp>1 and hitfloor==nil then
  2642. Anim="Jump"
  2643. if attack==false and equipped==true then
  2644. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0+idleangle)*angles(math.rad(0),math.rad(0),math.rad(0)),0.2/animationspeed)
  2645. Neck.C0=clerp(Neck.C0,necko*cf(0,0,0)*angles(math.rad(-20),math.rad(0),math.rad(0)),0.2/animationspeed)
  2646. RW.C0=clerp(RW.C0,cf(1.5,0.5+idleangle,0)*angles(math.rad(-40),math.rad(0),math.rad(20))*RWC0,0.2/animationspeed)
  2647. LW.C0=clerp(LW.C0,cf(-1.5,0.5+idleangle,0)*angles(math.rad(-40),math.rad(0),math.rad(-20))*LWC0,0.2/animationspeed)
  2648. RH.C0=clerp(RH.C0,cf(1,-1-idleangle,-0.3)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-10),math.rad(0),math.rad(-20)),0.2/animationspeed)
  2649. LH.C0=clerp(LH.C0,cf(-1,-1-idleangle,-0.3)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-10),math.rad(0),math.rad(20)),0.2/animationspeed)
  2650. swordhandleweld.C0=clerp(swordhandleweld.C0,cf(0,-1,0)*angles(math.rad(-90),0,0),0.2/animationspeed)
  2651. end
  2652. elseif velderp<-1 and hitfloor==nil then
  2653. Anim="Fall"
  2654. if attack==false and equipped==true then
  2655. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0+idleangle)*angles(math.rad(0),math.rad(0),math.rad(0)),0.2/animationspeed)
  2656. Neck.C0=clerp(Neck.C0,necko*cf(0,0,0)*angles(math.rad(20),math.rad(0),math.rad(0)),0.2/animationspeed)
  2657. RW.C0=clerp(RW.C0,cf(1.5,0.5+idleangle,0)*angles(math.rad(0),math.rad(0),math.rad(60))*RWC0,0.2/animationspeed)
  2658. LW.C0=clerp(LW.C0,cf(-1.5,0.5+idleangle,0)*angles(math.rad(0),math.rad(0),math.rad(-60))*LWC0,0.2/animationspeed)
  2659. RH.C0=clerp(RH.C0,cf(1,-1-idleangle,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(20)),0.2/animationspeed)
  2660. LH.C0=clerp(LH.C0,cf(-1,-1-idleangle,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(10)),0.2/animationspeed)
  2661. swordhandleweld.C0=clerp(swordhandleweld.C0,cf(0,-1,0)*angles(math.rad(-90),0,0),0.2/animationspeed)
  2662. end
  2663. elseif torvel<1 and hitfloor~=nil then
  2664. Anim="Idle"
  2665. if attack==false and equipped==true then
  2666. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0.02*math.cos(sine/30),0+idleangle)*angles(math.rad(2.5-1.25*math.cos(sine/30)),math.rad(0),math.rad(-20)),0.15/animationspeed)
  2667. Neck.C0=clerp(Neck.C0,necko*cf(0,0,0)*angles(math.rad(-1.25*math.sin(sine/30)),math.rad(0),math.rad(20)),0.15/animationspeed)
  2668. RW.C0=clerp(RW.C0,cf(1.5,0.5+idleangle,0)*angles(math.rad(10-1.25*math.sin(sine/30)),math.rad(0),math.rad(20))*RWC0,0.15/animationspeed)
  2669. LW.C0=clerp(LW.C0,cf(-1.25,0.5+idleangle,-0.25)*angles(math.rad(50+1.25*math.sin(sine/30)),math.rad(0),math.rad(20))*LWC0,0.15/animationspeed)
  2670. RH.C0=clerp(RH.C0,cf(1,-1-idleangle,0)*angles(math.rad(0),math.rad(80),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0-1.25*math.cos(sine/30))),0.15/animationspeed)
  2671. LH.C0=clerp(LH.C0,cf(-1,-1-idleangle,0)*angles(math.rad(0),math.rad(-70),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(-5+1.25*math.cos(sine/30))),0.15/animationspeed)
  2672. swordhandleweld.C0=clerp(swordhandleweld.C0,cf(0,-1,0)*angles(math.rad(-90),0,0),0.15/animationspeed)
  2673. end
  2674. elseif torvel>1 and hitfloor~=nil then
  2675. Anim="Walk"
  2676. walk=walk+1/animationspeed
  2677. if walk>=15-(5*(Humanoid.WalkSpeed/16)) then
  2678. walk=0
  2679. if walkinganim==true then
  2680. walkinganim=false
  2681. elseif walkinganim==false then
  2682. walkinganim=true
  2683. end
  2684. end
  2685. if attack==false and equipped==true then
  2686. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0+idleangle)*angles(math.rad(5),math.rad(0),math.rad(-30+5*math.cos(sine/6))),0.2/animationspeed)
  2687. Neck.C0=clerp(Neck.C0,necko*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(30-5*math.cos(sine/6))),0.2/animationspeed)
  2688. RW.C0=clerp(RW.C0,cf(1.5,0.5+idleangle,0)*angles(math.rad(-10+5*math.sin(sine/6)),math.rad(0),math.rad(20))*RWC0,0.2/animationspeed)
  2689. LW.C0=clerp(LW.C0,cf(-1,0.5+idleangle,-0.5)*angles(math.rad(70+5*math.sin(sine/3)),math.rad(0),math.rad(50))*angles(math.rad(0),math.rad(-10),math.rad(0))*LWC0,0.2/animationspeed)
  2690. RH.C0=clerp(RH.C0,cf(1,-1-idleangle,0)*angles(math.rad(0),math.rad(120-5*math.cos(sine/6)),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0)),0.2/animationspeed)
  2691. LH.C0=clerp(LH.C0,cf(-1,-0.9-idleangle,0)*angles(math.rad(0),math.rad(-60-5*math.cos(sine/6)),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0)),0.2/animationspeed)
  2692. swordhandleweld.C0=clerp(swordhandleweld.C0,cf(0,-1,0)*angles(math.rad(-90),0,0),0.2/animationspeed)
  2693. end
  2694. end
  2695. end
  2696. end
  2697. end
  2698. --end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement