Advertisement
Finnegan5

Magic

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