Advertisement
ericdesouza

Untitled

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