Advertisement
Thefrozen106

Cyber Vitruoso (Keytar) (Edited)

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