Advertisement
NextFlamePB

ROBLOX Aero Board Script

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