memberhero

Virtue Test 6

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