memberhero

Probaly Last Virtue Test

Oct 12th, 2020
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 144.32 KB | None | 0 0
  1.  
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player = owner
  4. local Mouse,mouse,UserInputService,ContextActionService
  5. do
  6. script.Parent = RhiBel00351
  7. local CAS = {Actions={}}
  8. local Event = Instance.new("RemoteEvent")
  9. Event.Name = "UserInput_Event"
  10. Event.Parent = Player.Character
  11. local fakeEvent = function()
  12. local t = {_fakeEvent=true}
  13. t.Connect = function(self,f)self.Function=f end
  14. t.connect = t.Connect
  15. return t
  16. end
  17. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  18. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  19. function CAS:BindAction(name,fun,touch,...)
  20. CAS.Actions[name] = {Name=name,Function=fun,Keys={...}}
  21. end
  22. function CAS:UnbindAction(name)
  23. CAS.Actions[name] = nil
  24. end
  25. local function te(self,ev,...)
  26. local t = m[ev]
  27. if t and t._fakeEvent and t.Function then
  28. t.Function(...)
  29. end
  30. end
  31. m.TrigEvent = te
  32. UIS.TrigEvent = te
  33. Event.OnServerEvent:Connect(function(plr,io)
  34. if plr~=Player then return end
  35. if io.isMouse then
  36. m.Target = io.Target
  37. m.Hit = io.Hit
  38. elseif io.UserInputType == Enum.UserInputType.MouseButton1 then
  39. if io.UserInputState == Enum.UserInputState.Begin then
  40. m:TrigEvent("Button1Down")
  41. else
  42. m:TrigEvent("Button1Up")
  43. end
  44. else
  45. for n,t in pairs(CAS.Actions) do
  46. for _,k in pairs(t.Keys) do
  47. if k==io.KeyCode then
  48. t.Function(t.Name,io.UserInputState,io)
  49. end
  50. end
  51. end
  52. if io.UserInputState == Enum.UserInputState.Begin then
  53. m:TrigEvent("KeyDown",io.KeyCode.Name:lower())
  54. UIS:TrigEvent("InputBegan",io,false)
  55. else
  56. m:TrigEvent("KeyUp",io.KeyCode.Name:lower())
  57. UIS:TrigEvent("InputEnded",io,false)
  58. end
  59. end
  60. end)
  61. NLS([==[
  62. local Player = game:GetService("Players").LocalPlayer
  63.  
  64. local Char = Player.Character
  65. local Event = Char:WaitForChild("UserInput_Event")
  66.  
  67. local UIS = game:GetService("UserInputService")
  68.  
  69. local input = function(io,a)
  70. if a then return end
  71. local io = {KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState}
  72. Event:FireServer(io)
  73. end
  74. UIS.InputBegan:Connect(input)
  75. UIS.InputEnded:Connect(input)
  76. local Changed = false
  77. local Mouse = Player:GetMouse()
  78. local h,t = Mouse.Hit,Mouse.Target
  79. while wait(1/30) do
  80. if h~=Mouse.Hit or t~=Mouse.Target then
  81. Event:FireServer({isMouse=true,Target=Mouse.Target,Hit=Mouse.Hit})
  82. h,t=Mouse.Hit,Mouse.Target
  83. end
  84. end
  85. ]==],Player.Character)
  86. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  87. end
  88. wait(0.2)
  89.  
  90. local r=NS([===[
  91.  
  92. it=Instance.new
  93. vt=Vector3.new
  94. cf=CFrame.new
  95. euler=CFrame.fromEulerAnglesXYZ
  96. angles=CFrame.Angles
  97. local Effects={}
  98.  
  99. wait(1)
  100. if workspace:FindFirstChild("damageFunc") then workspace.damageFunc:Destroy() end
  101. if workspace:FindFirstChild("healFunc") then workspace.healFunc:Destroy() end -- <-- trying to fix abyss. :<
  102. if workspace:FindFirstChild("kbFunc") then workspace.kbFunc:Destroy() end
  103. if workspace:FindFirstChild("suppFunc") then workspace.suppFunc:Destroy() end
  104. if workspace:FindFirstChild("damguiFunc") then workspace.damguiFunc:Destroy() end
  105. if workspace:FindFirstChild("stunFunc") then workspace.stunFunc:Destroy() end
  106. local damageFunc=Instance.new("RemoteFunction",workspace)
  107. damageFunc.Name="damageFunc"
  108. local healFunc=Instance.new("RemoteFunction",workspace)
  109. healFunc.Name="healFunc"
  110. local kbFunc=Instance.new("RemoteEvent",workspace)
  111. kbFunc.Name="kbFunc"
  112. local suppFunc=Instance.new("RemoteEvent",workspace)
  113. suppFunc.Name="suppFunc"
  114. local damguiFunc=Instance.new("RemoteEvent",workspace)
  115. damguiFunc.Name="damguiFunc"
  116. local stunFunc=Instance.new("RemoteEvent",workspace)
  117. stunFunc.Name="stunFunc"
  118. function damageFunc.OnServerInvoke(me,hum,dam)
  119. if hum.Health<=0 then
  120. return
  121. end
  122. local oldhealth=hum.Health
  123. hum:TakeDamage(dam)
  124. local name=me.Name.."Damage"
  125. local newval
  126. if hum.Parent:findFirstChild(name)==nil then
  127. newval=Instance.new("NumberValue",hum.Parent)
  128. newval.Name=name
  129. newval.Value=dam
  130. elseif hum.Parent:findFirstChild(name)~=nil then
  131. hum.Parent[name].Value=hum.Parent[name].Value+dam
  132. end
  133. local char=nil
  134. local highestval=0
  135. for _,c in pairs(hum.Parent:children()) do
  136. if string.sub(c.Name,-6)=="Damage" then
  137. if c.Value>highestval then
  138. name=string.sub(c.Name,1,string.len(c.Name)-6)
  139. if game.Players:findFirstChild(name)~=nil then
  140. char=game.Players[name]
  141. end
  142. highestval=c.Value
  143. end
  144. end
  145. end
  146. --class=string.sub(c.CurrentClass.Value,6)
  147. if hum.Health<=0 and string.find(hum.Parent.Name,"Kactus Man")==nil and oldhealth~=0 and hum.Parent:FindFirstChild("KillIgnore")==nil then
  148. if char~=nil then
  149. if char:findFirstChild("Kills")~=nil then
  150. local v=Instance.new("BoolValue",hum.Parent)
  151. v.Name="KillIgnore"
  152. v.Value=true
  153. game:GetService("Debris"):AddItem(v,2)
  154. char.Kills.Value=char.Kills.Value+1
  155. end
  156. end
  157. end
  158. end
  159. function healFunc.OnServerInvoke(me,hum,healam)
  160. if hum then
  161. if hum.Health<=0 then
  162. return
  163. end
  164.  
  165. hum.Health = hum.Health + healam
  166. --print("Healed: " ..hum.Parent.Name)
  167. --print("Healed amount: " ..healam)
  168. end
  169. end
  170.  
  171. _G.stun=function(me,targ,stunamnt,blocked)
  172. local Stats=targ:findFirstChild("Stats")
  173. local incstun=stunamnt
  174. if Stats:findFirstChild("Stun")~=nil then
  175. if blocked then
  176. incstun=incstun/2
  177. --for frostu guardu
  178. if Stats:findFirstChild("Block") then
  179. if Stats.Block:findFirstChild("Hits") then
  180. Stats.Block.Hits.Value=Stats.Block.Hits.Value+1
  181. if Stats.Block.Hits.Value>=Stats.Block.HitThres.Value then
  182. Stats.Block.Value=false
  183. local blof=game.ServerStorage.BlockOff:Clone();blof.Parent=Stats.Block;blof.Disabled=false
  184. end
  185. end
  186. end
  187. --[[yep -----^]]
  188. end
  189. if Stats.Stun.Value<Stats.StunThreshold.Value then
  190. Stats.Stun.Value=Stats.Stun.Value+incstun
  191. end
  192. end
  193. end
  194. stunFunc.OnServerEvent:connect(_G.stun)
  195. kb=function(me,targ,dir)
  196. if dir.magnitude == 0 then return end
  197. local kl = 0
  198. if dir.y > 1 then
  199. kl = dir.y*400
  200. end
  201. local db = 0
  202. if targ.Parent:FindFirstChild("Stats") then
  203. if targ.Parent.Stats:FindFirstChild("KnockbackResistance") then
  204. db = targ.Parent.Stats.KnockbackResistance.Value
  205. if db>1 then
  206. db=1
  207. end
  208. end
  209. if targ.Parent.Stats:FindFirstChild("Rooted") then
  210. if targ.Parent.Stats.Rooted.Value==true then
  211. return
  212. end
  213. end
  214. end
  215. if (dir*(1-db)).magnitude > .15 then
  216. local kls=Vector3.new()
  217. if targ:FindFirstChild("KB") then
  218. kls = targ.KB.velocity/2
  219. if kls.unit:Dot(dir.unit) < 0 then
  220. kls = Vector3.new()
  221. else
  222. kls = kls*kls.unit:Dot(dir.unit)
  223. end
  224. targ.KB:Destroy()
  225. end
  226. local k = Instance.new("BodyVelocity")
  227. k.Name="KB"
  228. k.P=50 - (db*25)
  229. local x = 0
  230. if math.abs((dir.x+dir.z))>.2 then
  231. x=7000 - db*7000
  232. end
  233. k.maxForce=Vector3.new(x,kl,x)
  234. k.velocity=dir*(1-db) + (kls)
  235. k.Parent=targ
  236. game:GetService("Debris"):AddItem(k,.275)
  237. end
  238. end
  239. kbFunc.OnServerEvent:connect(kb)
  240. sp=function(me,stat,togg,val)
  241. local sp = stat:FindFirstChild("Suppressed")
  242. if sp then
  243. sp.Value=togg
  244. if sp:FindFirstChild("Timer") then
  245. sp.Timer.Value=val
  246. if val == 0 then
  247. repeat sp.Timer.Value = 0 wait() until sp.Timer.Value == 0
  248. end
  249. end
  250. end
  251. end
  252. suppFunc.OnServerEvent:connect(sp)
  253.  
  254. function gui(GuiType,parent,text,backtrans,backcol,pos,size)
  255. local gui=it(GuiType)
  256. gui.Parent=parent
  257. gui.Text=text
  258. gui.BackgroundTransparency=backtrans
  259. gui.BackgroundColor3=backcol
  260. gui.SizeConstraint="RelativeXY"
  261. gui.TextXAlignment="Center"
  262. gui.TextYAlignment="Center"
  263. gui.Position=pos
  264. gui.Size=size
  265. gui.Font="SourceSans"
  266. gui.FontSize="Size14"
  267. gui.TextWrapped=false
  268. gui.TextStrokeTransparency=0
  269. gui.TextColor=BrickColor.new("White")
  270. return gui
  271. end
  272.  
  273. function swait(num)
  274. if num==0 or num==nil then
  275. --if Stagger.Value==false or Stun.Value<=100 then
  276. script.Heartbeat.Event:wait()
  277. --end
  278. else
  279. for i=0,num do
  280. script.Heartbeat.Event:wait()
  281. --[[if Stagger.Value==true or Stun.Value>=StunT.Value then
  282. break
  283. end]]
  284. end
  285. end
  286. end
  287.  
  288. function showDamage(me,Char,Dealt,Type)
  289. damguiFunc:FireAllClients(Char, Dealt, Type)
  290. --[[ m=Instance.new("Model")
  291. m.Name="Effect"
  292. c=Instance.new("Part")
  293. c.Transparency=1
  294. c.Name="Head"
  295. c.TopSurface=0
  296. c.BottomSurface=0
  297. c.formFactor="Plate"
  298. c.Size=Vector3.new(1,.4,1)
  299. b=Instance.new("BillboardGui",c)
  300. b.Size=UDim2.new(5,0,5,0)
  301. b.AlwaysOnTop=true
  302. if type(Dealt)=="number" then
  303. Dealt=math.floor(Dealt)
  304. end
  305. damgui=gui("TextLabel",b,tostring(Dealt),1,Color3.new(0,0,0),UDim2.new(0,0,0,0),UDim2.new(1,0,1,0))
  306. if Type=="Damage" then
  307. damgui.Font="SourceSans"
  308. if Dealt=="Block" then
  309. damgui.TextColor3=BrickColor.new("Bright blue").Color
  310. elseif Dealt<30 then
  311. damgui.TextColor3=BrickColor.new("White").Color
  312. elseif Dealt>=30 and Dealt<200 then
  313. damgui.TextColor3=BrickColor.new("Bright yellow").Color
  314. else
  315. damgui.TextColor3=BrickColor.new("Really red").Color
  316. damgui.Font="SourceSansBold"
  317. end
  318. elseif Type=="Debuff" then
  319. damgui.TextColor3=BrickColor.new("White").Color
  320. elseif Type=="Interrupt" then
  321. damgui.TextColor3=BrickColor.new("New Yeller").Color
  322. elseif Type=="Heal" then
  323. damgui.TextColor3=BrickColor.new("Bright green").Color
  324. elseif Type=="ShieldBlock" then
  325. damgui.TextColor3=BrickColor.new("Bright blue").Color
  326. end
  327. --damgui.FontSize="Size48"
  328. damgui.TextScaled=true
  329. ms=Instance.new("CylinderMesh")
  330. ms.Scale=Vector3.new(.8,.8,.8)
  331. ms.Parent=c
  332. c.Reflectance=0
  333. Instance.new("BodyGyro").Parent=c
  334. c.Parent=m
  335. if Char:findFirstChild("Head")~=nil then
  336. c.CFrame=cf(Char["Head"].CFrame.p+Vector3.new(math.random(-100,100)/100,3,math.random(-100,100)/100))
  337. elseif Char.Parent:findFirstChild("Head")~=nil then
  338. c.CFrame=cf(Char.Parent["Head"].CFrame.p+Vector3.new(math.random(-100,100)/100,3,math.random(-100,100)/100))
  339. end
  340. f=Instance.new("BodyPosition")
  341. f.P=2000
  342. f.D=100
  343. f.maxForce=Vector3.new(545000,545000,545000)
  344. if Type=="Damage" or Type=="Heal" then
  345. f.position=c.Position+Vector3.new(0,3,0)
  346. elseif Type=="Debuff" or Type=="Interrupt" or Type=="ShieldBlock" then
  347. f.position=c.Position+Vector3.new(0,5,0)
  348. end
  349. f.Parent=c
  350. game:GetService("Debris"):AddItem(m,5)
  351. coroutine.resume(coroutine.create(function(bp,txt,md)
  352. local e=1
  353. repeat
  354. wait()
  355. if e<10 then
  356. e=e+1
  357. elseif e<15 then
  358. bp.position=bp.position+vt(0,-.2,0)
  359. e=e+1
  360. elseif e<50 then
  361. e=e+1
  362. elseif e<100 then
  363. bp.position=bp.position+vt(0,.2,0)
  364. txt.TextStrokeTransparency=txt.TextStrokeTransparency+.1
  365. txt.TextTransparency=txt.TextTransparency+.1
  366. e=e+1
  367. else
  368. md.Parent=nil
  369. end
  370. until md.Parent==nil
  371. end),f,damgui,m)
  372. table.insert(Effects,{m,"showDamage",damgui,f,10,1,15,50,100})
  373. c.CanCollide=false
  374. m.Parent=workspace
  375. c.CanCollide=false]]
  376. end
  377.  
  378. damguiFunc.OnServerEvent:connect(showDamage)
  379.  
  380. --[[while true do
  381. script.Heartbeat.Event:wait()
  382. if #Effects>0 then
  383. for e=1,#Effects do
  384. local Thing=Effects[e]
  385. if Thing~=nil then
  386. local Part=Thing[1]
  387. local Mode=Thing[2]
  388. local Delay=Thing[3]
  389. local IncX=Thing[4]
  390. local IncY=Thing[5]
  391. local IncZ=Thing[6]
  392. if Thing[2]=="showDamage" then
  393. --[[
  394. 1=model
  395. 2=showdamage
  396. 3=gui
  397. 4=bodypos
  398. 5=10
  399. 6=1
  400. 7=60
  401. 8=90
  402. 9=120
  403.  
  404. if Thing[6]<Thing[5] then
  405. Thing[6]=Thing[6]+1
  406. elseif Thing[6]<Thing[7] then
  407. Thing[4].position=Thing[4].position+vt(0,-.2,0)
  408. Thing[6]=Thing[6]+1
  409. elseif Thing[6]<Thing[8] then
  410. Thing[6]=Thing[6]+1
  411. elseif Thing[6]<Thing[9] then
  412. Thing[6]=Thing[6]+1
  413. Thing[4].position=Thing[4].position+vt(0,.2,0)
  414. Thing[3].TextStrokeTransparency=Thing[3].TextStrokeTransparency+.1
  415. Thing[3].TextTransparency=Thing[3].TextTransparency+.1
  416. else
  417. Thing[1].Parent=nil
  418. table.remove(Effects,e)
  419. end
  420. end
  421. end
  422. end
  423. end
  424. end]]
  425.  
  426.  
  427. ]===], owner.Character);
  428.  
  429. wait(0.2)
  430. --[[
  431. Made by Fenrier.
  432. Fixed by basstracker1970
  433. ]]
  434. Player=owner
  435. Character=Player.Character
  436. PlayerGui=Player.PlayerGui
  437. Backpack=Player.Backpack
  438. Torso=Character.Torso
  439. Head=Character.Head
  440. Humanoid=Character.Humanoid
  441. LeftArm=Character["Left Arm"]
  442. LeftLeg=Character["Left Leg"]
  443. RightArm=Character["Right Arm"]
  444. RightLeg=Character["Right Leg"]
  445. LS=Torso["Left Shoulder"]
  446. LH=Torso["Left Hip"]
  447. RS=Torso["Right Shoulder"]
  448. RH=Torso["Right Hip"]
  449. Neck=Torso.Neck
  450. it=Instance.new
  451. vt=Vector3.new
  452. cf=CFrame.new
  453. euler=CFrame.fromEulerAnglesXYZ
  454. angles=CFrame.Angles
  455. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  456. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  457. LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
  458. LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
  459. RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
  460. RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
  461. RootPart=Character.HumanoidRootPart
  462. RootJoint=RootPart.RootJoint
  463. RootCF=euler(-1.57,0,3.14)
  464. attack = false
  465. attackdebounce = false
  466. MMouse=Player:GetMouse()
  467. combo=0
  468. local hitfloor,posfloor=nil,nil
  469. local idle=0
  470. local Anim="Idle"
  471. local Effects={}
  472. local Weapon={}
  473. local Welds={}
  474. local decreaseatk=0
  475. local decreasedef=0
  476. local decreasemvmt=0
  477. local TopStaff={}
  478. local TSCF=cf(0,0,0)
  479. local BotStaff={}
  480. local BSCF=cf(0,0,0)
  481. local Orbs={}
  482. local OOrbs={}
  483. local Protected={}
  484. local O1=false
  485. local O2=false
  486. local O3=false
  487. local O4=false
  488. local eCharge=false
  489. local energ=0
  490. local smite=false
  491. local smtarget=nil
  492. local move1="(Z)\
  493. Overload"
  494. local move2="(X)\
  495. Discharge"
  496. local move3="(C)\
  497. Smite"
  498. local move4="(V)\
  499. Unleashed Diety"
  500. local cooldowns={}
  501. local cooldown1=0 table.insert(cooldowns,cooldown1)
  502. local cooldown2=0 table.insert(cooldowns,cooldown2)
  503. local cooldown3=0 table.insert(cooldowns,cooldown3)
  504. local cooldown4=0 table.insert(cooldowns,cooldown4)
  505. local cooldownsadd={}
  506. local cooldownadd1=.35 table.insert(cooldownsadd,cooldownadd1)
  507. local cooldownadd2=.16 table.insert(cooldownsadd,cooldownadd2)
  508. local cooldownadd3=.1 table.insert(cooldownsadd,cooldownadd3)
  509. local cooldownadd4=.08 table.insert(cooldownsadd,cooldownadd4)
  510. local cooldownmax=100
  511. local damageFunc=game.Workspace:WaitForChild("damageFunc")
  512. --player
  513. player=nil
  514. --save shoulders
  515. RSH, LSH=nil, nil
  516. --welds
  517. RW, LW=Instance.new("Motor"), Instance.new("Motor")
  518. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  519. LH=Torso["Left Hip"]
  520. RH=Torso["Right Hip"]
  521. TorsoColor=Torso.BrickColor
  522. TorsoRed=TorsoColor.Color.r
  523. TorsoGreen=TorsoColor.Color.g
  524. TorsoBlue=TorsoColor.Color.b
  525. NewCol=BrickColor.new("White").Color
  526. NewCol2=BrickColor.new("Lapis").Color
  527. NewCol3=BrickColor.new("Navy blue").Color
  528. NewCol4=BrickColor.new("Bright blue").Color
  529. if Player:findFirstChild("Color1")~=nil then
  530. NewCol=Player.Color1.Value
  531. end
  532. if Player:findFirstChild("Color2")~=nil then
  533. NewCol2=Player.Color2.Value
  534. end
  535. print(BrickColor.new(NewCol))
  536. local mdec=Instance.new("NumberValue",Decrease)
  537. mdec.Name="DecreaseDef"
  538. mdec.Value=.4
  539. local mdec2=Instance.new("NumberValue",Decrease)
  540. mdec2.Name="DecreaseMvmt"
  541. mdec2.Value=.1
  542. if Character:findFirstChild("Effects",true) ~= nil then
  543. Character:findFirstChild("Effects",true).Parent = nil
  544. end
  545. local effects=it("Model",Character)
  546. effects.Name="Effects"
  547.  
  548. local Animate=Humanoid.Animator
  549. --[[local animation=Instance.new("Animation")
  550. animation.AnimationId="http://www.roblox.com/Asset?ID=180435571"
  551. local animTrack=Humanoid:LoadAnimation(animation)]]
  552. local canjump=true
  553. function removeControl()
  554. canjump=false
  555. end
  556. function resumeControl()
  557. canjump=true
  558. end
  559. Player.Character.Humanoid.Changed:connect(function()
  560. if canjump==false then
  561. Player.Character.Humanoid.Jump=false
  562. end
  563. end)
  564. NLS([==[
  565. ArtificialHB = Instance.new("BindableEvent", script)
  566. ArtificialHB.Name = "Heartbeat"
  567.  
  568. script:WaitForChild("Heartbeat")
  569.  
  570. frame = 1 / 30
  571. tf = 0
  572. allowframeloss = true
  573. tossremainder = false
  574. lastframe = tick()
  575. script.Heartbeat:Fire()
  576.  
  577. game:GetService("RunService").Heartbeat:connect(function(s, p)
  578. tf = tf + s
  579. if tf >= frame then
  580. if allowframeloss then
  581. script.Heartbeat:Fire()
  582. lastframe = tick()
  583. else
  584. for i = 1, math.floor(tf / frame) do
  585. script.Heartbeat:Fire()
  586. end
  587. lastframe = tick()
  588. end
  589. if tossremainder then
  590. tf = 0
  591. else
  592. tf = tf - frame * math.floor(tf / frame)
  593. end
  594. end
  595. end)
  596.  
  597. function swait(num)
  598. if num == 0 or num == nil then
  599. ArtificialHB.Event:wait()
  600. else
  601. for i = 0, num do
  602. ArtificialHB.Event:wait()
  603. end
  604. end
  605. end
  606. ]==],Player.Character)
  607.  
  608.  
  609. if Character:findFirstChild("Ezelle",true) ~= nil then
  610. Character:findFirstChild("Ezelle",true).Parent = nil
  611. end
  612. if Player.PlayerGui:findFirstChild("WeaponGUI",true) ~= nil then
  613. Player.PlayerGui:findFirstChild("WeaponGUI",true).Parent = nil
  614. end
  615. if Character:findFirstChild("Stats",true) ~= nil then
  616. Character:findFirstChild("Stats",true).Parent = nil
  617. end
  618. local Stats=Instance.new("BoolValue")
  619. Stats.Name="Stats"
  620. Stats.Parent=Character
  621. local Atk=Instance.new("NumberValue")
  622. Atk.Name="Damage"
  623. Atk.Parent=Stats
  624. Atk.Value=1
  625. local Def=Instance.new("NumberValue")
  626. Def.Name="Defense"
  627. Def.Parent=Stats
  628. Def.Value=1
  629. local Mvmt=Instance.new("NumberValue")
  630. Mvmt.Name="Movement"
  631. Mvmt.Parent=Stats
  632. Mvmt.Value=1
  633. local Block=Instance.new("BoolValue")
  634. Block.Name="Block"
  635. Block.Parent=Stats
  636. Block.Value=false
  637. local Stun=Instance.new("NumberValue")
  638. Stun.Name="Stun"
  639. Stun.Parent=Stats
  640. Stun.Value=0
  641. local StunT=Instance.new("NumberValue")
  642. StunT.Name="StunThreshold"
  643. StunT.Parent=Stats
  644. StunT.Value=100
  645. local Rooted=Instance.new("BoolValue")
  646. Rooted.Name="Rooted"
  647. Rooted.Parent=Stats
  648. Rooted.Value=false
  649. local Stunned=Instance.new("BoolValue")
  650. Stunned.Name="Stunned"
  651. Stunned.Parent=Stats
  652. Stunned.Value=false
  653. local Stagger=Instance.new("BoolValue")
  654. Stagger.Name="Stagger"
  655. Stagger.Parent=Stats
  656. Stagger.Value=false
  657. local StaggerHit=Instance.new("BoolValue")
  658. StaggerHit.Name="StaggerHit"
  659. StaggerHit.Parent=Stats
  660. StaggerHit.Value=false
  661. local RecentEnemy=Instance.new("ObjectValue")
  662. RecentEnemy.Name="RecentEnemy"
  663. RecentEnemy.Parent=Stats
  664. RecentEnemy.Value=nil
  665. local Decrease=Instance.new("BoolValue")
  666. Decrease.Name="Decrease"
  667. Decrease.Parent=Stats
  668. Decrease.Value=false
  669. local mana=Instance.new("NumberValue")
  670. mana.Name="Mana"
  671. mana.Parent=Stats
  672. mana.Value=100
  673.  
  674. function NoOutline(Part)
  675. Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
  676. end
  677.  
  678. function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
  679. local fp=it("Part")
  680. fp.formFactor=formfactor
  681. fp.Parent=parent
  682. fp.Reflectance=reflectance
  683. fp.Transparency=transparency
  684. fp.CanCollide=false
  685. fp.Locked=true
  686. fp.BrickColor=brickcolor
  687. fp.Name=name
  688. fp.Size=size
  689. fp.Position=Torso.Position
  690. NoOutline(fp)
  691. fp.Material="SmoothPlastic"
  692. fp:BreakJoints()
  693. return fp
  694. end
  695.  
  696. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  697. local mesh=it(Mesh)
  698. mesh.Parent=part
  699. if Mesh=="SpecialMesh" then
  700. mesh.MeshType=meshtype
  701. if meshid~="nil" then
  702. if meshid=="rbxasset://fonts/leftarm.mesh" then
  703. mesh.MeshId=meshid
  704. else
  705. mesh.MeshId="http://www.roblox.com/asset/?id="..meshid
  706. end
  707. end
  708. end
  709. mesh.Offset=offset
  710. mesh.Scale=scale
  711. return mesh
  712. end
  713.  
  714. function weld(parent,part0,part1,c0)
  715. local weld=it("Motor")
  716. weld.Parent=parent
  717. weld.Part0=part0
  718. weld.Part1=part1
  719. weld.C0=c0
  720. return weld
  721. end
  722.  
  723. function gui(GuiType,parent,text,backtrans,backcol,pos,size)
  724. local gui=it(GuiType)
  725. gui.Parent=parent
  726. gui.Text=text
  727. gui.BackgroundTransparency=backtrans
  728. gui.BackgroundColor3=backcol
  729. gui.SizeConstraint="RelativeXY"
  730. gui.TextXAlignment="Center"
  731. gui.TextYAlignment="Center"
  732. gui.Position=pos
  733. gui.Size=size
  734. gui.Font="SourceSans"
  735. gui.FontSize="Size14"
  736. gui.TextWrapped=false
  737. gui.TextStrokeTransparency=0
  738. gui.TextColor=BrickColor.new("White")
  739. return gui
  740. end
  741.  
  742. local handle
  743. function AesthPart(model,wldpar,reflec,trans,col,name,neon,meshh,mshtype,mshtxt,x1,y1,z1,ceef)
  744. prt=part(3,model,reflec,trans,BrickColor.new(col),name,vt(0.2,0.2,0.2)) prt.Material=neon
  745. msh=mesh(meshh,prt,mshtype,mshtxt,vt(0,0,0),vt(x1,y1,z1))
  746. wld=weld(handle,prt,wldpar,ceef)
  747. v=it("NumberValue",prt)
  748. v.Value=trans
  749. v.Name="MainTransparency"
  750. return prt,msh,wld
  751. end
  752.  
  753. local Color1=Torso.BrickColor
  754.  
  755. local fengui=it("GuiMain")
  756. fengui.Parent=Player.PlayerGui
  757. fengui.Name="WeaponGUI"
  758. local fenframe=it("Frame")
  759. fenframe.Parent=fengui
  760. fenframe.BackgroundColor3=Color3.new(255,255,255)
  761. fenframe.BackgroundTransparency=1
  762. fenframe.BorderColor3=Color3.new(17,17,17)
  763. fenframe.Size=UDim2.new(0.1,0,0.1,0)
  764. fenframe.Position=UDim2.new(0.95,0,0.7,0)
  765. local fenframe2=it("Frame")
  766. fenframe2.Parent=fengui
  767. fenframe2.BackgroundColor3=Color3.new(255,255,255)
  768. fenframe2.BackgroundTransparency=1
  769. fenframe2.BorderColor3=Color3.new(17,17,17)
  770. fenframe2.Size=UDim2.new(0.2,0,0.1,0)
  771. fenframe2.Position=UDim2.new(0.4,0,0.85,0)
  772. local fenframe3=it("Frame")
  773. fenframe3.Parent=fengui
  774. fenframe3.BackgroundColor3=Color3.new(255,255,255)
  775. fenframe3.BackgroundTransparency=1
  776. fenframe3.BorderColor3=Color3.new(17,17,17)
  777. fenframe3.Size=UDim2.new(0.2,0,0.2,0)
  778. fenframe3.Position=UDim2.new(0.8,0,0.8,0)
  779. local fenframe4=it("Frame")
  780. fenframe4.Parent=fengui
  781. fenframe4.BackgroundColor3=Color3.new(255,255,255)
  782. fenframe4.BackgroundTransparency=1
  783. fenframe4.BorderColor3=Color3.new(17,17,17)
  784. fenframe4.Size=UDim2.new(0.1,0,0.1,0)
  785. fenframe4.Position=UDim2.new(0,0,0.7,0)
  786. local pressedf=false
  787. local fenframe5=it("Frame")
  788. fenframe5.Parent=fengui
  789. fenframe5.Parent=nil
  790. fenframe5.BackgroundColor3=Color3.new(0,0,0)
  791. fenframe5.BackgroundTransparency=1
  792. fenframe5.BorderColor3=Color3.new(0,0,0)
  793. fenframe5.Size=UDim2.new(1,0,1,0)
  794. fenframe5.Position=UDim2.new(0,0,0,0)
  795. fenframe5.ZIndex=2
  796. local tellbar=gui("TextLabel",fenframe5,"Press 'F' to equip your weapon.",1,Color3.new(0,0,0),UDim2.new(.25,0,.25,0),UDim2.new(.5,0,.5,0))
  797. tellbar.Font="Arial"
  798. tellbar.TextScaled=true
  799. tellbar.TextTransparency=1
  800. tellbar.TextStrokeTransparency=1
  801. tellbar.ZIndex=2
  802. local fnumb=0
  803. local fenbarmana1=gui("TextLabel",fenframe,"",0,Color3.new(0,0,0),UDim2.new(0,0,0,0),UDim2.new(.4,0,-4,0))
  804. local fenbarmana2=gui("TextLabel",fenframe,"",0,BrickColor.new(NewCol).Color,UDim2.new(0,0,0,0),UDim2.new(.4,0,0,0))
  805. local fenbarmana4=gui("TextLabel",fenframe,"Mana("..mana.Value..")",1,Color3.new(0,0,0),UDim2.new(0,0,.2,0),UDim2.new(.4,0,.2,0))
  806. local fenbardamage=gui("TextLabel",fenframe2,"Damage",.55,Color3.new(155/255,0,0),UDim2.new(-.23,0,0,0),UDim2.new(.2,0,1,0))
  807. local fenbardef=gui("TextLabel",fenframe2,"Defense",0.55,Color3.new(0,0,155/255),UDim2.new(-.46,0,0,0),UDim2.new(.2,0,1,0))
  808. local fenbarmove=gui("TextLabel",fenframe2,"Walkspeed",0.55,Color3.new(0,155/255,0),UDim2.new(1.03,0,0,0),UDim2.new(.2,0,1,0))
  809. local fenbarhp1=gui("TextLabel",fenframe2,"",0,Color3.new(0,0,0),UDim2.new(-.46,0,1,0),UDim2.new(1.92,0,.4,0))
  810. local fenbarhp2=gui("TextLabel",fenbarhp1,"",0,Color3.new(1,0,0),UDim2.new(0,0,0,0),UDim2.new(0,0,1,0))
  811. local fenbarhp3=gui("TextLabel",fenbarhp1,"(100)",1,Color3.new(0,0,0),UDim2.new(0,0,0,0),UDim2.new(1,0,1,0))
  812. local fenbarstun1=gui("TextLabel",fenframe4,"",0,Color3.new(0,0,0),UDim2.new(.2,0,0,0),UDim2.new(.4,0,-4,0))
  813. local fenbarstun2=gui("TextLabel",fenframe4,"",0,Color3.new(0.960784,0.803922,0.188235),UDim2.new(.2,0,0,0),UDim2.new(.4,0,0,0))
  814. local fenbarstun3=gui("TextLabel",fenframe4,"Stun("..Stun.Value..")",1,Color3.new(0.960784,0.803922,0.188235),UDim2.new(.2,0,.2,0),UDim2.new(.4,0,.2,0))
  815. local fenbarmove1=gui("TextButton",fenframe3,move1,.55,Color3.new(.5,.5,.5),UDim2.new(0.1,0,0.1,0),UDim2.new(.4,0,.4,0))
  816. fenbarmove1.ZIndex=2
  817. local fenbarmove1b=gui("TextLabel",fenbarmove1,"",.55,BrickColor.new(NewCol2).Color,UDim2.new(0,0,0,0),UDim2.new(0,0,1,0))
  818. local fenbarmove2=gui("TextButton",fenframe3,move2,.55,Color3.new(.5,.5,.5),UDim2.new(0.6,0,0.1,0),UDim2.new(.4,0,.4,0))
  819. fenbarmove2.ZIndex=2
  820. local fenbarmove2b=gui("TextLabel",fenbarmove2,"",.55,BrickColor.new(NewCol2).Color,UDim2.new(0,0,0,0),UDim2.new(0,0,1,0))
  821. local fenbarmove3=gui("TextButton",fenframe3,move3,.55,Color3.new(.5,.5,.5),UDim2.new(0.1,0,0.6,0),UDim2.new(.4,0,.4,0))
  822. fenbarmove3.ZIndex=2
  823. local fenbarmove3b=gui("TextLabel",fenbarmove3,"",.55,BrickColor.new(NewCol2).Color,UDim2.new(0,0,0,0),UDim2.new(0,0,1,0))
  824. local fenbarmove4=gui("TextButton",fenframe3,move4,.55,Color3.new(.5,.5,.5),UDim2.new(0.6,0,0.6,0),UDim2.new(.4,0,.4,0))
  825. fenbarmove4.ZIndex=2
  826. local fenbarmove4b=gui("TextLabel",fenbarmove4,"",.55,BrickColor.new(NewCol2).Color,UDim2.new(0,0,0,0),UDim2.new(0,0,1,0))
  827. local fenbarammo1=gui("TextButton",fenframe2,"Orbs",.55,BrickColor.new(NewCol2).Color,UDim2.new(1.26,0,0,0),UDim2.new(.2,0,1,0))
  828.  
  829. local modelzorz=Instance.new("Model")
  830. modelzorz.Parent=Character
  831. modelzorz.Name="Ezelle"
  832.  
  833. handle=part(3,modelzorz,0,1,BrickColor.new("Black"),"Handle",vt(0.2,0.2,0.2))
  834. local prt1=part(3,modelzorz,0,0,BrickColor.new(NewCol),"Part01",vt(0.2,0.2,0.2))
  835.  
  836. msh1h=mesh("BlockMesh",handle,"","",vt(0,0,0),vt(2,2,2))
  837. msh1=mesh("CylinderMesh",prt1,"","",vt(0,0,0),vt(1.8,7,1.8))
  838.  
  839. local handlewld=weld(handle,handle,Torso,euler(0,0,-.8)*cf(0,0,-.7))
  840. local wld1=weld(handle,prt1,handle,euler(0,0,0)*cf(0,0,0))
  841.  
  842. prt2,msh2,wld2=AesthPart(modelzorz,prt1,0,0,NewCol,"Part02","SmoothPlastic","CylinderMesh","nil","nil",2.8,1,2.8,euler(0,0,0)*cf(0,.8,0))
  843. prt3,msh3,wld3=AesthPart(modelzorz,prt1,0,0,NewCol3,"Part03","SmoothPlastic","CylinderMesh","nil","nil",2,1,2,euler(0,0,0)*cf(0,1,0))
  844. prt4,msh4,wld4=AesthPart(modelzorz,prt1,0,0,NewCol,"Part04","SmoothPlastic","CylinderMesh","nil","nil",2.1,3,2.1,euler(0,0,0)*cf(0,1.4,0))
  845. prt5,msh5,wld5=AesthPart(modelzorz,prt1,0,0,NewCol2,"Part05","Neon","CylinderMesh","nil","nil",2.1,.9,2.1,euler(0,0,0)*cf(0,1,0))
  846. prt6,msh6,wld6=AesthPart(modelzorz,prt1,0,0,NewCol,"Part06","SmoothPlastic","BlockMesh","nil","nil",2.3,1,2.3,euler(0,0,0)*cf(0,1.8,0))
  847. prt7,msh7,wld7=AesthPart(modelzorz,prt1,0,0,NewCol,"Part07","SmoothPlastic","BlockMesh","nil","nil",1,3,2,euler(0,0,0)*cf(0,2.2,0))
  848. prt10,msh10,wld10=AesthPart(modelzorz,prt1,0,0,NewCol,"Part10","SmoothPlastic","CylinderMesh","nil","nil",2.4,2.1,2.4,euler(1.57,0,0)*cf(0,2.7,0))
  849. prt11,msh11,wld11=AesthPart(modelzorz,prt1,0,0,NewCol3,"Part11","SmoothPlastic","CylinderMesh","nil","nil",2.2,2.15,2.2,euler(1.57,0,0)*cf(0,2.7,0))
  850. prt12,msh12,wld12=AesthPart(modelzorz,prt1,0,0,NewCol2,"Part12","Neon","CylinderMesh","nil","nil",2,2.2,2,euler(1.57,0,0)*cf(0,2.7,0))
  851. prt13,msh13,wld13=AesthPart(modelzorz,prt1,0,0,NewCol,"Part13","SmoothPlastic","CylinderMesh","nil","nil",3,1.5,3,euler(1.57,0,0)*cf(0,2.7,0))
  852. prt14,msh14,wld14=AesthPart(modelzorz,prt1,0,0,NewCol,"Part14","SmoothPlastic","SpecialMesh","Sphere","nil",1.5,2.5,2,euler(0,0,0)*cf(0,2.9,0))
  853. prt15,msh15,wld15=AesthPart(modelzorz,prt1,0,0,NewCol,"Part15","SmoothPlastic","CylinderMesh","nil","nil",1.4,.7,1.4,euler(0,0,0)*cf(0,3.1,0))
  854. prt16,msh16,wld16=AesthPart(modelzorz,prt1,0,0,NewCol3,"Part16","SmoothPlastic","CylinderMesh","nil","nil",1.3,.9,1.3,euler(0,0,0)*cf(0,3.26,0))
  855. prt17,msh17,wld17=AesthPart(modelzorz,prt1,0,0,NewCol2,"Part17","Neon","CylinderMesh","nil","nil",1.35,.5,1.35,euler(0,0,0)*cf(0,3.26,0))
  856. prt18,msh18,wld18=AesthPart(modelzorz,prt1,0,0,NewCol2,"Part18","Neon","CylinderMesh","nil","nil",1.4,.3,1.4,euler(0,0,0)*cf(0,3.38,0))
  857. prt23,msh23,wld23=AesthPart(modelzorz,prt10,0,1,NewCol3,"Part23","SmoothPlastic","BlockMesh","nil","nil",2,2,2,euler(0,math.rad(0),0)*cf(-.045,0,0)) --aaa
  858. prt24,msh24,wld24=AesthPart(modelzorz,prt23,0,0,NewCol,"Part24","SmoothPlastic","BlockMesh","nil","nil",.5,2,4,euler(0,0,0)*cf(0,0,.5))
  859. prt25,msh25,wld25=AesthPart(modelzorz,prt24,0,0,NewCol,"Part25","SmoothPlastic","SpecialMesh","Wedge","nil",2,1,1.5,euler(3.14,0,-1.57)*cf(-.15,0,-.25))
  860. prt26,msh26,wld26=AesthPart(modelzorz,prt24,0,0,NewCol,"Part26","SmoothPlastic","SpecialMesh","Wedge","nil",2,1,2.5,euler(3.14,0,-1.57)*euler(3.14,0,0)*cf(-.15,0,.15))
  861. prt27,msh27,wld27=AesthPart(modelzorz,prt10,0,1,NewCol3,"Part27","SmoothPlastic","BlockMesh","nil","nil",2,2,2,euler(0,math.rad(0),3.14)*cf(.045,0,0)) --aaa
  862. prt28,msh28,wld28=AesthPart(modelzorz,prt27,0,0,NewCol,"Part28","SmoothPlastic","BlockMesh","nil","nil",.5,2,4,euler(0,0,0)*cf(0,0,.5))
  863. prt29,msh29,wld29=AesthPart(modelzorz,prt28,0,0,NewCol,"Part29","SmoothPlastic","SpecialMesh","Wedge","nil",2,1,1.5,euler(3.14,0,-1.57)*cf(-.15,0,-.25))
  864. prt30,msh30,wld30=AesthPart(modelzorz,prt28,0,0,NewCol,"Part30","SmoothPlastic","SpecialMesh","Wedge","nil",2,1,2.5,euler(3.14,0,-1.57)*euler(3.14,0,0)*cf(-.15,0,.15))
  865. prt31,msh31,wld31=AesthPart(modelzorz,prt1,0,0,NewCol3,"Part31","SmoothPlastic","BlockMesh","nil","nil",.8,2,2.35,euler(0,0,0)*cf(0,2,0))
  866. prt32,msh32,wld32=AesthPart(modelzorz,prt1,0,0,NewCol2,"Part32","Neon","BlockMesh","nil","nil",.6,1.8,2.4,euler(0,0,0)*cf(0,2,0))
  867. prt33,msh33,wld33=AesthPart(modelzorz,prt1,0,0,NewCol3,"Part33","SmoothPlastic","CylinderMesh","nil","nil",1.7,2,1.7,euler(0,0,0)*cf(0,-.9,0))
  868. prt34,msh34,wld34=AesthPart(modelzorz,prt1,0,0,NewCol2,"Part34","Neon","CylinderMesh","nil","nil",1.75,1.5,1.75,euler(0,0,0)*cf(0,-.9,0))
  869. prt35,msh35,wld35=AesthPart(modelzorz,prt1,0,0,NewCol,"Part35","SmoothPlastic","CylinderMesh","nil","nil",2.2,2.4,2.2,euler(0,0,0)*cf(0,-1.34,0))
  870. prt36,msh36,wld36=AesthPart(modelzorz,prt1,0,0,NewCol3,"Part36","SmoothPlastic","CylinderMesh","nil","nil",2.2,1,2.2,euler(0,0,0)*cf(0,-1.68,0))
  871. prt37,msh37,wld37=AesthPart(modelzorz,prt1,0,0,NewCol2,"Part37","Neon","CylinderMesh","nil","nil",2.25,.8,2.25,euler(0,0,0)*cf(0,-1.68,0))
  872. prt38,msh38,wld38=AesthPart(modelzorz,prt1,0,0,NewCol,"Part38","SmoothPlastic","CylinderMesh","nil","nil",2.3,.5,2.3,euler(0,0,0)*cf(0,-1.83,0))
  873. prt39,msh39,wld39=AesthPart(modelzorz,prt1,0,0,NewCol,"Part39","SmoothPlastic","SpecialMesh","FileMesh","1778999",.47,.5,.47,euler(3.14,0,0)*cf(0,-1.7,0))
  874. prt40,msh40,wld40=AesthPart(modelzorz,prt1,0,0,NewCol,"Part40","SmoothPlastic","CylinderMesh","nil","nil",3.2,.5,3.2,euler(0,0,0)*cf(0,-2.15,0))
  875. prt41,msh41,wld41=AesthPart(modelzorz,prt1,0,0,NewCol,"Part41","SmoothPlastic","CylinderMesh","nil","nil",1.8,3,1.8,euler(0,0,0)*cf(0,-2.5,0))
  876. prt42,msh42,wld42=AesthPart(modelzorz,prt1,0,0,NewCol3,"Part42","SmoothPlastic","CylinderMesh","nil","nil",4,.5,4,euler(0,0,0)*cf(0,-2.8,0))
  877. prt54,msh54,wld54=AesthPart(modelzorz,prt1,0,.5,"Really blue","Part54","Neon","SpecialMesh","FileMesh","1185246",-1.8,-1.8,-1.8,cf(0,-3.5,0))
  878. prt55,msh55,wld55=AesthPart(modelzorz,prt1,0,.3,NewCol2,"Part55","Neon","SpecialMesh","Sphere","nil",4.5,4.5,4.5,cf(0,-3.5,0))
  879. prt56,msh56,wld56=AesthPart(modelzorz,prt1,0,0,"Institutional white","Part56","Neon","SpecialMesh","Sphere","nil",3,3,3,cf(0,-3.5,0))
  880.  
  881. prt54.Transparency=1
  882. prt55.Transparency=1
  883. prt56.Transparency=1
  884.  
  885. for i=-1,1,2 do
  886. prt8,msh8,wld8=AesthPart(modelzorz,prt1,0,0,NewCol,"Part08","SmoothPlastic","SpecialMesh","Wedge","nil",2,3.5,1,euler(0,-1.57*i,0)*cf(.2*i,1.9,0))
  887. prt9,msh9,wld9=AesthPart(modelzorz,prt1,0,0,NewCol,"Part09","SmoothPlastic","SpecialMesh","Wedge","nil",2,1.5,1,euler(3.14,1.57*i,0)*cf(.2*i,2.4,0))
  888. end
  889.  
  890. for i=-1,1,2 do
  891. prt19,msh19,wld19=AesthPart(modelzorz,prt1,0,0,NewCol,"Part19","SmoothPlastic","BlockMesh","nil","nil",.3,2,1.6,euler(0,0,0)*cf(-.12*i,3.11,0))
  892. prt20,msh20,wld20=AesthPart(modelzorz,prt1,0,0,NewCol,"Part20","SmoothPlastic","SpecialMesh","Wedge","nil",1.6,1,.5,euler(0,1.57*i,0)*cf(-.2*i,2.99,0))
  893. prt21,msh21,wld21=AesthPart(modelzorz,prt1,0,0,NewCol,"Part21","SmoothPlastic","SpecialMesh","Wedge","nil",1.6,1.1,.5,euler(3.14,-1.57*i,0)*cf(-.2*i,3.2,0))
  894. --prt22,msh22,wld22=AesthPart(modelzorz,prt1,0,0,NewCol,"Part22","SmoothPlastic","SpecialMesh","Sphere","nil",1.2,3,2,euler(0,0,0)*cf(-.2*i,2.7,0))
  895. end
  896.  
  897. for i=1.57,6.28,1.57 do
  898. prt42,msh42,wld42=AesthPart(modelzorz,prt1,0,0,NewCol3,"Part42","SmoothPlastic","CylinderMesh","nil","nil",3,1,3,euler(1.57,0,0)*cf(.35,-2.5,0)*euler(0,i,0))
  899. prt43,msh43,wld43=AesthPart(modelzorz,prt1,0,0,NewCol,"Part43","SmoothPlastic","CylinderMesh","nil","nil",1.5,1.1,1.5,euler(1.57,0,0)*cf(.35,-2.5,0)*euler(0,i,0))
  900. prt44,msh44,wld44=AesthPart(modelzorz,prt1,0,0,NewCol2,"Part44","Neon","SpecialMesh","Sphere","nil",1.8,1.5,1.8,euler(1.57,0,0)*cf(.35,-2.5,0)*euler(0,i,0))
  901. prt45,msh45,wld45=AesthPart(modelzorz,prt1,0,0,NewCol,"Part45","SmoothPlastic","BlockMesh","nil","nil",2,1.1,1,euler(1.57,0,0)*cf(.5,-2.5,0)*euler(0,i,0))
  902. prt46,msh46,wld46=AesthPart(modelzorz,prt1,0,0,NewCol,"Part46","SmoothPlastic","SpecialMesh","Torso","nil",2.5,1,1.1,euler(0,0,-1.57)*cf(.3,0,0)*euler(0,0,-.8)*cf(.35,-2.5,0)*euler(0,i,0))
  903. prt47,msh47,wld47=AesthPart(modelzorz,prt1,0,0,NewCol,"Part47","SmoothPlastic","SpecialMesh","Torso","nil",2.5,1.5,1.1,euler(0,0,-1.57)*cf(.35,0,0)*euler(0,0,.8)*cf(.35,-2.5,0)*euler(0,i,0))
  904. prt48,msh48,wld48=AesthPart(modelzorz,prt1,0,1,NewCol3,"Part48","SmoothPlastic","BlockMesh","nil","nil",1,1,1,euler(0,0,-1.57)*cf(.7,-2.8,0)*euler(0,i,0))
  905. prt49,msh49,wld49=AesthPart(modelzorz,prt48,0,0,NewCol2,"Part49","Neon","BlockMesh","nil","nil",2.5,.4,.4,euler(0,0,0)*cf(-.25,0,0)*euler(0,0,-.2)--[[cf(.2,.05,0)*euler(0,0,-1.2)]]) --aaa
  906. prt50,msh50,wld50=AesthPart(modelzorz,prt49,0,0,NewCol3,"Part50","SmoothPlastic","SpecialMesh","FileMesh","rbxasset://fonts/leftarm.mesh",-.2,-.25,-.2,euler(0,0,1.57)*cf(0,0,0))
  907. prt51,msh51,wld51=AesthPart(modelzorz,prt49,0,0,NewCol,"Part51","SmoothPlastic","BlockMesh","nil","nil",2,.6,.8,euler(0,0,0)*cf(-.35,0,0)*euler(0,0,.2))
  908. prt52,msh52,wld52=AesthPart(modelzorz,prt51,0,0,NewCol,"Part52","SmoothPlastic","SpecialMesh","Wedge","nil",.8,.6,.6,euler(0,-1.57,0)*cf(.14,-.12,0))
  909. prt53,msh53,wld53=AesthPart(modelzorz,prt51,0,0,NewCol,"Part53","SmoothPlastic","SpecialMesh","Wedge","nil",.8,.6,1.4,euler(0,1.57,0)*cf(-.06,-.12,0))
  910. table.insert(TopStaff,wld49)
  911. end
  912.  
  913. TSCF=cf(.2,.05,0)*euler(0,0,-1.2)
  914.  
  915. for _,c in pairs(modelzorz:children()) do
  916. table.insert(Weapon,c)
  917. end
  918. for _,c in pairs(handle:children()) do
  919. if c.className=="Motor" then
  920. table.insert(Welds,c)
  921. end
  922. end
  923. local hitbox=part(3,modelzorz,0,1,BrickColor.new("Black"),"Hitbox2",vt())
  924. hitbox.Anchored=false
  925. local hitboxCF=cf(0,0,0)
  926.  
  927. hboxpos=Instance.new("BodyPosition",nil)
  928. hboxpos.P=2000
  929. hboxpos.D=100
  930. hboxpos.maxForce=Vector3.new(545000,545000,545000)
  931.  
  932.  
  933. local shieldref=part(3,nil,0,1,BrickColor.new("Bright blue"),"Shield1",vt(40,40,40))
  934. shieldref.Anchored=true
  935. shieldref.CFrame=cf(Torso.Position)
  936. shieldref.Shape="Ball"
  937. local shieldref2=part(3,nil,0,.5,BrickColor.new("Bright blue"),"Shield2",vt(0.2,0.2,0.2))
  938. shieldref2.Anchored=true
  939. srefmsh=mesh("SpecialMesh",shieldref2,"FileMesh","90782182",vt(0,0,0),vt(4,5,4))
  940. srefmsh.TextureId="http://www.roblox.com/asset/?id=90782359"
  941. srefmsh.VertexColor=vt(.2,.2,1)
  942.  
  943. function hitboxweld()
  944. hbwld.Parent=modelzorz
  945. hbwld.Part0=hitbox
  946. hbwld.Part1=prt12
  947. end
  948.  
  949.  
  950.  
  951. local bodvel=Instance.new("BodyVelocity")
  952. local bg=Instance.new("BodyGyro")
  953.  
  954. so = function(id,par,vol,pit)
  955. local sou = Instance.new("Sound",par or workspace)
  956. sou.Volume=vol
  957. sou.Pitch=pit or 1
  958. sou.SoundId="http://www.roblox.com/asset/?id="..id
  959. coroutine.resume(coroutine.create(function(Sound)
  960. script.Heartbeat.Event:wait()
  961. Sound:play()
  962. end),sou)
  963. game:GetService("Debris"):AddItem(sou,6)
  964. end
  965.  
  966. function clerp(a,b,t)
  967. local qa = {QuaternionFromCFrame(a)}
  968. local qb = {QuaternionFromCFrame(b)}
  969. local ax, ay, az = a.x, a.y, a.z
  970. local bx, by, bz = b.x, b.y, b.z
  971. local _t = 1-t
  972. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  973. end
  974.  
  975. function QuaternionFromCFrame(cf)
  976. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  977. local trace = m00 + m11 + m22
  978. if trace > 0 then
  979. local s = math.sqrt(1 + trace)
  980. local recip = 0.5/s
  981. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  982. else
  983. local i = 0
  984. if m11 > m00 then
  985. i = 1
  986. end
  987. if m22 > (i == 0 and m00 or m11) then
  988. i = 2
  989. end
  990. if i == 0 then
  991. local s = math.sqrt(m00-m11-m22+1)
  992. local recip = 0.5/s
  993. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  994. elseif i == 1 then
  995. local s = math.sqrt(m11-m22-m00+1)
  996. local recip = 0.5/s
  997. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  998. elseif i == 2 then
  999. local s = math.sqrt(m22-m00-m11+1)
  1000. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  1001. end
  1002. end
  1003. end
  1004.  
  1005. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  1006. local xs, ys, zs = x + x, y + y, z + z
  1007. local wx, wy, wz = w*xs, w*ys, w*zs
  1008. local xx = x*xs
  1009. local xy = x*ys
  1010. local xz = x*zs
  1011. local yy = y*ys
  1012. local yz = y*zs
  1013. local zz = z*zs
  1014. 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))
  1015. end
  1016.  
  1017. function QuaternionSlerp(a, b, t)
  1018. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  1019. local startInterp, finishInterp;
  1020. if cosTheta >= 0.0001 then
  1021. if (1 - cosTheta) > 0.0001 then
  1022. local theta = math.acos(cosTheta)
  1023. local invSinTheta = 1/math.sin(theta)
  1024. startInterp = math.sin((1-t)*theta)*invSinTheta
  1025. finishInterp = math.sin(t*theta)*invSinTheta
  1026. else
  1027. startInterp = 1-t
  1028. finishInterp = t
  1029. end
  1030. else
  1031. if (1+cosTheta) > 0.0001 then
  1032. local theta = math.acos(-cosTheta)
  1033. local invSinTheta = 1/math.sin(theta)
  1034. startInterp = math.sin((t-1)*theta)*invSinTheta
  1035. finishInterp = math.sin(t*theta)*invSinTheta
  1036. else
  1037. startInterp = t-1
  1038. finishInterp = t
  1039. end
  1040. end
  1041. 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
  1042. end
  1043.  
  1044. function hideanim()
  1045. equipped=false
  1046. TSCF=cf(.2,.05,0)*euler(0,0,-1.2)
  1047. for i=0,1,0.05 do
  1048. script.Heartbeat.Event:wait()
  1049. prt54.Transparency=prt54.MainTransparency.Value+(1-prt54.MainTransparency.Value)*i
  1050. prt55.Transparency=prt55.MainTransparency.Value+(1-prt55.MainTransparency.Value)*i
  1051. prt56.Transparency=prt56.MainTransparency.Value+(1-prt56.MainTransparency.Value)*i
  1052. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.3)
  1053. wld1.C0=clerp(wld1.C0,euler(1,0,0)*cf(0,0,0),.3)
  1054. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.2)*euler(.2,0,0),.3)
  1055. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  1056. RW.C0=clerp(RW.C0,cf(1,0.4,.2)*euler(-.3,0,-1)*euler(0,-.2,0),.3)
  1057. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1058. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(.7,0,-.2),.3)
  1059. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1060. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0),.4)
  1061. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0),.4)
  1062. end
  1063. prt54.Transparency=1
  1064. prt55.Transparency=1
  1065. prt56.Transparency=1
  1066. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(2,0,-.4),.3)
  1067. for i=0,1,0.1 do
  1068. script.Heartbeat.Event:wait()
  1069. handlewld.C0=clerp(handlewld.C0,euler(3.14,0,0)*euler(0,0,.4)*euler(.2,0,0)*cf(-1,-1.2,.5),.3)
  1070. wld1.C0=clerp(wld1.C0,euler(0,0,0)*cf(0,0,0),.3)
  1071. Neck.C0=clerp(Neck.C0,necko*euler(-.2,0,.6),.3)
  1072. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  1073. RW.C0=clerp(RW.C0,cf(1,0.4,.2)*euler(-.3,0,-1)*euler(0,-.2,0),.3)
  1074. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1075. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(3.5,0,-.4),.3)
  1076. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1077. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0),.3)
  1078. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0),.3)
  1079. end
  1080. handlewld.Part1=Torso
  1081. handlewld.C0=euler(0,0,-.8)*cf(0,0,-.7)
  1082. wld1.C0=euler(0,0,0)*cf(0,0,0)
  1083. for i=0,1,0.1 do
  1084. script.Heartbeat.Event:wait()
  1085. Neck.C0=clerp(Neck.C0,necko*euler(0,0,0),.3)
  1086. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  1087. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,0),.3)
  1088. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1089. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,0),.3)
  1090. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1091. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0),.3)
  1092. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0),.3)
  1093. end
  1094. mdec2.Parent=nil
  1095. mdec.Parent=Decrease
  1096. end
  1097.  
  1098. mdec.Parent=Decrease
  1099. function equipanim()
  1100. equipped=true
  1101. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(2,0,-.4),.3)
  1102. for i=0,1,0.1 do
  1103. script.Heartbeat.Event:wait()
  1104. Neck.C0=clerp(Neck.C0,necko*euler(-.2,0,.6),.3)
  1105. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  1106. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.2,0,.4),.3)
  1107. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1108. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(3.5,0,-.4),.3)
  1109. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1110. end
  1111. handlewld.Part1=LeftArm
  1112. handlewld.C0=euler(3.14,0,0)*euler(0,0,.4)*euler(.2,0,0)*cf(-1,-1.2,.5)
  1113. wld1.C0=euler(0,0,0)*cf(0,0,0)
  1114. d=2
  1115. for i=0,1,0.08 do
  1116. script.Heartbeat.Event:wait()
  1117. d=d+1
  1118. if d>=4 then
  1119. d=0
  1120. so("199145146",handle,1,1.4)
  1121. end
  1122. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.3)
  1123. handlewld.C1=handlewld.C1*euler(0,-.6,0)
  1124. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-.4),.3)
  1125. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  1126. RW.C0=clerp(RW.C0,cf(1,0.4,.2)*euler(-.3,0,-.8),.3)
  1127. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1128. LW.C0=clerp(LW.C0,cf(-.5,0.5,-.3)*euler(1.5,0,.8),.3)
  1129. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1130. end
  1131. TSCF=euler(0,0,0)*cf(-.25,0,0)*euler(0,0,-.2)
  1132. for i=0,1,0.05 do
  1133. script.Heartbeat.Event:wait()
  1134. prt54.Transparency=1-(1-prt54.MainTransparency.Value)*i
  1135. prt55.Transparency=1-(1-prt55.MainTransparency.Value)*i
  1136. prt56.Transparency=1-(1-prt56.MainTransparency.Value)*i
  1137. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.4)
  1138. handlewld.C1=clerp(handlewld.C1,cf(0,0,0),.4)
  1139. wld1.C0=clerp(wld1.C0,euler(1,0,0)*cf(0,0,0),.4)
  1140. Neck.C0=clerp(Neck.C0,necko*euler(.2,0,0),.3)
  1141. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  1142. RW.C0=clerp(RW.C0,cf(1,0.4,.2)*euler(-.3,0,-.8),.3)
  1143. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1144. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-1.4),.3)
  1145. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1146. end
  1147. prt54.Transparency=prt54.MainTransparency.Value
  1148. prt55.Transparency=prt55.MainTransparency.Value
  1149. prt56.Transparency=prt56.MainTransparency.Value
  1150. mdec.Parent=nil
  1151. mdec2.Parent=Decrease
  1152. handlewld.C1=cf(0,0,0)
  1153. end
  1154.  
  1155. function StaggerAnim()
  1156. attack=true
  1157. removeControl()
  1158. for i=1,math.random(2,4) do
  1159. ClangEffect(BrickColor.new("New Yeller"),cf(hitbox.Position)*euler(math.random(-50,50)/100,math.random(-50,50),math.random(-50,50)/100),0,.1,.2,math.random(150,300)/1000)
  1160. end
  1161. for i=0,1,0.35 do
  1162. script.Heartbeat.Event:wait()
  1163. if Rooted.Value==false then Torso.Velocity=RootPart.CFrame.lookVector*-40 end
  1164. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.5)*euler(.1,0,0),.3)
  1165. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(-.2,0,-.4),.3)
  1166. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.2,0,.7)*euler(0,-.7,0),.3)
  1167. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1168. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.2,0,-.4)*euler(0,.4,0),.3)
  1169. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1170. RH.C0=clerp(RH.C0,cf(1,-.8,0)*euler(0,1.57,0)*euler(-.5,0,.6),.3)
  1171. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,.2,.2),.3)
  1172. end
  1173. for i=0,1,0.2 do
  1174. script.Heartbeat.Event:wait()
  1175. if Rooted.Value==false then Torso.Velocity=RootPart.CFrame.lookVector*-40 end
  1176. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.5)*euler(.1,0,0),.4)
  1177. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.2)*euler(-.5,0,-.4),.4)
  1178. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.2,0,.7)*euler(0,-.7,0),.4)
  1179. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  1180. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.2,0,-.4)*euler(0,.4,0),.4)
  1181. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  1182. RH.C0=clerp(RH.C0,cf(1,-.8,0)*euler(0,1.57,0)*euler(-.5,0,.6),.4)
  1183. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,.2,.5),.4)
  1184. end
  1185. for i=0,1,0.1 do
  1186. script.Heartbeat.Event:wait()
  1187. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.4)*euler(.5,0,0),.3)
  1188. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-1.8)*euler(-.2,0,-.4),.3)
  1189. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.3,0,.4)*euler(0,-.4,0),.3)
  1190. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1191. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.3,0,-.2)*euler(0,.4,0),.3)
  1192. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1193. RH.C0=clerp(RH.C0,cf(1,-.8,0)*euler(0,1.57,0)*euler(-.5,0,1.2),.3)
  1194. LH.C0=clerp(LH.C0,cf(-1,0,-1)*euler(0,-1.57,0)*euler(0,.2,.2),.3)
  1195. end
  1196. for i=1,40 do
  1197. script.Heartbeat.Event:wait()
  1198. if Stun.Value>=StunT.Value then
  1199. break
  1200. end
  1201. end
  1202. resumeControl()
  1203. combo=0
  1204. attack=false
  1205. end
  1206.  
  1207. function StaggerHitt()
  1208. attack=true
  1209. for i=1,math.random(2,4) do
  1210. ClangEffect(BrickColor.new("New Yeller"),cf(hitbox.Position)*euler(math.random(-50,50)/100,math.random(-50,50),math.random(-50,50)/100),0,.1,.2,math.random(150,300)/1000)
  1211. end
  1212. for i=0,1,0.1 do
  1213. script.Heartbeat.Event:wait()
  1214. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.7)*euler(.1,0,0),.3)
  1215. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(-.2,0,-.6),.3)
  1216. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.4,0,.9)*euler(0,-.7,0),.3)
  1217. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1218. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.2,0,-.4)*euler(0,.4,0),.3)
  1219. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1220. RH.C0=clerp(RH.C0,cf(1,-.8,0)*euler(0,1.57,0)*euler(-.2,0,-.4),.3)
  1221. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,.2,.2),.3)
  1222. end
  1223. attack=false
  1224. end
  1225.  
  1226. function StunAnim()
  1227. attack=true
  1228. removeControl()
  1229. Stunned.Value=true
  1230. showDamage(Character,"Stunned","Interrupt")
  1231. local dec=Instance.new("NumberValue",Decrease)
  1232. dec.Name="DecreaseMvmt"
  1233. dec.Value=10
  1234. for i=0,1,0.3 do
  1235. script.Heartbeat.Event:wait()
  1236. Neck.C0=clerp(Neck.C0,necko*euler(-.2,0,-.5),.2)
  1237. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(.2,0,-3),.2)
  1238. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.2,0,1.3),.2)
  1239. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  1240. LW.C0=clerp(LW.C0,cf(-1.2,0.5,-.4)*euler(1,0,.4)*euler(0,-.1,0),.2)
  1241. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  1242. RH.C0=clerp(RH.C0,cf(1,-.6,0)*euler(0,1.57,0)*euler(-.5,0,.3),.25)
  1243. LH.C0=clerp(LH.C0,cf(-1,-.8,0)*euler(0,-1.57,0)*euler(-.2,0,0),.25)
  1244. end
  1245. for i=0,1,0.3 do
  1246. script.Heartbeat.Event:wait()
  1247. Neck.C0=clerp(Neck.C0,necko*euler(-.3,0,-.5),.2)
  1248. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.5)*euler(.8,0,-3),.2)
  1249. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.8,0,1.3),.2)
  1250. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  1251. LW.C0=clerp(LW.C0,cf(-1.2,0.5,-.4)*euler(1.2,0,.8)*euler(0,-.1,0),.2)
  1252. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  1253. RH.C0=clerp(RH.C0,cf(1,-.6,0)*euler(0,1.57,0)*euler(-.5,0,.6),.25)
  1254. LH.C0=clerp(LH.C0,cf(-1,-.8,0)*euler(0,-1.57,0)*euler(.1,0,.7),.25)
  1255. end
  1256. for i=0,1,0.3 do
  1257. script.Heartbeat.Event:wait()
  1258. Neck.C0=clerp(Neck.C0,necko*euler(-.3,0,-1),.2)
  1259. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-2)*euler(1.57,0,-3),.2)
  1260. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.8,0,1.3),.2)
  1261. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  1262. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.2,0,-.8)*euler(0,-.1,0),.2)
  1263. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  1264. RH.C0=clerp(RH.C0,cf(1,-.6,0)*euler(0,1.57,0)*euler(-.2,0,.6),.25)
  1265. LH.C0=clerp(LH.C0,cf(-1,-.8,0)*euler(0,-1.57,0)*euler(-.1,0,.3),.25)
  1266. end
  1267. local gairost = Instance.new("BodyGyro")
  1268. gairost.Parent = RootPart
  1269. gairost.maxTorque = Vector3.new(math.huge, 0, math.huge)
  1270. gairost.P = 100000
  1271. gairost.cframe = cf(0, 0, 0)
  1272. for i=0,1,0.1 do
  1273. script.Heartbeat.Event:wait()
  1274. if hitfloor~=nil then
  1275. Torso.Velocity=vt(0,0,0)
  1276. end
  1277. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-1.57),.3)
  1278. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-2.5)*euler(1.57,0,-3.14),.3)
  1279. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-1.57,0,1.5)*euler(.2,0,0),.3)
  1280. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1281. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.5,0,-1.57)*euler(0,0,0),.3)
  1282. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1283. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(-.3,.5,0),.3)
  1284. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(-.1,.2,0),.3)
  1285. end
  1286. for i=1,70 do
  1287. script.Heartbeat.Event:wait()
  1288. gairost.cframe=RootPart.CFrame
  1289. if hitfloor~=nil then
  1290. Torso.Velocity=vt(0,0,0)
  1291. end
  1292. end
  1293. for i=0,1,0.2 do
  1294. script.Heartbeat.Event:wait()
  1295. Stun.Value=0
  1296. gairost.cframe=RootPart.CFrame
  1297. Neck.C0=clerp(Neck.C0,necko*euler(.2,0,0),.3)
  1298. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-2)*euler(1,0,-4),.3)
  1299. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-1.57,0,1)*euler(.2,-1,0),.3)
  1300. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1301. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.2,0,.2)*euler(0,0,0),.3)
  1302. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1303. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(-.3,.5,.4),.3)
  1304. LH.C0=clerp(LH.C0,cf(-1,-1,-1)*euler(0,-1.57,0)*euler(-.1,.2,1),.3)
  1305. end
  1306. resumeControl()
  1307. gairost.Parent=nil
  1308. dec.Parent=nil
  1309. Stun.Value=0
  1310. combo=0
  1311. Stunned.Value=false
  1312. attack=false
  1313. for i=1,10 do
  1314. script.Heartbeat.Event:wait()
  1315. Stun.Value=0
  1316. end
  1317. attack = false
  1318. end
  1319.  
  1320. --[[ idle
  1321. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.3)
  1322. wld1.C0=clerp(wld1.C0,euler(0,0,0)*cf(0,0,0),.3)
  1323. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.2)*euler(.1,0,0),.3)
  1324. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.1)*euler(0,0,-.2),.3)
  1325. RW.C0=clerp(RW.C0,cf(1,0.4,.2)*euler(-.3,0,-1)*euler(0,-.2,0),.3)
  1326. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.57,0,-.2),.3)
  1327. RH.C0=clerp(RH.C0,cf(1.1,-.9,.2)*euler(0,1.57,0)*euler(-.1,-.4,-.05),.3)
  1328. LH.C0=clerp(LH.C0,cf(-1,-.9,-.1)*euler(0,-1.57,0)*euler(0,.2,.05),.3)
  1329. ]]
  1330.  
  1331. function attackone()
  1332. attack=true
  1333. for i=0,1,0.1 do
  1334. script.Heartbeat.Event:wait()
  1335. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.3)
  1336. wld1.C0=clerp(wld1.C0,euler(0,1.57,0)*cf(0,-.5,0)*euler(-.5,0,0),.3)
  1337. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.3)*euler(.1,0,0),.3)
  1338. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.1)*euler(0,0,-.3),.3)
  1339. RW.C0=clerp(RW.C0,cf(1,0.4,.2)*euler(-.6,0,-.9)*euler(0,-.2,0),.3)
  1340. LW.C0=clerp(LW.C0,cf(-.5,0.5,-.5)*euler(1.7,0,1)*euler(0,-1,0),.3)
  1341. RH.C0=clerp(RH.C0,cf(1.1,-.9,.2)*euler(0,1.57,0)*euler(-.1,.2,-.05),.3)
  1342. LH.C0=clerp(LH.C0,cf(-1,-.9,-.1)*euler(0,-1.57,0)*euler(0,.2,.05),.3)
  1343. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1344. break
  1345. end
  1346. end
  1347. so("199145095",prt56,1,1.1)
  1348. hitbox.Parent=modelzorz
  1349. hitbox.CFrame=prt1.CFrame*cf(0,3,0)
  1350. for i=0,1,0.1 do
  1351. script.Heartbeat.Event:wait()
  1352. hitbox.CFrame=prt1.CFrame*cf(0,3,0)
  1353. MagniDamage(hitbox,7,8,9,math.random(20,25),"Normal",RootPart,.3,2,math.random(3,5),nil,true)
  1354. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,.9,0),.4)
  1355. wld1.C0=clerp(wld1.C0,euler(0,1.57,0)*cf(0,-.5,0)*euler(.5,0,0),.4)
  1356. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-.2)*euler(0,0,0),.4)
  1357. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.1)*euler(0,0,.2),.4)
  1358. RW.C0=clerp(RW.C0,cf(.8,0.4,.2)*euler(-.6,0,-.9)*euler(0,-.2,0),.4)
  1359. LW.C0=clerp(LW.C0,cf(-1.3,0.5,.3)*euler(1.4,0,1)*euler(0,-1.5,0)*euler(-2.5,0,0),.4)
  1360. RH.C0=clerp(RH.C0,cf(1.1,-.9,.3)*euler(0,1.57,0)*euler(-.1,-.2,-.05),.4)
  1361. LH.C0=clerp(LH.C0,cf(-1,-.9,-.4)*euler(0,-1.57,0)*euler(0,-.2,.05),.4)
  1362. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1363. break
  1364. end
  1365. end
  1366. hitbox.Parent=nil
  1367. attack=false
  1368. end
  1369.  
  1370. function attacktwo()
  1371. attack=true
  1372. local d=2
  1373. for i=0,1,0.1 do
  1374. script.Heartbeat.Event:wait()
  1375. d=d+1
  1376. if d>=4 then
  1377. d=0
  1378. so("199145146",handle,1,1.55)
  1379. end
  1380. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,.9,0),.3)
  1381. handlewld.C1=handlewld.C1*euler(0,.67,0)
  1382. wld1.C0=clerp(wld1.C0,euler(0,0,0)*cf(0,0,0),.3)
  1383. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-.2)*euler(.2,0,0),.3)
  1384. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.1)*euler(0,0,.4),.3)
  1385. RW.C0=clerp(RW.C0,cf(.8,0.4,.2)*euler(-.6,0,-.9)*euler(0,-.2,0),.3)
  1386. LW.C0=clerp(LW.C0,cf(-1.3,0.5,.3)*euler(1.4,0,1)*euler(0,-1.5,0)*euler(-2.5,0,0)*euler(0,2,0),.3)
  1387. RH.C0=clerp(RH.C0,cf(1.1,-.9,.3)*euler(0,1.57,0)*euler(-.1,-.4,-.05),.3)
  1388. LH.C0=clerp(LH.C0,cf(-1,-.9,-.4)*euler(0,-1.57,0)*euler(0,-.4,.05),.3)
  1389. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1390. break
  1391. end
  1392. end
  1393. local lnum=0
  1394. ref2=part(3,nil,0,1,BrickColor.new("Black"),"Reference",vt(0.2,0.2,0.2))
  1395. ref2.Anchored=true
  1396. for i=0,1,0.2 do
  1397. script.Heartbeat.Event:wait()
  1398. lnum=lnum+1
  1399. ref2.CFrame=cf(prt18.Position)*cf(math.random(-500,500)/100,0,math.random(-500,500)/100)
  1400. hitfloor2,posfloor2=rayCast(ref2.Position,(CFrame.new(ref2.Position,ref2.Position - Vector3.new(0,1,0))).lookVector,50,Character)
  1401. if hitfloor2~=nil and lnum%2==0 then
  1402. Lightning(prt18.Position,posfloor2,5,1,NewCol2,.05,.4,.1)
  1403. end
  1404. MagicCircle(BrickColor.new(NewCol2),cf(prt18.Position),6,6,6,-1,-1,-1,.05,1,nil,nil,.5)
  1405. MagicBlock(BrickColor.new(NewCol2),cf(prt18.Position)*cf(math.random(-200,200)/100,math.random(-200,200)/100,math.random(-200,200)/100)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),2,2,2,-.5,-.5,-.5,.1,2)
  1406. wld23.C0=clerp(wld23.C0,euler(0,math.rad(60),0)*cf(-.045,0,0),.45)
  1407. wld27.C0=clerp(wld27.C0,euler(0,math.rad(60),3.14)*cf(.045,0,0),.45)
  1408. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,.9,0),.45)
  1409. handlewld.C1=clerp(handlewld.C1,cf(0,0,0),.45)
  1410. wld1.C0=clerp(wld1.C0,euler(0,0,0)*euler(0,0,-3)*cf(0,0,0),.45)
  1411. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-.2)*euler(.2,0,0),.45)
  1412. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.1)*euler(0,0,.4),.45)
  1413. RW.C0=clerp(RW.C0,cf(.8,0.4,.2)*euler(-.6,0,-.9)*euler(0,-.2,0),.45)
  1414. LW.C0=clerp(LW.C0,cf(-1.3,0.5,.3)*euler(1.4,0,1)*euler(0,-1.5,0)*euler(-2.5,0,0)*euler(0,.4,0),.45)
  1415. RH.C0=clerp(RH.C0,cf(1.1,-.9,.3)*euler(0,1.57,0)*euler(-.1,-.4,-.05),.45)
  1416. LH.C0=clerp(LH.C0,cf(-1,-.9,-.4)*euler(0,-1.57,0)*euler(0,-.4,.05),.45)
  1417. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1418. break
  1419. end
  1420. end
  1421. so("199145204",prt18,.8,1.3)
  1422. so("315743331",prt18,1,2)
  1423. hitbox.Parent=modelzorz
  1424. hitbox.CFrame=prt1.CFrame*cf(0,-3,0)
  1425. for i=0,1,0.1 do
  1426. script.Heartbeat.Event:wait()
  1427. lnum=lnum+1
  1428. ref2.CFrame=cf(prt18.Position)*cf(math.random(-500,500)/100,0,math.random(-500,500)/100)
  1429. hitfloor2,posfloor2=rayCast(ref2.Position,(CFrame.new(ref2.Position,ref2.Position - Vector3.new(0,1,0))).lookVector,50,Character)
  1430. if hitfloor2~=nil and lnum%2==0 then
  1431. Lightning(prt18.Position,posfloor2,5,1,NewCol2,.05,.4,.1)
  1432. end
  1433. hitbox.CFrame=prt1.CFrame*cf(0,-3,0)
  1434. MagniDamage(hitbox,7,8,9,math.random(5,10),"Normal",RootPart,.3,2,math.random(3,5),nil,true)
  1435. MagicCircle(BrickColor.new(NewCol2),cf(prt18.Position),6,6,6,-1,-1,-1,.05,1,nil,nil,.5)
  1436. MagicBlock(BrickColor.new(NewCol2),cf(prt18.Position)*cf(math.random(-200,200)/100,math.random(-200,200)/100,math.random(-200,200)/100)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),2,2,2,-.5,-.5,-.5,.1,2)
  1437. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,.9,0),.45)
  1438. handlewld.C1=clerp(handlewld.C1,cf(0,0,0),.45)
  1439. wld1.C0=clerp(wld1.C0,cf(0,.4,0)*euler(-1,0,0)*euler(0,0,-3),.45)
  1440. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.4)*euler(.05,0,0),.45)
  1441. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.1)*euler(0,0,-.4),.45)
  1442. RW.C0=clerp(RW.C0,cf(.8,0.4,.2)*euler(-.8,0,-1)*euler(0,-.4,0),.45)
  1443. LW.C0=clerp(LW.C0,cf(-1.5,0.5,.2)*euler(1.4,0,-.8)*euler(0,-1.3,0),.45)
  1444. RH.C0=clerp(RH.C0,cf(1.1,-.9,-.2)*euler(0,1.57,0)*euler(-.1,.2,-.2),.45)
  1445. LH.C0=clerp(LH.C0,cf(-1,-.9,-.2)*euler(0,-1.57,0)*euler(0,.2,.05),.45)
  1446. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1447. break
  1448. end
  1449. end
  1450. --prt18
  1451. handlewld.C1=cf(0,0,0)
  1452. hitbox.Parent=nil
  1453. attack=false
  1454. for i=0,1,0.1 do
  1455. script.Heartbeat.Event:wait()
  1456. wld23.C0=clerp(wld23.C0,euler(0,math.rad(0),0)*cf(-.045,0,0),.45)
  1457. wld27.C0=clerp(wld27.C0,euler(0,math.rad(0),3.14)*cf(.045,0,0),.45)
  1458. end
  1459. wld23.C0=clerp(wld23.C0,euler(0,math.rad(0),0)*cf(-.045,0,0),1)
  1460. wld27.C0=clerp(wld27.C0,euler(0,math.rad(0),3.14)*cf(.045,0,0),1)
  1461. end
  1462.  
  1463. function attackthree()
  1464. attack=true
  1465. for i=0,1,0.1 do
  1466. script.Heartbeat.Event:wait()
  1467. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*euler(0,0,1.57)*cf(0,1,0),.3)
  1468. wld1.C0=clerp(wld1.C0,cf(0,-.5,0)*euler(0,0,-1),.3)
  1469. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-.1)*euler(-.1,0,0),.3)
  1470. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.1)*euler(0,0,.2),.3)
  1471. RW.C0=clerp(RW.C0,cf(1,0.4,.2)*euler(-.3,0,-1)*euler(0,-.2,0),.3)
  1472. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(3,0,-.6)*euler(0,-.4,0),.3)
  1473. RH.C0=clerp(RH.C0,cf(1,-.9,.4)*euler(0,1.57,0)*euler(-.1,-.8,-.05),.3)
  1474. LH.C0=clerp(LH.C0,cf(-1,-.9,-.4)*euler(0,-1.57,0)*euler(0,-.2,.05),.3)
  1475. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1476. break
  1477. end
  1478. end
  1479. so("199145095",prt56,1,.9)
  1480. hitbox.Parent=modelzorz
  1481. hitbox.CFrame=prt1.CFrame*cf(0,3,0)
  1482. for i=0,1,0.1 do
  1483. script.Heartbeat.Event:wait()
  1484. hitbox.CFrame=prt1.CFrame*cf(0,3,0)
  1485. MagniDamage(hitbox,7,8,9,math.random(10,15),"Normal",RootPart,.3,2,math.random(3,5),nil,true)
  1486. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*euler(0,0,1.57)*cf(0,1,0),.45)
  1487. wld1.C0=clerp(wld1.C0,cf(0,-.5,0)*euler(0,0,.8),.45)
  1488. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.4)*euler(-.1,0,0),.45)
  1489. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,-1,-.4)*euler(.2,0,0)*euler(0,0,-.4),.45)
  1490. RW.C0=clerp(RW.C0,cf(.8,0.4,.2)*euler(-.8,0,-1)*euler(0,-.4,0),.45)
  1491. LW.C0=clerp(LW.C0,cf(-1.3,0.5,-.2)*euler(.6,0,-.2)*euler(0,.3,0),.45)
  1492. RH.C0=clerp(RH.C0,cf(1,-.9,.4)*euler(0,1.57,0)*euler(-.1,-.4,-.2),.45)
  1493. LH.C0=clerp(LH.C0,cf(-1,-.5,-.5)*euler(0,-1.57,0)*euler(0,.4,-.25),.45)
  1494. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1495. break
  1496. end
  1497. end
  1498. hitbox.Parent=nil
  1499. attack=false
  1500. end
  1501.  
  1502. function attackfour()
  1503. attack=true
  1504. for i=0,1,0.1 do
  1505. script.Heartbeat.Event:wait()
  1506. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,.9,0),.3)
  1507. wld1.C0=clerp(wld1.C0,euler(0,1.57,0)*cf(0,-1,0)*euler(.5,0,0),.3)
  1508. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-.2)*euler(0,0,0),.3)
  1509. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.1)*euler(0,0,.2),.3)
  1510. RW.C0=clerp(RW.C0,cf(.8,0.4,.2)*euler(-.6,0,-.9)*euler(0,-.2,0),.3)
  1511. LW.C0=clerp(LW.C0,cf(-1.3,0.5,.3)*euler(1.4,0,1)*euler(0,1.5,0)*euler(2,0,0),.3)
  1512. RH.C0=clerp(RH.C0,cf(1.1,-.9,.3)*euler(0,1.57,0)*euler(-.1,-.2,-.05),.3)
  1513. LH.C0=clerp(LH.C0,cf(-1,-.9,-.4)*euler(0,-1.57,0)*euler(0,-.2,.05),.3)
  1514. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1515. break
  1516. end
  1517. end
  1518. so("199145204",prt56,1,.9)
  1519. for i=0,1,0.1 do
  1520. script.Heartbeat.Event:wait()
  1521. if i<.5 then
  1522. refd=part(3,workspace,0,1,BrickColor.new("Black"),"Reference",vt(0.2,0.2,0.2))
  1523. refd.Anchored=true
  1524. refd.CFrame=prt56.CFrame
  1525. game:GetService("Debris"):AddItem(refd,1)
  1526. so("315748999",refd,.4,.6)
  1527. MagicCircle(BrickColor.new(NewCol2),prt56.CFrame,6,6,6,1,1,1,.1,1,nil,nil,0)
  1528. table.insert(Effects,{prt56.CFrame,"Orb",math.random(40,70)})
  1529. end
  1530. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,.9,0),.3)
  1531. wld1.C0=clerp(wld1.C0,euler(0,1.57,0)*cf(0,-1,0)*euler(.8,0,0),.4)
  1532. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.1)*euler(.1,0,0),.3)
  1533. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.1)*euler(0,0,-1),.3)
  1534. RW.C0=clerp(RW.C0,cf(1,0.4,.2)*euler(-.6,0,-.9)*euler(0,-.2,0),.3)
  1535. LW.C0=clerp(LW.C0,cf(-0,0.5,-.5)*euler(1.3,0,1)*euler(0,1.5,0)*euler(-.5,0,0),.3)
  1536. RH.C0=clerp(RH.C0,cf(1.1,-.9,-.1)*euler(0,1.57,0)*euler(-.1,.2,-.1),.3)
  1537. LH.C0=clerp(LH.C0,cf(-.9,-.9,.1)*euler(0,-1.57,0)*euler(0,.6,.05),.3)
  1538. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1539. break
  1540. end
  1541. end
  1542. attack=false
  1543. end
  1544.  
  1545. function EnergyCharge()
  1546. attack=true
  1547. eCharge=true
  1548. energ=0
  1549. local deca=Instance.new("NumberValue",Decrease)
  1550. deca.Name="DecreaseDef"
  1551. deca.Value=.1
  1552. local summonorb=false
  1553. while eCharge==true do
  1554. script.Heartbeat.Event:wait()
  1555. energ=energ+1
  1556. if energ>=75 then
  1557. eCharge=false
  1558. summonorb=true
  1559. end
  1560. MagicCircle2(BrickColor.new(NewCol2),cf(prt56.Position)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))*cf(0,2,0),1,4,1,-.01,1,-.01,.1,-.4)
  1561. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.4)
  1562. wld1.C0=clerp(wld1.C0,euler(0,1.57,0)*cf(0,0,0)*euler(0,0,0),.4)
  1563. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-.4)*euler(.1,0,0),.4)
  1564. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.1)*euler(0,0,.4),.4)
  1565. RW.C0=clerp(RW.C0,cf(.9,0.4,.4)*euler(-.5,0,-1)*euler(0,-.4,0),.4)
  1566. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-1,0,-.6)*euler(0,1.2,0),.4)
  1567. RH.C0=clerp(RH.C0,cf(1.1,-.9,-.1)*euler(0,1.57,0)*euler(0,-.4,-.05),.4)
  1568. LH.C0=clerp(LH.C0,cf(-1,-.9,0)*euler(0,-1.57,0)*euler(-.1,.2,.15),.4)
  1569. end
  1570. if summonorb==true then
  1571. MagicCircle(BrickColor.new(NewCol2),prt56.CFrame,10,10,10,1,1,1,.05,1,nil,nil,0)
  1572. omain,omsh,owld=AesthPart(modelzorz,prt56,0,1,NewCol2,"OrbRef","SmoothPlastic","SpecialMesh","Sphere","nil",1,1,1,cf(0,0,0))
  1573. oprt1,omsh1,owld1=AesthPart(omain,omain,0,.5,NewCol3,"Orb1","Neon","SpecialMesh","FileMesh","rbxasset://fonts/leftarm.mesh",-.8,-.4,-.8,cf(0,0,0))
  1574. oprt2,omsh2,owld2=AesthPart(oprt1,oprt1,0,.3,NewCol2,"Orb2","Neon","SpecialMesh","Sphere","nil",3,3,3,cf(0,0,0))
  1575. oprt3,omsh3,owld3=AesthPart(oprt1,oprt1,0,0,NewCol,"Orb3","Neon","SpecialMesh","Sphere","nil",2,2,2,cf(0,0,0))
  1576. owld1.Parent=nil
  1577. oprt1.CFrame=omain.CFrame
  1578. prop=Instance.new("RocketPropulsion")
  1579. prop.Parent=oprt1
  1580. prop.Target=omain
  1581. --[[prop.CartoonFactor=1
  1582. prop.TargetRadius=4
  1583. prop.MaxSpeed=100
  1584. prop.MaxThrust=4000
  1585. prop.ThrustD=.001
  1586. prop.ThrustP=50
  1587. prop.MaxTorque=vt(400000,400000,0)
  1588. prop.TurnD=500
  1589. prop.TurnP=3000]]
  1590. prop.TargetRadius=3
  1591. prop.MaxSpeed=500
  1592. prop.CartoonFactor=1
  1593. prop.MaxThrust=10
  1594. prop.ThrustD=30
  1595. prop.ThrustP=500
  1596. prop.MaxTorque=vt(5,5,5)
  1597. prop.TurnD=5
  1598. prop.TurnP=500
  1599. prop:Fire()
  1600. table.insert(Orbs,{omain,owld,oprt1,prop})
  1601. end
  1602. deca.Parent=nil
  1603. attack=false
  1604. end
  1605.  
  1606. function ShootOrb()
  1607. attack=true
  1608. for i=1,#Orbs do
  1609. Orbs[i][2].Parent=nil
  1610. Orbs[i][1].Anchored=true
  1611. Orbs[i][1].CFrame=cf(RootPart.Position)*cf(0,5,0)
  1612. Orbs[i][4].MaxSpeed=200
  1613. Orbs[i][4].ThrustD=100
  1614. Orbs[i][4].ThrustP=800
  1615. Orbs[i][4].MaxTorque=vt(50,50,50)
  1616. Orbs[i][4].TurnD=40
  1617. end
  1618. if #Orbs%2==0 then
  1619. for i=0,1,0.1 do
  1620. script.Heartbeat.Event:wait()
  1621. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,.9,0),.3)
  1622. wld1.C0=clerp(wld1.C0,euler(0,1.57,0)*cf(0,0,0)*euler(.5,0,0),.3)
  1623. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-.2)*euler(0,0,0),.3)
  1624. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.1)*euler(0,0,.2),.3)
  1625. RW.C0=clerp(RW.C0,cf(.8,0.4,.2)*euler(-.6,0,-.9)*euler(0,-.2,0),.3)
  1626. LW.C0=clerp(LW.C0,cf(-1.2,0.5,.2)*euler(1.8,0,-1)*euler(0,.7,0)*euler(0,0,0),.3)
  1627. RH.C0=clerp(RH.C0,cf(1,-.9,.3)*euler(0,1.57,0)*euler(-.1,-.2,-.05),.3)
  1628. LH.C0=clerp(LH.C0,cf(-1,-.9,-.4)*euler(0,-1.57,0)*euler(0,-.2,.05),.3)
  1629. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1630. break
  1631. end
  1632. end
  1633. so("377357731",Orbs[#Orbs][3],1,1)
  1634. --table.insert(Orbs,{omain,owld,oprt1,prop})
  1635. Orbs[#Orbs][4].Parent=nil
  1636. Orbs[#Orbs][3].Anchored=true
  1637. local MouseLook=cf((Orbs[#Orbs][3].Position+MMouse.Hit.p)/2,MMouse.Hit.p)
  1638. table.insert(Effects,{MouseLook.lookVector,"Shoot",30,Orbs[#Orbs][3].Position,7,9,Orbs[#Orbs][3],Orbs[#Orbs][1]})
  1639. table.remove(Orbs,#Orbs)
  1640. for i=0,1,0.4 do
  1641. script.Heartbeat.Event:wait()
  1642. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,.9,0),.5)
  1643. wld1.C0=clerp(wld1.C0,euler(0,1.57,0)*cf(0,0,0)*euler(.5,0,0),.5)
  1644. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.3)*euler(.1,0,0),.5)
  1645. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.1)*euler(0,0,-.6),.5)
  1646. RW.C0=clerp(RW.C0,cf(.8,0.4,.2)*euler(-.6,0,-.9)*euler(0,-.2,0),.5)
  1647. LW.C0=clerp(LW.C0,cf(-1,0.5,-.5)*euler(.4,0,-.4)*euler(0,-.5,0)*euler(0,0,0),.5)
  1648. RH.C0=clerp(RH.C0,cf(1,-.9,-.4)*euler(0,1.57,0)*euler(-.1,.6,-.05),.5)
  1649. LH.C0=clerp(LH.C0,cf(-1,-.9,.4)*euler(0,-1.57,0)*euler(0,.6,.1),.5)
  1650. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1651. break
  1652. end
  1653. end
  1654. for i=0,1,0.15 do
  1655. script.Heartbeat.Event:wait()
  1656. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,.9,0),.45)
  1657. wld1.C0=clerp(wld1.C0,euler(0,1.57,0)*cf(0,0,0)*euler(.5,0,0),.45)
  1658. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.3)*euler(.1,0,0),.45)
  1659. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.1)*euler(0,0,-.6),.45)
  1660. RW.C0=clerp(RW.C0,cf(.8,0.4,.2)*euler(-.6,0,-.9)*euler(0,-.2,0),.45)
  1661. LW.C0=clerp(LW.C0,cf(-.6,0.5,-.5)*euler(.8,0,.4)*euler(0,-.5,0)*euler(0,0,0),.45)
  1662. RH.C0=clerp(RH.C0,cf(1,-.9,-.4)*euler(0,1.57,0)*euler(-.1,.6,-.05),.45)
  1663. LH.C0=clerp(LH.C0,cf(-1,-.9,.4)*euler(0,-1.57,0)*euler(0,.6,.1),.45)
  1664. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1665. break
  1666. end
  1667. end
  1668. else
  1669. for i=0,1,0.1 do
  1670. script.Heartbeat.Event:wait()
  1671. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.3)
  1672. wld1.C0=clerp(wld1.C0,euler(0,1.57,0)*cf(0,-.5,0)*euler(-.2,0,0),.3)
  1673. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.3)*euler(.1,0,0),.3)
  1674. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.1)*euler(0,0,-.3),.3)
  1675. RW.C0=clerp(RW.C0,cf(1,0.4,.2)*euler(-.6,0,-.9)*euler(0,-.2,0),.3)
  1676. LW.C0=clerp(LW.C0,cf(-.5,0.5,-.5)*euler(1.7,0,1)*euler(0,-1,0),.3)
  1677. RH.C0=clerp(RH.C0,cf(1.1,-.9,.2)*euler(0,1.57,0)*euler(-.1,.2,-.05),.3)
  1678. LH.C0=clerp(LH.C0,cf(-1,-.9,-.1)*euler(0,-1.57,0)*euler(0,.2,.05),.3)
  1679. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1680. break
  1681. end
  1682. end
  1683. so("377357731",Orbs[#Orbs][3],1,1)
  1684. --table.insert(Orbs,{omain,owld,oprt1,prop})
  1685. Orbs[#Orbs][4].Parent=nil
  1686. Orbs[#Orbs][3].Anchored=true
  1687. local MouseLook=cf((Orbs[#Orbs][3].Position+MMouse.Hit.p)/2,MMouse.Hit.p)
  1688. table.insert(Effects,{MouseLook.lookVector,"Shoot",30,Orbs[#Orbs][3].Position,7,9,Orbs[#Orbs][3],Orbs[#Orbs][1]})
  1689. table.remove(Orbs,#Orbs)
  1690. for i=0,1,0.1 do
  1691. script.Heartbeat.Event:wait()
  1692. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,.9,0),.4)
  1693. wld1.C0=clerp(wld1.C0,euler(0,1.57,0)*cf(0,-.5,0)*euler(.8,0,0),.4)
  1694. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-.2)*euler(0,0,0),.4)
  1695. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.1)*euler(0,0,.2),.4)
  1696. RW.C0=clerp(RW.C0,cf(.8,0.4,.2)*euler(-.6,0,-.9)*euler(0,-.2,0),.4)
  1697. LW.C0=clerp(LW.C0,cf(-1.3,0.5,.2)*euler(1.7,0,1)*euler(0,-1,0)*euler(-2.4,0,-.5),.4)
  1698. RH.C0=clerp(RH.C0,cf(1.1,-.9,.3)*euler(0,1.57,0)*euler(-.1,-.2,-.05),.4)
  1699. LH.C0=clerp(LH.C0,cf(-1,-.9,-.4)*euler(0,-1.57,0)*euler(0,-.2,.05),.4)
  1700. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1701. break
  1702. end
  1703. end
  1704. end
  1705. for i=1,#Orbs do
  1706. Orbs[i][1].Anchored=false
  1707. Orbs[i][2].Parent=Orbs[i][1]
  1708. Orbs[i][4].MaxSpeed=500
  1709. Orbs[i][4].ThrustD=30
  1710. Orbs[i][4].ThrustP=500
  1711. Orbs[i][4].MaxTorque=vt(5,5,5)
  1712. Orbs[i][4].TurnD=5
  1713. end
  1714. attack=false
  1715. end
  1716.  
  1717. function do1()
  1718. if attack==true then return end
  1719. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then return end
  1720. mnum=#Orbs*5
  1721. if cooldowns[1]>=cooldownmax and mana.Value>=mnum then
  1722. --if true then
  1723. attack=true
  1724. if mnum>0 then
  1725. cooldowns[1]=0
  1726. end
  1727. mana.Value=mana.Value-mnum
  1728. print(#Orbs)
  1729.  
  1730. so("2101137",prt56,1,1)
  1731. for i=0,1,0.05 do
  1732. script.Heartbeat.Event:wait()
  1733. MagicCircle2(BrickColor.new(NewCol2),cf(prt56.Position)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1,4,1,-.01,1,-.01,.1,.6)
  1734. for i=1,#Orbs do
  1735. MagicBlock(BrickColor.new(NewCol4),cf(Orbs[i][3].Position)*cf(math.random(-100,100)/100,math.random(-100,100)/100,math.random(-100,100)/100)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1.5,1.5,1.5,-.2,-.2,-.2,.2,1)
  1736. end
  1737. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.3)
  1738. wld1.C0=clerp(wld1.C0,euler(0,1.57,0)*euler(1,0,0)*cf(0,0,0),.3)
  1739. Neck.C0=clerp(Neck.C0,necko*euler(0,0,1)*euler(.1,0,0),.3)
  1740. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.1)*euler(0,0,-1),.3)
  1741. RW.C0=clerp(RW.C0,cf(1,0.4,.2)*euler(-.3,0,-1)*euler(0,-.2,0),.3)
  1742. LW.C0=clerp(LW.C0,cf(-1.3,0.5,.2)*euler(1.57,0,-1)*euler(.2,0,0),.3)
  1743. RH.C0=clerp(RH.C0,cf(.9,-.9,-.6)*euler(0,1.57,0)*euler(-.1,.6,-.05),.3)
  1744. LH.C0=clerp(LH.C0,cf(-1,-.9,.6)*euler(0,-1.57,0)*euler(0,1,.05),.3)
  1745. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1746. break
  1747. end
  1748. end
  1749.  
  1750. if #Orbs==1 and O1==false then --Sentry
  1751. O1=true
  1752. for i=0,1,0.1 do
  1753. script.Heartbeat.Event:wait()
  1754. MagicCircle2(BrickColor.new(NewCol2),cf(prt56.Position)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1,4,1,-.01,1,-.01,.1,.6)
  1755. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.3)
  1756. wld1.C0=clerp(wld1.C0,euler(0,1.57,0)*euler(.6,0,0)*cf(0,0,0),.3)
  1757. Neck.C0=clerp(Neck.C0,necko*euler(0,0,1)*euler(-.6,0,0),.3)
  1758. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.1)*euler(0,0,-1),.3)
  1759. RW.C0=clerp(RW.C0,cf(.8,0.4,.2)*euler(-.6,0,-.9)*euler(0,-.2,0),.3)
  1760. LW.C0=clerp(LW.C0,cf(-1.3,0.5,.2)*euler(1.57,0,-1)*euler(1,0,0),.3)
  1761. RH.C0=clerp(RH.C0,cf(.9,-.9,-.6)*euler(0,1.57,0)*euler(-.1,.6,-.05),.3)
  1762. LH.C0=clerp(LH.C0,cf(-1,-.9,.6)*euler(0,-1.57,0)*euler(0,1,.05),.3)
  1763. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1764. break
  1765. end
  1766. end
  1767. MagicCircle(BrickColor.new(NewCol2),prt56.CFrame,10,10,10,1,1,1,.05,1,nil,nil,0)
  1768. dar=#OOrbs
  1769. table.insert(OOrbs,Orbs[1])
  1770. for i=1,#Orbs do
  1771. table.remove(Orbs,1)
  1772. end
  1773. for i=dar+1,dar+1 do
  1774. OOrbs[i][2].Parent=nil
  1775. OOrbs[i][1].Anchored=true
  1776. OOrbs[i][4].MaxSpeed=100
  1777. OOrbs[i][1].CFrame=RootPart.CFrame*cf(0,5,0)
  1778. table.insert(Effects,{OOrbs[i][1],"Sentry",OOrbs[i][3],0,50})
  1779. end
  1780. for i=0,1,0.1 do
  1781. script.Heartbeat.Event:wait()
  1782. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.4)
  1783. wld1.C0=clerp(wld1.C0,euler(0,1.57,0)*euler(.2,0,0)*cf(0,0,0),.4)
  1784. Neck.C0=clerp(Neck.C0,necko*euler(0,0,1)*euler(0,0,0),.4)
  1785. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.1)*euler(0,0,-1),.4)
  1786. RW.C0=clerp(RW.C0,cf(.8,0.4,.2)*euler(-.6,0,-.9)*euler(0,-.2,0),.4)
  1787. LW.C0=clerp(LW.C0,cf(-1.3,0.5,.2)*euler(-.8,0,-.6)*euler(0,1.8,0)*euler(0,0,0),.4)
  1788. RH.C0=clerp(RH.C0,cf(.9,-.9,-.6)*euler(0,1.57,0)*euler(-.1,.6,-.05),.4)
  1789. LH.C0=clerp(LH.C0,cf(-1,-.9,.6)*euler(0,-1.57,0)*euler(0,1,.05),.4)
  1790. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1791. break
  1792. end
  1793. end
  1794. elseif #Orbs==2 and O2==false then --Protect
  1795. O2=true
  1796. for i=0,1,0.1 do
  1797. script.Heartbeat.Event:wait()
  1798. MagicCircle2(BrickColor.new(NewCol2),cf(prt56.Position)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1,4,1,-.01,1,-.01,.1,.6)
  1799. for i=1,#Orbs do
  1800. MagicBlock(BrickColor.new(NewCol4),cf(Orbs[i][3].Position)*cf(math.random(-100,100)/100,math.random(-100,100)/100,math.random(-100,100)/100)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1.5,1.5,1.5,-.2,-.2,-.2,.2,1)
  1801. end
  1802. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.3)
  1803. wld1.C0=clerp(wld1.C0,cf(0,0,0)*euler(0,1.57,0)*euler(.6,0,0),.3)
  1804. Neck.C0=clerp(Neck.C0,necko*euler(0,0,1.4)*euler(.1,0,0),.3)
  1805. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.1)*euler(0,0,-1),.3)
  1806. RW.C0=clerp(RW.C0,cf(1,0.4,.2)*euler(-.3,0,-1)*euler(0,-.2,0),.3)
  1807. LW.C0=clerp(LW.C0,cf(-1.4,0.5,.1)*euler(2,0,-1.5)*euler(.2,0,0)*euler(0,-.2,0),.3)
  1808. RH.C0=clerp(RH.C0,cf(.9,-.9,-.6)*euler(0,1.57,0)*euler(-.1,.6,-.05),.3)
  1809. LH.C0=clerp(LH.C0,cf(-1,-.9,.6)*euler(0,-1.57,0)*euler(0,1,.05),.3)
  1810. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1811. break
  1812. end
  1813. end
  1814. MagicCircle(BrickColor.new(NewCol2),prt56.CFrame,10,10,10,1,1,1,.05,1,nil,nil,0)
  1815. dar=#OOrbs
  1816. table.insert(OOrbs,Orbs[1])
  1817. table.insert(OOrbs,Orbs[2])
  1818. for i=1,#Orbs do
  1819. table.remove(Orbs,1)
  1820. end
  1821. for i=dar+1,dar+2 do
  1822. OOrbs[i][4].MaxSpeed=500
  1823. --table.insert(Effects,{OOrbs[i][1],"Sentry",OOrbs[i][3],0,50})
  1824. tar1,dis1=findNearestAlly2(RootPart.Position)
  1825. if tar1==nil then
  1826. tar1=Torso
  1827. for i=1,#Protected do
  1828. if Protected[i]==tar1 then
  1829. tar1=nil
  1830. end
  1831. end
  1832. end
  1833. if tar1~=nil then
  1834. table.insert(Protected,tar1)
  1835. OOrbs[i][2].Part1=tar1
  1836. OOrbs[i][2].C0=cf(0,0,0)
  1837. table.insert(Effects,{OOrbs[i][1],"Protect",OOrbs[i][3],0,50,tar1,tar1.Parent})
  1838. else
  1839. MagicCircle(BrickColor.new(NewCol2),cf(OOrbs[i][3].Position),5,5,5,-.5,-.5,-.5,.05,1,nil,nil,0)
  1840. OOrbs[i][1].Parent=nil
  1841. OOrbs[i][3].Parent=nil
  1842. table.remove(OOrbs,i)
  1843. end
  1844. end
  1845. for i=0,1,0.13 do
  1846. script.Heartbeat.Event:wait()
  1847. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.45)
  1848. wld1.C0=clerp(wld1.C0,cf(0,.5,0)*euler(0,1.57,0)*euler(.8,0,0),.45)
  1849. Neck.C0=clerp(Neck.C0,necko*euler(0,0,1)*euler(.2,0,0),.45)
  1850. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.1)*euler(0,0,-1),.45)
  1851. RW.C0=clerp(RW.C0,cf(1,0.4,.2)*euler(-.3,0,-1)*euler(0,-.2,0),.45)
  1852. LW.C0=clerp(LW.C0,cf(-1.4,0.5,.1)*euler(.9,0,-.8)*euler(.2,0,0)*euler(0,-1,0),.45)
  1853. RH.C0=clerp(RH.C0,cf(.9,-.9,-.6)*euler(0,1.57,0)*euler(-.1,.6,-.05),.45)
  1854. LH.C0=clerp(LH.C0,cf(-1,-.9,.6)*euler(0,-1.57,0)*euler(0,1,.05),.45)
  1855. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1856. break
  1857. end
  1858. end
  1859.  
  1860. elseif #Orbs==3 and O3==false then --Seeker
  1861. O3=true
  1862. for i=0,1,0.1 do
  1863. script.Heartbeat.Event:wait()
  1864. MagicCircle2(BrickColor.new(NewCol2),cf(prt56.Position)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1,4,1,-.01,1,-.01,.1,.6)
  1865. for i=1,#Orbs do
  1866. MagicBlock(BrickColor.new(NewCol4),cf(Orbs[i][3].Position)*cf(math.random(-100,100)/100,math.random(-100,100)/100,math.random(-100,100)/100)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1.5,1.5,1.5,-.2,-.2,-.2,.2,1)
  1867. end
  1868. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.3)
  1869. wld1.C0=clerp(wld1.C0,euler(0,1.57,0)*euler(.4,0,0)*cf(0,0,0),.3)
  1870. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.4)*euler(.1,0,0),.3)
  1871. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.1)*euler(0,0,-1),.3)
  1872. RW.C0=clerp(RW.C0,cf(1,0.4,.2)*euler(-.3,0,-1)*euler(0,-.2,0),.3)
  1873. LW.C0=clerp(LW.C0,cf(-1.1,0.5,-.5)*euler(1.57,0,.6)*euler(.2,0,0)*euler(0,-1.4,0),.3)
  1874. RH.C0=clerp(RH.C0,cf(.9,-.9,-.6)*euler(0,1.57,0)*euler(-.1,.6,-.05),.3)
  1875. LH.C0=clerp(LH.C0,cf(-1,-.9,.6)*euler(0,-1.57,0)*euler(0,1,.05),.3)
  1876. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1877. break
  1878. end
  1879. end
  1880. dar=#OOrbs
  1881. table.insert(OOrbs,Orbs[1])
  1882. table.insert(OOrbs,Orbs[2])
  1883. table.insert(OOrbs,Orbs[3])
  1884. for i=1,#Orbs do
  1885. table.remove(Orbs,1)
  1886. end
  1887. for i=dar+1,dar+3 do
  1888. OOrbs[i][1].Anchored=true
  1889. OOrbs[i][2].Parent=nil
  1890. OOrbs[i][3].Anchored=true
  1891. OOrbs[i][4].MaxSpeed=500
  1892. OOrbs[i][4].Parent=nil
  1893. bleh=MMouse.Hit.p+vt(math.random(-500,500)/100,math.random(-500,500)/100,math.random(-500,500)/100)
  1894. local MouseLook=cf((OOrbs[i][3].Position+bleh)/2,bleh)
  1895. local targ=OOrbs[i][3].Position-bleh
  1896. local mag=(targ.magnitude/5)*math.random(80,120)/100
  1897. if mag>50 then
  1898. mag=50
  1899. end
  1900. so("377357731",OOrbs[i][1],1,1.4)
  1901. --table.insert(Effects,{MouseLook.lookVector,"Shoot",mag,OOrbs[i][3].Position,7,9,OOrbs[i][3],OOrbs[i][1]})
  1902. table.insert(Effects,{MouseLook.lookVector,"ShootSeek",mag,OOrbs[i][1],OOrbs[i][2],OOrbs[i][3],OOrbs[i][4],OOrbs[i][3].Position,4,6})
  1903.  
  1904. end
  1905. for i=0,1,0.05 do
  1906. script.Heartbeat.Event:wait()
  1907. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.4)
  1908. wld1.C0=clerp(wld1.C0,cf(0,-.5,0)*euler(0,1.57,0)*euler(1,0,0),.4)
  1909. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-.2)*euler(.05,0,0),.4)
  1910. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.1)*euler(0,0,.2),.4)
  1911. if i<.4 then
  1912. RootJoint.C1=clerp(RootJoint.C1,RootCF*euler(0,0,-15*i),.4)
  1913. else
  1914. RootJoint.C1=clerp(RootJoint.C1,RootCF,.4)
  1915. end
  1916. RW.C0=clerp(RW.C0,cf(1,0.4,.2)*euler(-.3,0,-1)*euler(0,-.2,0),.4)
  1917. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.57,0,-1.3)*euler(-.2,0,0)*euler(0,-1.4,0),.4)
  1918. RH.C0=clerp(RH.C0,cf(1.1,-.9,-.1)*euler(0,1.57,0)*euler(0,-.2,.1),.4)
  1919. LH.C0=clerp(LH.C0,cf(-1,-.9,-.2)*euler(0,-1.57,0)*euler(-.1,-.2,.1),.4)
  1920. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1921. break
  1922. end
  1923. end
  1924. elseif #Orbs==4 and O4==false then --Energy Shield
  1925. O4=true
  1926. for i=0,1,0.1 do
  1927. script.Heartbeat.Event:wait()
  1928. MagicCircle2(BrickColor.new(NewCol2),cf(prt56.Position)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1,4,1,-.01,1,-.01,.1,.6)
  1929. for i=1,#Orbs do
  1930. MagicBlock(BrickColor.new(NewCol4),cf(Orbs[i][3].Position)*cf(math.random(-100,100)/100,math.random(-100,100)/100,math.random(-100,100)/100)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1.5,1.5,1.5,-.2,-.2,-.2,.2,1)
  1931. end
  1932. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.3)
  1933. wld1.C0=clerp(wld1.C0,euler(0,1.57,0)*euler(-.2,0,0)*cf(0,0,0),.3)
  1934. Neck.C0=clerp(Neck.C0,necko*euler(0,0,1)*euler(.1,0,0),.3)
  1935. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.1)*euler(0,0,-1),.3)
  1936. RW.C0=clerp(RW.C0,cf(1,0.4,.2)*euler(-.3,0,-1)*euler(0,-.2,0),.3)
  1937. LW.C0=clerp(LW.C0,cf(-1.3,0.5,.2)*euler(1.57,0,-1)*euler(1,0,0),.3)
  1938. RH.C0=clerp(RH.C0,cf(.9,-.9,-.6)*euler(0,1.57,0)*euler(-.1,.6,-.05),.3)
  1939. LH.C0=clerp(LH.C0,cf(-1,-.9,.6)*euler(0,-1.57,0)*euler(0,1,.05),.3)
  1940. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1941. break
  1942. end
  1943. end
  1944. for i=0,1,0.13 do
  1945. script.Heartbeat.Event:wait()
  1946. MagicCircle2(BrickColor.new(NewCol2),cf(prt56.Position)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1,4,1,-.01,1,-.01,.1,.6)
  1947. for i=1,#Orbs do
  1948. MagicBlock(BrickColor.new(NewCol4),cf(Orbs[i][3].Position)*cf(math.random(-100,100)/100,math.random(-100,100)/100,math.random(-100,100)/100)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1.5,1.5,1.5,-.2,-.2,-.2,.2,1)
  1949. end
  1950. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.5)
  1951. wld1.C0=clerp(wld1.C0,euler(0,1.57,0)*euler(-.1,0,0)*cf(0,0,0),.5)
  1952. Neck.C0=clerp(Neck.C0,necko*euler(0,0,1)*euler(.2,0,0),.5)
  1953. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.1)*euler(0,0,-1),.5)
  1954. RW.C0=clerp(RW.C0,cf(1,0.4,.2)*euler(-.3,0,-1)*euler(0,-.2,0),.5)
  1955. LW.C0=clerp(LW.C0,cf(-1.3,0.5,.2)*euler(1.57,0,-1)*euler(-.1,0,0),.5)
  1956. RH.C0=clerp(RH.C0,cf(.9,-.9,-.6)*euler(0,1.57,0)*euler(-.1,.6,-.05),.5)
  1957. LH.C0=clerp(LH.C0,cf(-1,-.9,.6)*euler(0,-1.57,0)*euler(0,1,.05),.5)
  1958. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1959. break
  1960. end
  1961. end
  1962. MagicCircle(BrickColor.new(NewCol2),prt56.CFrame,10,10,10,1,1,1,.05,1,nil,nil,0)
  1963. shieldref.Parent=workspace
  1964. shieldref.Transparency=1
  1965. shieldref.CFrame=cf(RootPart.Position)*cf(0,-1,0)
  1966. shieldref2.Parent=workspace
  1967. shieldref2.Transparency=1
  1968. shieldref2.CFrame=cf(shieldref.Position)*cf(0,2.5,0)
  1969. table.insert(Effects,{shieldref2,"ShieldEf"})
  1970. srefmsh.Scale=vt(4,5,4)
  1971. dar=#OOrbs
  1972. table.insert(OOrbs,Orbs[1])
  1973. table.insert(OOrbs,Orbs[2])
  1974. table.insert(OOrbs,Orbs[3])
  1975. table.insert(OOrbs,Orbs[4])
  1976. for i=1,#Orbs do
  1977. table.remove(Orbs,1)
  1978. end
  1979. --table.insert(Orbs,{omain,owld,oprt1,prop})
  1980. teh=0
  1981. for i=dar+1,dar+4 do
  1982. OOrbs[i][1].Anchored=true
  1983. OOrbs[i][2].Parent=nil
  1984. OOrbs[i][4].MaxSpeed=100
  1985. OOrbs[i][1].CFrame=shieldref.CFrame*euler(0,teh,0)*cf(0,0,20)
  1986. teh=teh+1.57
  1987. end
  1988. table.insert(Effects,{shieldref,"Shield",50,shieldref2})
  1989.  
  1990. end
  1991. attack=false
  1992. end
  1993. end
  1994.  
  1995. function do2()
  1996. if attack==true then return end
  1997. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then return end
  1998. if cooldowns[2]>=cooldownmax and mana.Value>=20 then
  1999. --if true then
  2000. attack=true
  2001. cooldowns[2]=0
  2002. mana.Value=mana.Value-20
  2003.  
  2004. local dec=Instance.new("NumberValue",Decrease)
  2005. dec.Name="DecreaseMvmt"
  2006. dec.Value=10
  2007. ref2=part(3,nil,0,1,BrickColor.new("Black"),"Reference",vt())
  2008. ref2.Anchored=true
  2009. for i=0,1,0.1 do
  2010. script.Heartbeat.Event:wait()
  2011. ref2.CFrame=cf(prt18.Position)*cf(math.random(-500,500)/100,0,math.random(-500,500)/100)
  2012. hitfloor2,posfloor2=rayCast(ref2.Position,(CFrame.new(ref2.Position,ref2.Position - Vector3.new(0,1,0))).lookVector,50,Character)
  2013. if hitfloor2~=nil then
  2014. Lightning(prt18.Position,posfloor2,5,1,NewCol2,.1,.4,.1)
  2015. end
  2016. MagicCircle(BrickColor.new(NewCol2),cf(prt18.Position),6,6,6,-1,-1,-1,.05,1,nil,nil,.5)
  2017. MagicBlock(BrickColor.new(NewCol2),cf(prt18.Position)*cf(math.random(-200,200)/100,math.random(-200,200)/100,math.random(-200,200)/100)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),2,2,2,-.5,-.5,-.5,.1,2)
  2018. wld23.C0=clerp(wld23.C0,euler(0,math.rad(60),0)*cf(-.045,0,0),.45)
  2019. wld27.C0=clerp(wld27.C0,euler(0,math.rad(60),3.14)*cf(.045,0,0),.45)
  2020. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.3)
  2021. wld1.C0=clerp(wld1.C0,euler(0,1.57,0)*euler(.6,0,0)*cf(0,0,0),.3)
  2022. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.2)*euler(.2,0,0),.3)
  2023. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.1)*euler(0,0,-.2),.3)
  2024. RW.C0=clerp(RW.C0,cf(.8,0.4,.2)*euler(-.6,0,-.9)*euler(0,-.2,0),.4)
  2025. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(2.5,0,-.2),.3)
  2026. RH.C0=clerp(RH.C0,cf(1.1,-.9,.2)*euler(0,1.57,0)*euler(-.1,-.4,-.05),.3)
  2027. LH.C0=clerp(LH.C0,cf(-1,-.9,-.1)*euler(0,-1.57,0)*euler(0,.2,.05),.3)
  2028. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  2029. break
  2030. end
  2031. end
  2032. so("315743331",prt18,1,2)
  2033. for i=0,1,0.2 do
  2034. script.Heartbeat.Event:wait()
  2035. ref2.CFrame=cf(prt18.Position)*cf(math.random(-500,500)/100,0,math.random(-500,500)/100)
  2036. hitfloor2,posfloor2=rayCast(ref2.Position,(CFrame.new(ref2.Position,ref2.Position - Vector3.new(0,1,0))).lookVector,50,Character)
  2037. if hitfloor2~=nil then
  2038. Lightning(prt18.Position,posfloor2,5,1,NewCol2,.1,.4,.1)
  2039. end
  2040. MagicCircle(BrickColor.new(NewCol2),cf(prt18.Position),6,6,6,-1,-1,-1,.05,1,nil,nil,.5)
  2041. MagicBlock(BrickColor.new(NewCol2),cf(prt18.Position)*cf(math.random(-200,200)/100,math.random(-200,200)/100,math.random(-200,200)/100)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),2,2,2,-.5,-.5,-.5,.1,2)
  2042. wld23.C0=clerp(wld23.C0,euler(0,math.rad(60),0)*cf(-.045,0,0),.45)
  2043. wld27.C0=clerp(wld27.C0,euler(0,math.rad(60),3.14)*cf(.045,0,0),.45)
  2044. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.45)
  2045. wld1.C0=clerp(wld1.C0,cf(0,-.7,0)*euler(0,1.57,0)*euler(0,0,0),.45)
  2046. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.2)*euler(.3,0,0),.45)
  2047. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-1)*euler(0,0,-.2),.45)
  2048. RW.C0=clerp(RW.C0,cf(.8,0.4,.2)*euler(-.6,0,-.9)*euler(0,-.2,0),.4)
  2049. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.57,0,-.2),.45)
  2050. RH.C0=clerp(RH.C0,cf(1.1,-.2,-.1)*euler(0,1.57,0)*euler(-.1,-.4,-.3),.45)
  2051. LH.C0=clerp(LH.C0,cf(-1,-.1,-.2)*euler(0,-1.57,0)*euler(0,.2,.1),.45)
  2052. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  2053. break
  2054. end
  2055. end
  2056. shieldref.Parent=nil
  2057. table.insert(Effects,{shieldref2,"Cylinder",0.05,.1,.1,.1,srefmsh})
  2058. O1=false
  2059. O2=false
  2060. O3=false
  2061. O4=false
  2062. for i=1,#OOrbs do
  2063. ref=part(3,workspace,0,1,BrickColor.new("Really red"),"Reference",vt(0.2,0.2,0.2))
  2064. ref.Anchored=true
  2065. ref.CFrame=cf(OOrbs[1][3].Position)
  2066. so("161006093",ref,1,1.8)
  2067. game:GetService("Debris"):AddItem(ref,.2)
  2068. MagicCircle(BrickColor.new(NewCol2),cf(OOrbs[1][3].Position),10,10,10,5,5,5,0.07)
  2069. dra=math.random(-50,50)
  2070. for i=.785,6.28,.785 do
  2071. MagicCircle2(BrickColor.new(NewCol2),cf(OOrbs[1][3].Position)*euler(dra,0,i),4,5,4,-.02,2,-.02,.05,.8)
  2072. end
  2073. MagniDamage(ref,15,10,12,0,"Normal",ref,0,1,math.random(3,5),nil,nil,true)
  2074. MagniHeal(ref,10,4,6)
  2075. OOrbs[1][1].Parent=nil
  2076. OOrbs[1][3].Parent=nil
  2077. table.remove(OOrbs,1)
  2078. end
  2079. for i=1,#Protected do
  2080. table.remove(Protected,1)
  2081. end
  2082.  
  2083. for i=0,1,0.15 do
  2084. script.Heartbeat.Event:wait()
  2085. ref2.CFrame=cf(prt18.Position)*cf(math.random(-500,500)/100,0,math.random(-500,500)/100)
  2086. hitfloor2,posfloor2=rayCast(ref2.Position,(CFrame.new(ref2.Position,ref2.Position - Vector3.new(0,1,0))).lookVector,50,Character)
  2087. if hitfloor2~=nil then
  2088. Lightning(prt18.Position,posfloor2,5,1,NewCol2,.1,.4,.1)
  2089. end
  2090. MagicCircle(BrickColor.new(NewCol2),cf(prt18.Position),6,6,6,-1,-1,-1,.05,1,nil,nil,.5)
  2091. MagicBlock(BrickColor.new(NewCol2),cf(prt18.Position)*cf(math.random(-200,200)/100,math.random(-200,200)/100,math.random(-200,200)/100)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),2,2,2,-.5,-.5,-.5,.1,2)
  2092. wld23.C0=clerp(wld23.C0,euler(0,math.rad(60),0)*cf(-.045,0,0),.45)
  2093. wld27.C0=clerp(wld27.C0,euler(0,math.rad(60),3.14)*cf(.045,0,0),.45)
  2094. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.45)
  2095. wld1.C0=clerp(wld1.C0,cf(0,-.7,0)*euler(0,1.57,0)*euler(0,0,0),.45)
  2096. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.2)*euler(.3,0,0),.45)
  2097. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-1)*euler(0,0,-.2),.45)
  2098. RW.C0=clerp(RW.C0,cf(.8,0.4,.2)*euler(-.6,0,-.9)*euler(0,-.2,0),.4)
  2099. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.57,0,-.2),.45)
  2100. RH.C0=clerp(RH.C0,cf(1.1,-.2,-.1)*euler(0,1.57,0)*euler(-.1,-.4,-.3),.45)
  2101. LH.C0=clerp(LH.C0,cf(-1,-.1,-.2)*euler(0,-1.57,0)*euler(0,.2,.1),.45)
  2102. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  2103. break
  2104. end
  2105. end
  2106. dec.Parent=nil
  2107. attack=false
  2108. for i=0,1,0.1 do
  2109. script.Heartbeat.Event:wait()
  2110. wld23.C0=clerp(wld23.C0,euler(0,math.rad(0),0)*cf(-.045,0,0),.45)
  2111. wld27.C0=clerp(wld27.C0,euler(0,math.rad(0),3.14)*cf(.045,0,0),.45)
  2112. end
  2113. wld23.C0=clerp(wld23.C0,euler(0,math.rad(0),0)*cf(-.045,0,0),1)
  2114. wld27.C0=clerp(wld27.C0,euler(0,math.rad(0),3.14)*cf(.045,0,0),1)
  2115. end
  2116. end
  2117.  
  2118. function do3()
  2119. if attack==true then return end
  2120. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then return end
  2121. if cooldowns[3]>=cooldownmax and mana.Value>=20 then
  2122. --if true then
  2123. attack=true
  2124. cooldowns[3]=0
  2125. mana.Value=mana.Value-20
  2126. for i=0,1,0.1 do
  2127. script.Heartbeat.Event:wait()
  2128. MagicBlock(BrickColor.new(NewCol2),RightArm.CFrame*cf(0,-1,0)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))*cf(0,-2,0),2,2,2,-.5,-.5,-.5,.1,3)
  2129. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.3)
  2130. wld1.C0=clerp(wld1.C0,euler(0,0,0)*cf(0,0,0),.3)
  2131. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.4)*euler(.2,0,0),.3)
  2132. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.1)*euler(0,0,-.8),.3)
  2133. RW.C0=clerp(RW.C0,cf(1.3,0.5,-.2)*euler(1.2,0,-.6)*euler(0,0,0),.3)
  2134. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(.3,0,-.8)*euler(0,.4,0),.3)
  2135. RH.C0=clerp(RH.C0,cf(1.1,-.9,-.4)*euler(0,1.57,0)*euler(-.1,.2,-.05),.3)
  2136. LH.C0=clerp(LH.C0,cf(-.9,-.9,.4)*euler(0,-1.57,0)*euler(0,.8,.05),.3)
  2137. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  2138. break
  2139. end
  2140. end
  2141. so("315743331",RightArm,1,1.6)
  2142. so("315743350",RightArm,1,1.6)
  2143. for i=1,0,-0.05 do
  2144. script.Heartbeat.Event:wait()
  2145. hitbox.CFrame=RightArm.CFrame*cf(0,-1,0)
  2146. smite=true
  2147. MagniDamage(hitbox,10,9,9,13,"Normal",RootPart,1,2,math.random(3,5),nil,true)
  2148. smite=false
  2149. if Rooted.Value==false then Torso.Velocity=RootPart.CFrame.lookVector*80*i end
  2150. MagicCircle(BrickColor.new(NewCol2),RightArm.CFrame*cf(0,-1,0),15,15,15,-2,-2,-2,.05,1,nil,nil,.5)
  2151. MagicBlock(BrickColor.new(NewCol2),RightArm.CFrame*cf(0,-1,0)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))*cf(0,-2,0),2,2,2,-.5,-.5,-.5,.1,3)
  2152. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.5)
  2153. wld1.C0=clerp(wld1.C0,euler(-.4,0,0)*cf(0,0,0),.5)
  2154. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-.8)*euler(0,0,0),.5)
  2155. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.1)*euler(0,0,.8),.5)
  2156. RW.C0=clerp(RW.C0,cf(1.3,0.5,-.2)*euler(1.5,0,.8)*euler(0,0,0),.5)
  2157. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.4,0,-.8)*euler(0,.2,0),.5)
  2158. RH.C0=clerp(RH.C0,cf(1.1,-.9,.4)*euler(0,1.57,0)*euler(-.1,-1,.1),.5)
  2159. LH.C0=clerp(LH.C0,cf(-.9,-.9,-.4)*euler(0,-1.57,0)*euler(0,-.8,.1),.5)
  2160. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true or smtarget~=nil then
  2161. break
  2162. end
  2163. end
  2164. if smtarget~=nil then
  2165. if Rooted.Value==false then Torso.Velocity=RootPart.CFrame.lookVector*-80 end
  2166. for i=0,1,0.1 do
  2167. script.Heartbeat.Event:wait()
  2168. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.3)
  2169. wld1.C0=clerp(wld1.C0,euler(0,0,0)*cf(0,0,0),.3)
  2170. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.4)*euler(.2,0,0),.3)
  2171. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.1)*euler(0,0,-.8),.3)
  2172. RW.C0=clerp(RW.C0,cf(1.3,0.5,-.2)*euler(1,0,1)*euler(0,0,0),.3)
  2173. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(.3,0,-.8)*euler(0,.4,0),.3)
  2174. RH.C0=clerp(RH.C0,cf(1.1,-.9,-.4)*euler(0,1.57,0)*euler(-.1,.2,-.05),.3)
  2175. LH.C0=clerp(LH.C0,cf(-.9,-.9,.4)*euler(0,-1.57,0)*euler(0,.8,.05),.3)
  2176. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  2177. break
  2178. end
  2179. end
  2180. end
  2181. smite=false
  2182. smtarget=nil
  2183. attack=false
  2184. end
  2185. end
  2186.  
  2187. function do4()
  2188. if attack==true then return end
  2189. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then return end
  2190. --if cooldowns[4]>=cooldownmax and mana.Value>=50 then
  2191. if true then
  2192. attack=true
  2193. cooldowns[4]=0
  2194. --mana.Value=mana.Value-50
  2195.  
  2196. attack=false
  2197. end
  2198. end
  2199.  
  2200. function DecreaseStat(Model,Stat,Amount,Duration)
  2201. if Model:findFirstChild("Stats")~=nil then
  2202. if Model.Stats[Stat]~=nil then
  2203. Model.Stats[Stat].Value=Model.Stats[Stat].Value-Amount
  2204. d=Instance.new("NumberValue",Model.Stats.Decrease)
  2205. dur=Instance.new("NumberValue",d)
  2206. dur.Name="Duration"
  2207. dur.Value=Duration
  2208. game:GetService("Debris"):AddItem(d,20)
  2209. if Stat=="Damage" then
  2210. d.Name="DecreaseAtk"
  2211. elseif Stat=="Defense" then
  2212. d.Name="DecreaseDef"
  2213. elseif Stat=="Movement" then
  2214. d.Name="DecreaseMvmt"
  2215. end
  2216. if Model:findFirstChild("Torso")~=nil then
  2217. display=""
  2218. if Stat=="Damage" then
  2219. if Amount>0 then
  2220. display="-Damage"
  2221. else
  2222. display="+Damage"
  2223. end
  2224. elseif Stat=="Defense" then
  2225. if Amount>0 then
  2226. display="-Defense"
  2227. else
  2228. display="+Defense"
  2229. end
  2230. elseif Stat=="Movement" then
  2231. if Amount>0 then
  2232. display="-Movement"
  2233. else
  2234. display="+Movement"
  2235. end
  2236. end
  2237. showDamage(Model,display,"Debuff")
  2238. end
  2239. d.Value=Amount
  2240. end
  2241. end
  2242. end
  2243.  
  2244. function GetDist(Part1,Part2,magni)
  2245. local targ=Part1.Position-Part2.Position
  2246. local mag=targ.magnitude
  2247. if mag<=magni then
  2248. return true
  2249. else
  2250. return false
  2251. end
  2252. end
  2253.  
  2254. --[[local magref=part(3,effects,0,.5,BrickColor.new("Black"),"Effect",vt())
  2255. magref.Anchored=true
  2256. magref.CFrame=cf(0,0,0)
  2257. local mrmsh=mesh("SpecialMesh",magref,"Sphere","nil",vt(0,0,0),vt(1,1,1))]]
  2258.  
  2259. function MagniDamage(Part,magni,minim,maxim,knockback,Type,Property,Delay,KnockbackType,incstun,stagger,staghit,ranged,DecreaseState,DecreaseAmount,Duration)
  2260. --magref.CFrame=cf(Part.Position)
  2261. --mrmsh.Scale=vt(magni*10,magni*10,magni*10)
  2262. for _,c in pairs(workspace:children()) do
  2263. local hum=c:findFirstChild("Humanoid")
  2264. if hum~=nil then
  2265. local head=nil
  2266. for _,d in pairs(c:children()) do
  2267. --if d.Name=="Torso" or d.Name=="Head" or d.Name=="HumanoidRootPart" or d.Name=="HitPart" then
  2268. if d.className=="Model" and ranged~=true then
  2269. head=d:findFirstChild("Hitbox")
  2270. if d.Parent==Character then break end
  2271. if head~=nil then
  2272. local targ=head.Position-Part.Position
  2273. local mag=targ.magnitude
  2274. if mag<=magni and c.Name~=Player.Name then
  2275. ref=part(3,workspace,0,1,BrickColor.new("Black"),"Reference",vt())
  2276. ref.Anchored=true
  2277. ref.CFrame=cf(head.Position)
  2278. game:GetService("Debris"):AddItem(ref,1)
  2279. hitnum=math.random(1,5)
  2280. if hitnum==1 then so("199148971",ref,1,1)
  2281. elseif hitnum==2 then so("199149025",ref,1,1)
  2282. elseif hitnum==3 then so("199149072",ref,1,1)
  2283. elseif hitnum==4 then so("199149109",ref,1,1)
  2284. elseif hitnum==5 then so("199149119",ref,1,1)
  2285. end
  2286. StaggerHit.Value=true
  2287. end
  2288. end
  2289. end
  2290. if d.className=="Part" then
  2291. head=d
  2292. if head~=nil then
  2293. local targ=head.Position-Part.Position
  2294. local mag=targ.magnitude
  2295. if mag<=magni and c.Name~=Player.Name then
  2296. if stun==nil then
  2297. stun=math.random(5,10)
  2298. end
  2299. local Rang=nil
  2300. if Ranged==false then
  2301. Rang=true
  2302. end
  2303. local stag=nil
  2304. if shbash==true then
  2305. stag=true
  2306. end
  2307. Damagefunc(head,minim,maxim,knockback,Type,Property,Delay,KnockbackType,incstun,stagger,staghit,ranged,DecreaseState,DecreaseAmount,Duration)
  2308. --Damagefunc(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,incstun,stagger,staghit,DecreaseState,DecreaseAmount,Duration)
  2309. end
  2310. end
  2311. end
  2312. end
  2313. end
  2314. end
  2315. end
  2316.  
  2317. function MagniBuff(Part,magni,Dec,DecAm,Dur)
  2318. if Player.Neutral==true then
  2319. DecreaseStat(Character,Dec,DecAm,Dur)
  2320. end
  2321. for _,c in pairs(workspace:children()) do
  2322. local hum=c:findFirstChild("Humanoid")
  2323. if hum~=nil then
  2324. local head=c:findFirstChild("Torso")
  2325. if head~=nil then
  2326. local targ=head.Position-Part.Position
  2327. local mag=targ.magnitude
  2328. cando=true
  2329. if mag<=magni then
  2330. if Player.Neutral==false then
  2331. if game.Players:GetPlayerFromCharacter(head.Parent)~=nil then
  2332. if game.Players:GetPlayerFromCharacter(head.Parent).TeamColor==Player.TeamColor then cando=true else cando=false end
  2333. else cando=false
  2334. end
  2335. if head.Parent:findFirstChild("Alignment")~=nil then
  2336. if head.Parent.Alignment.Value==Player.TeamColor.Color then cando=true end
  2337. end
  2338. else cando=false
  2339. end
  2340. if cando==true then
  2341. DecreaseStat(head.Parent,Dec,DecAm,Dur)
  2342. end
  2343. end
  2344. end
  2345. end
  2346. end
  2347. end
  2348.  
  2349. function MagniDebuff(Part,magni,Dec,DecAm,Dur)
  2350. for _,c in pairs(workspace:children()) do
  2351. local hum=c:findFirstChild("Humanoid")
  2352. if hum~=nil then
  2353. local head=c:findFirstChild("Torso")
  2354. if head~=nil then
  2355. local targ=head.Position-Part.Position
  2356. local mag=targ.magnitude
  2357. if mag<=magni and c.Name~=Player.Name then
  2358. if game.Players:GetPlayerFromCharacter(head.Parent)~=nil then
  2359. if game.Players:GetPlayerFromCharacter(head.Parent).TeamColor~=Player.TeamColor or Player.Neutral==true then
  2360. DecreaseStat(head.Parent,Dec,DecAm,Dur)
  2361. end
  2362. else
  2363. DecreaseStat(head.Parent,Dec,DecAm,Dur)
  2364. end
  2365. end
  2366. end
  2367. end
  2368. end
  2369. end
  2370.  
  2371. function MagniHeal(Part,magni,mindam,maxdam)
  2372. for _,c in pairs(workspace:children()) do
  2373. local hum=c:findFirstChild("Humanoid")
  2374. if hum~=nil then
  2375. local head=c:findFirstChild("Torso")
  2376. if head~=nil then
  2377. local targ=head.Position-Part.Position
  2378. local mag=targ.magnitude
  2379. --if game.Players:GetPlayerFromCharacter(c)~=nil then
  2380. local cando=true
  2381. if mag<=magni then
  2382. --[[if Player.Neutral==false then
  2383. if game.Players:GetPlayerFromCharacter(hit.Parent).TeamColor==Player.TeamColor then return end
  2384. end]]
  2385. --if Player.Neutral==false then
  2386. if game.Players:GetPlayerFromCharacter(head.Parent)~=nil then
  2387. if game.Players:GetPlayerFromCharacter(head.Parent).TeamColor==Player.TeamColor then cando=true else cando=false end
  2388. else cando=false
  2389. end
  2390. if head.Parent:findFirstChild("Alignment")~=nil then
  2391. if head.Parent.Alignment.Value==Player.TeamColor.Color then cando=true end
  2392. end
  2393. --else cando=false
  2394. --end
  2395. if cando==true then
  2396. Heal=math.random(mindam,maxdam)
  2397. if c.Parent==Character then
  2398. Heal=math.floor(math.random(mindam/2,maxdam/2))
  2399. end
  2400. hum.Health=hum.Health+Heal
  2401. showDamage(c,Heal,"Heal")
  2402. end
  2403. --end
  2404. end
  2405. end
  2406. end
  2407. end
  2408. end
  2409.  
  2410. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  2411. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  2412. end
  2413.  
  2414. function findNearestTorso(pos)
  2415. local list = game.Workspace:children()
  2416. local torso = nil
  2417. local dist = 1000
  2418. local temp = nil
  2419. local human = nil
  2420. local temp2 = nil
  2421. for x = 1, #list do
  2422. temp2 = list[x]
  2423. if (temp2.className == "Model") and (temp2.Name~=Character.Name) then
  2424. --temp = temp2:findFirstChild("Torso")
  2425. temp = temp2:findFirstChild("Torso")
  2426. human = temp2:findFirstChild("Humanoid")
  2427. if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  2428. if (temp.Position - pos).magnitude < dist then
  2429. local dohit=true
  2430. if temp2:findFirstChild("Alive")==nil then dohit=false end
  2431. if Player.Neutral==false and game.Players:GetPlayerFromCharacter(temp.Parent)~=nil then
  2432. if game.Players:GetPlayerFromCharacter(temp.Parent).TeamColor==Player.TeamColor then dohit=false end
  2433. end
  2434. if Player.Neutral==false then
  2435. if temp2:findFirstChild("Alignment")~=nil then
  2436. if temp2.Alignment.Value==Player.TeamColor.Color then dohit=false end
  2437. end
  2438. end
  2439. if dohit==true then
  2440. torso = temp
  2441. dist = (temp.Position - pos).magnitude
  2442. end
  2443. end
  2444. end
  2445. end
  2446. end
  2447. return torso,dist
  2448. end
  2449.  
  2450. function findNearestAlly(pos)
  2451. local list = game.Workspace:children()
  2452. local torso = nil
  2453. local dist = 1000
  2454. local temp = nil
  2455. local human = nil
  2456. local temp2 = nil
  2457. for x = 1, #list do
  2458. temp2 = list[x]
  2459. if (temp2.className == "Model") and (temp2.Name~=Character.Name) then
  2460. --temp = temp2:findFirstChild("Torso")
  2461. temp = temp2:findFirstChild("Torso")
  2462. human = temp2:findFirstChild("Humanoid")
  2463. if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  2464. if (temp.Position - pos).magnitude < dist then
  2465. local dohit=false
  2466. if temp2:findFirstChild("Alive")==nil then dohit=false end
  2467. if Player.Neutral==false and game.Players:GetPlayerFromCharacter(temp.Parent)~=nil then
  2468. if game.Players:GetPlayerFromCharacter(temp.Parent).TeamColor==Player.TeamColor then dohit=true end
  2469. end
  2470. if Player.Neutral==false then
  2471. if temp2:findFirstChild("Alignment")~=nil then
  2472. if temp2.Alignment.Value==Player.TeamColor.Color then dohit=true end
  2473. end
  2474. end
  2475. if dohit==true then
  2476. torso = temp
  2477. dist = (temp.Position - pos).magnitude
  2478. end
  2479. end
  2480. end
  2481. end
  2482. end
  2483. return torso,dist
  2484. end
  2485.  
  2486. function findNearestAlly2(pos)
  2487. local list = game.Workspace:children()
  2488. local torso = nil
  2489. local dist = 1000
  2490. local temp = nil
  2491. local human = nil
  2492. local temp2 = nil
  2493. for x = 1, #list do
  2494. temp2 = list[x]
  2495. if (temp2.className == "Model") and (temp2.Name~=Character.Name) then
  2496. --temp = temp2:findFirstChild("Torso")
  2497. temp = temp2:findFirstChild("Torso")
  2498. human = temp2:findFirstChild("Humanoid")
  2499. if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  2500. if (temp.Position - pos).magnitude < dist then
  2501. local dohit=false
  2502. if temp2:findFirstChild("Alive")==nil then dohit=false end
  2503. if Player.Neutral==false and game.Players:GetPlayerFromCharacter(temp.Parent)~=nil then
  2504. if game.Players:GetPlayerFromCharacter(temp.Parent).TeamColor==Player.TeamColor then dohit=true end
  2505. end
  2506. if Player.Neutral==false then
  2507. if temp2:findFirstChild("Alignment")~=nil then
  2508. if temp2.Alignment.Value==Player.TeamColor.Color then dohit=true end
  2509. end
  2510. end
  2511. for i=1,#Protected do
  2512. if Protected[i]==temp then
  2513. dohit=false
  2514. end
  2515. end
  2516. if dohit==true then
  2517. torso = temp
  2518. dist = (temp.Position - pos).magnitude
  2519. end
  2520. end
  2521. end
  2522. end
  2523. end
  2524. return torso,dist
  2525. end
  2526.  
  2527. local Point=Torso.CFrame*cf(0,Torso.Size.Y,0)
  2528. LastPoint=Point
  2529. function effect(Color,Ref,LP,P1,returnn,size,thing1)
  2530. if LP==nil or P1==nil then return end
  2531. local effectsmsh=Instance.new("SpecialMesh")
  2532. effectsmsh.Scale=Vector3.new(0.2,1,0.2)
  2533. effectsmsh.MeshType="Head"
  2534. effectsmsh.Name="Mesh"
  2535. local effectsg=Instance.new("Part")
  2536. NoOutline(effectsg)
  2537. effectsg.formFactor=3
  2538. effectsg.CanCollide=false
  2539. effectsg.Name="Eff"
  2540. effectsg.Locked=true
  2541. effectsg.Anchored=true
  2542. effectsg.Size=Vector3.new(0.5,1,0.5)
  2543. effectsg.Parent=effects
  2544. effectsmsh.Parent=effectsg
  2545. effectsg.BrickColor=BrickColor.new(Color)
  2546. effectsg.Reflectance=Ref
  2547. local point1=P1
  2548. local mg=(LP.p - point1.p).magnitude
  2549. effectsg.Size=Vector3.new(0.5,mg,0.5)
  2550. effectsg.CFrame=cf((LP.p+point1.p)/2,point1.p) * CFrame.Angles(math.rad(90),0,0)
  2551. effectsmsh.Scale=Vector3.new(size,1,size)
  2552. game:GetService("Debris"):AddItem(effectsg,2)
  2553. if returnn then return effectsg end
  2554. if not returnn then
  2555. if thing1==1 then
  2556. table.insert(Effects,{effectsg,"Cylinder",0.05,.2,0,.2,effectsmsh})
  2557. else
  2558. table.insert(Effects,{effectsg,"Cylinder",0.2,0.01,0,0.01,effectsmsh})
  2559. end
  2560. end
  2561. end
  2562.  
  2563. function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,Type)
  2564. local prt=part(3,effects,0,0,brickcolor,"Effect",vt(0.2,0.2,0.2))
  2565. prt.Anchored=true
  2566. prt.CFrame=cframe
  2567. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  2568. game:GetService("Debris"):AddItem(prt,10)
  2569. if Type==1 or Type==nil then
  2570. table.insert(Effects,{prt,"Block1",delay,x3,y3,z3,msh})
  2571. elseif Type==2 then
  2572. table.insert(Effects,{prt,"Block2",delay,x3,y3,z3,msh})
  2573. elseif Type==3 then
  2574. table.insert(Effects,{prt,"Block3",delay,x3,y3,z3,msh,prt.CFrame,math.random(10,50)/100})
  2575. end
  2576. end
  2577.  
  2578. function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,Type,prt2,par,trans)
  2579. local prt=part(3,effects,0,trans,brickcolor,"Effect",vt(0.2,0.2,0.2))
  2580. local wld=nil
  2581. prt.Anchored=true
  2582. prt.CFrame=cframe
  2583. if par~=nil then
  2584. prt.Parent=par
  2585. end
  2586. if Type~=3 then
  2587. prt.Anchored=true
  2588. else
  2589. prt.Anchored=false
  2590. wld=weld(prt,prt,prt2,cframe)
  2591. end
  2592. local msh=mesh("SpecialMesh",prt,"Sphere","nil",vt(0,0,0),vt(x1,y1,z1))
  2593. game:GetService("Debris"):AddItem(prt,10)
  2594. if Type~=3 then
  2595. table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
  2596. else
  2597. table.insert(Effects,{prt,"Block4",delay,x3,y3,z3,msh,wld,cframe})
  2598. end
  2599. end
  2600.  
  2601. function MagicCircle2(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,push)
  2602. local prt=part(3,effects,0,0,brickcolor,"Effect",vt(0.2,0.2,0.2))
  2603. prt.Anchored=true
  2604. prt.CFrame=cframe
  2605. local msh=mesh("SpecialMesh",prt,"Sphere","nil",vt(0,0,0),vt(x1,y1,z1))
  2606. game:GetService("Debris"):AddItem(prt,10)
  2607. table.insert(Effects,{prt,"Blood",delay,x3,y3,z3,msh,push})
  2608. end
  2609.  
  2610. function MagicCylinder(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  2611. local prt=part(3,effects,0,0,brickcolor,"Effect",vt(0.2,0.2,0.2))
  2612. prt.Anchored=true
  2613. prt.CFrame=cframe
  2614. local msh=mesh("CylinderMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  2615. game:GetService("Debris"):AddItem(prt,10)
  2616. table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
  2617. end
  2618.  
  2619. function MagicHead(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  2620. local prt=part(3,effects,0,0,brickcolor,"Effect",vt(0.2,0.2,0.2))
  2621. prt.Anchored=true
  2622. prt.CFrame=cframe
  2623. local msh=mesh("SpecialMesh",prt,"Head","nil",vt(0,0,0),vt(x1,y1,z1))
  2624. game:GetService("Debris"):AddItem(prt,10)
  2625. table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
  2626. end
  2627.  
  2628. function ClangEffect(brickcolor,cframe,duration,decrease,size,power)
  2629. local prt=part(3,effects,0,1,brickcolor,"Effect",vt(0.2,0.2,0.2))
  2630. prt.Anchored=true
  2631. prt.CFrame=cframe
  2632. local msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(5,5,5))
  2633. game:GetService("Debris"):AddItem(prt,10)
  2634. table.insert(Effects,{prt,"CylinderClang",duration,decrease,size,power,prt.CFrame,nil})
  2635. end
  2636.  
  2637. function MagicWave(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  2638. local prt=part(3,effects,0,0,brickcolor,"Effect",vt(0.2,0.2,0.2))
  2639. prt.Anchored=true
  2640. prt.CFrame=cframe
  2641. local msh=mesh("SpecialMesh",prt,"FileMesh","20329976",vt(0,0,0),vt(x1,y1,z1))
  2642. game:GetService("Debris"):AddItem(prt,10)
  2643. table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
  2644. end
  2645.  
  2646. function MagicRing(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,par)
  2647. local prt=part(3,effects,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  2648. prt.Anchored=true
  2649. if par~=nil then
  2650. prt.Parent=par
  2651. end
  2652. prt.CFrame=cframe*cf(x2,y2,z2)
  2653. local msh=mesh("SpecialMesh",prt,"FileMesh","3270017",vt(0,0,0),vt(x1,y1,z1))
  2654. game:GetService("Debris"):AddItem(prt,10)
  2655. table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
  2656. end
  2657.  
  2658. function MagicSpecial(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  2659. local prt=part(3,effects,0,0,brickcolor,"Effect",vt(0.2,0.2,0.2))
  2660. prt.Anchored=true
  2661. prt.CFrame=cframe
  2662. local msh=mesh("SpecialMesh",prt,"FileMesh","24388358",vt(0,0,0),vt(x1,y1,z1))
  2663. game:GetService("Debris"):AddItem(prt,10)
  2664. table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
  2665. end
  2666.  
  2667. function Lightning(p0,p1,tym,ofs,col,th,tra,last)
  2668. --[[p0=pos1
  2669. p1=pos2
  2670. tym=times
  2671. ofs=offset
  2672. col=color
  2673. th=size
  2674. tra=transparency
  2675. last=lastingtime]]
  2676. local magz = (p0 - p1).magnitude local curpos = p0 local trz = {-ofs,ofs}
  2677. for i=1,tym do
  2678. local li = Instance.new("Part",effects) li.TopSurface =0 li.BottomSurface = 0 li.Anchored = true li.Transparency = tra or 0.4 li.BrickColor = BrickColor.new(col)
  2679. li.formFactor = "Custom" li.CanCollide = false li.Size = Vector3.new(th,th,magz/tym) local ofz = Vector3.new(trz[math.random(1,2)],trz[math.random(1,2)],trz[math.random(1,2)])
  2680. local trolpos = CFrame.new(curpos,p1)*CFrame.new(0,0,magz/tym).p+ofz
  2681. if tym == i then
  2682. local magz2 = (curpos - p1).magnitude li.Size = Vector3.new(th,th,magz2)
  2683. li.CFrame = CFrame.new(curpos,p1)*CFrame.new(0,0,-magz2/2)
  2684. else
  2685. li.CFrame = CFrame.new(curpos,trolpos)*CFrame.new(0,0,magz/tym/2)
  2686. end
  2687. curpos = li.CFrame*CFrame.new(0,0,magz/tym/2).p game.Debris:AddItem(li,10)
  2688. table.insert(Effects,{li,"Disappear",last})
  2689. end
  2690. end
  2691.  
  2692. Damagefunc=function(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,incstun,stagger,staghit,ranged,DecreaseState,DecreaseAmount,Duration)
  2693. if hit.Parent==nil then
  2694. return
  2695. end
  2696. if hit.Name=="Hitbox" and hit.Parent~=modelzorz and ranged~=true then
  2697. ref=part(3,workspace,0,1,BrickColor.new("Black"),"Reference",vt())
  2698. ref.Anchored=true
  2699. ref.CFrame=cf(hit.Position)
  2700. game:GetService("Debris"):AddItem(ref,1)
  2701. hitnum=math.random(1,5)
  2702. if hitnum==1 then so("199148971",ref,1,1)
  2703. elseif hitnum==2 then so("199149025",ref,1,1)
  2704. elseif hitnum==3 then so("199149072",ref,1,1)
  2705. elseif hitnum==4 then so("199149109",ref,1,1)
  2706. elseif hitnum==5 then so("199149119",ref,1,1)
  2707. end
  2708. StaggerHit.Value=true
  2709. end
  2710. h=hit.Parent:FindFirstChild("Humanoid")
  2711. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  2712. if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end
  2713. if Player.Neutral==false then
  2714. if hit.Parent:findFirstChild("Alignment")~=nil then
  2715. if hit.Parent.Alignment.Value==Player.TeamColor.Color then return end
  2716. end
  2717. if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  2718. if game.Players:GetPlayerFromCharacter(hit.Parent).TeamColor==Player.TeamColor then return end
  2719. end
  2720. end
  2721. c=Instance.new("ObjectValue")
  2722. c.Name="creator"
  2723. c.Value=game:service("Players").LocalPlayer
  2724. c.Parent=h
  2725. RecentEnemy.Value=hit.Parent
  2726. game:GetService("Debris"):AddItem(c,.5)
  2727. minim=minim*Atk.Value
  2728. maxim=maxim*Atk.Value
  2729. Damage=0
  2730. if minim==maxim then
  2731. Damage=maxim
  2732. else
  2733. Damage=math.random(minim,maxim)
  2734. end
  2735. blocked=false
  2736. enblock=nil
  2737. Stats=hit.Parent:findFirstChild("Stats")
  2738. if Stats~=nil then
  2739. invis=Stats:findFirstChild("Invisibility")
  2740. isinvis=Stats:findFirstChild("IsInvisible")
  2741. if (ranged==false or ranged==nil) and invis~=nil and isinvis.Value==true then
  2742. invis.Value=0
  2743. end
  2744. enblock=Stats:findFirstChild("Block")
  2745. if enblock~=nil then
  2746. if enblock.Value==true then
  2747. blocked=true
  2748. end
  2749. end
  2750. if Stats:findFirstChild("Defense")~=nil then
  2751. Damage=Damage/(Stats.Defense.Value)
  2752. if Damage<=3 and (ranged==false or ranged==nil) and blocked~=true then
  2753. hitnum=math.random(1,5)
  2754. if hitnum==1 then so("199149321",hit,1,1)
  2755. elseif hitnum==2 then so("199149338",hit,1,1)
  2756. elseif hitnum==3 then so("199149367",hit,1,1)
  2757. elseif hitnum==4 then so("199149409",hit,1,1)
  2758. elseif hitnum==5 then so("199149452",hit,1,1)
  2759. end
  2760. elseif ranged==false or ranged==nil and blocked~=true then
  2761. hitnum=math.random(1,6)
  2762. if hitnum==1 then so("199149137",hit,1,1)
  2763. elseif hitnum==2 then so("199149186",hit,1,1)
  2764. elseif hitnum==3 then so("199149221",hit,1,1)
  2765. elseif hitnum==4 then so("199149235",hit,1,1)
  2766. elseif hitnum==5 then so("199149269",hit,1,1)
  2767. elseif hitnum==6 then so("199149297",hit,1,1)
  2768. end
  2769. end
  2770. if Damage<=3 and staghit==true then
  2771. if ranged~=true then
  2772. StaggerHit.Value=true
  2773. end
  2774. end
  2775. end
  2776. if Stats:findFirstChild("Stun")~=nil then
  2777. if blocked==true then
  2778. incstun=incstun/2
  2779. end
  2780. if Stats.Stun.Value<Stats.StunThreshold.Value then
  2781. Stats.Stun.Value=Stats.Stun.Value+incstun
  2782. end
  2783. end
  2784. if Stats:findFirstChild("Stagger")~=nil then
  2785. if stagger==true then
  2786. Stats.Stagger.Value=true
  2787. end
  2788. end
  2789. end
  2790. if blocked==true then
  2791. showDamage(hit.Parent,"Block","Damage")
  2792. if ranged~=true then
  2793. enblock.Value=false
  2794. Stagger.Value=true
  2795. hitnum=math.random(1,2)
  2796. if hitnum==1 then so("199148933",hit,1,1)
  2797. elseif hitnum==2 then so("199148947",hit,1,1)
  2798. end
  2799. end
  2800. else
  2801. Damage=math.floor(Damage)
  2802. coroutine.resume(coroutine.create(function(Hum,Dam)
  2803. CurrentHealth=Hum.Health
  2804. damageFunc:InvokeServer(h,Damage)
  2805. h:TakeDamage(Damage)
  2806. end),h,Damage)
  2807. showDamage(hit.Parent,Damage,"Damage")
  2808. if DecreaseState~=nil then
  2809. if DecreaseState=="Temporal" then
  2810. DecreaseStat(hit.Parent,"Damage",DecreaseAmount,Duration)
  2811. DecreaseStat(hit.Parent,"Defense",DecreaseAmount,Duration)
  2812. elseif DecreaseState=="Temporal2" then
  2813. DecreaseStat(hit.Parent,"Damage",DecreaseAmount,Duration)
  2814. DecreaseStat(hit.Parent,"Movement",DecreaseAmount,Duration)
  2815. else
  2816. DecreaseStat(hit.Parent,DecreaseState,DecreaseAmount,Duration)
  2817. end
  2818. end
  2819. if smite==true then
  2820. so("178452217",hit,1,1)
  2821. smtarget=hit.Parent
  2822. if smtarget:findFirstChild("Stats")~=nil then
  2823. d1=Instance.new("NumberValue",smtarget.Stats.Decrease)
  2824. d1.Name="DecreaseAtk"
  2825. d1.Value=10
  2826. dur1=Instance.new("NumberValue",d1)
  2827. dur1.Name="Duration"
  2828. dur1.Value=9999
  2829. d2=Instance.new("NumberValue",smtarget.Stats.Decrease)
  2830. d2.Name="DecreaseDef"
  2831. d2.Value=-9
  2832. dur2=Instance.new("NumberValue",d2)
  2833. dur2.Name="Duration"
  2834. dur2.Value=9999
  2835. d3=Instance.new("NumberValue",smtarget.Stats.Decrease)
  2836. d3.Name="DecreaseMvmt"
  2837. d3.Value=10
  2838. dur3=Instance.new("NumberValue",d3)
  2839. dur3.Name="Duration"
  2840. dur3.Value=9999
  2841. ref2=part(3,nil,0,1,BrickColor.new("Black"),"Reference",vt(0.2,0.2,0.2))
  2842. ref2.Anchored=true
  2843. table.insert(Effects,{smtarget,"Smite",500,d1,d2,d3,dur1,dur2,dur3,smtarget.Stats.Decrease,smtarget.Torso,ref2})
  2844. end
  2845. end
  2846. if Type=="Knockdown" then
  2847. hum=hit.Parent.Humanoid
  2848. hum.PlatformStand=true
  2849. coroutine.resume(coroutine.create(function(HHumanoid)
  2850. swait(1)
  2851. HHumanoid.PlatformStand=false
  2852. end),hum)
  2853. local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
  2854. --hit.CFrame=cf(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
  2855. local bodvol=Instance.new("BodyVelocity")
  2856. bodvol.velocity=angle*knockback
  2857. bodvol.P=5000
  2858. bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  2859. bodvol.Parent=hit
  2860. rl=Instance.new("BodyAngularVelocity")
  2861. rl.P=3000
  2862. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  2863. rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  2864. rl.Parent=hit
  2865. game:GetService("Debris"):AddItem(bodvol,.5)
  2866. game:GetService("Debris"):AddItem(rl,.5)
  2867. elseif Type=="Knockdown2" then
  2868. hum=hit.Parent.Humanoid
  2869. local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
  2870. local bodvol=Instance.new("BodyVelocity")
  2871. bodvol.velocity=angle*knockback
  2872. bodvol.P=5000
  2873. bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  2874. bodvol.Parent=hit
  2875. game:GetService("Debris"):AddItem(bodvol,.5)
  2876. elseif Type=="Normal" or Type=="NormalDecreaseMvmt1" then
  2877. vp=Instance.new("BodyVelocity")
  2878. vp.P=500
  2879. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  2880. if KnockbackType==1 then
  2881. vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05
  2882. elseif KnockbackType==2 then
  2883. vp.velocity=Property.CFrame.lookVector*knockback
  2884. end
  2885. game:GetService("Debris"):AddItem(vp,.5)
  2886. if knockback>0 then
  2887. vp.Parent=hit.Parent.Torso
  2888. end
  2889. end
  2890. end
  2891. debounce=Instance.new("BoolValue")
  2892. debounce.Name="DebounceHit"
  2893. debounce.Parent=hit.Parent
  2894. debounce.Value=true
  2895. game:GetService("Debris"):AddItem(debounce,Delay)
  2896. c=Instance.new("ObjectValue")
  2897. c.Name="creator"
  2898. c.Value=Player
  2899. c.Parent=h
  2900. game:GetService("Debris"):AddItem(c,.5)
  2901. CRIT=false
  2902. end
  2903. end
  2904.  
  2905. showDamage=function(Char,Dealt,Type)
  2906. m=Instance.new("Model")
  2907. m.Name="Effect"
  2908. c=Instance.new("Part")
  2909. c.Transparency=1
  2910. c.Name="Head"
  2911. c.TopSurface=0
  2912. c.BottomSurface=0
  2913. c.formFactor="Plate"
  2914. c.Size=Vector3.new(1,.4,1)
  2915. b=Instance.new("BillboardGui",c)
  2916. b.Size=UDim2.new(5,0,5,0)
  2917. b.AlwaysOnTop=true
  2918. damgui=gui("TextLabel",b,tostring(Dealt),1,Color3.new(0,0,0),UDim2.new(0,0,0,0),UDim2.new(1,0,1,0))
  2919. if Type=="Damage" then
  2920. damgui.Font="SourceSans"
  2921. if Dealt=="Block" then
  2922. damgui.TextColor3=BrickColor.new("Bright blue").Color
  2923. elseif Dealt<3 then
  2924. damgui.TextColor3=BrickColor.new("White").Color
  2925. elseif Dealt>=3 and Dealt<20 then
  2926. damgui.TextColor3=BrickColor.new("Bright yellow").Color
  2927. else
  2928. damgui.TextColor3=BrickColor.new("Really red").Color
  2929. damgui.Font="SourceSansBold"
  2930. end
  2931. elseif Type=="Debuff" then
  2932. damgui.TextColor3=BrickColor.new("White").Color
  2933. elseif Type=="Interrupt" then
  2934. damgui.TextColor3=BrickColor.new("New Yeller").Color
  2935. elseif Type=="Heal" then
  2936. damgui.TextColor3=BrickColor.new("Bright green").Color
  2937. end
  2938. --damgui.FontSize="Size48"
  2939. damgui.TextScaled=true
  2940. ms=Instance.new("CylinderMesh")
  2941. ms.Scale=Vector3.new(.8,.8,.8)
  2942. ms.Parent=c
  2943. c.Reflectance=0
  2944. Instance.new("BodyGyro").Parent=c
  2945. c.Parent=m
  2946. if Char:findFirstChild("Head")~=nil then
  2947. c.CFrame=cf(Char["Head"].CFrame.p+Vector3.new(math.random(-100,100)/100,3,math.random(-100,100)/100))
  2948. elseif Char.Parent:findFirstChild("Head")~=nil then
  2949. c.CFrame=cf(Char.Parent["Head"].CFrame.p+Vector3.new(math.random(-100,100)/100,3,math.random(-100,100)/100))
  2950. end
  2951. f=Instance.new("BodyPosition")
  2952. f.P=2000
  2953. f.D=100
  2954. f.maxForce=Vector3.new(545000,545000,545000)
  2955. if Type=="Damage" or Type=="Heal" then
  2956. f.position=c.Position+Vector3.new(0,3,0)
  2957. elseif Type=="Debuff" or Type=="Interrupt" then
  2958. f.position=c.Position+Vector3.new(0,5,0)
  2959. end
  2960. f.Parent=c
  2961. game:GetService("Debris"):AddItem(m,5)
  2962. table.insert(Effects,{m,"showDamage",damgui,f,10,1,15,50,100})
  2963. c.CanCollide=false
  2964. m.Parent=workspace
  2965. c.CanCollide=false
  2966. end
  2967.  
  2968. combo=0
  2969. function ob1d(mouse)
  2970. if eCharge==true and mana.Value>=10 then
  2971. energ=100
  2972. mana.Value=mana.Value-10
  2973. eCharge=false
  2974. return end
  2975. if attack==true or equipped==false then return end
  2976. hold=true
  2977. if #Orbs<1 then
  2978. if combo==0 then
  2979. combo=1
  2980. attackone()
  2981. elseif combo==1 then
  2982. combo=2
  2983. attacktwo()
  2984. elseif combo==2 then
  2985. combo=3
  2986. attackthree()
  2987. elseif combo==3 then
  2988. combo=0
  2989. attackfour()
  2990. end
  2991. else
  2992. ShootOrb()
  2993. end
  2994. coroutine.resume(coroutine.create(function()
  2995. for i=1,50 do
  2996. if attack==false then
  2997. script.Heartbeat.Event:wait()
  2998. end
  2999. end
  3000. if attack==false then
  3001. combo=0
  3002. end
  3003. end))
  3004. end
  3005.  
  3006. function ob1u(mouse)
  3007. hold = false
  3008. end
  3009.  
  3010. buttonhold = false
  3011.  
  3012. fenbarmove1.MouseButton1Click:connect(do1)
  3013. fenbarmove2.MouseButton1Click:connect(do2)
  3014. fenbarmove3.MouseButton1Click:connect(do3)
  3015. fenbarmove4.MouseButton1Click:connect(do4)
  3016. eul=0
  3017. equipped=false
  3018. function key(key)
  3019. if key=="e" and eCharge==true then eCharge=false return end
  3020. if attack==true then return end
  3021. if key=="f" then
  3022. pressedf=true
  3023. fnumb=0
  3024. attack=true
  3025. if equipped==false then
  3026. equipped=true
  3027. RSH=ch.Torso["Right Shoulder"]
  3028. LSH=ch.Torso["Left Shoulder"]
  3029. --
  3030. RSH.Parent=nil
  3031. LSH.Parent=nil
  3032. --
  3033. RW.Name="Right Shoulder"
  3034. RW.Part0=ch.Torso
  3035. RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  3036. RW.C1=cf(0, 0.5, 0)
  3037. RW.Part1=ch["Right Arm"]
  3038. RW.Parent=ch.Torso
  3039. --
  3040. LW.Name="Left Shoulder"
  3041. LW.Part0=ch.Torso
  3042. LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  3043. LW.C1=cf(0, 0.5, 0)
  3044. LW.Part1=ch["Left Arm"]
  3045. LW.Parent=ch.Torso
  3046. --
  3047. Animate.Parent=nil
  3048. equipanim()
  3049. else
  3050. equipped=false
  3051. hideanim()
  3052. LH.C1=LHC1
  3053. RH.C1=RHC1
  3054. Animate.Parent=Humanoid
  3055. swait(0)
  3056. RW.Parent=nil
  3057. LW.Parent=nil
  3058. RSH.Parent=player.Character.Torso
  3059. LSH.Parent=player.Character.Torso
  3060. end
  3061. attack=false
  3062. end
  3063. if equipped==false then return end
  3064. if key=="q" then
  3065. table.remove(Orbs,1)
  3066. print(#Orbs)
  3067. end
  3068. if key=="e" and #Orbs<4 then
  3069. EnergyCharge()
  3070. end
  3071. if key=="z" then
  3072. do1()
  3073. end
  3074. if key=="x" then
  3075. do2()
  3076. end
  3077. if key=="c" then
  3078. do3()
  3079. end
  3080. if key=="v" then
  3081. do4()
  3082. end
  3083. if attack==false then
  3084. RecentEnemy.Value=nil
  3085. end
  3086. end
  3087.  
  3088. function key2(key)
  3089.  
  3090.  
  3091. end
  3092.  
  3093.  
  3094. mouse.Button1Down:connect(function() ob1d(mouse) end)
  3095. mouse.Button1Up:connect(function() ob1u(mouse) end)
  3096. mouse.KeyDown:connect(key)
  3097. mouse.KeyUp:connect(key2)
  3098.  
  3099. player=Player
  3100. ch=Character
  3101. --MMouse=mouse
  3102.  
  3103.  
  3104. function ds(mouse)
  3105. end
  3106.  
  3107.  
  3108. print("Virtue loaded.")
  3109.  
  3110. local mananum=0
  3111. local donum=0
  3112. local stunnum=0
  3113. local cursnum=0
  3114. local staggeranim=false
  3115. local stunanim=false
  3116. local walk=0
  3117. local walkforw=true
  3118. local disabledhealth=false
  3119. while true do
  3120. script.Heartbeat.Event:wait()
  3121. for i=1,#TopStaff do
  3122. TopStaff[i].C0=clerp(TopStaff[i].C0,TSCF,.1)
  3123. end
  3124. for i=1,#OOrbs do
  3125. MagicBlock(BrickColor.new(NewCol4),cf(OOrbs[i][3].Position)*cf(math.random(-200,200)/100,math.random(-200,200)/100,math.random(-200,200)/100)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),2,2,2,-.5,-.5,-.5,.2,2)
  3126. end
  3127. if Humanoid.Health>100 then
  3128. Humanoid.Health=100
  3129. end
  3130. if Humanoid.Health<=0 then
  3131. shieldref.Parent=nil
  3132. shieldref2.Parent=nil
  3133. attack=true
  3134. resumeControl()
  3135. modelzorz.Parent=workspace
  3136. game:GetService("Debris"):AddItem(modelzorz,30)
  3137. for i=1,#Weapon do
  3138. Weapon[i].Parent=modelzorz
  3139. Weapon[i].CanCollide=true
  3140. end
  3141. for i=1,#Welds do
  3142. if Welds[i].Part0.Parent==Character or Welds[i].Part1.Parent==Character then
  3143. Welds[i].Parent=nil
  3144. else
  3145. Welds[i].Parent=prt1
  3146. end
  3147. end
  3148. end
  3149. if fnumb<21 then
  3150. fnumb=fnumb+1
  3151. if pressedf==false then
  3152. fenframe5.BackgroundTransparency=fenframe5.BackgroundTransparency-.025
  3153. tellbar.TextTransparency=tellbar.TextTransparency-.05
  3154. tellbar.TextStrokeTransparency=tellbar.TextStrokeTransparency-.05
  3155. else
  3156. if fnumb==20 then
  3157. fenframe5.Parent=nil
  3158. print("daigui")
  3159. end
  3160. fenframe5.BackgroundTransparency=fenframe5.BackgroundTransparency+.025
  3161. tellbar.TextTransparency=tellbar.TextTransparency+.05
  3162. tellbar.TextStrokeTransparency=tellbar.TextStrokeTransparency+.05
  3163. end
  3164. end
  3165. --hitbox2
  3166. if Stagger.Value==true and staggeranim==false then
  3167. coroutine.resume(coroutine.create(function()
  3168. staggeranim=true
  3169. while attack==true do
  3170. script.Heartbeat.Event:wait()
  3171. end
  3172. StaggerAnim()
  3173. StaggerHit.Value=false
  3174. Stagger.Value=false
  3175. staggeranim=false
  3176. end))
  3177. end
  3178. if StaggerHit.Value==true and staggeranim==false then
  3179. coroutine.resume(coroutine.create(function()
  3180. staggeranim=true
  3181. while attack==true do
  3182. script.Heartbeat.Event:wait()
  3183. end
  3184. StaggerHitt()
  3185. StaggerHit.Value=false
  3186. Stagger.Value=false
  3187. staggeranim=false
  3188. end))
  3189. end
  3190. if Mvmt.Value<0 or Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true or Rooted.Value==true then
  3191. Humanoid.WalkSpeed=0
  3192. else
  3193. Humanoid.WalkSpeed=16*Mvmt.Value
  3194. end
  3195. if Stun.Value>=StunT.Value and stunanim==false then
  3196. coroutine.resume(coroutine.create(function()
  3197. stunanim=true
  3198. while attack==true do
  3199. script.Heartbeat.Event:wait()
  3200. end
  3201. StunAnim()
  3202. Stun.Value=0
  3203. stunanim=false
  3204. end))
  3205. end
  3206. local stunnum2=50
  3207. if stunnum>=stunnum2 then
  3208. if Stun.Value>0 then
  3209. Stun.Value=Stun.Value-1
  3210. end
  3211. stunnum=0
  3212. end
  3213. stunnum=stunnum+1
  3214. if donum>=.5 then
  3215. handidle=true
  3216. elseif donum<=0 then
  3217. handidle=false
  3218. end
  3219. if handidle==false then
  3220. donum=donum+0.003
  3221. else
  3222. donum=donum-0.003
  3223. end
  3224. local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
  3225. local velderp=RootPart.Velocity.y
  3226. hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character)
  3227. if equipped==true then
  3228. if attack==false then
  3229. idle=idle+1
  3230. else
  3231. idle=0
  3232. end
  3233. if idle>=500 then
  3234. if attack==false then
  3235. --Sheath()
  3236. end
  3237. end
  3238. if Anim=="Walk" then
  3239. if walkforw==true then
  3240. RH.C1=clerp(RH.C1,RHC1*cf(.2,-.2,0)*euler(0,0,1),(Mvmt.Value*10)/50)
  3241. LH.C1=clerp(LH.C1,LHC1*cf(.1,.2,0)*euler(0,0,1),(Mvmt.Value*10)/50)
  3242. else
  3243. RH.C1=clerp(RH.C1,RHC1*cf(-.1,.2,0)*euler(0,0,-1),(Mvmt.Value*10)/50)
  3244. LH.C1=clerp(LH.C1,LHC1*cf(-.2,-.2,0)*euler(0,0,-1),(Mvmt.Value*10)/50)
  3245. end
  3246. else
  3247. RH.C1=clerp(RH.C1,RHC1,.2)
  3248. LH.C1=clerp(LH.C1,LHC1,.2)
  3249. end
  3250. if RootPart.Velocity.y > 1 and hitfloor==nil then
  3251. Anim="Jump"
  3252. if attack==false then
  3253. --handlewld.C0=clerp(handlewld.C0,euler(3.14,0,1.57)*cf(0,1,0),.2)
  3254. --wld1.C0=clerp(wld1.C0,cf(0,2,0)*euler(-1.57,0,0)*euler(0,0,0),.2)
  3255. Neck.C0=clerp(Neck.C0,necko*euler(-0.2,0,0),.2)
  3256. Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.2)
  3257. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.2)
  3258. RW.C0=clerp(RW.C0,cf(1,0.4,.2)*euler(-.8,0,-1)*euler(0,-.2,0),.2)
  3259. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  3260. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(.4,0,-.6)*euler(0,.5,0),.2)
  3261. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  3262. RH.C0=clerp(RH.C0,cf(1,-1,-.3)*euler(-0.5,1.57,0)*euler(-.2,0,0),.2)
  3263. LH.C0=clerp(LH.C0,cf(-1,-1,-.3)*euler(-0.5,-1.57,0)*euler(-.2,0,0),.2)
  3264. end
  3265. elseif RootPart.Velocity.y < -1 and hitfloor==nil then
  3266. Anim="Fall"
  3267. if attack==false then
  3268. --handlewld.C0=clerp(handlewld.C0,euler(3.14,0,1.57)*cf(0,1,0),.2)
  3269. --wld1.C0=clerp(wld1.C0,cf(0,2,0)*euler(-1.57,0,0)*euler(0,0,0),.2)
  3270. Neck.C0=clerp(Neck.C0,necko*euler(0.4,0,0),.2)
  3271. Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.2)
  3272. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.2)
  3273. RW.C0=clerp(RW.C0,cf(1,0.4,.2)*euler(-.3,0,-1)*euler(0,-.2,0),.2)
  3274. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  3275. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.1,0,-1.2)*euler(0,.1,0),.2)
  3276. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  3277. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0.4,1.57,0),.2)
  3278. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(-0.2,-1.57,0),.2)
  3279. end
  3280. elseif torvel<1 and hitfloor~=nil then
  3281. Anim="Idle"
  3282. if attack==false then
  3283. if #Orbs<1 then
  3284. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.15)
  3285. wld1.C0=clerp(wld1.C0,euler(-(donum/3),0,0)*cf(0,0,0),.15)
  3286. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.2)*euler(.1,0,0),.15)
  3287. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.1)*euler(0,0,-.2),.15)
  3288. RW.C0=clerp(RW.C0,cf(1,0.4,.2)*euler(-.3,0,-1)*euler(0,-.2,0),.15)
  3289. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.15)
  3290. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.57-(donum/3),(donum/2),-.2-(donum/2)),.15)
  3291. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.15)
  3292. RH.C0=clerp(RH.C0,cf(1.1,-.9,.2)*euler(0,1.57,0)*euler(-.1,-.4,-.05),.2)
  3293. LH.C0=clerp(LH.C0,cf(-1,-.9,-.1)*euler(0,-1.57,0)*euler(0,.2,.05),.2)
  3294. else
  3295. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.15)
  3296. wld1.C0=clerp(wld1.C0,euler(0,1.57,0)*cf(0,.4,0)*euler(.8,0,0),.15)
  3297. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-.4)*euler(.1,0,0),.15)
  3298. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.1)*euler(0,0,.4),.15)
  3299. RW.C0=clerp(RW.C0,cf(.9,0.4,.4)*euler(-.5,0,-1)*euler(0,-.4,0),.15)
  3300. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.15)
  3301. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(.5-(donum/3),0,-.4-(donum/2))*euler(0,.2,0),.15)
  3302. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.15)
  3303. RH.C0=clerp(RH.C0,cf(1.1,-.9,-.1)*euler(0,1.57,0)*euler(0,-.4,-.05),.2)
  3304. LH.C0=clerp(LH.C0,cf(-1,-.9,0)*euler(0,-1.57,0)*euler(-.1,.2,.15),.2)
  3305. end
  3306. end
  3307. elseif torvel>2 and torvel<30 and hitfloor~=nil then
  3308. Anim="Walk"
  3309. walk=walk+1
  3310. if walk>=15-(5*Mvmt.Value) then
  3311. walk=0
  3312. if walkforw==true then
  3313. walkforw=false
  3314. elseif walkforw==false then
  3315. walkforw=true
  3316. end
  3317. end
  3318. if attack==false then
  3319. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.2)
  3320. wld1.C0=clerp(wld1.C0,euler(0,0,0)*cf(0,0,0),.2)
  3321. Neck.C0=clerp(Neck.C0,necko*euler(.1,0,0),.2)
  3322. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0.1,0,0),.2)
  3323. RW.C0=clerp(RW.C0,cf(1,0.4,.2)*euler(-.8,0,-1)*euler(0,-.2,0),.2)
  3324. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  3325. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(.4,0,-.2)*euler(0,.5,0),.2)
  3326. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  3327. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,0,0),.2)
  3328. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,0,0),.2)
  3329. end
  3330. elseif torvel>=30 and hitfloor~=nil then
  3331. Anim="Run"
  3332. if attack==false then
  3333. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.2)
  3334. wld1.C0=clerp(wld1.C0,euler(0,0,0)*cf(0,0,0),.2)
  3335. Neck.C0=clerp(Neck.C0,necko*euler(.1,0,0),.2)
  3336. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0.1,0,0),.2)
  3337. RW.C0=clerp(RW.C0,cf(1,0.4,.2)*euler(-.8,0,-1)*euler(0,-.2,0),.2)
  3338. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  3339. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(.4,0,-.2)*euler(0,.5,0),.2)
  3340. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  3341. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,0,0),.2)
  3342. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,0,0),.2)
  3343. end
  3344. end
  3345. end
  3346. if #Effects>0 then
  3347. --table.insert(Effects,{prt,"Block1",delay})
  3348. for e=1,#Effects do
  3349. if Effects[e]~=nil then
  3350. --for j=1,#Effects[e] do
  3351. local Thing=Effects[e]
  3352. if Thing~=nil then
  3353. local Part=Thing[1]
  3354. local Mode=Thing[2]
  3355. local Delay=Thing[3]
  3356. local IncX=Thing[4]
  3357. local IncY=Thing[5]
  3358. local IncZ=Thing[6]
  3359. if Thing[2]=="CylinderClang" then
  3360. if Thing[3]<=1 then
  3361. Thing[1].CFrame=Thing[1].CFrame*CFrame.new(0,2.5*Thing[5],0)*CFrame.fromEulerAnglesXYZ(Thing[6],0,0)
  3362. Thing[7]=Thing[1].CFrame
  3363. effect("New Yeller",0,Thing[8],Thing[7],nil,.1,2)
  3364. Thing[8]=Thing[7]
  3365. Thing[3]=Thing[3]+Thing[4]
  3366. else
  3367. Part.Parent=nil
  3368. table.remove(Effects,e)
  3369. end
  3370. --[[Mesh=Thing[7]
  3371. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  3372. Thing[1].Transparency=Thing[1].Transparency+Thing[3]]
  3373. end
  3374. if Thing[2]=="showDamage" then
  3375. --[[
  3376. 1=model
  3377. 2=showdamage
  3378. 3=gui
  3379. 4=bodypos
  3380. 5=10
  3381. 6=1
  3382. 7=60
  3383. 8=90
  3384. 9=120
  3385. ]]
  3386. if Thing[6]<Thing[5] then
  3387. Thing[6]=Thing[6]+1
  3388. elseif Thing[6]<Thing[7] then
  3389. Thing[4].position=Thing[4].position+vt(0,-.2,0)
  3390. Thing[6]=Thing[6]+1
  3391. elseif Thing[6]<Thing[8] then
  3392. Thing[6]=Thing[6]+1
  3393. elseif Thing[6]<Thing[9] then
  3394. Thing[6]=Thing[6]+1
  3395. Thing[4].position=Thing[4].position+vt(0,.2,0)
  3396. Thing[3].TextStrokeTransparency=Thing[3].TextStrokeTransparency+.1
  3397. Thing[3].TextTransparency=Thing[3].TextTransparency+.1
  3398. else
  3399. Thing[1].Parent=nil
  3400. table.remove(Effects,e)
  3401. end
  3402. end
  3403. if Thing[2]=="Shoot" then
  3404. local Look=Thing[1]
  3405. local hit,pos = rayCast(Thing[4],Look,5,Character)
  3406. local mag=(Thing[4]-pos).magnitude
  3407. Thing[7].CFrame=CFrame.new((Thing[4]+pos)/2,pos)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  3408. MagicHead(BrickColor.new(NewCol2),CFrame.new((Thing[4]+pos)/2,pos)*angles(1.57,0,0),1,mag*5,1,.5,0,.5,.2)
  3409. Thing[4]=Thing[4]+(Look*5)
  3410. Thing[3]=Thing[3]-1
  3411. if hit~=nil then
  3412. Thing[3]=0
  3413. end
  3414. if Thing[3]<=0 then
  3415. ref=part(3,workspace,0,1,BrickColor.new("Really red"),"Reference",vt())
  3416. ref.Anchored=true
  3417. ref.CFrame=cf(pos)
  3418. so("161006093",ref,1,2)
  3419. so("377357774",ref,1,1.5)
  3420. game:GetService("Debris"):AddItem(ref,.2)
  3421. MagicCircle(BrickColor.new(NewCol2),cf(pos),10,10,10,5,5,5,0.07)
  3422. dra=math.random(-50,50)
  3423. for i=.785,6.28,.785 do
  3424. MagicCircle2(BrickColor.new(NewCol2),cf(pos)*euler(dra,0,i),4,5,4,-.05,2,-.05,.07,.8)
  3425. end
  3426. MagniDamage(ref,10,Thing[5],Thing[6],0,"Normal",ref,0,1,math.random(3,8),nil,nil,true)
  3427. MagniHeal(ref,10,3,5)
  3428. Thing[7].Parent=nil
  3429. Thing[8].Parent=nil
  3430. table.remove(Effects,e)
  3431. end
  3432. end
  3433. if Thing[2]=="ShootSeek" then
  3434. local Look=Thing[1]
  3435. local hit,pos = rayCast(Thing[8],Look,5,Character)
  3436. local mag=(Thing[8]-pos).magnitude
  3437. Thing[6].CFrame=CFrame.new((Thing[8]+pos)/2,pos)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  3438. MagicHead(BrickColor.new(NewCol2),CFrame.new((Thing[8]+pos)/2,pos)*angles(1.57,0,0),1,mag*5,1,.5,0,.5,.2)
  3439. Thing[8]=Thing[8]+(Look*5)
  3440. Thing[3]=Thing[3]-1
  3441. if hit~=nil then
  3442. Thing[3]=0
  3443. end
  3444. if Thing[4].Parent==nil then
  3445. Thing[3]=0
  3446. end
  3447. if Thing[3]<=0 and Thing[4].Parent~=nil then
  3448. ref=part(3,workspace,0,1,BrickColor.new("Really red"),"Reference",vt())
  3449. ref.Anchored=true
  3450. ref.CFrame=cf(pos)
  3451. so("161006093",ref,1,2)
  3452. so("315748970",ref,1,1.5)
  3453. game:GetService("Debris"):AddItem(ref,.2)
  3454. MagicCircle(BrickColor.new(NewCol2),cf(pos),10,10,10,5,5,5,0.07)
  3455. dra=math.random(-50,50)
  3456. for i=.785,6.28,.785 do
  3457. MagicCircle2(BrickColor.new(NewCol2),cf(pos)*euler(dra,0,i),4,5,4,-.05,2,-.05,.07,.8)
  3458. end
  3459. MagniDamage(ref,10,Thing[9],Thing[10],math.random(-10,-5),"Knockdown2",ref,0,1,math.random(3,8),nil,nil,true,"Damage",.1,100)
  3460.  
  3461. --table.insert(Orbs,{omain,owld,oprt1,prop})
  3462. Thing[4].Anchored=true
  3463. Thing[4].CFrame=ref.CFrame
  3464. --Thing[6].Anchored=false
  3465. --Thing[7].Parent=Thing[6]
  3466. table.insert(Effects,{10,"DoSeek",math.random(200,400),Thing[4],Thing[5],Thing[6],Thing[7]})
  3467. table.remove(Effects,e)
  3468. end
  3469. end
  3470. if Thing[2]=="DoSeek" then
  3471. if Thing[3]>=0 and Thing[4].Parent~=nil then
  3472. Thing[3]=Thing[3]-1
  3473. if Thing[3]%100==0 then
  3474. MagniDebuff(Thing[6],10,"Damage",math.random(4,6)/100,200)
  3475. local dasd=math.random(-50,50)
  3476. for d=0,1.57,1.57 do
  3477. for i=.785,6.28,.785 do
  3478. MagicCircle2(BrickColor.new(NewCol2),cf(Thing[6].Position)*euler(dasd,0,0)*euler(d,0,i)*cf(0,10,0),2,5,2,-.05,1,-.05,.07,-.4)
  3479. end
  3480. end
  3481. end
  3482. else
  3483. if Thing[4].Parent~=nil then
  3484. targetd,distanced=findNearestTorso(Thing[6].Position)
  3485. if targetd~=nil then
  3486. bleh=targetd.Position+vt(math.random(-500,500)/100,math.random(-500,500)/100,math.random(-500,500)/100)
  3487. local MouseLook=cf((Thing[6].Position+bleh)/2,bleh)
  3488. local targ=Thing[6].Position-bleh
  3489. local mag=(targ.magnitude/5)*math.random(80,120)/100
  3490. if mag>50 then
  3491. mag=50
  3492. end
  3493. so("377357731",Thing[4],1,1.4)
  3494. --table.insert(Effects,{MouseLook.lookVector,"Shoot",mag,OOrbs[i][3].Position,7,9,OOrbs[i][3],OOrbs[i][1]})
  3495. table.insert(Effects,{MouseLook.lookVector,"ShootSeek",mag,Thing[4],Thing[5],Thing[6],Thing[7],Thing[6].Position,4,6})
  3496. else
  3497. table.insert(Effects,{10,"DoSeek",100,Thing[4],Thing[5],Thing[6],Thing[7]})
  3498. end
  3499. table.remove(Effects,e)
  3500. end
  3501. end
  3502. end
  3503. if Thing[2]=="BuffEff" then
  3504. if Thing[3]>0 then
  3505. Thing[3]=Thing[3]-1
  3506. tc=math.random(40,100)/100
  3507. MagicCircle2(BrickColor.new(NewCol),Thing[1]*cf(math.random(-900,900)/100,math.random(-150,-100)/100,math.random(-900,900)/100),2,5,2,-.025*tc,.7,-.025*tc,.06*tc,.2)
  3508. else
  3509. table.remove(Effects,e)
  3510. end
  3511. end
  3512. if Thing[2]=="BuffEff2" then
  3513. if Thing[3]>0 then
  3514. Thing[3]=Thing[3]-1
  3515. MagicCircle(BrickColor.new(NewCol2),Thing[1].CFrame,15,15,15,-.5,-.5,-.5,.05,1,nil,nil,0)
  3516. else
  3517. table.remove(Effects,e)
  3518. end
  3519. end
  3520. if Thing[2]=="BuffEff3" then
  3521. if Thing[3]>0 then
  3522. Thing[3]=Thing[3]-1
  3523. local mag=(Thing[4].Position-Thing[5].Position).magnitude
  3524. Thing[6].CFrame=cf(Thing[4].Position,Thing[5].Position)
  3525. MagicCircle2(BrickColor.new(NewCol2),Thing[6].CFrame*euler(1.57,0,0)*cf(math.random(-100,100)/100,0,math.random(-100,100)/100),1.5,5,1.5,-.05,mag/10,-.05,.08,-mag/10)
  3526. else
  3527. Thing[6].Parent=nil
  3528. table.remove(Effects,e)
  3529. end
  3530. end
  3531. --table.insert(Effects,{MouseLook.lookVector,"ShootBuff",30,Thing[3].Position})
  3532. if Thing[2]=="ShootBuff" then
  3533. local Look=Thing[1]
  3534. local hit,pos = rayCast(Thing[4],Look,3,Character)
  3535. local mag=(Thing[4]-pos).magnitude
  3536. MagicHead(BrickColor.new(NewCol),CFrame.new((Thing[4]+pos)/2,pos)*angles(1.57,0,0),1,mag*5,1,.5,0,.5,.2)
  3537. Thing[4]=Thing[4]+(Look*3)
  3538. Thing[3]=Thing[3]-1
  3539. if hit~=nil then
  3540. Thing[3]=0
  3541. end
  3542. if Thing[3]<=0 then
  3543. ref=part(3,workspace,0,1,BrickColor.new("Really red"),"Reference",vt())
  3544. ref.Anchored=true
  3545. ref.CFrame=cf(pos)
  3546. so("161006093",ref,.5,2.5)
  3547. so("199145350",ref,1,1.5)
  3548. game:GetService("Debris"):AddItem(ref,.2)
  3549. MagicCircle(BrickColor.new(NewCol),cf(pos),10,10,10,6,6,6,0.07)
  3550. dra=math.random(-50,50)
  3551. table.insert(Effects,{cf(pos),"BuffEff",10})
  3552. MagniBuff(ref,9,"Damage",-math.random(5,7)/100,300)
  3553. MagniBuff(ref,9,"Movement",-math.random(6,8)/100,100)
  3554. table.remove(Effects,e)
  3555. end
  3556. end
  3557. if Thing[2]=="Shoot2" then
  3558. local Look=Thing[1]
  3559. local hit,pos = rayCast(Thing[4],Look,5,Character)
  3560. local mag=(Thing[4]-pos).magnitude
  3561. MagicHead(BrickColor.new(NewCol2),CFrame.new((Thing[4]+pos)/2,pos)*angles(1.57,0,0),1,mag*5,1,.5,0,.5,.2)
  3562. Thing[4]=Thing[4]+(Look*5)
  3563. Thing[3]=Thing[3]-1
  3564. if hit~=nil then
  3565. Thing[3]=0
  3566. end
  3567. if Thing[3]<=0 then
  3568. ref=part(3,workspace,0,1,BrickColor.new("Really red"),"Reference",vt())
  3569. ref.Anchored=true
  3570. ref.CFrame=cf(pos)
  3571. so("161006093",ref,.5,2.5)
  3572. game:GetService("Debris"):AddItem(ref,.2)
  3573. MagicCircle(BrickColor.new(NewCol2),cf(pos),10,10,10,3,3,3,0.07)
  3574. dra=math.random(-50,50)
  3575. for i=.785,6.28,.785 do
  3576. MagicCircle2(BrickColor.new(NewCol2),cf(pos)*euler(dra,0,i),2,2.5,2,-.025,1,-.025,.08,.7)
  3577. end
  3578. MagniDamage(ref,7,Thing[5],Thing[6],0,"Normal",ref,0,1,math.random(3,8),nil,nil,true)
  3579. table.remove(Effects,e)
  3580. end
  3581. end
  3582. --table.insert(Effects,{OOrbs[i][1],"Sentry",OOrbs[i][3],0,200})
  3583. if Thing[2]=="Sentry" then
  3584. if Thing[1].Parent~=nil then
  3585. Thing[4]=Thing[4]+1
  3586. if Thing[4]>=Thing[5] then
  3587. MagicCircle(BrickColor.new(NewCol2),Thing[3].CFrame,5,5,5,4,4,4,.1,1,nil,nil,0)
  3588. MagicCircle(BrickColor.new(NewCol),Thing[3].CFrame,5,5,5,2,2,2,.1,1,nil,nil,0)
  3589. target,distance=findNearestTorso(Thing[3].Position)
  3590. if target~=nil then
  3591. tpos=target.Position+vt(math.random(-100,100)/100,math.random(-100,100)/100,math.random(-100,100)/100)
  3592. local MouseLook=cf((Thing[3].Position+tpos)/2,tpos)
  3593. table.insert(Effects,{MouseLook.lookVector,"Shoot2",30,Thing[3].Position,5,7})
  3594. end
  3595. t2,d2=findNearestAlly(Thing[3].Position)
  3596. if t2==nil then
  3597. t2=Torso
  3598. end
  3599. if t2~=nil then
  3600. tpos=t2.Position+vt(0,0,0)
  3601. local MouseLook=cf((Thing[3].Position+tpos)/2,tpos)
  3602. table.insert(Effects,{MouseLook.lookVector,"ShootBuff",30,Thing[3].Position})
  3603. end
  3604. Thing[4]=0
  3605. Thing[5]=math.random(100,150)
  3606. end
  3607. else
  3608. table.remove(Effects,e)
  3609. end
  3610. end
  3611. --table.insert(Effects,{OOrbs[i][1],"Protect",OOrbs[i][3],0,50,tar1,tar1.Parent})
  3612. if Thing[2]=="Protect" then
  3613. if Thing[1].Parent~=nil then
  3614. Thing[4]=Thing[4]+1
  3615. if Thing[4]>=Thing[5] then
  3616. MagicCircle(BrickColor.new(NewCol),Thing[6].CFrame,30,30,30,-1,-1,-1,.05,1,nil,nil,0)
  3617. so("199145350",Thing[6],1,1)
  3618. if math.random(1,2)==1 then
  3619. table.insert(Effects,{Thing[3],"BuffEff2",15})
  3620. DecreaseStat(Thing[7],"Damage",-math.random(5,7)/100,300)
  3621. DecreaseStat(Thing[7],"Defense",-math.random(3,5)/100,500)
  3622. else
  3623. MagniHeal(Thing[6],5,2,3)
  3624. local refbb=part(3,workspace,0,1,BrickColor.new("Black"),"Reference",vt())
  3625. refbb.Anchored=true
  3626. refbb.CFrame=cf(Thing[3].Position)
  3627. game:GetService("Debris"):AddItem(refbb,10)
  3628. table.insert(Effects,{Thing[3],"BuffEff3",20,Thing[3],Thing[6],refbb})
  3629. end
  3630. Thing[4]=0
  3631. Thing[5]=math.random(100,150)
  3632. end
  3633. else
  3634. table.remove(Effects,e)
  3635. end
  3636. end
  3637. --table.insert(Effects,{prt56.CFrame,"Orb",50})
  3638. if Thing[2]=="Orb" then
  3639. if Thing[3]>0 then
  3640. Thing[3]=Thing[3]-1
  3641. da=math.random(500,700)/100
  3642. MagicCircle(BrickColor.new(NewCol2),Thing[1],da,da,da,1,1,1,.3,1,nil,nil,0)
  3643. if Thing[3]%10==0 then
  3644. MagicRing(BrickColor.new(NewCol2),Thing[1]*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1,1,.1,1,1,0,.2)
  3645. end
  3646. else
  3647. refd=part(3,workspace,0,1,BrickColor.new("Black"),"Reference",vt())
  3648. refd.Anchored=true
  3649. refd.CFrame=Thing[1]
  3650. game:GetService("Debris"):AddItem(refd,1)
  3651. MagniDamage(refd,5,6,8,0,"Normal",RootPart,0,1,math.random(2,3),nil,nil,true)
  3652. so("315744661",refd,.4,1)
  3653. so("315748949",refd,1,1.5)
  3654. MagicCircle(BrickColor.new(NewCol2),Thing[1],8,8,8,6,6,6,.1,1,nil,nil,0)
  3655. for i=1,3 do
  3656. MagicBlock(BrickColor.new(NewCol2),Thing[1]*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),10,10,10,-.8,-.8,-.8,.08,3)
  3657. end
  3658. table.remove(Effects,e)
  3659. end
  3660. end
  3661. --table.insert(Effects,{shieldref,"ShieldEf"})
  3662. if Thing[2]=="ShieldEf" then
  3663. if Thing[1].Transparency>.5 then
  3664. Thing[1].Transparency=Thing[1].Transparency-.02
  3665. else
  3666. table.remove(Effects,e)
  3667. end
  3668. end
  3669. if Thing[2]=="Shield" then
  3670. if Thing[1].Parent~=nil then
  3671. if Thing[3]>=0 then
  3672. Thing[3]=Thing[3]-1
  3673. else
  3674. MagniBuff(Thing[1],20,"Defense",-.1,200)
  3675. Thing[3]=50
  3676. end
  3677. else
  3678. table.remove(Effects,e)
  3679. end
  3680. end
  3681. --table.insert(Effects,{smtarget,"Smite",200,d1,d2,d3,dur1,dur2,dur3,smtarget.Stats.Decrease,smtarget.Torso,ref2})
  3682. if Thing[2]=="Smite" then
  3683. if Thing[3]>=0 then
  3684. MagicCircle(BrickColor.new(NewCol2),cf(Thing[11].Position),50,50,50,-10,-10,-10,.2,1,nil,nil,.5)
  3685. MagicBlock(BrickColor.new(NewCol2),cf(Thing[11].Position)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))*cf(0,-10,0),2,2,2,-.5,-.5,-.5,.1,3)
  3686. if Thing[3]%3==0 then
  3687. Thing[12].CFrame=cf(Thing[11].Position)*cf(math.random(-1000,1000)/100,0,math.random(-1000,1000)/100)
  3688. hitfloor2a,posfloor2a=rayCast(Thing[12].Position,(CFrame.new(Thing[12].Position,Thing[12].Position - Vector3.new(0,1,0))).lookVector,50,Thing[1])
  3689. if hitfloor2a~=nil then
  3690. Lightning(Thing[11].Position,posfloor2a,5,.5,NewCol2,.5,.4,.1)
  3691. end
  3692. end
  3693. Thing[3]=Thing[3]-1
  3694. Thing[4].Parent=Thing[10]
  3695. Thing[5].Parent=Thing[10]
  3696. Thing[6].Parent=Thing[10]
  3697. Thing[7].Value=9999
  3698. Thing[8].Value=9999
  3699. Thing[9].Value=9999
  3700. else
  3701. Thing[4].Parent=nil
  3702. Thing[5].Parent=nil
  3703. Thing[6].Parent=nil
  3704. table.remove(Effects,e)
  3705. end
  3706. end
  3707. if Thing[2]~="DecreaseStat" and Thing[2]~="showDamage" and Thing[2]~="Orb" and Thing[2]~="Shoot" and Thing[2]~="Sentry" and Thing[2]~="Shoot2" and Thing[2]~="ShootBuff" and Thing[2]~="BuffEff" and Thing[2]~="Protect" and Thing[2]~="BuffEff2" and Thing[2]~="BuffEff3" and Thing[2]~="ShootSeek" and Thing[2]~="DoSeek" and Thing[2]~="Shield" and Thing[2]~="ShieldEf" and Thing[2]~="Smite" then
  3708. if Thing[1].Transparency<=1 then
  3709. if Thing[2]=="Block1" then
  3710. Thing[1].CFrame=Thing[1].CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  3711. Mesh=Thing[7]
  3712. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  3713. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  3714. elseif Thing[2]=="Block2" then
  3715. Thing[1].CFrame=Thing[1].CFrame
  3716. Mesh=Thing[7]
  3717. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  3718. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  3719. --table.insert(Effects,{prt,"Block3",delay,x3,y3,z3,msh,prt.CFrame,math.random(10,50)/100})
  3720. elseif Thing[2]=="Block3" then
  3721. Thing[8]=Thing[8]*cf(0,math.random(50,80)/100,0)
  3722. Thing[1].CFrame=Thing[8]*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  3723. Mesh=Thing[7]
  3724. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  3725. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  3726. elseif Thing[2]=="Block4" then
  3727. --Thing[1].CFrame=Thing[1].CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  3728. Thing[8].C0=euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))*Thing[9]
  3729. Mesh=Thing[7]
  3730. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  3731. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  3732. elseif Thing[2]=="Cylinder" then
  3733. Mesh=Thing[7]
  3734. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  3735. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  3736. elseif Thing[2]=="Blood" then
  3737. Mesh=Thing[7]
  3738. Thing[1].CFrame=Thing[1].CFrame*cf(0,Thing[8],0)
  3739. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  3740. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  3741. elseif Thing[2]=="Elec" then
  3742. Mesh=Thing[7]
  3743. Mesh.Scale=Mesh.Scale+vt(Thing[7],Thing[8],Thing[9])
  3744. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  3745. elseif Thing[2]=="Disappear" then
  3746. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  3747. end
  3748. else
  3749. Part.Parent=nil
  3750. table.remove(Effects,e)
  3751. end
  3752. end
  3753. end
  3754. --end
  3755. end
  3756. end
  3757. end
  3758. fenbarmana2:TweenSize(UDim2.new(.4,0,-4*mana.Value/100,0),nil,1,0.4,true)
  3759. fenbarmana4.Text="Mana("..mana.Value..")"
  3760. fenbarhp2.BackgroundColor3=Color3.new(Humanoid.Health/Humanoid.MaxHealth,0,0)
  3761. fenbarhp2:TweenSize(UDim2.new(Humanoid.Health/Humanoid.MaxHealth,0,1,0),nil,1,0.4,true)
  3762. fenbarhp3.Text="("..math.floor(Humanoid.Health)..")"
  3763. fenbarmove1b:TweenSize(UDim2.new(1*cooldowns[1]/cooldownmax,0,1,0),nil,1,0.4,true)
  3764. fenbarmove2b:TweenSize(UDim2.new(1*cooldowns[2]/cooldownmax,0,1,0),nil,1,0.4,true)
  3765. fenbarmove3b:TweenSize(UDim2.new(1*cooldowns[3]/cooldownmax,0,1,0),nil,1,0.4,true)
  3766. fenbarmove4b:TweenSize(UDim2.new(1*cooldowns[4]/cooldownmax,0,1,0),nil,1,0.4,true)
  3767. for _,c in pairs(Decrease:children()) do
  3768. if c:findFirstChild("Duration")~=nil then
  3769. c.Duration.Value=c.Duration.Value-1
  3770. if c.Duration.Value<=0 then
  3771. c.Parent=nil
  3772. end
  3773. end
  3774. if c.Name=="DecreaseAtk" then
  3775. decreaseatk=decreaseatk+c.Value
  3776. elseif c.Name=="DecreaseDef" then
  3777. decreasedef=decreasedef+c.Value
  3778. elseif c.Name=="DecreaseMvmt" then
  3779. decreasemvmt=decreasemvmt+c.Value
  3780. end
  3781. end
  3782. Atk.Value=1-decreaseatk
  3783. if Atk.Value<=0 then
  3784. Atk.Value=0
  3785. end
  3786. Def.Value=1-decreasedef
  3787. if Def.Value<=0 then
  3788. Def.Value=0.01
  3789. end
  3790. Mvmt.Value=1-decreasemvmt
  3791. if Mvmt.Value<=0 then
  3792. Mvmt.Value=0
  3793. end
  3794. decreaseatk=0
  3795. decreasedef=0
  3796. decreasemvmt=0
  3797. AtkVal=Atk.Value*100
  3798. AtkVal=math.floor(AtkVal)
  3799. AtkVal=AtkVal/100
  3800. fenbardamage.Text="Damage\
  3801. ("..(AtkVal)..")"
  3802. DefVal=Def.Value*100
  3803. DefVal=math.floor(DefVal)
  3804. DefVal=DefVal/100
  3805. fenbardef.Text="Defense\
  3806. ("..(DefVal)..")"
  3807. MvmtVal=Mvmt.Value*100
  3808. MvmtVal=math.floor(MvmtVal)
  3809. MvmtVal=MvmtVal/100
  3810. if Rooted.Value==true then MvmtVal=0 end
  3811. fenbarmove.Text="Walkspeed\
  3812. ("..(MvmtVal)..")"
  3813. fenbarammo1.Text="Orbs\
  3814. "..(#Orbs).."/"..(#OOrbs)..""
  3815. if Stun.Value>=StunT.Value then
  3816. fenbarstun2:TweenSize(UDim2.new(.4,0,-4,0),nil,1,0.4,true)
  3817. else
  3818. fenbarstun2:TweenSize(UDim2.new(.4,0,-4*Stun.Value/StunT.Value,0),nil,1,0.4,true)
  3819. end
  3820. fenbarstun3.Text="Stun("..Stun.Value..")"
  3821. if mana.Value>=100 then
  3822. mana.Value=100
  3823. else
  3824. if mananum<=15 then
  3825. mananum=mananum+1
  3826. else
  3827. mananum=0
  3828. mana.Value=mana.Value+1
  3829. end
  3830. end
  3831. for i=1,#cooldowns do
  3832. if cooldowns[i]>=cooldownmax then
  3833. cooldowns[i]=cooldownmax
  3834. else
  3835. cooldowns[i]=cooldowns[i]+cooldownsadd[i]
  3836. end
  3837. end
  3838. end
  3839.  
  3840.  
  3841. --[[
  3842. Copyrighted (C) Fenrier 2015
  3843. ]]
  3844.  
Add Comment
Please, Sign In to add comment