coolgoldboy166

fire guy

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