Advertisement
ericdesouza

Untitled

Jan 22nd, 2018
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 74.40 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("Black")
  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(x1,y1,z1)
  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=1
  337. local Def=Instance.new("NumberValue")
  338. Def.Name="Defense"
  339. Def.Parent=Stats
  340. Def.Value=10
  341. local Speed=Instance.new("NumberValue")
  342. Speed.Name="Speed"
  343. Speed.Parent=Stats
  344. Speed.Value=10
  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("White")
  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").everymanbuthimself19,
  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(50, 80)
  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(0, 1.5, 0), -Damage, 1.5, Part.BrickColor.Color)
  625. else
  626. h.Health = h.Health - Damage / 100
  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(x3,y3,z3)
  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(x3,y3,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(x3,0,z3)
  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(x3,y3,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(x3,y3,z3)
  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=="Accessory" 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=="Accessory" 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("Black")
  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(1,1,1)
  1349. expart.Transparency = 0
  1350. expart.Anchored = true
  1351. expart.Material = "Neon"
  1352. expart.BrickColor = bc("Grey")
  1353. expart.CFrame = par.CFrame
  1354. partMesh2.Scale = vt(rad,rad,rad)
  1355. expart2.Size = vt(1.15,1.15,1.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(1.15,1.15,1.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(1.15,1.15,1.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. partMesh3.Scale = vt(0,1,0)
  1374. partMesh4.Scale = vt(0,1,0)
  1375. expart.CanCollide = false
  1376. expart2.CanCollide = false
  1377. rin.CanCollide = false
  1378. rin2.CanCollide = false
  1379. MagniDamage(par, rad*5, mindam, maxdam, 0, "Normal")
  1380. local value = 1*rad/6.5
  1381. for i = 0, 199 do
  1382. partMesh.Scale = partMesh.Scale + vt(value,value,value)
  1383. expart.CFrame = expart.CFrame
  1384. partMesh2.Scale = partMesh2.Scale + vt(value,value,value)
  1385. expart2.CFrame = expart.CFrame
  1386. value = value - 0.035*rad/30
  1387. if value < 7.5 then
  1388. partMesh3.Scale = partMesh3.Scale + vt(rad/5,0,rad/5)
  1389. rin.CFrame = rin.CFrame
  1390. partMesh4.Scale = partMesh4.Scale + vt(rad/7.5,0,rad/7.5)
  1391. rin2.CFrame = rin2.CFrame
  1392. end
  1393. if value < 0 then
  1394. expart.Transparency = expart.Transparency + 0.025
  1395. expart2.Transparency = expart2.Transparency + 0.025
  1396. rin.Transparency = rin.Transparency + 0.025
  1397. rin2.Transparency = rin2.Transparency + 0.025
  1398. end
  1399. swait()
  1400. end
  1401. game:GetService("Debris"):AddItem(expart, 1)
  1402. game:GetService("Debris"):AddItem(expart2, 1)
  1403. game:GetService("Debris"):AddItem(rin, 1)
  1404. game:GetService("Debris"):AddItem(rin2, 1)
  1405. end
  1406.  
  1407. function ExplodeShort(rad,par,pitch,vol,mindam,maxdam)
  1408. local expart = Instance.new("Part",char)
  1409. local expart2 = Instance.new("Part",char)
  1410. local partMesh = Instance.new("SpecialMesh",expart)
  1411. partMesh.MeshType = "Sphere"
  1412. local partMesh2 = Instance.new("SpecialMesh",expart2)
  1413. partMesh2.MeshType = "Sphere"
  1414. CFuncs["Sound"].Create("http://www.roblox.com/asset/?id=142070127", expart,vol, pitch)
  1415. partMesh.Scale = vt(rad,rad,rad)
  1416. expart.Size = vt(1,1,1)
  1417. expart.Transparency = 0
  1418. expart.Anchored = true
  1419. expart.Material = "Neon"
  1420. expart.BrickColor = bc("White")
  1421. expart.CFrame = par.CFrame
  1422. partMesh2.Scale = vt(rad,rad,rad)
  1423. expart2.Size = vt(1.15,1.15,1.15)
  1424. expart2.Transparency = 0.5
  1425. expart2.Anchored = true
  1426. expart2.Material = "Neon"
  1427. expart2.BrickColor = par.BrickColor
  1428. expart2.CFrame = par.CFrame
  1429. expart.CanCollide = false
  1430. expart2.CanCollide = false
  1431. MagniDamage(par, rad*2.5, mindam, maxdam, 0, "Normal")
  1432. local value = 1*rad/6.5
  1433. for i = 0, 75 do
  1434. partMesh.Scale = partMesh.Scale + vt(value,value,value)
  1435. expart.CFrame = expart.CFrame
  1436. partMesh2.Scale = partMesh2.Scale + vt(value,value,value)
  1437. expart2.CFrame = expart.CFrame
  1438. value = value - 0.035*rad/5
  1439. if value < 0 then
  1440. value = 0
  1441. expart.Transparency = expart.Transparency + 0.05
  1442. expart2.Transparency = expart2.Transparency + 0.05
  1443. end
  1444. swait()
  1445. end
  1446. game:GetService("Debris"):AddItem(expart, 1)
  1447. game:GetService("Debris"):AddItem(expart2, 1)
  1448. end
  1449.  
  1450. function AreaDanger(rad,par,mindam,maxdam)
  1451. local expart = Instance.new("Part",char)
  1452. local partMesh = Instance.new("SpecialMesh",expart)
  1453. CFuncs["Sound"].Create("rbxassetid://231917784", expart,1.5,1.15)
  1454. partMesh.MeshType = "Sphere"
  1455. partMesh.Scale = vt(rad,rad,rad)
  1456. expart.Size = vt(1,1,1)
  1457. expart.Transparency = 0.5
  1458. expart.Anchored = true
  1459. expart.Material = "Neon"
  1460. expart.BrickColor = par.BrickColor
  1461. expart.CFrame = par.CFrame
  1462. local value = 1*rad/5
  1463. MagicBlock(origcolor,expart.CFrame,0,0,0,rad/2,rad/2,rad/2,0.1)
  1464. for i = 0, 14 do
  1465. wait()
  1466. partMesh.Scale = partMesh.Scale + vt(value,value,value)
  1467. expart.CFrame = expart.CFrame
  1468. value = value - 0.035*rad
  1469. if value < 0 then
  1470. value = 0
  1471. end
  1472. end
  1473. wait(0.25)
  1474. CFuncs["Sound"].Create("rbxassetid://588738544", expart,1.5,1)
  1475. wait(0.5)
  1476. CFuncs["Sound"].Create("rbxassetid://588737825", expart,1.5,1)
  1477. CFuncs["Sound"].Create("rbxassetid://231917784", expart,1.5,0.75)
  1478. MagniDamageWithEffect(par, rad, mindam, maxdam, 0, "Normal")
  1479. MagicBlock(origcolor,expart.CFrame,rad*2,rad*2,rad*2,0.1,0.1,0.1,0.025)
  1480. for i = 0, 14 do
  1481. wait()
  1482. partMesh.Scale = partMesh.Scale + vt(value,value,value)
  1483. expart.CFrame = expart.CFrame
  1484. value = value - 0.035*rad/2
  1485. end
  1486. expart.Transparency = 1
  1487. game:GetService("Debris"):AddItem(expart, 5)
  1488. end
  1489.  
  1490. function Swarmsplosions(negrad,rad,par,mindam,maxdam)
  1491. CFuncs["Sound"].Create("rbxassetid://588737825", par, 2.5, 2)
  1492. CFuncs["Sound"].Create("rbxassetid://231917784", par, 2.5,1)
  1493. CFuncs["Sound"].Create("rbxassetid://231917744", par, 2.5,1)
  1494. CFuncs["Sound"].Create("rbxassetid://233856106", par, 2.5, 1)
  1495. MagniDamageWithEffect(par, 25, 5,10, 0, "Normal")
  1496. MagicBlock(origcolor,par.CFrame,5,5,5,5,5,5,0.025)
  1497. for i = 0, 24 do
  1498. 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))
  1499. end
  1500. for i = 0, 24 do
  1501. local expart = Instance.new("Part",char)
  1502. expart.Transparency = 1
  1503. expart.Anchored = true
  1504. expart.CFrame = par.CFrame*CFrame.new(math.random(negrad,rad),math.random(negrad,rad),math.random(negrad,rad))
  1505. CFuncs["Sound"].Create("rbxassetid://588737825", expart,1,2)
  1506. CFuncs["Sound"].Create("rbxassetid://231917784", expart,1.5,1.15)
  1507. MagniDamage(expart, rad/2, mindam, maxdam, 0, "Normal")
  1508. MagicBlock(origcolor,expart.CFrame,rad,rad,rad,0.1,0.1,0.1,0.025)
  1509. for i = 0, 9 do
  1510. 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))
  1511. end
  1512. game:GetService("Debris"):AddItem(expart, 2)
  1513. wait(0.1)
  1514. end
  1515. end
  1516. ----
  1517. function bullit()
  1518. attack = true
  1519. for i = 0,1,0.1 do
  1520. swait()
  1521. MagicBlock(origcolor,sorb.CFrame,3,3,3,0.05,0.05,0.05,0.05)
  1522. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(-80)),0.3)
  1523. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(80)),.3)
  1524. RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(20)), 0.3)
  1525. LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(-90)), 0.3)
  1526. end
  1527. CFuncs["Sound"].Create("rbxassetid://558640653", sorb, 1.5, 1)
  1528. local a = Instance.new("Part",Character)
  1529. a.Name = "Direction"
  1530. a.Anchored = true
  1531. a.BrickColor = bc("Bright red")
  1532. a.Material = "Neon"
  1533. a.Transparency = 1
  1534. a.CanCollide = false
  1535. local ray = Ray.new(
  1536. sorb.CFrame.p, -- origin
  1537. (mouse.Hit.p - sorb.CFrame.p).unit * 500 -- direction
  1538. )
  1539. local ignore = Character
  1540. local hit, position, normal = workspace:FindPartOnRay(ray, ignore)
  1541. a.BottomSurface = 10
  1542. a.TopSurface = 10
  1543. local distance = (root.CFrame.p - position).magnitude
  1544. a.Size = Vector3.new(0.1, 0.1, 0.1)
  1545. a.CFrame = CFrame.new(sorb.CFrame.p, position) * CFrame.new(0, 0, 0)
  1546. local lb = Instance.new("Part")
  1547. lb.Parent = char
  1548. lb.BrickColor = origcolor
  1549. lb.CanCollide = false
  1550. lb.Material = "Neon"
  1551. lb.Anchored = true
  1552. lb.TopSurface = 0
  1553. lb.BottomSurface = 0
  1554. lb.Transparency = 0
  1555. lb.Size = vt(0.5,0.5,0.5)
  1556. lb.CFrame = a.CFrame
  1557. lb.Anchored = false
  1558. local thingery = Instance.new("SpecialMesh",lb)
  1559. thingery.MeshType = "Sphere"
  1560. thingery.Scale = vt(10,10,10)
  1561. game:GetService("Debris"):AddItem(lb, 10)
  1562. local bv = Instance.new("BodyVelocity")
  1563. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  1564. bv.velocity = a.CFrame.lookVector*150
  1565. bv.Parent = lb
  1566. local hitted = false
  1567. coroutine.resume(coroutine.create(function()
  1568. while wait() do
  1569. if hitted == false or lb.Parent ~= nil then
  1570. MagicShockTrailAlt(lb.BrickColor,lb.CFrame + lb.CFrame.lookVector*-1,5,5,12.5,-0.25,-0.25,0.05,math.random(1,2))
  1571. end
  1572. if hitted == true or lb.Parent == nil then
  1573. break
  1574. end
  1575. end
  1576. end))
  1577. game:GetService("Debris"):AddItem(a, 0.1)
  1578. wait(0.01)
  1579. lb.Touched:connect(function(hit)
  1580. if hitted == false then
  1581. hitted = true
  1582. lb.Anchored = true
  1583. lb.Transparency = 1
  1584. Explode(7.5,lb,1,1,10,15)
  1585. end
  1586. end)
  1587. for i = 0,2,0.1 do
  1588. swait()
  1589. MagicBlock(origcolor,sorb.CFrame,3,3,3,0.05,0.05,0.05,0.05)
  1590. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(20),math.rad(0),math.rad(80)),0.5)
  1591. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(-80)),.5)
  1592. RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(20)), 0.5)
  1593. LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(-90)), 0.5)
  1594. end
  1595. attack = false
  1596. end
  1597.  
  1598. function snipe()
  1599. attack = true
  1600. for i = 0,2,0.1 do
  1601. swait()
  1602. MagicBlock(origcolor,sorb.CFrame,1,1,1,0.05,0.05,0.05,0.05)
  1603. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(90)),0.3)
  1604. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(-90)),.3)
  1605. RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(90)), 0.3)
  1606. LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-20)), 0.3)
  1607. end
  1608. CFuncs["Sound"].Create("rbxassetid://171137312", sorb, 2.5, 1)
  1609. local a = Instance.new("Part",Character)
  1610. a.Name = "Direction"
  1611. a.Anchored = true
  1612. a.BrickColor = bc("Bright red")
  1613. a.Material = "Neon"
  1614. a.Transparency = 1
  1615. a.CanCollide = false
  1616. local ray = Ray.new(
  1617. sorb.CFrame.p, -- origin
  1618. (mouse.Hit.p - sorb.CFrame.p).unit * 500 -- direction
  1619. )
  1620. local ignore = Character
  1621. local hit, position, normal = workspace:FindPartOnRay(ray, ignore)
  1622. a.BottomSurface = 10
  1623. a.TopSurface = 10
  1624. local distance = (root.CFrame.p - position).magnitude
  1625. a.Size = Vector3.new(0.1, 0.1, 0.1)
  1626. a.CFrame = CFrame.new(sorb.CFrame.p, position) * CFrame.new(0, 0, 0)
  1627. local lb = Instance.new("Part")
  1628. lb.Parent = char
  1629. lb.BrickColor = origcolor
  1630. lb.CanCollide = false
  1631. lb.Material = "Neon"
  1632. lb.Anchored = true
  1633. lb.TopSurface = 0
  1634. lb.BottomSurface = 0
  1635. lb.Transparency = 1
  1636. lb.Size = vt(0.5,0.5,0.5)
  1637. lb.CFrame = a.CFrame
  1638. lb.Anchored = false
  1639. local thingery = Instance.new("SpecialMesh",lb)
  1640. thingery.MeshType = "Sphere"
  1641. thingery.Scale = vt(2.5,2.5,2.5)
  1642. game:GetService("Debris"):AddItem(lb, 3)
  1643. local bv = Instance.new("BodyVelocity")
  1644. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  1645. bv.velocity = a.CFrame.lookVector*250*1.5
  1646. bv.Parent = lb
  1647. local hitted = false
  1648. game:GetService("Debris"):AddItem(a, 0.1)
  1649. coroutine.resume(coroutine.create(function()
  1650. while wait() do
  1651. if hitted == false or lb.Parent ~= nil then
  1652. 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))
  1653. end
  1654. if hitted == true or lb.Parent == nil then
  1655. break
  1656. end
  1657. end
  1658. end))
  1659. wait(0.01)
  1660. lb.Touched:connect(function(hit)
  1661. if hitted == false then
  1662. hitted = true
  1663. lb.Anchored = true
  1664. lb.Transparency = 1
  1665. ExplodeShort(3.5,lb,1,2.5,15,42)
  1666. end
  1667. end)
  1668. for i = 0,1,0.5 do
  1669. swait()
  1670. MagicBlock(origcolor,sorb.CFrame,1,1,1,0.05,0.05,0.05,0.05)
  1671. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(90)),0.5)
  1672. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(-90)),.5)
  1673. RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(120)), 0.5)
  1674. LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-20)), 0.5)
  1675. end
  1676. attack = false
  1677. end
  1678.  
  1679. function crystalinestring()
  1680. attack = true
  1681. for i = 0,2,0.1 do
  1682. swait()
  1683. MagicBlock(origcolor,sorb.CFrame,1,1,1,0.05,0.05,0.05,0.05)
  1684. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(80)),0.3)
  1685. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(-80)),.3)
  1686. 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)
  1687. LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-20)), 0.3)
  1688. end
  1689. CFuncs["Sound"].Create("rbxassetid://240429289", sorb, 2.5, 0.85)
  1690. local a = Instance.new("Part",Character)
  1691. a.Name = "Direction"
  1692. a.Anchored = true
  1693. a.BrickColor = bc("Bright red")
  1694. a.Material = "Neon"
  1695. a.Transparency = 1
  1696. a.CanCollide = false
  1697. local ray = Ray.new(
  1698. sorb.CFrame.p, -- origin
  1699. (mouse.Hit.p - sorb.CFrame.p).unit * 500 -- direction
  1700. )
  1701. local ignore = Character
  1702. local hit, position, normal = workspace:FindPartOnRay(ray, ignore)
  1703. a.BottomSurface = 10
  1704. a.TopSurface = 10
  1705. local distance = (root.CFrame.p - position).magnitude
  1706. a.Size = Vector3.new(0.1, 0.1, 0.1)
  1707. a.CFrame = CFrame.new(sorb.CFrame.p, position) * CFrame.new(0, 0, 0)
  1708. local lb = Instance.new("Part")
  1709. lb.Parent = char
  1710. lb.BrickColor = origcolor
  1711. lb.CanCollide = false
  1712. lb.Material = "Neon"
  1713. lb.Anchored = true
  1714. lb.TopSurface = 0
  1715. lb.BottomSurface = 0
  1716. lb.Transparency = 0
  1717. lb.Size = vt(0.5,0.5,0.5)
  1718. lb.CFrame = a.CFrame
  1719. lb.Anchored = false
  1720. local thingery = Instance.new("SpecialMesh",lb)
  1721. thingery.MeshType = "FileMesh"
  1722. thingery.MeshId = "http://www.roblox.com/Asset/?id=9756362"
  1723. thingery.Scale = vt(2,2,5)
  1724. game:GetService("Debris"):AddItem(lb, 3)
  1725. local bv = Instance.new("BodyVelocity")
  1726. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  1727. bv.velocity = a.CFrame.lookVector*250/2.5
  1728. bv.Parent = lb
  1729. local hitted = false
  1730. game:GetService("Debris"):AddItem(a, 0.1)
  1731. coroutine.resume(coroutine.create(function()
  1732. while wait() do
  1733. if hitted == false or lb.Parent ~= nil then
  1734. 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))
  1735. end
  1736. if hitted == true or lb.Parent == nil then
  1737. break
  1738. end
  1739. end
  1740. end))
  1741. wait(0.01)
  1742. lb.Touched:connect(function(hit)
  1743. if hitted == false then
  1744. hitted = true
  1745. lb.Anchored = true
  1746. lb.Transparency = 1
  1747. Swarmsplosions(-25,25,lb,10,15)
  1748. end
  1749. end)
  1750. for i = 0,1,0.1 do
  1751. swait()
  1752. MagicBlock(origcolor,sorb.CFrame,1,1,1,0.05,0.05,0.05,0.05)
  1753. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(-50)),0.3)
  1754. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(20),math.rad(0),math.rad(50)),.3)
  1755. RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(-10), math.rad(0), math.rad(50)), 0.3)
  1756. LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(90), math.rad(0), math.rad(-50)), 0.3)
  1757. end
  1758. attack = false
  1759. end
  1760.  
  1761. function areabul()
  1762. attack = true
  1763. for i = 0,2,0.1 do
  1764. swait()
  1765. MagicBlock(origcolor,sorb.CFrame,1,1,1,0.05,0.05,0.05,0.05)
  1766. MagicBlock(origcolor,sorb2.CFrame,1,1,1,0.05,0.05,0.05,0.05)
  1767. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(30)),0.3)
  1768. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(-15)),.3)
  1769. 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)
  1770. 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)
  1771. end
  1772. for i = 0,2,0.1 do
  1773. swait()
  1774. MagicBlock(origcolor,sorb.CFrame,2,2,2,0.05,0.05,0.05,0.05)
  1775. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(90)),0.3)
  1776. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(-90)),.3)
  1777. RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(90)), 0.3)
  1778. LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-20)), 0.3)
  1779. end
  1780. CFuncs["Sound"].Create("rbxassetid://240429289", sorb, 2.5, 0.85)
  1781. local a = Instance.new("Part",Character)
  1782. a.Name = "Direction"
  1783. a.Anchored = true
  1784. a.BrickColor = bc("Bright red")
  1785. a.Material = "Neon"
  1786. a.Transparency = 1
  1787. a.CanCollide = false
  1788. local ray = Ray.new(
  1789. sorb.CFrame.p, -- origin
  1790. (mouse.Hit.p - sorb.CFrame.p).unit * 500 -- direction
  1791. )
  1792. local ignore = Character
  1793. local hit, position, normal = workspace:FindPartOnRay(ray, ignore)
  1794. a.BottomSurface = 10
  1795. a.TopSurface = 10
  1796. local distance = (root.CFrame.p - position).magnitude
  1797. a.Size = Vector3.new(0.1, 0.1, 0.1)
  1798. a.CFrame = CFrame.new(sorb.CFrame.p, position) * CFrame.new(0, 0, 0)
  1799. local lb = Instance.new("Part")
  1800. lb.Parent = char
  1801. lb.BrickColor = origcolor
  1802. lb.CanCollide = false
  1803. lb.Material = "Neon"
  1804. lb.Anchored = true
  1805. lb.TopSurface = 0
  1806. lb.BottomSurface = 0
  1807. lb.Transparency = 1
  1808. lb.Size = vt(0.5,0.5,0.5)
  1809. lb.CFrame = a.CFrame
  1810. lb.Anchored = false
  1811. local thingery = Instance.new("SpecialMesh",lb)
  1812. thingery.MeshType = "Sphere"
  1813. thingery.Scale = vt(2.5,2.5,2.5)
  1814. game:GetService("Debris"):AddItem(lb, 3)
  1815. local bv = Instance.new("BodyVelocity")
  1816. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  1817. bv.velocity = a.CFrame.lookVector*250/2
  1818. bv.Parent = lb
  1819. local hitted = false
  1820. MagicShockTrailAlt(origcolor,lb.CFrame,1,1,0.1,1,1,0.075,math.random(1,2))
  1821. game:GetService("Debris"):AddItem(a, 0.1)
  1822. coroutine.resume(coroutine.create(function()
  1823. while wait() do
  1824. if hitted == false or lb.Parent ~= nil then
  1825. 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))
  1826. end
  1827. if hitted == true or lb.Parent == nil then
  1828. break
  1829. end
  1830. end
  1831. end))
  1832. wait(0.01)
  1833. lb.Touched:connect(function(hit)
  1834. if hitted == false then
  1835. hitted = true
  1836. lb.Anchored = true
  1837. lb.Transparency = 1
  1838. AreaDanger(25,lb,12,18)
  1839. end
  1840. end)
  1841. for i = 0,2,0.1 do
  1842. swait()
  1843. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(90)),0.3)
  1844. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(-90)),.3)
  1845. RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(120)), 0.3)
  1846. LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-20)), 0.3)
  1847. end
  1848. attack = false
  1849. end
  1850.  
  1851. local transforming = false
  1852. local transformed = false
  1853. function tran()
  1854. hum.WalkSpeed = 0
  1855. hum.JumpPower = 0
  1856. attack = true
  1857. transforming = true
  1858. transformed = true
  1859. hum.MaxHealth = math.huge
  1860. CFuncs["Sound"].Create("rbxassetid://588718963", root, 1, 1)
  1861. for i = 0,5,0.1 do
  1862. swait()
  1863. 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))
  1864. 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)
  1865. 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)
  1866. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(80)),0.1)
  1867. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-30),math.rad(0),math.rad(-80)),.1)
  1868. RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(190)), 0.1)
  1869. LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(20)), 0.1)
  1870. end
  1871. CFuncs["Sound"].Create("rbxassetid://231917784", root, 1,0.5)
  1872. CFuncs["Sound"].Create("rbxassetid://588737825", root, 0.25, 0.25)
  1873. CFuncs["Sound"].Create("rbxassetid://588737825", root, 0.5, 2)
  1874. CFuncs["Sound"].Create("rbxassetid://233856106", root, 1, 1)
  1875. MagicBlock(origcolor,root.CFrame*CFrame.new(0,5,0),2,2,2,1,1,1,0.1)
  1876. for i = 0,10,0.1 do
  1877. swait()
  1878. MagicBlock(origcolor,sorb.CFrame,2,2,2,0.05,0.05,0.05,0.05)
  1879. 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)
  1880. 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)
  1881. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(30)),0.2)
  1882. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(-30)),.2)
  1883. 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)
  1884. LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(20)), 0.2)
  1885. end
  1886. for i = 0,5,0.1 do
  1887. swait()
  1888. MagicBlock(origcolor,sorb.CFrame,2,2,2,0.05,0.05,0.05,0.05)
  1889. 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)
  1890. 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)
  1891. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),0.2)
  1892. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-10),math.rad(0),math.rad(-30)),.2)
  1893. RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(170)), 0.2)
  1894. LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(20)), 0.2)
  1895. end
  1896. MagicBlock(origcolor,sorb.CFrame,2,2,2,5,5,5,0.05)
  1897. CFuncs["Sound"].Create("rbxassetid://231917784", root, 1,0.5)
  1898. CFuncs["Sound"].Create("rbxassetid://588737825", root, 0.5, 2)
  1899. CFuncs["Sound"].Create("rbxassetid://233856106", root, 1, 1)
  1900. for i = 0,2.5,0.1 do
  1901. swait()
  1902. 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))
  1903. 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)
  1904. 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)
  1905. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,1)* angles(math.rad(20),math.rad(0),math.rad(0)),0.3)
  1906. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(20),math.rad(0),math.rad(-0)),.3)
  1907. 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)
  1908. 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)
  1909. end
  1910. MagicBlock(origcolor,tors.CFrame,2,2,2,5,5,5,0.05)
  1911. CFuncs["Sound"].Create("rbxassetid://231917784", root, 1,0.75)
  1912. CFuncs["Sound"].Create("rbxassetid://588737825", root, 1.5, 0.25)
  1913. CFuncs["Sound"].Create("rbxassetid://588737825", root, 1, 0.225)
  1914. local sphscale = 1
  1915. for i = 0,25,0.1 do
  1916. swait()
  1917. 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))
  1918. sphscale = sphscale + 0.05
  1919. 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))
  1920. MagicBlock(origcolor,tors.CFrame,sphscale,sphscale,sphscale,0.05,0.05,0.05,0.05)
  1921. 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)
  1922. 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)
  1923. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,2)* angles(math.rad(-20),math.rad(0),math.rad(0)),0.05)
  1924. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-20),math.rad(0),math.rad(-0)),.05)
  1925. RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(60)), 0.05)
  1926. LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-60)), 0.05)
  1927. end
  1928. CFuncs["Sound"].Create("rbxassetid://588737825", root, 3, 0.25)
  1929. MagicBlock(origcolor,sorb.CFrame,sphscale,sphscale,sphscale,5,5,5,0.1)
  1930. for z = 0, 9 do
  1931. MagniDamageWithEffect(root, 25, 3, 6, 0, "Normal")
  1932. CFuncs["Sound"].Create("rbxassetid://231917784", root, 2.5,0.75)
  1933. CFuncs["Sound"].Create("rbxassetid://240429289", root, 5, 0.2)
  1934. MagicBlock(origcolor,tors.CFrame,sphscale,sphscale,sphscale,5,5,5,0.1)
  1935. for i = 0,5,0.1 do
  1936. swait()
  1937. 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))
  1938. MagicBlock(origcolor,tors.CFrame,sphscale,sphscale,sphscale,0.05,0.05,0.05,0.05)
  1939. 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))
  1940. 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)
  1941. 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)
  1942. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,2)* angles(math.rad(20),math.rad(0),math.rad(0)),0.3)
  1943. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(20),math.rad(0),math.rad(-0)),.3)
  1944. 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)
  1945. 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)
  1946. end
  1947. end
  1948. CFuncs["Sound"].Create("rbxassetid://136007472", root, 2, 0.7)
  1949. for i = 0,20,0.1 do
  1950. swait()
  1951. 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))
  1952. 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))
  1953. MagicBlock(origcolor,tors.CFrame,sphscale,sphscale,sphscale,0.05,0.05,0.05,0.05)
  1954. 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))
  1955. 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)
  1956. 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)
  1957. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,2)* angles(math.rad(20),math.rad(0),math.rad(0)),0.3)
  1958. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(20),math.rad(0),math.rad(-0)),.3)
  1959. 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)
  1960. 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)
  1961. end
  1962. ---- Change?
  1963. -- [yes] [no] [maybe]
  1964. -- if you want it then ok:
  1965.  
  1966. ---- okay then
  1967. -- ill be leaving this around
  1968. MagicBlock(origcolor,tors.CFrame,sphscale,sphscale,sphscale,0.5,0.5,0.5,0.005)
  1969. MagicBlock(origcolor,tors.CFrame,sphscale,sphscale,sphscale,0.5,0.5,0.5,0.005)
  1970. CFuncs["Sound"].Create("rbxassetid://588737825", root, 2.5, 0.5)
  1971. CFuncs["Sound"].Create("rbxassetid://231917784", root, 5,0.5)
  1972. CFuncs["Sound"].Create("rbxassetid://231917744", root, 5,0.5)
  1973. CFuncs["Sound"].Create("rbxassetid://233856106", root, 5, 0.5)
  1974. MagniDamageWithEffect(root, 150, 35, 49, 0, "Normal")
  1975. for i = 0, 24 do
  1976. 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))
  1977. end
  1978. for i = 0,15,0.1 do
  1979. swait()
  1980. 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)
  1981. 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)
  1982. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,2.5)* angles(math.rad(-20),math.rad(0),math.rad(0)),0.3)
  1983. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-20),math.rad(0),math.rad(-0)),.3)
  1984. RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(-10), math.rad(0), math.rad(30)), 0.3)
  1985. LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(-10), math.rad(0), math.rad(-30)), 0.3)
  1986. end
  1987. hum.WalkSpeed = 16
  1988. hum.JumpPower = 50
  1989. attack = false
  1990. transforming = false
  1991. hum.MaxHealth = 5000
  1992. end
  1993.  
  1994.  
  1995. mouse.KeyDown:connect(function(k)
  1996. if k == "z" and attack == false then
  1997. bullit()
  1998. end
  1999. if k == "x" and attack == false then
  2000. snipe()
  2001. end
  2002. if k == "c" and attack == false then
  2003. areabul()
  2004. end
  2005. if k == "v" and attack == false then
  2006. crystalinestring()
  2007. end
  2008. if k == "p" and attack == false then
  2009. tran()
  2010. end
  2011. end)
  2012. Humanoid.Animator.Parent = nil
  2013. idleanim=.4
  2014. while true do
  2015. swait()
  2016. if transformed == true then
  2017. if transforming == false then
  2018. 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))
  2019. end
  2020. end
  2021. sine = sine + change
  2022. local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
  2023. local velderp=RootPart.Velocity.y
  2024. hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character)
  2025. if equipped==true or equipped==false then
  2026. if attack==false then
  2027. idle=idle+1
  2028. else
  2029. idle=0
  2030. end
  2031. if idle>=500 then
  2032. if attack==false then
  2033. --Sheath()
  2034. end
  2035. end
  2036. if RootPart.Velocity.y > 1 and hitfloor==nil then
  2037. Anim="Jump"
  2038. if attack==false then
  2039. Neck.C0=clerp(Neck.C0,necko*euler(-0.2,0,0),.3)
  2040. Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.3)
  2041. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0.25)*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  2042. 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)
  2043. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  2044. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.5,0,-0.5),.3)
  2045. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  2046. RH.C0=clerp(RH.C0,cf(1,-1,-.3)*euler(-0.5,1.57,0)*euler(-.2,0,0),.2)
  2047. LH.C0=clerp(LH.C0,cf(-1,-1,-.3)*euler(-0.5,-1.57,0)*euler(-.2,0,0),.2)
  2048. end
  2049. elseif RootPart.Velocity.y < -1 and hitfloor==nil then
  2050. Anim="Fall"
  2051. if attack==false then
  2052. Neck.C0=clerp(Neck.C0,necko*euler(0.4,0,0),.3)
  2053. Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.3)
  2054. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0.25)*angles(math.rad(5),math.rad(0),math.rad(0)),.3)
  2055. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0.3,0,-0.2),.3)
  2056. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  2057. 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)
  2058. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  2059. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0.4,1.57,0),.2)
  2060. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(-0.2,-1.57,0),.2)
  2061. end
  2062. elseif torvel<1 and hitfloor~=nil then
  2063. Anim="Idle"
  2064. if transforming == false then
  2065. 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)
  2066. 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)
  2067. end
  2068. if attack==false then
  2069. 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)
  2070. 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)
  2071. 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)
  2072. 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)
  2073. end
  2074. elseif torvel>2 and torvel<22 and hitfloor~=nil then
  2075. Anim="Walk"
  2076. if transforming == false then
  2077. 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)
  2078. 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)
  2079. end
  2080. if attack==false then
  2081. 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)
  2082. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  2083. 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)
  2084. 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)
  2085. end
  2086. elseif torvel>=22 and hitfloor~=nil then
  2087. Anim="Run"
  2088. if transforming == false then
  2089. 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)
  2090. 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)
  2091. end
  2092. if attack==false then
  2093. 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)
  2094. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  2095. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(-50),math.rad(-60),math.rad(25)),.3)
  2096. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(-50),math.rad(0),math.rad(-25)),.3)
  2097. end
  2098. end
  2099. end
  2100. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement