Advertisement
memberhero

LOL2

Mar 29th, 2018
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 103.07 KB | None | 0 0
  1. --[[
  2. Made by Fenrier.
  3. ]]
  4. Player=game:GetService("Players").LocalPlayer
  5. Animate = Player.Character.Animate:Remove()
  6. Character=Player.Character
  7. PlayerGui=Player.PlayerGui
  8. Backpack=Player.Backpack
  9. Torso=Character.Torso
  10. Head=Character.Head
  11. Humanoid=Character.Humanoid
  12. LeftArm=Character["Left Arm"]
  13. LeftLeg=Character["Left Leg"]
  14. RightArm=Character["Right Arm"]
  15. RightLeg=Character["Right Leg"]
  16. LS=Torso["Left Shoulder"]
  17. LH=Torso["Left Hip"]
  18. RS=Torso["Right Shoulder"]
  19. RH=Torso["Right Hip"]
  20. Neck=Torso.Neck
  21. it=Instance.new
  22. vt=Vector3.new
  23. cf=CFrame.new
  24. euler=CFrame.fromEulerAnglesXYZ
  25. angles=CFrame.Angles
  26. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  27. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  28. LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
  29. LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
  30. RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
  31. RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
  32. RootPart=Character.HumanoidRootPart
  33. RootJoint=RootPart.RootJoint
  34. RootCF=euler(-1.57,0,3.14)
  35. attack = false
  36. attackdebounce = false
  37. MMouse=nil
  38. combo=0
  39. local hitfloor,posfloor=nil,nil
  40. local idle=0
  41. local Anim="Idle"
  42. local Effects={}
  43. local Weapon={}
  44. local Welds={}
  45. local decreaseatk=0
  46. local decreasedef=0
  47. local decreasemvmt=0
  48. local Obelisks={}
  49. local maxobelisks=1
  50. local manaregain=8
  51. local passivenum=30
  52. local move1="(Z)\
  53. Energy Laser"
  54. local move2="(X)\
  55. Fissure"
  56. local move3="(C)\
  57. Reinforce"
  58. local move4="(V)\
  59. Broken Dont Use"
  60. local cooldowns={}
  61. local cooldown1=0 table.insert(cooldowns,cooldown1)
  62. local cooldown2=0 table.insert(cooldowns,cooldown2)
  63. local cooldown3=0 table.insert(cooldowns,cooldown3)
  64. local cooldown4=0 table.insert(cooldowns,cooldown4)
  65. local cooldownsadd={}
  66. local cooldownadd1=.35 table.insert(cooldownsadd,cooldownadd1)
  67. local cooldownadd2=.22 table.insert(cooldownsadd,cooldownadd2)
  68. local cooldownadd3=.15 table.insert(cooldownsadd,cooldownadd3)
  69. local cooldownadd4=.15 table.insert(cooldownsadd,cooldownadd4)
  70. local cooldownmax=100
  71. --local damageFunc=workspace.damageFunc
  72. --player
  73. player=nil
  74. --save shoulders
  75. RSH, LSH=nil, nil
  76. --welds
  77. --[[anim=Character:findFirstChild("Animate")
  78. if anim~=nil then
  79. anim.Disabled=true
  80. end]]
  81. RW, LW=Instance.new("Motor"), Instance.new("Motor")
  82. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  83. LH=Torso["Left Hip"]
  84. RH=Torso["Right Hip"]
  85. TorsoColor=Torso.BrickColor
  86. TorsoRed=TorsoColor.Color.r
  87. TorsoGreen=TorsoColor.Color.g
  88. TorsoBlue=TorsoColor.Color.b
  89. NewCol=Color3.new(TorsoRed/2,TorsoGreen/2,.6)
  90. NewCol2=Color3.new(TorsoRed/4,TorsoGreen/4,.6)
  91. if Player:findFirstChild("Color1")~=nil then
  92. NewCol=Player.Color1.Value
  93. end
  94. if Player:findFirstChild("Color2")~=nil then
  95. NewCol2=Player.Color2.Value
  96. end
  97. local mdec=Instance.new("NumberValue",Decrease)
  98. mdec.Name="DecreaseDef"
  99. mdec.Value=.4
  100. local mdec2=Instance.new("NumberValue",Decrease)
  101. mdec2.Name="DecreaseMvmt"
  102. mdec2.Value=.1
  103.  
  104. local Animate=Humanoid.Animator
  105. --[[local animation=Instance.new("Animation")
  106. animation.AnimationId="http://www.roblox.com/Asset?ID=180435571"
  107. local animTrack=Humanoid:LoadAnimation(animation)]]
  108. local canjump=true
  109. function removeControl()
  110. canjump=false
  111. end
  112. function resumeControl()
  113. canjump=true
  114. end
  115. Player.Character.Humanoid.Changed:connect(function()
  116. if canjump==false then
  117. Player.Character.Humanoid.Jump=false
  118. end
  119. end)
  120. ArtificialHB = Instance.new("BindableEvent", script)
  121. ArtificialHB.Name = "Heartbeat"
  122. script:WaitForChild("Heartbeat")
  123. frame = 1 / 30
  124. tf = 0
  125. allowframeloss = true
  126. tossremainder = false
  127. lastframe = tick()
  128. script.Heartbeat:Fire()
  129. game:GetService("RunService").Heartbeat:connect(function(s, p)
  130.  
  131. tf = tf + s
  132. if frame <= tf then
  133. if allowframeloss then
  134. script.Heartbeat:Fire()
  135. lastframe = tick()
  136. else
  137. for i = 1, math.floor(tf / frame) do
  138. script.Heartbeat:Fire()
  139. end
  140. lastframe = tick()
  141. end
  142. if tossremainder then
  143. tf = 0
  144. else
  145. tf = tf - frame * math.floor(tf / frame)
  146. end
  147. end
  148. end
  149. )
  150. swait = function(num)
  151.  
  152. if num == 0 or num == nil then
  153. ArtificialHB.Event:wait()
  154. else
  155. for i = 0, num do
  156. ArtificialHB.Event:wait()
  157. end
  158. end
  159. end
  160.  
  161. if Character:findFirstChild("Hashira",true) ~= nil then
  162. Character:findFirstChild("Hashira",true).Parent = nil
  163. end
  164. if Player.PlayerGui:findFirstChild("WeaponGUI",true) ~= nil then
  165. Player.PlayerGui:findFirstChild("WeaponGUI",true).Parent = nil
  166. end
  167. if Character:findFirstChild("Stats",true) ~= nil then
  168. Character:findFirstChild("Stats",true).Parent = nil
  169. end
  170. local Stats=Instance.new("BoolValue")
  171. Stats.Name="Stats"
  172. Stats.Parent=Character
  173. local Atk=Instance.new("NumberValue")
  174. Atk.Name="Damage"
  175. Atk.Parent=Stats
  176. Atk.Value=1
  177. local Def=Instance.new("NumberValue")
  178. Def.Name="Defense"
  179. Def.Parent=Stats
  180. Def.Value=1
  181. local Mvmt=Instance.new("NumberValue")
  182. Mvmt.Name="Movement"
  183. Mvmt.Parent=Stats
  184. Mvmt.Value=1
  185. local Block=Instance.new("BoolValue")
  186. Block.Name="Block"
  187. Block.Parent=Stats
  188. Block.Value=false
  189. local Stun=Instance.new("NumberValue")
  190. Stun.Name="Stun"
  191. Stun.Parent=Stats
  192. Stun.Value=0
  193. local StunT=Instance.new("NumberValue")
  194. StunT.Name="StunThreshold"
  195. StunT.Parent=Stats
  196. StunT.Value=100
  197. local Rooted=Instance.new("BoolValue")
  198. Rooted.Name="Rooted"
  199. Rooted.Parent=Stats
  200. Rooted.Value=false
  201. local Stunned=Instance.new("BoolValue")
  202. Stunned.Name="Stunned"
  203. Stunned.Parent=Stats
  204. Stunned.Value=false
  205. local Stagger=Instance.new("BoolValue")
  206. Stagger.Name="Stagger"
  207. Stagger.Parent=Stats
  208. Stagger.Value=false
  209. local StaggerHit=Instance.new("BoolValue")
  210. StaggerHit.Name="StaggerHit"
  211. StaggerHit.Parent=Stats
  212. StaggerHit.Value=false
  213. local RecentEnemy=Instance.new("ObjectValue")
  214. RecentEnemy.Name="RecentEnemy"
  215. RecentEnemy.Parent=Stats
  216. RecentEnemy.Value=nil
  217. local Decrease=Instance.new("BoolValue")
  218. Decrease.Name="Decrease"
  219. Decrease.Parent=Stats
  220. Decrease.Value=false
  221. local mana=Instance.new("NumberValue")
  222. mana.Name="Mana"
  223. mana.Parent=Stats
  224. mana.Value=0
  225. local passive=Instance.new("NumberValue",Decrease)
  226. passive.Name="DecreaseDef"
  227. passive.Value=-1
  228. local passive2=Instance.new("NumberValue",Decrease)
  229. passive2.Name="DecreaseMvmt"
  230. passive2.Value=passive.Value*-.3
  231. local passive3=Instance.new("NumberValue",Decrease)
  232. passive3.Name="DecreaseAtk"
  233. passive3.Value=.1
  234.  
  235. function NoOutline(Part)
  236. Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
  237. end
  238.  
  239. function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
  240. local fp=it("Part")
  241. fp.formFactor=formfactor
  242. fp.Parent=parent
  243. fp.Reflectance=reflectance
  244. fp.Transparency=transparency
  245. fp.CanCollide=false
  246. fp.Locked=true
  247. fp.BrickColor=brickcolor
  248. fp.Name=name
  249. fp.Size=size
  250. fp.Position=Torso.Position
  251. NoOutline(fp)
  252. fp.Material="SmoothPlastic"
  253. fp:BreakJoints()
  254. return fp
  255. end
  256.  
  257. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  258. local mesh=it(Mesh)
  259. mesh.Parent=part
  260. if Mesh=="SpecialMesh" then
  261. mesh.MeshType=meshtype
  262. if meshid~="nil" then
  263. mesh.MeshId="http://www.roblox.com/asset/?id="..meshid
  264. end
  265. end
  266. mesh.Offset=offset
  267. mesh.Scale=scale
  268. return mesh
  269. end
  270.  
  271. function weld(parent,part0,part1,c0)
  272. local weld=it("Motor")
  273. weld.Parent=parent
  274. weld.Part0=part0
  275. weld.Part1=part1
  276. weld.C0=c0
  277. return weld
  278. end
  279.  
  280. function gui(GuiType,parent,text,backtrans,backcol,pos,size)
  281. local gui=it(GuiType)
  282. gui.Parent=parent
  283. gui.Text=text
  284. gui.BackgroundTransparency=backtrans
  285. gui.BackgroundColor3=backcol
  286. gui.SizeConstraint="RelativeXY"
  287. gui.TextXAlignment="Center"
  288. gui.TextYAlignment="Center"
  289. gui.Position=pos
  290. gui.Size=size
  291. gui.Font="SourceSans"
  292. gui.FontSize="Size14"
  293. gui.TextWrapped=false
  294. gui.TextStrokeTransparency=0
  295. gui.TextColor=BrickColor.new("White")
  296. return gui
  297. end
  298.  
  299. local Color1=Torso.BrickColor
  300.  
  301. local fengui=it("GuiMain")
  302. fengui.Parent=Player.PlayerGui
  303. fengui.Name="WeaponGUI"
  304. local fenframe=it("Frame")
  305. fenframe.Parent=fengui
  306. fenframe.BackgroundColor3=Color3.new(255,255,255)
  307. fenframe.BackgroundTransparency=1
  308. fenframe.BorderColor3=Color3.new(17,17,17)
  309. fenframe.Size=UDim2.new(0.1,0,0.1,0)
  310. fenframe.Position=UDim2.new(0.95,0,0.7,0)
  311. local fenframe2=it("Frame")
  312. fenframe2.Parent=fengui
  313. fenframe2.BackgroundColor3=Color3.new(255,255,255)
  314. fenframe2.BackgroundTransparency=1
  315. fenframe2.BorderColor3=Color3.new(17,17,17)
  316. fenframe2.Size=UDim2.new(0.2,0,0.1,0)
  317. fenframe2.Position=UDim2.new(0.4,0,0.85,0)
  318. local fenframe3=it("Frame")
  319. fenframe3.Parent=fengui
  320. fenframe3.BackgroundColor3=Color3.new(255,255,255)
  321. fenframe3.BackgroundTransparency=1
  322. fenframe3.BorderColor3=Color3.new(17,17,17)
  323. fenframe3.Size=UDim2.new(0.2,0,0.2,0)
  324. fenframe3.Position=UDim2.new(0.8,0,0.8,0)
  325. local fenframe4=it("Frame")
  326. fenframe4.Parent=fengui
  327. fenframe4.BackgroundColor3=Color3.new(255,255,255)
  328. fenframe4.BackgroundTransparency=1
  329. fenframe4.BorderColor3=Color3.new(17,17,17)
  330. fenframe4.Size=UDim2.new(0.1,0,0.1,0)
  331. fenframe4.Position=UDim2.new(0,0,0.7,0)
  332. local pressedf=false
  333. local fenframe5=it("Frame")
  334. fenframe5.Parent=fengui
  335. fenframe5.BackgroundColor3=Color3.new(0,0,0)
  336. fenframe5.BackgroundTransparency=1
  337. fenframe5.BorderColor3=Color3.new(0,0,0)
  338. fenframe5.Size=UDim2.new(1,0,1,0)
  339. fenframe5.Position=UDim2.new(0,0,0,0)
  340. fenframe5.ZIndex=2
  341. 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))
  342. tellbar.Font="Arial"
  343. tellbar.TextScaled=true
  344. tellbar.TextTransparency=1
  345. tellbar.TextStrokeTransparency=1
  346. tellbar.ZIndex=2
  347. local fnumb=0
  348. local fenbarmana1=gui("TextLabel",fenframe,"",0,Color3.new(0,0,0),UDim2.new(0,0,0,0),UDim2.new(.4,0,-4,0))
  349. local fenbarmana2=gui("TextLabel",fenframe,"",0,BrickColor.new(NewCol).Color,UDim2.new(0,0,0,0),UDim2.new(.4,0,0,0))
  350. 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))
  351. 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))
  352. 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))
  353. 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))
  354. local fenbarhp1=gui("TextLabel",fenframe2,"",0,Color3.new(0,0,0),UDim2.new(-.46,0,1,0),UDim2.new(1.92,0,.4,0))
  355. local fenbarhp2=gui("TextLabel",fenbarhp1,"",0,Color3.new(1,0,0),UDim2.new(0,0,0,0),UDim2.new(0,0,1,0))
  356. local fenbarhp3=gui("TextLabel",fenbarhp1,"(100)",1,Color3.new(0,0,0),UDim2.new(0,0,0,0),UDim2.new(1,0,1,0))
  357. local fenbarstun1=gui("TextLabel",fenframe4,"",0,Color3.new(0,0,0),UDim2.new(.2,0,0,0),UDim2.new(.4,0,-4,0))
  358. 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))
  359. 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))
  360. 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))
  361. fenbarmove1.ZIndex=2
  362. local fenbarmove1b=gui("TextLabel",fenbarmove1,"",.55,BrickColor.new(NewCol).Color,UDim2.new(0,0,0,0),UDim2.new(0,0,1,0))
  363. 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))
  364. fenbarmove2.ZIndex=2
  365. local fenbarmove2b=gui("TextLabel",fenbarmove2,"",.55,BrickColor.new(NewCol).Color,UDim2.new(0,0,0,0),UDim2.new(0,0,1,0))
  366. 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))
  367. fenbarmove3.ZIndex=2
  368. local fenbarmove3b=gui("TextLabel",fenbarmove3,"",.55,BrickColor.new(NewCol).Color,UDim2.new(0,0,0,0),UDim2.new(0,0,1,0))
  369. 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))
  370. fenbarmove4.ZIndex=2
  371. local fenbarmove4b=gui("TextLabel",fenbarmove4,"",.55,BrickColor.new(NewCol).Color,UDim2.new(0,0,0,0),UDim2.new(0,0,1,0))
  372. local fenbaroblsk1=gui("TextButton",fenframe2,"Obelisks",.55,BrickColor.new(NewCol2).Color,UDim2.new(1.26,0,0,0),UDim2.new(.2,0,1,0))
  373.  
  374. local modelzorz=Instance.new("Model")
  375. modelzorz.Parent=Character
  376. modelzorz.Name="Hashira"
  377.  
  378. local prt1=part(3,modelzorz,0,0,TorsoColor,"Part01",vt(0.2,0.2,0.2))
  379. local prt2=part(3,modelzorz,.5,0,BrickColor.new("Light stone grey"),"Part02",vt(0.2,0.2,0.2))
  380. local prt3=part(3,modelzorz,0,0,BrickColor.new(NewCol),"Part03",vt(0.2,0.2,0.2))
  381. local prt4=part(3,modelzorz,0,0,BrickColor.new(NewCol),"Part04",vt(0.2,0.2,0.2))
  382. local prt5=part(3,modelzorz,0,0,BrickColor.new(NewCol),"Part05",vt(0.2,0.2,0.2))
  383. local prt6=part(3,modelzorz,.5,0,BrickColor.new("Light stone grey"),"Part06",vt(0.2,0.2,0.2))
  384. local prt7=part(3,modelzorz,0,0,BrickColor.new(NewCol),"Part07",vt(0.2,0.2,0.2))
  385. local prt8=part(3,modelzorz,0,0,BrickColor.new(NewCol),"Part08",vt(0.2,0.2,0.2))
  386. local prt9=part(3,modelzorz,0,0,BrickColor.new(NewCol),"Part09",vt(0.2,0.2,0.2))
  387. local prt10=part(3,modelzorz,.5,0,BrickColor.new("Light stone grey"),"Part10",vt(0.2,0.2,0.2))
  388. local prt11=part(3,modelzorz,.2,0,BrickColor.new(NewCol),"Part11",vt(0.2,0.2,0.2))
  389. local prt12=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part12",vt(0.2,0.2,0.2))
  390. local prt13=part(3,modelzorz,.2,0,BrickColor.new(NewCol),"Part13",vt(0.2,0.2,0.2))
  391. local prt14=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part14",vt(0.2,0.2,0.2))
  392. local prt15=part(3,modelzorz,.2,0,BrickColor.new(NewCol),"Part15",vt(0.2,0.2,0.2))
  393. local prt16=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part16",vt(0.2,0.2,0.2))
  394. local prt17=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part17",vt(0.2,0.2,0.2))
  395. local prt18=part(3,modelzorz,.5,0,BrickColor.new("Light stone grey"),"Part18",vt(0.2,0.2,0.2))
  396. local prt19=part(3,modelzorz,0,0,BrickColor.new(NewCol),"Part19",vt(0.2,0.2,0.2))
  397. local prt20=part(3,modelzorz,0,0,BrickColor.new(NewCol),"Part20",vt(0.2,0.2,0.2))
  398.  
  399. local msh1=mesh("BlockMesh",prt1,"","",vt(0,0,0),vt(1,1,1))
  400. local msh2=mesh("CylinderMesh",prt2,"","",vt(0,0,0),vt(2,20,2))
  401. local msh3=mesh("SpecialMesh",prt3,"FileMesh","1778999",vt(0,0,0),vt(.8,.8,.8))
  402. local msh4=mesh("CylinderMesh",prt4,"","",vt(0,0,0),vt(5,.5,5))
  403. local msh5=mesh("CylinderMesh",prt5,"","",vt(0,0,0),vt(3,10,3))
  404. local msh6=mesh("CylinderMesh",prt6,"","",vt(0,0,0),vt(4,3,4))
  405. local msh7=mesh("SpecialMesh",prt7,"FileMesh","9756362",vt(0,0,0),vt(.8,1,.8))
  406. local msh8=mesh("SpecialMesh",prt8,"FileMesh","1778999",vt(0,0,0),vt(.8,.8,.8))
  407. local msh9=mesh("CylinderMesh",prt9,"","",vt(0,0,0),vt(5.4,2,5.4))
  408. local msh10=mesh("CylinderMesh",prt10,"","",vt(0,0,0),vt(4.5,1,4.5))
  409. local msh11=mesh("BlockMesh",prt11,"","",vt(0,0,0),vt(10,6,6))
  410. local msh12=mesh("BlockMesh",prt12,"","",vt(0,0,0),vt(10,4,7))
  411. local msh13=mesh("BlockMesh",prt13,"","",vt(0,0,0),vt(15,6,5.9))
  412. local msh14=mesh("BlockMesh",prt14,"","",vt(0,0,0),vt(13,4,6.9))
  413. local msh15=mesh("BlockMesh",prt15,"","",vt(0,0,0),vt(15,6,5.9))
  414. local msh16=mesh("BlockMesh",prt16,"","",vt(0,0,0),vt(13,4,6.9))
  415. local msh17=mesh("CylinderMesh",prt17,"","",vt(0,0,0),vt(6,2,6))
  416. local msh18=mesh("SpecialMesh",prt18,"FileMesh","1778999",vt(0,0,0),vt(.9,.3,.9))
  417. local msh19=mesh("SpecialMesh",prt19,"FileMesh","9756362",vt(0,0,0),vt(1.5,1.2,1.2))
  418. local msh20=mesh("SpecialMesh",prt20,"FileMesh","9756362",vt(0,0,0),vt(1.5,1.2,1.2))
  419.  
  420. local wld1=weld(prt1,prt1,Torso,euler(0,0,-2.5)*cf(-1.4,-2,-.6))
  421. local wld2=weld(prt1,prt2,prt1,euler(0,0,0)*cf(0,0,0))
  422. local wld3=weld(prt1,prt3,prt2,euler(0,0,0)*cf(0,2,0))
  423. local wld4=weld(prt1,prt4,prt3,euler(0,0,0)*cf(0,.6,0))
  424. local wld5=weld(prt1,prt5,prt2,euler(0,0,0)*cf(0,-1,0))
  425. local wld6=weld(prt1,prt6,prt5,euler(0,0,0)*cf(0,-1,0))
  426. local wld7=weld(prt1,prt7,prt6,euler(0,0,0)*cf(0,0,0))
  427. local wld8=weld(prt1,prt8,prt6,euler(3.14,0,0)*cf(0,0,0))
  428. local wld9=weld(prt1,prt9,prt8,euler(0,0,0)*cf(0,.85,0))
  429. local wld10=weld(prt1,prt10,prt9,euler(0,0,0)*cf(0,.3,0))
  430. local wld11=weld(prt1,prt11,prt10,euler(0,0,0)*cf(0,.7,0))
  431. local wld12=weld(prt1,prt12,prt11,euler(0,0,0)*cf(0,0,0))
  432. local wld13=weld(prt1,prt13,prt11,cf(1.45,0,0)*euler(0,0,.2)*cf(.9,0,0))
  433. local wld14=weld(prt1,prt14,prt13,euler(0,0,0)*cf(-.2,0,0))
  434. local wld15=weld(prt1,prt15,prt11,cf(-1.45,0,0)*euler(0,0,-.2)*cf(-.9,0,0))
  435. local wld16=weld(prt1,prt16,prt15,euler(0,0,0)*cf(.2,0,0))
  436. local wld17=weld(prt1,prt17,prt11,euler(0,0,0)*cf(0,.8,0))
  437. local wld18=weld(prt1,prt18,prt17,euler(3.14,0,0)*cf(0,.45,0))
  438. local wld19=weld(prt1,prt19,prt13,euler(.785,0,0)*cf(1.5,0,0))
  439. local wld20=weld(prt1,prt20,prt15,euler(.785,0,0)*cf(-1.5,0,0))
  440.  
  441. theprt=prt13
  442. eul=-1.57
  443. for i=1,2 do
  444. if i==2 then
  445. theprt=prt15
  446. end
  447. eul1=0
  448. for b=.8,-1.6,-1.6 do
  449. num=-1
  450. for j=1,3 do
  451. local prt21=part(3,modelzorz,.5,0,BrickColor.new("Light stone grey"),"Part21",vt(0.2,0.2,0.2))
  452. local msh21=mesh("SpecialMesh",prt21,"Wedge","nil",vt(0,0,0),vt(1,2,2))
  453. local wld21=weld(prt1,prt21,theprt,euler(1.57,eul,eul1)*cf(num,b,0))
  454. num=num+1
  455. end
  456. if i==1 then
  457. eul1=eul1+1.57
  458. else
  459. eul1=eul1-1.57
  460. end
  461. end
  462. eul=eul+3.14
  463. end
  464.  
  465. --[[for i=1,10 do
  466. local oprt1=part(3,modelzorz,0,0,BrickColor.new(NewCol2),"Obsidian Part1",vt())
  467. local omsh1=mesh("BlockMesh",oprt1,"","",vt(0,0,0),vt(1,1,1))
  468. local owld1=weld(oprt1,oprt1,prt5,euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))*cf(.25,math.random(-60,80)/100,0)*euler(0,math.random(-50,50),0))
  469. end]]
  470.  
  471. --[[for d=1,3 do
  472. thepart=prt11
  473. if d==2 then
  474. thepart=prt13
  475. elseif d==3 then
  476. thepart=prt15
  477. end
  478. for i=1,20 do
  479. eul=math.random(40,70)/100
  480. num1=math.random(-550,550)/1000
  481. if i>=10 then
  482. eul=math.random(-70,-40)/100
  483. end
  484. local oprt1=part(3,modelzorz,0,0,BrickColor.new(NewCol2),"Obsidian Part2",vt())
  485. local omsh1=mesh("BlockMesh",oprt1,"","",vt(0,0,0),vt(1,1,1))
  486. local owld1=weld(oprt1,oprt1,thepart,euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))*cf(math.random(-100,100)/100,eul,num1))
  487. end
  488. end]]
  489.  
  490. for _,c in pairs(modelzorz:children()) do
  491. table.insert(Weapon,c)
  492. end
  493. for _,c in pairs(prt1:children()) do
  494. if c.className=="Motor" then
  495. table.insert(Welds,c)
  496. end
  497. end
  498. local hitbox=part(3,modelzorz,0,1,BrickColor.new("Black"),"Hitbox2",vt(0.2,0.2,0.2))
  499. hitbox.Anchored=false
  500. local hbwld=weld(hitbox,hitbox,RootPart,euler(0,0,0)*cf(0,0,0))
  501. local hitbox2=part(3,nil,0,1,BrickColor.new("Black"),"Hitbox",vt(1,1,1))
  502. hitbox2.Anchored=true
  503. local hitboxCF=cf(0,0,0)
  504.  
  505. hboxpos=Instance.new("BodyPosition",nil)
  506. hboxpos.P=2000
  507. hboxpos.D=100
  508. hboxpos.maxForce=Vector3.new(545000,545000,545000)
  509.  
  510. function hitboxweld()
  511. hbwld.Parent=modelzorz
  512. hbwld.Part0=hitbox
  513. hbwld.Part1=prt11
  514. end
  515.  
  516. if (script.Parent.className~="HopperBin") then
  517. Tool=Instance.new("HopperBin")
  518. Tool.Parent=Backpack
  519. Tool.Name="Hashira"
  520. script.Parent=Tool
  521. end
  522. Bin=script.Parent
  523. if Bin.Name=="Obsidian: Enigmatic" then
  524. Bin.Name="Hashira"
  525. end
  526.  
  527. local bodvel=Instance.new("BodyVelocity")
  528. local bg=Instance.new("BodyGyro")
  529.  
  530. so = function(id,par,vol,pit)
  531. local sou = Instance.new("Sound",par or workspace)
  532. sou.Volume=vol
  533. sou.Pitch=pit or 1
  534. sou.SoundId="http://www.roblox.com/asset/?id="..id
  535. coroutine.resume(coroutine.create(function(Sound)
  536. swait()
  537. Sound:play()
  538. end),sou)
  539. game:GetService("Debris"):AddItem(sou,6)
  540. end
  541.  
  542. function clerp(a,b,t)
  543. local qa = {QuaternionFromCFrame(a)}
  544. local qb = {QuaternionFromCFrame(b)}
  545. local ax, ay, az = a.x, a.y, a.z
  546. local bx, by, bz = b.x, b.y, b.z
  547. local _t = 1-t
  548. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  549. end
  550.  
  551. function QuaternionFromCFrame(cf)
  552. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  553. local trace = m00 + m11 + m22
  554. if trace > 0 then
  555. local s = math.sqrt(1 + trace)
  556. local recip = 0.5/s
  557. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  558. else
  559. local i = 0
  560. if m11 > m00 then
  561. i = 1
  562. end
  563. if m22 > (i == 0 and m00 or m11) then
  564. i = 2
  565. end
  566. if i == 0 then
  567. local s = math.sqrt(m00-m11-m22+1)
  568. local recip = 0.5/s
  569. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  570. elseif i == 1 then
  571. local s = math.sqrt(m11-m22-m00+1)
  572. local recip = 0.5/s
  573. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  574. elseif i == 2 then
  575. local s = math.sqrt(m22-m00-m11+1)
  576. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  577. end
  578. end
  579. end
  580.  
  581. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  582. local xs, ys, zs = x + x, y + y, z + z
  583. local wx, wy, wz = w*xs, w*ys, w*zs
  584. local xx = x*xs
  585. local xy = x*ys
  586. local xz = x*zs
  587. local yy = y*ys
  588. local yz = y*zs
  589. local zz = z*zs
  590. 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))
  591. end
  592.  
  593. function QuaternionSlerp(a, b, t)
  594. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  595. local startInterp, finishInterp;
  596. if cosTheta >= 0.0001 then
  597. if (1 - cosTheta) > 0.0001 then
  598. local theta = math.acos(cosTheta)
  599. local invSinTheta = 1/math.sin(theta)
  600. startInterp = math.sin((1-t)*theta)*invSinTheta
  601. finishInterp = math.sin(t*theta)*invSinTheta
  602. else
  603. startInterp = 1-t
  604. finishInterp = t
  605. end
  606. else
  607. if (1+cosTheta) > 0.0001 then
  608. local theta = math.acos(-cosTheta)
  609. local invSinTheta = 1/math.sin(theta)
  610. startInterp = math.sin((t-1)*theta)*invSinTheta
  611. finishInterp = math.sin(t*theta)*invSinTheta
  612. else
  613. startInterp = t-1
  614. finishInterp = t
  615. end
  616. end
  617. 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
  618. end
  619.  
  620. function hideanim()
  621. equipped=false
  622. for i=0,1,0.1 do
  623. swait()
  624. wld1.C0=clerp(wld1.C0,euler(.2,0,0)*cf(0,1,.2)*euler(0,0,-.4),.3)
  625. wld2.C0=clerp(wld2.C0,euler(0,.2,0)*cf(0,-.4,0),.3)
  626. Neck.C0=clerp(Neck.C0,necko*euler(-.4,0,-.6),.3)
  627. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  628. RW.C0=clerp(RW.C0,cf(1.5,0.8,0)*euler(3.3,0,.4),.3)
  629. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  630. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.2,0,-.4),.3)
  631. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  632. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,0,0),.3)
  633. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,0,0),.3)
  634. end
  635. mdec2.Parent=nil
  636. mdec.Parent=Decrease
  637. wld1.Part1=Torso
  638. wld1.C0=euler(0,0,-2.5)*cf(-1.4,-2,-.6)
  639. wld2.C0=euler(0,0,0)*cf(0,0,0)
  640. for i=0,1,0.2 do
  641. swait()
  642. Neck.C0=clerp(Neck.C0,necko*euler(0,0,0),.5)
  643. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.5)
  644. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,0),.5)
  645. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.5)
  646. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,0),.5)
  647. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.5)
  648. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,0,0),.5)
  649. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,0,0),.5)
  650. end
  651. end
  652.  
  653. mdec.Parent=Decrease
  654. function equipanim()
  655. equipped=true
  656. mdec.Parent=nil
  657. mdec2.Parent=Decrease
  658. for i=0,1,0.1 do
  659. swait()
  660. Neck.C0=clerp(Neck.C0,necko*euler(-.4,0,-.6),.3)
  661. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  662. RW.C0=clerp(RW.C0,cf(1.5,0.8,0)*euler(3.3,0,.4),.3)
  663. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  664. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.2,0,-.4),.3)
  665. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  666. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,0,0),.3)
  667. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,0,0),.3)
  668. end
  669. wld1.Part1=RightArm
  670. wld1.C0=euler(.2,0,0)*cf(0,1,.2)*euler(0,0,-.4)
  671. wld2.C0=euler(0,.2,0)*cf(0,-.4,0)
  672. --[[wld1.C0=clerp(wld1.C0,euler(1.57,0,0)*cf(0,1,.2),.15)
  673. wld2.C0=clerp(wld2.C0,euler(0,1.57,0)*cf(0,-1.4,0)*euler(-1.4,0,.2),.15)]]
  674. end
  675.  
  676. function StaggerAnim()
  677. attack=true
  678. removeControl()
  679. for i=1,math.random(2,4) do
  680. 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)
  681. end
  682. for i=0,1,0.35 do
  683. swait()
  684. if Rooted.Value==false then Torso.Velocity=RootPart.CFrame.lookVector*-40 end
  685. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.5)*euler(.1,0,0),.3)
  686. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(-.2,0,-.4),.3)
  687. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.2,0,.7)*euler(0,-.7,0),.3)
  688. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  689. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.2,0,-.4)*euler(0,.4,0),.3)
  690. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  691. RH.C0=clerp(RH.C0,cf(1,-.8,0)*euler(0,1.57,0)*euler(-.5,0,.6),.3)
  692. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,.2,.2),.3)
  693. end
  694. for i=0,1,0.2 do
  695. swait()
  696. if Rooted.Value==false then Torso.Velocity=RootPart.CFrame.lookVector*-40 end
  697. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.5)*euler(.1,0,0),.4)
  698. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.2)*euler(-.5,0,-.4),.4)
  699. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.2,0,.7)*euler(0,-.7,0),.4)
  700. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  701. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.2,0,-.4)*euler(0,.4,0),.4)
  702. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  703. RH.C0=clerp(RH.C0,cf(1,-.8,0)*euler(0,1.57,0)*euler(-.5,0,.6),.4)
  704. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,.2,.5),.4)
  705. end
  706. for i=0,1,0.1 do
  707. swait()
  708. wld1.C0=clerp(wld1.C0,euler(1.57,0,0)*cf(0,1,0),.3)
  709. wld2.C0=clerp(wld2.C0,euler(0,3.14-.4,0)*cf(0,-1,0),.3)
  710. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.4)*euler(.5,0,0),.3)
  711. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-1.8)*euler(-.2,0,-.4),.3)
  712. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.3,0,.4)*euler(0,-.4,0),.3)
  713. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  714. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.3,0,-.2)*euler(0,.4,0),.3)
  715. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  716. RH.C0=clerp(RH.C0,cf(1,-.8,0)*euler(0,1.57,0)*euler(-.5,0,1.2),.3)
  717. LH.C0=clerp(LH.C0,cf(-1,0,-1)*euler(0,-1.57,0)*euler(0,.2,.2),.3)
  718. end
  719. for i=1,50 do
  720. swait()
  721. if Stun.Value>=StunT.Value then
  722. break
  723. end
  724. end
  725. resumeControl()
  726. combo=0
  727. attack=false
  728. end
  729.  
  730. function StaggerHitt() end
  731.  
  732. function StunAnim()
  733. attack=true
  734. removeControl()
  735. Stunned.Value=true
  736. showDamage(Character,"Stunned","Interrupt")
  737. local dec=Instance.new("NumberValue",Decrease)
  738. dec.Name="DecreaseMvmt"
  739. dec.Value=10
  740. for i=0,1,0.3 do
  741. swait()
  742. wld1.C0=clerp(wld1.C0,euler(1.57,0,0)*cf(0,1,0),.3)
  743. wld2.C0=clerp(wld2.C0,euler(0,1.57,0)*cf(0,-1,0),.3)
  744. Neck.C0=clerp(Neck.C0,necko*euler(-.2,0,-.5),.2)
  745. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(.2,0,-3),.2)
  746. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.2,0,1.3),.2)
  747. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  748. LW.C0=clerp(LW.C0,cf(-1.2,0.5,-.4)*euler(1,0,.4)*euler(0,-.1,0),.2)
  749. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  750. RH.C0=clerp(RH.C0,cf(1,-.6,0)*euler(0,1.57,0)*euler(-.5,0,.3),.25)
  751. LH.C0=clerp(LH.C0,cf(-1,-.8,0)*euler(0,-1.57,0)*euler(-.2,0,0),.25)
  752. end
  753. for i=0,1,0.3 do
  754. swait()
  755. wld1.C0=clerp(wld1.C0,euler(1.57,0,0)*cf(0,1,0),.3)
  756. wld2.C0=clerp(wld2.C0,euler(0,1.57,0)*cf(0,-1,0),.3)
  757. Neck.C0=clerp(Neck.C0,necko*euler(-.3,0,-.5),.2)
  758. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.5)*euler(.8,0,-3),.2)
  759. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.8,0,1.3),.2)
  760. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  761. LW.C0=clerp(LW.C0,cf(-1.2,0.5,-.4)*euler(1.2,0,.8)*euler(0,-.1,0),.2)
  762. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  763. RH.C0=clerp(RH.C0,cf(1,-.6,0)*euler(0,1.57,0)*euler(-.5,0,.6),.25)
  764. LH.C0=clerp(LH.C0,cf(-1,-.8,0)*euler(0,-1.57,0)*euler(.1,0,.7),.25)
  765. end
  766. for i=0,1,0.3 do
  767. swait()
  768. wld1.C0=clerp(wld1.C0,euler(1.57,0,0)*cf(0,1,0),.3)
  769. wld2.C0=clerp(wld2.C0,euler(0,1.57,0)*cf(0,-1,0),.3)
  770. Neck.C0=clerp(Neck.C0,necko*euler(-.3,0,-1),.2)
  771. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-2)*euler(1.57,0,-3),.2)
  772. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.8,0,1.3),.2)
  773. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  774. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.2,0,-.8)*euler(0,-.1,0),.2)
  775. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  776. RH.C0=clerp(RH.C0,cf(1,-.6,0)*euler(0,1.57,0)*euler(-.2,0,.6),.25)
  777. LH.C0=clerp(LH.C0,cf(-1,-.8,0)*euler(0,-1.57,0)*euler(-.1,0,.3),.25)
  778. end
  779. local gairost=Instance.new("BodyGyro")
  780. gairost.Parent=RootPart
  781. gairost.maxTorque=Vector3.new(2000,0,2000)
  782. gairost.P=2000
  783. gairost.cframe=cf(0,0,0)
  784. for i=0,1,0.1 do
  785. swait()
  786. wld1.C0=clerp(wld1.C0,euler(1.57,0,0)*cf(0,1,0),.3)
  787. wld2.C0=clerp(wld2.C0,euler(0,1.57,0)*cf(0,-1,0),.3)
  788. if hitfloor~=nil then
  789. Torso.Velocity=vt(0,0,0)
  790. end
  791. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-1.57),.3)
  792. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-2.5)*euler(1.57,0,-3.14),.3)
  793. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-1.57,0,1.5)*euler(.2,0,0),.3)
  794. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  795. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.5,0,-1.57)*euler(0,0,0),.3)
  796. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  797. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(-.3,.5,0),.3)
  798. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(-.1,.2,0),.3)
  799. end
  800. for i=1,70 do
  801. swait()
  802. gairost.cframe=RootPart.CFrame
  803. if hitfloor~=nil then
  804. Torso.Velocity=vt(0,0,0)
  805. end
  806. end
  807. for i=0,1,0.2 do
  808. swait()
  809. Stun.Value=0
  810. gairost.cframe=RootPart.CFrame
  811. Neck.C0=clerp(Neck.C0,necko*euler(.2,0,0),.3)
  812. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-2)*euler(1,0,-4),.3)
  813. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-1.57,0,1)*euler(.2,-1,0),.3)
  814. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  815. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.2,0,.2)*euler(0,0,0),.3)
  816. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  817. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(-.3,.5,.4),.3)
  818. LH.C0=clerp(LH.C0,cf(-1,-1,-1)*euler(0,-1.57,0)*euler(-.1,.2,1),.3)
  819. end
  820. resumeControl()
  821. gairost.Parent=nil
  822. dec.Parent=nil
  823. Stun.Value=0
  824. combo=0
  825. Stunned.Value=false
  826. attack=false
  827. for i=1,10 do
  828. swait()
  829. Stun.Value=0
  830. end
  831. end
  832.  
  833. function attackone()
  834. attack=true
  835. --[[
  836. wld1.C0=clerp(wld1.C0,euler(.2,0,-.2)*cf(0,1,.2),.3)
  837. wld2.C0=clerp(wld2.C0,euler(0,1.57,0)*cf(0,-1.4,0),.3)
  838. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.6),.3)
  839. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.2)*euler(0,0,-.6),.3)
  840. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.2,0,.8),.3)
  841. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  842. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.4,0,-.2),.3)
  843. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  844. RH.C0=clerp(RH.C0,cf(.9,-1,-.3)*euler(0,1.57,0)*euler(0,.6,-.3),.3)
  845. LH.C0=clerp(LH.C0,cf(-.9,-1,.3)*euler(0,-1.57,0)*euler(0,.6,-.1),.3)
  846. ]]
  847. for i=0,1,0.1 do
  848. swait()
  849. wld1.C0=clerp(wld1.C0,euler(.3,0,-.2)*cf(0,1,0),.3)
  850. wld2.C0=clerp(wld2.C0,euler(0,1.57,0)*cf(0,-1,0),.3)
  851. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-.2),.3)
  852. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-1),.3)
  853. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.2,0,1)*euler(0,-1,0),.3)
  854. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  855. LW.C0=clerp(LW.C0,cf(.2,0.5,-.5)*euler(.8,0,2.2),.3)
  856. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  857. RH.C0=clerp(RH.C0,cf(.9,-1,-.3)*euler(0,1.57,0)*euler(0,1,-.2),.3)
  858. LH.C0=clerp(LH.C0,cf(-.9,-1,.3)*euler(0,-1.57,0)*euler(0,1,-.05),.3)
  859. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  860. break
  861. end
  862. end
  863. so("203691447",prt11,1,1)
  864. --con1=hitbox.Touched:connect(function(hit) Damagefunc(hit,7,9,math.random(2,5),"Normal",RootPart,.5,2,math.random(5,10),nil,true) end)
  865. hbwld.Parent=nil
  866. hboxpos.Parent=hitbox
  867. hitbox.Parent=modelzorz
  868. hitbox.Size=vt(9,2.5,1.5)
  869. hitboxCF=prt11.CFrame*cf(0,.5,0)
  870. hitbox.CFrame=hitboxCF
  871. for i=0,1,0.08 do
  872. swait()
  873. hitboxCF=prt11.CFrame*cf(0,.5,0)
  874. hitbox.CFrame=hitboxCF
  875. MagniDamage(hitbox,8,7,9,math.random(2,5),"Normal",RootPart,.5,2,math.random(3,5),nil,true)
  876. wld1.C0=clerp(wld1.C0,euler(2.2,0,-.2)*cf(0,1,0),.25)
  877. wld2.C0=clerp(wld2.C0,euler(0,1.57,0)*cf(0,-.6,0),.25)
  878. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-.6),.25)
  879. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,1),.25)
  880. RW.C0=clerp(RW.C0,cf(.8,0.5,-.5)*euler(1.4,0,-1.2)*euler(0,-1.4,0),.25)
  881. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.25)
  882. LW.C0=clerp(LW.C0,cf(-1.3,0.5,-.3)*euler(1.4,0,.2),.25)
  883. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.25)
  884. RH.C0=clerp(RH.C0,cf(.9,-1,.3)*euler(0,1.57,0)*euler(0,-1,0),.25)
  885. LH.C0=clerp(LH.C0,cf(-.9,-1,-.3)*euler(0,-1.57,0)*euler(0,-1,0),.25)
  886. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  887. break
  888. end
  889. end
  890. --con1:disconnect()
  891. hitbox.Parent=modelzorz
  892. hitbox.Size=vt()
  893. hitboxweld()
  894. hboxpos.Parent=nil
  895. attack=false
  896. end
  897.  
  898. function attacktwo()
  899. attack=true
  900. for i=0,1,0.07 do
  901. swait()
  902. wld1.C0=clerp(wld1.C0,euler(2.8,0,-.2)*cf(0,1,0),.2)
  903. wld2.C0=clerp(wld2.C0,euler(0,1.57,0)*cf(0,-.6,0),.2)
  904. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.2),.2)
  905. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,1.2),.2)
  906. RW.C0=clerp(RW.C0,cf(.8,0.5,-.5)*euler(1,0,-1.2)*euler(0,-1.4,0),.2)
  907. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  908. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.2,0,.4),.2)
  909. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  910. RH.C0=clerp(RH.C0,cf(.7,-1,.3)*euler(0,1.57,0)*euler(0,-1.2,0),.2)
  911. LH.C0=clerp(LH.C0,cf(-.7,-1,-.3)*euler(0,-1.57,0)*euler(0,-1.2,0),.2)
  912. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  913. break
  914. end
  915. end
  916. so("203691467",prt11,1,1)
  917. --con1=hitbox.Touched:connect(function(hit) Damagefunc(hit,7,9,math.random(2,5),"Normal",RootPart,.5,2,math.random(5,10),nil,true) end)
  918. hbwld.Parent=nil
  919. hboxpos.Parent=hitbox
  920. hitbox.Parent=modelzorz
  921. hitbox.Size=vt(9,2.5,1.5)
  922. hitboxCF=prt11.CFrame*cf(0,.5,0)
  923. hitbox.CFrame=hitboxCF
  924. for i=0,1,0.08 do
  925. swait()
  926. hitboxCF=prt11.CFrame*cf(0,.5,0)
  927. hitbox.CFrame=hitboxCF
  928. MagniDamage(hitbox,8,7,9,math.random(2,5),"Normal",RootPart,.5,2,math.random(3,5),nil,true)
  929. wld1.C0=clerp(wld1.C0,euler(3.8,0,-.2)*cf(0,1,0),.3)
  930. wld2.C0=clerp(wld2.C0,euler(0,1.57,0)*cf(0,-.2,0),.3)
  931. Neck.C0=clerp(Neck.C0,necko*euler(0,0,1),.3)
  932. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-1),.3)
  933. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(.4,0,1.2)*euler(0,-2.4,0),.3)
  934. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  935. LW.C0=clerp(LW.C0,cf(-1,0.5,-.5)*euler(1,0,1),.3)
  936. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  937. RH.C0=clerp(RH.C0,cf(.9,-1,-.3)*euler(0,1.57,0)*euler(0,1,-.2),.3)
  938. LH.C0=clerp(LH.C0,cf(-.9,-1,.3)*euler(0,-1.57,0)*euler(0,1,-.05),.3)
  939. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  940. break
  941. end
  942. end
  943. --con1:disconnect()
  944. hitbox.Parent=modelzorz
  945. hitbox.Size=vt()
  946. hitboxweld()
  947. hboxpos.Parent=nil
  948. attack=false
  949. end
  950.  
  951. function attackthree()
  952. attack=true
  953. for i=0,1,0.1 do
  954. swait()
  955. wld1.C0=clerp(wld1.C0,euler(1.5,0,0)*cf(0,1,0),.3)
  956. wld2.C0=clerp(wld2.C0,euler(0,2.37,0)*cf(0,-.4,0),.3)
  957. Neck.C0=clerp(Neck.C0,necko*euler(0,0,0),.3)
  958. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(-.2,0,0),.3)
  959. RW.C0=clerp(RW.C0,cf(1,1.2,0)*euler(3.6,0,-.8),.3)
  960. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  961. LW.C0=clerp(LW.C0,cf(-1,1.2,0)*euler(3.6,0,.8),.3)
  962. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  963. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,0,-.2),.3)
  964. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,0,.2),.3)
  965. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  966. break
  967. end
  968. end
  969. so("203691492",prt11,1,1)
  970. --con1=hitbox.Touched:connect(function(hit) Damagefunc(hit,7,9,math.random(2,5),"Normal",RootPart,.5,2,math.random(5,10),nil,true) end)
  971. hbwld.Parent=nil
  972. hboxpos.Parent=hitbox
  973. hitbox.Parent=modelzorz
  974. hitbox.Size=vt(9,2.5,1.5)
  975. hitboxCF=prt11.CFrame*cf(0,.5,0)
  976. hitbox.CFrame=hitboxCF
  977. for i=0,1,0.1 do
  978. swait()
  979. hitboxCF=prt11.CFrame*cf(0,.5,0)
  980. hitbox.CFrame=hitboxCF
  981. MagniDamage(hitbox,8,7,9,math.random(2,5),"Normal",RootPart,.5,2,math.random(3,5),nil,true)
  982. wld1.C0=clerp(wld1.C0,euler(1.5,0,0)*cf(0,1,0),.4)
  983. wld2.C0=clerp(wld2.C0,euler(0,2.37,0)*cf(0,-.4,0),.4)
  984. Neck.C0=clerp(Neck.C0,necko*euler(0,0,0),.4)
  985. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(.4,0,0),.4)
  986. RW.C0=clerp(RW.C0,cf(1,.3,-.5)*euler(.5,0,-.8),.4)
  987. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  988. LW.C0=clerp(LW.C0,cf(-1,.3,-.5)*euler(.5,0,.8),.4)
  989. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  990. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(-.2,0,.3),.4)
  991. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(-.2,0,-.7),.4)
  992. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  993. break
  994. end
  995. end
  996. --con1:disconnect()
  997. hitbox.Parent=modelzorz
  998. hitbox.Size=vt()
  999. hitboxweld()
  1000. hboxpos.Parent=nil
  1001. attack=false
  1002. end
  1003.  
  1004. function attackfour()
  1005. attack=true
  1006. for i=0,1,0.1 do
  1007. swait()
  1008. wld1.C0=clerp(wld1.C0,euler(2.2,0,-.2)*cf(0,1,0),.3)
  1009. wld2.C0=clerp(wld2.C0,euler(0,1.57,0)*cf(0,-.6,0),.3)
  1010. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-.2),.3)
  1011. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-1),.3)
  1012. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.4,0,.2)*euler(0,-1.4,0),.3)
  1013. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1014. LW.C0=clerp(LW.C0,cf(0,0.5,-.5)*euler(1.4,0,1),.3)
  1015. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1016. RH.C0=clerp(RH.C0,cf(.9,-1,-.3)*euler(0,1.57,0)*euler(0,1,-.2),.3)
  1017. LH.C0=clerp(LH.C0,cf(-.9,-1,.3)*euler(0,-1.57,0)*euler(0,1,-.05),.3)
  1018. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1019. break
  1020. end
  1021. end
  1022. so("203691447",prt11,1,1)
  1023. --con1=hitbox.Touched:connect(function(hit) Damagefunc(hit,7,9,math.random(2,5),"Normal",RootPart,.2,2,math.random(5,10),nil,true) end)
  1024. hbwld.Parent=nil
  1025. hboxpos.Parent=hitbox
  1026. hitbox.Parent=modelzorz
  1027. hitbox.Size=vt(9,2.5,1.5)
  1028. hitboxCF=prt11.CFrame*cf(0,.5,0)
  1029. hitbox.CFrame=hitboxCF
  1030. CF=RootPart.CFrame.lookVector
  1031. for i=0,1,0.03 do
  1032. swait()
  1033. if i==.21 or (i>=.48 and i<=.51) then
  1034. so("203691447",prt11,1,1)
  1035. end
  1036. hitboxCF=prt11.CFrame*cf(0,.5,0)
  1037. hitbox.CFrame=hitboxCF
  1038. MagniDamage(hitbox,8,4,6,math.random(2,5),"Normal",RootPart,.4,2,math.random(3,5),nil,true)
  1039. wld1.C0=clerp(wld1.C0,euler(2.2,0,-.2)*cf(0,1,0),.3)
  1040. wld2.C0=clerp(wld2.C0,euler(0,1.57,0)*cf(0,-.6,0),.3)
  1041. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-.6),.3)
  1042. --RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,1),.3)
  1043. RootJoint.C0=RootCF*euler(0,0,-1+17*i)
  1044. RW.C0=clerp(RW.C0,cf(.8,0.5,-.5)*euler(1.4,0,-1.2)*euler(0,-1.4,0),.3)
  1045. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1046. LW.C0=clerp(LW.C0,cf(-1.3,0.5,-.3)*euler(1.4,0,.2),.3)
  1047. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1048. RH.C0=clerp(RH.C0,cf(.9,-1,.3)*euler(0,1.57,0)*euler(0,-1,0),.3)
  1049. LH.C0=clerp(LH.C0,cf(-.9,-1,-.3)*euler(0,-1.57,0)*euler(0,-1,0),.3)
  1050. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1051. break
  1052. end
  1053. end
  1054. --con1:disconnect()
  1055. hitbox.Parent=modelzorz
  1056. hitbox.Size=vt()
  1057. hitboxweld()
  1058. hboxpos.Parent=nil
  1059. attack=false
  1060. end
  1061.  
  1062. function Obelisk()
  1063. attack=true
  1064. local cando=true
  1065. if #Obelisks>0 then
  1066. if mana.Value<15 then
  1067. cando=false
  1068. end
  1069. end
  1070. if cando==true then
  1071. for i=0,1,0.1 do
  1072. swait()
  1073. wld1.C0=clerp(wld1.C0,euler(1.5,0,0)*cf(0,1,0),.3)
  1074. wld2.C0=clerp(wld2.C0,euler(0,2.37,0)*cf(0,-.4,0),.3)
  1075. Neck.C0=clerp(Neck.C0,necko*euler(0,0,0),.3)
  1076. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(-.2,0,0),.3)
  1077. RW.C0=clerp(RW.C0,cf(1,1.2,0)*euler(3.6,0,-.8),.3)
  1078. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1079. LW.C0=clerp(LW.C0,cf(-1,1.2,0)*euler(3.6,0,.8),.3)
  1080. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1081. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,0,-.2),.3)
  1082. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,0,.2),.3)
  1083. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1084. break
  1085. end
  1086. end
  1087. local dec=Instance.new("NumberValue",Decrease)
  1088. dec.Name="DecreaseMvmt"
  1089. dec.Value=10
  1090. con1=hitbox.Touched:connect(function(hit) Damagefunc(hit,5,10,math.random(2,5),"Normal",RootPart,.5,2,math.random(5,10),nil,true) end)
  1091. hbwld.Parent=nil
  1092. hboxpos.Parent=hitbox
  1093. hitbox.Parent=modelzorz
  1094. hitbox.Size=vt(9,2.5,1.5)
  1095. hitboxCF=prt11.CFrame*cf(0,.5,0)
  1096. hitbox.CFrame=hitboxCF
  1097. for i=0,1,0.15 do
  1098. swait()
  1099. hitboxCF=prt11.CFrame*cf(0,.5,0)
  1100. hitbox.CFrame=hitboxCF
  1101. wld1.C0=clerp(wld1.C0,euler(1.5,0,0)*cf(0,1,0),.4)
  1102. wld2.C0=clerp(wld2.C0,euler(0,2.37,0)*cf(0,-.4,0),.4)
  1103. Neck.C0=clerp(Neck.C0,necko*euler(0,0,0),.4)
  1104. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(.4,0,0),.4)
  1105. RW.C0=clerp(RW.C0,cf(1,.3,-.5)*euler(.5,0,-.8),.4)
  1106. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  1107. LW.C0=clerp(LW.C0,cf(-1,.3,-.5)*euler(.5,0,.8),.4)
  1108. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  1109. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(-.2,0,.3),.4)
  1110. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(-.2,0,-.7),.4)
  1111. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1112. break
  1113. end
  1114. end
  1115. con1:disconnect()
  1116. hitbox.Parent=modelzorz
  1117. hitbox.Size=vt()
  1118. hitboxweld()
  1119. hboxpos.Parent=nil
  1120. d=Obelisks[1]
  1121. print(d)
  1122. domana=true
  1123.  
  1124. if d~=nil then
  1125. Prt1=d:findFirstChild("Obelisk Part01")
  1126. if Prt1~=nil then
  1127. domana=false
  1128. mana.Value=mana.Value-15
  1129. local refd=part(3,workspace,0,1,BrickColor.new("Black"),"Effect",vt(0.2,0.2,0.2))
  1130. refd.Anchored=true
  1131. refd.CFrame=cf(Prt1.Position)
  1132. game:GetService("Debris"):AddItem(refd,1)
  1133. so("161006069",refd,1,.8)
  1134. so("203691610",refd,1,1)
  1135. MagniDamage(Prt1,15,7,10,math.random(20,30),"Knockdown2",Prt1,0,1,math.random(5,8),nil,nil,true)
  1136. MagicBlock(BrickColor.new(NewCol2),cf(Prt1.Position)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),5,5,5,3,3,3,.05,2)
  1137. for i=-5,5,2.5 do
  1138. MagicRing(BrickColor.new(NewCol2),cf(Prt1.Position)*euler(1.57,0,0)*cf(0,0,i),2,2,2,1,1,.5,.05)
  1139. end
  1140. end
  1141. d.Parent=nil
  1142. end
  1143.  
  1144. MagicCircle(BrickColor.new(NewCol2),cf(prt13.Position),1,1,1,5,5,5,.1)
  1145. local MouseLook=cf((RootPart.Position+MMouse.Hit.p)/2,MMouse.Hit.p)
  1146. local hit,pos = rayCast(RootPart.Position,MouseLook.lookVector,50,Character)
  1147. ref=part(3,workspace,0,1,BrickColor.new("Black"),"Reference",vt(0.2,0.2,0.2))
  1148. ref.Anchored=true
  1149. ref.CFrame=cf(pos)*cf(0,3,0)
  1150. game:GetService("Debris"):AddItem(ref,1)
  1151. hitfloor,posfloor=rayCast(ref.Position,(CFrame.new(ref.Position,ref.Position - Vector3.new(0,1,0))).lookVector,100,Character)
  1152.  
  1153. if hitfloor~=nil then
  1154. local refsate=part(3,workspace,0,1,BrickColor.new("White"),"Reference",vt(0.2,0.2,0.2))
  1155. refsate.Anchored=true
  1156. refsate.CFrame=cf(posfloor)
  1157. game:GetService("Debris"):AddItem(refsate,1)
  1158.  
  1159. local obe=Instance.new("Model",workspace)
  1160. obe.Name="Obelisk"
  1161. game:GetService("Debris"):AddItem(obe,20)
  1162. table.insert(Obelisks,obe)
  1163.  
  1164. local oprt1=part(3,obe,0,0,BrickColor.new(NewCol2),"Obelisk Part01",vt(0.2,0.2,0.2))
  1165. local oprt2=part(3,obe,0,0,BrickColor.new(NewCol2),"Obelisk Part02",vt(0.2,0.2,0.2))
  1166. local oprt6=part(3,obe,0,0,BrickColor.new(NewCol2),"Obelisk Part06",vt(0.2,0.2,0.2))
  1167. local oprt7=part(3,obe,0,0,BrickColor.new(NewCol2),"Obelisk Part07",vt(0.2,0.2,0.2))
  1168. local oprt8=part(3,obe,0,0,BrickColor.new(NewCol2),"Obelisk Part08",vt(0.2,0.2,0.2))
  1169.  
  1170. local omsh1=mesh("BlockMesh",oprt1,"","",vt(0,0,0),vt(1,1,1))
  1171. local omsh2=mesh("BlockMesh",oprt2,"","",vt(0,0,0),vt(10,35,10))
  1172. local omsh6=mesh("SpecialMesh",oprt6,"FileMesh","9756362",vt(0,0,0),vt(2,3,2))
  1173. local omsh7=mesh("SpecialMesh",oprt7,"FileMesh","9756362",vt(0,0,0),vt(4,4,4))
  1174. local omsh8=mesh("SpecialMesh",oprt8,"FileMesh","71494804",vt(0,0,0),vt(2,2,2))
  1175.  
  1176. local owld2=weld(oprt2,oprt2,oprt1,euler(0,0,0)*cf(0,0,0))
  1177. local owld6=weld(oprt6,oprt6,oprt2,euler(0,.785,0)*cf(0,-3.5,0))
  1178. local owld7=weld(oprt7,oprt7,oprt2,euler(0,.785,0)*cf(0,3.5,0))
  1179. local owld8=weld(oprt8,oprt8,oprt6,euler(0,.785,0)*cf(0,-2,0))
  1180.  
  1181. eul=0
  1182. for i=1,4 do
  1183. local oprt3=part(3,obe,0,0,BrickColor.new(NewCol2),"Obelisk Part03",vt(0.2,0.2,0.2))
  1184. local omsh3=mesh("SpecialMesh",oprt3,"Wedge","nil",vt(0,0,0),vt(10,35,5))
  1185. local owld3=weld(oprt3,oprt3,oprt2,euler(0,0,0)*cf(0,0,1.5)*euler(0,eul,0))
  1186. local oprt4=part(3,obe,0,0,BrickColor.new(NewCol2),"Obelisk Part04",vt(0.2,0.2,0.2))
  1187. local omsh4=mesh("SpecialMesh",oprt4,"FileMesh","11294911",vt(0,0,0),vt(2,14.2,2))
  1188. local owld4=weld(oprt4,oprt4,oprt3,euler(0,1.57,0)*cf(1.5,-.05,0))
  1189. local oprt5=part(3,obe,0,0,BrickColor.new("Black"),"Obelisk Part05",vt(0.2,0.2,0.2))
  1190. local omsh5=mesh("SpecialMesh",oprt5,"Wedge","nil",vt(0,0,0),vt(4,35,3))
  1191. --local owld5=weld(oprt5,oprt5,oprt3,euler(-.05,0,0)*cf(0,0,.1))
  1192. local owld5=weld(oprt5,oprt5,oprt3,euler(.1,0,0)*cf(0,1,.3))
  1193. local oprt9=part(3,obe,0,0,BrickColor.new("Black"),"Obelisk Part09",vt(0.2,0.2,0.2))
  1194. local omsh9=mesh("SpecialMesh",oprt9,"Wedge","nil",vt(0,0,0),vt(4,25,3))
  1195. local owld9=weld(oprt9,oprt9,oprt3,euler(2,0,0)*cf(0,2,.2))
  1196. eul=eul+1.57
  1197. end
  1198.  
  1199. oprt1.CFrame=refsate.CFrame
  1200. so("203691785",oprt1,1,1)
  1201. so("183763487",oprt1,1,1)
  1202. f=Instance.new("BodyPosition",oprt1)
  1203. f.P=2000
  1204. f.D=100
  1205. f.maxForce=Vector3.new(545000,545000,545000)
  1206. f.position=refsate.Position+vt(0,math.random(700,900)/100,0)
  1207. --f.position=RootPart.Position+vt(0,math.random(700,900)/100,0)
  1208. ogy=Instance.new("BodyGyro",oprt1)
  1209. ogy.maxTorque=Vector3.new(4e+005,4e+005,4e+005)
  1210. --ogy.maxTorque=Vector3.new(0,4e+005,0)
  1211. ogy.P=2000
  1212. ogy.D=100
  1213. --ogy.cframe=cf(RootPart.Position,oprt1.Position)
  1214. ogy.cframe=cf(0,math.random(-314,314)/100,0)
  1215. oprt1.CFrame=refsate.CFrame
  1216. for i=1,10 do
  1217. MagicObsidian(BrickColor.new(NewCol2),cf(refsate.Position)*cf(math.random(-500,500)/100,0,math.random(-500,500)/100),1,1,1,0,0,0,math.random(2,10)/100)
  1218. end
  1219. MagicBlock(BrickColor.new(NewCol2),cf(oprt1.Position)*cf(0,1,0)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1,1,1,4,4,4,.05,2)
  1220. MagniDamage(oprt1,20,0,0,math.random(-40,-30),"Knockdown2",RootPart,0,1,math.random(5,8),nil,nil,true,"Defense",.05,300)
  1221. table.insert(Effects,{obe,"Obelisk",0,0,oprt1,0,#Obelisks})
  1222. end
  1223. swait(10)
  1224. dec.Parent=nil
  1225. end
  1226. attack=false
  1227. end
  1228.  
  1229. function do1()
  1230. if attack==true then return end
  1231. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then return end
  1232. if cooldowns[1]>=cooldownmax and mana.Value>=10 and #Obelisks>0 then
  1233. --if true then
  1234. attack=true
  1235. cooldowns[1]=0
  1236. for i=0,1,0.1 do
  1237. swait()
  1238. wld1.C0=clerp(wld1.C0,euler(.2,0,-.2)*cf(0,1,.2),.3)
  1239. wld2.C0=clerp(wld2.C0,euler(0,1.57,0)*cf(0,-1.4,0),.3)
  1240. Neck.C0=clerp(Neck.C0,necko*euler(0,0,1)*euler(.2,0,0),.3)
  1241. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.2)*euler(0,0,-1),.3)
  1242. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.5,0,.8),.3)
  1243. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1244. LW.C0=clerp(LW.C0,cf(-1,0.5,-.5)*euler(1.8,0,1),.3)
  1245. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1246. RH.C0=clerp(RH.C0,cf(.7,-1,-.3)*euler(0,1.57,0)*euler(0,1,-.2),.3)
  1247. LH.C0=clerp(LH.C0,cf(-.7,-1,.3)*euler(0,-1.57,0)*euler(0,1,0),.3)
  1248. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1249. break
  1250. end
  1251. end
  1252. so("2101137",LeftArm,1,1)
  1253. for i=1,20 do
  1254. swait()
  1255. MagicBlock(BrickColor.new(NewCol2),LeftArm.CFrame*cf(0,-1,0)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1,1,1,2,2,2,.1,2)
  1256. for i=1,#Obelisks do
  1257. Part=Obelisks[i]:findFirstChild("Obelisk Part06")
  1258. if Part~=nil then
  1259. MagicBlock(BrickColor.new(NewCol2),cf(Part.Position)*cf(0,1,0)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1,1,1,2,2,2,.1,2)
  1260. end
  1261. end
  1262. end
  1263. for i=0,1,0.1 do
  1264. swait()
  1265. wld1.C0=clerp(wld1.C0,euler(.2,0,-.2)*cf(0,1,.2),.3)
  1266. wld2.C0=clerp(wld2.C0,euler(0,1.57,0)*cf(0,-1.4,0),.3)
  1267. Neck.C0=clerp(Neck.C0,necko*euler(0,0,1.57),.3)
  1268. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.2)*euler(0,0,-1.57),.3)
  1269. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.5,0,.8),.3)
  1270. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1271. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.57,0,-1.57),.3)
  1272. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1273. RH.C0=clerp(RH.C0,cf(.7,-1,-.3)*euler(0,1.57,0)*euler(0,1,-.2),.3)
  1274. LH.C0=clerp(LH.C0,cf(-.7,-1,.3)*euler(0,-1.57,0)*euler(0,1,0),.3)
  1275. MagicBlock(BrickColor.new(NewCol2),LeftArm.CFrame*cf(0,-1,0)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1,1,1,2,2,2,.1,2)
  1276. for i=1,#Obelisks do
  1277. Part=Obelisks[i]:findFirstChild("Obelisk Part06")
  1278. if Part~=nil then
  1279. MagicBlock(BrickColor.new(NewCol2),cf(Part.Position)*cf(0,1,0)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1,1,1,2,2,2,.1,2)
  1280. end
  1281. end
  1282. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1283. break
  1284. end
  1285. end
  1286. cooldowns[1]=0
  1287. mana.Value=mana.Value-10
  1288. for i=1,#Obelisks do
  1289. Part=Obelisks[i]:findFirstChild("Obelisk Part06")
  1290. if Part~=nil then
  1291. so("203691562",Part,1,1)
  1292. end
  1293. end
  1294. ref2=part(3,workspace,0,1,BrickColor.new("Black"),"Reference",vt(0.2,0.2,0.2))
  1295. ref2.Anchored=true
  1296. game:GetService("Debris"):AddItem(ref2,10)
  1297. local targ=MMouse.Hit.p
  1298. local mooouse=targ
  1299. for d=1,40 do
  1300. swait()
  1301. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1302. break
  1303. end
  1304. for i=1,#Obelisks do
  1305. Part=Obelisks[i]:findFirstChild("Obelisk Part06")
  1306. if Part~=nil then
  1307. targ=MMouse.Hit.p
  1308. mooouse=mooouse:lerp(targ,.1)
  1309. local MouseLook=cf((Part.Position+mooouse)/2,mooouse)
  1310. local hit,pos = rayCast(Part.Position,MouseLook.lookVector,100,Character)
  1311. local mag=(Part.Position-pos).magnitude
  1312. ref2.CFrame=cf(pos)
  1313. MagicCylinder3(BrickColor.new(NewCol2),CFrame.new((Part.Position+pos)/2,pos)*angles(1.57,0,0),7,mag*5,7,2,1,2,0.1)
  1314. MagicBlock(BrickColor.new(NewCol2),cf(pos),5,5,5,5,5,5,.1,1,workspace)
  1315. if d%3==0 then
  1316. so("228343252",ref2,1,1)
  1317. MagicRing(BrickColor.new(NewCol2),cf(pos)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1,1,1,1.5,1.5,0,.05)
  1318. MagniDamage(ref2,8,4,6,0,"Normal",RootPart,.3,2,math.random(3,4),nil,nil,true,"Obsidian",.02,200)
  1319. end
  1320. end
  1321. end
  1322. end
  1323. ref2.Parent=nil
  1324. --[[if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1325. else
  1326. mana.Value=mana.Value-#Obelisks*5
  1327. for i=1,#Obelisks do
  1328. Part=Obelisks[i]:findFirstChild("Obelisk Part06")
  1329. if Part~=nil then
  1330. so("203691562",Part,1,1)
  1331. Orb(Part)
  1332. end
  1333. end
  1334. end]]
  1335. attack=false
  1336. end
  1337. end
  1338.  
  1339. function do2()
  1340. if attack==true then return end
  1341. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then return end
  1342. if cooldowns[2]>=cooldownmax and mana.Value>=20 then
  1343. --if true then
  1344. attack=true
  1345. cooldowns[2]=0
  1346. local dec=Instance.new("NumberValue",Decrease)
  1347. dec.Name="DecreaseMvmt"
  1348. dec.Value=10
  1349. for i=0,1,0.1 do
  1350. swait()
  1351. wld1.C0=clerp(wld1.C0,euler(1.5,0,0)*cf(0,1,0),.3)
  1352. wld2.C0=clerp(wld2.C0,euler(0,2.37,0)*cf(0,-.4,0),.3)
  1353. Neck.C0=clerp(Neck.C0,necko*euler(0,0,0),.3)
  1354. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(-.2,0,0),.3)
  1355. RW.C0=clerp(RW.C0,cf(1,1.2,0)*euler(3.6,0,-.8),.3)
  1356. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1357. LW.C0=clerp(LW.C0,cf(-1,1.2,0)*euler(3.6,0,.8),.3)
  1358. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1359. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,0,-.2),.3)
  1360. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,0,.2),.3)
  1361. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1362. break
  1363. end
  1364. end
  1365. for i=0,1,0.15 do
  1366. swait()
  1367. wld1.C0=clerp(wld1.C0,euler(1.5,0,0)*cf(0,1,0),.4)
  1368. wld2.C0=clerp(wld2.C0,euler(0,2.37,0)*cf(0,-.4,0),.4)
  1369. Neck.C0=clerp(Neck.C0,necko*euler(0,0,0),.4)
  1370. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(.4,0,0),.4)
  1371. RW.C0=clerp(RW.C0,cf(1,.3,-.5)*euler(.5,0,-.8),.4)
  1372. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  1373. LW.C0=clerp(LW.C0,cf(-1,.3,-.5)*euler(.5,0,.8),.4)
  1374. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  1375. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,0,.2),.4)
  1376. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,0,-.4),.4)
  1377. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1378. break
  1379. end
  1380. end
  1381. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1382. else
  1383. mana.Value=mana.Value-20
  1384. poss=RootPart.CFrame*cf(0,0,-5)
  1385. refb=part(3,workspace,0,0,BrickColor.new("Black"),"Reference",vt(0.2,0.2,0.2))
  1386. refb.Anchored=true
  1387. refb.CFrame=poss
  1388. game:GetService("Debris"):AddItem(refb,10)
  1389. for i=1,15 do
  1390. swait()
  1391. hit,pos=rayCast(refb.Position,(CFrame.new(refb.Position,refb.Position - Vector3.new(0,1,0))).lookVector,40,Character)
  1392. if hit~=nil then
  1393. local ref2=part(3,workspace,0,1,BrickColor.new("Black"),"Effect",vt(0.2,0.2,0.2))
  1394. ref2.Anchored=true
  1395. ref2.CFrame=cf(pos)
  1396. so("2691586",ref2,.4,.4)
  1397. game:GetService("Debris"):AddItem(ref2,1)
  1398. for i=1,#Obelisks do
  1399. ThePrt=Obelisks[i]:findFirstChild("Obelisk Part07")
  1400. if ThePrt~=nil then
  1401. local mag=(ref2.Position-ThePrt.Position).magnitude
  1402. if mag<=8 then
  1403. Prt1=Obelisks[i]:findFirstChild("Obelisk Part01")
  1404. if Prt1~=nil then
  1405. local refd=part(3,workspace,0,1,BrickColor.new("Black"),"Effect",vt(0.2,0.2,0.2))
  1406. refd.Anchored=true
  1407. refd.CFrame=cf(Prt1.Position)
  1408. game:GetService("Debris"):AddItem(refd,1)
  1409. so("161006069",refd,1,.8)
  1410. so("203691610",refd,1,1)
  1411. MagniDamage(Prt1,15,10,15,math.random(-50,-40),"Knockdown2",RootPart,0,1,math.random(15,25),nil,nil,true,"Defense",.05,300)
  1412. MagicBlock(BrickColor.new(NewCol2),cf(Prt1.Position)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),5,5,5,3,3,3,.05,2)
  1413. for i=-5,5,2.5 do
  1414. MagicRing(BrickColor.new(NewCol2),cf(Prt1.Position)*euler(1.57,0,0)*cf(0,0,i),2,2,2,1,1,.5,.05)
  1415. end
  1416. end
  1417. Obelisks[i].Parent=nil
  1418. end
  1419. end
  1420. end
  1421. Col=hit.BrickColor
  1422. MagicWave(Col,cf(pos),1,1,1,1,1,1,.1)
  1423. MagicObsidian(BrickColor.new(NewCol2),cf(pos)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),3,3,3,-.2,-.2,-.2,.05)
  1424. MagniDamage(ref2,8,4,6,math.random(-40,-30),"Knockdown2",RootPart,.3,1,math.random(4,6),nil,nil,true,"Obsidian",.1,300)
  1425. for i=1,5 do
  1426. local groundpart=part(3,workspace,0,0,Col,"Ground",vt(math.random(50,200)/100,math.random(50,200)/100,math.random(50,200)/100))
  1427. groundpart.Anchored=true
  1428. groundpart.Material=hit.Material
  1429. groundpart.CanCollide=true
  1430. groundpart.CFrame=cf(pos)*cf(math.random(-500,500)/100,0,math.random(-500,500)/100)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  1431. game:GetService("Debris"):AddItem(groundpart,5)
  1432. end
  1433. end
  1434. poss=poss*cf(0,0,-3)
  1435. refb.CFrame=poss
  1436. end
  1437. refb.Parent=nil
  1438. end
  1439. dec.Parent=nil
  1440. attack=false
  1441. end
  1442. end
  1443.  
  1444. function do3()
  1445. if attack==true then return end
  1446. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then return end
  1447. if cooldowns[3]>=cooldownmax and mana.Value>=30 then
  1448. --if true then
  1449. attack=true
  1450. cooldowns[3]=0
  1451. local dec=Instance.new("NumberValue",Decrease)
  1452. dec.Name="DecreaseMvmt"
  1453. dec.Value=10
  1454. local dec2=Instance.new("NumberValue",Decrease)
  1455. dec2.Name="DecreaseDef"
  1456. dec2.Value=-10
  1457. LW.C0=clerp(LW.C0,cf(-1,0.5,-.5)*euler(2,0,1),.5)
  1458. for i=0,1,0.1 do
  1459. swait()
  1460. wld1.C0=clerp(wld1.C0,euler(.2,0,-.2)*cf(0,1,.2),.3)
  1461. wld2.C0=clerp(wld2.C0,euler(0,1.57,0)*cf(0,-1.4,0),.3)
  1462. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.2)*euler(.2,0,0),.3)
  1463. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.2)*euler(0,0,-.6),.3)
  1464. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.2,0,.8),.3)
  1465. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1466. LW.C0=clerp(LW.C0,cf(-1,0.5,-.5)*euler(2.8,0,.8),.3)
  1467. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1468. RH.C0=clerp(RH.C0,cf(.9,-1,-.3)*euler(0,1.57,0)*euler(0,.6,-.3),.3)
  1469. LH.C0=clerp(LH.C0,cf(-.9,-1,.3)*euler(0,-1.57,0)*euler(0,.6,-.1),.3)
  1470. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1471. break
  1472. end
  1473. end
  1474. so("315746833",Torso,1,1)
  1475. for i=1,50 do
  1476. swait()
  1477. MagicBlock(BrickColor.new(NewCol2),cf(RootPart.Position)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))*cf(0,-8,0),3,3,3,-.2,-.2,-.2,.05,3)
  1478. end
  1479. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1480. else
  1481. mana.Value=mana.Value-30
  1482. passivenum=-30
  1483. dec.Parent=nil
  1484. dec2.Parent=nil
  1485. passive.Value=-1
  1486. so("87767777",Torso,1,1)
  1487. MagicWave(BrickColor.new(NewCol2),cf(RootPart.Position)*cf(0,-2,0),1,2,1,1,-.02,1,.05)
  1488. MagicCircle(BrickColor.new(NewCol2),cf(Torso.Position),1,1,1,3,3,3,.02)
  1489. MagniDamage(RootPart,20,4,6,math.random(30,50),"Knockdown2",RootPart,0,1,math.random(4,8),nil,nil,false)
  1490. end
  1491. for i=0,1,0.1 do
  1492. swait()
  1493. wld1.C0=clerp(wld1.C0,euler(.2,0,.2)*cf(0,1,.2),.5)
  1494. wld2.C0=clerp(wld2.C0,euler(0,1.57,0)*cf(0,-1.4,0),.5)
  1495. Neck.C0=clerp(Neck.C0,necko*euler(0,0,0)*euler(.2,0,0),.5)
  1496. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.2)*euler(0,0,0),.5)
  1497. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.57,0,1.57),.5)
  1498. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.5)
  1499. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.57,0,-1.57),.5)
  1500. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.5)
  1501. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,0,-.3),.5)
  1502. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,0,-.1),.5)
  1503. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1504. break
  1505. end
  1506. end
  1507. --[[local dec=Instance.new("NumberValue",Decrease)
  1508. dec.Name="DecreaseMvmt"
  1509. dec.Value=10
  1510. for i=0,1,0.1 do
  1511. swait()
  1512. wld1.C0=clerp(wld1.C0,euler(.8,0,0)*cf(0,1,0),.3)
  1513. wld2.C0=clerp(wld2.C0,euler(0,0,0)*cf(0,-1.4,0),.3)
  1514. Neck.C0=clerp(Neck.C0,necko*euler(.2,0,.8)*euler(.1,0,0),.3)
  1515. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.2)*euler(0,0,-.8)*euler(.1,0,0),.3)
  1516. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.5,0,1.2)*euler(0,1.57,0),.3)
  1517. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1518. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.3,0,-1),.3)
  1519. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1520. RH.C0=clerp(RH.C0,cf(.9,-1,-.3)*euler(0,1.57,0)*euler(0,.2,-.3),.3)
  1521. LH.C0=clerp(LH.C0,cf(-.9,-1,.3)*euler(0,-1.57,0)*euler(0,.8,-.1),.3)
  1522. end
  1523. for i=0,1,0.25 do
  1524. swait()
  1525. wld1.C0=clerp(wld1.C0,euler(2.8,0,0)*cf(0,1,0),.4)
  1526. wld2.C0=clerp(wld2.C0,euler(0,0,0)*cf(0,0,0),.4)
  1527. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-.8)*euler(0,0,0),.4)
  1528. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.2)*euler(0,0,.8)*euler(.1,0,0),.4)
  1529. RW.C0=clerp(RW.C0,cf(1.3,0.5,.3)*euler(1.7,0,1)*euler(0,1.57,0),.4)
  1530. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  1531. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-1.57)*euler(.5,0,0),.4)
  1532. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  1533. RH.C0=clerp(RH.C0,cf(.9,-1,.3)*euler(0,1.57,0)*euler(0,-.8,0),.4)
  1534. LH.C0=clerp(LH.C0,cf(-.9,-1,-.3)*euler(0,-1.57,0)*euler(0,-.8,.3),.4)
  1535. end
  1536. so("87767777",prt18,1,1)
  1537. mana.Value=mana.Value-30
  1538. Val=(passive.Value)*-.3
  1539. passive.Value=0
  1540. MagniDamage(prt18,20,5,10,1,"Knockdown2",prt18,0,1,math.random(5,10),nil,nil,false,"Defense",Val,300)
  1541. MagicCircle(BrickColor.new(NewCol2),cf(prt18.Position),1,1,1,3,3,3,.02)
  1542. passivenum=-30
  1543. local num=0
  1544. local eul=CFrame.fromEulerAnglesXYZ(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  1545. for i=1,6 do
  1546. MagicCircle2(BrickColor.new(NewCol2),cf(prt18.Position)*eul*euler(num,0,0),3,20,3,-.02,.5,-.02,0.01)
  1547. MagicCircle2(BrickColor.new(NewCol2),cf(prt18.Position)*eul*euler(0,1.57,0)*euler(num,0,0),3,20,3,-.02,.5,-.02,0.01)
  1548. num=num+1.046
  1549. end
  1550. swait(10)
  1551. dec.Parent=nil]]
  1552. dec.Parent=nil
  1553. dec2.Parent=nil
  1554. attack=false
  1555. end
  1556. end
  1557.  
  1558. function do4()
  1559. if attack==true then return end
  1560. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then return end
  1561. if cooldowns[4]>=cooldownmax and mana.Value>=20 and #Obelisks>0 then
  1562. --if true then
  1563. attack=true
  1564. cooldowns[4]=0
  1565. local dec=Instance.new("NumberValue",Decrease)
  1566. dec.Name="DecreaseMvmt"
  1567. dec.Value=10
  1568. mana.Value=mana.Value-20
  1569. for b=1,#Obelisks do
  1570. for i=0,1,0.1 do
  1571. swait()
  1572. wld1.C0=clerp(wld1.C0,euler(-1.5,0,0)*cf(0,1,0),.3)
  1573. wld2.C0=clerp(wld2.C0,euler(0,2.37,0)*cf(0,-.4,0),.3)
  1574. Neck.C0=clerp(Neck.C0,necko*euler(0,0,0),.3)
  1575. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(-.2,0,0),.3)
  1576. RW.C0=clerp(RW.C0,cf(1,1.2,0)*euler(3.6,0,-.8),.3)
  1577. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1578. LW.C0=clerp(LW.C0,cf(-1,1.2,0)*euler(3.6,0,.8),.3)
  1579. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1580. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,0,-.2),.3)
  1581. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,0,.2),.3)
  1582. end
  1583. for i=0,1,0.15 do
  1584. swait()
  1585. wld1.C0=clerp(wld1.C0,euler(-1.57,0,0)*cf(0,1,0),.3)
  1586. wld2.C0=clerp(wld2.C0,euler(0,2.37,0)*cf(0,1,0),.3)
  1587. Neck.C0=clerp(Neck.C0,necko*euler(.2,0,0),.4)
  1588. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(.4,0,0),.4)
  1589. RW.C0=clerp(RW.C0,cf(1,.8,-.5)*euler(2,0,-.8),.4)
  1590. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  1591. LW.C0=clerp(LW.C0,cf(-1,.8,-.5)*euler(2,0,.8),.4)
  1592. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  1593. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,0,.2),.4)
  1594. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,0,-.4),.4)
  1595. end
  1596. MagicCircle(BrickColor.new(NewCol2),cf(prt18.Position),5,5,5,5,5,5,.05)
  1597. MagicBlock(BrickColor.new(NewCol2),cf(prt18.Position)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),5,5,5,6,6,6,.05,1)
  1598. MagicRing(BrickColor.new(NewCol2),cf(prt18.Position),1,1,3,2,2,.1,.03)
  1599. MagicRing(BrickColor.new(NewCol2),cf(prt18.Position)*euler(1.57,0,0),1,1,3,2,2,.1,.03)
  1600. MagicRing(BrickColor.new(NewCol2),cf(prt18.Position)*euler(0,1.57,0),1,1,3,2,2,.1,.03)
  1601. MagniDamage(prt18,30,5,8,math.random(-40,-20),"Knockdown2",prt18,0,1,math.random(5,8),nil,nil,false,"Obsidian",.05,400)
  1602. ref=part(3,workspace,0,1,BrickColor.new("Black"),"Reference",vt(0.2,0.2,0.2))
  1603. ref.Anchored=true
  1604. ref.CFrame=cf(Torso.Position)
  1605. game:GetService("Debris"):AddItem(ref,1)
  1606. so("203691653",ref,1,1)
  1607. so("203691699",Torso,1,1)
  1608. if Obelisks[b]~=nil then
  1609. Part=Obelisks[b]:findFirstChild("Obelisk Part01")
  1610. if Part~=nil then
  1611. if Rooted.Value==false then
  1612. Torso.CFrame=cf(Part.Position)*cf(0,math.random(50,100)/100,0)*euler(0,math.random(-50,50),0)
  1613. Torso.Velocity=vt(0,0,0)
  1614. end
  1615. end
  1616. end
  1617. wld1.C0=euler(.2,0,-.2)*cf(0,1,.2)
  1618. wld2.C0=euler(0,1.57,0)*cf(0,-1.4,0)
  1619. Neck.C0=necko*euler(0,0,.6)*euler(.2,0,0)
  1620. RootJoint.C0=RootCF*cf(0,0,-.2)*euler(0,0,-.6)*euler(.1,0,0)
  1621. RW.C0=cf(1.5,0.5,0)*euler(1.2,0,.8)
  1622. RW.C1=cf(0,0.5,0)*euler(0,0,0)
  1623. LW.C0=cf(-1.5,0.5,0)*euler(-.4,0,-.2)
  1624. LW.C1=cf(0,0.5,0)*euler(0,0,0)
  1625. RH.C0=cf(.9,-1,-.3)*euler(0,1.57,0)*euler(0,.6,-.3)
  1626. LH.C0=cf(-.9,-1,.3)*euler(0,-1.57,0)*euler(0,.6,-.1)
  1627. end
  1628. for i=0,1,0.1 do
  1629. swait()
  1630. Torso.Velocity=vt(0,0,0)
  1631. wld1.C0=clerp(wld1.C0,euler(-1.5,0,0)*cf(0,1,0),.3)
  1632. wld2.C0=clerp(wld2.C0,euler(0,2.37,0)*cf(0,-.4,0),.3)
  1633. Neck.C0=clerp(Neck.C0,necko*euler(0,0,0),.3)
  1634. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(-.2,0,0),.3)
  1635. RW.C0=clerp(RW.C0,cf(1,1.2,0)*euler(3.6,0,-.8),.3)
  1636. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1637. LW.C0=clerp(LW.C0,cf(-1,1.2,0)*euler(3.6,0,.8),.3)
  1638. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1639. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,0,-.2),.3)
  1640. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,0,.2),.3)
  1641. end
  1642. for i=0,1,0.15 do
  1643. swait()
  1644. Torso.Velocity=vt(0,0,0)
  1645. wld1.C0=clerp(wld1.C0,euler(-1.57,0,0)*cf(0,1,0),.3)
  1646. wld2.C0=clerp(wld2.C0,euler(0,2.37,0)*cf(0,1,0),.3)
  1647. Neck.C0=clerp(Neck.C0,necko*euler(.2,0,0),.4)
  1648. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(.4,0,0),.4)
  1649. RW.C0=clerp(RW.C0,cf(1,.8,-.5)*euler(2,0,-.8),.4)
  1650. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  1651. LW.C0=clerp(LW.C0,cf(-1,.8,-.5)*euler(2,0,.8),.4)
  1652. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  1653. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,0,.2),.4)
  1654. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,0,-.4),.4)
  1655. end
  1656. d=nil
  1657. if Obelisks[1]~=nil then
  1658. d=Obelisks[1]:findFirstChild("Obelisk Part06")
  1659. end
  1660. if d~=nil then
  1661. pos=d.Position
  1662. so("206083232",d,1,.8)
  1663. ref=part(3,workspace,0,1,BrickColor.new("Black"),"Reference",vt(0.2,0.2,0.2))
  1664. ref.Anchored=true
  1665. ref.CFrame=cf(pos)*cf(math.random(-5000,5000)/100,0,math.random(-5000,5000)/100)
  1666. game:GetService("Debris"):AddItem(ref,10)
  1667. lightnum=0
  1668. for i=1,50 do
  1669. swait()
  1670. for _,v in pairs(workspace:children()) do
  1671. local hum,tors,plr=v:FindFirstChild'Humanoid',v:FindFirstChild'Torso',game.Players:GetPlayerFromCharacter(v)
  1672. ---if hum and plr and tors and (tors.Position-RootPart.Position).Magnitude<=47 and plr.Backpack:FindFirstChild'CamShake'==nil then
  1673. ---warn'camshake'
  1674. ---local camshake=game.ReplicatedStorage.CamShake:Clone()
  1675. ---camshake.Intensity.Value=285
  1676. ---camshake.Duration.Value=1.6-((i/50)*1.5)
  1677. ---camshake.Disabled=false
  1678. ---camshake.Parent=plr.Backpack
  1679. end
  1680. end
  1681. MagicBlock(BrickColor.new(NewCol2),cf(pos),1,1,1,3,3,3,.2,1)
  1682. ref.CFrame=cf(pos)*cf(math.random(-5000,5000)/100,0,math.random(-5000,5000)/100)
  1683. ref2=part(3,workspace,0,1,BrickColor.new("Black"),"Reference",vt(0.2,0.2,0.2))
  1684. ref2.Anchored=true
  1685. ref2.CFrame=cf(ref.Position)
  1686. game:GetService("Debris"):AddItem(ref2,1)
  1687. so("206083232",ref2,.5,1.4)
  1688. hitfloor2,posfloor2=rayCast(ref.Position,(CFrame.new(ref.Position,ref.Position - Vector3.new(0,1,0))).lookVector,50,Character)
  1689. print(hitfloor2)
  1690. if lightnum>=10 then
  1691. Lightning(pos,posfloor2+vt(0,0,0),5,2,NewCol2,.1,.4,.05)
  1692. end
  1693. lightnum=lightnum+1
  1694. end
  1695. hitfloor2,posfloor2=rayCast(pos - Vector3.new(0,10,0),(CFrame.new(pos - Vector3.new(0,10,0),pos - Vector3.new(0,31,0))).lookVector,50,Character)
  1696. MagicRing(BrickColor.new(NewCol2),cf(posfloor2)*euler(1.57,0,0),80,80,1,.1,.1,2,.02)
  1697. MagicRing(BrickColor.new(NewCol2),cf(pos)*euler(1.57,0,0),80,80,5,-5,-5,-1,.05)
  1698. MagicRing(BrickColor.new(NewCol2),cf(pos)*euler(0,0,0),80,80,5,-5,-5,-1,.05)
  1699. MagicRing(BrickColor.new(NewCol2),cf(pos)*euler(0,1.57,0),80,80,5,-5,-5,-1,.05)
  1700. for i=1,20 do
  1701. MagicObsidian(BrickColor.new(NewCol2),cf(posfloor2)*cf(math.random(-5000,5000)/100,0,math.random(-5000,5000)/100)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),3,3,3,-.2,-.2,-.2,.02)
  1702. end
  1703. ref.CFrame=cf(pos)
  1704. MagniDamage(ref,50,10,15,math.random(-70,-50),"Knockdown2",ref,0,1,math.random(10,15),nil,nil,true,"Movement",.4,400)
  1705. ref2=part(3,workspace,0,1,BrickColor.new("Black"),"Reference",vt(0.2,0.2,0.2))
  1706. ref2.Anchored=true
  1707. ref2.CFrame=cf(ref.Position)
  1708. game:GetService("Debris"):AddItem(ref2,1)
  1709. --[[so("183763487",ref2,1,.4)
  1710. so("183763487",ref2,1,.6) ]]
  1711. so("161006182",ref2,1,.2)
  1712. so("158210228",ref2,1,.4)
  1713. ref.Parent=nil
  1714. end
  1715. swait(10)
  1716. ---dec.Parent=nil
  1717. attack=false
  1718. end
  1719. ---end
  1720.  
  1721. function Orb(Part)
  1722. spread=vt((math.random(-1,0)+math.random())*2,(math.random(-1,0)+math.random())*2,(math.random(-1,0)+math.random())*2)*(Part.Position-MMouse.Hit.p).magnitude/100
  1723. local MouseLook=cf((Part.Position+MMouse.Hit.p)/2,MMouse.Hit.p+spread)
  1724. table.insert(Effects,{MouseLook.lookVector,"Shoot",100,Part.Position,7,12,math.random(10,20)})
  1725. end
  1726.  
  1727. function DecreaseStat(Model,Stat,Amount,Duration)
  1728. if Model:findFirstChild("Stats")~=nil then
  1729. if Model.Stats[Stat]~=nil then
  1730. Model.Stats[Stat].Value=Model.Stats[Stat].Value-Amount
  1731. d=Instance.new("NumberValue",Model.Stats.Decrease)
  1732. dur=Instance.new("NumberValue",d)
  1733. dur.Name="Duration"
  1734. dur.Value=Duration
  1735. game:GetService("Debris"):AddItem(d,20)
  1736. if Stat=="Damage" then
  1737. d.Name="DecreaseAtk"
  1738. elseif Stat=="Defense" then
  1739. d.Name="DecreaseDef"
  1740. elseif Stat=="Movement" then
  1741. d.Name="DecreaseMvmt"
  1742. end
  1743. if Model:findFirstChild("Torso")~=nil then
  1744. display=""
  1745. if Stat=="Damage" then
  1746. if Amount>0 then
  1747. display="-Damage"
  1748. else
  1749. display="+Damage"
  1750. end
  1751. elseif Stat=="Defense" then
  1752. if Amount>0 then
  1753. display="-Defense"
  1754. else
  1755. display="+Defense"
  1756. end
  1757. elseif Stat=="Movement" then
  1758. if Amount>0 then
  1759. display="-Movement"
  1760. else
  1761. display="+Movement"
  1762. end
  1763. end
  1764. showDamage(Model,display,"Debuff")
  1765. end
  1766. d.Value=Amount
  1767. end
  1768. end
  1769. end
  1770.  
  1771. function GetDist(Part1,Part2,magni)
  1772. local targ=Part1.Position-Part2.Position
  1773. local mag=targ.magnitude
  1774. if mag<=magni then
  1775. return true
  1776. else
  1777. return false
  1778. end
  1779. end
  1780.  
  1781. function MagniDamage(Part,magni,minim,maxim,knockback,Type,Property,Delay,KnockbackType,incstun,stagger,staghit,ranged,DecreaseState,DecreaseAmount,Duration)
  1782. for _,c in pairs(workspace:children()) do
  1783. local hum=c:findFirstChild("Humanoid")
  1784. if hum~=nil then
  1785. local head=nil
  1786. for _,d in pairs(c:children()) do
  1787. --if d.Name=="Torso" or d.Name=="Head" or d.Name=="HumanoidRootPart" or d.Name=="HitPart" then
  1788. if d.className=="Model" and ranged~=true then
  1789. head=d:findFirstChild("Hitbox")
  1790. if d.Parent==Character then break end
  1791. if head~=nil then
  1792. local targ=head.Position-Part.Position
  1793. local mag=targ.magnitude
  1794. if mag<=magni and c.Name~=Player.Name then
  1795. ref=part(3,workspace,0,1,BrickColor.new("Black"),"Reference",vt(0.2,0.2,0.2))
  1796. ref.Anchored=true
  1797. ref.CFrame=cf(head.Position)
  1798. game:GetService("Debris"):AddItem(ref,1)
  1799. hitnum=math.random(1,5)
  1800. if hitnum==1 then so("199148971",ref,1,1)
  1801. elseif hitnum==2 then so("199149025",ref,1,1)
  1802. elseif hitnum==3 then so("199149072",ref,1,1)
  1803. elseif hitnum==4 then so("199149109",ref,1,1)
  1804. elseif hitnum==5 then so("199149119",ref,1,1)
  1805. end
  1806. StaggerHit.Value=true
  1807. end
  1808. end
  1809. end
  1810. if d.className=="Part" then
  1811. head=d
  1812. if head~=nil then
  1813. local targ=head.Position-Part.Position
  1814. local mag=targ.magnitude
  1815. if mag<=magni and c.Name~=Player.Name then
  1816. if stun==nil then
  1817. stun=math.random(5,10)
  1818. end
  1819. local Rang=nil
  1820. if Ranged==false then
  1821. Rang=true
  1822. end
  1823. local stag=nil
  1824. if shbash==true then
  1825. stag=true
  1826. end
  1827. Damagefunc(head,minim,maxim,knockback,Type,Property,Delay,KnockbackType,incstun,stagger,staghit,ranged,DecreaseState,DecreaseAmount,Duration)
  1828. --Damagefunc(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,incstun,stagger,staghit,DecreaseState,DecreaseAmount,Duration)
  1829. end
  1830. end
  1831. end
  1832. end
  1833. end
  1834. end
  1835. end
  1836.  
  1837. function MagniBuff(Part,magni,Dec,DecAm,Dur)
  1838. if Player.Neutral==true then
  1839. DecreaseStat(Character,Dec,DecAm,Dur)
  1840. end
  1841. for _,c in pairs(workspace:children()) do
  1842. local hum=c:findFirstChild("Humanoid")
  1843. if hum~=nil then
  1844. local head=c:findFirstChild("Torso")
  1845. if head~=nil then
  1846. local targ=head.Position-Part.Position
  1847. local mag=targ.magnitude
  1848. cando=true
  1849. if mag<=magni then
  1850. if Player.Neutral==false then
  1851. if game.Players:GetPlayerFromCharacter(head.Parent)~=nil then
  1852. if game.Players:GetPlayerFromCharacter(head.Parent).TeamColor==Player.TeamColor then cando=true else cando=false end
  1853. else cando=false
  1854. end
  1855. if head.Parent:findFirstChild("Alignment")~=nil then
  1856. if head.Parent.Alignment.Value==Player.TeamColor.Color then cando=true end
  1857. end
  1858. else cando=false
  1859. end
  1860. if cando==true then
  1861. DecreaseStat(head.Parent,Dec,DecAm,Dur)
  1862. end
  1863. end
  1864. end
  1865. end
  1866. end
  1867. end
  1868.  
  1869. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  1870. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  1871. end
  1872.  
  1873. local Point=Torso.CFrame*cf(0,Torso.Size.Y,0)
  1874. LastPoint=Point
  1875. function effect(Color,Ref,LP,P1,returnn)
  1876. if LP==nil or P1==nil then return end
  1877. local effectsmsh=Instance.new("CylinderMesh")
  1878. effectsmsh.Scale=Vector3.new(0.2,1,0.2)
  1879. effectsmsh.Name="Mesh"
  1880. local effectsg=Instance.new("Part")
  1881. NoOutline(effectsg)
  1882. effectsg.formFactor=3
  1883. effectsg.CanCollide=false
  1884. effectsg.Name="Eff"
  1885. effectsg.Locked=true
  1886. effectsg.Anchored=true
  1887. effectsg.Size=Vector3.new(0.5,1,0.5)
  1888. effectsg.Parent=workspace
  1889. effectsmsh.Parent=effectsg
  1890. effectsg.BrickColor=BrickColor.new(Color)
  1891. effectsg.Reflectance=Ref
  1892. local point1=P1
  1893. local mg=(LP.p - point1.p).magnitude
  1894. effectsg.Size=Vector3.new(0.5,mg,0.5)
  1895. effectsg.CFrame=cf((LP.p+point1.p)/2,point1.p) * CFrame.Angles(math.rad(90),0,0)
  1896. effectsmsh.Scale=Vector3.new(0.2,1,0.2)
  1897. game:GetService("Debris"):AddItem(effectsg,2)
  1898. if returnn then return effectsg end
  1899. if not returnn then
  1900. table.insert(Effects,{effectsg,"Cylinder",0.2,0.01,0,0.01,effectsmsh})
  1901. end
  1902. end
  1903.  
  1904. local function CFrameFromTopBack(at, top, back)
  1905. local right = top:Cross(back)
  1906. return CFrame.new(at.x, at.y, at.z,
  1907. right.x, top.x, back.x,
  1908. right.y, top.y, back.y,
  1909. right.z, top.z, back.z)
  1910. end
  1911.  
  1912. function Triangle(a, b, c)
  1913. local edg1 = (c-a):Dot((b-a).unit)
  1914. local edg2 = (a-b):Dot((c-b).unit)
  1915. local edg3 = (b-c):Dot((a-c).unit)
  1916. if edg1 <= (b-a).magnitude and edg1 >= 0 then
  1917. a, b, c = a, b, c
  1918. elseif edg2 <= (c-b).magnitude and edg2 >= 0 then
  1919. a, b, c = b, c, a
  1920. elseif edg3 <= (a-c).magnitude and edg3 >= 0 then
  1921. a, b, c = c, a, b
  1922. else
  1923. assert(false, "unreachable")
  1924. end
  1925.  
  1926. local len1 = (c-a):Dot((b-a).unit)
  1927. local len2 = (b-a).magnitude - len1
  1928. local width = (a + (b-a).unit*len1 - c).magnitude
  1929.  
  1930. local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit)
  1931.  
  1932. local list = {}
  1933.  
  1934. if len1 > 0.01 then
  1935. local w1 = Instance.new('WedgePart', m)
  1936. w1.Name = "Triangle"
  1937. game:GetService("Debris"):AddItem(w1,5)
  1938. w1.Material = "SmoothPlastic"
  1939. w1.FormFactor = 'Custom'
  1940. w1.BrickColor = BrickColor.new("Teal")
  1941. w1.Transparency = 0
  1942. w1.Reflectance = 0
  1943. w1.Material = "SmoothPlastic"
  1944. w1.CanCollide = false
  1945. NoOutline(w1)
  1946. local sz = Vector3.new(0.2, width, len1)
  1947. w1.Size = sz
  1948. local sp = Instance.new("SpecialMesh",w1)
  1949. sp.MeshType = "Wedge"
  1950. sp.Scale = Vector3.new(0,1,1) * sz/w1.Size
  1951. w1:BreakJoints()
  1952. w1.Anchored = true
  1953. w1.Parent = workspace
  1954. w1.Transparency = 0.7
  1955. table.insert(Effects,{w1,"Disappear",.05})
  1956. w1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2)
  1957. table.insert(list,w1)
  1958. end
  1959.  
  1960. if len2 > 0.01 then
  1961. local w2 = Instance.new('WedgePart', m)
  1962. w2.Name = "Triangle"
  1963. game:GetService("Debris"):AddItem(w2,5)
  1964. w2.Material = "SmoothPlastic"
  1965. w2.FormFactor = 'Custom'
  1966. w2.BrickColor = BrickColor.new("Teal")
  1967. w2.Transparency = 0
  1968. w2.Reflectance = 0
  1969. w2.Material = "SmoothPlastic"
  1970. w2.CanCollide = false
  1971. NoOutline(w2)
  1972. local sz = Vector3.new(0.2, width, len2)
  1973. w2.Size = sz
  1974. local sp = Instance.new("SpecialMesh",w2)
  1975. sp.MeshType = "Wedge"
  1976. sp.Scale = Vector3.new(0,1,1) * sz/w2.Size
  1977. w2:BreakJoints()
  1978. w2.Anchored = true
  1979. w2.Parent = workspace
  1980. w2.Transparency = 0.7
  1981. table.insert(Effects,{w2,"Disappear",.05})
  1982. w2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2)
  1983. table.insert(list,w2)
  1984. end
  1985. return unpack(list)
  1986. end
  1987.  
  1988. function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,Type)
  1989. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.2,0.2,0.2))
  1990. prt.Anchored=true
  1991. prt.CFrame=cframe
  1992. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  1993. game:GetService("Debris"):AddItem(prt,10)
  1994. if Type==1 or Type==nil then
  1995. table.insert(Effects,{prt,"Block1",delay,x3,y3,z3,msh})
  1996. elseif Type==2 then
  1997. table.insert(Effects,{prt,"Block2",delay,x3,y3,z3,msh})
  1998. elseif Type==3 then
  1999. table.insert(Effects,{prt,"Block3",delay,x3,y3,z3,msh,prt.CFrame,math.random(5,20)/100})
  2000. end
  2001. end
  2002.  
  2003. function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  2004. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.2,0.2,0.2))
  2005. prt.Anchored=true
  2006. prt.CFrame=cframe
  2007. local msh=mesh("SpecialMesh",prt,"Sphere","nil",vt(0,0,0),vt(x1,y1,z1))
  2008. game:GetService("Debris"):AddItem(prt,10)
  2009. table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
  2010. end
  2011.  
  2012. function MagicCircle2(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  2013. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.2,0.2,0.2))
  2014. prt.Anchored=true
  2015. prt.CFrame=cframe
  2016. local msh=mesh("SpecialMesh",prt,"Sphere","nil",vt(0,0,0),vt(x1,y1,z1))
  2017. game:GetService("Debris"):AddItem(prt,10)
  2018. table.insert(Effects,{prt,"Blood",delay,x3,y3,z3,msh})
  2019. end
  2020.  
  2021. function MagicCylinder(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  2022. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.2,0.2,0.2))
  2023. prt.Anchored=true
  2024. prt.CFrame=cframe
  2025. local msh=mesh("CylinderMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  2026. game:GetService("Debris"):AddItem(prt,10)
  2027. table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
  2028. end
  2029.  
  2030. function MagicCylinder3(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  2031. local prt=part(3,modelzorz,0,0,brickcolor,"Effect",vt(0.2,0.2,0.2))
  2032. prt.Anchored=true
  2033. prt.CFrame=cframe
  2034. local msh=mesh("SpecialMesh",prt,"Head","nil",vt(0,0,0),vt(x1,y1,z1))
  2035. game:GetService("Debris"):AddItem(prt,10)
  2036. table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
  2037. end
  2038.  
  2039. function MagicHead(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  2040. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.2,0.2,0.2))
  2041. prt.Anchored=true
  2042. prt.CFrame=cframe
  2043. local msh=mesh("SpecialMesh",prt,"Head","nil",vt(0,0,0),vt(x1,y1,z1))
  2044. game:GetService("Debris"):AddItem(prt,10)
  2045. table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
  2046. end
  2047.  
  2048. function ClangEffect(brickcolor,cframe,duration,decrease,size,power)
  2049. local prt=part(3,workspace,0,1,brickcolor,"Effect",vt(0.2,0.2,0.2))
  2050. prt.Anchored=true
  2051. prt.CFrame=cframe
  2052. local msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(5,5,5))
  2053. game:GetService("Debris"):AddItem(prt,10)
  2054. table.insert(Effects,{prt,"CylinderClang",duration,decrease,size,power,prt.CFrame,nil})
  2055. end
  2056.  
  2057. function MagicWave(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  2058. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.2,0.2,0.2))
  2059. prt.Anchored=true
  2060. prt.CFrame=cframe
  2061. local msh=mesh("SpecialMesh",prt,"FileMesh","20329976",vt(0,0,0),vt(x1,y1,z1))
  2062. game:GetService("Debris"):AddItem(prt,10)
  2063. table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
  2064. end
  2065.  
  2066. function MagicRing(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  2067. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  2068. prt.Anchored=true
  2069. prt.CFrame=cframe*cf(x2,y2,z2)
  2070. local msh=mesh("SpecialMesh",prt,"FileMesh","3270017",vt(0,0,0),vt(x1,y1,z1))
  2071. game:GetService("Debris"):AddItem(prt,10)
  2072. table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
  2073. end
  2074.  
  2075. function MagicObsidian(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  2076. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.2,0.2,0.2))
  2077. prt.Anchored=true
  2078. prt.CFrame=cframe
  2079. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  2080. game:GetService("Debris"):AddItem(prt,10)
  2081. table.insert(Effects,{prt,"Obsidian",delay,x3,y3,z3,msh,math.random(80,140)/100,.1})
  2082. end
  2083.  
  2084. function Lightning(p0,p1,tym,ofs,col,th,tra,last)
  2085. --[[p0=pos1
  2086. p1=pos2
  2087. tym=times
  2088. ofs=offset
  2089. col=color
  2090. th=size
  2091. tra=transparency
  2092. last=lastingtime]]
  2093. local magz = (p0 - p1).magnitude local curpos = p0 local trz = {-ofs,ofs}
  2094. for i=1,tym do
  2095. local li = Instance.new("Part",workspace) li.TopSurface =0 li.BottomSurface = 0 li.Anchored = true li.Transparency = tra or 0.4 li.BrickColor = BrickColor.new(col)
  2096. 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)])
  2097. local trolpos = CFrame.new(curpos,p1)*CFrame.new(0,0,magz/tym).p+ofz
  2098. if tym == i then
  2099. local magz2 = (curpos - p1).magnitude li.Size = Vector3.new(th,th,magz2)
  2100. li.CFrame = CFrame.new(curpos,p1)*CFrame.new(0,0,-magz2/2)
  2101. else
  2102. li.CFrame = CFrame.new(curpos,trolpos)*CFrame.new(0,0,magz/tym/2)
  2103. end
  2104. curpos = li.CFrame*CFrame.new(0,0,magz/tym/2).p game.Debris:AddItem(li,10)
  2105. table.insert(Effects,{li,"Disappear",last})
  2106. end
  2107. end
  2108.  
  2109. Damagefunc=function(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,incstun,stagger,staghit,ranged,DecreaseState,DecreaseAmount,Duration)
  2110. if hit.Parent==nil then
  2111. return
  2112. end
  2113. if hit.Parent:FindFirstChild("Humanoid") then
  2114. hit.Parent.Humanoid:TakeDamage(0.1)
  2115. end
  2116.  
  2117. if hit.Name=="Hitbox" and hit.Parent~=modelzorz and ranged~=true then
  2118. ref=part(3,workspace,0,1,BrickColor.new("Black"),"Reference",vt(0.2,0.2,0.2))
  2119. ref.Anchored=true
  2120. ref.CFrame=cf(hit.Position)
  2121. game:GetService("Debris"):AddItem(ref,1)
  2122. hitnum=math.random(1,5)
  2123. if hitnum==1 then so("199148971",ref,1,1)
  2124. elseif hitnum==2 then so("199149025",ref,1,1)
  2125. elseif hitnum==3 then so("199149072",ref,1,1)
  2126. elseif hitnum==4 then so("199149109",ref,1,1)
  2127. elseif hitnum==5 then so("199149119",ref,1,1)
  2128. end
  2129. StaggerHit.Value=true
  2130. end
  2131. h=hit.Parent:FindFirstChild("Humanoid")
  2132. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  2133. if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end
  2134. if Player.Neutral==false then
  2135. if hit.Parent:findFirstChild("Alignment")~=nil then
  2136. if hit.Parent.Alignment.Value==Player.TeamColor.Color then return end
  2137. end
  2138. if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  2139. if game.Players:GetPlayerFromCharacter(hit.Parent).TeamColor==Player.TeamColor then return end
  2140. end
  2141. end
  2142. c=Instance.new("ObjectValue")
  2143. c.Name="creator"
  2144. c.Value=game:service("Players").LocalPlayer
  2145. c.Parent=h
  2146. RecentEnemy.Value=hit.Parent
  2147. game:GetService("Debris"):AddItem(c,.5)
  2148. minim=minim*Atk.Value
  2149. maxim=maxim*Atk.Value
  2150. Damage=0
  2151. if minim==maxim then
  2152. Damage=maxim
  2153. else
  2154. Damage=math.random(minim,maxim)
  2155. end
  2156. blocked=false
  2157. enblock=nil
  2158. Stats=hit.Parent:findFirstChild("Stats")
  2159. if Stats~=nil then
  2160. invis=Stats:findFirstChild("Invisibility")
  2161. isinvis=Stats:findFirstChild("IsInvisible")
  2162. if (ranged==false or ranged==nil) and invis~=nil and isinvis.Value==true then
  2163. invis.Value=0
  2164. end
  2165. enblock=Stats:findFirstChild("Block")
  2166. if enblock~=nil then
  2167. if enblock.Value==true then
  2168. blocked=true
  2169. end
  2170. end
  2171. if Stats:findFirstChild("Defense")~=nil then
  2172. Damage=Damage/(Stats.Defense.Value)
  2173. if Damage<=3 and (ranged==false or ranged==nil) and blocked~=true then
  2174. hitnum=math.random(1,5)
  2175. if hitnum==1 then so("199149321",hit,1,1)
  2176. elseif hitnum==2 then so("199149338",hit,1,1)
  2177. elseif hitnum==3 then so("199149367",hit,1,1)
  2178. elseif hitnum==4 then so("199149409",hit,1,1)
  2179. elseif hitnum==5 then so("199149452",hit,1,1)
  2180. end
  2181. elseif ranged==false or ranged==nil and blocked~=true then
  2182. hitnum=math.random(1,6)
  2183. if hitnum==1 then so("199149137",hit,1,1)
  2184. elseif hitnum==2 then so("199149186",hit,1,1)
  2185. elseif hitnum==3 then so("199149221",hit,1,1)
  2186. elseif hitnum==4 then so("199149235",hit,1,1)
  2187. elseif hitnum==5 then so("199149269",hit,1,1)
  2188. elseif hitnum==6 then so("199149297",hit,1,1)
  2189. end
  2190. end
  2191. if Damage<=3 and staghit==true then
  2192. if ranged~=true then
  2193. StaggerHit.Value=true
  2194. end
  2195. end
  2196. end
  2197. if Stats:findFirstChild("Stun")~=nil then
  2198. if blocked==true then
  2199. incstun=incstun/2
  2200. end
  2201. if Stats.Stun.Value<Stats.StunThreshold.Value then
  2202. Stats.Stun.Value=Stats.Stun.Value+incstun
  2203. end
  2204. end
  2205. if Stats:findFirstChild("Stagger")~=nil then
  2206. if stagger==true then
  2207. Stats.Stagger.Value=true
  2208. end
  2209. end
  2210. end
  2211. if blocked==true then
  2212. showDamage(hit.Parent,"Block","Damage")
  2213. if ranged~=true then
  2214. enblock.Value=false
  2215. Stagger.Value=true
  2216. hitnum=math.random(1,2)
  2217. if hitnum==1 then so("199148933",hit,1,1)
  2218. elseif hitnum==2 then so("199148947",hit,1,1)
  2219. end
  2220. end
  2221. else
  2222. Damage=math.floor(Damage)
  2223. coroutine.resume(coroutine.create(function(Hum,Dam)
  2224. damageFunc:InvokeServer(h,Damage)
  2225. end),h,Damage)
  2226. showDamage(hit.Parent,Damage,"Damage")
  2227. if DecreaseState~=nil then
  2228. if DecreaseState=="Obsidian" then
  2229. DecreaseStat(hit.Parent,"Movement",DecreaseAmount,Duration)
  2230. DecreaseStat(hit.Parent,"Damage",DecreaseAmount,Duration)
  2231. else
  2232. DecreaseStat(hit.Parent,DecreaseState,DecreaseAmount,Duration)
  2233. end
  2234. end
  2235. if Type=="Knockdown" then
  2236. hum=hit.Parent.Humanoid
  2237. hum.PlatformStand=true
  2238. coroutine.resume(coroutine.create(function(HHumanoid)
  2239. swait(1)
  2240. HHumanoid.PlatformStand=false
  2241. end),hum)
  2242. local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
  2243. --hit.CFrame=cf(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
  2244. local bodvol=Instance.new("BodyVelocity")
  2245. bodvol.velocity=angle*knockback
  2246. bodvol.P=5000
  2247. bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  2248. bodvol.Parent=hit
  2249. rl=Instance.new("BodyAngularVelocity")
  2250. rl.P=3000
  2251. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  2252. rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  2253. rl.Parent=hit
  2254. game:GetService("Debris"):AddItem(bodvol,.5)
  2255. game:GetService("Debris"):AddItem(rl,.5)
  2256. elseif Type=="Knockdown2" then
  2257. hum=hit.Parent.Humanoid
  2258. local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
  2259. local bodvol=Instance.new("BodyVelocity")
  2260. bodvol.velocity=angle*knockback
  2261. bodvol.P=5000
  2262. bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  2263. bodvol.Parent=hit
  2264. game:GetService("Debris"):AddItem(bodvol,.5)
  2265. elseif Type=="Normal" or Type=="NormalDecreaseMvmt1" then
  2266. vp=Instance.new("BodyVelocity")
  2267. vp.P=500
  2268. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  2269. if KnockbackType==1 then
  2270. vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05
  2271. elseif KnockbackType==2 then
  2272. vp.velocity=Property.CFrame.lookVector*knockback
  2273. end
  2274. game:GetService("Debris"):AddItem(vp,.5)
  2275. if knockback>0 then
  2276. vp.Parent=hit.Parent.Torso
  2277. end
  2278. end
  2279. end
  2280. debounce=Instance.new("BoolValue")
  2281. debounce.Name="DebounceHit"
  2282. debounce.Parent=hit.Parent
  2283. debounce.Value=true
  2284. game:GetService("Debris"):AddItem(debounce,Delay)
  2285. c=Instance.new("ObjectValue")
  2286. c.Name="creator"
  2287. c.Value=Player
  2288. c.Parent=h
  2289. game:GetService("Debris"):AddItem(c,.5)
  2290. CRIT=false
  2291. end
  2292. end
  2293.  
  2294. showDamage=function(Char,Dealt,Type)
  2295. m=Instance.new("Model")
  2296. m.Name="Effect"
  2297. c=Instance.new("Part")
  2298. c.Transparency=1
  2299. c.Name="Head"
  2300. c.TopSurface=0
  2301. c.BottomSurface=0
  2302. c.formFactor="Plate"
  2303. c.Size=Vector3.new(1,.4,1)
  2304. b=Instance.new("BillboardGui",c)
  2305. b.Size=UDim2.new(5,0,5,0)
  2306. b.AlwaysOnTop=true
  2307. damgui=gui("TextLabel",b,tostring(Dealt),1,Color3.new(0,0,0),UDim2.new(0,0,0,0),UDim2.new(1,0,1,0))
  2308. if Type=="Damage" then
  2309. damgui.Font="SourceSans"
  2310. if Dealt=="Block" then
  2311. damgui.TextColor3=BrickColor.new("Bright blue").Color
  2312. elseif Dealt<3 then
  2313. damgui.TextColor3=BrickColor.new("White").Color
  2314. elseif Dealt>=3 and Dealt<20 then
  2315. damgui.TextColor3=BrickColor.new("Bright yellow").Color
  2316. else
  2317. damgui.TextColor3=BrickColor.new("Really red").Color
  2318. damgui.Font="SourceSansBold"
  2319. end
  2320. elseif Type=="Debuff" then
  2321. damgui.TextColor3=BrickColor.new("White").Color
  2322. elseif Type=="Interrupt" then
  2323. damgui.TextColor3=BrickColor.new("New Yeller").Color
  2324. end
  2325. --damgui.FontSize="Size48"
  2326. damgui.TextScaled=true
  2327. ms=Instance.new("CylinderMesh")
  2328. ms.Scale=Vector3.new(.8,.8,.8)
  2329. ms.Parent=c
  2330. c.Reflectance=0
  2331. Instance.new("BodyGyro").Parent=c
  2332. c.Parent=m
  2333. if Char:findFirstChild("Head")~=nil then
  2334. c.CFrame=cf(Char["Head"].CFrame.p+Vector3.new(math.random(-100,100)/100,3,math.random(-100,100)/100))
  2335. elseif Char.Parent:findFirstChild("Head")~=nil then
  2336. c.CFrame=cf(Char.Parent["Head"].CFrame.p+Vector3.new(math.random(-100,100)/100,3,math.random(-100,100)/100))
  2337. end
  2338. f=Instance.new("BodyPosition")
  2339. f.P=2000
  2340. f.D=100
  2341. f.maxForce=Vector3.new(545000,545000,545000)
  2342. if Type=="Damage" then
  2343. f.position=c.Position+Vector3.new(0,3,0)
  2344. elseif Type=="Debuff" or Type=="Interrupt" then
  2345. f.position=c.Position+Vector3.new(0,5,0)
  2346. end
  2347. f.Parent=c
  2348. game:GetService("Debris"):AddItem(m,5)
  2349. table.insert(Effects,{m,"showDamage",damgui,f,10,1,15,50,100})
  2350. c.CanCollide=false
  2351. m.Parent=workspace
  2352. c.CanCollide=false
  2353. end
  2354.  
  2355. combo=0
  2356. function ob1d(mouse)
  2357. if attack==true or equipped==false then return end
  2358. hold=true
  2359. if combo==0 then
  2360. combo=1
  2361. attackone()
  2362. elseif combo==1 then
  2363. combo=2
  2364. attacktwo()
  2365. elseif combo==2 then
  2366. combo=3
  2367. attackthree()
  2368. elseif combo==3 then
  2369. combo=0
  2370. attackfour()
  2371. end
  2372. coroutine.resume(coroutine.create(function()
  2373. for i=1,50 do
  2374. if attack==false then
  2375. swait()
  2376. end
  2377. end
  2378. if attack==false then
  2379. combo=0
  2380. end
  2381. end))
  2382. end
  2383.  
  2384. function ob1u(mouse)
  2385. hold = false
  2386. end
  2387.  
  2388. buttonhold = false
  2389.  
  2390. fenbarmove1.MouseButton1Click:connect(do1)
  2391. fenbarmove2.MouseButton1Click:connect(do2)
  2392. fenbarmove3.MouseButton1Click:connect(do3)
  2393. fenbarmove4.MouseButton1Click:connect(do4)
  2394. eul=0
  2395. equipped=false
  2396. function key(key)
  2397. if attack==true then return end
  2398. if key=="g" then
  2399. Humanoid.Health=0
  2400. end
  2401. if key=="f" then
  2402. pressedf=true
  2403. fnumb=0
  2404. attack=true
  2405. if equipped==false then
  2406. equipped=true
  2407. RSH=ch.Torso["Right Shoulder"]
  2408. LSH=ch.Torso["Left Shoulder"]
  2409. --
  2410. RSH.Parent=nil
  2411. LSH.Parent=nil
  2412. --
  2413. RW.Name="Right Shoulder"
  2414. RW.Part0=ch.Torso
  2415. RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  2416. RW.C1=cf(0, 0.5, 0)
  2417. RW.Part1=ch["Right Arm"]
  2418. RW.Parent=ch.Torso
  2419. --
  2420. LW.Name="Left Shoulder"
  2421. LW.Part0=ch.Torso
  2422. LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  2423. LW.C1=cf(0, 0.5, 0)
  2424. LW.Part1=ch["Left Arm"]
  2425. LW.Parent=ch.Torso
  2426. --
  2427. Animate.Parent=nil
  2428. equipanim()
  2429. else
  2430. equipped=false
  2431. hideanim()
  2432. LH.C1=LHC1
  2433. RH.C1=RHC1
  2434. Animate.Parent=Humanoid
  2435. swait(0)
  2436. RW.Parent=nil
  2437. LW.Parent=nil
  2438. RSH.Parent=player.Character.Torso
  2439. LSH.Parent=player.Character.Torso
  2440. end
  2441. attack=false
  2442. end
  2443. if equipped==false then return end
  2444. --[[if key=="q" then
  2445. attack=true
  2446. for i=0,1,0.05 do
  2447. swait()
  2448. wld1.C0=clerp(wld1.C0,euler(-.4,0,0)*cf(0,1,0),.3)
  2449. wld2.C0=clerp(wld2.C0,euler(0,0,-.5)*cf(0,.4,0),.3)
  2450. Neck.C0=clerp(Neck.C0,necko*euler(-.2,0,0),.3)
  2451. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.2)*euler(.3,0,0),.3)
  2452. RW.C0=clerp(RW.C0,cf(1,.5,-.5)*euler(1.7,0,-1.1)*euler(0,1.57,0),.3)
  2453. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  2454. LW.C0=clerp(LW.C0,cf(-.8,.5,-.5)*euler(1.6,0,1)*euler(0,-1.4,0),.3)
  2455. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  2456. RH.C0=clerp(RH.C0,cf(1,-.8,-.2)*euler(0,1.57,0)*euler(0,0,.3),.3)
  2457. LH.C0=clerp(LH.C0,cf(-1,-.9,-.1)*euler(0,-1.57,0)*euler(-.2,0,-.4),.3)
  2458. end
  2459. swait(200)
  2460. attack=false
  2461. end]]
  2462. if key=="e" then
  2463. Obelisk()
  2464. end
  2465. if key=="z" then
  2466. do1()
  2467. end
  2468. if key=="x" then
  2469. do2()
  2470. end
  2471. if key=="c" then
  2472. do3()
  2473. end
  2474. if key=="v" then
  2475. do4()
  2476. end
  2477. if attack==false then
  2478. RecentEnemy.Value=nil
  2479. end
  2480. end
  2481.  
  2482. function key2(key)
  2483.  
  2484.  
  2485. end
  2486.  
  2487. function s(mouse)
  2488. mouse.Button1Down:connect(function() ob1d(mouse) end)
  2489. mouse.Button1Up:connect(function() ob1u(mouse) end)
  2490. mouse.KeyDown:connect(key)
  2491. mouse.KeyUp:connect(key2)
  2492.  
  2493. player=Player
  2494. ch=Character
  2495. MMouse=mouse
  2496. end
  2497.  
  2498. function ds(mouse)
  2499. end
  2500.  
  2501. Bin.Selected:connect(s)
  2502. Bin.Deselected:connect(ds)
  2503. print("Obsidian loaded.")
  2504.  
  2505. local mananum=0
  2506. local donum=0
  2507. local stunnum=0
  2508. local staggeranim=false
  2509. local stunanim=false
  2510. local pnum=0
  2511. local pnum2=0
  2512. local pref=part(3,modelzorz,0,1,BrickColor.new("Black"),"Effect",vt())
  2513. pref.Anchored=true
  2514. local oldhealth=Humanoid.Health
  2515. local walk=0
  2516. local walkforw=true
  2517. while true do
  2518. swait()
  2519. if Humanoid.Health<=0 then
  2520. attack=true
  2521. resumeControl()
  2522. modelzorz.Parent=workspace
  2523. game:GetService("Debris"):AddItem(modelzorz,30)
  2524. for i=1,#Weapon do
  2525. Weapon[i].Parent=modelzorz
  2526. Weapon[i].CanCollide=true
  2527. end
  2528. for i=1,#Welds do
  2529. if Welds[i].Part0.Parent==Character or Welds[i].Part1.Parent==Character then
  2530. Welds[i].Parent=nil
  2531. else
  2532. Welds[i].Parent=prt1
  2533. end
  2534. end
  2535. end
  2536. if fnumb<21 then
  2537. fnumb=fnumb+1
  2538. if pressedf==false then
  2539. fenframe5.BackgroundTransparency=fenframe5.BackgroundTransparency-.025
  2540. tellbar.TextTransparency=tellbar.TextTransparency-.05
  2541. tellbar.TextStrokeTransparency=tellbar.TextStrokeTransparency-.05
  2542. else
  2543. if fnumb==20 then
  2544. fenframe5.Parent=nil
  2545. print("daigui")
  2546. end
  2547. fenframe5.BackgroundTransparency=fenframe5.BackgroundTransparency+.025
  2548. tellbar.TextTransparency=tellbar.TextTransparency+.05
  2549. tellbar.TextStrokeTransparency=tellbar.TextStrokeTransparency+.05
  2550. end
  2551. end
  2552. if hbwld.Parent==nil then
  2553. hitbox2.Name="Hitbox"
  2554. else
  2555. hitbox2.Name="Hitbox2"
  2556. end
  2557. hitbox2.Parent=hitbox.Parent
  2558. hitbox2.Size=hitbox.Size
  2559. hitbox2.CFrame=hitboxCF
  2560. hboxpos.position=hitbox2.Position+vt(math.random(-100,100)/100,math.random(-100,100)/100,math.random(-100,100)/100)
  2561. if oldhealth>Humanoid.Health then
  2562. passive.Value=passive.Value*.5
  2563. passivenum=0
  2564. end
  2565. oldhealth=Humanoid.Health
  2566. if pnum2>=3 then
  2567. pnum2=0
  2568. if passivenum<15 then
  2569. pref.CFrame=cf(RootPart.Position)*cf(math.random(-1000,1000)/100,0,math.random(-1000,1000)/100)
  2570. hitfloor2,posfloor2=rayCast(pref.Position,(CFrame.new(pref.Position,pref.Position - Vector3.new(0,1,0))).lookVector,30,Character)
  2571. if hitfloor2~=nil then
  2572. MagicObsidian(BrickColor.new(NewCol2),cf(posfloor2)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),3,3,3,-.2,-.2,-.2,.05)
  2573. end
  2574. passivenum=passivenum+1
  2575. end
  2576. end
  2577. pnum=pnum+1
  2578. pnum2=pnum2+1
  2579. --passive2.Value=passive.Value*-.3
  2580. passive2.Value=(-.1+(passive.Value*.2))*-1
  2581. if passive.Value<-1 then
  2582. passive.Value=-1
  2583. end
  2584. if pnum>=200 then
  2585. if passive.Value>-1 then
  2586. passive.Value=passive.Value-.1
  2587. end
  2588. pnum=0
  2589. end
  2590. if Stagger.Value==true and staggeranim==false then
  2591. coroutine.resume(coroutine.create(function()
  2592. staggeranim=true
  2593. while attack==true do
  2594. swait()
  2595. end
  2596. StaggerAnim()
  2597. StaggerHit.Value=false
  2598. Stagger.Value=false
  2599. staggeranim=false
  2600. end))
  2601. end
  2602. if StaggerHit.Value==true and staggeranim==false then
  2603. coroutine.resume(coroutine.create(function()
  2604. staggeranim=true
  2605. while attack==true do
  2606. swait()
  2607. end
  2608. StaggerHitt()
  2609. StaggerHit.Value=false
  2610. Stagger.Value=false
  2611. staggeranim=false
  2612. end))
  2613. end
  2614. if Mvmt.Value<0 or Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true or Rooted.Value==true then
  2615. Humanoid.WalkSpeed=16
  2616. else
  2617. Humanoid.WalkSpeed=16*Mvmt.Value
  2618. end
  2619. if Stun.Value>=StunT.Value and stunanim==false then
  2620. coroutine.resume(coroutine.create(function()
  2621. stunanim=true
  2622. while attack==true do
  2623. swait()
  2624. end
  2625. StunAnim()
  2626. Stun.Value=0
  2627. stunanim=false
  2628. end))
  2629. end
  2630. local stunnum2=20
  2631. if stunnum>=stunnum2 then
  2632. if Stun.Value>0 then
  2633. Stun.Value=Stun.Value-1
  2634. end
  2635. stunnum=0
  2636. end
  2637. stunnum=stunnum+1
  2638. if donum>=.5 then
  2639. handidle=true
  2640. elseif donum<=0 then
  2641. handidle=false
  2642. end
  2643. if handidle==false then
  2644. donum=donum+0.003
  2645. else
  2646. donum=donum-0.003
  2647. end
  2648. local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
  2649. local velderp=RootPart.Velocity.y
  2650. hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character)
  2651. if equipped==true then
  2652. if attack==false then
  2653. idle=idle+1
  2654. else
  2655. idle=0
  2656. end
  2657. if idle>=500 then
  2658. if attack==false then
  2659. --Sheath()
  2660. end
  2661. end
  2662. if Anim=="Walk" then
  2663. if walkforw==true then
  2664. RH.C1=clerp(RH.C1,RHC1*cf(.2,-.2,0)*euler(0,0,1),(Mvmt.Value*10)/50)
  2665. LH.C1=clerp(LH.C1,LHC1*cf(.1,.2,0)*euler(0,0,1),(Mvmt.Value*10)/50)
  2666. else
  2667. RH.C1=clerp(RH.C1,RHC1*cf(-.1,.2,0)*euler(0,0,-1),(Mvmt.Value*10)/50)
  2668. LH.C1=clerp(LH.C1,LHC1*cf(-.2,-.2,0)*euler(0,0,-1),(Mvmt.Value*10)/50)
  2669. end
  2670. else
  2671. RH.C1=clerp(RH.C1,RHC1,.2)
  2672. LH.C1=clerp(LH.C1,LHC1,.2)
  2673. end
  2674. if RootPart.Velocity.y > 1 and hitfloor==nil then
  2675. Anim="Jump"
  2676. if attack==false then
  2677. Neck.C0=clerp(Neck.C0,necko*euler(-0.2,0,0),.2)
  2678. Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.2)
  2679. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.2)
  2680. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1,0,0.5),.2)
  2681. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  2682. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-.8),.2)
  2683. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  2684. RH.C0=clerp(RH.C0,cf(1,-1,-.3)*euler(-0.5,1.57,0)*euler(-.2,0,0),.2)
  2685. LH.C0=clerp(LH.C0,cf(-1,-1,-.3)*euler(-0.5,-1.57,0)*euler(-.2,0,0),.2)
  2686. end
  2687. elseif RootPart.Velocity.y < -1 and hitfloor==nil then
  2688. Anim="Fall"
  2689. if attack==false then
  2690. Neck.C0=clerp(Neck.C0,necko*euler(0.4,0,0),.2)
  2691. Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.2)
  2692. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(.2,0,0),.2)
  2693. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(2,0,1),.2)
  2694. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  2695. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-0.4,0,-0.2),.2)
  2696. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  2697. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0.4,1.57,0),.2)
  2698. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(-0.2,-1.57,0),.2)
  2699. end
  2700. elseif torvel<1 and hitfloor~=nil then
  2701. Anim="Idle"
  2702. if attack==false then
  2703. wld1.C0=clerp(wld1.C0,euler(.2,0,-.2)*cf(0,1,.2),.15)
  2704. wld2.C0=clerp(wld2.C0,euler(0,1.57,0)*cf(0,-1.4,0),.15)
  2705. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.6)*euler(.2,0,0),.15)
  2706. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.2)*euler(0,0,-.6)*euler(.1,0,0),.15)
  2707. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.2-(donum/5),0,.8-(donum/5)),.15)
  2708. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.15)
  2709. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.4+(donum/3),0,-.2-(donum/5)),.15)
  2710. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.15)
  2711. RH.C0=clerp(RH.C0,cf(.9,-1,-.3)*euler(0,1.57,0)*euler(0,.6,-.3),.2)
  2712. LH.C0=clerp(LH.C0,cf(-.9,-1,.3)*euler(0,-1.57,0)*euler(0,.6,-.1),.2)
  2713. end
  2714. elseif torvel>2 and torvel<30 and hitfloor~=nil then
  2715. Anim="Walk"
  2716. walk=walk+1
  2717. if walk>=15-(5*Mvmt.Value) then
  2718. walk=0
  2719. if walkforw==true then
  2720. walkforw=false
  2721. elseif walkforw==false then
  2722. walkforw=true
  2723. end
  2724. end
  2725. if attack==false then
  2726. wld1.C0=clerp(wld1.C0,euler(.2,0,0)*cf(0,1,.2),.2)
  2727. wld2.C0=clerp(wld2.C0,euler(0,1.57,0)*cf(0,-1.4,0),.2)
  2728. Neck.C0=clerp(Neck.C0,necko*euler(0,0,0),.2)
  2729. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0.1,0,0),.2)
  2730. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.2,0,.6),.2)
  2731. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  2732. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.4,0,-.2),.2)
  2733. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  2734. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,0,0),.2)
  2735. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,0,0),.2)
  2736. end
  2737. elseif torvel>=30 and hitfloor~=nil then
  2738. Anim="Run"
  2739. if attack==false then
  2740. wld1.C0=clerp(wld1.C0,euler(-1.57,0,0)*cf(0,1,0),.3)
  2741. wld2.C0=clerp(wld2.C0,euler(0,2.37,0)*cf(0,1,0),.3)
  2742. Neck.C0=clerp(Neck.C0,necko*euler(.2,0,0),.4)
  2743. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(.4,0,0),.4)
  2744. RW.C0=clerp(RW.C0,cf(1,.8,-.5)*euler(2,0,-.8),.4)
  2745. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  2746. LW.C0=clerp(LW.C0,cf(-1,.8,-.5)*euler(2,0,.8),.4)
  2747. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  2748. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,0,.2),.4)
  2749. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,0,-.4),.4)
  2750. end
  2751. end
  2752. end
  2753. if #Effects>0 then
  2754. --table.insert(Effects,{prt,"Block1",delay})
  2755. for e=1,#Effects do
  2756. if Effects[e]~=nil then
  2757. --for j=1,#Effects[e] do
  2758. local Thing=Effects[e]
  2759. if Thing~=nil then
  2760. --local Part=Thing[1]
  2761. local Mode=Thing[2]
  2762. local Delay=Thing[3]
  2763. local IncX=Thing[4]
  2764. local IncY=Thing[5]
  2765. local IncZ=Thing[6]
  2766. if Thing[2]=="CylinderClang" then
  2767. if Thing[3]<=1 then
  2768. Thing[1].CFrame=Thing[1].CFrame*CFrame.new(0,2.5*Thing[5],0)*CFrame.fromEulerAnglesXYZ(Thing[6],0,0)
  2769. Thing[7]=Thing[1].CFrame
  2770. effect("New Yeller",0,Thing[8],Thing[7])
  2771. Thing[8]=Thing[7]
  2772. Thing[3]=Thing[3]+Thing[4]
  2773. else
  2774. Thing[1].Parent=nil
  2775. table.remove(Effects,e)
  2776. end
  2777. --[[Mesh=Thing[7]
  2778. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  2779. Thing[1].Transparency=Thing[1].Transparency+Thing[3]]
  2780. elseif Thing[2]=="showDamage" then
  2781. if Thing[6]<Thing[5] then
  2782. Thing[6]=Thing[6]+1
  2783. elseif Thing[6]<Thing[7] then
  2784. Thing[4].position=Thing[4].position+vt(0,-.2,0)
  2785. Thing[6]=Thing[6]+1
  2786. elseif Thing[6]<Thing[8] then
  2787. Thing[6]=Thing[6]+1
  2788. elseif Thing[6]<Thing[9] then
  2789. Thing[6]=Thing[6]+1
  2790. Thing[4].position=Thing[4].position+vt(0,.2,0)
  2791. Thing[3].TextStrokeTransparency=Thing[3].TextStrokeTransparency+.1
  2792. Thing[3].TextTransparency=Thing[3].TextTransparency+.1
  2793. else
  2794. Thing[1].Parent=nil
  2795. table.remove(Effects,e)
  2796. end
  2797. --end
  2798. elseif Thing[2]=="Obelisk" then
  2799. --[[if Thing[1].Parent==nil then
  2800. print("derpend")
  2801. print(Thing[7])
  2802. derp=Thing[7]
  2803. Obelisks[derp].Parent=nil
  2804. table.remove(Obelisks,Thing[7])
  2805. Part.Parent=nil
  2806. table.remove(Effects,e)
  2807. end]]
  2808. if Thing[6]<=1000 and Thing[1].Parent~=nil then
  2809. --[[print(Thing[1].Parent)
  2810. print(Thing[1].Parent~=workspace)]]
  2811. if #Obelisks>1 then
  2812. Thing[6]=9999
  2813. end
  2814. Thing[6]=Thing[6]+1
  2815. if Thing[3]>=10 then
  2816. Thing[3]=0
  2817. ref=part(3,workspace,0,1,BrickColor.new("Black"),"Reference",vt())
  2818. ref.Anchored=true
  2819. ref.CFrame=cf(Thing[5].Position)*cf(math.random(-500,500)/100,0,math.random(-500,500)/100)
  2820. game:GetService("Debris"):AddItem(ref,.2)
  2821. hitfloor2,posfloor2=rayCast(ref.Position,(CFrame.new(ref.Position,ref.Position - Vector3.new(0,1,0))).lookVector,30,Character)
  2822. MagicObsidian(BrickColor.new(NewCol2),cf(posfloor2),1,1,1,0,0,0,math.random(2,10)/100)
  2823. end
  2824. if Thing[4]>=100 then
  2825. Thing[4]=0
  2826. MagniBuff(Thing[5],20,"Defense",-.1,200)
  2827. MagniDamage(Thing[5],20,2,2,0,"Normal",Thing[5],0,1,math.random(1,5),nil,nil,true,"Defense",.05,100)
  2828. MagicCircle(BrickColor.new(NewCol2),cf(Thing[5].Position)*cf(0,-8,0),1,2,1,10,1,10,.05)
  2829. end
  2830. Thing[3]=Thing[3]+1
  2831. Thing[4]=Thing[4]+1
  2832. else
  2833. for i=1,5 do
  2834. MagicBlock(BrickColor.new(NewCol2),cf(Thing[5].Position)*cf(0,math.random(-600,600)/100,0)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),8,8,8,2,2,2,.05,2)
  2835. end
  2836. for i=1,10 do
  2837. ref=part(3,workspace,0,1,BrickColor.new("Black"),"Reference",vt())
  2838. ref.Anchored=true
  2839. ref.CFrame=cf(Thing[5].Position)*cf(math.random(-900,900)/100,0,math.random(-900,900)/100)
  2840. game:GetService("Debris"):AddItem(ref,.2)
  2841. hitfloor2,posfloor2=rayCast(ref.Position,(CFrame.new(ref.Position,ref.Position - Vector3.new(0,1,0))).lookVector,30,Character)
  2842. MagicObsidian(BrickColor.new(NewCol2),cf(posfloor2),1,1,1,0,0,0,math.random(2,10)/100)
  2843. end
  2844. --[[local index=0
  2845. for i=1,#Obelisks do
  2846. print(Obelisks[i])
  2847. print(Part)
  2848. if Obelisks[i]==Part then
  2849. Obelisks[i].Parent=nil
  2850. table.remove(Obelisks,i)
  2851. end
  2852. end]]
  2853. print("officialend")
  2854. --[[derp=Thing[7]
  2855. Obelisks[derp].Parent=nil
  2856. table.remove(Obelisks,Thing[7])]]
  2857. Thing[1].Parent=nil
  2858. if Thing[5].Parent~=nil then
  2859. Thing[5].Parent.Parent=nil
  2860. end
  2861. table.remove(Effects,e)
  2862. for i=1,#Obelisks do
  2863. if Obelisks[i]==Thing[1] then
  2864. table.remove(Obelisks,i)
  2865. end
  2866. end
  2867. end
  2868. elseif Thing[2]=="Shoot" then
  2869. local Look=Thing[1]
  2870. local hit,pos = rayCast(Thing[4],Look,3,modelzorz)
  2871. local mag=(Thing[4]-pos).magnitude
  2872. MagicCircle(BrickColor.new(NewCol),CFrame.new((Thing[4]+pos)/2,pos)*angles(1.57,0,0),10,10,10,.5,.5,.5,.2)
  2873. Thing[4]=Thing[4]+(Look*3)
  2874. Thing[3]=Thing[3]-1
  2875. if hit~=nil then
  2876. Thing[3]=0
  2877. Damagefunc(hit,Thing[5],Thing[6],Thing[7],"Knockdown2",RootPart,0,2,math.random(5,10),nil,nil,true,"Obsidian",.05,500)
  2878. ref=part(3,workspace,0,1,BrickColor.new("Really red"),"Reference",vt())
  2879. ref.Anchored=true
  2880. ref.CFrame=cf(pos)
  2881. game:GetService("Debris"):AddItem(ref,1)
  2882. so("183763506",ref,1,1)
  2883. so("203691510",ref,1,1)
  2884. MagicCircle(BrickColor.new(NewCol2),cf(pos),10,10,10,2,2,2,0.07)
  2885. MagicBlock(BrickColor.new(NewCol2),cf(ref.Position)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1,1,1,10,10,10,.1,2)
  2886. MagicRing(BrickColor.new(NewCol2),cf(ref.Position)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1,1,.1,4,4,.1,.1)
  2887. MagniDamage(ref,15,Thing[5]/1.5,Thing[6]/1.5,0,"Normal",ref,0,1,math.random(3,8),nil,nil,true,"Obsidian",.05,300)
  2888. end
  2889. if Thing[3]<=0 then
  2890. table.remove(Effects,e)
  2891. end
  2892. end
  2893. if Thing[2]~="DecreaseStat" and Thing[2]~="showDamage" and Thing[2]~="Obelisk" and Thing[2]~="Shoot" then
  2894. if Thing[1].Transparency<=1 then
  2895. if Thing[2]=="Block1" then
  2896. Thing[1].CFrame=Thing[1].CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  2897. Mesh=Thing[7]
  2898. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  2899. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  2900. elseif Thing[2]=="Block2" then
  2901. Thing[1].CFrame=Thing[1].CFrame
  2902. Mesh=Thing[7]
  2903. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  2904. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  2905. elseif Thing[2]=="Block3" then
  2906. Thing[8]=Thing[8]*cf(0,math.random(50,80)/100,0)
  2907. Thing[1].CFrame=Thing[8]*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  2908. Mesh=Thing[7]
  2909. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  2910. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  2911. elseif Thing[2]=="Obsidian" then
  2912. Thing[1].CFrame=cf(Thing[1].Position)*cf(0,Thing[8],0)
  2913. Thing[1].CFrame=Thing[1].CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  2914. Thing[8]=Thing[8]-Thing[9]
  2915. Mesh=Thing[7]
  2916. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  2917. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  2918. elseif Thing[2]=="Cylinder" then
  2919. Mesh=Thing[7]
  2920. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  2921. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  2922. elseif Thing[2]=="Blood" then
  2923. Mesh=Thing[7]
  2924. Thing[1].CFrame=Thing[1].CFrame*cf(0,.4,0)
  2925. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  2926. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  2927. elseif Thing[2]=="Elec" then
  2928. Mesh=Thing[7]
  2929. Mesh.Scale=Mesh.Scale+vt(Thing[7],Thing[8],Thing[9])
  2930. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  2931. elseif Thing[2]=="Disappear" then
  2932. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  2933. end
  2934. else
  2935. Thing[1].Parent=nil
  2936. table.remove(Effects,e)
  2937. end
  2938. end
  2939. end
  2940. --end
  2941. end
  2942. end
  2943. end
  2944. fenbarmana2:TweenSize(UDim2.new(.4,0,-4*mana.Value/100,0),nil,1,0.4,true)
  2945. fenbarmana4.Text="Mana("..mana.Value..")"
  2946. fenbarhp2.BackgroundColor3=Color3.new(Humanoid.Health/Humanoid.MaxHealth,0,0)
  2947. fenbarhp2:TweenSize(UDim2.new(Humanoid.Health/Humanoid.MaxHealth,0,1,0),nil,1,0.4,true)
  2948. fenbarhp3.Text="("..math.floor(Humanoid.Health)..")"
  2949. fenbarmove1b:TweenSize(UDim2.new(1*cooldowns[1]/cooldownmax,0,1,0),nil,1,0.4,true)
  2950. fenbarmove2b:TweenSize(UDim2.new(1*cooldowns[2]/cooldownmax,0,1,0),nil,1,0.4,true)
  2951. fenbarmove3b:TweenSize(UDim2.new(1*cooldowns[3]/cooldownmax,0,1,0),nil,1,0.4,true)
  2952. fenbarmove4b:TweenSize(UDim2.new(1*cooldowns[4]/cooldownmax,0,1,0),nil,1,0.4,true)
  2953. for _,c in pairs(Decrease:children()) do
  2954. if c:findFirstChild("Duration")~=nil then
  2955. c.Duration.Value=c.Duration.Value-1
  2956. if c.Duration.Value<=0 then
  2957. c.Parent=nil
  2958. end
  2959. end
  2960. if c.Name=="DecreaseAtk" then
  2961. decreaseatk=decreaseatk+c.Value
  2962. elseif c.Name=="DecreaseDef" then
  2963. decreasedef=decreasedef+c.Value
  2964. elseif c.Name=="DecreaseMvmt" then
  2965. decreasemvmt=decreasemvmt+c.Value
  2966. end
  2967. end
  2968. --[[if Mode=="Defensive" then
  2969. Max=Humanoid.MaxHealth
  2970. Cur=Humanoid.Health
  2971. Val=(((Max-Cur)/150)+1)*((Max/Cur)*(Cur/100))
  2972. Atk.Value=1-decreaseatk
  2973. Def.Value=Val-decreasedef
  2974. Mvmt.Value=1-decreasemvmt
  2975. elseif Mode=="Offensive" then
  2976. Max=Humanoid.MaxHealth
  2977. Cur=Humanoid.Health
  2978. Val=(((Max-Cur)/170)+1)*((Max/Cur)*(Cur/100))
  2979. Val2=(((Max-Cur)/160)+1)*((Max/Cur)*(Cur/100))
  2980. Atk.Value=Val-decreaseatk
  2981. Def.Value=1-decreasedef
  2982. Mvmt.Value=Val2-decreasemvmt
  2983. end]]
  2984. Atk.Value=1-decreaseatk
  2985. if Atk.Value<=0 then
  2986. Atk.Value=0
  2987. end
  2988. Def.Value=1-decreasedef
  2989. if Def.Value<=0 then
  2990. Def.Value=0.01
  2991. end
  2992. Mvmt.Value=1-decreasemvmt
  2993. if Mvmt.Value<=0 then
  2994. Mvmt.Value=0
  2995. end
  2996. decreaseatk=0
  2997. decreasedef=0
  2998. decreasemvmt=0
  2999. AtkVal=Atk.Value*100
  3000. AtkVal=math.floor(AtkVal)
  3001. AtkVal=AtkVal/100
  3002. fenbardamage.Text="Damage\
  3003. ("..(AtkVal)..")"
  3004. DefVal=Def.Value*100
  3005. DefVal=math.floor(DefVal)
  3006. DefVal=DefVal/100
  3007. fenbardef.Text="Defense\
  3008. ("..(DefVal)..")"
  3009. MvmtVal=Mvmt.Value*100
  3010. MvmtVal=math.floor(MvmtVal)
  3011. MvmtVal=MvmtVal/100
  3012. if Rooted.Value==true then MvmtVal=0 end
  3013. fenbarmove.Text="Walkspeed\
  3014. ("..(MvmtVal)..")"
  3015. fenbaroblsk1.Text="Obelisk\
  3016. ("..(#Obelisks)..")"
  3017. if Stun.Value>=StunT.Value then
  3018. fenbarstun2:TweenSize(UDim2.new(.4,0,-4,0),nil,1,0.4,true)
  3019. else
  3020. fenbarstun2:TweenSize(UDim2.new(.4,0,-4*Stun.Value/StunT.Value,0),nil,1,0.4,true)
  3021. end
  3022. fenbarstun3.Text="Stun("..Stun.Value..")"
  3023. if mana.Value>=100 then
  3024. mana.Value=100
  3025. else
  3026. if mananum<=manaregain then
  3027. mananum=mananum+1
  3028. else
  3029. mananum=0
  3030. mana.Value=mana.Value+1
  3031. end
  3032. end
  3033. for i=1,#cooldowns do
  3034. if cooldowns[i]>=cooldownmax then
  3035. cooldowns[i]=cooldownmax
  3036. else
  3037. cooldowns[i]=cooldowns[i]+cooldownsadd[i]
  3038. end
  3039. end
  3040. end
  3041.  
  3042.  
  3043. --[[
  3044. Copyrighted (C) Fenrier 2015
  3045. Fixed by methaphone
  3046. ]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement