ericdesouza

The explosive magic

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