xx_g

fenrier keytar

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