Advertisement
Insanity2021

SDWFEGRHYTY

Apr 28th, 2018
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 133.56 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("White")
  27. char["Body Colors"].LeftArmColor = BrickColor.new("White")
  28. char["Body Colors"].RightArmColor = BrickColor.new("White")
  29. char["Body Colors"].TorsoColor = BrickColor.new("White")
  30. char["Body Colors"].RightLegColor = BrickColor.new("White")
  31. char["Body Colors"].LeftLegColor = BrickColor.new("White")
  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("Really black")
  76. local SubColor=BrickColor.new("Really black")
  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("White"),"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("White"),"Hitbox",vt(1,1,1))
  420. --hitbox.Anchored=true
  421. local hitbox2=part(3,nil,0,1,BrickColor.new("White"),"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("Spanda 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("White"),"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("White"),"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("Really black"),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("Really black"),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("White"),"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("White"),"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("Really black").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("Black").Color
  1503. else
  1504. damgui.TextColor3=BrickColor.new("White").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("Black").Color
  1511. end
  1512. --damgui.FontSize="Size48"
  1513. damgui.TextScaled=true
  1514. ms=Instance.new("CylinderMesh")
  1515. ms.Scale=Vector3.new(1,1,1)
  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("White"),"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("White")
  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. endlocal p = game.Players.LocalPlayer
  2100. local char = p.Character
  2101. local mouse = p:GetMouse()
  2102. local larm = char["Left Arm"]
  2103. local rarm = char["Right Arm"]
  2104. local lleg = char["Left Leg"]
  2105. local rleg = char["Right Leg"]
  2106. local hed = char.Head
  2107. local Torso = char.Torso
  2108. local hum = char.Humanoid
  2109. local cam = game.Workspace.CurrentCamera
  2110. local root = char.HumanoidRootPart
  2111. local deb = false
  2112. local shot = 0
  2113. local potential = false
  2114. local debris=game:service"Debris"
  2115. local l = game:GetService("Lighting")
  2116. local rs = game:GetService("RunService").RenderStepped
  2117. ptz = {0.8, 0.85, 0.9, 0.95, 1, 1.05, 1.1}
  2118. math.randomseed(os.time())
  2119. for i,v in pairs(char:children()) do
  2120. if v:IsA("Accessory") then
  2121. v:Destroy()
  2122. end
  2123. end
  2124. char["Body Colors"].HeadColor = BrickColor.new("White")
  2125. char["Body Colors"].LeftArmColor = BrickColor.new("White")
  2126. char["Body Colors"].RightArmColor = BrickColor.new("White")
  2127. char["Body Colors"].TorsoColor = BrickColor.new("White")
  2128. char["Body Colors"].RightLegColor = BrickColor.new("White")
  2129. char["Body Colors"].LeftLegColor = BrickColor.new("White")
  2130. Player=game:GetService("Players").LocalPlayer
  2131. Character=Player.Character
  2132. PlayerGui=Player.PlayerGui
  2133. Backpack=Player.Backpack
  2134. Torso=Character.Torso
  2135. Head=Character.Head
  2136. Humanoid=Character.Humanoid
  2137. Mouse=Player:GetMouse()
  2138. RootPart = Character.HumanoidRootPart
  2139. RootJoint = RootPart.RootJoint
  2140. LeftArm=Character["Left Arm"]
  2141. LeftLeg=Character["Left Leg"]
  2142. RightArm=Character["Right Arm"]
  2143. RightLeg=Character["Right Leg"]
  2144. LS=Torso["Left Shoulder"]
  2145. LH=Torso["Left Hip"]
  2146. RS=Torso["Right Shoulder"]
  2147. RH=Torso["Right Hip"]
  2148. Neck=Torso.Neck
  2149. it=Instance.new
  2150. vt=Vector3.new
  2151. cf=CFrame.new
  2152. euler=CFrame.fromEulerAnglesXYZ
  2153. angles=CFrame.Angles
  2154. local decreaseatk=0
  2155. local decreasedef=0
  2156. local decreasemvmt=0
  2157. local Anim="Idle"
  2158. local Effects={}
  2159. local armorparts={}
  2160. local armorwelds={}
  2161. local weaponparts={}
  2162. local weaponwelds={}
  2163. local necko=euler(0,0,0)*cf(0,1,0)
  2164. local attack=false
  2165. local jump=false
  2166. local start=false
  2167. local move=10
  2168. local hitfloor,posfloor=nil,nil
  2169. local run=Instance.new("NumberValue")
  2170. run.Name="DecreaseMvmt"
  2171. run.Value=-1.2
  2172. local bName="Sthomas"
  2173. local MainColor=BrickColor.new("Really black")
  2174. local SubColor=BrickColor.new("Really black")
  2175. --[[if script:findFirstChild("SiegmundHealth")~=nil then
  2176. for _,c in pairs(game.Players:children()) do
  2177. d=script.SiegmundHealth:Clone()
  2178. d.Parent=c.PlayerGui
  2179. end
  2180. end]]
  2181.  
  2182.  
  2183.  
  2184.  
  2185. function NoOutline(Part)
  2186. Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
  2187. end
  2188. Character.Animate:Remove()
  2189.  
  2190. Character.Humanoid.Animator:Remove()
  2191. local Create = LoadLibrary("RbxUtility").Create
  2192.  
  2193. ArtificialHB = Create("BindableEvent", script){
  2194. Parent = script,
  2195. Name = "Heartbeat",
  2196. }
  2197.  
  2198. script:WaitForChild("Heartbeat")
  2199.  
  2200. frame = 1 / 30
  2201. tf = 0
  2202. allowframeloss = false
  2203. tossremainder = false
  2204. lastframe = tick()
  2205. script.Heartbeat:Fire()
  2206.  
  2207. game:GetService("RunService").Heartbeat:connect(function(s, p)
  2208. tf = tf + s
  2209. if tf >= frame then
  2210. if allowframeloss then
  2211. script.Heartbeat:Fire()
  2212. lastframe = tick()
  2213. else
  2214. for i = 1, math.floor(tf / frame) do
  2215. script.Heartbeat:Fire()
  2216. end
  2217. lastframe = tick()
  2218. end
  2219. if tossremainder then
  2220. tf = 0
  2221. else
  2222. tf = tf - frame * math.floor(tf / frame)
  2223. end
  2224. end
  2225. end)
  2226.  
  2227. function swait(num)
  2228. if num == 0 or num == nil then
  2229. ArtificialHB.Event:wait()
  2230. else
  2231. for i = 0, num do
  2232. ArtificialHB.Event:wait()
  2233. end
  2234. end
  2235. end
  2236.  
  2237. --[[frame,t,lastframe = 1/30,0,tick()
  2238. 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.
  2239. tossremainder = false --if set to true t will be set to 0 after Fire()-ing.
  2240.  
  2241. swait = function(dt)
  2242. if dt == nil then
  2243. dt = frame
  2244. elseif dt < frame then
  2245. dt = frame
  2246. elseif dt > frame then
  2247. --round this out into frames
  2248. dt = math.floor(dt/frame)
  2249. end
  2250. local timetomeet = tick() + dt
  2251. end]] --maybe later
  2252.  
  2253. --30hz Pacemaker
  2254.  
  2255. script:WaitForChild("Heartbeat")
  2256.  
  2257. frame = 1/30
  2258. tf = 0
  2259. 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.
  2260. tossremainder = false --if set to true t will be set to 0 after Fire()-ing.
  2261. lastframe = tick()
  2262. script.Heartbeat:Fire() --ayy lmao
  2263.  
  2264. game:GetService("RunService").Heartbeat:connect(function(s,p) --herp derp
  2265. tf = tf + s
  2266. if tf >= frame then
  2267. if allowframeloss then
  2268. script.Heartbeat:Fire()
  2269. lastframe=tick()
  2270. else
  2271. --print("FIRED "..math.floor(t/frame).." FRAME(S)","REMAINDER "..(t - frame*(math.floor(t/frame))))
  2272. for i=1, math.floor(tf/frame) do
  2273. script.Heartbeat:Fire()
  2274. end
  2275. lastframe=tick()
  2276. end
  2277. if tossremainder then
  2278. tf = 0
  2279. else
  2280. tf = tf - frame * math.floor(tf/frame)
  2281. end
  2282. end
  2283. end)
  2284.  
  2285. function clerp(a,b,t)
  2286. local qa = {QuaternionFromCFrame(a)}
  2287. local qb = {QuaternionFromCFrame(b)}
  2288. local ax, ay, az = a.x, a.y, a.z
  2289. local bx, by, bz = b.x, b.y, b.z
  2290. local _t = 1-t
  2291. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  2292. end
  2293.  
  2294. function QuaternionFromCFrame(cf)
  2295. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  2296. local trace = m00 + m11 + m22
  2297. if trace > 0 then
  2298. local s = math.sqrt(1 + trace)
  2299. local recip = 0.5/s
  2300. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  2301. else
  2302. local i = 0
  2303. if m11 > m00 then
  2304. i = 1
  2305. end
  2306. if m22 > (i == 0 and m00 or m11) then
  2307. i = 2
  2308. end
  2309. if i == 0 then
  2310. local s = math.sqrt(m00-m11-m22+1)
  2311. local recip = 0.5/s
  2312. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  2313. elseif i == 1 then
  2314. local s = math.sqrt(m11-m22-m00+1)
  2315. local recip = 0.5/s
  2316. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  2317. elseif i == 2 then
  2318. local s = math.sqrt(m22-m00-m11+1)
  2319. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  2320. end
  2321. end
  2322. end
  2323.  
  2324. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  2325. local xs, ys, zs = x + x, y + y, z + z
  2326. local wx, wy, wz = w*xs, w*ys, w*zs
  2327. local xx = x*xs
  2328. local xy = x*ys
  2329. local xz = x*zs
  2330. local yy = y*ys
  2331. local yz = y*zs
  2332. local zz = z*zs
  2333. 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))
  2334. end
  2335.  
  2336. function QuaternionSlerp(a, b, t)
  2337. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  2338. local startInterp, finishInterp;
  2339. if cosTheta >= 0.0001 then
  2340. if (1 - cosTheta) > 0.0001 then
  2341. local theta = math.acos(cosTheta)
  2342. local invSinTheta = 1/math.sin(theta)
  2343. startInterp = math.sin((1-t)*theta)*invSinTheta
  2344. finishInterp = math.sin(t*theta)*invSinTheta
  2345. else
  2346. startInterp = 1-t
  2347. finishInterp = t
  2348. end
  2349. else
  2350. if (1+cosTheta) > 0.0001 then
  2351. local theta = math.acos(-cosTheta)
  2352. local invSinTheta = 1/math.sin(theta)
  2353. startInterp = math.sin((t-1)*theta)*invSinTheta
  2354. finishInterp = math.sin(t*theta)*invSinTheta
  2355. else
  2356. startInterp = t-1
  2357. finishInterp = t
  2358. end
  2359. end
  2360. 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
  2361. end
  2362.  
  2363. function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
  2364. local fp=it("Part")
  2365. fp.formFactor=formfactor
  2366. fp.Parent=parent
  2367. fp.Reflectance=reflectance
  2368. fp.Transparency=transparency
  2369. fp.CanCollide=false
  2370. fp.Locked=true
  2371. fp.BrickColor=brickcolor
  2372. fp.Name=name
  2373. fp.Size=size
  2374. NoOutline(fp)
  2375. fp.Material="SmoothPlastic"
  2376. fp:BreakJoints()
  2377. return fp
  2378. end
  2379.  
  2380. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  2381. local mesh=it(Mesh)
  2382. mesh.Parent=part
  2383. if Mesh=="SpecialMesh" then
  2384. mesh.MeshType=meshtype
  2385. if meshid~="nil" then
  2386. mesh.MeshId="http://www.roblox.com/asset/?id="..meshid
  2387. end
  2388. end
  2389. mesh.Offset=offset
  2390. mesh.Scale=scale
  2391. return mesh
  2392. end
  2393.  
  2394. function weld(parent,part0,part1,c0)
  2395. local weld=it("Motor")
  2396. weld.Parent=parent
  2397. weld.Part0=part0
  2398. weld.Part1=part1
  2399. weld.C0=c0
  2400. return weld
  2401. end
  2402.  
  2403. function gui(GuiType,parent,text,backtrans,backcol,pos,size,image)
  2404. local gui=it(GuiType)
  2405. gui.Parent=parent
  2406. gui.BackgroundTransparency=backtrans
  2407. gui.BackgroundColor3=backcol
  2408. gui.SizeConstraint="RelativeXY"
  2409. gui.Position=pos
  2410. gui.Size=size
  2411. if GuiType=="TextLabel" then
  2412. gui.Text=text
  2413. gui.TextXAlignment="Center"
  2414. gui.TextYAlignment="Center"
  2415. gui.Font="SourceSans"
  2416. gui.FontSize="Size14"
  2417. gui.TextWrapped=false
  2418. gui.TextStrokeTransparency=0
  2419. gui.TextColor=BrickColor.new("White")
  2420. elseif GuiType=="ImageLabel" then
  2421. gui.Image="rbxassetid://"..image
  2422. gui.ImageColor3=backcol
  2423. end
  2424. return gui
  2425. end
  2426.  
  2427. local Characte=Instance.new("Model")
  2428. Characte.Parent=Character
  2429. Characte.Name=bName
  2430.  
  2431.  
  2432. --local Torso=part(0,Character,0,0,MainColor,"Torso",vt(2,2,1))
  2433. local Torsoc=part(0,Character,0,0,SubColor,"Torso Copy",vt(2,2,1))
  2434. --local LeftArm=part(0,Character,0,0,MainColor,"Left Arm",vt(1,2,1))
  2435. local LeftArmc=part(0,Character,0,0,SubColor,"Left Arm Copy",vt(1,2,1))
  2436. --local RightArm=part(0,Character,0,0,MainColor,"Right Arm",vt(1,2,1))
  2437. local RightArmc=part(0,Character,0,0,SubColor,"Right Arm Copy",vt(1,2,1))
  2438. --local LeftLeg=part(0,Character,0,0,MainColor,"Left Leg",vt(1,2,1))
  2439. local LeftLegc=part(0,Character,0,0,SubColor,"Left Leg Copy",vt(1,2,1))
  2440. --local RightLeg=part(0,Character,0,0,MainColor,"Right Leg",vt(1,2,1))
  2441. local RightLegc=part(0,Character,0,0,SubColor,"Right Leg Copy",vt(1,2,1))
  2442.  
  2443.  
  2444. --local Head=part(0,Character,0,0,BrickColor.new("Pastel brown"),"Head",vt(2,1,1))
  2445. --[[local Torso=part(0,Character,0,0,MainColor,"Torso",vt(2,2,1))
  2446. local Torsoc=part(0,Character,0,0,SubColor,"Torso Copy",vt(2,2,1))
  2447. local LeftArm=part(0,Character,0,0,SubColor,"Left Arm",vt(1,2,1))
  2448. local LeftArmc=part(0,Character,0,0,MainColor,"Left Arm Copy",vt(1,2,1))
  2449. local RightArm=part(0,Character,0,0,SubColor,"Right Arm",vt(1,2,1))
  2450. local RightArmc=part(0,Character,0,0,MainColor,"Right Arm Copy",vt(1,2,1))
  2451. local LeftLeg=part(0,Character,0,0,SubColor,"Left Leg",vt(1,2,1))
  2452. local LeftLegc=part(0,Character,0,0,MainColor,"Left Leg Copy",vt(1,2,1))
  2453. local RightLeg=part(0,Character,0,0,SubColor,"Right Leg",vt(1,2,1))
  2454. local RightLegc=part(0,Character,0,0,MainColor,"Right Leg Copy",vt(1,2,1))]]
  2455. --local RootPart=part(0,Character,0,1,MainColor,"HumanoidRootPart",vt(2,2,1))
  2456. local Cape=part(0,Character,0,0,BrickColor.new("White"),"Hat",vt())
  2457. Head.CanCollide=true
  2458. Torso.CanCollide=true
  2459. LeftArm.CanCollide=true
  2460. RightArm.CanCollide=true
  2461. LeftLeg.CanCollide=true
  2462. RightLeg.CanCollide=true
  2463. RootPart.CanCollide=false
  2464. Head.face:Remove()
  2465. face=Instance.new("Decal",Head)
  2466. face.Face="Front"
  2467. --face.Texture="http://www.roblox.com/asset/?id="
  2468. face.Texture="http://www.roblox.com/asset/?id="
  2469.  
  2470. local HMesh=mesh("SpecialMesh",Head,"Head","nil",vt(0,0,0),vt(1.25,1.25,1.25))
  2471. local TMsh=mesh("SpecialMesh",Torso,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(1.8,1,.8))
  2472. local LAMsh=mesh("SpecialMesh",LeftArm,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(.8,.8,.8))
  2473. local RAMsh=mesh("SpecialMesh",RightArm,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(.8,.8,.8))
  2474. local LLMsh=mesh("SpecialMesh",LeftLeg,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(.8,1,.8))
  2475. local RLMsh=mesh("SpecialMesh",RightLeg,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(.8,1,.8))
  2476. local TcMsh=mesh("SpecialMesh",Torsoc,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(-2,-1,-1))
  2477. local LAcMsh=mesh("SpecialMesh",LeftArmc,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(-1,-1,-1))
  2478. local RAcMsh=mesh("SpecialMesh",RightArmc,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(-1,-1,-1))
  2479. local LLcMsh=mesh("SpecialMesh",LeftLegc,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(-1,-1.2,-1))
  2480. local RLcMsh=mesh("SpecialMesh",RightLegc,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(-1,-1.2,-1))
  2481. TMsh.MeshId="rbxasset://fonts/leftarm.mesh"
  2482. LAMsh.MeshId="rbxasset://fonts/leftarm.mesh"
  2483. RAMsh.MeshId="rbxasset://fonts/leftarm.mesh"
  2484. LLMsh.MeshId="rbxasset://fonts/leftarm.mesh"
  2485. RLMsh.MeshId="rbxasset://fonts/leftarm.mesh"
  2486. TcMsh.MeshId="rbxasset://fonts/leftarm.mesh"
  2487. LAcMsh.MeshId="rbxasset://fonts/leftarm.mesh"
  2488. RAcMsh.MeshId="rbxasset://fonts/leftarm.mesh"
  2489. LLcMsh.MeshId="rbxasset://fonts/leftarm.mesh"
  2490. RLcMsh.MeshId="rbxasset://fonts/leftarm.mesh"
  2491. local Cmsh=mesh("SpecialMesh",Cape,"FileMesh","http://www.roblox.com/asset/?id=250281794",vt(0,0,0),vt(1,1,1))
  2492.  
  2493. --[[local Neck=weld(Torso,Torso,Head,cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0))
  2494. Neck.C1=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)]]
  2495. local Neck=weld(Torso,Torso,Head,euler(0,0,0)*cf(0,1,0))
  2496. Neck.C1=cf(0,-.5,0)
  2497. local RW=weld(Torso,Torso,RightArm,cf(1.5,.5,0))
  2498. RW.C1=cf(0,.5,0)
  2499. local RWc=weld(Torso,RightArm,RightArmc,cf(0,0,0))
  2500. local LW=weld(Torso,Torso,LeftArm,cf(-1.5,.5,0))
  2501. LW.C1=cf(0,.5,0)
  2502. local LWc=weld(Torso,LeftArm,LeftArmc,cf(0,0,0))
  2503. local RH=weld(Torso,Torso,RightLeg,cf(.5,-1,0))
  2504. RH.C1=cf(0,1,0)
  2505. local RHc=weld(Torso,RightLeg,RightLegc,cf(0,0,0))
  2506. local LH=weld(Torso,Torso,LeftLeg,cf(-.5,-1,0))
  2507. LH.C1=cf(0,1,0)
  2508. local LHc=weld(Torso,LeftLeg,LeftLegc,cf(0,0,0))
  2509. local RootJoint=weld(Torso,Torso,RootPart,cf(0,0,0))
  2510. local RootJointc=weld(Torso,Torso,Torsoc,cf(0,0,0))
  2511. --local Cwld=weld(Torso,Cape,Head,euler(0,0,0)*cf(0,2,-.3))
  2512. local Cwld=weld(Torso,Cape,Torso,euler(0,0,0)*cf(0,.5,-.3))
  2513. --Torso.CFrame=cf(math.random(-5000,5000)/100,math.random(-5000,5000)/100,math.random(-5000,5000)/100)
  2514. --Torso.CFrame=cf(0,0,0)
  2515. --Torso.CFrame=workspace.Map.BossSpawn.CFrame*cf(0,5,0)
  2516.  
  2517. local hitbox=part(3,nil,0,1,BrickColor.new("White"),"Hitbox",vt(1,1,1))
  2518. --hitbox.Anchored=true
  2519. local hitbox2=part(3,nil,0,1,BrickColor.new("White"),"Hitbox",vt(1,1,1))
  2520. hitbox2.Anchored=true
  2521. local hitboxCF=cf(0,0,0)
  2522.  
  2523. --[[local Humanoid=Instance.new("Humanoid")
  2524. Humanoid.Parent=Character
  2525. TehHealth=700
  2526. --TehHealth=2000
  2527. Humanoid.MaxHealth=TehHealth
  2528. Humanoid.Health=TehHealth
  2529. coroutine.resume(coroutine.create(function()
  2530. for i=1,20 do
  2531. wait()
  2532. Humanoid.Health=Humanoid.MaxHealth
  2533. end
  2534. Humanoid:TakeDamage(1)
  2535. end))]]
  2536. local Stats=Instance.new("BoolValue")
  2537. Stats.Name="Stats"
  2538. Stats.Parent=Character
  2539. local Atk=Instance.new("NumberValue")
  2540. Atk.Name="Damage"
  2541. Atk.Parent=Stats
  2542. Atk.Value=1
  2543. local Def=Instance.new("NumberValue")
  2544. Def.Name="Defense"
  2545. Def.Parent=Stats
  2546. Def.Value=1
  2547. local Mvmt=Instance.new("NumberValue")
  2548. Mvmt.Name="Movement"
  2549. Mvmt.Parent=Stats
  2550. Mvmt.Value=1
  2551. local Block=Instance.new("BoolValue")
  2552. Block.Name="Block"
  2553. Block.Parent=Stats
  2554. Block.Value=false
  2555. local Stun=Instance.new("NumberValue")
  2556. Stun.Name="Stun"
  2557. Stun.Parent=Stats
  2558. Stun.Value=0
  2559. local StunT=Instance.new("NumberValue")
  2560. StunT.Name="StunThreshold"
  2561. StunT.Parent=Stats
  2562. StunT.Value=100
  2563. local Rooted=Instance.new("BoolValue")
  2564. Rooted.Name="Rooted"
  2565. Rooted.Parent=Stats
  2566. Rooted.Value=false
  2567. local Stunned=Instance.new("BoolValue")
  2568. Stunned.Name="Stunned"
  2569. Stunned.Parent=Stats
  2570. Stunned.Value=false
  2571. local Stagger=Instance.new("BoolValue")
  2572. Stagger.Name="Stagger"
  2573. Stagger.Parent=Stats
  2574. Stagger.Value=false
  2575. local StaggerHit=Instance.new("BoolValue")
  2576. StaggerHit.Name="StaggerHit"
  2577. StaggerHit.Parent=Stats
  2578. StaggerHit.Value=false
  2579. local RecentEnemy=Instance.new("ObjectValue")
  2580. RecentEnemy.Name="RecentEnemy"
  2581. RecentEnemy.Parent=Stats
  2582. RecentEnemy.Value=nil
  2583. local Decrease=Instance.new("BoolValue")
  2584. Decrease.Name="Decrease"
  2585. Decrease.Parent=Stats
  2586. Decrease.Value=false
  2587. local mana=Instance.new("NumberValue")
  2588. mana.Name="Mana"
  2589. mana.Parent=Stats
  2590. mana.Value=0
  2591. local boss=Instance.new("BoolValue")
  2592. boss.Name="Boss"
  2593. boss.Parent=Stats
  2594. boss.Value=true
  2595. local alive=Instance.new("BoolValue")
  2596. alive.Name="Alive"
  2597. alive.Parent=Character
  2598. alive.Value=true
  2599. local btarget=Instance.new("ObjectValue")
  2600. btarget.Name="Target"
  2601. btarget.Parent=Stats
  2602. btarget.Value=nil
  2603. local passive1=Instance.new("NumberValue",Decrease)
  2604. passive1.Name="DecreaseAtk"
  2605. passive1.Value=-.4
  2606. local passive2=Instance.new("NumberValue",Decrease)
  2607. passive2.Name="DecreaseDef"
  2608. passive2.Value=-.1
  2609. local passive3=Instance.new("NumberValue",Decrease)
  2610. passive3.Name="DecreaseMvmt"
  2611. passive3.Value=.1
  2612.  
  2613. so = function(id,par,vol,pit)
  2614. local sou = Instance.new("Sound",par or workspace)
  2615. sou.Volume=1.5
  2616. sou.Pitch=pit or 1
  2617. sou.SoundId="http://www.roblox.com/asset/?id="..id
  2618. --swait()
  2619. sou:play()
  2620. game:GetService("Debris"):AddItem(sou,6)
  2621. end
  2622.  
  2623. local function CFrameFromTopBack(at, top, back)
  2624. local right = top:Cross(back)
  2625. return CFrame.new(at.x, at.y, at.z,
  2626. right.x, top.x, back.x,
  2627. right.y, top.y, back.y,
  2628. right.z, top.z, back.z)
  2629. end
  2630.  
  2631. function Triangle(a, b, c)
  2632. local edg1 = (c-a):Dot((b-a).unit)
  2633. local edg2 = (a-b):Dot((c-b).unit)
  2634. local edg3 = (b-c):Dot((a-c).unit)
  2635. if edg1 <= (b-a).magnitude and edg1 >= 0 then
  2636. a, b, c = a, b, c
  2637. elseif edg2 <= (c-b).magnitude and edg2 >= 0 then
  2638. a, b, c = b, c, a
  2639. elseif edg3 <= (a-c).magnitude and edg3 >= 0 then
  2640. a, b, c = c, a, b
  2641. else
  2642. assert(false, "unreachable")
  2643. end
  2644.  
  2645. local len1 = (c-a):Dot((b-a).unit)
  2646. local len2 = (b-a).magnitude - len1
  2647. local width = (a + (b-a).unit*len1 - c).magnitude
  2648.  
  2649. local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit)
  2650.  
  2651. local list = {}
  2652.  
  2653. if len1 > 0.01 then
  2654. local w1 = Instance.new('WedgePart', m)
  2655. w1.Name = "Triangle"
  2656. game:GetService("Debris"):AddItem(w1,5)
  2657. w1.Material = "SmoothPlastic"
  2658. w1.FormFactor = 'Custom'
  2659. w1.BrickColor = BrickColor.new("Teal")
  2660. w1.Transparency = 0
  2661. w1.Reflectance = 0
  2662. w1.Material = "SmoothPlastic"
  2663. w1.CanCollide = false
  2664. NoOutline(w1)
  2665. local sz = Vector3.new(0.2, width, len1)
  2666. w1.Size = sz
  2667. local sp = Instance.new("SpecialMesh",w1)
  2668. sp.MeshType = "Wedge"
  2669. sp.Scale = Vector3.new(0,1,1) * sz/w1.Size
  2670. w1:BreakJoints()
  2671. w1.Anchored = true
  2672. w1.Parent = workspace
  2673. w1.Transparency = 0.7
  2674. table.insert(Effects,{w1,"Disappear",.05})
  2675. w1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2)
  2676. table.insert(list,w1)
  2677. end
  2678.  
  2679. if len2 > 0.01 then
  2680. local w2 = Instance.new('WedgePart', m)
  2681. w2.Name = "Triangle"
  2682. game:GetService("Debris"):AddItem(w2,5)
  2683. w2.Material = "SmoothPlastic"
  2684. w2.FormFactor = 'Custom'
  2685. w2.BrickColor = BrickColor.new("Teal")
  2686. w2.Transparency = 0
  2687. w2.Reflectance = 0
  2688. w2.Material = "SmoothPlastic"
  2689. w2.CanCollide = false
  2690. NoOutline(w2)
  2691. local sz = Vector3.new(0.2, width, len2)
  2692. w2.Size = sz
  2693. local sp = Instance.new("SpecialMesh",w2)
  2694. sp.MeshType = "Wedge"
  2695. sp.Scale = Vector3.new(0,1,1) * sz/w2.Size
  2696. w2:BreakJoints()
  2697. w2.Anchored = true
  2698. w2.Parent = workspace
  2699. w2.Transparency = 0.7
  2700. table.insert(Effects,{w2,"Disappear",.05})
  2701. w2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2)
  2702. table.insert(list,w2)
  2703. end
  2704. return unpack(list)
  2705. end
  2706.  
  2707. function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,Type)
  2708. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(.2,.2,.2))
  2709. prt.Anchored=true
  2710. prt.CFrame=cframe
  2711. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  2712. game:GetService("Debris"):AddItem(prt,3)
  2713. if Type==1 or Type==nil then
  2714. table.insert(Effects,{prt,"Block1",delay,x3,y3,z3,msh})
  2715. elseif Type==2 then
  2716. table.insert(Effects,{prt,"Block2",delay,x3,y3,z3,msh})
  2717. end
  2718. end
  2719.  
  2720. function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  2721. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(.2,.2,.2))
  2722. prt.Anchored=true
  2723. prt.CFrame=cframe
  2724. local msh=mesh("SpecialMesh",prt,"Sphere","nil",vt(0,0,0),vt(x1,y1,z1))
  2725. game:GetService("Debris"):AddItem(prt,3)
  2726. table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
  2727. end
  2728.  
  2729. function MagicCircle2(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  2730. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(.2,.2,.2))
  2731. prt.Anchored=true
  2732. prt.CFrame=cframe
  2733. local msh=mesh("SpecialMesh",prt,"Sphere","nil",vt(0,0,0),vt(x1,y1,z1))
  2734. game:GetService("Debris"):AddItem(prt,3)
  2735. table.insert(Effects,{prt,"Cylinder2",delay,x3,y3,z3,msh})
  2736. end
  2737.  
  2738. function MagicRing(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  2739. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  2740. prt.Anchored=true
  2741. prt.CFrame=cframe*cf(x2,y2,z2)
  2742. local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(x1,y1,z1))
  2743. game:GetService("Debris"):AddItem(prt,3)
  2744. table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
  2745. end
  2746.  
  2747. function MagicCylinder(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  2748. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(.2,.2,.2))
  2749. prt.Anchored=true
  2750. prt.CFrame=cframe
  2751. local msh=mesh("CylinderMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  2752. game:GetService("Debris"):AddItem(prt,3)
  2753. table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
  2754. end
  2755.  
  2756. function MagicCylinder3(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  2757. local prt=part(3,Character,0,0,brickcolor,"Effect",vt(.2,.2,.2))
  2758. prt.Anchored=true
  2759. prt.CFrame=cframe
  2760. local msh=mesh("SpecialMesh",prt,"Head","nil",vt(0,0,0),vt(x1,y1,z1))
  2761. game:GetService("Debris"):AddItem(prt,3)
  2762. table.insert(Effects,{prt,"Cylinder2",delay,x3,y3,z3,msh})
  2763. end
  2764.  
  2765. function MagicHead(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  2766. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(.2,.2,.2))
  2767. prt.Anchored=true
  2768. prt.CFrame=cframe
  2769. local msh=mesh("SpecialMesh",prt,"Head","nil",vt(0,0,0),vt(x1,y1,z1))
  2770. game:GetService("Debris"):AddItem(prt,3)
  2771. table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
  2772. end
  2773.  
  2774. function ClangEffect(brickcolor,cframe,duration,decrease,size,power)
  2775. local prt=part(3,workspace,0,1,brickcolor,"Effect",vt(.2,.2,.2))
  2776. prt.Anchored=true
  2777. prt.CFrame=cframe
  2778. local msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(5,5,5))
  2779. game:GetService("Debris"):AddItem(prt,3)
  2780. table.insert(Effects,{prt,"CylinderClang",duration,decrease,size,power,prt.CFrame,nil})
  2781. end
  2782.  
  2783. function MagicWave(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  2784. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(.2,.2,.2))
  2785. prt.Anchored=true
  2786. prt.CFrame=cframe
  2787. local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=20329976",vt(0,0,0),vt(x1,y1,z1))
  2788. game:GetService("Debris"):AddItem(prt,3)
  2789. table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
  2790. end
  2791.  
  2792. --[[local BodGy=Instance.new("BodyGyro")
  2793. BodGy.maxTorque=Vector3.new(0,4e+005,0)
  2794. BodGy.P=2000
  2795. BodGy.D=100
  2796. BodGy.Name="SiegmundGyro"
  2797. CF=RootPart.CFrame
  2798. BodGy.Parent=RootPart
  2799. BodGy.cframe=CF]]
  2800.  
  2801. --[[Neck.C0=euler(0,0,0)*cf(0,3,0)*euler(0,.6,0)*euler(-.2,0,0)
  2802. RootJoint.C0=cf(0,-2,0)*euler(0,.6,0)
  2803. RW.C0=cf(4.5,1.5,0)*euler(-.4,0,.5)*euler(0,0,0)
  2804. RW.C1=cf(0,1.5,0)*euler(0,0,0)
  2805. LW.C0=cf(-4.5,1.5,0)*euler(.2,0,-.5)
  2806. LW.C1=cf(0,1.5,0)*euler(0,0,0)
  2807. RH.C0=cf(1.5,-3,0)*euler(0,-.6,0)*euler(0,0,.1)
  2808. RH.C1=cf(0,3,0)*euler(0,0,0)
  2809. LH.C0=cf(-1.5,-3,0)*euler(0,.6,0)*euler(.1,0,0)
  2810. LH.C1=cf(0,3,0)*euler(0,0,0)]]
  2811.  
  2812. --[[RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(3,0,0.5),.3)
  2813. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-1.2),.3)
  2814. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0.4,0,0),.3)
  2815. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-1)*euler(0,0,0),.3)
  2816. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(-1.2,1.57,0),.3)
  2817. LH.C0=clerp(LH.C0,cf(-1.1,-.5,-0.5)*euler(-0.2,-1.3,0),.3)]]
  2818. function StartAnim()
  2819. attack=true
  2820. --workspace.CurrentCamera.CameraSubject=Head
  2821. Neck.C0=necko*euler(-0.4,0,0)
  2822. RootJoint.C0=euler(.2,0,0)
  2823. RW.C0=cf(1.5,0.5,0)*euler(-.3,0,0.2)
  2824. RW.C1=cf(0,0.5,0)*euler(0,0,0)
  2825. LW.C0=cf(-1.5,0.5,0)*euler(-.3,0,-0.2)
  2826. LW.C1=cf(0,0.5,0)*euler(0,0,0)
  2827. RH.C0=cf(.5,-1,0)*euler(0.4,1.57,0)
  2828. LH.C0=cf(-.5,-1,0)*euler(-0.2,-1.57,0)
  2829. hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,10,Character)
  2830. while hitfloor==nil do
  2831. swait()
  2832. end
  2833. print("endderp")
  2834. so("http://roblox.com/asset/?id=157878578",Torso,1,0.8)
  2835. so("http://roblox.com/asset/?id=2760979",Torso,1,0.4)
  2836. MagicWave(BrickColor.new("Medium stone grey"),cf(Torso.Position)*cf(0,-1,0),1,1,1,1.5,1,1.5,0.05)
  2837. --MagniDamage(Torso,15,6,8,math.random(20,40),"Knockdown2",Torso,0,1,math.random(8,10),nil,nil,true)
  2838. for i=0,1,0.05 do
  2839. swait()
  2840. Neck.C0=clerp(Neck.C0,necko*euler(-.4,0,0),.3)
  2841. RootJoint.C0=clerp(RootJoint.C0,cf(0,1,0)*euler(0,0,0),.3)
  2842. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,1.2),.3)
  2843. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-1.2),.3)
  2844. RH.C0=clerp(RH.C0,cf(.5,-1,0)*euler(-1.2,1.57,0),.3)
  2845. LH.C0=clerp(LH.C0,cf(-.6,-.5,-0.5)*euler(-0.2,-1.3,0),.3)
  2846. end
  2847. attack=false
  2848. end
  2849. --[[RW.C0=cf(1.5,0.5,0)*euler(0,0,1.2)
  2850. LW.C0=cf(-1.5,0.5,0)*euler(0,0,-1.2)
  2851. Neck.C0=necko*euler(-.4,0,0)
  2852. RootJoint.C0=cf(0,1,0)*euler(0,0,0)
  2853. RH.C0=cf(1,-1,0)*euler(-1.2,1.57,0)
  2854. LH.C0=cf(-1.1,-.5,-0.5)*euler(-0.2,-1.3,0)]]
  2855.  
  2856. local BodGy=Instance.new("BodyGyro")
  2857. BodGy.maxTorque=Vector3.new(0,4e+005,0)
  2858. BodGy.P=2000
  2859. BodGy.D=100
  2860. BodGy.Name="SthomasGyro"
  2861. CF=RootPart.CFrame
  2862. BodGy.Parent=RootPart
  2863. BodGy.cframe=CF
  2864.  
  2865. wait()
  2866. print("Spanda spawned.")
  2867.  
  2868. function StunAnim()
  2869. attack=true
  2870. Stunned.Value=true
  2871. showDamage(Character,"Stunned","Interrupt")
  2872. local dec=Instance.new("NumberValue",Decrease)
  2873. dec.Name="DecreaseMvmt"
  2874. dec.Value=10
  2875. for i=0,1,0.3 do
  2876. swait()
  2877. Neck.C0=clerp(Neck.C0,necko*euler(-.2,.5,0),.2)
  2878. RootJoint.C0=clerp(RootJoint.C0,euler(-.2,3,0),.2)
  2879. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.2,0,1.3),.2)
  2880. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  2881. LW.C0=clerp(LW.C0,cf(-1.2,0.5,-.4)*euler(1,0,.4)*euler(0,-.1,0),.2)
  2882. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  2883. RH.C0=clerp(RH.C0,cf(.5,-.6,0)*euler(0,1.57,0)*euler(-.5,0,.3),.25)
  2884. LH.C0=clerp(LH.C0,cf(-.5,-.8,0)*euler(0,-1.57,0)*euler(-.2,0,0),.25)
  2885. end
  2886. for i=0,1,0.3 do
  2887. swait()
  2888. Neck.C0=clerp(Neck.C0,necko*euler(-.3,.5,0),.2)
  2889. RootJoint.C0=clerp(RootJoint.C0,cf(0,0,-.5)*euler(-.8,3,0),.2)
  2890. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.8,0,1.3),.2)
  2891. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  2892. LW.C0=clerp(LW.C0,cf(-1.2,0.5,-.4)*euler(1.2,0,.8)*euler(0,-.1,0),.2)
  2893. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  2894. RH.C0=clerp(RH.C0,cf(.5,-.6,0)*euler(0,1.57,0)*euler(-.5,0,.6),.25)
  2895. LH.C0=clerp(LH.C0,cf(-.5,-.8,0)*euler(0,-1.57,0)*euler(.1,0,.7),.25)
  2896. end
  2897. for i=0,1,0.3 do
  2898. swait()
  2899. Neck.C0=clerp(Neck.C0,necko*euler(-.3,-1,0),.2)
  2900. RootJoint.C0=clerp(RootJoint.C0,cf(0,0,-2)*euler(-1.57,3,0),.2)
  2901. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.8,0,1.3),.2)
  2902. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  2903. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.2,0,-.8)*euler(0,-.1,0),.2)
  2904. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  2905. RH.C0=clerp(RH.C0,cf(.5,-.6,0)*euler(0,1.57,0)*euler(-.2,0,.6),.25)
  2906. LH.C0=clerp(LH.C0,cf(-.5,-.8,0)*euler(0,-1.57,0)*euler(-.1,0,.3),.25)
  2907. end
  2908. local gairost=Instance.new("BodyGyro")
  2909. gairost.Parent=RootPart
  2910. gairost.maxTorque=Vector3.new(4e+005,0,4e+005)*math.huge
  2911. gairost.P=20e+003
  2912. gairost.cframe=cf(0,0,0)
  2913. for i=0,1,0.1 do
  2914. swait()
  2915. Neck.C0=clerp(Neck.C0,necko*euler(0,-1.57,0),.3)
  2916. RootJoint.C0=clerp(RootJoint.C0,cf(0,0,-2.5)*euler(-1.57,3.14,0),.3)
  2917. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-1.57,0,1.5)*euler(.2,0,0),.3)
  2918. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  2919. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.5,0,-1.57)*euler(0,0,0),.3)
  2920. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  2921. RH.C0=clerp(RH.C0,cf(.5,-1,0)*euler(0,1.57,0)*euler(-.3,.5,0),.3)
  2922. LH.C0=clerp(LH.C0,cf(-.5,-1,0)*euler(0,-1.57,0)*euler(-.1,.2,0),.3)
  2923. end
  2924. for i=1,200 do
  2925. swait()
  2926. gairost.cframe=RootPart.CFrame
  2927. end
  2928. for i=0,1,0.2 do
  2929. swait()
  2930. Stun.Value=0
  2931. gairost.cframe=RootPart.CFrame
  2932. Neck.C0=clerp(Neck.C0,necko*euler(0,.2,0),.3)
  2933. RootJoint.C0=clerp(RootJoint.C0,cf(0,0,-2)*euler(-1,4,0),.3)
  2934. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-1.57,0,1)*euler(.2,-1,0),.3)
  2935. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  2936. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.2,0,.2)*euler(0,0,0),.3)
  2937. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  2938. RH.C0=clerp(RH.C0,cf(.5,-1,0)*euler(0,1.57,0)*euler(-.3,.5,.4),.3)
  2939. LH.C0=clerp(LH.C0,cf(-.5,-1,-1)*euler(0,-1.57,0)*euler(-.1,.2,1),.3)
  2940. end
  2941. gairost.Parent=nil
  2942. dec.Parent=nil
  2943. Stun.Value=0
  2944. Stunned.Value=false
  2945. attack=false
  2946. for i=1,10 do
  2947. swait()
  2948. Stun.Value=0
  2949. end
  2950. end
  2951.  
  2952. function PunchSlam()
  2953. attack=true
  2954. for i=0,1,0.1 do
  2955. swait()
  2956. Neck.C0=clerp(Neck.C0,necko*euler(0,-.5,0)*euler(-.2,0,0),.3)
  2957. RootJoint.C0=clerp(RootJoint.C0,euler(0,-.5,0)*euler(.1,0,0)*cf(0,.2,0),.3)
  2958. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(.2,0,.8)*euler(0,0,0),.3)
  2959. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  2960. LW.C0=clerp(LW.C0,cf(-1.3,0.5,-.2)*euler(1.4,0,.5)*euler(0,0,0),.3)
  2961. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  2962. RH.C0=clerp(RH.C0,cf(.6,-.9,-.2)*euler(0,1.57,0)*euler(0,-.5,-.05),.3)
  2963. LH.C0=clerp(LH.C0,cf(-.6,-.8,-.2)*euler(0,-1.57,0)*euler(0,0,.4),.3)
  2964. end
  2965. Torso.Velocity=RootPart.CFrame.lookVector*move*3
  2966. so("169445092",LeftArm,1,1.2)
  2967. for i=0,1,0.1 do
  2968. swait()
  2969. MagniDamage(LeftArm,2,8,10,0,"Knockdown2",RootPart,.2,2,math.random(6,7),nil,nil)
  2970. --MagniDamage(LeftArm,2,6,8,0,"Normal",RootPart,.3,1,math.random(6,7),nil,nil)
  2971. Neck.C0=clerp(Neck.C0,necko*euler(0,.5,0)*euler(-.1,0,0),.3)
  2972. RootJoint.C0=clerp(RootJoint.C0,euler(0,.5,0)*euler(.2,0,0)*cf(0,.2,1),.3)
  2973. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.5,0,1)*euler(0,0,0),.3)
  2974. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  2975. --LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.7,0,.2)*euler(0,0,0),.3)
  2976. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  2977. RH.C0=clerp(RH.C0,cf(.6,-.9,-.2)*euler(0,1.57,0)*euler(0,.4,-.3),.3)
  2978. LH.C0=clerp(LH.C0,cf(-.6,-.9,-.2)*euler(0,-1.57,0)*euler(0,.5,0),.3)
  2979. if i<.3 then
  2980. LW.C0=clerp(LW.C0,cf(-1.3,0.5,-.2)*euler(1.7,0,-.2)*euler(0,0,0),.3)
  2981. else
  2982. LW.C0=clerp(LW.C0,cf(-1.2,0.5,-.2)*euler(1.7,0,.1)*euler(0,0,0),.3)
  2983. end
  2984. end
  2985. if RecentEnemy.Value~=nil then
  2986. Torso.Velocity=vt(0,0,0)
  2987. target,distance=findNearestTorso(Torso.Position)
  2988. if target~=nil then
  2989. BodGy.cframe=cf(Torso.Position,target.Position)
  2990. end
  2991. Torso.Velocity=RootPart.CFrame.lookVector*move*3
  2992. refd=part(3,workspace,0,1,BrickColor.new("White"),"Reference",vt())
  2993. refd.Anchored=true
  2994. game:GetService("Debris"):AddItem(refd,5)
  2995. so("169445092",RightArm,1,1.2)
  2996. for i=0,1,0.1 do
  2997. swait()
  2998. refd.CFrame=cf(posfloor)
  2999. MagniDamage(LeftArm,4,10,12,math.random(30,35),"Knockdown2",refd,.3,1,math.random(3,4),nil,nil)
  3000. Neck.C0=clerp(Neck.C0,necko*euler(0,-1.57,0),.3)
  3001. RootJoint.C0=clerp(RootJoint.C0,cf(0,0,.2)*euler(0,-1.57,0),.3)
  3002. if i<.6 then
  3003. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,1.57)*euler(0,3.14,0),.5)
  3004. else
  3005. 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)
  3006. end
  3007. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  3008. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-1.57)*euler(0,0,1),.3)
  3009. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  3010. RH.C0=clerp(RH.C0,cf(.5,-1,.2)*euler(0,1.57,0)*euler(.2,-1.57,0),.2)
  3011. LH.C0=clerp(LH.C0,cf(-.5,-1,-.2)*euler(0,-1.57,0)*euler(-.4,-1.57,0),.2)
  3012. end
  3013. refd.Parent=nil
  3014. --swait(100)
  3015. end
  3016. attack=false
  3017. end
  3018.  
  3019. function SweepCut()
  3020. attack=true
  3021. for i=0,1,0.1 do
  3022. swait()
  3023. Neck.C0=clerp(Neck.C0,necko*euler(0,1.3,0)*euler(-.5,0,0),.3)
  3024. RootJoint.C0=clerp(RootJoint.C0,euler(0,1.3,0)*euler(-.5,0,0)*cf(0,.4,0),.3)
  3025. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,.5)*euler(0,0,0),.3)
  3026. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  3027. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-1)*euler(0,0,0),.3)
  3028. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  3029. RH.C0=clerp(RH.C0,cf(.6,-.7,-.4)*euler(0,1.57,0)*euler(-.5,0,0),.3)
  3030. LH.C0=clerp(LH.C0,cf(-.3,-.4,-.7)*euler(0,-1.57,0)*euler(0,0,-.1)*euler(-.7,0,0),.3)
  3031. end
  3032. Torso.Velocity=RootPart.CFrame.lookVector*move*5
  3033. so("169445073",LeftLeg,1,1.2)
  3034. for i=0,1,0.1 do
  3035. swait()
  3036. MagniDamage(LeftLeg,2,7,9,0,"Knockdown2",RootPart,.2,2,math.random(6,7),nil,nil)
  3037. Neck.C0=clerp(Neck.C0,necko*euler(0,1,0)*euler(-.5,0,0),.3)
  3038. RootJoint.C0=clerp(RootJoint.C0,euler(0,1.3,0)*euler(-1,0,0)*cf(0,1.2,0),.3)
  3039. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(.8,0,.3)*euler(0,0,0),.3)
  3040. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  3041. LW.C0=clerp(LW.C0,cf(-1,0.5,-.5)*euler(1.5,0,1)*euler(0,0,0),.3)
  3042. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  3043. RH.C0=clerp(RH.C0,cf(.6,-.7,-.8)*euler(0,1.57,0)*euler(-.3,0,-1.2),.3)
  3044. LH.C0=clerp(LH.C0,cf(-.5,-.8,-.2)*euler(0,-1.57,0)*euler(0,0,-.1)*euler(-.5,0,0),.3)
  3045. end
  3046. Torso.Velocity=vt(0,0,0)
  3047. if RecentEnemy.Value~=nil then
  3048. target,distance=findNearestTorso(Torso.Position)
  3049. if target~=nil then
  3050. BodGy.cframe=cf(Torso.Position,target.Position)
  3051. end
  3052. Torso.Velocity=RootPart.CFrame.lookVector*move*3
  3053. refd=part(3,workspace,0,1,BrickColor.new("White"),"Reference",vt())
  3054. refd.Anchored=true
  3055. game:GetService("Debris"):AddItem(refd,5)
  3056. so("169445092",RightArm,1,1)
  3057. for i=0,1,0.2 do
  3058. swait()
  3059. refd.CFrame=cf(posfloor)
  3060. MagniDamage(RightArm,4,10,12,math.random(40,45),"Knockdown2",refd,.3,1,math.random(3,4),nil,nil)
  3061. --MagniDamage(LeftArm,4,6,8,math.random(30,35),"Knockdown2",refd,.5,1,math.random(3,4),nil,nil)
  3062. --[[Neck.C0=clerp(Neck.C0,necko*euler(0,-1.57,0),.3)
  3063. RootJoint.C0=clerp(RootJoint.C0,cf(0,0,.2)*euler(0,-1.57,0),.3)
  3064. if i<.6 then
  3065. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,1.57)*euler(0,3.14,0),.5)
  3066. else
  3067. 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)
  3068. end
  3069. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  3070. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-1.57)*euler(0,0,1),.3)
  3071. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  3072. RH.C0=clerp(RH.C0,cf(.5,-1,.2)*euler(0,1.57,0)*euler(.2,-1.57,0),.2)
  3073. LH.C0=clerp(LH.C0,cf(-.5,-1,-.2)*euler(0,-1.57,0)*euler(-.4,-1.57,0),.2)]]
  3074. Neck.C0=clerp(Neck.C0,necko*euler(0,.1,0)*euler(0,0,0),.4)
  3075. RootJoint.C0=clerp(RootJoint.C0,euler(0,-.5,0)*euler(0,0,0)*cf(0,.6,0),.4)
  3076. RW.C0=clerp(RW.C0,cf(1,0.5,-.5)*euler(1.8,0,-.8)*euler(0,0,0),.4)
  3077. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  3078. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.5,0,-.7)*euler(0,0,0),.4)
  3079. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  3080. RH.C0=clerp(RH.C0,cf(.5,-.5,0)*euler(0,1.57,0)*euler(-.2,0,0),.4)
  3081. LH.C0=clerp(LH.C0,cf(-.5,-.5,0)*euler(0,-1.57,0)*euler(-.2,0,0),.4)
  3082. end
  3083. for i=0,1,0.1 do
  3084. swait()
  3085. MagniDamage(RightArm,4,10,12,math.random(40,45),"Knockdown2",refd,.3,1,math.random(3,4),nil,nil)
  3086. Torso.Velocity=vt(0,60,0)
  3087. Neck.C0=clerp(Neck.C0,necko*euler(0,.1,0)*euler(0,0,0),.3)
  3088. RootJoint.C0=clerp(RootJoint.C0,euler(0,0,0)*euler(0,0,0)*cf(0,0,0),.3)
  3089. RootJoint.C1=RootJoint.C1*euler(0,.5,0)
  3090. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(2.5,0,-.2)*euler(0,0,0),.3)
  3091. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  3092. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.5,0,-1)*euler(0,0,0),.3)
  3093. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  3094. RH.C0=clerp(RH.C0,cf(.5,-.5,0)*euler(0,1.57,0)*euler(-.2,0,-.2),.3)
  3095. LH.C0=clerp(LH.C0,cf(-.5,-.5,0)*euler(0,-1.57,0)*euler(-.2,0,.2),.3)
  3096. end
  3097. refd.Parent=nil
  3098. RootJoint.C1=cf(0,0,0)
  3099. end
  3100. --swait(100)
  3101. attack=false
  3102. end
  3103.  
  3104. function MultiKick()
  3105. attack=true
  3106. for i=0,1,0.1 do
  3107. swait()
  3108. Neck.C0=clerp(Neck.C0,necko*euler(.1,.7,0)*euler(0,0,0),.3)
  3109. RootJoint.C0=clerp(RootJoint.C0,euler(.1,.8,0)*euler(0,0,0)*cf(0,.6,0),.3)
  3110. RW.C0=clerp(RW.C0,cf(1.3,0.4,.3)*euler(.4,0,.4)*euler(0,-.5,0),.3)
  3111. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  3112. LW.C0=clerp(LW.C0,cf(-1.3,0.5,-.2)*euler(1,0,.2)*euler(0,1,0),.3)
  3113. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  3114. RH.C0=clerp(RH.C0,cf(.7,-.7,-.5)*euler(0,1.57,0)*euler(0,-.3,-.6)*euler(.05,0,0),.3)
  3115. LH.C0=clerp(LH.C0,cf(-.6,-.6,-.8)*euler(0,-1.57,0)*euler(0,.2,-.4)*euler(.2,0,0),.3)
  3116. end
  3117. Look=RootPart.CFrame.lookVector*move*2
  3118. local n=8
  3119. for i=0,1,0.04 do
  3120. swait()
  3121. n=n+1
  3122. if n>=8 then
  3123. n=0
  3124. so("169445073",LeftLeg,1,1.2)
  3125. end
  3126. Torso.Velocity=Look
  3127. MagniDamage(LeftLeg,2,5,7,math.random(5,10),"Knockdown2",RootPart,.2,2,math.random(4,5),nil,nil)
  3128. Neck.C0=clerp(Neck.C0,necko*euler(-.1,0,0)*euler(0,0,0),.3)
  3129. RootJoint.C0=clerp(RootJoint.C0,euler(0,0,0)*euler(0,0,0)*cf(0,0,0),.3)
  3130. RootJoint.C1=RootJoint.C1*euler(0,.6,0)
  3131. RW.C0=clerp(RW.C0,cf(1,0.4,.5)*euler(1.2,0,.4)*euler(0,0,0),.3)
  3132. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  3133. LW.C0=clerp(LW.C0,cf(-1,0.4,.5)*euler(1.2,0,-.4)*euler(0,0,0),.3)
  3134. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  3135. RH.C0=clerp(RH.C0,cf(.7,-.5,-.7)*euler(0,1.57,0)*euler(0,-.3,-1)*euler(0,0,0),.3)
  3136. LH.C0=clerp(LH.C0,cf(-.6,-.6,-.5)*euler(0,-1.57,0)*euler(0,.2,-1.5)*euler(.2,0,0),.3)
  3137. end
  3138. if RecentEnemy.Value~=nil then
  3139. RecentEnemy.Value=nil
  3140. target,distance=findNearestTorso(Torso.Position)
  3141. if target~=nil then
  3142. RootPart.CFrame=cf(RootPart.Position,target.Position)
  3143. end
  3144. Look=RootPart.CFrame.lookVector*move
  3145. for i=0,1,0.04 do
  3146. swait()
  3147. n=n+1
  3148. if n>=8 then
  3149. n=0
  3150. so("169445073",LeftLeg,1,1.2)
  3151. end
  3152. Torso.Velocity=Look
  3153. MagniDamage(LeftLeg,2,5,7,math.random(5,10),"Knockdown2",RootPart,.2,2,math.random(4,5),nil,nil)
  3154. Neck.C0=clerp(Neck.C0,necko*euler(-.1,0,0)*euler(0,0,0),.3)
  3155. RootJoint.C0=clerp(RootJoint.C0,euler(0,0,0)*euler(0,0,0)*cf(0,0,0),.3)
  3156. RootJoint.C1=RootJoint.C1*euler(0,.6,0)
  3157. RW.C0=clerp(RW.C0,cf(1,0.4,.5)*euler(1.2,0,.4)*euler(0,0,0),.3)
  3158. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  3159. LW.C0=clerp(LW.C0,cf(-1,0.4,.5)*euler(1.2,0,-.4)*euler(0,0,0),.3)
  3160. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  3161. RH.C0=clerp(RH.C0,cf(.7,-.5,-.7)*euler(0,1.57,0)*euler(0,-.3,-1)*euler(0,0,0),.3)
  3162. LH.C0=clerp(LH.C0,cf(-.6,-.6,-.5)*euler(0,-1.57,0)*euler(0,.2,-1.5)*euler(.2,0,0),.3)
  3163. end
  3164. Torso.Velocity=vt(0,0,0)
  3165. end
  3166. RootJoint.C1=cf(0,0,0)
  3167. attack=false
  3168. end
  3169.  
  3170. function JumpKick()
  3171. attack=true
  3172. for i=0,1,0.1 do
  3173. swait()
  3174. Neck.C0=clerp(Neck.C0,necko*euler(-.4,0,0),.3)
  3175. RootJoint.C0=clerp(RootJoint.C0,cf(0,1,0)*euler(0,0,0),.3)
  3176. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,1.2),.3)
  3177. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-1.2),.3)
  3178. RH.C0=clerp(RH.C0,cf(.5,-1,0)*euler(-1.2,1.57,0),.3)
  3179. LH.C0=clerp(LH.C0,cf(-.6,-.5,-0.5)*euler(-0.2,-1.3,0),.3)
  3180. end
  3181. Torso.Velocity=vt(0,100,0)
  3182. jump=true
  3183. local dec=Instance.new("NumberValue",Decrease)
  3184. dec.Name="DecreaseMvmt"
  3185. dec.Value=-.4
  3186. for i=0,1,0.05 do
  3187. swait()
  3188. Neck.C0=clerp(Neck.C0,necko*euler(-.1,0,0)*euler(0,0,0),.2)
  3189. RootJoint.C0=clerp(RootJoint.C0,euler(0,0,0)*euler(0,0,0)*cf(0,4,-3),.2)
  3190. RootJoint.C1=RootJoint.C1*euler(-.32,0,0)
  3191. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.2,0,1)*euler(0,0,0),.2)
  3192. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  3193. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.2,0,-1)*euler(0,0,0),.2)
  3194. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  3195. RH.C0=clerp(RH.C0,cf(.7,-.5,-.7)*euler(0,1.57,0)*euler(0,-.3,-1)*euler(0,0,0),.2)
  3196. LH.C0=clerp(LH.C0,cf(-.6,-.6,-.5)*euler(0,-1.57,0)*euler(0,.2,-1.8)*euler(.2,0,0),.2)
  3197. end
  3198. while hitfloor==nil do
  3199. swait()
  3200. MagniDamage(LeftLeg,5,8,10,math.random(15,25),"Knockdown2",RootPart,.2,2,math.random(8,10),nil,nil)
  3201. MagniDamage(RightLeg,5,8,10,math.random(15,25),"Knockdown2",RootPart,.2,2,math.random(8,10),nil,nil)
  3202. end
  3203. jump=false
  3204. dec.Parent=nil
  3205. RootJoint.C1=cf(0,0,0)
  3206. attack=false
  3207. end
  3208.  
  3209. function EnergyBlam()
  3210. attack=true
  3211. for i=0,1,0.1 do
  3212. swait()
  3213. Neck.C0=clerp(Neck.C0,necko*euler(0,-1,0)*euler(-.2,0,0),.3)
  3214. RootJoint.C0=clerp(RootJoint.C0,euler(0,-1,0)*cf(0,.4,0),.3)
  3215. RW.C0=clerp(RW.C0,cf(1.3,0.5,-.2)*euler(1.4,0,-.5)*euler(0,0,0),.3)
  3216. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  3217. LW.C0=clerp(LW.C0,cf(-1.3,0.5,-.2)*euler(1.4,0,.5)*euler(0,0,0),.3)
  3218. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  3219. RH.C0=clerp(RH.C0,cf(.7,-.8,-.4)*euler(0,1.57,0)*euler(0,.5,-.1),.3)
  3220. LH.C0=clerp(LH.C0,cf(-.4,-.9,0)*euler(0,-1.57,0)*euler(0,-1,.2),.3)
  3221. end
  3222. so("2101137",Torso,1,1)
  3223. for i=0,1,0.05 do
  3224. swait()
  3225. MagicCircle(BrickColor.new("Really black"),Torso.CFrame*cf(0,0,-2),1,1,1,1,1,1,.1)
  3226. MagicCircle(BrickColor.new("White"),Torso.CFrame*cf(0,0,-2),1,1,1,.5,.5,.5,.1)
  3227. end
  3228. for i=0,1,0.1 do
  3229. swait()
  3230. MagicCircle(BrickColor.new("Really black"),Torso.CFrame*cf(0,.5,-2),1,1,1,1,1,1,.1)
  3231. MagicCircle(BrickColor.new("White"),Torso.CFrame*cf(0,.5,-2),1,1,1,.5,.5,.5,.1)
  3232. Neck.C0=clerp(Neck.C0,necko*euler(0,0,0)*euler(0,0,0),.3)
  3233. RootJoint.C0=clerp(RootJoint.C0,euler(0,0,0)*cf(0,.4,0),.3)
  3234. RW.C0=clerp(RW.C0,cf(1,0.5,-.5)*euler(1.5,0,-.5)*euler(0,0,0),.3)
  3235. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  3236. LW.C0=clerp(LW.C0,cf(-1,0.5,-.5)*euler(1.5,0,.5)*euler(0,0,0),.3)
  3237. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  3238. RH.C0=clerp(RH.C0,cf(.7,-.8,-.4)*euler(0,1.57,0)*euler(0,0,-.1),.3)
  3239. LH.C0=clerp(LH.C0,cf(-.4,-.9,0)*euler(0,-1.57,0)*euler(0,0,.2),.3)
  3240. end
  3241. ref=part(3,workspace,0,1,BrickColor.new("White"),"Reference",vt())
  3242. ref.Anchored=false
  3243. --ref.CFrame=cf(head.Position)
  3244. local rwld=weld(Torso,Torso,ref,cf(0,.5,-2.5))
  3245. game:GetService("Debris"):AddItem(ref,10)
  3246. ref2=part(3,workspace,0,1,BrickColor.new("White"),"Reference",vt())
  3247. ref2.Anchored=false
  3248. --ref.CFrame=cf(head.Position)
  3249. game:GetService("Debris"):AddItem(ref2,10)
  3250. local tehCF=nil
  3251. --[[target,distance=findNearestTorso(Torso.Position)
  3252. if target~=nil then]]
  3253. tehCF=cf(ref.Position,Mouse.Hit.p)
  3254. --end
  3255. nuh=5
  3256. for i=0,1,0.05 do
  3257. swait()
  3258. nuh=nuh+1
  3259. if nuh>=5 then
  3260. nuh=0
  3261. so("169380505",ref2,1,1.5)
  3262. end
  3263. --[[target,distance=findNearestTorso(Torso.Position)
  3264. if target~=nil then]]
  3265. hit,pos=rayCast(ref.Position,tehCF.lookVector,100,Character)
  3266. local mag=(ref.Position-pos).magnitude
  3267. 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)
  3268. MagicCircle2(BrickColor.new("White"),cf(pos),10,10,10,10,10,10,.1)
  3269. ref2.CFrame=cf(pos)
  3270. MagniDamage(ref2,10,12,16,0,"Normal",ref2,.2,1,math.random(2,4),nil,nil,true)
  3271. --end
  3272. end
  3273. ref.Parent=nil
  3274. ref2.Parent=nil
  3275. attack=false
  3276. end
  3277.  
  3278. function DecreaseStat(Model,Stat,Amount,Duration)
  3279. if Model:findFirstChild("Stats")~=nil then
  3280. if Model.Stats[Stat]~=nil then
  3281. Model.Stats[Stat].Value=Model.Stats[Stat].Value-Amount
  3282. d=Instance.new("NumberValue",Model.Stats.Decrease)
  3283. game:GetService("Debris"):AddItem(d,40)
  3284. if Stat=="Damage" then
  3285. d.Name="DecreaseAtk"
  3286. elseif Stat=="Defense" then
  3287. d.Name="DecreaseDef"
  3288. elseif Stat=="Movement" then
  3289. d.Name="DecreaseMvmt"
  3290. end
  3291. if Model:findFirstChild("Torso")~=nil then
  3292. display=""
  3293. if Stat=="Damage" then
  3294. if Amount>0 then
  3295. display="-Damage"
  3296. else
  3297. display="+Damage"
  3298. end
  3299. elseif Stat=="Defense" then
  3300. if Amount>0 then
  3301. display="-Defense"
  3302. else
  3303. display="+Defense"
  3304. end
  3305. elseif Stat=="Movement" then
  3306. if Amount>0 then
  3307. display="-Movement"
  3308. else
  3309. display="+Movement"
  3310. end
  3311. end
  3312. showDamage(Model,display,"Debuff")
  3313. end
  3314. d.Value=Amount
  3315. table.insert(Effects,{Model,"DecreaseStat",Stat,Amount,Duration,d})
  3316. end
  3317. end
  3318. end
  3319.  
  3320. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  3321. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  3322. end
  3323.  
  3324. --[[function findNearestTorso(pos)
  3325. local list = game.Workspace:children()
  3326. local torso = nil
  3327. local dist = 1000
  3328. local temp = nil
  3329. local human = nil
  3330. local temp2 = nil
  3331. for x = 1, #list do
  3332. temp2 = list[x]
  3333. if (temp2.className == "Model") and (temp2.Name~=bName) then
  3334. temp = temp2:findFirstChild("Torso")
  3335. human = temp2:findFirstChild("Humanoid")
  3336. if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  3337. if btarget.Value==nil then
  3338. if (temp.Position - pos).magnitude < dist then
  3339. local dohit=true
  3340. 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
  3341. if temp2:findFirstChild("Alive")==nil then dohit=false end
  3342. if dohit==true then
  3343. torso = temp
  3344. dist = (temp.Position - pos).magnitude
  3345. end
  3346. end
  3347. else
  3348. if btarget.Value.Parent~=nil then
  3349. if btarget.Value:findFirstChild("Torso")~=nil then
  3350. if btarget.Value:findFirstChild("Humanoid")~=nil then
  3351. if btarget.Value.Humanoid.Health<=0 then
  3352. btarget.Value=nil
  3353. end
  3354. end
  3355. if btarget.Value~=nil then
  3356. torso=btarget.Value.Torso
  3357. dist = (torso.Position - pos).magnitude
  3358. end
  3359. end
  3360. else
  3361. btarget.Value=nil
  3362. end
  3363. end
  3364. end
  3365. end
  3366. end
  3367. return torso,dist
  3368. end]]
  3369. findNearestTorso = function(pos)
  3370. local list = (game.Workspace:children())
  3371. local torso = nil
  3372. local dist = 1000
  3373. local temp, human, temp2 = nil, nil, nil
  3374. for x = 1, #list do
  3375. temp2 = list[x]
  3376. if temp2.className == "Model" and temp2.Name ~= Character.Name then
  3377. temp = temp2:findFirstChild("Torso")
  3378. human = temp2:findFirstChild("Humanoid")
  3379. if temp ~= nil and human ~= nil and human.Health > 0 and (temp.Position - pos).magnitude < dist then
  3380. local dohit = true
  3381. if dohit == true then
  3382. torso = temp
  3383. dist = (temp.Position - pos).magnitude
  3384. end
  3385. end
  3386. end
  3387. end
  3388. return torso, dist
  3389. end
  3390. function findRandomTorso(pos)
  3391. local list = game.Workspace:children()
  3392. local torso = nil
  3393. local dist = 1000
  3394. local temp = nil
  3395. local human = nil
  3396. local temp2 = nil
  3397. local list2 = {}
  3398. for x = 1, #list do
  3399. temp2 = list[x]
  3400. if (temp2.className == "Model") and (temp2.Name~="Vanta") then
  3401. temp = temp2:findFirstChild("Torso")
  3402. human = temp2:findFirstChild("Humanoid")
  3403. if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  3404. if pos.magnitude < dist then
  3405. torso = temp
  3406. table.insert(list2,temp)
  3407. end
  3408. end
  3409. end
  3410. end
  3411. if #list2>0 then
  3412. rand=math.random(1,#list2)
  3413. return list2[rand],dist
  3414. else
  3415. return nil,dist
  3416. end
  3417. end
  3418.  
  3419. Damagefunc=function(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,incstun,stagger,staghit,ranged,DecreaseState,DecreaseAmount,Duration,Sound)
  3420. if hit.Parent==nil then
  3421. return
  3422. end
  3423. h=hit.Parent:FindFirstChild("Humanoid")
  3424. for _,v in pairs(hit.Parent:children()) do
  3425. if v:IsA("Humanoid") then
  3426. h=v
  3427. end
  3428. end
  3429. if hit.Parent.Parent:FindFirstChild("Torso")~=nil then
  3430. h=hit.Parent.Parent:FindFirstChild("Humanoid")
  3431. end
  3432. if hit.Parent.className=="Hat" then
  3433. hit=hit.Parent.Parent:findFirstChild("Head")
  3434. end
  3435. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  3436. if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end
  3437. 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
  3438. RecentEnemy.Value=hit.Parent
  3439. game:GetService("Debris"):AddItem(c,.5)
  3440. minim=minim*Atk.Value
  3441. maxim=maxim*Atk.Value
  3442. Damage=0
  3443. if minim==maxim or minim>maxim then
  3444. Damage=maxim
  3445. else
  3446. Damage=math.random(minim,maxim)
  3447. end
  3448. blocked=false
  3449. enblock=nil
  3450. Stats=hit.Parent:findFirstChild("Stats")
  3451. if Stats~=nil then
  3452. enblock=Stats:findFirstChild("Block")
  3453. if enblock~=nil then
  3454. if enblock.Value==true then
  3455. blocked=true
  3456. end
  3457. end
  3458. if Stats:findFirstChild("Defense")~=nil then
  3459. Damage=Damage/(Stats.Defense.Value)
  3460. if Damage<=3 and (ranged==false or ranged==nil) and blocked~=true then
  3461. hitnum=math.random(1,3)
  3462. if hitnum==1 then so("169380525",hit,1,math.random(80,120)/100)
  3463. elseif hitnum==2 then so("169380538",hit,1,math.random(80,120)/100)
  3464. elseif hitnum==3 then so("169380528",hit,1,math.random(80,120)/100)
  3465. end
  3466. --[[if hitnum==1 then so("199149321",hit,1,1)
  3467. elseif hitnum==2 then so("199149338",hit,1,1)
  3468. elseif hitnum==3 then so("199149367",hit,1,1)
  3469. elseif hitnum==4 then so("199149409",hit,1,1)
  3470. elseif hitnum==5 then so("199149452",hit,1,1)
  3471. end]]
  3472. elseif ranged==false or ranged==nil and blocked~=true then
  3473. hitnum=math.random(1,3)
  3474. if hitnum==1 then so("169380525",hit,1,math.random(80,120)/100)
  3475. elseif hitnum==2 then so("169380538",hit,1,math.random(80,120)/100)
  3476. elseif hitnum==3 then so("169380528",hit,1,math.random(80,120)/100)
  3477. end
  3478. --[[if hitnum==1 then so("199149137",hit,1,1)
  3479. elseif hitnum==2 then so("199149186",hit,1,1)
  3480. elseif hitnum==3 then so("199149221",hit,1,1)
  3481. elseif hitnum==4 then so("199149235",hit,1,1)
  3482. elseif hitnum==5 then so("199149269",hit,1,1)
  3483. elseif hitnum==6 then so("199149297",hit,1,1)
  3484. end]]
  3485. end
  3486. end
  3487. if Stats:findFirstChild("Stun")~=nil then
  3488. if blocked==true then
  3489. incstun=math.floor(incstun/2)
  3490. end
  3491. Stats.Stun.Value=Stats.Stun.Value+incstun
  3492. end
  3493. if Stats:findFirstChild("Stagger")~=nil then
  3494. if stagger==true then
  3495. Stats.Stagger.Value=true
  3496. end
  3497. end
  3498. end
  3499. if blocked==true then
  3500. showDamage(hit.Parent,"Block","Damage")
  3501. hitnum=math.random(1,2)
  3502. if hitnum==1 then so("199148933",hit,1,1)
  3503. elseif hitnum==2 then so("199148947",hit,1,1)
  3504. end
  3505. enblock.Value=false
  3506. else
  3507. Damage=math.floor(Damage)
  3508. h.Health=h.Health-Damage
  3509. --[[coroutine.resume(coroutine.create(function(Hum,Dam)
  3510. damageFunc:InvokeServer(Hum,Dam)
  3511. end),h,Damage)]]
  3512. showDamage(hit.Parent,Damage,"Damage")
  3513. if DecreaseState~=nil then
  3514. if DecreaseState=="Shatter" then
  3515. DecreaseStat(hit.Parent,"Movement",DecreaseAmount,Duration)
  3516. DecreaseStat(hit.Parent,"Damage",DecreaseAmount,Duration)
  3517. else
  3518. DecreaseStat(hit.Parent,DecreaseState,DecreaseAmount,Duration)
  3519. end
  3520. end
  3521. if Type=="Knockdown" then
  3522. hum=hit.Parent.Humanoid
  3523. hum.PlatformStand=true
  3524. coroutine.resume(coroutine.create(function(HHumanoid)
  3525. swait(1)
  3526. HHumanoid.PlatformStand=false
  3527. end),hum)
  3528. local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
  3529. --hit.CFrame=cf(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
  3530. local bodvol=Instance.new("BodyVelocity")
  3531. bodvol.velocity=angle*knockback
  3532. bodvol.P=5000
  3533. bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  3534. bodvol.Parent=hit
  3535. rl=Instance.new("BodyAngularVelocity")
  3536. rl.P=3000
  3537. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  3538. rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  3539. rl.Parent=hit
  3540. game:GetService("Debris"):AddItem(bodvol,.5)
  3541. game:GetService("Debris"):AddItem(rl,.5)
  3542. elseif Type=="Shatter" then
  3543. for i=1,10 do
  3544. BreakEffect(BrickColor.new("Cyan"),hit.CFrame,math.random(20,80)/100,math.random(2,10),math.random(20,80)/100)
  3545. end
  3546. elseif Type=="Knockdown2" then
  3547. hum=hit.Parent.Humanoid
  3548. local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
  3549. local bodvol=Instance.new("BodyVelocity")
  3550. bodvol.velocity=angle*knockback
  3551. bodvol.P=5000
  3552. bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  3553. bodvol.Parent=hit
  3554. game:GetService("Debris"):AddItem(bodvol,.5)
  3555. elseif Type=="Normal" then
  3556. vp=Instance.new("BodyVelocity")
  3557. vp.P=500
  3558. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  3559. if KnockbackType==1 then
  3560. vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05
  3561. elseif KnockbackType==2 then
  3562. vp.velocity=Property.CFrame.lookVector*knockback
  3563. end
  3564. game:GetService("Debris"):AddItem(vp,.5)
  3565. if knockback>0 then
  3566. vp.Parent=hit.Parent.Torso
  3567. end
  3568. end
  3569. end
  3570. debounce=Instance.new("BoolValue")
  3571. debounce.Name="DebounceHit"
  3572. debounce.Parent=hit.Parent
  3573. debounce.Value=true
  3574. game:GetService("Debris"):AddItem(debounce,Delay)
  3575. CRIT=false
  3576. end
  3577. end
  3578.  
  3579. showDamage=function(Char,Dealt,Type)
  3580. m=Instance.new("Model")
  3581. m.Name="Effect"
  3582. c=Instance.new("Part")
  3583. c.Transparency=1
  3584. c.Name="Head"
  3585. c.TopSurface=0
  3586. c.BottomSurface=0
  3587. c.formFactor="Plate"
  3588. c.Size=Vector3.new(1,.4,1)
  3589. b=Instance.new("BillboardGui",c)
  3590. b.Size=UDim2.new(5,0,5,0)
  3591. b.AlwaysOnTop=true
  3592. damgui=gui("TextLabel",b,tostring(Dealt),1,Color3.new(0,0,0),UDim2.new(0,0,0,0),UDim2.new(1,0,1,0))
  3593. if Type=="Damage" then
  3594. damgui.Font="SourceSans"
  3595. if Dealt=="Block" then
  3596. damgui.TextColor3=BrickColor.new("Really black").Color
  3597. elseif Dealt<3 then
  3598. damgui.TextColor3=BrickColor.new("White").Color
  3599. elseif Dealt>=3 and Dealt<20 then
  3600. damgui.TextColor3=BrickColor.new("Black").Color
  3601. else
  3602. damgui.TextColor3=BrickColor.new("White").Color
  3603. damgui.Font="SourceSansBold"
  3604. end
  3605. elseif Type=="Debuff" then
  3606. damgui.TextColor3=BrickColor.new("White").Color
  3607. elseif Type=="Interrupt" then
  3608. damgui.TextColor3=BrickColor.new("Black").Color
  3609. end
  3610. --damgui.FontSize="Size48"
  3611. damgui.TextScaled=true
  3612. ms=Instance.new("CylinderMesh")
  3613. ms.Scale=Vector3.new(1,1,1)
  3614. ms.Parent=c
  3615. c.Reflectance=0
  3616. Instance.new("BodyGyro").Parent=c
  3617. c.Parent=m
  3618. if Char:findFirstChild("Head")~=nil then
  3619. c.CFrame=cf(Char["Head"].CFrame.p+Vector3.new(math.random(-100,100)/100,3,math.random(-100,100)/100))
  3620. elseif Char.Parent:findFirstChild("Head")~=nil then
  3621. c.CFrame=cf(Char.Parent["Head"].CFrame.p+Vector3.new(math.random(-100,100)/100,3,math.random(-100,100)/100))
  3622. end
  3623. f=Instance.new("BodyPosition")
  3624. f.P=2000
  3625. f.D=100
  3626. f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  3627. if Type=="Damage" then
  3628. f.position=c.Position+Vector3.new(0,3,0)
  3629. elseif Type=="Debuff" or Type=="Interrupt" then
  3630. f.position=c.Position+Vector3.new(0,5,0)
  3631. end
  3632. f.Parent=c
  3633. game:GetService("Debris"):AddItem(m,5)
  3634. table.insert(Effects,{m,"showDamage",damgui,f,10,1,15,50,100})
  3635. c.CanCollide=false
  3636. m.Parent=workspace
  3637. c.CanCollide=false
  3638. end
  3639.  
  3640. function MagniDamage(Part,magni,minim,maxim,knockback,Type,Property,Delay,KnockbackType,incstun,stagger,staghit,ranged,DecreaseState,DecreaseAmount,Duration)
  3641. for _,c in pairs(workspace:children()) do
  3642. local hum=c:findFirstChild("Humanoid")
  3643. if hum~=nil then
  3644. local head=nil
  3645. for _,d in pairs(c:children()) do
  3646. --if d.Name=="Torso" or d.Name=="Head" or d.Name=="HumanoidRootPart" or d.Name=="HitPart" then
  3647. --[[if d.className=="Model" and ranged~=true then
  3648. head=d:findFirstChild("Hitbox")
  3649. if d.Parent==Character then break end
  3650. if head~=nil then
  3651. local targ=head.Position-Part.Position
  3652. local mag=targ.magnitude
  3653. if mag<=magni then
  3654. ref=part(3,workspace,0,1,BrickColor.new("White"),"Reference",vt())
  3655. ref.Anchored=true
  3656. ref.CFrame=cf(head.Position)
  3657. game:GetService("Debris"):AddItem(ref,1)
  3658. hitnum=math.random(1,5)
  3659. if hitnum==1 then so("199148971",ref,1,1)
  3660. elseif hitnum==2 then so("199149025",ref,1,1)
  3661. elseif hitnum==3 then so("199149072",ref,1,1)
  3662. elseif hitnum==4 then so("199149109",ref,1,1)
  3663. elseif hitnum==5 then so("199149119",ref,1,1)
  3664. end
  3665. StaggerHit.Value=true
  3666. end
  3667. end
  3668. end]]
  3669. if d.className=="Part" then
  3670. head=d
  3671. if head~=nil then
  3672. local targ=head.Position-Part.Position
  3673. local mag=targ.magnitude
  3674. if mag<=magni and c.Name~=Character then
  3675. if stun==nil then
  3676. stun=math.random(5,10)
  3677. end
  3678. local Rang=nil
  3679. if Ranged==false then
  3680. Rang=true
  3681. end
  3682. local stag=nil
  3683. if shbash==true then
  3684. stag=true
  3685. end
  3686. Damagefunc(head,minim,maxim,knockback,Type,Property,Delay,KnockbackType,incstun,stagger,staghit,ranged,DecreaseState,DecreaseAmount,Duration)
  3687. --Damagefunc(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,incstun,stagger,staghit,DecreaseState,DecreaseAmount,Duration)
  3688. end
  3689. end
  3690. end
  3691. end
  3692. end
  3693. end
  3694. end
  3695. local hold = false
  3696. function onKeyDown(key)
  3697. if attack==false then
  3698. if key=="z" then
  3699. PunchSlam()
  3700. elseif key=="x" then
  3701. SweepCut()
  3702. elseif key=="c" then
  3703. MultiKick()
  3704. elseif key=="v" then
  3705. JumpKick()
  3706. elseif key == "b" then
  3707. EnergyBlam()
  3708. --[[elseif key == "n" then
  3709. GrandeurDash()
  3710. elseif key == "m" then
  3711. DeathImpact()
  3712. elseif key == "f" then
  3713. Jump()]]
  3714. elseif key=="0" and hold == false then
  3715. hold = true
  3716. run.Parent=Decrease
  3717. end
  3718. end
  3719. end
  3720. function onKeyUp(key)
  3721. if attack==false then
  3722. if key=="0" and hold == true then
  3723. hold = false
  3724. run.Parent=nil
  3725. end
  3726. end
  3727. end
  3728. Mouse.KeyDown:connect(onKeyDown)
  3729. Mouse.KeyUp:connect(onKeyUp)
  3730. local stunnum=0
  3731. local animnum=0
  3732. local idle=1
  3733. local animlimit=5
  3734. local target,distance=nil,nil
  3735. local attacking=false
  3736. local stunanim=false
  3737. while Humanoid.Health>0 do
  3738. swait()
  3739. --[[print(target)
  3740. print(distance)]]
  3741. hitbox2.Parent=hitbox.Parent
  3742. hitbox2.Size=hitbox.Size
  3743. hitbox2.CFrame=hitboxCF
  3744. --[[for _,c in pairs(Character:children()) do
  3745. for _,v in pairs(c:children()) do
  3746. if v.className=="BodyGyro" or v.className=="BodyPosition" or v.className=="BodyVelocity" or v.className=="BodyAngularVelocity" then
  3747. if v.Name~="SiegmundGyro" and v.Name~="SiegmundPos" then
  3748. print("dai")
  3749. v.Parent=nil
  3750. end
  3751. end
  3752. end
  3753. end]]
  3754. coroutine.resume(coroutine.create(function()
  3755. if start==false then
  3756. start=true
  3757. StartAnim()
  3758. end
  3759. end))
  3760. if attack==false then
  3761. BodGy.cframe=cf(Torso.Position,Mouse.Hit.p)
  3762. end
  3763. target,distance=findNearestTorso(Torso.Position)
  3764. --[[if target~=nil then
  3765. if attack==false then
  3766. BodGy.cframe=cf(Torso.Position,target.Position)
  3767. end
  3768. numb1=RootPart.Position.y
  3769. numb2=target.Position.y
  3770. if numb2-numb1>=5 or numb2-numb1<=-5 then
  3771. if distance<=30 then
  3772. if attack==false then
  3773. attackrand=math.random(1,20)
  3774. if attackrand==1 then
  3775. coroutine.resume(coroutine.create(function()
  3776. RecentEnemy.Value=nil
  3777. JumpKick()
  3778. end))
  3779. end
  3780. end
  3781. end
  3782. end
  3783. if distance>30 then --far range
  3784. Humanoid:MoveTo(target.Position)
  3785. run.Parent=Decrease
  3786. if attack==false then
  3787. attackrand=math.random(1,70)
  3788. if attackrand==1 then
  3789. coroutine.resume(coroutine.create(function()
  3790. RecentEnemy.Value=nil
  3791. EnergyBlam()
  3792. --[[d=math.random(1,3)
  3793. if d==1 then
  3794. PunchSlam()
  3795. elseif d==2 then
  3796. SweepCut()
  3797. elseif d==3 then
  3798. MultiKick()
  3799. end
  3800. end))
  3801. --[[coroutine.resume(coroutine.create(function()
  3802. buffdef.Parent=Decrease
  3803. atk=0
  3804. if stompcooldown<=0 then
  3805. atk=3
  3806. else
  3807. atk=math.random(1,2)
  3808. end
  3809. if atk==1 then
  3810. Jump()
  3811. elseif atk==2 then
  3812. GrandeurDash()
  3813. elseif atk==3 then
  3814. DeathImpact()
  3815. end
  3816. buffdef.Parent=nil
  3817. end))
  3818. end
  3819. end
  3820. elseif distance<=30 and distance>=5 then --mid range
  3821. move=distance*3
  3822. Humanoid:MoveTo(target.Position)
  3823. run.Parent=nil
  3824. if attack==false then
  3825. attackrand=math.random(1,20)
  3826. if attackrand==1 then
  3827. coroutine.resume(coroutine.create(function()
  3828. RecentEnemy.Value=nil
  3829. d=math.random(1,3)
  3830. if d==1 then
  3831. PunchSlam()
  3832. elseif d==2 then
  3833. SweepCut()
  3834. elseif d==3 then
  3835. MultiKick()
  3836. end
  3837. end))
  3838. --[[coroutine.resume(coroutine.create(function()
  3839. buffdef.Parent=Decrease
  3840. atk=0
  3841. if stompcooldown<=0 then
  3842. atk=3
  3843. else
  3844. atk=math.random(1,2)
  3845. end
  3846. if atk==1 then
  3847. HeavySlam()
  3848. elseif atk==2 then
  3849. GrandeurDash()
  3850. elseif atk==3 then
  3851. DeathImpact()
  3852. end
  3853. buffdef.Parent=nil
  3854. end))
  3855. end
  3856. end
  3857. else --close range
  3858. move=10
  3859. Humanoid:MoveTo(RootPart.Position)
  3860. run.Parent=nil
  3861. --run.Parent=nil
  3862. if attack==false then
  3863. attackrand=math.random(1,20)
  3864. if attackrand==1 then
  3865. coroutine.resume(coroutine.create(function()
  3866. RecentEnemy.Value=nil
  3867. d=math.random(1,3)
  3868. if d==1 then
  3869. PunchSlam()
  3870. elseif d==2 then
  3871. SweepCut()
  3872. elseif d==3 then
  3873. MultiKick()
  3874. end
  3875. end))
  3876. --[[coroutine.resume(coroutine.create(function()
  3877. buffdef.Parent=Decrease
  3878. HeavyCombo("Stun")
  3879. buffdef.Parent=nil
  3880. end))
  3881. end
  3882. end
  3883. end
  3884. end]]
  3885. if Mvmt.Value<0 or Stun.Value>=100 or attack==true then
  3886. Humanoid.WalkSpeed=0
  3887. if jump==true then
  3888. Humanoid.WalkSpeed=16*Mvmt.Value
  3889. end
  3890. else
  3891. Humanoid.WalkSpeed=16*Mvmt.Value
  3892. end
  3893. if Stun.Value>=100 and stunanim==false then
  3894. coroutine.resume(coroutine.create(function()
  3895. stunanim=true
  3896. while attack==true do
  3897. swait()
  3898. end
  3899. StunAnim()
  3900. Stun.Value=0
  3901. stunanim=false
  3902. end))
  3903. end
  3904. local stunnum2=80
  3905. if stunnum>=stunnum2 then
  3906. if Stun.Value>0 then
  3907. Stun.Value=Stun.Value-1
  3908. end
  3909. stunnum=0
  3910. end
  3911. stunnum=stunnum+1
  3912. local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
  3913. local velderp=RootPart.Velocity.y
  3914. hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,10,Character)
  3915. for _,c in pairs(Decrease:children()) do
  3916. if c:findFirstChild("Duration")~=nil then
  3917. c.Duration.Value=c.Duration.Value-1
  3918. if c.Duration.Value<=0 then
  3919. c.Parent=nil
  3920. end
  3921. end
  3922. if c.Name=="DecreaseAtk" then
  3923. decreaseatk=decreaseatk+c.Value
  3924. elseif c.Name=="DecreaseDef" then
  3925. decreasedef=decreasedef+c.Value
  3926. elseif c.Name=="DecreaseMvmt" then
  3927. decreasemvmt=decreasemvmt+c.Value
  3928. end
  3929. end
  3930. Atk.Value=1-decreaseatk
  3931. if Atk.Value<=0 then
  3932. Atk.Value=0
  3933. end
  3934. Def.Value=1-decreasedef
  3935. if Def.Value<=0 then
  3936. Def.Value=0.01
  3937. end
  3938. Mvmt.Value=1-decreasemvmt
  3939. if Mvmt.Value<=0 then
  3940. Mvmt.Value=0
  3941. end
  3942. decreaseatk=0
  3943. decreasedef=0
  3944. decreasemvmt=0
  3945. AtkVal=Atk.Value*100
  3946. AtkVal=math.floor(AtkVal)
  3947. AtkVal=AtkVal/100
  3948. DefVal=Def.Value*100
  3949. DefVal=math.floor(DefVal)
  3950. DefVal=DefVal/100
  3951. MvmtVal=Mvmt.Value*100
  3952. MvmtVal=math.floor(MvmtVal)
  3953. MvmtVal=MvmtVal/100
  3954. if MvmtVal<=0 then
  3955. MvmtVal=0
  3956. end
  3957. animnum=animnum+1
  3958. if animnum>=animlimit*5 then
  3959. idle=1
  3960. animnum=0
  3961. elseif animnum>=animlimit*4 then
  3962. idle=1
  3963. animnum=0
  3964. elseif animnum>=animlimit*3 then
  3965. idle=4
  3966. elseif animnum>=animlimit*2 then
  3967. idle=3
  3968. elseif animnum>=animlimit*1 then
  3969. idle=2
  3970. end
  3971. if RootPart.Velocity.y > 1 and hitfloor==nil then
  3972. Anim="Jump"
  3973. if attack==false then
  3974. Neck.C0=clerp(Neck.C0,necko*euler(.1,0,0),.3)
  3975. RootJoint.C0=clerp(RootJoint.C0,euler(-.1,0,0),.3)
  3976. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.5,0,1),.3)
  3977. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  3978. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.5,0,-1),.3)
  3979. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  3980. RH.C0=clerp(RH.C0,cf(.5,-1,-.3)*euler(-0.5,1.57,0)*euler(-.2,0,0),.2)
  3981. LH.C0=clerp(LH.C0,cf(-.5,-1,-.3)*euler(-0.5,-1.57,0)*euler(-.2,0,0),.2)
  3982. end
  3983. elseif RootPart.Velocity.y < -1 and hitfloor==nil then
  3984. Anim="Fall"
  3985. if attack==false then
  3986. Neck.C0=clerp(Neck.C0,necko*euler(-.4,0,0),.3)
  3987. RootJoint.C0=clerp(RootJoint.C0,euler(.2,0,0),.3)
  3988. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.3,0,0.2),.3)
  3989. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  3990. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.3,0,-0.2),.3)
  3991. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  3992. RH.C0=clerp(RH.C0,cf(.5,-1,0)*euler(0.4,1.57,0),.2)
  3993. LH.C0=clerp(LH.C0,cf(-.5,-1,0)*euler(-0.2,-1.57,0),.2)
  3994. end
  3995. elseif torvel<1 and hitfloor~=nil then
  3996. Anim="Idle"
  3997. animlimit=15
  3998. if attack==false then
  3999. if idle==1 or idle==2 then
  4000. Neck.C0=clerp(Neck.C0,necko*euler(0,.5,0)*euler(0,0,0),.1)
  4001. RootJoint.C0=clerp(RootJoint.C0,euler(0,.5,0)*cf(0,.4,0),.1)
  4002. RW.C0=clerp(RW.C0,cf(1.3,0.4,.3)*euler(1,0,.2)*euler(0,-.5,0),.1)
  4003. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.1)
  4004. LW.C0=clerp(LW.C0,cf(-1.3,0.5,-.2)*euler(1.4,0,.5)*euler(0,1,0),.1)
  4005. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.1)
  4006. RH.C0=clerp(RH.C0,cf(.6,-.9,0)*euler(0,1.57,0)*euler(0,-.1,-.05),.1)
  4007. LH.C0=clerp(LH.C0,cf(-.7,-.8,-.4)*euler(0,-1.57,0)*euler(0,.5,.1),.1)
  4008. else
  4009. Neck.C0=clerp(Neck.C0,necko*euler(.1,.5,0)*euler(0,0,0),.1)
  4010. RootJoint.C0=clerp(RootJoint.C0,euler(.1,.5,0)*euler(0,0,0)*cf(0,.6,0),.1)
  4011. RW.C0=clerp(RW.C0,cf(1.3,0.4,.3)*euler(.8,0,.4)*euler(0,-.5,0),.1)
  4012. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.1)
  4013. LW.C0=clerp(LW.C0,cf(-1.3,0.5,-.2)*euler(1.6,0,.2)*euler(0,1,0),.1)
  4014. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.1)
  4015. RH.C0=clerp(RH.C0,cf(.7,-.7,-.5)*euler(0,1.57,0)*euler(0,-.1,-.2)*euler(.05,0,0),.1)
  4016. LH.C0=clerp(LH.C0,cf(-.6,-.6,-.8)*euler(0,-1.57,0)*euler(0,.5,.2)*euler(-.1,0,0),.1)
  4017. end
  4018. end
  4019. elseif torvel>2 and torvel<20 and hitfloor~=nil then
  4020. Anim="Walk"
  4021. animlimit=10
  4022. if attack==false then
  4023. if idle==1 or idle==2 then
  4024. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.1)
  4025. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-1.4,0,-.1)*euler(0,0,0),.1)
  4026. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.1)
  4027. RH.C0=clerp(RH.C0,cf(.5,-1,0)*euler(0,1.57,0)*euler(0,0,-.5),.1)
  4028. if idle==1 then
  4029. Neck.C0=clerp(Neck.C0,necko*euler(.05,0,0)*euler(0,0,0),.1)
  4030. RootJoint.C0=clerp(RootJoint.C0,euler(0,0,0)*cf(0,.1,0),.1)
  4031. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1,0,0)*euler(0,0,0),.1)
  4032. LH.C0=clerp(LH.C0,cf(-.5,-1,0)*euler(0,-1.57,0)*euler(0,0,-1.2),.1)
  4033. elseif idle==2 then
  4034. Neck.C0=clerp(Neck.C0,necko*euler(0,0,0)*euler(0,0,0),.1)
  4035. RootJoint.C0=clerp(RootJoint.C0,euler(.2,0,0)*cf(0,.2,0),.1)
  4036. RW.C0=clerp(RW.C0,cf(1.3,0.5,-.5)*euler(1.2,0,-.5)*euler(0,0,0),.1)
  4037. LH.C0=clerp(LH.C0,cf(-.5,-.9,-.3)*euler(0,-1.57,0)*euler(0,0,0),.1)
  4038. end
  4039. else
  4040. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-1.4,0,.1)*euler(0,0,0),.1)
  4041. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.1)
  4042. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.1)
  4043. LH.C0=clerp(LH.C0,cf(-.5,-1,0)*euler(0,-1.57,0)*euler(0,0,.5),.1)
  4044. if idle==3 then
  4045. Neck.C0=clerp(Neck.C0,necko*euler(.05,0,0)*euler(0,0,0),.1)
  4046. RootJoint.C0=clerp(RootJoint.C0,euler(0,0,0)*cf(0,.1,0),.1)
  4047. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1,0,0)*euler(0,0,0),.1)
  4048. RH.C0=clerp(RH.C0,cf(.5,-1,0)*euler(0,1.57,0)*euler(0,0,1.2),.1)
  4049. elseif idle==4 then
  4050. Neck.C0=clerp(Neck.C0,necko*euler(0,0,0)*euler(0,0,0),.1)
  4051. RootJoint.C0=clerp(RootJoint.C0,euler(.2,0,0)*cf(0,.2,0),.1)
  4052. LW.C0=clerp(LW.C0,cf(-1.3,0.5,-.5)*euler(1.2,0,.5)*euler(0,0,0),.1)
  4053. RH.C0=clerp(RH.C0,cf(.5,-.9,-.3)*euler(0,1.57,0)*euler(0,0,0),.1)
  4054. end
  4055. end
  4056. end
  4057. elseif torvel>=20 and hitfloor~=nil then
  4058. Anim="Run"
  4059. animlimit=10
  4060. if attack==false then
  4061. if idle==1 or idle==2 then
  4062. Neck.C0=clerp(Neck.C0,necko*euler(.2,0,0)*euler(0,0,0),.2)
  4063. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  4064. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  4065. RH.C0=clerp(RH.C0,cf(.5,-1,0)*euler(0,1.57,0)*euler(-.2,0,-.8),.2)
  4066. if idle==1 then
  4067. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-1,0,.5)*euler(0,0,0),.2)
  4068. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-1,0,-.5)*euler(0,0,0),.2)
  4069. RootJoint.C0=clerp(RootJoint.C0,euler(.4,0,0)*cf(0,.3,0),.2)
  4070. LH.C0=clerp(LH.C0,cf(-.5,-1,0)*euler(0,-1.57,0)*euler(0,0,-1.5),.2)
  4071. elseif idle==2 then
  4072. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-1.2,0,.3)*euler(0,0,0),.2)
  4073. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-1.2,0,-.3)*euler(0,0,0),.2)
  4074. RootJoint.C0=clerp(RootJoint.C0,euler(.5,0,0)*cf(0,.4,0),.1)
  4075. LH.C0=clerp(LH.C0,cf(-.5,-.6,-.5)*euler(0,-1.57,0)*euler(0,0,-.5),.1)
  4076. end
  4077. else
  4078. Neck.C0=clerp(Neck.C0,necko*euler(.2,0,0)*euler(0,0,0),.2)
  4079. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  4080. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  4081. LH.C0=clerp(LH.C0,cf(-.5,-1,0)*euler(0,-1.57,0)*euler(-.2,0,.8),.2)
  4082. if idle==3 then
  4083. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-1,0,.5)*euler(0,0,0),.2)
  4084. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-1,0,-.5)*euler(0,0,0),.2)
  4085. RootJoint.C0=clerp(RootJoint.C0,euler(.4,0,0)*cf(0,.3,0),.2)
  4086. RH.C0=clerp(RH.C0,cf(.5,-1,0)*euler(0,1.57,0)*euler(0,0,1.5),.2)
  4087. elseif idle==4 then
  4088. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-1.2,0,.3)*euler(0,0,0),.2)
  4089. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-1.2,0,-.3)*euler(0,0,0),.2)
  4090. RootJoint.C0=clerp(RootJoint.C0,euler(.5,0,0)*cf(0,.4,0),.1)
  4091. RH.C0=clerp(RH.C0,cf(.5,-.6,-.5)*euler(0,1.57,0)*euler(0,0,.5),.1)
  4092. end
  4093. end
  4094. end
  4095. end
  4096. if #Effects>0 then
  4097. --table.insert(Effects,{prt,"Block1",delay})
  4098. for e=1,#Effects do
  4099. if Effects[e]~=nil then
  4100. --for j=1,#Effects[e] do
  4101. local Thing=Effects[e]
  4102. if Thing~=nil then
  4103. local Part=Thing[1]
  4104. local Mode=Thing[2]
  4105. local Delay=Thing[3]
  4106. local IncX=Thing[4]
  4107. local IncY=Thing[5]
  4108. local IncZ=Thing[6]
  4109. if Thing[2]=="DecreaseStat" then
  4110. --table.insert(Effects,{Model,"DecreaseStat",Stat,Amount,Duration,d})
  4111. Thing[5]=Thing[5]-1
  4112. if Thing[5]<=0 then
  4113. if Thing[1]:findFirstChild("Stats")~=nil then
  4114. if Thing[1].Stats:findFirstChild("Decrease")~=nil then
  4115. --Thing[1].Stats[Thing[3]].Value=Thing[1].Stats[Thing[3]].Value+Thing[4]
  4116. end
  4117. end
  4118. Thing[6].Parent=nil
  4119. table.remove(Effects,e)
  4120. end
  4121. end
  4122. if Thing[2]=="CylinderClang" then
  4123. if Thing[3]<=1 then
  4124. Thing[1].CFrame=Thing[1].CFrame*CFrame.new(0,2.5*Thing[5],0)*CFrame.fromEulerAnglesXYZ(Thing[6],0,0)
  4125. Thing[7]=Thing[1].CFrame
  4126. effect("New Yeller",0,Thing[8],Thing[7])
  4127. Thing[8]=Thing[7]
  4128. Thing[3]=Thing[3]+Thing[4]
  4129. else
  4130. Part.Parent=nil
  4131. table.remove(Effects,e)
  4132. end
  4133. end
  4134. if Thing[2]=="showDamage" then
  4135. if Thing[6]<Thing[5] then
  4136. Thing[6]=Thing[6]+1
  4137. elseif Thing[6]<Thing[7] then
  4138. Thing[4].position=Thing[4].position+vt(0,-.2,0)
  4139. Thing[6]=Thing[6]+1
  4140. elseif Thing[6]<Thing[8] then
  4141. Thing[6]=Thing[6]+1
  4142. elseif Thing[6]<Thing[9] then
  4143. Thing[6]=Thing[6]+1
  4144. Thing[4].position=Thing[4].position+vt(0,.2,0)
  4145. Thing[3].TextStrokeTransparency=Thing[3].TextStrokeTransparency+.1
  4146. Thing[3].TextTransparency=Thing[3].TextTransparency+.1
  4147. else
  4148. Thing[1].Parent=nil
  4149. table.remove(Effects,e)
  4150. end
  4151. end
  4152. if Thing[2]~="DecreaseStat" and Thing[2]~="showDamage" then
  4153. if Thing[1].Transparency<=1 then
  4154. if Thing[2]=="Block1" then
  4155. Thing[1].CFrame=Thing[1].CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  4156. Mesh=Thing[7]
  4157. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  4158. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  4159. elseif Thing[2]=="Block2" then
  4160. Thing[1].CFrame=Thing[1].CFrame
  4161. Mesh=Thing[7]
  4162. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  4163. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  4164. elseif Thing[2]=="Cylinder" then
  4165. Mesh=Thing[7]
  4166. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  4167. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  4168. elseif Thing[2]=="Cylinder2" then
  4169. Mesh=Thing[7]
  4170. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  4171. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  4172. if Thing[1].Transparency>=.5 then
  4173. Thing[1].BrickColor=BrickColor.new("White")
  4174. end
  4175. elseif Thing[2]=="Blood" then
  4176. Mesh=Thing[7]
  4177. Thing[1].CFrame=Thing[1].CFrame*cf(0,.5,0)
  4178. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  4179. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  4180. elseif Thing[2]=="Elec" then
  4181. Mesh=Thing[7]
  4182. Mesh.Scale=Mesh.Scale+vt(Thing[7],Thing[8],Thing[9])
  4183. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  4184. elseif Thing[2]=="Disappear" then
  4185. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  4186. end
  4187. else
  4188. table.remove(Effects,e)
  4189. Thing[1].Parent=nil
  4190. end
  4191. end
  4192. end
  4193. --end
  4194. end
  4195. end
  4196. end
  4197. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement