Mr-Shadow_Cat

Duel Gauntlet vanilla

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