Advertisement
memberhero

magic keytar leaked

Aug 23rd, 2016
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 53.92 KB | None | 0 0
  1. --[[
  2. Cyber Vitruoso Class Made by Fenrier.
  3. ]]
  4. Player=game:GetService("Players").LocalPlayer
  5. Character=Player.Character
  6. PlayerGui=Player.PlayerGui
  7. Backpack=Player.Backpack
  8. Torso=Character.Torso
  9. Head=Character.Head
  10. Humanoid=Character.Humanoid
  11. LeftArm=Character["Left Arm"]
  12. LeftLeg=Character["Left Leg"]
  13. RightArm=Character["Right Arm"]
  14. RightLeg=Character["Right Leg"]
  15. LS=Torso["Left Shoulder"]
  16. LH=Torso["Left Hip"]
  17. RS=Torso["Right Shoulder"]
  18. RH=Torso["Right Hip"]
  19. Neck=Torso.Neck
  20. it=Instance.new
  21. vt=Vector3.new
  22. cf=CFrame.new
  23. euler=CFrame.fromEulerAnglesXYZ
  24. angles=CFrame.Angles
  25. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  26. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  27. LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
  28. LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
  29. RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
  30. RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
  31. RootPart=Character.HumanoidRootPart
  32. RootJoint=RootPart.RootJoint
  33. RootCF=euler(-1.57,0,3.14)
  34. attack = false
  35. attackdebounce = false
  36. MMouse=nil
  37. combo=0
  38. mana=0
  39. local idle=0
  40. local Anim="Idle"
  41. --player
  42. player=nil
  43. --save shoulders
  44. RSH, LSH=nil, nil
  45. --welds
  46. RW, LW=Instance.new("Weld"), Instance.new("Weld")
  47. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  48. LH=Torso["Left Hip"]
  49. RH=Torso["Right Hip"]
  50. Charge=0
  51. TorsoColor=Torso.BrickColor
  52. Keys={}
  53. KeysWeld={}
  54. KeysC0={}
  55. keypress=false
  56. Input=""
  57. Allies={}
  58. Orbs={}
  59. orbget=false
  60.  
  61. function swait(num)
  62. if num==0 or num==nil then
  63. game:service'RunService'.RenderStepped:wait()
  64. else
  65. for i=0,num do
  66. game:service'RunService'.RenderStepped:wait()
  67. end
  68. end
  69. end
  70.  
  71. if Character:findFirstChild("Magi Keytar",true) ~= nil then
  72. Character:findFirstChild("Magi Keytar",true).Parent = nil
  73. end
  74. if Player.PlayerGui:findFirstChild("WeaponGUI",true) ~= nil then
  75. Player.PlayerGui:findFirstChild("WeaponGUI",true).Parent = nil
  76. end
  77.  
  78.  
  79. function NoOutline(Part)
  80. Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
  81. end
  82.  
  83. function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
  84. local fp=it("Part")
  85. fp.formFactor=formfactor
  86. fp.Parent=parent
  87. fp.Reflectance=reflectance
  88. fp.Transparency=transparency
  89. fp.CanCollide=false
  90. fp.Locked=true
  91. fp.BrickColor=brickcolor
  92. fp.Name=name
  93. fp.Size=size
  94. fp.Position=Torso.Position
  95. NoOutline(fp)
  96. fp.Material="SmoothPlastic"
  97. fp:BreakJoints()
  98. return fp
  99. end
  100.  
  101. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  102. local mesh=it(Mesh)
  103. mesh.Parent=part
  104. if Mesh=="SpecialMesh" then
  105. mesh.MeshType=meshtype
  106. mesh.MeshId=meshid
  107. end
  108. mesh.Offset=offset
  109. mesh.Scale=scale
  110. return mesh
  111. end
  112.  
  113. function weld(parent,part0,part1,c0)
  114. local weld=it("Weld")
  115. weld.Parent=parent
  116. weld.Part0=part0
  117. weld.Part1=part1
  118. weld.C0=c0
  119. return weld
  120. end
  121.  
  122. local Color1=Torso.BrickColor
  123.  
  124. local fengui=it("GuiMain")
  125. fengui.Parent=Player.PlayerGui
  126. fengui.Name="WeaponGUI"
  127. local fenframe=it("Frame")
  128. fenframe.Parent=fengui
  129. fenframe.BackgroundColor3=Color3.new(255,255,255)
  130. fenframe.BackgroundTransparency=1
  131. fenframe.BorderColor3=Color3.new(17,17,17)
  132. fenframe.Size=UDim2.new(0.0500000007, 0, 0.100000001, 0)
  133. fenframe.Position=UDim2.new(0.4,0,0.1,0)
  134. local fenbarmana1=it("TextLabel")
  135. fenbarmana1.Parent=fenframe
  136. fenbarmana1.Text=" "
  137. fenbarmana1.BackgroundTransparency=0
  138. fenbarmana1.BackgroundColor3=Color3.new(0,0,0)
  139. fenbarmana1.SizeConstraint="RelativeXY"
  140. fenbarmana1.TextXAlignment="Center"
  141. fenbarmana1.TextYAlignment="Center"
  142. fenbarmana1.Position=UDim2.new(0,0,0,0)
  143. fenbarmana1.Size=UDim2.new(4,0,0.2,0)
  144. local fenbarmana2=it("TextLabel")
  145. fenbarmana2.Parent=fenframe
  146. fenbarmana2.Text=" "
  147. fenbarmana2.BackgroundTransparency=0
  148. fenbarmana2.BackgroundColor3=Torso.Color
  149. fenbarmana2.SizeConstraint="RelativeXY"
  150. fenbarmana2.TextXAlignment="Center"
  151. fenbarmana2.TextYAlignment="Center"
  152. fenbarmana2.Position=UDim2.new(0,0,0,0)
  153. fenbarmana2.Size=UDim2.new(4*mana/100,0,0.2,0)
  154. local fenbarmana3=it("TextLabel")
  155. fenbarmana3.Parent=fenframe
  156. fenbarmana3.Text=" "
  157. fenbarmana3.BackgroundTransparency=0
  158. fenbarmana3.BackgroundColor3=Color3.new(Col1,Col2,Col3)
  159. fenbarmana3.SizeConstraint="RelativeXY"
  160. fenbarmana3.TextXAlignment="Center"
  161. fenbarmana3.TextYAlignment="Center"
  162. fenbarmana3.Position=UDim2.new(0,0,0,0)
  163. fenbarmana3.Size=UDim2.new(0,0,0.2,0)
  164. local fenbarmana4=it("TextLabel")
  165. fenbarmana4.Parent=fenframe
  166. fenbarmana4.Text="Energy("..mana..")"
  167. fenbarmana4.BackgroundTransparency=1
  168. fenbarmana4.BackgroundColor3=Color3.new(0,0,0)
  169. fenbarmana4.SizeConstraint="RelativeXY"
  170. fenbarmana4.TextXAlignment="Center"
  171. fenbarmana4.TextYAlignment="Center"
  172. fenbarmana4.Position=UDim2.new(0,0,-0.3,0)
  173. fenbarmana4.Size=UDim2.new(4,0,0.2,0)
  174. fenbarmana4.FontSize="Size9"
  175. fenbarmana4.TextStrokeTransparency=0
  176. fenbarmana4.TextColor=BrickColor.new("White")
  177.  
  178. local modelzorz=Instance.new("Model")
  179. modelzorz.Parent=Character
  180. modelzorz.Name="Magi Keytar"
  181.  
  182. local handle=part(3,modelzorz,0,0,BrickColor.new("Black"),"Handle",vt())
  183. local prt1=part(3,modelzorz,0,0,TorsoColor,"Part1",vt())
  184. local prt2=part(3,modelzorz,0,0,TorsoColor,"Part2",vt())
  185. local prt3=part(3,modelzorz,0,0,TorsoColor,"Part3",vt())
  186. local prt4=part(3,modelzorz,0,0,TorsoColor,"Part4",vt())
  187. local prt5=part(3,modelzorz,0,0,TorsoColor,"Part5",vt())
  188. local prt6=part(3,modelzorz,0,0,TorsoColor,"Part6",vt())
  189. local prt7=part(3,modelzorz,0,0,TorsoColor,"Part7",vt())
  190. local prt8=part(3,modelzorz,0,0,BrickColor.new("Medium stone grey"),"Part8",vt())
  191. local prt9=part(3,modelzorz,0,0,BrickColor.new("Medium stone grey"),"Part9",vt())
  192. local prt10=part(3,modelzorz,0,0,BrickColor.new("Medium stone grey"),"Part10",vt()) --
  193. local prt11=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part11",vt())
  194. local prt12=part(3,modelzorz,0,0,TorsoColor,"Part12",vt())
  195. local prt13=part(3,modelzorz,0,0,TorsoColor,"Part13",vt())
  196. local prt14=part(3,modelzorz,0,0,TorsoColor,"Part14",vt())
  197. local prt15=part(3,modelzorz,0,0,TorsoColor,"Part15",vt())
  198. local prt16=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part16",vt())
  199. local prt17=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Cyber Sig Part1",vt())
  200. local prt18=part(3,modelzorz,0,0,TorsoColor,"Cyber Sig Part2",vt())
  201. local prt19=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Cyber Sig Part1",vt())
  202. local prt20=part(3,modelzorz,0,0,TorsoColor,"Cyber Sig Part2",vt())
  203.  
  204. local msh1=mesh("BlockMesh",prt1,"","",vt(0,0,0),vt(6,20,2))
  205. local msh2=mesh("CylinderMesh",prt2,"","",vt(0,0,0),vt(3,1.99,3))
  206. local msh3=mesh("BlockMesh",prt3,"","",vt(0,0,0),vt(5,3,1.98))
  207. local msh4=mesh("SpecialMesh",prt4,"Wedge","",vt(0,0,0),vt(2,1,6))
  208. local msh5=mesh("SpecialMesh",prt5,"Wedge","",vt(0,0,0),vt(2,1,1))
  209. local msh6=mesh("BlockMesh",prt6,"","",vt(0,0,0),vt(2,3,2))
  210. local msh7=mesh("SpecialMesh",prt7,"Wedge","",vt(0,0,0),vt(2,2,6))
  211. local msh8=mesh("SpecialMesh",prt8,"Wedge","",vt(0,0,0),vt(3,2,6))
  212. local msh9=mesh("BlockMesh",prt9,"","",vt(0,0,0),vt(5.99,1.99,3))
  213. local msh10=mesh("BlockMesh",prt10,"","",vt(0,0,0),vt(1.99,17,3))
  214. local msh11=mesh("SpecialMesh",prt11,"Wedge","",vt(0,0,0),vt(15,2,.5))
  215. local msh12=mesh("SpecialMesh",prt12,"Wedge","",vt(0,0,0),vt(1,2,1))
  216. local msh13=mesh("SpecialMesh",prt13,"Wedge","",vt(0,0,0),vt(1,2,1))
  217. local msh14=mesh("BlockMesh",prt14,"","",vt(0,0,0),vt(3,13,2))
  218. local msh15=mesh("CylinderMesh",prt15,"","",vt(0,0,0),vt(3,1.99,3))
  219. local msh16=mesh("BlockMesh",prt16,"","",vt(0,0,0),vt(2,12,2))
  220. local msh17=mesh("BlockMesh",prt17,"","",vt(0,0,0),vt(3.1,2,2.1))
  221. local msh18=mesh("BlockMesh",prt18,"","",vt(0,0,0),vt(3.2,1,2.2))
  222. local msh19=mesh("BlockMesh",prt19,"","",vt(0,0,0),vt(3.1,2,2.1))
  223. local msh20=mesh("BlockMesh",prt20,"","",vt(0,0,0),vt(3.2,1,2.2))
  224.  
  225. local hwld=weld(handle,handle,Torso,euler(0,3.14,2)*cf(3,-1.2,-.7))
  226. local wld1=weld(prt1,prt1,handle,euler(0,0,0)*cf(-.2,-3.5,0))
  227. local wld2=weld(prt2,prt2,prt1,euler(1.57,0,0)*cf(.3,-2,0))
  228. local wld3=weld(prt3,prt3,prt1,euler(0,0,0)*cf(-.1,-2,0))
  229. local wld4=weld(prt4,prt4,prt1,euler(0,1.57,0)*cf(-.4,-2.4,0))
  230. local wld5=weld(prt5,prt5,prt1,euler(0,-1.57,0)*cf(.3,-2.4,0))
  231. local wld6=weld(prt6,prt6,prt1,euler(0,0,0)*cf(-.8,-2,0))
  232. local wld7=weld(prt7,prt7,prt1,euler(0,1.57,1.57)*cf(-.8,-1.1,0))
  233. local wld8=weld(prt8,prt8,prt1,euler(0,-1.57,0)*cf(0,-2,.3))
  234. local wld9=weld(prt9,prt9,prt1,euler(0,0,0)*cf(0,1.8,.3))
  235. local wld10=weld(prt10,prt10,prt1,euler(0,0,0)*cf(-.4,-.1,.3))
  236. local wld11=weld(prt11,prt11,prt1,euler(0,0,-1.57)*cf(-.4,-.1,.65))
  237. local wld12=weld(prt12,prt12,prt1,euler(0,0,-1.57)*cf(-.4,1.5,.7))
  238. local wld13=weld(prt13,prt13,prt1,euler(0,0,-1.57)*cf(-.4,-1.7,.7))
  239. local wld14=weld(prt14,prt14,prt1,euler(0,0,0)*cf(0.3,3.3,0))
  240. local wld15=weld(prt15,prt15,prt1,euler(1.57,0,0)*cf(0.3,4.6,0))
  241. local wld16=weld(prt16,prt16,prt1,euler(0,0,0)*cf(0.21,3.1,0.1))
  242. local wld17=weld(prt17,prt17,prt14,euler(0,0,0)*cf(0,-0.5,0))
  243. local wld18=weld(prt18,prt18,prt17,euler(0,0,0)*cf(0,0,0))
  244. local wld19=weld(prt19,prt19,prt14,euler(0,0,0)*cf(0,0.2,0))
  245. local wld20=weld(prt20,prt20,prt19,euler(0,0,0)*cf(0,0,0))
  246.  
  247. num=1.55
  248. num2=5.15
  249. for i=1,14 do --11
  250. local key=part(3,modelzorz,0.1,0,BrickColor.new("Light stone grey"),"Key",vt())
  251. local kmsh=mesh("BlockMesh",key,"","",vt(0,0,0),vt(4,1,1))
  252. local kwld=weld(key,key,prt10,euler(0,0,0)*cf(.6,num,0))
  253. local sou=Instance.new("Sound",key)
  254. sou.Volume=5
  255. sou.Pitch=num2
  256. sou.SoundId="http://www.roblox.com/asset/?id=1079839"
  257. table.insert(KeysC0,euler(0,0,0)*cf(.6,num,0))
  258. table.insert(Keys,key)
  259. table.insert(KeysWeld,kwld)
  260. num=num-0.24
  261. num2=num2-0.15
  262. end
  263.  
  264. num=1.45
  265. for i=1,13 do
  266. if i~=4 and i~=7 and i~=11 then
  267. local prt18=part(3,modelzorz,0.1,0,BrickColor.new("Black"),"Part18",vt())
  268. local msh18=mesh("BlockMesh",prt18,"","",vt(0,0,0),vt(3,1,1.1))
  269. local wld18=weld(prt18,prt18,prt10,euler(0,0,0)*cf(.4,num,0.1))
  270. end
  271. num=num-0.24
  272. end
  273.  
  274. local hitbox=part(3,nil,0,1,BrickColor.new("Black"),"Hitbox",vt(1,1,1))
  275. hitbox.Anchored=false
  276. local orb=part(3,nil,0,.5,BrickColor.new("Really red"),"Orb",vt(1,1,1))
  277. orb.Anchored=true
  278. local omsh=mesh("SpecialMesh",orb,"Sphere","",vt(0,0,0),vt(3,3,3))
  279. local osound=Instance.new("Sound",orb)
  280. osound.Volume=5
  281. osound.Pitch=1.3
  282. osound.Looped=true
  283. osound.SoundId="http://www.roblox.com/asset/?id=82277505"
  284.  
  285. if (script.Parent.className~="HopperBin") then
  286. Tool=Instance.new("HopperBin")
  287. Tool.Parent=Backpack
  288. Tool.Name="Magi Keytar"
  289. script.Parent=Tool
  290. end
  291. Bin=script.Parent
  292.  
  293. local bodvel=Instance.new("BodyVelocity")
  294. local bg=Instance.new("BodyGyro")
  295.  
  296. so = function(id,par,vol,pit)
  297. coroutine.resume(coroutine.create(function()
  298. local sou = Instance.new("Sound",par or workspace)
  299. sou.Volume=vol
  300. sou.Pitch=pit or 1
  301. sou.SoundId=id
  302. swait()
  303. sou:play()
  304. game:GetService("Debris"):AddItem(sou,6)
  305. end))
  306. end
  307.  
  308. function clerp(a,b,t)
  309. local qa = {QuaternionFromCFrame(a)}
  310. local qb = {QuaternionFromCFrame(b)}
  311. local ax, ay, az = a.x, a.y, a.z
  312. local bx, by, bz = b.x, b.y, b.z
  313. local _t = 1-t
  314. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  315. end
  316.  
  317. function QuaternionFromCFrame(cf)
  318. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  319. local trace = m00 + m11 + m22
  320. if trace > 0 then
  321. local s = math.sqrt(1 + trace)
  322. local recip = 0.5/s
  323. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  324. else
  325. local i = 0
  326. if m11 > m00 then
  327. i = 1
  328. end
  329. if m22 > (i == 0 and m00 or m11) then
  330. i = 2
  331. end
  332. if i == 0 then
  333. local s = math.sqrt(m00-m11-m22+1)
  334. local recip = 0.5/s
  335. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  336. elseif i == 1 then
  337. local s = math.sqrt(m11-m22-m00+1)
  338. local recip = 0.5/s
  339. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  340. elseif i == 2 then
  341. local s = math.sqrt(m22-m00-m11+1)
  342. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  343. end
  344. end
  345. end
  346.  
  347. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  348. local xs, ys, zs = x + x, y + y, z + z
  349. local wx, wy, wz = w*xs, w*ys, w*zs
  350. local xx = x*xs
  351. local xy = x*ys
  352. local xz = x*zs
  353. local yy = y*ys
  354. local yz = y*zs
  355. local zz = z*zs
  356. 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))
  357. end
  358.  
  359. function QuaternionSlerp(a, b, t)
  360. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  361. local startInterp, finishInterp;
  362. if cosTheta >= 0.0001 then
  363. if (1 - cosTheta) > 0.0001 then
  364. local theta = math.acos(cosTheta)
  365. local invSinTheta = 1/math.sin(theta)
  366. startInterp = math.sin((1-t)*theta)*invSinTheta
  367. finishInterp = math.sin(t*theta)*invSinTheta
  368. else
  369. startInterp = 1-t
  370. finishInterp = t
  371. end
  372. else
  373. if (1+cosTheta) > 0.0001 then
  374. local theta = math.acos(-cosTheta)
  375. local invSinTheta = 1/math.sin(theta)
  376. startInterp = math.sin((t-1)*theta)*invSinTheta
  377. finishInterp = math.sin(t*theta)*invSinTheta
  378. else
  379. startInterp = t-1
  380. finishInterp = t
  381. end
  382. end
  383. 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
  384. end
  385.  
  386. function hideanim()
  387. equipped=false
  388. so("http://roblox.com/asset/?id=161006212",handle,.6,.6)
  389. for i=0,1,0.1 do
  390. swait()
  391. hwld.C0=clerp(hwld.C0,euler(.2,.5,.2)*cf(0,1,0),.3)
  392. Neck.C0=clerp(Neck.C0,necko*euler(-.2,0,.8),.3)
  393. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0.5),.3)
  394. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,0.1),.3)
  395. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  396. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(3.8,0,-1),.3)
  397. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  398. end
  399. hwld.Part1=Torso
  400. hwld.C0=euler(0,3.14,2)*cf(3,-1.2,-.7)
  401. for i=0,1,0.1 do
  402. swait()
  403. Neck.C0=clerp(Neck.C0,necko*euler(0,0,0),.3)
  404. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  405. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,0),.3)
  406. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  407. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,0),.3)
  408. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  409. RH.C0=clerp(RH.C0,RHC0,.2)
  410. RH.C1=clerp(RH.C1,RHC1,.2)
  411. LH.C0=clerp(LH.C0,LHC0,.2)
  412. LH.C1=clerp(LH.C1,LHC1,.2)
  413. end
  414. end
  415.  
  416. function equipanim()
  417. equipped=true
  418. for i=0,1,0.1 do
  419. swait()
  420. Neck.C0=clerp(Neck.C0,necko*euler(-.2,0,.8),.3)
  421. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0.5),.3)
  422. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,0.1),.3)
  423. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  424. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(3.8,0,-1),.3)
  425. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  426. end
  427. hwld.Part1=LeftArm
  428. hwld.C0=euler(.2,.5,.2)*cf(0,1,0)
  429. so("http://roblox.com/asset/?id=161006212",handle,1,1)
  430. for i=0,1,0.15 do
  431. swait()
  432. hwld.C0=clerp(hwld.C0,cf(0,1,1)*euler(1.57,3,0),.4)
  433. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.8),.3)
  434. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  435. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,0.3),.3)
  436. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  437. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(2,0,-1.3),.3)
  438. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  439. end
  440. so("http://roblox.com/asset/?id=161006195",handle,1,1)
  441. for i=0,1,0.1 do
  442. swait()
  443. hwld.C0=clerp(hwld.C0,cf(0,1,1)*euler(1.57,6,0),.3)
  444. Neck.C0=clerp(Neck.C0,necko*euler(-.2,0,.6),.3)
  445. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  446. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,0.6),.3)
  447. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  448. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(2.5,0,-.8),.3)
  449. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  450. end
  451. for i=0,1,0.1 do
  452. swait()
  453. hwld.C0=clerp(hwld.C0,euler(0,-.5,0)*cf(0,1,1)*euler(.7,1.9,0),.3)
  454. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.3),.3)
  455. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-.3),.3)
  456. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(.8,0,0.2),.3)
  457. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  458. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.2,0,-.8),.3)
  459. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  460. end
  461. end
  462.  
  463. function attackone()
  464. attack=true
  465. so("http://roblox.com/asset/?id=161006221",handle,1,1)
  466. for i=0,1,0.1 do
  467. swait()
  468. --hwld.C0=clerp(hwld.C0,euler(0,-.5,0)*cf(0,1,1)*euler(.7,1.9,0),.3)
  469. hwld.C0=euler(0,-.5-(1.07+5.8)*i,0)*cf(-.2*i,1-.4*i,1)*euler(.7+0.1*i,1.9-0.4*i,0)
  470. Neck.C0=clerp(Neck.C0,necko*euler(.2,0,0),.3)
  471. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  472. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.8,0,-.2),.3)
  473. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  474. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.4,0,-.8),.3)
  475. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  476. RH.C0=clerp(RH.C0,RHC0,.3)
  477. LH.C0=clerp(LH.C0,LHC0,.3)
  478. end
  479. for i=0,1,0.1 do
  480. swait()
  481. hwld.C0=clerp(hwld.C0,euler(0,-1.7,0)*cf(-.2,.6,1)*euler(.8,1.5,0),.3)
  482. end
  483. for i=0,1,0.05 do
  484. swait()
  485. if i==0 then
  486. KeyPress("v",false)
  487. elseif i==0.3 then
  488. KeyPress("b",false)
  489. end
  490. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.7,0,.2),.2)
  491. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  492. end
  493. --[[
  494. MagniDamage(Torso,25,5,15,math.random(20,40),"Knockdown2")
  495. MagicWave(BrickColor.new("Bright yellow"),cf(Torso.Position)*cf(0,-2,0),1,1,1,1.5,0.5,1.5,0.05)
  496. so("http://www.roblox.com/asset/?id=161006033",Torso,1,3)
  497. so("http://www.roblox.com/asset/?id=10756104",Torso,1,2)
  498. ]]
  499. local hit,pos=rayCast(orb.Position,(CFrame.new(orb.Position,orb.Position - Vector3.new(0,1,0))).lookVector,200,modelzorz)
  500. if hit~=nil then
  501. local ref=part(3,workspace,0,1,BrickColor.new("Black"),"Effect",vt())
  502. ref.Anchored=true
  503. ref.CFrame=cf(pos)
  504. game:GetService("Debris"):AddItem(ref,1)
  505. for i=1,3 do
  506. Lightning(orb.Position,pos,5,1,"Bright yellow",.1,.5,.5)
  507. end
  508. MagniDamage(orb,30,5,10,math.random(30,50),"Knockdown2")
  509. MagicWave(BrickColor.new("Bright yellow"),cf(ref.Position),1,1,1,1.5,0.5,1.5,0.05)
  510. so("http://www.roblox.com/asset/?id=161006033",ref,1,3)
  511. so("http://www.roblox.com/asset/?id=10756104",ref,1,2)
  512. end
  513. MagicBlock(BrickColor.new("Bright red"),cf(orb.Position)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1,1,1,3,3,3,0.05,2)
  514. orb.Parent=nil
  515. swait(10)
  516. attack=false
  517. end
  518.  
  519. function attacktwo()
  520. attack=true
  521. for i=0,1,0.1 do
  522. swait()
  523. hwld.C0=clerp(hwld.C0,euler(0,-.5,0)*cf(0,1,1)*euler(.7,1.9,0),.3)
  524. Neck.C0=clerp(Neck.C0,necko*euler(0,0,1.3)*euler(-.1,0,0),.3)
  525. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-1.3),.3)
  526. RW.C0=clerp(RW.C0,cf(.6,0.3,-.5)*euler(.6,0,-1),.3)
  527. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  528. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.2,0,-.8),.3)
  529. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  530. RH.C0=clerp(RH.C0,cf(.5,-1,-.5)*euler(0,1.57,0)*euler(0,1.3,0),.3)
  531. LH.C0=clerp(LH.C0,cf(-.5,-1,.5)*euler(0,-1.57,0)*euler(0,1.3,0),.3)
  532. end
  533. KeyPress("z",false)
  534. for i=0,1,0.1 do
  535. swait()
  536. if i==0.6 then
  537. KeyPress("v",false)
  538. end
  539. RW.C0=clerp(RW.C0,cf(1.2,0.4,-.3)*euler(.5,0,-.2),.3)
  540. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  541. end
  542. MagicBlock(BrickColor.new("Bright red"),cf(prt15.Position)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1,1,1,2,2,2,0.05,2)
  543. so("http://www.roblox.com/asset/?id=153092334",prt15,1,1)
  544. so("http://www.roblox.com/asset/?id=192603389",prt15,1,1)
  545. local TheHit=MMouse.Hit.p
  546. local MouseLook=cf((prt15.Position+TheHit)/2,TheHit)
  547. local hit,pos=rayCast(prt15.Position,MouseLook.lookVector,200,modelzorz)
  548. if hit~=nil then
  549. Damagefunc(hit,5,10,math.random(10,20),"Knockdown2",RootPart,0,1,1)
  550. end
  551. orb.Parent=workspace
  552. orb.CFrame=cf(pos)+vt(0,1,0)
  553. for i=1,30 do
  554. swait()
  555. MagicBlock(BrickColor.new("Bright red"),cf(prt15.Position)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1,1,1,1,1,1,0.1,2)
  556. Lightning(prt15.Position,pos,5,1,"Bright red",.1,.5,.03)
  557. end
  558. attack=false
  559. end
  560.  
  561. function attackthree()
  562. attack=true
  563. for i=0,1,0.1 do
  564. swait()
  565. hwld.C0=clerp(hwld.C0,euler(0,0,0)*cf(0,1,.8)*euler(.5,2.5,0),.3)
  566. Neck.C0=clerp(Neck.C0,necko*euler(0,0,1.6)*euler(-.1,0,0),.3)
  567. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-1.6),.3)
  568. RW.C0=clerp(RW.C0,cf(1,0.3,-.5)*euler(.8,0,-.4),.3)
  569. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  570. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(2.5,0,-.6),.3)
  571. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  572. RH.C0=clerp(RH.C0,cf(.5,-1,-.5)*euler(0,1.57,0)*euler(0,1.3,0),.3)
  573. LH.C0=clerp(LH.C0,cf(-.5,-1,.5)*euler(0,-1.57,0)*euler(0,1.3,0),.3)
  574. end
  575. KeyPress("c",false)
  576. for i=0,1,0.1 do
  577. swait()
  578. hwld.C0=clerp(hwld.C0,euler(0,0,0)*cf(0,1,.8)*euler(.5,2.3,0),.3)
  579. Neck.C0=clerp(Neck.C0,necko*euler(0,0,1.6)*euler(-.1,0,0),.3)
  580. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-1.6),.3)
  581. RW.C0=clerp(RW.C0,cf(1,0.3,-.3)*euler(.6,0,-.6),.3)
  582. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  583. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(2.6,0,-.4),.3)
  584. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  585. end
  586. MagniDamage(orb,15,5,10,math.random(-30,-20),"Knockdown2")
  587. local ref=part(3,workspace,0,1,BrickColor.new("Black"),"Effect",vt())
  588. ref.Anchored=true
  589. ref.CFrame=cf(orb.Position)
  590. game:GetService("Debris"):AddItem(ref,.5)
  591. so("http://www.roblox.com/asset/?id=87784452",ref,1,2)
  592. so("http://www.roblox.com/asset/?id=169380598",ref,1,2)
  593. MagicCircle(BrickColor.new("Bright yellow"),cf(orb.Position),1,1,1,10,10,10,0.1)
  594. MagicBlock(BrickColor.new("Bright yellow"),cf(orb.Position)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1,1,1,3,3,3,0.05,1)
  595. MagicBlock(BrickColor.new("Bright red"),cf(orb.Position)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1,1,1,2.5,2.5,2.5,0.02,2)
  596. swait(10)
  597. attack=false
  598. end
  599.  
  600. function KeyPress(keyp,RWCan)
  601. keypress=true
  602. keynum=0
  603. RWC0=cf(1.5,0.5,0)*euler(.8,0,0.2)
  604. if keyp=="z" then
  605. keynum=2
  606. RWC0=cf(.6,0.3,-.5)*euler(.6,0,-1)
  607. elseif keyp=="x" then
  608. keynum=4
  609. RWC0=cf(.8,0.4,-.5)*euler(.6,0,-.8)
  610. elseif keyp=="c" then
  611. keynum=6
  612. RWC0=cf(1,0.4,-.5)*euler(.5,0,-.5)
  613. elseif keyp=="v" then
  614. keynum=8
  615. RWC0=cf(1.2,0.5,-.3)*euler(.5,0,-.2)
  616. elseif keyp=="b" then
  617. keynum=10
  618. RWC0=cf(1.5,0.5,-.2)*euler(.5,0,0)
  619. elseif keyp=="n" then
  620. keynum=12
  621. RWC0=cf(1.5,0.4,-.1)*euler(.5,0,.2)
  622. elseif keyp=="m" then
  623. keynum=14
  624. RWC0=cf(1.5,0.3,-.1)*euler(.4,0,.8)
  625. end
  626. Keys[keynum].Sound:Play()
  627. coroutine.resume(coroutine.create(function(Num,CeOh,Weld)
  628. --local Num=KeysC0[keynum]
  629. --local CeOh=KeysWeld[keynum].C0
  630. for j=0,1,0.1 do
  631. swait()
  632. if RWCan==true then
  633. RW.C0=clerp(RW.C0,RWC0,.4)
  634. end
  635. Weld.C0=clerp(CeOh,Num*euler(0,-.2,0),.25)
  636. end
  637. keypress=false
  638. for j=0,1,0.2 do
  639. swait()
  640. Weld.C0=clerp(CeOh,Num*euler(0,0,0),.4)
  641. end
  642. end),KeysC0[keynum],KeysWeld[keynum].C0,KeysWeld[keynum])
  643. end
  644.  
  645. function KeyStopSound(keyp)
  646. if keyp=="z" then
  647. keynum=2
  648. elseif keyp=="x" then
  649. keynum=4
  650. elseif keyp=="c" then
  651. keynum=6
  652. elseif keyp=="v" then
  653. keynum=8
  654. elseif keyp=="b" then
  655. keynum=10
  656. elseif keyp=="n" then
  657. keynum=12
  658. elseif keyp=="m" then
  659. keynum=14
  660. end
  661. Keys[keynum].Sound:Stop()
  662. end
  663.  
  664. function DreamHarmony()
  665. attack=true
  666. local TheHit=MMouse.Hit.p
  667. local MouseLook=cf((prt15.Position+TheHit)/2,TheHit)
  668. local hit,pos=rayCast(prt15.Position,MouseLook.lookVector,500,modelzorz)
  669. if hit~=nil and hit.Parent:findFirstChild("Humanoid")~=nil and hit.Parent:findFirstChild("Torso")~=nil then
  670. hum=hit.Parent.Humanoid
  671. Tors=hit.Parent.Torso
  672. if #Allies>0 then
  673. for i=1,#Allies do
  674. if hit.Parent~=Allies[i] then
  675. table.insert(Allies,hit.Parent)
  676. end
  677. end
  678. else
  679. table.insert(Allies,hit.Parent)
  680. end
  681. for i=0,1,0.15 do
  682. swait()
  683. hwld.C0=clerp(hwld.C0,euler(0,-.5,0)*cf(0,1,1)*euler(.7,1.9,0),.35)
  684. Neck.C0=clerp(Neck.C0,necko*euler(0,0,1.3)*euler(0,0,0),.35)
  685. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-1.3),.35)
  686. RW.C0=clerp(RW.C0,cf(1,0.3,-.3)*euler(.6,0,-.2),.35)
  687. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.35)
  688. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.2,0,-.8),.35)
  689. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.35)
  690. RH.C0=clerp(RH.C0,cf(.5,-1,-.5)*euler(0,1.57,0)*euler(0,1.3,0),.3)
  691. LH.C0=clerp(LH.C0,cf(-.5,-1,.5)*euler(0,-1.57,0)*euler(0,1.3,0),.3)
  692. end
  693. so("http://roblox.com/asset/?id=2101144",prt15,1,1)
  694. for i=1,100 do
  695. swait(1)
  696. if i%10==0 then
  697. so("http://roblox.com/asset/?id=153092334",Tors,1,3)
  698. heal=1
  699. hum.Health=hum.Health+heal
  700. MagicBlock(BrickColor.new("White"),cf(Tors.Position)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1,1,1,3,3,3,0.08,2)
  701. end
  702. if i%5==0 then
  703. derppos=Tors.Position+vt(math.random(-500,500)/100,10,math.random(-500,500)/100)
  704. local hitef,posef=rayCast(derppos,(CFrame.new(derppos,derppos - Vector3.new(0,1,0))).lookVector,100,Tors.Parent)
  705. if hitef~=nil then
  706. MagicCircle(BrickColor.new("White"),cf(posef),1,2,1,1,8,1,.1)
  707. end
  708. end
  709. Lightning(prt15.Position,Tors.Position,5,1,"White",.1,.5,.03)
  710. end
  711. end
  712. swait(10)
  713. attack=false
  714. end
  715.  
  716. function NightmareDiscord()
  717. attack=true
  718. local TheHit=MMouse.Hit.p
  719. local MouseLook=cf((prt15.Position+TheHit)/2,TheHit)
  720. local hit,pos=rayCast(prt15.Position,MouseLook.lookVector,500,modelzorz)
  721. if hit~=nil and hit.Parent:findFirstChild("Humanoid")~=nil and hit.Parent:findFirstChild("Torso")~=nil then
  722. hum=hit.Parent.Humanoid
  723. Tors=hit.Parent.Torso
  724. for i=1,#Allies do
  725. if hit.Parent==Allies[i] then
  726. table.remove(Allies,i)
  727. end
  728. end
  729. for i=0,1,0.15 do
  730. swait()
  731. hwld.C0=clerp(hwld.C0,euler(0,-.5,0)*cf(0,1,1)*euler(.7,1.9,0),.35)
  732. Neck.C0=clerp(Neck.C0,necko*euler(0,0,1.3)*euler(0,0,0),.35)
  733. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-1.3),.35)
  734. RW.C0=clerp(RW.C0,cf(1,0.3,-.3)*euler(.6,0,-.2),.35)
  735. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.35)
  736. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.2,0,-.8),.35)
  737. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.35)
  738. RH.C0=clerp(RH.C0,cf(.5,-1,-.5)*euler(0,1.57,0)*euler(0,1.3,0),.3)
  739. LH.C0=clerp(LH.C0,cf(-.5,-1,.5)*euler(0,-1.57,0)*euler(0,1.3,0),.3)
  740. end
  741. so("http://www.roblox.com/asset/?id=3264923",prt15,1,1)
  742. for i=1,100 do
  743. swait(1)
  744. if hum.WalkSpeed>=10 then
  745. hum.WalkSpeed=10
  746. end
  747. if i%10==0 then
  748. so("http://www.roblox.com/asset/?id=160773067",Tors,.6,3)
  749. Damagefunc(hit,1,3,0,"Normal",RootPart,0,1,0)
  750. MagicBlock(BrickColor.new("Black"),cf(Tors.Position)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1,1,1,3,3,3,0.08,2)
  751. end
  752. if i%2==0 then
  753. MagicCircle(BrickColor.new("Black"),cf(Tors.Position)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1,1,1,.1,10,.1,.1)
  754. end
  755. Lightning(prt15.Position,Tors.Position,5,1,"Black",.1,.5,.03)
  756. end
  757. hum.WalkSpeed=16
  758. end
  759. attack=false
  760. end
  761.  
  762. function DistuneField()
  763. attack=true
  764. Humanoid.WalkSpeed=0
  765. for i=0,1,0.1 do
  766. swait()
  767. hwld.C0=clerp(hwld.C0,euler(0,-1.7,0)*cf(-.2,.6,1)*euler(.8,1.5,0),.3)
  768. Neck.C0=clerp(Neck.C0,necko*euler(0,0,0),.3)
  769. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  770. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.8,0,-.2),.3)
  771. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  772. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.2,0,-.8),.3)
  773. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  774. RH.C0=clerp(RH.C0,RHC0,.3)
  775. LH.C0=clerp(LH.C0,LHC0,.3)
  776. end
  777. so("http://roblox.com/asset/?id=192597368",RootPart,1,1)
  778. MagicWave(BrickColor.new("Bright yellow"),cf(RootPart.Position)*cf(0,-2,0),1,1,1,1.3,0.5,1.3,0.02)
  779. MagicCircle(BrickColor.new("New Yeller"),cf(RootPart.Position),1,1,1,20,20,20,0.05)
  780. MagniDamage(RootPart,40,10,20,math.random(30,50),"Knockdown2",true)
  781. for i=0,1,0.1 do
  782. swait()
  783. MagicNote(BrickColor:random(),RootPart.CFrame*cf(math.random(-10,10),math.random(-10,10),math.random(-10,10))*euler(1.57,0,math.random(-50,50)),.1,.1,.1,0,0,0,.02)
  784. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.57,0,1),.3)
  785. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  786. end
  787. for i=1,20 do
  788. swait(1)
  789. MagicNote(BrickColor:random(),RootPart.CFrame*cf(math.random(-10,10),math.random(-10,10),math.random(-10,10))*euler(1.57,0,math.random(-50,50)),.1,.1,.1,0,0,0,.02)
  790. end
  791. swait(10)
  792. Humanoid.WalkSpeed=16
  793. attack=false
  794. end
  795.  
  796. function MelodyOrb()
  797. attack=true
  798. so("http://www.roblox.com/asset/?id=192603389",prt15,1,1.2)
  799. for i=0,1,0.15 do
  800. swait()
  801. hwld.C0=clerp(hwld.C0,euler(0,0,0)*cf(0,1,.8)*euler(.5,2.3,0),.35)
  802. Neck.C0=clerp(Neck.C0,necko*euler(0,0,1.6)*euler(-.1,0,0),.35)
  803. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-1.6),.35)
  804. RW.C0=clerp(RW.C0,cf(1,0.3,-.3)*euler(.6,0,-.6),.35)
  805. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.35)
  806. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(2.6,0,-.4),.35)
  807. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.35)
  808. RH.C0=clerp(RH.C0,cf(.5,-1,-.5)*euler(0,1.57,0)*euler(0,1.3,0),.35)
  809. LH.C0=clerp(LH.C0,cf(-.5,-1,.5)*euler(0,-1.57,0)*euler(0,1.3,0),.35)
  810. end
  811. local orb2=part(3,workspace,0,.5,BrickColor.new("Bright yellow"),"Orb",vt(1,1,1))
  812. orb2.Anchored=true
  813. local omsh=mesh("SpecialMesh",orb2,"Sphere","",vt(0,0,0),vt(2,2,2))
  814. local osound2=Instance.new("Sound",orb2)
  815. osound2.Volume=.5
  816. osound2.Pitch=1.2
  817. osound2.Looped=true
  818. osound2.SoundId="http://www.roblox.com/asset/?id=192603255"
  819. osound2:Play()
  820. orb2.CFrame=RootPart.CFrame*cf(0,0,-5)
  821. table.insert(Orbs,orb2)
  822. attack=false
  823. end
  824.  
  825. function Detonation()
  826. attack=true
  827. for i=0,1,0.1 do
  828. swait()
  829. hwld.C0=clerp(hwld.C0,euler(0,-1.7,0)*cf(-.2,.6,1)*euler(.8,1.5,0),.3)
  830. Neck.C0=clerp(Neck.C0,necko*euler(0,0,0),.3)
  831. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  832. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.8,0,-.2),.3)
  833. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  834. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.2,0,-.8),.3)
  835. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  836. RH.C0=clerp(RH.C0,RHC0,.3)
  837. LH.C0=clerp(LH.C0,LHC0,.3)
  838. end
  839. if #Orbs>0 then
  840. for i=1,#Orbs do
  841. MagniDamage(Orbs[1],15,10,20,math.random(20,30),"Knockdown2",true)
  842. local ref=part(3,workspace,0,1,BrickColor.new("Black"),"Effect",vt())
  843. ref.Anchored=true
  844. ref.CFrame=cf(Orbs[1].Position)
  845. game:GetService("Debris"):AddItem(ref,.5)
  846. --[[so("http://www.roblox.com/asset/?id=87784452",ref,1,2)
  847. so("http://www.roblox.com/asset/?id=169380598",ref,1,2) ]]
  848. so("http://roblox.com/asset/?id=192597368",ref,.6,1.4)
  849. MagicCircle(BrickColor.new("Bright yellow"),cf(Orbs[1].Position),1,1,1,10,10,10,0.1)
  850. MagicBlock(BrickColor.new("Bright yellow"),cf(Orbs[1].Position)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1,1,1,3,3,3,0.05,1)
  851. MagicBlock(BrickColor.new("Bright red"),cf(Orbs[1].Position)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1,1,1,2.5,2.5,2.5,0.02,2)
  852. for i=1,2 do
  853. MagicNote(BrickColor:random(),cf(Orbs[1].Position)*euler(1.57,0,math.random(-50,50)),.1,.1,.1,0,0,0,.02)
  854. end
  855. Orbs[1].Parent=nil
  856. table.remove(Orbs,1)
  857. end
  858. end
  859. for i=0,1,0.1 do
  860. swait()
  861. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.57,0,1),.3)
  862. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  863. end
  864. swait(10)
  865. attack=false
  866. end
  867.  
  868. function MelodyBlast()
  869. attack=true
  870. if MMouse.Target~=nil and MMouse.Target.Name=="Orb" then
  871. MainOrb=MMouse.Target
  872. orbget=true
  873. for i=0,1,0.1 do
  874. swait()
  875. hwld.C0=clerp(hwld.C0,euler(0,-.5,0)*cf(0,1,1)*euler(.7,1.9,0),.3)
  876. Neck.C0=clerp(Neck.C0,necko*euler(0,0,1.3)*euler(0,0,0),.3)
  877. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-1.3),.3)
  878. RW.C0=clerp(RW.C0,cf(1,0.3,-.3)*euler(.6,0,-.2),.3)
  879. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  880. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.2,0,-.8),.3)
  881. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  882. RH.C0=clerp(RH.C0,cf(.5,-1,-.5)*euler(0,1.57,0)*euler(0,1.3,0),.3)
  883. LH.C0=clerp(LH.C0,cf(-.5,-1,.5)*euler(0,-1.57,0)*euler(0,1.3,0),.3)
  884. end
  885. effect("Bright yellow",.2,MainOrb.CFrame,prt15.CFrame)
  886. so("http://roblox.com/asset/?id=192603389",prt15,1,1)
  887. while orbget==true do
  888. swait()
  889. MainOrb.CFrame=prt15.CFrame
  890. end
  891. so("http://roblox.com/asset/?id=192603356",prt15,1,1)
  892. local MainPos=MainOrb.Position
  893. local MainPos2=MMouse.Hit.p
  894. local MouseLook=cf((MainPos+MainPos2)/2,MainPos2)
  895. local num=30
  896. coroutine.resume(coroutine.create(function(Pos1,Pos2,Look)
  897. repeat
  898. swait()
  899. local ohit,opos=rayCast(Pos1,Look.lookVector,5,Character)
  900. MainOrb.CFrame=CFrame.new((Pos1+opos)/2,opos)
  901. Pos1=Pos1+(Look.lookVector*5)
  902. MainOrb.CFrame=CFrame.new(MainOrb.Position,MMouse.Hit.p)
  903. if ohit~=nil then
  904. num=0
  905. MagniDamage(MainOrb,15,10,20,math.random(10,20),"Knockdown2")
  906. local ref=part(3,workspace,0,1,BrickColor.new("Black"),"Effect",vt())
  907. ref.Anchored=true
  908. ref.CFrame=cf(MainOrb.Position)
  909. game:GetService("Debris"):AddItem(ref,.5)
  910. so("http://www.roblox.com/asset/?id=87784452",ref,1,2.3)
  911. so("http://www.roblox.com/asset/?id=169380598",ref,1,2.3)
  912. MagicCircle(BrickColor.new("Bright yellow"),cf(MainOrb.Position),1,1,1,10,10,10,0.1)
  913. MagicBlock(BrickColor.new("Bright yellow"),cf(MainOrb.Position)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1,1,1,3,3,3,0.05,1)
  914. MagicBlock(BrickColor.new("Bright red"),cf(MainOrb.Position)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1,1,1,2.5,2.5,2.5,0.02,2)
  915. for i=1,2 do
  916. MagicNote(BrickColor:random(),cf(MainOrb.Position)*euler(1.57,0,math.random(-50,50)),.1,.1,.1,0,0,0,.02)
  917. end
  918. end
  919. --MainOrb.CFrame=MainOrb.CFrame+MainOrb.CFrame.lookVector * 1
  920. num=num-1
  921. until num<=0
  922. end),MainPos,MainPos2,MouseLook)
  923. --[[local TheHit=MMouse.Hit.p
  924. local MouseLook=cf((prt15.Position+TheHit)/2,TheHit)
  925. MainOrb.CFrame=MouseLook.lookVector]]
  926. else
  927. mana=mana+15
  928. end
  929. attack=false
  930. end
  931.  
  932. function MagniDamage(Part,magni,mindam,maxdam,knock,Type,Heal)
  933. for _,c in pairs(workspace:children()) do
  934. local hum=c:findFirstChild("Humanoid")
  935. if hum~=nil then
  936. local head=c:findFirstChild("Torso")
  937. if head~=nil then
  938. local targ=head.Position-Part.Position
  939. local mag=targ.magnitude
  940. if mag<=magni and c.Name~=Player.Name then
  941. Damagefunc(head,mindam,maxdam,knock,Type,Part,.2,1,3,1)
  942. if Heal~=nil and Heal==true then
  943. print("derp")
  944. for i=1,#Allies do
  945. if head.Parent==Allies[i] then
  946. hnum=math.random(mindam,maxdam)
  947. hum.Health=hum.Health+hnum
  948. showDamage(head.Parent,hnum,.5,BrickColor.new("White"))
  949. end
  950. end
  951. end
  952. end
  953. end
  954. end
  955. end
  956. end
  957.  
  958. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  959. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  960. end
  961.  
  962. local Effects={}
  963. local Point=Torso.CFrame*cf(0,Torso.Size.Y,0)
  964. LastPoint=Point
  965. function effect(Color,Ref,LP,P1,returnn)
  966. local effectsmsh=Instance.new("CylinderMesh")
  967. effectsmsh.Scale=Vector3.new(0.2,1,0.2)
  968. effectsmsh.Name="Mesh"
  969. local effectsg=Instance.new("Part")
  970. effectsg.formFactor=3
  971. effectsg.CanCollide=false
  972. effectsg.Name="Eff"
  973. effectsg.Locked=true
  974. effectsg.Anchored=true
  975. effectsg.Size=Vector3.new(0.5,1,0.5)
  976. effectsg.Parent=workspace
  977. effectsmsh.Parent=effectsg
  978. effectsg.BrickColor=Color1
  979. effectsg.Reflectance=Ref
  980. local point1=P1
  981. local mg=(LP.p - point1.p).magnitude
  982. effectsg.Size=Vector3.new(0.5,mg,0.5)
  983. effectsg.CFrame=cf((LP.p+point1.p)/2,point1.p) * CFrame.Angles(math.rad(90),0,0)
  984. effectsmsh.Scale=Vector3.new(0.4,1,0.4)
  985. game:GetService("Debris"):AddItem(effectsg,2)
  986. if returnn then return effectsg end
  987. if not returnn then
  988. table.insert(Effects,{effectsg,"Cylinder",0.05,0.01,0,0.01,effectsmsh})
  989. end
  990. end
  991.  
  992. function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,Type)
  993. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
  994. prt.Anchored=true
  995. prt.CFrame=cframe
  996. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  997. game:GetService("Debris"):AddItem(prt,5)
  998. if Type==1 or Type==nil then
  999. table.insert(Effects,{prt,"Block1",delay,x3,y3,z3,msh})
  1000. elseif Type==2 then
  1001. table.insert(Effects,{prt,"Block2",delay,x3,y3,z3,msh})
  1002. end
  1003. end
  1004.  
  1005. function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  1006. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
  1007. prt.Anchored=true
  1008. prt.CFrame=cframe
  1009. local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
  1010. game:GetService("Debris"):AddItem(prt,2)
  1011. table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
  1012. end
  1013.  
  1014. function MagicWave(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  1015. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
  1016. prt.Anchored=true
  1017. prt.CFrame=cframe
  1018. local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=20329976",vt(0,0,0),vt(x1,y1,z1))
  1019. game:GetService("Debris"):AddItem(prt,5)
  1020. table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
  1021. end
  1022.  
  1023. function MagicNote(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,Type)
  1024. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
  1025. prt.Anchored=true
  1026. prt.CFrame=cframe
  1027. msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=1088207",vt(0,0,0),vt(x1,y1,z1))
  1028. --msh.TextureId="http://www.roblox.com/asset/?id=1088099"
  1029. game:GetService("Debris"):AddItem(prt,5)
  1030. table.insert(Effects,{prt,"Block3",delay,x3,y3,z3,msh,cf(math.random(-100,100)/100,math.random(-100,100)/100,math.random(-50,-10)/100)})
  1031. end
  1032.  
  1033. function Lightning(p0,p1,tym,ofs,col,th,tra,last)
  1034. --[[p0=pos1
  1035. p1=pos2
  1036. tym=times
  1037. ofs=offset
  1038. col=color
  1039. th=size
  1040. tra=transparency
  1041. last=lastingtime]]
  1042. local magz = (p0 - p1).magnitude local curpos = p0 local trz = {-ofs,ofs}
  1043. for i=1,tym do
  1044. local li = Instance.new("Part",workspace) li.TopSurface =0 li.BottomSurface = 0 li.Anchored = true li.Transparency = tra or 0.4 li.BrickColor = BrickColor.new(col)
  1045. li.formFactor = "Custom" li.CanCollide = false li.Size = Vector3.new(th,th,magz/tym) local ofz = Vector3.new(trz[math.random(1,2)],trz[math.random(1,2)],trz[math.random(1,2)])
  1046. local trolpos = CFrame.new(curpos,p1)*CFrame.new(0,0,magz/tym).p+ofz
  1047. if tym == i then
  1048. local magz2 = (curpos - p1).magnitude li.Size = Vector3.new(th,th,magz2)
  1049. li.CFrame = CFrame.new(curpos,p1)*CFrame.new(0,0,-magz2/2)
  1050. else
  1051. li.CFrame = CFrame.new(curpos,trolpos)*CFrame.new(0,0,magz/tym/2)
  1052. end
  1053. curpos = li.CFrame*CFrame.new(0,0,magz/tym/2).p game.Debris:AddItem(li,last)
  1054. end
  1055. end
  1056.  
  1057. Damagefunc=function(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,decreaseblock)
  1058. if hit.Parent==nil then
  1059. return
  1060. end
  1061. h=hit.Parent:FindFirstChild("Humanoid")
  1062. for _,v in pairs(hit.Parent:children()) do
  1063. if v:IsA("Humanoid") then
  1064. h=v
  1065. end
  1066. end
  1067. if hit.Parent.Parent:FindFirstChild("Torso")~=nil then
  1068. h=hit.Parent.Parent:FindFirstChild("Humanoid")
  1069. end
  1070. if hit.Parent.className=="Hat" then
  1071. hit=hit.Parent.Parent:findFirstChild("Head")
  1072. end
  1073. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  1074. if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end
  1075. for i=1,#Allies do
  1076. if hit.Parent==Allies[i] or hit.Parent.Parent==Allies[i] then print("noe ally") return end
  1077. end
  1078. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  1079. return
  1080. end]]
  1081. -- hs(hit,1.2)
  1082. c=Instance.new("ObjectValue")
  1083. c.Name="creator"
  1084. c.Value=game:service("Players").LocalPlayer
  1085. c.Parent=h
  1086. game:GetService("Debris"):AddItem(c,.5)
  1087. Damage=math.random(minim,maxim)
  1088. -- h:TakeDamage(Damage)
  1089. blocked=false
  1090. block=hit.Parent:findFirstChild("Block")
  1091. if block~=nil then
  1092. print(block.className)
  1093. if block.className=="NumberValue" then
  1094. if block.Value>0 then
  1095. blocked=true
  1096. if decreaseblock~=nil then
  1097. block.Value=block.Value-decreaseblock
  1098. end
  1099. end
  1100. end
  1101. if block.className=="IntValue" then
  1102. if block.Value>0 then
  1103. blocked=true
  1104. if decreaseblock~=nil then
  1105. block.Value=block.Value-decreaseblock
  1106. end
  1107. end
  1108. end
  1109. end
  1110. if blocked==false then
  1111. -- h:TakeDamage(Damage)
  1112. h.Health=h.Health-Damage
  1113. showDamage(hit.Parent,Damage,.5,BrickColor:Red())
  1114. else
  1115. h.Health=h.Health-(Damage/2)
  1116. showDamage(hit.Parent,Damage/2,.5,BrickColor.new("Bright blue"))
  1117. end
  1118. if Type=="Knockdown" then
  1119. hum=hit.Parent.Humanoid
  1120. hum.PlatformStand=true
  1121. coroutine.resume(coroutine.create(function(HHumanoid)
  1122. swait(1)
  1123. HHumanoid.PlatformStand=false
  1124. end),hum)
  1125. local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
  1126. --hit.CFrame=cf(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
  1127. local bodvol=Instance.new("BodyVelocity")
  1128. bodvol.velocity=angle*knockback
  1129. bodvol.P=5000
  1130. bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  1131. bodvol.Parent=hit
  1132. rl=Instance.new("BodyAngularVelocity")
  1133. rl.P=3000
  1134. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  1135. rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  1136. rl.Parent=hit
  1137. game:GetService("Debris"):AddItem(bodvol,.5)
  1138. game:GetService("Debris"):AddItem(rl,.5)
  1139. elseif Type=="Knockdown2" then
  1140. hum=hit.Parent.Humanoid
  1141. local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
  1142. --hit.CFrame=cf(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
  1143. local bodvol=Instance.new("BodyVelocity")
  1144. bodvol.velocity=angle*knockback
  1145. bodvol.P=5000
  1146. bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  1147. bodvol.Parent=hit
  1148. game:GetService("Debris"):AddItem(bodvol,.5)
  1149. --game:GetService("Debris"):AddItem(rl,.5)
  1150. elseif Type=="Normal" then
  1151. vp=Instance.new("BodyVelocity")
  1152. vp.P=500
  1153. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  1154. -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback
  1155. if KnockbackType==1 then
  1156. vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05
  1157. elseif KnockbackType==2 then
  1158. vp.velocity=Property.CFrame.lookVector*knockback
  1159. end
  1160. if knockback>0 then
  1161. vp.Parent=hit.Parent.Torso
  1162. end
  1163. game:GetService("Debris"):AddItem(vp,.5)
  1164. elseif Type=="Up" then
  1165. local bodyVelocity=Instance.new("BodyVelocity")
  1166. bodyVelocity.velocity=vt(0,30,0)
  1167. bodyVelocity.P=5000
  1168. bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  1169. bodyVelocity.Parent=hit
  1170. game:GetService("Debris"):AddItem(bodyVelocity,1)
  1171. rl=Instance.new("BodyAngularVelocity")
  1172. rl.P=3000
  1173. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  1174. rl.angularvelocity=Vector3.new(math.random(-2,2),math.random(-2,2),math.random(-2,2))
  1175. rl.Parent=hit
  1176. game:GetService("Debris"):AddItem(rl,.5)
  1177. elseif Type=="Snare" then
  1178. bp=Instance.new("BodyPosition")
  1179. bp.P=2000
  1180. bp.D=100
  1181. bp.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  1182. bp.position=hit.Parent.Torso.Position
  1183. bp.Parent=hit.Parent.Torso
  1184. game:GetService("Debris"):AddItem(bp,1)
  1185. end
  1186. debounce=Instance.new("BoolValue")
  1187. debounce.Name="DebounceHit"
  1188. debounce.Parent=hit.Parent
  1189. debounce.Value=true
  1190. game:GetService("Debris"):AddItem(debounce,Delay)
  1191. c=Instance.new("ObjectValue")
  1192. c.Name="creator"
  1193. c.Value=Player
  1194. c.Parent=h
  1195. game:GetService("Debris"):AddItem(c,.5)
  1196. CRIT=false
  1197. end
  1198. end
  1199.  
  1200. showDamage=function(Char,Dealt,du,Color)
  1201. m=Instance.new("Model")
  1202. m.Name=tostring(math.floor(Dealt))
  1203. h=Instance.new("Humanoid")
  1204. h.Health=0
  1205. h.MaxHealth=0
  1206. h.Parent=m
  1207. c=Instance.new("Part")
  1208. c.Transparency=0
  1209. c.BrickColor=Color
  1210. c.Name="Head"
  1211. c.TopSurface=0
  1212. c.BottomSurface=0
  1213. c.formFactor="Plate"
  1214. c.Size=Vector3.new(1,.4,1)
  1215. ms=Instance.new("CylinderMesh")
  1216. ms.Scale=Vector3.new(.8,.8,.8)
  1217. if CRIT==true then
  1218. ms.Scale=Vector3.new(1,1.25,1)
  1219. end
  1220. ms.Parent=c
  1221. c.Reflectance=0
  1222. Instance.new("BodyGyro").Parent=c
  1223. c.Parent=m
  1224. if Char:findFirstChild("Head")~=nil then
  1225. c.CFrame=cf(Char["Head"].CFrame.p+Vector3.new(0,1.5,0))
  1226. elseif Char.Parent:findFirstChild("Head")~=nil then
  1227. c.CFrame=cf(Char.Parent["Head"].CFrame.p+Vector3.new(0,1.5,0))
  1228. end
  1229. f=Instance.new("BodyPosition")
  1230. f.P=2000
  1231. f.D=100
  1232. f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  1233. f.position=c.Position+Vector3.new(0,3,0)
  1234. f.Parent=c
  1235. game:GetService("Debris"):AddItem(m,.5+du)
  1236. c.CanCollide=false
  1237. m.Parent=workspace
  1238. c.CanCollide=false
  1239. end
  1240.  
  1241. combo=0
  1242. function ob1d(mouse)
  1243. if orbget==true then
  1244. orbget=false
  1245. end
  1246. if attack==true or equipped==false then return end
  1247. hold=true
  1248. size=0
  1249. fenbarmana3:TweenSize(UDim2.new(4*0/100,0,0.2,0),nil,1,0.4,true)
  1250. Input=""
  1251. if combo==0 then
  1252. combo=1
  1253. attacktwo()
  1254. elseif combo==1 then
  1255. combo=2
  1256. attackthree()
  1257. elseif combo==2 then
  1258. combo=0
  1259. attackone()
  1260. end
  1261. coroutine.resume(coroutine.create(function()
  1262. for i=1,50 do
  1263. if attack==false then
  1264. swait()
  1265. end
  1266. end
  1267. if attack==false then
  1268. combo=0
  1269. orb.Parent=nil
  1270. end
  1271. end))
  1272. end
  1273.  
  1274. function ob1u(mouse)
  1275. hold = false
  1276. end
  1277.  
  1278. buttonhold = false
  1279.  
  1280. eul=0
  1281. size=0
  1282. holdz=false
  1283. equipped=false
  1284. function key(key)
  1285. if attack==true then return end
  1286. if key=="f" then
  1287. attack=true
  1288. if equipped==false then
  1289. equipped=true
  1290. RSH=ch.Torso["Right Shoulder"]
  1291. LSH=ch.Torso["Left Shoulder"]
  1292. --
  1293. RSH.Parent=nil
  1294. LSH.Parent=nil
  1295. --
  1296. RW.Name="Right Shoulder"
  1297. RW.Part0=ch.Torso
  1298. RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  1299. RW.C1=cf(0, 0.5, 0)
  1300. RW.Part1=ch["Right Arm"]
  1301. RW.Parent=ch.Torso
  1302. --
  1303. LW.Name="Left Shoulder"
  1304. LW.Part0=ch.Torso
  1305. LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  1306. LW.C1=cf(0, 0.5, 0)
  1307. LW.Part1=ch["Left Arm"]
  1308. LW.Parent=ch.Torso
  1309. --
  1310. equipanim()
  1311. else
  1312. equipped=false
  1313. hideanim()
  1314. swait(0)
  1315. RW.Parent=nil
  1316. LW.Parent=nil
  1317. RSH.Parent=player.Character.Torso
  1318. LSH.Parent=player.Character.Torso
  1319. end
  1320. attack=false
  1321. end
  1322. if equipped==false then return end
  1323. if key=="h" then
  1324. mana=100
  1325. end
  1326. if key=="j" then
  1327. if #Orbs>0 then
  1328. for i=1,#Orbs do
  1329. Orbs[1].Parent=nil
  1330. table.remove(Orbs,1)
  1331. end
  1332. end
  1333. end
  1334. if key=="q" then
  1335. mana=mana-size
  1336. fenbarmana3:TweenSize(UDim2.new(4*0/100,0,0.2,0),nil,1,0.4,true)
  1337. if size>0 then
  1338. MagicBlock(BrickColor.new("Bright red"),cf(prt15.Position)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1,1,1,2,2,2,0.1,2)
  1339. end
  1340. if Input=="xcz" then
  1341. print("dream")
  1342. DreamHarmony()
  1343. elseif Input=="nvm" then
  1344. print("nightmare")
  1345. NightmareDiscord()
  1346. elseif Input=="bvnc" then
  1347. print("distune")
  1348. DistuneField()
  1349. elseif Input=="zc" and #Orbs<3 then
  1350. print("melody")
  1351. MelodyOrb()
  1352. elseif Input=="vcm" then
  1353. print("detonate")
  1354. Detonation()
  1355. elseif Input=="vvc" then
  1356. print("mblast")
  1357. MelodyBlast()
  1358. end
  1359. Input=""
  1360. size=0
  1361. end
  1362. if (key=="z" or key=="x" or key=="c" or key=="v" or key=="b" or key=="n" or key=="m") and mana>=size then
  1363. Input=Input..key
  1364. if size<=40 then
  1365. size=size+5
  1366. fenbarmana3:TweenSize(UDim2.new(4*size/100,0,0.2,0),nil,1,0.4,true)
  1367. end
  1368. print(Input)
  1369. KeyPress(key,true)
  1370. coroutine.resume(coroutine.create(function()
  1371. while keypress==true do
  1372. swait()
  1373. end
  1374. for i=1,50 do
  1375. if keypress==false then
  1376. swait()
  1377. end
  1378. end
  1379. if keypress==false and attack==false then
  1380. size=0
  1381. fenbarmana3:TweenSize(UDim2.new(4*0/100,0,0.2,0),nil,1,0.4,true)
  1382. Input=""
  1383. print("ded")
  1384. end
  1385. end))
  1386. end
  1387. coroutine.resume(coroutine.create(function()
  1388. for i=1,50 do
  1389. if attack==false then
  1390. swait()
  1391. end
  1392. end
  1393. if attack==false then
  1394. combo=0
  1395. orb.Parent=nil
  1396. end
  1397. end))
  1398. end
  1399.  
  1400. function key2(key)
  1401. end
  1402.  
  1403. function s(mouse)
  1404. mouse.Button1Down:connect(function() ob1d(mouse) end)
  1405. mouse.Button1Up:connect(function() ob1u(mouse) end)
  1406. mouse.KeyDown:connect(key)
  1407. mouse.KeyUp:connect(key2)
  1408.  
  1409. player=Player
  1410. ch=Character
  1411. MMouse=mouse
  1412. end
  1413.  
  1414. function ds(mouse)
  1415. end
  1416.  
  1417. Bin.Selected:connect(s)
  1418. Bin.Deselected:connect(ds)
  1419. print("Cyber Virtuoso loaded.")
  1420.  
  1421. local mananum=0
  1422. local donum=0
  1423. local handidle=false
  1424. local orbnum=0
  1425. while true do
  1426. swait()
  1427. if #Orbs>0 then
  1428. for i=1,#Orbs do
  1429. if Humanoid.Health<=0 or Torso.Parent==nil then
  1430. Orbs[1].Parent=nil
  1431. table.remove(Orbs,1)
  1432. else
  1433. MagicBlock(BrickColor.new("New Yeller"),cf(Orbs[i].Position)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1,1,1,2,2,2,0.2,2)
  1434. end
  1435. end
  1436. end
  1437. if orb.Parent~=nil then
  1438. osound:Play()
  1439. if orbnum>=2 then
  1440. orbnum=0
  1441. MagicBlock(BrickColor.new("Bright red"),cf(orb.Position)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1,1,1,2,2,2,0.1,1)
  1442. end
  1443. orbnum=orbnum+1
  1444. else
  1445. osound:Pause()
  1446. end
  1447. if donum>=.5 then
  1448. handidle=true
  1449. elseif donum<=0 then
  1450. handidle=false
  1451. end
  1452. if handidle==false then
  1453. donum=donum+0.003
  1454. else
  1455. donum=donum-0.003
  1456. end
  1457. local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
  1458. local velderp=RootPart.Velocity.y
  1459. hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character)
  1460. if equipped==true then
  1461. if attack==false then
  1462. idle=idle+1
  1463. else
  1464. idle=0
  1465. end
  1466. if idle>=500 then
  1467. if attack==false then
  1468. --Sheath()
  1469. end
  1470. end
  1471. if RootPart.Velocity.y > 1 and hitfloor==nil then
  1472. Anim="Jump"
  1473. if attack==false then
  1474. Neck.C0=clerp(Neck.C0,necko*euler(-0.2,0,0),.3)
  1475. Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.3)
  1476. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  1477. if keypress==false then
  1478. for i=1,#KeysWeld do
  1479. KeysWeld[i].C0=clerp(KeysWeld[i].C0,KeysC0[i],.3)
  1480. end
  1481. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(.8,0,0.2),.3)
  1482. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1483. end
  1484. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.2,0,-.8),.3)
  1485. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1486. RH.C0=clerp(RH.C0,cf(1,-1,-.3)*euler(-0.5,1.57,0)*euler(-.2,0,0),.2)
  1487. LH.C0=clerp(LH.C0,cf(-1,-1,-.3)*euler(-0.5,-1.57,0)*euler(-.2,0,0),.2)
  1488. end
  1489. elseif RootPart.Velocity.y < -1 and hitfloor==nil then
  1490. Anim="Fall"
  1491. if attack==false then
  1492. Neck.C0=clerp(Neck.C0,necko*euler(0.4,0,0),.3)
  1493. Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.3)
  1494. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  1495. if keypress==false then
  1496. for i=1,#KeysWeld do
  1497. KeysWeld[i].C0=clerp(KeysWeld[i].C0,KeysC0[i],.3)
  1498. end
  1499. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(.8,0,0.2),.3)
  1500. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1501. end
  1502. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.2,0,-.8),.3)
  1503. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1504. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0.4,1.57,0),.2)
  1505. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(-0.2,-1.57,0),.2)
  1506. end
  1507. elseif torvel<1 and hitfloor~=nil then
  1508. Anim="Idle"
  1509. if attack==false then
  1510. hwld.C0=clerp(hwld.C0,euler(0,-.5,0)*cf(0,1,1)*euler(.7,1.9,0),.3)
  1511. Neck.C0=clerp(Neck.C0,necko*euler(.3,0,-.2),.3)
  1512. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-.3),.3)
  1513. if keypress==false then
  1514. for i=1,#KeysWeld do
  1515. KeysWeld[i].C0=clerp(KeysWeld[i].C0,KeysC0[i],.3)
  1516. end
  1517. RW.C0=clerp(RW.C0,cf(1.2,0.5,-.3)*euler(.8,0,-.4),.3)
  1518. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1519. end
  1520. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.2,0,-.8),.3)
  1521. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1522. RH.C0=clerp(RH.C0,RHC0,.3)
  1523. RH.C1=clerp(RH.C1,RHC1,.3)
  1524. LH.C0=clerp(LH.C0,LHC0,.3)
  1525. LH.C1=clerp(LH.C1,LHC1,.3)
  1526. end
  1527. elseif torvel>2 and torvel<22 and hitfloor~=nil then
  1528. Anim="Walk"
  1529. if attack==false then
  1530. hwld.C0=clerp(hwld.C0,euler(0,-.5,0)*cf(0,1,1)*euler(.7,1.9,0),.3)
  1531. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.6)*euler(-.1,0,0),.3)
  1532. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0.2,0,-.6),.3)
  1533. if keypress==false then
  1534. for i=1,#KeysWeld do
  1535. KeysWeld[i].C0=clerp(KeysWeld[i].C0,KeysC0[i],.3)
  1536. end
  1537. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(.8,0,0.2),.3)
  1538. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1539. end
  1540. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.2,0,-.8),.3)
  1541. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1542. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,.6,0),.3)
  1543. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,.6,0),.3)
  1544. end
  1545. elseif torvel>=22 and hitfloor~=nil then
  1546. Anim="Run"
  1547. if attack==false then
  1548. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.6)*euler(-.3,0,0),.3)
  1549. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0.3,0,-.6),.3)
  1550. if keypress==false then
  1551. for i=1,#KeysWeld do
  1552. KeysWeld[i].C0=clerp(KeysWeld[i].C0,KeysC0[i],.3)
  1553. end
  1554. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(.8,0,0.2),.3)
  1555. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1556. end
  1557. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.2,0,-.8),.3)
  1558. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1559. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,.6,0),.3)
  1560. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,.6,0),.3)
  1561. end
  1562. end
  1563. end
  1564. if #Effects>0 then
  1565. --table.insert(Effects,{prt,"Block1",delay})
  1566. for e=1,#Effects do
  1567. if Effects[e]~=nil then
  1568. --for j=1,#Effects[e] do
  1569. local Thing=Effects[e]
  1570. if Thing~=nil then
  1571. local Part=Thing[1]
  1572. local Mode=Thing[2]
  1573. local Delay=Thing[3]
  1574. local IncX=Thing[4]
  1575. local IncY=Thing[5]
  1576. local IncZ=Thing[6]
  1577. if Thing[1].Transparency<=1 then
  1578. if Thing[2]=="Block1" then
  1579. Thing[1].CFrame=Thing[1].CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  1580. Mesh=Thing[7]
  1581. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  1582. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1583. elseif Thing[2]=="Block2" then
  1584. Thing[1].CFrame=Thing[1].CFrame
  1585. Mesh=Thing[7]
  1586. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  1587. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1588. elseif Thing[2]=="Block3" then
  1589. Thing[1].CFrame=Thing[1].CFrame*Thing[8]
  1590. Mesh=Thing[7]
  1591. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  1592. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1593. elseif Thing[2]=="Cylinder" then
  1594. Mesh=Thing[7]
  1595. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  1596. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1597. elseif Thing[2]=="Blood" then
  1598. Mesh=Thing[7]
  1599. Thing[1].CFrame=Thing[1].CFrame*cf(0,.5,0)
  1600. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  1601. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1602. elseif Thing[2]=="Elec" then
  1603. Mesh=Thing[7]
  1604. Mesh.Scale=Mesh.Scale+vt(Thing[7],Thing[8],Thing[9])
  1605. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1606. elseif Thing[2]=="Disappear" then
  1607. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1608. end
  1609. else
  1610. Part.Parent=nil
  1611. table.remove(Effects,e)
  1612. end
  1613. end
  1614. --end
  1615. end
  1616. end
  1617. end
  1618. fenbarmana2:TweenSize(UDim2.new(4*mana/100,0,0.2,0),nil,1,0.4,true)
  1619. fenbarmana4.Text="Energy("..mana..")"
  1620. if mana>=100 then
  1621. mana=100
  1622. else
  1623. if mananum<=15 then
  1624. mananum=mananum+1
  1625. else
  1626. mananum=0
  1627. if Input=="" then
  1628. mana=mana+1
  1629. end
  1630. end
  1631. end
  1632. end
  1633. --[[
  1634. Copyrighted (C) Fenrier 2014
  1635. ]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement