Advertisement
memberhero

StickJames Script

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