memberhero

Virtue Test 2

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