Dark_EccentricYT

Untitled

May 15th, 2018
1,879
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 66.80 KB | None | 0 0
  1. local p = game.Players.LocalPlayer
  2. local char = p.Character
  3. local mouse = p:GetMouse()
  4. local larm = char["Left Arm"]
  5. local rarm = char["Right Arm"]
  6. local lleg = char["Left Leg"]
  7. local rleg = char["Right Leg"]
  8. local hed = char.Head
  9. local Torso = char.Torso
  10. local hum = char.Humanoid
  11. local cam = game.Workspace.CurrentCamera
  12. local root = char.HumanoidRootPart
  13. local deb = false
  14. local shot = 0
  15. local potential = false
  16. local debris=game:service"Debris"
  17. local l = game:GetService("Lighting")
  18. local rs = game:GetService("RunService").RenderStepped
  19. ptz = {0.8, 0.85, 0.9, 0.95, 1, 1.05, 1.1}
  20. math.randomseed(os.time())
  21. for i,v in pairs(char:children()) do
  22. if v:IsA("Accessory") then
  23. v:Destroy()
  24. end
  25. end
  26. char["Body Colors"].HeadColor = BrickColor.new("1003")
  27. char["Body Colors"].LeftArmColor = BrickColor.new("1003")
  28. char["Body Colors"].RightArmColor = BrickColor.new("1003")
  29. char["Body Colors"].TorsoColor = BrickColor.new("1003")
  30. char["Body Colors"].RightLegColor = BrickColor.new("1003")
  31. char["Body Colors"].LeftLegColor = BrickColor.new("1003")
  32. Player=game:GetService("Players").LocalPlayer
  33. Character=Player.Character
  34. PlayerGui=Player.PlayerGui
  35. Backpack=Player.Backpack
  36. Torso=Character.Torso
  37. Head=Character.Head
  38. Humanoid=Character.Humanoid
  39. Mouse=Player:GetMouse()
  40. RootPart = Character.HumanoidRootPart
  41. RootJoint = RootPart.RootJoint
  42. LeftArm=Character["Left Arm"]
  43. LeftLeg=Character["Left Leg"]
  44. RightArm=Character["Right Arm"]
  45. RightLeg=Character["Right Leg"]
  46. LS=Torso["Left Shoulder"]
  47. LH=Torso["Left Hip"]
  48. RS=Torso["Right Shoulder"]
  49. RH=Torso["Right Hip"]
  50. Neck=Torso.Neck
  51. it=Instance.new
  52. vt=Vector3.new
  53. cf=CFrame.new
  54. euler=CFrame.fromEulerAnglesXYZ
  55. angles=CFrame.Angles
  56. local decreaseatk=0
  57. local decreasedef=0
  58. local decreasemvmt=0
  59. local Anim="Idle"
  60. local Effects={}
  61. local armorparts={}
  62. local armorwelds={}
  63. local weaponparts={}
  64. local weaponwelds={}
  65. local necko=euler(0,0,0)*cf(0,1,0)
  66. local attack=false
  67. local jump=false
  68. local start=false
  69. local move=10
  70. local hitfloor,posfloor=nil,nil
  71. local run=Instance.new("NumberValue")
  72. run.Name="DecreaseMvmt"
  73. run.Value=-1.2
  74. local bName="Sthomas"
  75. local MainColor=BrickColor.new("Black")
  76. local SubColor=BrickColor.new("Bright blue")
  77. --[[if script:findFirstChild("SiegmundHealth")~=nil then
  78. for _,c in pairs(game.Players:children()) do
  79. d=script.SiegmundHealth:Clone()
  80. d.Parent=c.PlayerGui
  81. end
  82. end]]
  83.  
  84.  
  85.  
  86.  
  87. function NoOutline(Part)
  88. Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
  89. end
  90. Character.Animate:Remove()
  91.  
  92. Character.Humanoid.Animator:Remove()
  93. local Create = LoadLibrary("RbxUtility").Create
  94.  
  95. ArtificialHB = Create("BindableEvent", script){
  96. Parent = script,
  97. Name = "Heartbeat",
  98. }
  99.  
  100. script:WaitForChild("Heartbeat")
  101.  
  102. frame = 1 / 30
  103. tf = 0
  104. allowframeloss = false
  105. tossremainder = false
  106. lastframe = tick()
  107. script.Heartbeat:Fire()
  108.  
  109. game:GetService("RunService").Heartbeat:connect(function(s, p)
  110. tf = tf + s
  111. if tf >= frame then
  112. if allowframeloss then
  113. script.Heartbeat:Fire()
  114. lastframe = tick()
  115. else
  116. for i = 1, math.floor(tf / frame) do
  117. script.Heartbeat:Fire()
  118. end
  119. lastframe = tick()
  120. end
  121. if tossremainder then
  122. tf = 0
  123. else
  124. tf = tf - frame * math.floor(tf / frame)
  125. end
  126. end
  127. end)
  128.  
  129. function swait(num)
  130. if num == 0 or num == nil then
  131. ArtificialHB.Event:wait()
  132. else
  133. for i = 0, num do
  134. ArtificialHB.Event:wait()
  135. end
  136. end
  137. end
  138.  
  139. --[[frame,t,lastframe = 1/30,0,tick()
  140. allowframeloss = false --if set to true will fire every frame it possibly can. This will result in multiple events happening at the same time whenever delta returns frame*2 or greater.
  141. tossremainder = false --if set to true t will be set to 0 after Fire()-ing.
  142.  
  143. swait = function(dt)
  144. if dt == nil then
  145. dt = frame
  146. elseif dt < frame then
  147. dt = frame
  148. elseif dt > frame then
  149. --round this out into frames
  150. dt = math.floor(dt/frame)
  151. end
  152. local timetomeet = tick() + dt
  153. end]] --maybe later
  154.  
  155. --30hz Pacemaker
  156.  
  157. script:WaitForChild("Heartbeat")
  158.  
  159. frame = 1/30
  160. tf = 0
  161. allowframeloss = false --if set to true will fire every frame it possibly can. This will result in multiple events happening at the same time whenever delta returns frame*2 or greater.
  162. tossremainder = false --if set to true t will be set to 0 after Fire()-ing.
  163. lastframe = tick()
  164. script.Heartbeat:Fire() --ayy lmao
  165.  
  166. game:GetService("RunService").Heartbeat:connect(function(s,p) --herp derp
  167. tf = tf + s
  168. if tf >= frame then
  169. if allowframeloss then
  170. script.Heartbeat:Fire()
  171. lastframe=tick()
  172. else
  173. --print("FIRED "..math.floor(t/frame).." FRAME(S)","REMAINDER "..(t - frame*(math.floor(t/frame))))
  174. for i=1, math.floor(tf/frame) do
  175. script.Heartbeat:Fire()
  176. end
  177. lastframe=tick()
  178. end
  179. if tossremainder then
  180. tf = 0
  181. else
  182. tf = tf - frame * math.floor(tf/frame)
  183. end
  184. end
  185. end)
  186.  
  187. function clerp(a,b,t)
  188. local qa = {QuaternionFromCFrame(a)}
  189. local qb = {QuaternionFromCFrame(b)}
  190. local ax, ay, az = a.x, a.y, a.z
  191. local bx, by, bz = b.x, b.y, b.z
  192. local _t = 1-t
  193. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  194. end
  195.  
  196. function QuaternionFromCFrame(cf)
  197. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  198. local trace = m00 + m11 + m22
  199. if trace > 0 then
  200. local s = math.sqrt(1 + trace)
  201. local recip = 0.5/s
  202. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  203. else
  204. local i = 0
  205. if m11 > m00 then
  206. i = 1
  207. end
  208. if m22 > (i == 0 and m00 or m11) then
  209. i = 2
  210. end
  211. if i == 0 then
  212. local s = math.sqrt(m00-m11-m22+1)
  213. local recip = 0.5/s
  214. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  215. elseif i == 1 then
  216. local s = math.sqrt(m11-m22-m00+1)
  217. local recip = 0.5/s
  218. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  219. elseif i == 2 then
  220. local s = math.sqrt(m22-m00-m11+1)
  221. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  222. end
  223. end
  224. end
  225.  
  226. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  227. local xs, ys, zs = x + x, y + y, z + z
  228. local wx, wy, wz = w*xs, w*ys, w*zs
  229. local xx = x*xs
  230. local xy = x*ys
  231. local xz = x*zs
  232. local yy = y*ys
  233. local yz = y*zs
  234. local zz = z*zs
  235. 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))
  236. end
  237.  
  238. function QuaternionSlerp(a, b, t)
  239. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  240. local startInterp, finishInterp;
  241. if cosTheta >= 0.0001 then
  242. if (1 - cosTheta) > 0.0001 then
  243. local theta = math.acos(cosTheta)
  244. local invSinTheta = 1/math.sin(theta)
  245. startInterp = math.sin((1-t)*theta)*invSinTheta
  246. finishInterp = math.sin(t*theta)*invSinTheta
  247. else
  248. startInterp = 1-t
  249. finishInterp = t
  250. end
  251. else
  252. if (1+cosTheta) > 0.0001 then
  253. local theta = math.acos(-cosTheta)
  254. local invSinTheta = 1/math.sin(theta)
  255. startInterp = math.sin((t-1)*theta)*invSinTheta
  256. finishInterp = math.sin(t*theta)*invSinTheta
  257. else
  258. startInterp = t-1
  259. finishInterp = t
  260. end
  261. end
  262. 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
  263. end
  264.  
  265. function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
  266. local fp=it("Part")
  267. fp.formFactor=formfactor
  268. fp.Parent=parent
  269. fp.Reflectance=reflectance
  270. fp.Transparency=transparency
  271. fp.CanCollide=false
  272. fp.Locked=true
  273. fp.BrickColor=brickcolor
  274. fp.Name=name
  275. fp.Size=size
  276. NoOutline(fp)
  277. fp.Material="SmoothPlastic"
  278. fp:BreakJoints()
  279. return fp
  280. end
  281.  
  282. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  283. local mesh=it(Mesh)
  284. mesh.Parent=part
  285. if Mesh=="SpecialMesh" then
  286. mesh.MeshType=meshtype
  287. if meshid~="nil" then
  288. mesh.MeshId="http://www.roblox.com/asset/?id="..meshid
  289. end
  290. end
  291. mesh.Offset=offset
  292. mesh.Scale=scale
  293. return mesh
  294. end
  295.  
  296. function weld(parent,part0,part1,c0)
  297. local weld=it("Motor")
  298. weld.Parent=parent
  299. weld.Part0=part0
  300. weld.Part1=part1
  301. weld.C0=c0
  302. return weld
  303. end
  304.  
  305. function gui(GuiType,parent,text,backtrans,backcol,pos,size,image)
  306. local gui=it(GuiType)
  307. gui.Parent=parent
  308. gui.BackgroundTransparency=backtrans
  309. gui.BackgroundColor3=backcol
  310. gui.SizeConstraint="RelativeXY"
  311. gui.Position=pos
  312. gui.Size=size
  313. if GuiType=="TextLabel" then
  314. gui.Text=text
  315. gui.TextXAlignment="Center"
  316. gui.TextYAlignment="Center"
  317. gui.Font="SourceSans"
  318. gui.FontSize="Size14"
  319. gui.TextWrapped=false
  320. gui.TextStrokeTransparency=0
  321. gui.TextColor=BrickColor.new("White")
  322. elseif GuiType=="ImageLabel" then
  323. gui.Image="rbxassetid://"..image
  324. gui.ImageColor3=backcol
  325. end
  326. return gui
  327. end
  328.  
  329. local Characte=Instance.new("Model")
  330. Characte.Parent=Character
  331. Characte.Name=bName
  332.  
  333.  
  334. --local Torso=part(0,Character,0,0,MainColor,"Torso",vt(2,2,1))
  335. local Torsoc=part(0,Character,0,0,SubColor,"Torso Copy",vt(2,2,1))
  336. --local LeftArm=part(0,Character,0,0,MainColor,"Left Arm",vt(1,2,1))
  337. local LeftArmc=part(0,Character,0,0,SubColor,"Left Arm Copy",vt(1,2,1))
  338. --local RightArm=part(0,Character,0,0,MainColor,"Right Arm",vt(1,2,1))
  339. local RightArmc=part(0,Character,0,0,SubColor,"Right Arm Copy",vt(1,2,1))
  340. --local LeftLeg=part(0,Character,0,0,MainColor,"Left Leg",vt(1,2,1))
  341. local LeftLegc=part(0,Character,0,0,SubColor,"Left Leg Copy",vt(1,2,1))
  342. --local RightLeg=part(0,Character,0,0,MainColor,"Right Leg",vt(1,2,1))
  343. local RightLegc=part(0,Character,0,0,SubColor,"Right Leg Copy",vt(1,2,1))
  344.  
  345.  
  346. --local Head=part(0,Character,0,0,BrickColor.new("Pastel brown"),"Head",vt(2,1,1))
  347. --[[local Torso=part(0,Character,0,0,MainColor,"Torso",vt(2,2,1))
  348. local Torsoc=part(0,Character,0,0,SubColor,"Torso Copy",vt(2,2,1))
  349. local LeftArm=part(0,Character,0,0,SubColor,"Left Arm",vt(1,2,1))
  350. local LeftArmc=part(0,Character,0,0,MainColor,"Left Arm Copy",vt(1,2,1))
  351. local RightArm=part(0,Character,0,0,SubColor,"Right Arm",vt(1,2,1))
  352. local RightArmc=part(0,Character,0,0,MainColor,"Right Arm Copy",vt(1,2,1))
  353. local LeftLeg=part(0,Character,0,0,SubColor,"Left Leg",vt(1,2,1))
  354. local LeftLegc=part(0,Character,0,0,MainColor,"Left Leg Copy",vt(1,2,1))
  355. local RightLeg=part(0,Character,0,0,SubColor,"Right Leg",vt(1,2,1))
  356. local RightLegc=part(0,Character,0,0,MainColor,"Right Leg Copy",vt(1,2,1))]]
  357. --local RootPart=part(0,Character,0,1,MainColor,"HumanoidRootPart",vt(2,2,1))
  358. local Cape=part(0,Character,0,0,BrickColor.new("Bright blue"),"Hat",vt())
  359. Head.CanCollide=true
  360. Torso.CanCollide=true
  361. LeftArm.CanCollide=true
  362. RightArm.CanCollide=true
  363. LeftLeg.CanCollide=true
  364. RightLeg.CanCollide=true
  365. RootPart.CanCollide=false
  366. Head.face:Remove()
  367. face=Instance.new("Decal",Head)
  368. face.Face="Front"
  369. --face.Texture="http://www.roblox.com/asset/?id="
  370. face.Texture="http://www.roblox.com/asset/?id="
  371.  
  372. local HMesh=mesh("SpecialMesh",Head,"Head","nil",vt(0,0,0),vt(1.25,1.25,1.25))
  373. local TMsh=mesh("SpecialMesh",Torso,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(1.8,1,.8))
  374. local LAMsh=mesh("SpecialMesh",LeftArm,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(.8,.8,.8))
  375. local RAMsh=mesh("SpecialMesh",RightArm,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(.8,.8,.8))
  376. local LLMsh=mesh("SpecialMesh",LeftLeg,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(.8,1,.8))
  377. local RLMsh=mesh("SpecialMesh",RightLeg,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(.8,1,.8))
  378. local TcMsh=mesh("SpecialMesh",Torsoc,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(-2,-1,-1))
  379. local LAcMsh=mesh("SpecialMesh",LeftArmc,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(-1,-1,-1))
  380. local RAcMsh=mesh("SpecialMesh",RightArmc,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(-1,-1,-1))
  381. local LLcMsh=mesh("SpecialMesh",LeftLegc,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(-1,-1.2,-1))
  382. local RLcMsh=mesh("SpecialMesh",RightLegc,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(-1,-1.2,-1))
  383. TMsh.MeshId="rbxasset://fonts/leftarm.mesh"
  384. LAMsh.MeshId="rbxasset://fonts/leftarm.mesh"
  385. RAMsh.MeshId="rbxasset://fonts/leftarm.mesh"
  386. LLMsh.MeshId="rbxasset://fonts/leftarm.mesh"
  387. RLMsh.MeshId="rbxasset://fonts/leftarm.mesh"
  388. TcMsh.MeshId="rbxasset://fonts/leftarm.mesh"
  389. LAcMsh.MeshId="rbxasset://fonts/leftarm.mesh"
  390. RAcMsh.MeshId="rbxasset://fonts/leftarm.mesh"
  391. LLcMsh.MeshId="rbxasset://fonts/leftarm.mesh"
  392. RLcMsh.MeshId="rbxasset://fonts/leftarm.mesh"
  393. local Cmsh=mesh("SpecialMesh",Cape,"FileMesh","http://www.roblox.com/asset/?id=250281794",vt(0,0,0),vt(1,1,1))
  394.  
  395. --[[local Neck=weld(Torso,Torso,Head,cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0))
  396. Neck.C1=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)]]
  397. local Neck=weld(Torso,Torso,Head,euler(0,0,0)*cf(0,1,0))
  398. Neck.C1=cf(0,-.5,0)
  399. local RW=weld(Torso,Torso,RightArm,cf(1.5,.5,0))
  400. RW.C1=cf(0,.5,0)
  401. local RWc=weld(Torso,RightArm,RightArmc,cf(0,0,0))
  402. local LW=weld(Torso,Torso,LeftArm,cf(-1.5,.5,0))
  403. LW.C1=cf(0,.5,0)
  404. local LWc=weld(Torso,LeftArm,LeftArmc,cf(0,0,0))
  405. local RH=weld(Torso,Torso,RightLeg,cf(.5,-1,0))
  406. RH.C1=cf(0,1,0)
  407. local RHc=weld(Torso,RightLeg,RightLegc,cf(0,0,0))
  408. local LH=weld(Torso,Torso,LeftLeg,cf(-.5,-1,0))
  409. LH.C1=cf(0,1,0)
  410. local LHc=weld(Torso,LeftLeg,LeftLegc,cf(0,0,0))
  411. local RootJoint=weld(Torso,Torso,RootPart,cf(0,0,0))
  412. local RootJointc=weld(Torso,Torso,Torsoc,cf(0,0,0))
  413. --local Cwld=weld(Torso,Cape,Head,euler(0,0,0)*cf(0,2,-.3))
  414. local Cwld=weld(Torso,Cape,Torso,euler(0,0,0)*cf(0,.5,-.3))
  415. --Torso.CFrame=cf(math.random(-5000,5000)/100,math.random(-5000,5000)/100,math.random(-5000,5000)/100)
  416. --Torso.CFrame=cf(0,0,0)
  417. --Torso.CFrame=workspace.Map.BossSpawn.CFrame*cf(0,5,0)
  418.  
  419. local hitbox=part(3,nil,0,1,BrickColor.new("Black"),"Hitbox",vt(1,1,1))
  420. --hitbox.Anchored=true
  421. local hitbox2=part(3,nil,0,1,BrickColor.new("Black"),"Hitbox",vt(1,1,1))
  422. hitbox2.Anchored=true
  423. local hitboxCF=cf(0,0,0)
  424.  
  425. --[[local Humanoid=Instance.new("Humanoid")
  426. Humanoid.Parent=Character
  427. TehHealth=700
  428. --TehHealth=2000
  429. Humanoid.MaxHealth=TehHealth
  430. Humanoid.Health=TehHealth
  431. coroutine.resume(coroutine.create(function()
  432. for i=1,20 do
  433. wait()
  434. Humanoid.Health=Humanoid.MaxHealth
  435. end
  436. Humanoid:TakeDamage(1)
  437. end))]]
  438. local Stats=Instance.new("BoolValue")
  439. Stats.Name="Stats"
  440. Stats.Parent=Character
  441. local Atk=Instance.new("NumberValue")
  442. Atk.Name="Damage"
  443. Atk.Parent=Stats
  444. Atk.Value=1
  445. local Def=Instance.new("NumberValue")
  446. Def.Name="Defense"
  447. Def.Parent=Stats
  448. Def.Value=1
  449. local Mvmt=Instance.new("NumberValue")
  450. Mvmt.Name="Movement"
  451. Mvmt.Parent=Stats
  452. Mvmt.Value=1
  453. local Block=Instance.new("BoolValue")
  454. Block.Name="Block"
  455. Block.Parent=Stats
  456. Block.Value=false
  457. local Stun=Instance.new("NumberValue")
  458. Stun.Name="Stun"
  459. Stun.Parent=Stats
  460. Stun.Value=0
  461. local StunT=Instance.new("NumberValue")
  462. StunT.Name="StunThreshold"
  463. StunT.Parent=Stats
  464. StunT.Value=100
  465. local Rooted=Instance.new("BoolValue")
  466. Rooted.Name="Rooted"
  467. Rooted.Parent=Stats
  468. Rooted.Value=false
  469. local Stunned=Instance.new("BoolValue")
  470. Stunned.Name="Stunned"
  471. Stunned.Parent=Stats
  472. Stunned.Value=false
  473. local Stagger=Instance.new("BoolValue")
  474. Stagger.Name="Stagger"
  475. Stagger.Parent=Stats
  476. Stagger.Value=false
  477. local StaggerHit=Instance.new("BoolValue")
  478. StaggerHit.Name="StaggerHit"
  479. StaggerHit.Parent=Stats
  480. StaggerHit.Value=false
  481. local RecentEnemy=Instance.new("ObjectValue")
  482. RecentEnemy.Name="RecentEnemy"
  483. RecentEnemy.Parent=Stats
  484. RecentEnemy.Value=nil
  485. local Decrease=Instance.new("BoolValue")
  486. Decrease.Name="Decrease"
  487. Decrease.Parent=Stats
  488. Decrease.Value=false
  489. local mana=Instance.new("NumberValue")
  490. mana.Name="Mana"
  491. mana.Parent=Stats
  492. mana.Value=0
  493. local boss=Instance.new("BoolValue")
  494. boss.Name="Boss"
  495. boss.Parent=Stats
  496. boss.Value=true
  497. local alive=Instance.new("BoolValue")
  498. alive.Name="Alive"
  499. alive.Parent=Character
  500. alive.Value=true
  501. local btarget=Instance.new("ObjectValue")
  502. btarget.Name="Target"
  503. btarget.Parent=Stats
  504. btarget.Value=nil
  505. local passive1=Instance.new("NumberValue",Decrease)
  506. passive1.Name="DecreaseAtk"
  507. passive1.Value=-.4
  508. local passive2=Instance.new("NumberValue",Decrease)
  509. passive2.Name="DecreaseDef"
  510. passive2.Value=-.1
  511. local passive3=Instance.new("NumberValue",Decrease)
  512. passive3.Name="DecreaseMvmt"
  513. passive3.Value=.1
  514.  
  515. so = function(id,par,vol,pit)
  516. local sou = Instance.new("Sound",par or workspace)
  517. sou.Volume=1.5
  518. sou.Pitch=pit or 1
  519. sou.SoundId="http://www.roblox.com/asset/?id="..id
  520. --swait()
  521. sou:play()
  522. game:GetService("Debris"):AddItem(sou,6)
  523. end
  524.  
  525. local function CFrameFromTopBack(at, top, back)
  526. local right = top:Cross(back)
  527. return CFrame.new(at.x, at.y, at.z,
  528. right.x, top.x, back.x,
  529. right.y, top.y, back.y,
  530. right.z, top.z, back.z)
  531. end
  532.  
  533. function Triangle(a, b, c)
  534. local edg1 = (c-a):Dot((b-a).unit)
  535. local edg2 = (a-b):Dot((c-b).unit)
  536. local edg3 = (b-c):Dot((a-c).unit)
  537. if edg1 <= (b-a).magnitude and edg1 >= 0 then
  538. a, b, c = a, b, c
  539. elseif edg2 <= (c-b).magnitude and edg2 >= 0 then
  540. a, b, c = b, c, a
  541. elseif edg3 <= (a-c).magnitude and edg3 >= 0 then
  542. a, b, c = c, a, b
  543. else
  544. assert(false, "unreachable")
  545. end
  546.  
  547. local len1 = (c-a):Dot((b-a).unit)
  548. local len2 = (b-a).magnitude - len1
  549. local width = (a + (b-a).unit*len1 - c).magnitude
  550.  
  551. local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit)
  552.  
  553. local list = {}
  554.  
  555. if len1 > 0.01 then
  556. local w1 = Instance.new('WedgePart', m)
  557. w1.Name = "Triangle"
  558. game:GetService("Debris"):AddItem(w1,5)
  559. w1.Material = "SmoothPlastic"
  560. w1.FormFactor = 'Custom'
  561. w1.BrickColor = BrickColor.new("Teal")
  562. w1.Transparency = 0
  563. w1.Reflectance = 0
  564. w1.Material = "SmoothPlastic"
  565. w1.CanCollide = false
  566. NoOutline(w1)
  567. local sz = Vector3.new(0.2, width, len1)
  568. w1.Size = sz
  569. local sp = Instance.new("SpecialMesh",w1)
  570. sp.MeshType = "Wedge"
  571. sp.Scale = Vector3.new(0,1,1) * sz/w1.Size
  572. w1:BreakJoints()
  573. w1.Anchored = true
  574. w1.Parent = workspace
  575. w1.Transparency = 0.7
  576. table.insert(Effects,{w1,"Disappear",.05})
  577. w1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2)
  578. table.insert(list,w1)
  579. end
  580.  
  581. if len2 > 0.01 then
  582. local w2 = Instance.new('WedgePart', m)
  583. w2.Name = "Triangle"
  584. game:GetService("Debris"):AddItem(w2,5)
  585. w2.Material = "SmoothPlastic"
  586. w2.FormFactor = 'Custom'
  587. w2.BrickColor = BrickColor.new("Teal")
  588. w2.Transparency = 0
  589. w2.Reflectance = 0
  590. w2.Material = "SmoothPlastic"
  591. w2.CanCollide = false
  592. NoOutline(w2)
  593. local sz = Vector3.new(0.2, width, len2)
  594. w2.Size = sz
  595. local sp = Instance.new("SpecialMesh",w2)
  596. sp.MeshType = "Wedge"
  597. sp.Scale = Vector3.new(0,1,1) * sz/w2.Size
  598. w2:BreakJoints()
  599. w2.Anchored = true
  600. w2.Parent = workspace
  601. w2.Transparency = 0.7
  602. table.insert(Effects,{w2,"Disappear",.05})
  603. w2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2)
  604. table.insert(list,w2)
  605. end
  606. return unpack(list)
  607. end
  608.  
  609. function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,Type)
  610. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(.2,.2,.2))
  611. prt.Anchored=true
  612. prt.CFrame=cframe
  613. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  614. game:GetService("Debris"):AddItem(prt,3)
  615. if Type==1 or Type==nil then
  616. table.insert(Effects,{prt,"Block1",delay,x3,y3,z3,msh})
  617. elseif Type==2 then
  618. table.insert(Effects,{prt,"Block2",delay,x3,y3,z3,msh})
  619. end
  620. end
  621.  
  622. function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  623. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(.2,.2,.2))
  624. prt.Anchored=true
  625. prt.CFrame=cframe
  626. local msh=mesh("SpecialMesh",prt,"Sphere","nil",vt(0,0,0),vt(x1,y1,z1))
  627. game:GetService("Debris"):AddItem(prt,3)
  628. table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
  629. end
  630.  
  631. function MagicCircle2(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  632. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(.2,.2,.2))
  633. prt.Anchored=true
  634. prt.CFrame=cframe
  635. local msh=mesh("SpecialMesh",prt,"Sphere","nil",vt(0,0,0),vt(x1,y1,z1))
  636. game:GetService("Debris"):AddItem(prt,3)
  637. table.insert(Effects,{prt,"Cylinder2",delay,x3,y3,z3,msh})
  638. end
  639.  
  640. function MagicRing(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  641. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  642. prt.Anchored=true
  643. prt.CFrame=cframe*cf(x2,y2,z2)
  644. local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(x1,y1,z1))
  645. game:GetService("Debris"):AddItem(prt,3)
  646. table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
  647. end
  648.  
  649. function MagicCylinder(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  650. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(.2,.2,.2))
  651. prt.Anchored=true
  652. prt.CFrame=cframe
  653. local msh=mesh("CylinderMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  654. game:GetService("Debris"):AddItem(prt,3)
  655. table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
  656. end
  657.  
  658. function MagicCylinder3(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  659. local prt=part(3,Character,0,0,brickcolor,"Effect",vt(.2,.2,.2))
  660. prt.Anchored=true
  661. prt.CFrame=cframe
  662. local msh=mesh("SpecialMesh",prt,"Head","nil",vt(0,0,0),vt(x1,y1,z1))
  663. game:GetService("Debris"):AddItem(prt,3)
  664. table.insert(Effects,{prt,"Cylinder2",delay,x3,y3,z3,msh})
  665. end
  666.  
  667. function MagicHead(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  668. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(.2,.2,.2))
  669. prt.Anchored=true
  670. prt.CFrame=cframe
  671. local msh=mesh("SpecialMesh",prt,"Head","nil",vt(0,0,0),vt(x1,y1,z1))
  672. game:GetService("Debris"):AddItem(prt,3)
  673. table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
  674. end
  675.  
  676. function ClangEffect(brickcolor,cframe,duration,decrease,size,power)
  677. local prt=part(3,workspace,0,1,brickcolor,"Effect",vt(.2,.2,.2))
  678. prt.Anchored=true
  679. prt.CFrame=cframe
  680. local msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(5,5,5))
  681. game:GetService("Debris"):AddItem(prt,3)
  682. table.insert(Effects,{prt,"CylinderClang",duration,decrease,size,power,prt.CFrame,nil})
  683. end
  684.  
  685. function MagicWave(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  686. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(.2,.2,.2))
  687. prt.Anchored=true
  688. prt.CFrame=cframe
  689. local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=20329976",vt(0,0,0),vt(x1,y1,z1))
  690. game:GetService("Debris"):AddItem(prt,3)
  691. table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
  692. end
  693.  
  694. --[[local BodGy=Instance.new("BodyGyro")
  695. BodGy.maxTorque=Vector3.new(0,4e+005,0)
  696. BodGy.P=2000
  697. BodGy.D=100
  698. BodGy.Name="SiegmundGyro"
  699. CF=RootPart.CFrame
  700. BodGy.Parent=RootPart
  701. BodGy.cframe=CF]]
  702.  
  703. --[[Neck.C0=euler(0,0,0)*cf(0,3,0)*euler(0,.6,0)*euler(-.2,0,0)
  704. RootJoint.C0=cf(0,-2,0)*euler(0,.6,0)
  705. RW.C0=cf(4.5,1.5,0)*euler(-.4,0,.5)*euler(0,0,0)
  706. RW.C1=cf(0,1.5,0)*euler(0,0,0)
  707. LW.C0=cf(-4.5,1.5,0)*euler(.2,0,-.5)
  708. LW.C1=cf(0,1.5,0)*euler(0,0,0)
  709. RH.C0=cf(1.5,-3,0)*euler(0,-.6,0)*euler(0,0,.1)
  710. RH.C1=cf(0,3,0)*euler(0,0,0)
  711. LH.C0=cf(-1.5,-3,0)*euler(0,.6,0)*euler(.1,0,0)
  712. LH.C1=cf(0,3,0)*euler(0,0,0)]]
  713.  
  714. --[[RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(3,0,0.5),.3)
  715. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-1.2),.3)
  716. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0.4,0,0),.3)
  717. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-1)*euler(0,0,0),.3)
  718. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(-1.2,1.57,0),.3)
  719. LH.C0=clerp(LH.C0,cf(-1.1,-.5,-0.5)*euler(-0.2,-1.3,0),.3)]]
  720. function StartAnim()
  721. attack=true
  722. --workspace.CurrentCamera.CameraSubject=Head
  723. Neck.C0=necko*euler(-0.4,0,0)
  724. RootJoint.C0=euler(.2,0,0)
  725. RW.C0=cf(1.5,0.5,0)*euler(-.3,0,0.2)
  726. RW.C1=cf(0,0.5,0)*euler(0,0,0)
  727. LW.C0=cf(-1.5,0.5,0)*euler(-.3,0,-0.2)
  728. LW.C1=cf(0,0.5,0)*euler(0,0,0)
  729. RH.C0=cf(.5,-1,0)*euler(0.4,1.57,0)
  730. LH.C0=cf(-.5,-1,0)*euler(-0.2,-1.57,0)
  731. hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,10,Character)
  732. while hitfloor==nil do
  733. swait()
  734. end
  735. print("endderp")
  736. so("http://roblox.com/asset/?id=157878578",Torso,1,0.8)
  737. so("http://roblox.com/asset/?id=2760979",Torso,1,0.4)
  738. MagicWave(BrickColor.new("Medium stone grey"),cf(Torso.Position)*cf(0,-1,0),1,1,1,1.5,1,1.5,0.05)
  739. --MagniDamage(Torso,15,6,8,math.random(20,40),"Knockdown2",Torso,0,1,math.random(8,10),nil,nil,true)
  740. for i=0,1,0.05 do
  741. swait()
  742. Neck.C0=clerp(Neck.C0,necko*euler(-.4,0,0),.3)
  743. RootJoint.C0=clerp(RootJoint.C0,cf(0,1,0)*euler(0,0,0),.3)
  744. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,1.2),.3)
  745. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-1.2),.3)
  746. RH.C0=clerp(RH.C0,cf(.5,-1,0)*euler(-1.2,1.57,0),.3)
  747. LH.C0=clerp(LH.C0,cf(-.6,-.5,-0.5)*euler(-0.2,-1.3,0),.3)
  748. end
  749. attack=false
  750. end
  751. --[[RW.C0=cf(1.5,0.5,0)*euler(0,0,1.2)
  752. LW.C0=cf(-1.5,0.5,0)*euler(0,0,-1.2)
  753. Neck.C0=necko*euler(-.4,0,0)
  754. RootJoint.C0=cf(0,1,0)*euler(0,0,0)
  755. RH.C0=cf(1,-1,0)*euler(-1.2,1.57,0)
  756. LH.C0=cf(-1.1,-.5,-0.5)*euler(-0.2,-1.3,0)]]
  757.  
  758. local BodGy=Instance.new("BodyGyro")
  759. BodGy.maxTorque=Vector3.new(0,4e+005,0)
  760. BodGy.P=2000
  761. BodGy.D=100
  762. BodGy.Name="SthomasGyro"
  763. CF=RootPart.CFrame
  764. BodGy.Parent=RootPart
  765. BodGy.cframe=CF
  766.  
  767. wait()
  768. print("Sthomas spawned.")
  769.  
  770. function StunAnim()
  771. attack=true
  772. Stunned.Value=true
  773. showDamage(Character,"Stunned","Interrupt")
  774. local dec=Instance.new("NumberValue",Decrease)
  775. dec.Name="DecreaseMvmt"
  776. dec.Value=10
  777. for i=0,1,0.3 do
  778. swait()
  779. Neck.C0=clerp(Neck.C0,necko*euler(-.2,.5,0),.2)
  780. RootJoint.C0=clerp(RootJoint.C0,euler(-.2,3,0),.2)
  781. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.2,0,1.3),.2)
  782. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  783. LW.C0=clerp(LW.C0,cf(-1.2,0.5,-.4)*euler(1,0,.4)*euler(0,-.1,0),.2)
  784. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  785. RH.C0=clerp(RH.C0,cf(.5,-.6,0)*euler(0,1.57,0)*euler(-.5,0,.3),.25)
  786. LH.C0=clerp(LH.C0,cf(-.5,-.8,0)*euler(0,-1.57,0)*euler(-.2,0,0),.25)
  787. end
  788. for i=0,1,0.3 do
  789. swait()
  790. Neck.C0=clerp(Neck.C0,necko*euler(-.3,.5,0),.2)
  791. RootJoint.C0=clerp(RootJoint.C0,cf(0,0,-.5)*euler(-.8,3,0),.2)
  792. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.8,0,1.3),.2)
  793. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  794. LW.C0=clerp(LW.C0,cf(-1.2,0.5,-.4)*euler(1.2,0,.8)*euler(0,-.1,0),.2)
  795. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  796. RH.C0=clerp(RH.C0,cf(.5,-.6,0)*euler(0,1.57,0)*euler(-.5,0,.6),.25)
  797. LH.C0=clerp(LH.C0,cf(-.5,-.8,0)*euler(0,-1.57,0)*euler(.1,0,.7),.25)
  798. end
  799. for i=0,1,0.3 do
  800. swait()
  801. Neck.C0=clerp(Neck.C0,necko*euler(-.3,-1,0),.2)
  802. RootJoint.C0=clerp(RootJoint.C0,cf(0,0,-2)*euler(-1.57,3,0),.2)
  803. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.8,0,1.3),.2)
  804. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  805. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.2,0,-.8)*euler(0,-.1,0),.2)
  806. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  807. RH.C0=clerp(RH.C0,cf(.5,-.6,0)*euler(0,1.57,0)*euler(-.2,0,.6),.25)
  808. LH.C0=clerp(LH.C0,cf(-.5,-.8,0)*euler(0,-1.57,0)*euler(-.1,0,.3),.25)
  809. end
  810. local gairost=Instance.new("BodyGyro")
  811. gairost.Parent=RootPart
  812. gairost.maxTorque=Vector3.new(4e+005,0,4e+005)*math.huge
  813. gairost.P=20e+003
  814. gairost.cframe=cf(0,0,0)
  815. for i=0,1,0.1 do
  816. swait()
  817. Neck.C0=clerp(Neck.C0,necko*euler(0,-1.57,0),.3)
  818. RootJoint.C0=clerp(RootJoint.C0,cf(0,0,-2.5)*euler(-1.57,3.14,0),.3)
  819. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-1.57,0,1.5)*euler(.2,0,0),.3)
  820. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  821. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.5,0,-1.57)*euler(0,0,0),.3)
  822. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  823. RH.C0=clerp(RH.C0,cf(.5,-1,0)*euler(0,1.57,0)*euler(-.3,.5,0),.3)
  824. LH.C0=clerp(LH.C0,cf(-.5,-1,0)*euler(0,-1.57,0)*euler(-.1,.2,0),.3)
  825. end
  826. for i=1,200 do
  827. swait()
  828. gairost.cframe=RootPart.CFrame
  829. end
  830. for i=0,1,0.2 do
  831. swait()
  832. Stun.Value=0
  833. gairost.cframe=RootPart.CFrame
  834. Neck.C0=clerp(Neck.C0,necko*euler(0,.2,0),.3)
  835. RootJoint.C0=clerp(RootJoint.C0,cf(0,0,-2)*euler(-1,4,0),.3)
  836. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-1.57,0,1)*euler(.2,-1,0),.3)
  837. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  838. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.2,0,.2)*euler(0,0,0),.3)
  839. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  840. RH.C0=clerp(RH.C0,cf(.5,-1,0)*euler(0,1.57,0)*euler(-.3,.5,.4),.3)
  841. LH.C0=clerp(LH.C0,cf(-.5,-1,-1)*euler(0,-1.57,0)*euler(-.1,.2,1),.3)
  842. end
  843. gairost.Parent=nil
  844. dec.Parent=nil
  845. Stun.Value=0
  846. Stunned.Value=false
  847. attack=false
  848. for i=1,10 do
  849. swait()
  850. Stun.Value=0
  851. end
  852. end
  853.  
  854. function PunchSlam()
  855. attack=true
  856. for i=0,1,0.1 do
  857. swait()
  858. Neck.C0=clerp(Neck.C0,necko*euler(0,-.5,0)*euler(-.2,0,0),.3)
  859. RootJoint.C0=clerp(RootJoint.C0,euler(0,-.5,0)*euler(.1,0,0)*cf(0,.2,0),.3)
  860. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(.2,0,.8)*euler(0,0,0),.3)
  861. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  862. LW.C0=clerp(LW.C0,cf(-1.3,0.5,-.2)*euler(1.4,0,.5)*euler(0,0,0),.3)
  863. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  864. RH.C0=clerp(RH.C0,cf(.6,-.9,-.2)*euler(0,1.57,0)*euler(0,-.5,-.05),.3)
  865. LH.C0=clerp(LH.C0,cf(-.6,-.8,-.2)*euler(0,-1.57,0)*euler(0,0,.4),.3)
  866. end
  867. Torso.Velocity=RootPart.CFrame.lookVector*move*3
  868. so("169445092",LeftArm,1,1.2)
  869. for i=0,1,0.1 do
  870. swait()
  871. MagniDamage(LeftArm,2,8,10,0,"Knockdown2",RootPart,.2,2,math.random(6,7),nil,nil)
  872. --MagniDamage(LeftArm,2,6,8,0,"Normal",RootPart,.3,1,math.random(6,7),nil,nil)
  873. Neck.C0=clerp(Neck.C0,necko*euler(0,.5,0)*euler(-.1,0,0),.3)
  874. RootJoint.C0=clerp(RootJoint.C0,euler(0,.5,0)*euler(.2,0,0)*cf(0,.2,1),.3)
  875. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.5,0,1)*euler(0,0,0),.3)
  876. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  877. --LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.7,0,.2)*euler(0,0,0),.3)
  878. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  879. RH.C0=clerp(RH.C0,cf(.6,-.9,-.2)*euler(0,1.57,0)*euler(0,.4,-.3),.3)
  880. LH.C0=clerp(LH.C0,cf(-.6,-.9,-.2)*euler(0,-1.57,0)*euler(0,.5,0),.3)
  881. if i<.3 then
  882. LW.C0=clerp(LW.C0,cf(-1.3,0.5,-.2)*euler(1.7,0,-.2)*euler(0,0,0),.3)
  883. else
  884. LW.C0=clerp(LW.C0,cf(-1.2,0.5,-.2)*euler(1.7,0,.1)*euler(0,0,0),.3)
  885. end
  886. end
  887. if RecentEnemy.Value~=nil then
  888. Torso.Velocity=vt(0,0,0)
  889. target,distance=findNearestTorso(Torso.Position)
  890. if target~=nil then
  891. BodGy.cframe=cf(Torso.Position,target.Position)
  892. end
  893. Torso.Velocity=RootPart.CFrame.lookVector*move*3
  894. refd=part(3,workspace,0,1,BrickColor.new("Black"),"Reference",vt())
  895. refd.Anchored=true
  896. game:GetService("Debris"):AddItem(refd,5)
  897. so("169445092",RightArm,1,1.2)
  898. for i=0,1,0.1 do
  899. swait()
  900. refd.CFrame=cf(posfloor)
  901. MagniDamage(LeftArm,4,10,12,math.random(30,35),"Knockdown2",refd,.3,1,math.random(3,4),nil,nil)
  902. Neck.C0=clerp(Neck.C0,necko*euler(0,-1.57,0),.3)
  903. RootJoint.C0=clerp(RootJoint.C0,cf(0,0,.2)*euler(0,-1.57,0),.3)
  904. if i<.6 then
  905. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,1.57)*euler(0,3.14,0),.5)
  906. else
  907. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,1.57)*euler(0,3.14,-1.2)*euler(-.5,0,0),.2)
  908. end
  909. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  910. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-1.57)*euler(0,0,1),.3)
  911. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  912. RH.C0=clerp(RH.C0,cf(.5,-1,.2)*euler(0,1.57,0)*euler(.2,-1.57,0),.2)
  913. LH.C0=clerp(LH.C0,cf(-.5,-1,-.2)*euler(0,-1.57,0)*euler(-.4,-1.57,0),.2)
  914. end
  915. refd.Parent=nil
  916. --swait(100)
  917. end
  918. attack=false
  919. end
  920.  
  921. function SweepCut()
  922. attack=true
  923. for i=0,1,0.1 do
  924. swait()
  925. Neck.C0=clerp(Neck.C0,necko*euler(0,1.3,0)*euler(-.5,0,0),.3)
  926. RootJoint.C0=clerp(RootJoint.C0,euler(0,1.3,0)*euler(-.5,0,0)*cf(0,.4,0),.3)
  927. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,.5)*euler(0,0,0),.3)
  928. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  929. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-1)*euler(0,0,0),.3)
  930. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  931. RH.C0=clerp(RH.C0,cf(.6,-.7,-.4)*euler(0,1.57,0)*euler(-.5,0,0),.3)
  932. LH.C0=clerp(LH.C0,cf(-.3,-.4,-.7)*euler(0,-1.57,0)*euler(0,0,-.1)*euler(-.7,0,0),.3)
  933. end
  934. Torso.Velocity=RootPart.CFrame.lookVector*move*5
  935. so("169445073",LeftLeg,1,1.2)
  936. for i=0,1,0.1 do
  937. swait()
  938. MagniDamage(LeftLeg,2,7,9,0,"Knockdown2",RootPart,.2,2,math.random(6,7),nil,nil)
  939. Neck.C0=clerp(Neck.C0,necko*euler(0,1,0)*euler(-.5,0,0),.3)
  940. RootJoint.C0=clerp(RootJoint.C0,euler(0,1.3,0)*euler(-1,0,0)*cf(0,1.2,0),.3)
  941. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(.8,0,.3)*euler(0,0,0),.3)
  942. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  943. LW.C0=clerp(LW.C0,cf(-1,0.5,-.5)*euler(1.5,0,1)*euler(0,0,0),.3)
  944. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  945. RH.C0=clerp(RH.C0,cf(.6,-.7,-.8)*euler(0,1.57,0)*euler(-.3,0,-1.2),.3)
  946. LH.C0=clerp(LH.C0,cf(-.5,-.8,-.2)*euler(0,-1.57,0)*euler(0,0,-.1)*euler(-.5,0,0),.3)
  947. end
  948. Torso.Velocity=vt(0,0,0)
  949. if RecentEnemy.Value~=nil then
  950. target,distance=findNearestTorso(Torso.Position)
  951. if target~=nil then
  952. BodGy.cframe=cf(Torso.Position,target.Position)
  953. end
  954. Torso.Velocity=RootPart.CFrame.lookVector*move*3
  955. refd=part(3,workspace,0,1,BrickColor.new("Black"),"Reference",vt())
  956. refd.Anchored=true
  957. game:GetService("Debris"):AddItem(refd,5)
  958. so("169445092",RightArm,1,1)
  959. for i=0,1,0.2 do
  960. swait()
  961. refd.CFrame=cf(posfloor)
  962. MagniDamage(RightArm,4,10,12,math.random(40,45),"Knockdown2",refd,.3,1,math.random(3,4),nil,nil)
  963. --MagniDamage(LeftArm,4,6,8,math.random(30,35),"Knockdown2",refd,.5,1,math.random(3,4),nil,nil)
  964. --[[Neck.C0=clerp(Neck.C0,necko*euler(0,-1.57,0),.3)
  965. RootJoint.C0=clerp(RootJoint.C0,cf(0,0,.2)*euler(0,-1.57,0),.3)
  966. if i<.6 then
  967. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,1.57)*euler(0,3.14,0),.5)
  968. else
  969. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,1.57)*euler(0,3.14,-1.2)*euler(-.5,0,0),.2)
  970. end
  971. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  972. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-1.57)*euler(0,0,1),.3)
  973. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  974. RH.C0=clerp(RH.C0,cf(.5,-1,.2)*euler(0,1.57,0)*euler(.2,-1.57,0),.2)
  975. LH.C0=clerp(LH.C0,cf(-.5,-1,-.2)*euler(0,-1.57,0)*euler(-.4,-1.57,0),.2)]]
  976. Neck.C0=clerp(Neck.C0,necko*euler(0,.1,0)*euler(0,0,0),.4)
  977. RootJoint.C0=clerp(RootJoint.C0,euler(0,-.5,0)*euler(0,0,0)*cf(0,.6,0),.4)
  978. RW.C0=clerp(RW.C0,cf(1,0.5,-.5)*euler(1.8,0,-.8)*euler(0,0,0),.4)
  979. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  980. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.5,0,-.7)*euler(0,0,0),.4)
  981. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  982. RH.C0=clerp(RH.C0,cf(.5,-.5,0)*euler(0,1.57,0)*euler(-.2,0,0),.4)
  983. LH.C0=clerp(LH.C0,cf(-.5,-.5,0)*euler(0,-1.57,0)*euler(-.2,0,0),.4)
  984. end
  985. for i=0,1,0.1 do
  986. swait()
  987. MagniDamage(RightArm,4,10,12,math.random(40,45),"Knockdown2",refd,.3,1,math.random(3,4),nil,nil)
  988. Torso.Velocity=vt(0,60,0)
  989. Neck.C0=clerp(Neck.C0,necko*euler(0,.1,0)*euler(0,0,0),.3)
  990. RootJoint.C0=clerp(RootJoint.C0,euler(0,0,0)*euler(0,0,0)*cf(0,0,0),.3)
  991. RootJoint.C1=RootJoint.C1*euler(0,.5,0)
  992. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(2.5,0,-.2)*euler(0,0,0),.3)
  993. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  994. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.5,0,-1)*euler(0,0,0),.3)
  995. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  996. RH.C0=clerp(RH.C0,cf(.5,-.5,0)*euler(0,1.57,0)*euler(-.2,0,-.2),.3)
  997. LH.C0=clerp(LH.C0,cf(-.5,-.5,0)*euler(0,-1.57,0)*euler(-.2,0,.2),.3)
  998. end
  999. refd.Parent=nil
  1000. RootJoint.C1=cf(0,0,0)
  1001. end
  1002. --swait(100)
  1003. attack=false
  1004. end
  1005.  
  1006. function MultiKick()
  1007. attack=true
  1008. for i=0,1,0.1 do
  1009. swait()
  1010. Neck.C0=clerp(Neck.C0,necko*euler(.1,.7,0)*euler(0,0,0),.3)
  1011. RootJoint.C0=clerp(RootJoint.C0,euler(.1,.8,0)*euler(0,0,0)*cf(0,.6,0),.3)
  1012. RW.C0=clerp(RW.C0,cf(1.3,0.4,.3)*euler(.4,0,.4)*euler(0,-.5,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(-1.3,0.5,-.2)*euler(1,0,.2)*euler(0,1,0),.3)
  1015. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1016. RH.C0=clerp(RH.C0,cf(.7,-.7,-.5)*euler(0,1.57,0)*euler(0,-.3,-.6)*euler(.05,0,0),.3)
  1017. LH.C0=clerp(LH.C0,cf(-.6,-.6,-.8)*euler(0,-1.57,0)*euler(0,.2,-.4)*euler(.2,0,0),.3)
  1018. end
  1019. Look=RootPart.CFrame.lookVector*move*2
  1020. local n=8
  1021. for i=0,1,0.04 do
  1022. swait()
  1023. n=n+1
  1024. if n>=8 then
  1025. n=0
  1026. so("169445073",LeftLeg,1,1.2)
  1027. end
  1028. Torso.Velocity=Look
  1029. MagniDamage(LeftLeg,2,5,7,math.random(5,10),"Knockdown2",RootPart,.2,2,math.random(4,5),nil,nil)
  1030. Neck.C0=clerp(Neck.C0,necko*euler(-.1,0,0)*euler(0,0,0),.3)
  1031. RootJoint.C0=clerp(RootJoint.C0,euler(0,0,0)*euler(0,0,0)*cf(0,0,0),.3)
  1032. RootJoint.C1=RootJoint.C1*euler(0,.6,0)
  1033. RW.C0=clerp(RW.C0,cf(1,0.4,.5)*euler(1.2,0,.4)*euler(0,0,0),.3)
  1034. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1035. LW.C0=clerp(LW.C0,cf(-1,0.4,.5)*euler(1.2,0,-.4)*euler(0,0,0),.3)
  1036. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1037. RH.C0=clerp(RH.C0,cf(.7,-.5,-.7)*euler(0,1.57,0)*euler(0,-.3,-1)*euler(0,0,0),.3)
  1038. LH.C0=clerp(LH.C0,cf(-.6,-.6,-.5)*euler(0,-1.57,0)*euler(0,.2,-1.5)*euler(.2,0,0),.3)
  1039. end
  1040. if RecentEnemy.Value~=nil then
  1041. RecentEnemy.Value=nil
  1042. target,distance=findNearestTorso(Torso.Position)
  1043. if target~=nil then
  1044. RootPart.CFrame=cf(RootPart.Position,target.Position)
  1045. end
  1046. Look=RootPart.CFrame.lookVector*move
  1047. for i=0,1,0.04 do
  1048. swait()
  1049. n=n+1
  1050. if n>=8 then
  1051. n=0
  1052. so("169445073",LeftLeg,1,1.2)
  1053. end
  1054. Torso.Velocity=Look
  1055. MagniDamage(LeftLeg,2,5,7,math.random(5,10),"Knockdown2",RootPart,.2,2,math.random(4,5),nil,nil)
  1056. Neck.C0=clerp(Neck.C0,necko*euler(-.1,0,0)*euler(0,0,0),.3)
  1057. RootJoint.C0=clerp(RootJoint.C0,euler(0,0,0)*euler(0,0,0)*cf(0,0,0),.3)
  1058. RootJoint.C1=RootJoint.C1*euler(0,.6,0)
  1059. RW.C0=clerp(RW.C0,cf(1,0.4,.5)*euler(1.2,0,.4)*euler(0,0,0),.3)
  1060. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1061. LW.C0=clerp(LW.C0,cf(-1,0.4,.5)*euler(1.2,0,-.4)*euler(0,0,0),.3)
  1062. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1063. RH.C0=clerp(RH.C0,cf(.7,-.5,-.7)*euler(0,1.57,0)*euler(0,-.3,-1)*euler(0,0,0),.3)
  1064. LH.C0=clerp(LH.C0,cf(-.6,-.6,-.5)*euler(0,-1.57,0)*euler(0,.2,-1.5)*euler(.2,0,0),.3)
  1065. end
  1066. Torso.Velocity=vt(0,0,0)
  1067. end
  1068. RootJoint.C1=cf(0,0,0)
  1069. attack=false
  1070. end
  1071.  
  1072. function JumpKick()
  1073. attack=true
  1074. for i=0,1,0.1 do
  1075. swait()
  1076. Neck.C0=clerp(Neck.C0,necko*euler(-.4,0,0),.3)
  1077. RootJoint.C0=clerp(RootJoint.C0,cf(0,1,0)*euler(0,0,0),.3)
  1078. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,1.2),.3)
  1079. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-1.2),.3)
  1080. RH.C0=clerp(RH.C0,cf(.5,-1,0)*euler(-1.2,1.57,0),.3)
  1081. LH.C0=clerp(LH.C0,cf(-.6,-.5,-0.5)*euler(-0.2,-1.3,0),.3)
  1082. end
  1083. Torso.Velocity=vt(0,100,0)
  1084. jump=true
  1085. local dec=Instance.new("NumberValue",Decrease)
  1086. dec.Name="DecreaseMvmt"
  1087. dec.Value=-.4
  1088. for i=0,1,0.05 do
  1089. swait()
  1090. Neck.C0=clerp(Neck.C0,necko*euler(-.1,0,0)*euler(0,0,0),.2)
  1091. RootJoint.C0=clerp(RootJoint.C0,euler(0,0,0)*euler(0,0,0)*cf(0,4,-3),.2)
  1092. RootJoint.C1=RootJoint.C1*euler(-.32,0,0)
  1093. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.2,0,1)*euler(0,0,0),.2)
  1094. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  1095. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.2,0,-1)*euler(0,0,0),.2)
  1096. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  1097. RH.C0=clerp(RH.C0,cf(.7,-.5,-.7)*euler(0,1.57,0)*euler(0,-.3,-1)*euler(0,0,0),.2)
  1098. LH.C0=clerp(LH.C0,cf(-.6,-.6,-.5)*euler(0,-1.57,0)*euler(0,.2,-1.8)*euler(.2,0,0),.2)
  1099. end
  1100. while hitfloor==nil do
  1101. swait()
  1102. MagniDamage(LeftLeg,5,8,10,math.random(15,25),"Knockdown2",RootPart,.2,2,math.random(8,10),nil,nil)
  1103. MagniDamage(RightLeg,5,8,10,math.random(15,25),"Knockdown2",RootPart,.2,2,math.random(8,10),nil,nil)
  1104. end
  1105. jump=false
  1106. dec.Parent=nil
  1107. RootJoint.C1=cf(0,0,0)
  1108. attack=false
  1109. end
  1110.  
  1111. function EnergyBlam()
  1112. attack=true
  1113. for i=0,1,0.1 do
  1114. swait()
  1115. Neck.C0=clerp(Neck.C0,necko*euler(0,-1,0)*euler(-.2,0,0),.3)
  1116. RootJoint.C0=clerp(RootJoint.C0,euler(0,-1,0)*cf(0,.4,0),.3)
  1117. RW.C0=clerp(RW.C0,cf(1.3,0.5,-.2)*euler(1.4,0,-.5)*euler(0,0,0),.3)
  1118. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1119. LW.C0=clerp(LW.C0,cf(-1.3,0.5,-.2)*euler(1.4,0,.5)*euler(0,0,0),.3)
  1120. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1121. RH.C0=clerp(RH.C0,cf(.7,-.8,-.4)*euler(0,1.57,0)*euler(0,.5,-.1),.3)
  1122. LH.C0=clerp(LH.C0,cf(-.4,-.9,0)*euler(0,-1.57,0)*euler(0,-1,.2),.3)
  1123. end
  1124. so("2101137",Torso,1,1)
  1125. for i=0,1,0.05 do
  1126. swait()
  1127. MagicCircle(BrickColor.new("Bright blue"),Torso.CFrame*cf(0,0,-2),1,1,1,1,1,1,.1)
  1128. MagicCircle(BrickColor.new("White"),Torso.CFrame*cf(0,0,-2),1,1,1,.5,.5,.5,.1)
  1129. end
  1130. for i=0,1,0.1 do
  1131. swait()
  1132. MagicCircle(BrickColor.new("Bright blue"),Torso.CFrame*cf(0,.5,-2),1,1,1,1,1,1,.1)
  1133. MagicCircle(BrickColor.new("White"),Torso.CFrame*cf(0,.5,-2),1,1,1,.5,.5,.5,.1)
  1134. Neck.C0=clerp(Neck.C0,necko*euler(0,0,0)*euler(0,0,0),.3)
  1135. RootJoint.C0=clerp(RootJoint.C0,euler(0,0,0)*cf(0,.4,0),.3)
  1136. RW.C0=clerp(RW.C0,cf(1,0.5,-.5)*euler(1.5,0,-.5)*euler(0,0,0),.3)
  1137. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1138. LW.C0=clerp(LW.C0,cf(-1,0.5,-.5)*euler(1.5,0,.5)*euler(0,0,0),.3)
  1139. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1140. RH.C0=clerp(RH.C0,cf(.7,-.8,-.4)*euler(0,1.57,0)*euler(0,0,-.1),.3)
  1141. LH.C0=clerp(LH.C0,cf(-.4,-.9,0)*euler(0,-1.57,0)*euler(0,0,.2),.3)
  1142. end
  1143. ref=part(3,workspace,0,1,BrickColor.new("Black"),"Reference",vt())
  1144. ref.Anchored=false
  1145. --ref.CFrame=cf(head.Position)
  1146. local rwld=weld(Torso,Torso,ref,cf(0,.5,-2.5))
  1147. game:GetService("Debris"):AddItem(ref,10)
  1148. ref2=part(3,workspace,0,1,BrickColor.new("Black"),"Reference",vt())
  1149. ref2.Anchored=false
  1150. --ref.CFrame=cf(head.Position)
  1151. game:GetService("Debris"):AddItem(ref2,10)
  1152. local tehCF=nil
  1153. --[[target,distance=findNearestTorso(Torso.Position)
  1154. if target~=nil then]]
  1155. tehCF=cf(ref.Position,Mouse.Hit.p)
  1156. --end
  1157. nuh=5
  1158. for i=0,1,0.05 do
  1159. swait()
  1160. nuh=nuh+1
  1161. if nuh>=5 then
  1162. nuh=0
  1163. so("169380505",ref2,1,1.5)
  1164. end
  1165. --[[target,distance=findNearestTorso(Torso.Position)
  1166. if target~=nil then]]
  1167. hit,pos=rayCast(ref.Position,tehCF.lookVector,100,Character)
  1168. local mag=(ref.Position-pos).magnitude
  1169. MagicCylinder3(BrickColor.new("White"),CFrame.new((ref.Position+pos)/2,pos)*angles(1.57,0,0),6,mag*5,6,2,1,2,0.1)
  1170. MagicCircle2(BrickColor.new("White"),cf(pos),10,10,10,10,10,10,.1)
  1171. ref2.CFrame=cf(pos)
  1172. MagniDamage(ref2,10,12,16,0,"Normal",ref2,.2,1,math.random(2,4),nil,nil,true)
  1173. --end
  1174. end
  1175. ref.Parent=nil
  1176. ref2.Parent=nil
  1177. attack=false
  1178. end
  1179.  
  1180. function DecreaseStat(Model,Stat,Amount,Duration)
  1181. if Model:findFirstChild("Stats")~=nil then
  1182. if Model.Stats[Stat]~=nil then
  1183. Model.Stats[Stat].Value=Model.Stats[Stat].Value-Amount
  1184. d=Instance.new("NumberValue",Model.Stats.Decrease)
  1185. game:GetService("Debris"):AddItem(d,40)
  1186. if Stat=="Damage" then
  1187. d.Name="DecreaseAtk"
  1188. elseif Stat=="Defense" then
  1189. d.Name="DecreaseDef"
  1190. elseif Stat=="Movement" then
  1191. d.Name="DecreaseMvmt"
  1192. end
  1193. if Model:findFirstChild("Torso")~=nil then
  1194. display=""
  1195. if Stat=="Damage" then
  1196. if Amount>0 then
  1197. display="-Damage"
  1198. else
  1199. display="+Damage"
  1200. end
  1201. elseif Stat=="Defense" then
  1202. if Amount>0 then
  1203. display="-Defense"
  1204. else
  1205. display="+Defense"
  1206. end
  1207. elseif Stat=="Movement" then
  1208. if Amount>0 then
  1209. display="-Movement"
  1210. else
  1211. display="+Movement"
  1212. end
  1213. end
  1214. showDamage(Model,display,"Debuff")
  1215. end
  1216. d.Value=Amount
  1217. table.insert(Effects,{Model,"DecreaseStat",Stat,Amount,Duration,d})
  1218. end
  1219. end
  1220. end
  1221.  
  1222. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  1223. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  1224. end
  1225.  
  1226. --[[function findNearestTorso(pos)
  1227. local list = game.Workspace:children()
  1228. local torso = nil
  1229. local dist = 1000
  1230. local temp = nil
  1231. local human = nil
  1232. local temp2 = nil
  1233. for x = 1, #list do
  1234. temp2 = list[x]
  1235. if (temp2.className == "Model") and (temp2.Name~=bName) then
  1236. temp = temp2:findFirstChild("Torso")
  1237. human = temp2:findFirstChild("Humanoid")
  1238. if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  1239. if btarget.Value==nil then
  1240. if (temp.Position - pos).magnitude < dist then
  1241. local dohit=true
  1242. if temp2:findFirstChild("Stats")~=nil then if temp2.Stats:findFirstChild("Boss")~=nil then if temp2.Stats.Boss.Value==true then dohit=false end end end
  1243. if temp2:findFirstChild("Alive")==nil then dohit=false end
  1244. if dohit==true then
  1245. torso = temp
  1246. dist = (temp.Position - pos).magnitude
  1247. end
  1248. end
  1249. else
  1250. if btarget.Value.Parent~=nil then
  1251. if btarget.Value:findFirstChild("Torso")~=nil then
  1252. if btarget.Value:findFirstChild("Humanoid")~=nil then
  1253. if btarget.Value.Humanoid.Health<=0 then
  1254. btarget.Value=nil
  1255. end
  1256. end
  1257. if btarget.Value~=nil then
  1258. torso=btarget.Value.Torso
  1259. dist = (torso.Position - pos).magnitude
  1260. end
  1261. end
  1262. else
  1263. btarget.Value=nil
  1264. end
  1265. end
  1266. end
  1267. end
  1268. end
  1269. return torso,dist
  1270. end]]
  1271. findNearestTorso = function(pos)
  1272. local list = (game.Workspace:children())
  1273. local torso = nil
  1274. local dist = 1000
  1275. local temp, human, temp2 = nil, nil, nil
  1276. for x = 1, #list do
  1277. temp2 = list[x]
  1278. if temp2.className == "Model" and temp2.Name ~= Character.Name then
  1279. temp = temp2:findFirstChild("Torso")
  1280. human = temp2:findFirstChild("Humanoid")
  1281. if temp ~= nil and human ~= nil and human.Health > 0 and (temp.Position - pos).magnitude < dist then
  1282. local dohit = true
  1283. if dohit == true then
  1284. torso = temp
  1285. dist = (temp.Position - pos).magnitude
  1286. end
  1287. end
  1288. end
  1289. end
  1290. return torso, dist
  1291. end
  1292. function findRandomTorso(pos)
  1293. local list = game.Workspace:children()
  1294. local torso = nil
  1295. local dist = 1000
  1296. local temp = nil
  1297. local human = nil
  1298. local temp2 = nil
  1299. local list2 = {}
  1300. for x = 1, #list do
  1301. temp2 = list[x]
  1302. if (temp2.className == "Model") and (temp2.Name~="Vanta") then
  1303. temp = temp2:findFirstChild("Torso")
  1304. human = temp2:findFirstChild("Humanoid")
  1305. if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  1306. if pos.magnitude < dist then
  1307. torso = temp
  1308. table.insert(list2,temp)
  1309. end
  1310. end
  1311. end
  1312. end
  1313. if #list2>0 then
  1314. rand=math.random(1,#list2)
  1315. return list2[rand],dist
  1316. else
  1317. return nil,dist
  1318. end
  1319. end
  1320.  
  1321. Damagefunc=function(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,incstun,stagger,staghit,ranged,DecreaseState,DecreaseAmount,Duration,Sound)
  1322. if hit.Parent==nil then
  1323. return
  1324. end
  1325. h=hit.Parent:FindFirstChild("Humanoid")
  1326. for _,v in pairs(hit.Parent:children()) do
  1327. if v:IsA("Humanoid") then
  1328. h=v
  1329. end
  1330. end
  1331. if hit.Parent.Parent:FindFirstChild("Torso")~=nil then
  1332. h=hit.Parent.Parent:FindFirstChild("Humanoid")
  1333. end
  1334. if hit.Parent.className=="Hat" then
  1335. hit=hit.Parent.Parent:findFirstChild("Head")
  1336. end
  1337. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  1338. if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end
  1339. if hit.Parent:findFirstChild("Stats")~=nil then if hit.Parent.Stats:findFirstChild("Boss")~=nil then if hit.Parent.Stats.Boss.Value==true then return end end end
  1340. RecentEnemy.Value=hit.Parent
  1341. game:GetService("Debris"):AddItem(c,.5)
  1342. minim=minim*Atk.Value
  1343. maxim=maxim*Atk.Value
  1344. Damage=0
  1345. if minim==maxim or minim>maxim then
  1346. Damage=maxim
  1347. else
  1348. Damage=math.random(minim,maxim)
  1349. end
  1350. blocked=false
  1351. enblock=nil
  1352. Stats=hit.Parent:findFirstChild("Stats")
  1353. if Stats~=nil then
  1354. enblock=Stats:findFirstChild("Block")
  1355. if enblock~=nil then
  1356. if enblock.Value==true then
  1357. blocked=true
  1358. end
  1359. end
  1360. if Stats:findFirstChild("Defense")~=nil then
  1361. Damage=Damage/(Stats.Defense.Value)
  1362. if Damage<=3 and (ranged==false or ranged==nil) and blocked~=true then
  1363. hitnum=math.random(1,3)
  1364. if hitnum==1 then so("169380525",hit,1,math.random(80,120)/100)
  1365. elseif hitnum==2 then so("169380538",hit,1,math.random(80,120)/100)
  1366. elseif hitnum==3 then so("169380528",hit,1,math.random(80,120)/100)
  1367. end
  1368. --[[if hitnum==1 then so("199149321",hit,1,1)
  1369. elseif hitnum==2 then so("199149338",hit,1,1)
  1370. elseif hitnum==3 then so("199149367",hit,1,1)
  1371. elseif hitnum==4 then so("199149409",hit,1,1)
  1372. elseif hitnum==5 then so("199149452",hit,1,1)
  1373. end]]
  1374. elseif ranged==false or ranged==nil and blocked~=true then
  1375. hitnum=math.random(1,3)
  1376. if hitnum==1 then so("169380525",hit,1,math.random(80,120)/100)
  1377. elseif hitnum==2 then so("169380538",hit,1,math.random(80,120)/100)
  1378. elseif hitnum==3 then so("169380528",hit,1,math.random(80,120)/100)
  1379. end
  1380. --[[if hitnum==1 then so("199149137",hit,1,1)
  1381. elseif hitnum==2 then so("199149186",hit,1,1)
  1382. elseif hitnum==3 then so("199149221",hit,1,1)
  1383. elseif hitnum==4 then so("199149235",hit,1,1)
  1384. elseif hitnum==5 then so("199149269",hit,1,1)
  1385. elseif hitnum==6 then so("199149297",hit,1,1)
  1386. end]]
  1387. end
  1388. end
  1389. if Stats:findFirstChild("Stun")~=nil then
  1390. if blocked==true then
  1391. incstun=math.floor(incstun/2)
  1392. end
  1393. Stats.Stun.Value=Stats.Stun.Value+incstun
  1394. end
  1395. if Stats:findFirstChild("Stagger")~=nil then
  1396. if stagger==true then
  1397. Stats.Stagger.Value=true
  1398. end
  1399. end
  1400. end
  1401. if blocked==true then
  1402. showDamage(hit.Parent,"Block","Damage")
  1403. hitnum=math.random(1,2)
  1404. if hitnum==1 then so("199148933",hit,1,1)
  1405. elseif hitnum==2 then so("199148947",hit,1,1)
  1406. end
  1407. enblock.Value=false
  1408. else
  1409. Damage=math.floor(Damage)
  1410. h.Health=h.Health-Damage
  1411. --[[coroutine.resume(coroutine.create(function(Hum,Dam)
  1412. damageFunc:InvokeServer(Hum,Dam)
  1413. end),h,Damage)]]
  1414. showDamage(hit.Parent,Damage,"Damage")
  1415. if DecreaseState~=nil then
  1416. if DecreaseState=="Shatter" then
  1417. DecreaseStat(hit.Parent,"Movement",DecreaseAmount,Duration)
  1418. DecreaseStat(hit.Parent,"Damage",DecreaseAmount,Duration)
  1419. else
  1420. DecreaseStat(hit.Parent,DecreaseState,DecreaseAmount,Duration)
  1421. end
  1422. end
  1423. if Type=="Knockdown" then
  1424. hum=hit.Parent.Humanoid
  1425. hum.PlatformStand=true
  1426. coroutine.resume(coroutine.create(function(HHumanoid)
  1427. swait(1)
  1428. HHumanoid.PlatformStand=false
  1429. end),hum)
  1430. local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
  1431. --hit.CFrame=cf(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
  1432. local bodvol=Instance.new("BodyVelocity")
  1433. bodvol.velocity=angle*knockback
  1434. bodvol.P=5000
  1435. bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  1436. bodvol.Parent=hit
  1437. rl=Instance.new("BodyAngularVelocity")
  1438. rl.P=3000
  1439. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  1440. rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  1441. rl.Parent=hit
  1442. game:GetService("Debris"):AddItem(bodvol,.5)
  1443. game:GetService("Debris"):AddItem(rl,.5)
  1444. elseif Type=="Shatter" then
  1445. for i=1,10 do
  1446. BreakEffect(BrickColor.new("Cyan"),hit.CFrame,math.random(20,80)/100,math.random(2,10),math.random(20,80)/100)
  1447. end
  1448. elseif Type=="Knockdown2" then
  1449. hum=hit.Parent.Humanoid
  1450. local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
  1451. local bodvol=Instance.new("BodyVelocity")
  1452. bodvol.velocity=angle*knockback
  1453. bodvol.P=5000
  1454. bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  1455. bodvol.Parent=hit
  1456. game:GetService("Debris"):AddItem(bodvol,.5)
  1457. elseif Type=="Normal" then
  1458. vp=Instance.new("BodyVelocity")
  1459. vp.P=500
  1460. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  1461. if KnockbackType==1 then
  1462. vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05
  1463. elseif KnockbackType==2 then
  1464. vp.velocity=Property.CFrame.lookVector*knockback
  1465. end
  1466. game:GetService("Debris"):AddItem(vp,.5)
  1467. if knockback>0 then
  1468. vp.Parent=hit.Parent.Torso
  1469. end
  1470. end
  1471. end
  1472. debounce=Instance.new("BoolValue")
  1473. debounce.Name="DebounceHit"
  1474. debounce.Parent=hit.Parent
  1475. debounce.Value=true
  1476. game:GetService("Debris"):AddItem(debounce,Delay)
  1477. CRIT=false
  1478. end
  1479. end
  1480.  
  1481. showDamage=function(Char,Dealt,Type)
  1482. m=Instance.new("Model")
  1483. m.Name="Effect"
  1484. c=Instance.new("Part")
  1485. c.Transparency=1
  1486. c.Name="Head"
  1487. c.TopSurface=0
  1488. c.BottomSurface=0
  1489. c.formFactor="Plate"
  1490. c.Size=Vector3.new(1,.4,1)
  1491. b=Instance.new("BillboardGui",c)
  1492. b.Size=UDim2.new(5,0,5,0)
  1493. b.AlwaysOnTop=true
  1494. damgui=gui("TextLabel",b,tostring(Dealt),1,Color3.new(0,0,0),UDim2.new(0,0,0,0),UDim2.new(1,0,1,0))
  1495. if Type=="Damage" then
  1496. damgui.Font="SourceSans"
  1497. if Dealt=="Block" then
  1498. damgui.TextColor3=BrickColor.new("Bright blue").Color
  1499. elseif Dealt<3 then
  1500. damgui.TextColor3=BrickColor.new("White").Color
  1501. elseif Dealt>=3 and Dealt<20 then
  1502. damgui.TextColor3=BrickColor.new("Bright yellow").Color
  1503. else
  1504. damgui.TextColor3=BrickColor.new("Really red").Color
  1505. damgui.Font="SourceSansBold"
  1506. end
  1507. elseif Type=="Debuff" then
  1508. damgui.TextColor3=BrickColor.new("White").Color
  1509. elseif Type=="Interrupt" then
  1510. damgui.TextColor3=BrickColor.new("New Yeller").Color
  1511. end
  1512. --damgui.FontSize="Size48"
  1513. damgui.TextScaled=true
  1514. ms=Instance.new("CylinderMesh")
  1515. ms.Scale=Vector3.new(.8,.8,.8)
  1516. ms.Parent=c
  1517. c.Reflectance=0
  1518. Instance.new("BodyGyro").Parent=c
  1519. c.Parent=m
  1520. if Char:findFirstChild("Head")~=nil then
  1521. c.CFrame=cf(Char["Head"].CFrame.p+Vector3.new(math.random(-100,100)/100,3,math.random(-100,100)/100))
  1522. elseif Char.Parent:findFirstChild("Head")~=nil then
  1523. c.CFrame=cf(Char.Parent["Head"].CFrame.p+Vector3.new(math.random(-100,100)/100,3,math.random(-100,100)/100))
  1524. end
  1525. f=Instance.new("BodyPosition")
  1526. f.P=2000
  1527. f.D=100
  1528. f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  1529. if Type=="Damage" then
  1530. f.position=c.Position+Vector3.new(0,3,0)
  1531. elseif Type=="Debuff" or Type=="Interrupt" then
  1532. f.position=c.Position+Vector3.new(0,5,0)
  1533. end
  1534. f.Parent=c
  1535. game:GetService("Debris"):AddItem(m,5)
  1536. table.insert(Effects,{m,"showDamage",damgui,f,10,1,15,50,100})
  1537. c.CanCollide=false
  1538. m.Parent=workspace
  1539. c.CanCollide=false
  1540. end
  1541.  
  1542. function MagniDamage(Part,magni,minim,maxim,knockback,Type,Property,Delay,KnockbackType,incstun,stagger,staghit,ranged,DecreaseState,DecreaseAmount,Duration)
  1543. for _,c in pairs(workspace:children()) do
  1544. local hum=c:findFirstChild("Humanoid")
  1545. if hum~=nil then
  1546. local head=nil
  1547. for _,d in pairs(c:children()) do
  1548. --if d.Name=="Torso" or d.Name=="Head" or d.Name=="HumanoidRootPart" or d.Name=="HitPart" then
  1549. --[[if d.className=="Model" and ranged~=true then
  1550. head=d:findFirstChild("Hitbox")
  1551. if d.Parent==Character then break end
  1552. if head~=nil then
  1553. local targ=head.Position-Part.Position
  1554. local mag=targ.magnitude
  1555. if mag<=magni then
  1556. ref=part(3,workspace,0,1,BrickColor.new("Black"),"Reference",vt())
  1557. ref.Anchored=true
  1558. ref.CFrame=cf(head.Position)
  1559. game:GetService("Debris"):AddItem(ref,1)
  1560. hitnum=math.random(1,5)
  1561. if hitnum==1 then so("199148971",ref,1,1)
  1562. elseif hitnum==2 then so("199149025",ref,1,1)
  1563. elseif hitnum==3 then so("199149072",ref,1,1)
  1564. elseif hitnum==4 then so("199149109",ref,1,1)
  1565. elseif hitnum==5 then so("199149119",ref,1,1)
  1566. end
  1567. StaggerHit.Value=true
  1568. end
  1569. end
  1570. end]]
  1571. if d.className=="Part" then
  1572. head=d
  1573. if head~=nil then
  1574. local targ=head.Position-Part.Position
  1575. local mag=targ.magnitude
  1576. if mag<=magni and c.Name~=Character then
  1577. if stun==nil then
  1578. stun=math.random(5,10)
  1579. end
  1580. local Rang=nil
  1581. if Ranged==false then
  1582. Rang=true
  1583. end
  1584. local stag=nil
  1585. if shbash==true then
  1586. stag=true
  1587. end
  1588. Damagefunc(head,minim,maxim,knockback,Type,Property,Delay,KnockbackType,incstun,stagger,staghit,ranged,DecreaseState,DecreaseAmount,Duration)
  1589. --Damagefunc(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,incstun,stagger,staghit,DecreaseState,DecreaseAmount,Duration)
  1590. end
  1591. end
  1592. end
  1593. end
  1594. end
  1595. end
  1596. end
  1597. local hold = false
  1598. function onKeyDown(key)
  1599. if attack==false then
  1600. if key=="z" then
  1601. PunchSlam()
  1602. elseif key=="x" then
  1603. SweepCut()
  1604. elseif key=="c" then
  1605. MultiKick()
  1606. elseif key=="v" then
  1607. JumpKick()
  1608. elseif key == "b" then
  1609. EnergyBlam()
  1610. --[[elseif key == "n" then
  1611. GrandeurDash()
  1612. elseif key == "m" then
  1613. DeathImpact()
  1614. elseif key == "f" then
  1615. Jump()]]
  1616. elseif key=="0" and hold == false then
  1617. hold = true
  1618. run.Parent=Decrease
  1619. end
  1620. end
  1621. end
  1622. function onKeyUp(key)
  1623. if attack==false then
  1624. if key=="0" and hold == true then
  1625. hold = false
  1626. run.Parent=nil
  1627. end
  1628. end
  1629. end
  1630. Mouse.KeyDown:connect(onKeyDown)
  1631. Mouse.KeyUp:connect(onKeyUp)
  1632. local stunnum=0
  1633. local animnum=0
  1634. local idle=1
  1635. local animlimit=5
  1636. local target,distance=nil,nil
  1637. local attacking=false
  1638. local stunanim=false
  1639. while Humanoid.Health>0 do
  1640. swait()
  1641. --[[print(target)
  1642. print(distance)]]
  1643. hitbox2.Parent=hitbox.Parent
  1644. hitbox2.Size=hitbox.Size
  1645. hitbox2.CFrame=hitboxCF
  1646. --[[for _,c in pairs(Character:children()) do
  1647. for _,v in pairs(c:children()) do
  1648. if v.className=="BodyGyro" or v.className=="BodyPosition" or v.className=="BodyVelocity" or v.className=="BodyAngularVelocity" then
  1649. if v.Name~="SiegmundGyro" and v.Name~="SiegmundPos" then
  1650. print("dai")
  1651. v.Parent=nil
  1652. end
  1653. end
  1654. end
  1655. end]]
  1656. coroutine.resume(coroutine.create(function()
  1657. if start==false then
  1658. start=true
  1659. StartAnim()
  1660. end
  1661. end))
  1662. if attack==false then
  1663. BodGy.cframe=cf(Torso.Position,Mouse.Hit.p)
  1664. end
  1665. target,distance=findNearestTorso(Torso.Position)
  1666. --[[if target~=nil then
  1667. if attack==false then
  1668. BodGy.cframe=cf(Torso.Position,target.Position)
  1669. end
  1670. numb1=RootPart.Position.y
  1671. numb2=target.Position.y
  1672. if numb2-numb1>=5 or numb2-numb1<=-5 then
  1673. if distance<=30 then
  1674. if attack==false then
  1675. attackrand=math.random(1,20)
  1676. if attackrand==1 then
  1677. coroutine.resume(coroutine.create(function()
  1678. RecentEnemy.Value=nil
  1679. JumpKick()
  1680. end))
  1681. end
  1682. end
  1683. end
  1684. end
  1685. if distance>30 then --far range
  1686. Humanoid:MoveTo(target.Position)
  1687. run.Parent=Decrease
  1688. if attack==false then
  1689. attackrand=math.random(1,70)
  1690. if attackrand==1 then
  1691. coroutine.resume(coroutine.create(function()
  1692. RecentEnemy.Value=nil
  1693. EnergyBlam()
  1694. --[[d=math.random(1,3)
  1695. if d==1 then
  1696. PunchSlam()
  1697. elseif d==2 then
  1698. SweepCut()
  1699. elseif d==3 then
  1700. MultiKick()
  1701. end
  1702. end))
  1703. --[[coroutine.resume(coroutine.create(function()
  1704. buffdef.Parent=Decrease
  1705. atk=0
  1706. if stompcooldown<=0 then
  1707. atk=3
  1708. else
  1709. atk=math.random(1,2)
  1710. end
  1711. if atk==1 then
  1712. Jump()
  1713. elseif atk==2 then
  1714. GrandeurDash()
  1715. elseif atk==3 then
  1716. DeathImpact()
  1717. end
  1718. buffdef.Parent=nil
  1719. end))
  1720. end
  1721. end
  1722. elseif distance<=30 and distance>=5 then --mid range
  1723. move=distance*3
  1724. Humanoid:MoveTo(target.Position)
  1725. run.Parent=nil
  1726. if attack==false then
  1727. attackrand=math.random(1,20)
  1728. if attackrand==1 then
  1729. coroutine.resume(coroutine.create(function()
  1730. RecentEnemy.Value=nil
  1731. d=math.random(1,3)
  1732. if d==1 then
  1733. PunchSlam()
  1734. elseif d==2 then
  1735. SweepCut()
  1736. elseif d==3 then
  1737. MultiKick()
  1738. end
  1739. end))
  1740. --[[coroutine.resume(coroutine.create(function()
  1741. buffdef.Parent=Decrease
  1742. atk=0
  1743. if stompcooldown<=0 then
  1744. atk=3
  1745. else
  1746. atk=math.random(1,2)
  1747. end
  1748. if atk==1 then
  1749. HeavySlam()
  1750. elseif atk==2 then
  1751. GrandeurDash()
  1752. elseif atk==3 then
  1753. DeathImpact()
  1754. end
  1755. buffdef.Parent=nil
  1756. end))
  1757. end
  1758. end
  1759. else --close range
  1760. move=10
  1761. Humanoid:MoveTo(RootPart.Position)
  1762. run.Parent=nil
  1763. --run.Parent=nil
  1764. if attack==false then
  1765. attackrand=math.random(1,20)
  1766. if attackrand==1 then
  1767. coroutine.resume(coroutine.create(function()
  1768. RecentEnemy.Value=nil
  1769. d=math.random(1,3)
  1770. if d==1 then
  1771. PunchSlam()
  1772. elseif d==2 then
  1773. SweepCut()
  1774. elseif d==3 then
  1775. MultiKick()
  1776. end
  1777. end))
  1778. --[[coroutine.resume(coroutine.create(function()
  1779. buffdef.Parent=Decrease
  1780. HeavyCombo("Stun")
  1781. buffdef.Parent=nil
  1782. end))
  1783. end
  1784. end
  1785. end
  1786. end]]
  1787. if Mvmt.Value<0 or Stun.Value>=100 or attack==true then
  1788. Humanoid.WalkSpeed=0
  1789. if jump==true then
  1790. Humanoid.WalkSpeed=16*Mvmt.Value
  1791. end
  1792. else
  1793. Humanoid.WalkSpeed=16*Mvmt.Value
  1794. end
  1795. if Stun.Value>=100 and stunanim==false then
  1796. coroutine.resume(coroutine.create(function()
  1797. stunanim=true
  1798. while attack==true do
  1799. swait()
  1800. end
  1801. StunAnim()
  1802. Stun.Value=0
  1803. stunanim=false
  1804. end))
  1805. end
  1806. local stunnum2=80
  1807. if stunnum>=stunnum2 then
  1808. if Stun.Value>0 then
  1809. Stun.Value=Stun.Value-1
  1810. end
  1811. stunnum=0
  1812. end
  1813. stunnum=stunnum+1
  1814. local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
  1815. local velderp=RootPart.Velocity.y
  1816. hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,10,Character)
  1817. for _,c in pairs(Decrease:children()) do
  1818. if c:findFirstChild("Duration")~=nil then
  1819. c.Duration.Value=c.Duration.Value-1
  1820. if c.Duration.Value<=0 then
  1821. c.Parent=nil
  1822. end
  1823. end
  1824. if c.Name=="DecreaseAtk" then
  1825. decreaseatk=decreaseatk+c.Value
  1826. elseif c.Name=="DecreaseDef" then
  1827. decreasedef=decreasedef+c.Value
  1828. elseif c.Name=="DecreaseMvmt" then
  1829. decreasemvmt=decreasemvmt+c.Value
  1830. end
  1831. end
  1832. Atk.Value=1-decreaseatk
  1833. if Atk.Value<=0 then
  1834. Atk.Value=0
  1835. end
  1836. Def.Value=1-decreasedef
  1837. if Def.Value<=0 then
  1838. Def.Value=0.01
  1839. end
  1840. Mvmt.Value=1-decreasemvmt
  1841. if Mvmt.Value<=0 then
  1842. Mvmt.Value=0
  1843. end
  1844. decreaseatk=0
  1845. decreasedef=0
  1846. decreasemvmt=0
  1847. AtkVal=Atk.Value*100
  1848. AtkVal=math.floor(AtkVal)
  1849. AtkVal=AtkVal/100
  1850. DefVal=Def.Value*100
  1851. DefVal=math.floor(DefVal)
  1852. DefVal=DefVal/100
  1853. MvmtVal=Mvmt.Value*100
  1854. MvmtVal=math.floor(MvmtVal)
  1855. MvmtVal=MvmtVal/100
  1856. if MvmtVal<=0 then
  1857. MvmtVal=0
  1858. end
  1859. animnum=animnum+1
  1860. if animnum>=animlimit*5 then
  1861. idle=1
  1862. animnum=0
  1863. elseif animnum>=animlimit*4 then
  1864. idle=1
  1865. animnum=0
  1866. elseif animnum>=animlimit*3 then
  1867. idle=4
  1868. elseif animnum>=animlimit*2 then
  1869. idle=3
  1870. elseif animnum>=animlimit*1 then
  1871. idle=2
  1872. end
  1873. if RootPart.Velocity.y > 1 and hitfloor==nil then
  1874. Anim="Jump"
  1875. if attack==false then
  1876. Neck.C0=clerp(Neck.C0,necko*euler(.1,0,0),.3)
  1877. RootJoint.C0=clerp(RootJoint.C0,euler(-.1,0,0),.3)
  1878. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.5,0,1),.3)
  1879. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1880. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.5,0,-1),.3)
  1881. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1882. RH.C0=clerp(RH.C0,cf(.5,-1,-.3)*euler(-0.5,1.57,0)*euler(-.2,0,0),.2)
  1883. LH.C0=clerp(LH.C0,cf(-.5,-1,-.3)*euler(-0.5,-1.57,0)*euler(-.2,0,0),.2)
  1884. end
  1885. elseif RootPart.Velocity.y < -1 and hitfloor==nil then
  1886. Anim="Fall"
  1887. if attack==false then
  1888. Neck.C0=clerp(Neck.C0,necko*euler(-.4,0,0),.3)
  1889. RootJoint.C0=clerp(RootJoint.C0,euler(.2,0,0),.3)
  1890. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.3,0,0.2),.3)
  1891. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1892. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.3,0,-0.2),.3)
  1893. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1894. RH.C0=clerp(RH.C0,cf(.5,-1,0)*euler(0.4,1.57,0),.2)
  1895. LH.C0=clerp(LH.C0,cf(-.5,-1,0)*euler(-0.2,-1.57,0),.2)
  1896. end
  1897. elseif torvel<1 and hitfloor~=nil then
  1898. Anim="Idle"
  1899. animlimit=15
  1900. if attack==false then
  1901. if idle==1 or idle==2 then
  1902. Neck.C0=clerp(Neck.C0,necko*euler(0,.5,0)*euler(0,0,0),.1)
  1903. RootJoint.C0=clerp(RootJoint.C0,euler(0,.5,0)*cf(0,.4,0),.1)
  1904. RW.C0=clerp(RW.C0,cf(1.3,0.4,.3)*euler(1,0,.2)*euler(0,-.5,0),.1)
  1905. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.1)
  1906. LW.C0=clerp(LW.C0,cf(-1.3,0.5,-.2)*euler(1.4,0,.5)*euler(0,1,0),.1)
  1907. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.1)
  1908. RH.C0=clerp(RH.C0,cf(.6,-.9,0)*euler(0,1.57,0)*euler(0,-.1,-.05),.1)
  1909. LH.C0=clerp(LH.C0,cf(-.7,-.8,-.4)*euler(0,-1.57,0)*euler(0,.5,.1),.1)
  1910. else
  1911. Neck.C0=clerp(Neck.C0,necko*euler(.1,.5,0)*euler(0,0,0),.1)
  1912. RootJoint.C0=clerp(RootJoint.C0,euler(.1,.5,0)*euler(0,0,0)*cf(0,.6,0),.1)
  1913. RW.C0=clerp(RW.C0,cf(1.3,0.4,.3)*euler(.8,0,.4)*euler(0,-.5,0),.1)
  1914. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.1)
  1915. LW.C0=clerp(LW.C0,cf(-1.3,0.5,-.2)*euler(1.6,0,.2)*euler(0,1,0),.1)
  1916. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.1)
  1917. RH.C0=clerp(RH.C0,cf(.7,-.7,-.5)*euler(0,1.57,0)*euler(0,-.1,-.2)*euler(.05,0,0),.1)
  1918. LH.C0=clerp(LH.C0,cf(-.6,-.6,-.8)*euler(0,-1.57,0)*euler(0,.5,.2)*euler(-.1,0,0),.1)
  1919. end
  1920. end
  1921. elseif torvel>2 and torvel<20 and hitfloor~=nil then
  1922. Anim="Walk"
  1923. animlimit=10
  1924. if attack==false then
  1925. if idle==1 or idle==2 then
  1926. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.1)
  1927. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-1.4,0,-.1)*euler(0,0,0),.1)
  1928. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.1)
  1929. RH.C0=clerp(RH.C0,cf(.5,-1,0)*euler(0,1.57,0)*euler(0,0,-.5),.1)
  1930. if idle==1 then
  1931. Neck.C0=clerp(Neck.C0,necko*euler(.05,0,0)*euler(0,0,0),.1)
  1932. RootJoint.C0=clerp(RootJoint.C0,euler(0,0,0)*cf(0,.1,0),.1)
  1933. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1,0,0)*euler(0,0,0),.1)
  1934. LH.C0=clerp(LH.C0,cf(-.5,-1,0)*euler(0,-1.57,0)*euler(0,0,-1.2),.1)
  1935. elseif idle==2 then
  1936. Neck.C0=clerp(Neck.C0,necko*euler(0,0,0)*euler(0,0,0),.1)
  1937. RootJoint.C0=clerp(RootJoint.C0,euler(.2,0,0)*cf(0,.2,0),.1)
  1938. RW.C0=clerp(RW.C0,cf(1.3,0.5,-.5)*euler(1.2,0,-.5)*euler(0,0,0),.1)
  1939. LH.C0=clerp(LH.C0,cf(-.5,-.9,-.3)*euler(0,-1.57,0)*euler(0,0,0),.1)
  1940. end
  1941. else
  1942. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-1.4,0,.1)*euler(0,0,0),.1)
  1943. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.1)
  1944. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.1)
  1945. LH.C0=clerp(LH.C0,cf(-.5,-1,0)*euler(0,-1.57,0)*euler(0,0,.5),.1)
  1946. if idle==3 then
  1947. Neck.C0=clerp(Neck.C0,necko*euler(.05,0,0)*euler(0,0,0),.1)
  1948. RootJoint.C0=clerp(RootJoint.C0,euler(0,0,0)*cf(0,.1,0),.1)
  1949. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1,0,0)*euler(0,0,0),.1)
  1950. RH.C0=clerp(RH.C0,cf(.5,-1,0)*euler(0,1.57,0)*euler(0,0,1.2),.1)
  1951. elseif idle==4 then
  1952. Neck.C0=clerp(Neck.C0,necko*euler(0,0,0)*euler(0,0,0),.1)
  1953. RootJoint.C0=clerp(RootJoint.C0,euler(.2,0,0)*cf(0,.2,0),.1)
  1954. LW.C0=clerp(LW.C0,cf(-1.3,0.5,-.5)*euler(1.2,0,.5)*euler(0,0,0),.1)
  1955. RH.C0=clerp(RH.C0,cf(.5,-.9,-.3)*euler(0,1.57,0)*euler(0,0,0),.1)
  1956. end
  1957. end
  1958. end
  1959. elseif torvel>=20 and hitfloor~=nil then
  1960. Anim="Run"
  1961. animlimit=10
  1962. if attack==false then
  1963. if idle==1 or idle==2 then
  1964. Neck.C0=clerp(Neck.C0,necko*euler(.2,0,0)*euler(0,0,0),.2)
  1965. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  1966. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  1967. RH.C0=clerp(RH.C0,cf(.5,-1,0)*euler(0,1.57,0)*euler(-.2,0,-.8),.2)
  1968. if idle==1 then
  1969. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-1,0,.5)*euler(0,0,0),.2)
  1970. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-1,0,-.5)*euler(0,0,0),.2)
  1971. RootJoint.C0=clerp(RootJoint.C0,euler(.4,0,0)*cf(0,.3,0),.2)
  1972. LH.C0=clerp(LH.C0,cf(-.5,-1,0)*euler(0,-1.57,0)*euler(0,0,-1.5),.2)
  1973. elseif idle==2 then
  1974. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-1.2,0,.3)*euler(0,0,0),.2)
  1975. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-1.2,0,-.3)*euler(0,0,0),.2)
  1976. RootJoint.C0=clerp(RootJoint.C0,euler(.5,0,0)*cf(0,.4,0),.1)
  1977. LH.C0=clerp(LH.C0,cf(-.5,-.6,-.5)*euler(0,-1.57,0)*euler(0,0,-.5),.1)
  1978. end
  1979. else
  1980. Neck.C0=clerp(Neck.C0,necko*euler(.2,0,0)*euler(0,0,0),.2)
  1981. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  1982. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  1983. LH.C0=clerp(LH.C0,cf(-.5,-1,0)*euler(0,-1.57,0)*euler(-.2,0,.8),.2)
  1984. if idle==3 then
  1985. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-1,0,.5)*euler(0,0,0),.2)
  1986. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-1,0,-.5)*euler(0,0,0),.2)
  1987. RootJoint.C0=clerp(RootJoint.C0,euler(.4,0,0)*cf(0,.3,0),.2)
  1988. RH.C0=clerp(RH.C0,cf(.5,-1,0)*euler(0,1.57,0)*euler(0,0,1.5),.2)
  1989. elseif idle==4 then
  1990. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-1.2,0,.3)*euler(0,0,0),.2)
  1991. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-1.2,0,-.3)*euler(0,0,0),.2)
  1992. RootJoint.C0=clerp(RootJoint.C0,euler(.5,0,0)*cf(0,.4,0),.1)
  1993. RH.C0=clerp(RH.C0,cf(.5,-.6,-.5)*euler(0,1.57,0)*euler(0,0,.5),.1)
  1994. end
  1995. end
  1996. end
  1997. end
  1998. if #Effects>0 then
  1999. --table.insert(Effects,{prt,"Block1",delay})
  2000. for e=1,#Effects do
  2001. if Effects[e]~=nil then
  2002. --for j=1,#Effects[e] do
  2003. local Thing=Effects[e]
  2004. if Thing~=nil then
  2005. local Part=Thing[1]
  2006. local Mode=Thing[2]
  2007. local Delay=Thing[3]
  2008. local IncX=Thing[4]
  2009. local IncY=Thing[5]
  2010. local IncZ=Thing[6]
  2011. if Thing[2]=="DecreaseStat" then
  2012. --table.insert(Effects,{Model,"DecreaseStat",Stat,Amount,Duration,d})
  2013. Thing[5]=Thing[5]-1
  2014. if Thing[5]<=0 then
  2015. if Thing[1]:findFirstChild("Stats")~=nil then
  2016. if Thing[1].Stats:findFirstChild("Decrease")~=nil then
  2017. --Thing[1].Stats[Thing[3]].Value=Thing[1].Stats[Thing[3]].Value+Thing[4]
  2018. end
  2019. end
  2020. Thing[6].Parent=nil
  2021. table.remove(Effects,e)
  2022. end
  2023. end
  2024. if Thing[2]=="CylinderClang" then
  2025. if Thing[3]<=1 then
  2026. Thing[1].CFrame=Thing[1].CFrame*CFrame.new(0,2.5*Thing[5],0)*CFrame.fromEulerAnglesXYZ(Thing[6],0,0)
  2027. Thing[7]=Thing[1].CFrame
  2028. effect("New Yeller",0,Thing[8],Thing[7])
  2029. Thing[8]=Thing[7]
  2030. Thing[3]=Thing[3]+Thing[4]
  2031. else
  2032. Part.Parent=nil
  2033. table.remove(Effects,e)
  2034. end
  2035. end
  2036. if Thing[2]=="showDamage" then
  2037. if Thing[6]<Thing[5] then
  2038. Thing[6]=Thing[6]+1
  2039. elseif Thing[6]<Thing[7] then
  2040. Thing[4].position=Thing[4].position+vt(0,-.2,0)
  2041. Thing[6]=Thing[6]+1
  2042. elseif Thing[6]<Thing[8] then
  2043. Thing[6]=Thing[6]+1
  2044. elseif Thing[6]<Thing[9] then
  2045. Thing[6]=Thing[6]+1
  2046. Thing[4].position=Thing[4].position+vt(0,.2,0)
  2047. Thing[3].TextStrokeTransparency=Thing[3].TextStrokeTransparency+.1
  2048. Thing[3].TextTransparency=Thing[3].TextTransparency+.1
  2049. else
  2050. Thing[1].Parent=nil
  2051. table.remove(Effects,e)
  2052. end
  2053. end
  2054. if Thing[2]~="DecreaseStat" and Thing[2]~="showDamage" then
  2055. if Thing[1].Transparency<=1 then
  2056. if Thing[2]=="Block1" then
  2057. Thing[1].CFrame=Thing[1].CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  2058. Mesh=Thing[7]
  2059. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  2060. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  2061. elseif Thing[2]=="Block2" then
  2062. Thing[1].CFrame=Thing[1].CFrame
  2063. Mesh=Thing[7]
  2064. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  2065. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  2066. elseif Thing[2]=="Cylinder" then
  2067. Mesh=Thing[7]
  2068. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  2069. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  2070. elseif Thing[2]=="Cylinder2" then
  2071. Mesh=Thing[7]
  2072. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  2073. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  2074. if Thing[1].Transparency>=.5 then
  2075. Thing[1].BrickColor=BrickColor.new("Bright blue")
  2076. end
  2077. elseif Thing[2]=="Blood" then
  2078. Mesh=Thing[7]
  2079. Thing[1].CFrame=Thing[1].CFrame*cf(0,.5,0)
  2080. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  2081. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  2082. elseif Thing[2]=="Elec" then
  2083. Mesh=Thing[7]
  2084. Mesh.Scale=Mesh.Scale+vt(Thing[7],Thing[8],Thing[9])
  2085. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  2086. elseif Thing[2]=="Disappear" then
  2087. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  2088. end
  2089. else
  2090. table.remove(Effects,e)
  2091. Thing[1].Parent=nil
  2092. end
  2093. end
  2094. end
  2095. --end
  2096. end
  2097. end
  2098. end
  2099. end
Add Comment
Please, Sign In to add comment