Advertisement
Dark_EccentricYT

Untitled

Jun 23rd, 2018 (edited)
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 43.26 KB | None | 0 0
  1. ----Dragon By tjmax1490609
  2.  
  3. local Shared = nil
  4. if not Shared or game.Players.LocalPlayer.Name == Shared then
  5. wait(1/30)
  6. pcall(function()
  7. game.Players.LocalPlayer.Character.Animate.Disabled = true
  8. end)
  9. local active = true
  10. local player = game.Players.LocalPlayer
  11. local mouse = player:GetMouse()
  12. local stats = {
  13. ["Power"] = 10,
  14. ["HP"] = math.huge,
  15. ["HPRegen"] = math.huge,
  16. ["MP"] = math.huge,
  17. ["MPRegen"] = 10,
  18. ["MPCharge"] = 20,
  19. ["WalkSpeed"] = 16
  20. }
  21. local state = {}
  22. local c0 = {
  23. ["Neck"] = {Vector3.new(0,1.5,0),CFrame.Angles(math.pi/-2,0,0)},
  24. ["Right Shoulder"] = {Vector3.new(1.5,0.5,0),CFrame.Angles(0,math.pi/2,0)},
  25. ["Left Shoulder"] = {Vector3.new(-1.5,0.5,0),CFrame.Angles(0,math.pi/-2,0)},
  26. ["Right Hip"] = {Vector3.new(0.5,-1,0),CFrame.Angles(0,math.pi/2,0)},
  27. ["Left Hip"] = {Vector3.new(-0.5,-1,0),CFrame.Angles(0,math.pi/-2,0)}
  28. }
  29. local c1 = {
  30. ["Neck"] = CFrame.Angles(math.pi/-2,0,0),
  31. ["Right Shoulder"] = CFrame.new(0,0.5,0)*CFrame.Angles(0,math.pi/2,0),
  32. ["Left Shoulder"] = CFrame.new(0,0.5,0)*CFrame.Angles(0,math.pi/-2,0),
  33. ["Right Hip"] = CFrame.new(0,1,0)*CFrame.Angles(0,math.pi/2,0),
  34. ["Left Hip"] = CFrame.new(0,1,0)*CFrame.Angles(0,math.pi/-2,0)
  35. }
  36. local bodyPart = {}
  37. local limb = {}
  38. local humanoidState = {}
  39. local humanoidCurrentState = "Standing"
  40. for _,v in pairs({"Climbing","FallingDown","FreeFalling","GettingUp","Jumping","Ragdoll","Running","Seated","Strafing","Swimming"}) do
  41. local number = {"Running","Strafing","Climbing","Swimming"}
  42. for _,p in pairs(number) do number[p] = true end
  43. humanoidState[v] = {
  44. ["Connection"] = nil,
  45. ["Value"] = number[v] and 0 or false}
  46. end
  47. local humanoid
  48. local bpos
  49. local gyro
  50. local bvel
  51. local ui
  52. local skillName = {
  53. ["z"] = "Iron Fist",
  54. ["x"] = "Crushing Fang",
  55. ["c"] = "Flame Elbow",
  56. ["v"] = "Claw",
  57. ["g"] = "FireBreath",
  58. ["f"] = "Eagle",
  59. ["b"] = "Roar",
  60. ["n"] = "Wing Attack",
  61. ["m"] = "Sword Horn"
  62. }
  63. local skillFunc = {
  64. ["Iron Fist"] = function()
  65. local cam = workspace.CurrentCamera
  66. local target = CFrame.new(bodyPart.Torso.Position,mouse.Hit.p)
  67. local strength = state.MPCharge*stats.Power
  68. for i=1,5 do
  69. wait(1/30)
  70. gyro.cframe = target*CFrame.Angles(-math.pi/3,-math.pi/4,0)
  71. bodyPart.Torso.CFrame = bodyPart.Torso.CFrame+target.lookVector*2
  72. bodyPart.Torso.Velocity = Vector3.new()
  73. translateLimb("Neck",Vector3.new(math.pi/6,0,0),Vector3.new(),0.75)
  74. translateLimb("Right Shoulder",Vector3.new(0,-math.pi/3,math.pi/2),Vector3.new(),0.75)
  75. translateLimb("Left Shoulder",Vector3.new(0,-math.pi/8,-math.pi/1.5),Vector3.new(0.25,0,-0.25),0.75)
  76. translateLimb("Right Hip",Vector3.new(-math.pi/12,0,-math.pi/6),Vector3.new(0,0.75,-0.75),0.75)
  77. translateLimb("Left Hip",Vector3.new(-math.pi/12,0,-math.pi/12),Vector3.new(),0.75)
  78. flame(CFrame.new((bodyPart["Right Arm"].CFrame*CFrame.new(0,-1,0)).p)*CFrame.Angles((math.random()-0.5)*math.pi/4,0,(math.random()-0.5)*math.pi/4),state.MP,math.min(5,state.MPCharge))
  79. end
  80. for i=1,5 do
  81. wait(1/30)
  82. local ratio = i/5
  83. gyro.cframe = target*CFrame.Angles(-math.pi/3,math.pi/2,0)
  84. bodyPart.Torso.CFrame = bodyPart.Torso.CFrame+target.lookVector*2*(1-ratio)
  85. bodyPart.Torso.Velocity = Vector3.new()
  86. translateLimb("Neck",Vector3.new(),Vector3.new(),0.75)
  87. translateLimb("Right Shoulder",Vector3.new(0,math.pi/5,math.pi/1.5),Vector3.new(-0.5,0,-0.5),0.75)
  88. translateLimb("Left Shoulder",Vector3.new(-math.pi/6,0,math.pi/24),Vector3.new(),0.75)
  89. translateLimb("Right Hip",Vector3.new(-math.pi/12,0,-math.pi/6),Vector3.new(0,0.5,-0.5),0.75)
  90. translateLimb("Left Hip",Vector3.new(-math.pi/12,0,math.pi/12),Vector3.new(),0.75)
  91. AoE((bodyPart["Right Arm"].CFrame*CFrame.new(0,-1,0)).p,math.max(2,math.min(5,state.MPCharge)),strength/10,target.lookVector*strength/10,true)
  92. flame(CFrame.new((bodyPart["Right Arm"].CFrame*CFrame.new(0,-1,0)).p)*CFrame.Angles((math.random()-0.5)*math.pi/4,0,(math.random()-0.5)*math.pi/4),state.MP,math.min(5,state.MPCharge))
  93. end
  94. end,
  95. ["Crushing Fang"] = function()
  96. local cam = workspace.CurrentCamera
  97. local target = CFrame.new(bodyPart.Torso.Position,mouse.Hit.p)
  98. local strength = state.MPCharge*stats.Power
  99. for i=1,5 do
  100. wait(1/30)
  101. local ratio = math.min(1,i/3)
  102. gyro.cframe = target*CFrame.Angles(math.pi/6*ratio,0,math.pi/3*ratio)
  103. bodyPart.Torso.CFrame = bodyPart.Torso.CFrame+target.lookVector
  104. bodyPart.Torso.Velocity = Vector3.new()
  105. translateLimb("Right Shoulder",Vector3.new(0,-math.pi/3,math.pi/2),Vector3.new(),0.75)
  106. translateLimb("Left Shoulder",Vector3.new(-math.pi/6,0,math.pi/12),Vector3.new(0.25,0,-0.25),0.75)
  107. translateLimb("Right Hip",Vector3.new(-math.pi/12,0,-math.pi/12),Vector3.new(0,0.5,-0.25),0.75)
  108. translateLimb("Left Hip",Vector3.new(-math.pi/12,0,-math.pi/12),Vector3.new(),0.75)
  109. flame(CFrame.new((bodyPart["Right Arm"].CFrame*CFrame.new(0,-1,0)).p)*CFrame.Angles((math.random()-0.5)*math.pi/4,0,(math.random()-0.5)*math.pi/4),state.MP,math.min(5,state.MPCharge))
  110. end
  111. for i=1,5 do
  112. wait(1/30)
  113. local ratio = math.min(1,i/3)
  114. gyro.cframe = target*CFrame.Angles(math.pi/6-(math.pi+math.pi/6)*ratio,0,math.pi/3)
  115. bodyPart.Torso.CFrame = bodyPart.Torso.CFrame+target.lookVector*(1-ratio)
  116. bodyPart.Torso.Velocity = Vector3.new()
  117. translateLimb("Right Shoulder",Vector3.new(0,math.pi/8,math.pi/2),Vector3.new(),0.75)
  118. translateLimb("Left Shoulder",Vector3.new(-math.pi/6,0,math.pi/12),Vector3.new(0.25,0,-0.25),0.75)
  119. translateLimb("Right Hip",Vector3.new(-math.pi/12,0,-math.pi/12),Vector3.new(0,0.5,-0.25),0.75)
  120. translateLimb("Left Hip",Vector3.new(-math.pi/12,0,-math.pi/12),Vector3.new(),0.75)
  121. AoE((bodyPart["Right Arm"].CFrame*CFrame.new(0,-1,0)).p,math.max(2,math.min(5,state.MPCharge)),strength/50,target.lookVector*strength/500,true)
  122. flame(CFrame.new((bodyPart["Right Arm"].CFrame*CFrame.new(0,-1,0)).p)*CFrame.Angles((math.random()-0.5)*math.pi/4,0,(math.random()-0.5)*math.pi/4),state.MP,math.min(5,state.MPCharge))
  123. end
  124. end,
  125. ["Flame Elbow"] = function()
  126. local cam = workspace.CurrentCamera
  127. local cf = bodyPart.Torso.CFrame
  128. local lookXZ = CFrame.new(cf.p,mouse.Hit.p*Vector3.new(1,0,1)+Vector3.new(0,cf.p.y,0))
  129. local strength = state.MPCharge*stats.Power
  130. function booster(size)
  131. local dir = bodyPart["Right Arm"].CFrame
  132. local maxSize = math.min(10,math.ceil(size/2))
  133. for i=1,maxSize do
  134. wait(1/30)
  135. local ratio = i/maxSize
  136. local pos = (dir*CFrame.new(0,1+i*math.min(30,math.max(2,size*ratio))/4,0)).p
  137. flame(CFrame.new(pos)*CFrame.Angles((math.random()-0.5)*math.pi/4,0,(math.random()-0.5)*math.pi/4),9,size*ratio)
  138. AoE(pos,math.max(2,size*ratio),strength/100,(dir*CFrame.Angles(math.pi/2,0,0)).lookVector*strength/1000)
  139. end
  140. end
  141. for i=1,30 do
  142. wait(1/30)
  143. gyro.cframe = lookXZ*CFrame.Angles(0,-math.pi/3,0)
  144. bodyPart.Torso.CFrame = (bodyPart.Torso.CFrame-bodyPart.Torso.CFrame.p)+cf.p
  145. bodyPart.Torso.Velocity = Vector3.new()
  146. translateLimb("Neck",Vector3.new(0,0,math.pi/4),Vector3.new(),0.75)
  147. translateLimb("Right Shoulder",Vector3.new(0,math.pi/3,math.pi/2),Vector3.new(-0.25,0,-0.5),0.75)
  148. translateLimb("Left Shoulder",Vector3.new(-math.pi/6,0,math.pi/12),Vector3.new(),0.75)
  149. translateLimb("Right Hip",Vector3.new(-math.pi/12,0,0),Vector3.new(),0.75)
  150. translateLimb("Left Hip",Vector3.new(-math.pi/12,0,0),Vector3.new(),0.75)
  151. if i > 3 then
  152. coroutine.wrap(booster)(i)
  153. end
  154. end
  155. for i=1,5 do
  156. wait(0.01)
  157. gyro.cframe = lookXZ*CFrame.Angles(0,math.pi/2,0)
  158. bodyPart.Torso.CFrame = lookXZ*CFrame.new(0,0,-5*i)*CFrame.Angles(0,math.pi/2,0)
  159. bodyPart.Torso.Velocity = Vector3.new()
  160. translateLimb("Neck",Vector3.new(),Vector3.new(),0.9)
  161. translateLimb("Right Shoulder",Vector3.new(0,-math.pi/2,math.pi/2),Vector3.new(),0.9)
  162. translateLimb("Left Shoulder",Vector3.new(-math.pi/6,0,math.pi/12),Vector3.new(),0.9)
  163. translateLimb("Right Hip",Vector3.new(-math.pi/12,0,0),Vector3.new(),0.75)
  164. translateLimb("Left Hip",Vector3.new(-math.pi/12,0,0),Vector3.new(),0.75)
  165. AoE((bodyPart["Right Arm"].CFrame*CFrame.new(0,-1,0)).p,2,strength*10,lookXZ.lookVector*strength*100,true)
  166. end
  167. end,
  168. ["Eagle"] = function()
  169. local cam = workspace.CurrentCamera
  170. local target = CFrame.new(bodyPart.Torso.Position,mouse.Hit.p)
  171. local strength = state.MPCharge*stats.Power
  172. for i=1,5 do
  173. wait(1/30)
  174. gyro.cframe = target*CFrame.Angles(-math.pi/3,-math.pi/4,0)
  175. bodyPart.Torso.CFrame = bodyPart.Torso.CFrame+target.lookVector*2
  176. bodyPart.Torso.Velocity = Vector3.new()
  177. translateLimb("Neck",Vector3.new(math.pi/6,0,0),Vector3.new(),0.75)
  178. translateLimb("Right Shoulder",Vector3.new(0,-math.pi/3,math.pi/2),Vector3.new(),0.75)
  179. translateLimb("Left Shoulder",Vector3.new(0,-math.pi/8,-math.pi/1.5),Vector3.new(0.25,0,-0.25),0.75)
  180. translateLimb("Right Hip",Vector3.new(-math.pi/12,0,-math.pi/6),Vector3.new(0,0.75,-0.75),0.75)
  181. translateLimb("Left Hip",Vector3.new(-math.pi/12,0,-math.pi/12),Vector3.new(),0.75)
  182. flame(CFrame.new((bodyPart["Right Arm"].CFrame*CFrame.new(0,-1,0)).p)*CFrame.Angles((math.random()-0.5)*math.pi/4,0,(math.random()-0.5)*math.pi/4),state.MP,math.min(5,state.MPCharge))
  183. end
  184. for i=1,5 do
  185. wait(1/30)
  186. gyro.cframe = target*CFrame.Angles(-math.pi/3,-math.pi/4,0)
  187. bodyPart.Torso.CFrame = bodyPart.Torso.CFrame+target.lookVector*2
  188. bodyPart.Torso.Velocity = Vector3.new()
  189. translateLimb("Neck",Vector3.new(math.pi/6,0,0),Vector3.new(),0.75)
  190. translateLimb("Right Shoulder",Vector3.new(0,-math.pi/7,math.pi/1),Vector3.new(),0.75)
  191. translateLimb("Left Shoulder",Vector3.new(0,-math.pi/8,-math.pi/3),Vector3.new(0.50,0,-0.30),0.90)
  192. translateLimb("Right Hip",Vector3.new(-math.pi/6,0,-math.pi/6),Vector3.new(0,0.75,-0.20),0.50)
  193. translateLimb("Left Hip",Vector3.new(-math.pi/6,0,-math.pi/12),Vector3.new(),0.50)
  194. AoE((bodyPart["Right Arm"].CFrame*CFrame.new(0,-1,0)).p,math.max(2,math.min(5,state.MPCharge)),strength/10,target.lookVector*strength/10,true)
  195. end
  196. for i=1,5 do
  197. wait(1/30)
  198. local ratio = i/5
  199. gyro.cframe = target*CFrame.Angles(-math.pi/3,math.pi/2,0)
  200. bodyPart.Torso.CFrame = bodyPart.Torso.CFrame+target.lookVector*2*(1-ratio)
  201. bodyPart.Torso.Velocity = Vector3.new()
  202. translateLimb("Neck",Vector3.new(),Vector3.new(),0.75)
  203. translateLimb("Right Shoulder",Vector3.new(0,math.pi/5,math.pi/1.5),Vector3.new(-0.5,0,-0.5),0.75)
  204. translateLimb("Left Shoulder",Vector3.new(-math.pi/6,0,math.pi/24),Vector3.new(),0.75)
  205. translateLimb("Right Hip",Vector3.new(-math.pi/12,0,-math.pi/6),Vector3.new(0,0.5,-0.5),0.75)
  206. translateLimb("Left Hip",Vector3.new(-math.pi/12,0,math.pi/12),Vector3.new(),0.75)
  207. explosion((bodyPart["Right Arm"]),5,2,0)
  208. AoE((bodyPart["Right Arm"].CFrame*CFrame.new(0,-1,0)).p,math.max(2,math.min(5,state.MPCharge)),strength/10,target.lookVector*strength/10,true)
  209. flame(CFrame.new((bodyPart["Right Arm"].CFrame*CFrame.new(0,-1,0)).p)*CFrame.Angles((math.random()-0.5)*math.pi/4,0,(math.random()-0.5)*math.pi/4),state.MP,math.min(5,state.MPCharge))
  210. end
  211. end,
  212. ["Claw"] = function()
  213. local cam = workspace.CurrentCamera
  214. local target = CFrame.new(bodyPart.Torso.Position,mouse.Hit.p)
  215. local strength = state.MPCharge*stats.Power
  216. for i=1,10 do
  217. wait(1/30)
  218. local hit,pos = advRay(bodyPart.Torso.Position,target.lookVector*5,{player.Character})
  219. gyro.cframe = target*CFrame.Angles(0,math.pi/2,math.pi/3)
  220. bodyPart.Torso.CFrame = bodyPart.Torso.CFrame+target.lookVector*(bodyPart.Torso.Position-pos).magnitude
  221. bodyPart.Torso.Velocity = Vector3.new()
  222. translateLimb("Neck",Vector3.new(0,math.pi/12,-math.pi/3),Vector3.new(),0.75)
  223. translateLimb("Right Shoulder",Vector3.new(-math.pi/3,0,0),Vector3.new(),0.75)
  224. translateLimb("Left Shoulder",Vector3.new(-math.pi/3,0,0),Vector3.new(0.25,0,-0.25),0.75)
  225. translateLimb("Right Hip",Vector3.new(-math.pi/8,0,0),Vector3.new(),0.75)
  226. translateLimb("Left Hip",Vector3.new(math.pi/8,0,-math.pi/12),Vector3.new(-0.5,0.5,0),0.75)
  227. AoE((bodyPart["Right Leg"].CFrame*CFrame.new(0,-1,0)).p,math.max(2,math.min(5,state.MPCharge)),strength/10,target.lookVector*strength/10,true)
  228. flame(CFrame.new((bodyPart["Right Leg"].CFrame*CFrame.new(0,-1,0)).p)*CFrame.Angles((math.random()-0.5)*math.pi/4,0,(math.random()-0.5)*math.pi/4),state.MP,math.min(5,state.MPCharge))
  229. if hit then
  230. bodyPart.Torso.Velocity = bodyPart.Torso.Velocity+Vector3.new(0,60,0)-target.lookVector*20
  231. break
  232. end
  233. end
  234. end,
  235. ["FireBreath"] = function()
  236. local cam = workspace.CurrentCamera
  237. local mouseHit = mouse.Hit.p
  238. local cf = bodyPart.Torso.CFrame
  239. local lookXZ = CFrame.new(cf.p,mouseHit*Vector3.new(1,0,1)+Vector3.new(0,cf.p.y,0))
  240. local target = (mouseHit-cf.p).unit
  241. local dir = math.pi/2-math.acos(target.y)
  242. local strength = state.MPCharge*stats.Power
  243. for i=1,50 do
  244. wait(1/30)
  245. local ratio = math.sin(i/100*math.pi)
  246. local offset = math.sin(-ratio*math.pi/8)
  247. gyro.cframe = lookXZ*CFrame.Angles(math.pi/4*ratio,0,0)
  248. bodyPart.Torso.CFrame = lookXZ*CFrame.new(0,offset,-offset)*CFrame.Angles(math.pi/4*ratio,0,0)
  249. bodyPart.Torso.Velocity = Vector3.new()
  250. translateLimb("Neck",Vector3.new(math.pi/12*ratio,0,0),Vector3.new(),1)
  251. translateLimb("Right Shoulder",Vector3.new(0,math.pi/12,-math.pi/12),Vector3.new(),0.5)
  252. translateLimb("Left Shoulder",Vector3.new(0,-math.pi/12,math.pi/12),Vector3.new(),0.5)
  253. translateLimb("Right Hip",Vector3.new(-math.pi/24,0,-math.pi/4*ratio),Vector3.new(),1)
  254. translateLimb("Left Hip",Vector3.new(-math.pi/24,0,math.pi/4*ratio),Vector3.new(),1)
  255. end
  256. for i=1,5 do
  257. wait(1/30)
  258. local ratio = 1-i/5
  259. local offset = math.sin(i/5*dir)+math.sin(-ratio*math.pi/8)
  260. local rot = dir*i/5
  261. gyro.cframe = lookXZ*CFrame.Angles(math.pi/4*ratio+rot,0,0)
  262. bodyPart.Torso.CFrame = lookXZ*CFrame.new(0,-math.abs(offset),offset)*CFrame.Angles(math.pi/4*ratio+rot,0,0)
  263. bodyPart.Torso.Velocity = Vector3.new()
  264. translateLimb("Neck",Vector3.new(math.pi/12*ratio,0,0),Vector3.new(),1)
  265. translateLimb("Right Shoulder",Vector3.new(0,math.pi/3,math.pi/1.5),Vector3.new(-0.75,0,-0.5),0.5)
  266. translateLimb("Left Shoulder",Vector3.new(0,-math.pi/3.5,-math.pi/1.5),Vector3.new(0.75,0,-0.5),0.5)
  267. translateLimb("Right Hip",Vector3.new(-math.pi/24,0,-math.pi/4*ratio-rot),Vector3.new(),1)
  268. translateLimb("Left Hip",Vector3.new(-math.pi/24,0,math.pi/4*ratio+rot),Vector3.new(),1)
  269. end
  270. --rune(bodyPart.Head.CFrame*CFrame.new(0,0,-3)*CFrame.Angles(math.pi/2,0,0),5,13/3)
  271. for i=1,50 do
  272. wait(1/30)
  273. mouseHit = mouseHit:Lerp(mouse.Hit.p,0.1)
  274. lookXZ = CFrame.new(cf.p,mouseHit*Vector3.new(1,0,1)+Vector3.new(0,cf.p.y,0))
  275. target = (mouseHit-cf.p).unit
  276. dir = math.pi/2-math.acos(target.y)
  277. local offset = math.sin(dir)
  278. gyro.cframe = lookXZ*CFrame.Angles(dir,0,0)
  279. bodyPart.Torso.CFrame = lookXZ*CFrame.new(0,-math.abs(offset),offset)*CFrame.Angles(dir,0,0)
  280. bodyPart.Torso.Velocity = Vector3.new()
  281. translateLimb("Neck",Vector3.new(),Vector3.new(),1)
  282. translateLimb("Right Shoulder",Vector3.new(0,math.pi/3,math.pi/1.5),Vector3.new(-0.75,0,-0.5),0.5)
  283. translateLimb("Left Shoulder",Vector3.new(0,-math.pi/3.5,-math.pi/1.5),Vector3.new(0.75,0,-0.5),0.5)
  284. translateLimb("Right Hip",Vector3.new(-math.pi/24,0,-dir),Vector3.new(),0.5)
  285. translateLimb("Left Hip",Vector3.new(-math.pi/24,0,dir),Vector3.new(),0.5)
  286. coroutine.wrap(function()
  287. local direction = bodyPart.Head.CFrame
  288. for n=1,10 do
  289. wait(1/30)
  290. local scale = math.min(30,n*3)
  291. flame(CFrame.new((direction*CFrame.new(0,0,-5-n*scale/4)).p)*CFrame.Angles((math.random()-0.5)*math.pi/4,0,(math.random()-0.5)*math.pi/4),9,scale)
  292. AoE((direction*CFrame.new(0,0,-5-n*scale/4)).p,scale,strength/100,target*strength/1000,false)
  293. end
  294. end)()
  295. end
  296. end,
  297. ["Roar"] = function()
  298. local cam = workspace.CurrentCamera
  299. local mouseHit = mouse.Hit.p
  300. local cf = bodyPart.Torso.CFrame
  301. local lookXZ = CFrame.new(cf.p,mouseHit*Vector3.new(1,0,1)+Vector3.new(0,cf.p.y,0))
  302. local target = (mouseHit-cf.p).unit
  303. local dir = math.pi/2-math.acos(target.y)
  304. local strength = state.MPCharge*stats.Power
  305. for i=1,50 do
  306. wait(1/30)
  307. local ratio = math.sin(i/100*math.pi)
  308. local offset = math.sin(-ratio*math.pi/8)
  309. gyro.cframe = lookXZ*CFrame.Angles(math.pi/4*ratio,0,0)
  310. bodyPart.Torso.CFrame = lookXZ*CFrame.new(0,offset,-offset)*CFrame.Angles(math.pi/4*ratio,0,0)
  311. bodyPart.Torso.Velocity = Vector3.new()
  312. translateLimb("Neck",Vector3.new(math.pi/12*ratio,0,0),Vector3.new(),1)
  313. translateLimb("Right Shoulder",Vector3.new(0,math.pi/12,-math.pi/12),Vector3.new(),0.5)
  314. translateLimb("Left Shoulder",Vector3.new(0,-math.pi/12,math.pi/12),Vector3.new(),0.5)
  315. translateLimb("Right Hip",Vector3.new(-math.pi/24,0,-math.pi/4*ratio),Vector3.new(),1)
  316. translateLimb("Left Hip",Vector3.new(-math.pi/24,0,math.pi/4*ratio),Vector3.new(),1)
  317. end
  318. for i=1,5 do
  319. wait(1/30)
  320. local ratio = 1-i/5
  321. local offset = math.sin(i/5*dir)+math.sin(-ratio*math.pi/8)
  322. local rot = dir*i/5
  323. gyro.cframe = lookXZ*CFrame.Angles(math.pi/4*ratio+rot,0,0)
  324. bodyPart.Torso.CFrame = lookXZ*CFrame.new(0,-math.abs(offset),offset)*CFrame.Angles(math.pi/4*ratio+rot,0,0)
  325. bodyPart.Torso.Velocity = Vector3.new()
  326. translateLimb("Neck",Vector3.new(math.pi/12*ratio,0,0),Vector3.new(),1)
  327. translateLimb("Right Shoulder",Vector3.new(0,math.pi/3,math.pi/1.5),Vector3.new(-0.75,0,-0.5),0.5)
  328. translateLimb("Left Shoulder",Vector3.new(0,-math.pi/3.5,-math.pi/1.5),Vector3.new(0.75,0,-0.5),0.5)
  329. translateLimb("Right Hip",Vector3.new(-math.pi/24,0,-math.pi/4*ratio-rot),Vector3.new(),1)
  330. translateLimb("Left Hip",Vector3.new(-math.pi/24,0,math.pi/4*ratio+rot),Vector3.new(),1)
  331. end
  332. --rune(bodyPart.Head.CFrame*CFrame.new(0,0,-3)*CFrame.Angles(math.pi/2,0,0),5,13/3)
  333. for i=1,50 do
  334. wait(1/30)
  335. mouseHit = mouseHit:Lerp(mouse.Hit.p,0.1)
  336. lookXZ = CFrame.new(cf.p,mouseHit*Vector3.new(1,0,1)+Vector3.new(0,cf.p.y,0))
  337. target = (mouseHit-cf.p).unit
  338. dir = math.pi/2-math.acos(target.y)
  339. local offset = math.sin(dir)
  340. gyro.cframe = lookXZ*CFrame.Angles(dir,0,0)
  341. bodyPart.Torso.CFrame = lookXZ*CFrame.new(0,-math.abs(offset),offset)*CFrame.Angles(dir,0,0)
  342. bodyPart.Torso.Velocity = Vector3.new()
  343. translateLimb("Neck",Vector3.new(),Vector3.new(),1)
  344. translateLimb("Right Shoulder",Vector3.new(0,math.pi/3,math.pi/1.5),Vector3.new(-0.75,0,-0.5),0.5)
  345. translateLimb("Left Shoulder",Vector3.new(0,-math.pi/3.5,-math.pi/1.5),Vector3.new(0.75,0,-0.5),0.5)
  346. translateLimb("Right Hip",Vector3.new(-math.pi/24,0,-dir),Vector3.new(),0.5)
  347. translateLimb("Left Hip",Vector3.new(-math.pi/24,0,dir),Vector3.new(),0.5)
  348. coroutine.wrap(function()
  349. local direction = bodyPart.Head.CFrame
  350. for n=1,10 do
  351. wait(1/30)
  352. local scale = math.min(30,n*3)
  353. flame(CFrame.new((direction*CFrame.new(0,0,-5-n*scale/4)).p)*CFrame.Angles((math.random()-0.5)*math.pi/4,0,(math.random()-0.5)*math.pi/4),9,scale)
  354. AoE((direction*CFrame.new(0,0,-5-n*scale/4)).p,scale,strength/100,target*strength/1000,false)
  355. end
  356. end)()
  357. end
  358. end,
  359. ["Wing Attack"] = function()
  360. local cam = workspace.CurrentCamera
  361. local cf = bodyPart.Torso.CFrame
  362. local lookXZ = CFrame.new(cf.p,mouse.Hit.p*Vector3.new(1,0,1)+Vector3.new(0,cf.p.y,0))
  363. local target = CFrame.new(cf.p,mouse.Hit.p)
  364. local strength = state.MPCharge*stats.Power
  365. for i=1,5 do
  366. wait(1/30)
  367. gyro.cframe = lookXZ*CFrame.Angles(-math.pi/6,0,0)
  368. bodyPart.Torso.CFrame = bodyPart.Torso.CFrame+(lookXZ*CFrame.Angles(math.pi/6,0,0)).lookVector*3
  369. bodyPart.Torso.Velocity = Vector3.new()
  370. translateLimb("Neck",Vector3.new(math.pi/12,0,0),Vector3.new(),0.75)
  371. translateLimb("Right Shoulder",Vector3.new(0,math.pi/3,math.pi/1.5),Vector3.new(),0.75)
  372. translateLimb("Left Shoulder",Vector3.new(0,-math.pi/4,-math.pi/1.5),Vector3.new(),0.75)
  373. translateLimb("Right Hip",Vector3.new(-math.pi/12,0,-math.pi/6),Vector3.new(0,0.75,-0.75),0.75)
  374. translateLimb("Left Hip",Vector3.new(-math.pi/12,0,-math.pi/12),Vector3.new(),0.75)
  375. end
  376. function wing()
  377. local dir1 = bodyPart["Right Arm"].CFrame
  378. local dir2 = bodyPart["Left Arm"].CFrame
  379. for n=1,10 do
  380. wait(1/30)
  381. if dir1 then
  382. local hit,pos = advRay(dir1.p,(dir1*CFrame.new(0,-1-n*5,0)).p-dir1.p,{player.Character})
  383. flame(CFrame.new(pos)*CFrame.Angles((math.random()-0.5)*math.pi/4,0,(math.random()-0.5)*math.pi/4),9,10,true)
  384. AoE(pos,hit and 20 or 10,strength/(hit and 1 or 10),(dir1*CFrame.Angles(-math.pi,0,0)).lookVector*strength/10,true)
  385. if hit then
  386. local x = Instance.new("Explosion",workspace)
  387. x.Position = pos
  388. x.BlastPressure = 0
  389. x.BlastRadius = 3
  390. dir1 = nil
  391. end
  392. end
  393. if dir2 then
  394. local hit,pos = advRay(dir2.p,(dir2*CFrame.new(0,-1-n*5,0)).p-dir2.p,{player.Character})
  395. flame(CFrame.new(pos)*CFrame.Angles((math.random()-0.5)*math.pi/4,0,(math.random()-0.5)*math.pi/4),9,10,true)
  396. AoE(pos,hit and 20 or 10,strength/(hit and 1 or 10),(dir2*CFrame.Angles(-math.pi,0,0)).lookVector*strength/(hit and 1 or 10),true)
  397. if hit then
  398. local x = Instance.new("Explosion",workspace)
  399. x.Position = pos
  400. x.BlastPressure = 0
  401. x.BlastRadius = 3
  402. dir2 = nil
  403. end
  404. end
  405. if not dir1 and not dir2 then break end
  406. end
  407. end
  408. for i=1,10 do
  409. wait(1/30)
  410. local ratio = i/10
  411. gyro.cframe = lookXZ*CFrame.Angles(-math.pi/6+math.pi/3*ratio,0,0)
  412. bodyPart.Torso.CFrame = bodyPart.Torso.CFrame+(lookXZ*CFrame.Angles(math.pi/6,0,0)).lookVector*3
  413. bodyPart.Torso.Velocity = Vector3.new()
  414. translateLimb("Neck",Vector3.new(-math.pi/12,0,0),Vector3.new(),0.75)
  415. translateLimb("Right Shoulder",Vector3.new(0,math.pi/12,math.pi*1.25),Vector3.new(),0.5)
  416. translateLimb("Left Shoulder",Vector3.new(0,-math.pi/12,-math.pi*1.25),Vector3.new(),0.5)
  417. translateLimb("Right Hip",Vector3.new(-math.pi/12,0,-math.pi/12),Vector3.new(),0.75)
  418. translateLimb("Left Hip",Vector3.new(-math.pi/12,0,math.pi/12),Vector3.new(),0.75)
  419. if i > 3 then
  420. coroutine.wrap(wing)()
  421. end
  422. end
  423. for i=1,10 do
  424. wait(1/30)
  425. gyro.cframe = lookXZ*CFrame.Angles(math.pi/6-(math.pi/3+math.pi/6)*math.min(1,i/3),0,0)
  426. bodyPart.Torso.CFrame = bodyPart.Torso.CFrame+(lookXZ*CFrame.Angles(math.pi/6,0,0)).lookVector*3*(1-i/10)
  427. bodyPart.Torso.Velocity = Vector3.new()
  428. translateLimb("Neck",Vector3.new(math.pi/12,0,0),Vector3.new(),0.75)
  429. translateLimb("Right Shoulder",Vector3.new(0,math.pi/12,-math.pi/6),Vector3.new(),0.25)
  430. translateLimb("Left Shoulder",Vector3.new(0,-math.pi/12,math.pi/6),Vector3.new(),0.25)
  431. translateLimb("Right Hip",Vector3.new(-math.pi/12,0,-math.pi/12),Vector3.new(),0.75)
  432. translateLimb("Left Hip",Vector3.new(-math.pi/12,0,math.pi/12),Vector3.new(),0.75)
  433. coroutine.wrap(wing)()
  434. end
  435. bodyPart.Torso.Velocity = lookXZ.lookVector*20
  436. end
  437. }
  438. function getRegion(point,range,ignore)
  439. return workspace:FindPartsInRegion3WithIgnoreList(Region3.new(point-Vector3.new(1,1,1)*range/2,point+Vector3.new(1,1,1)*range/2),ignore,100)
  440. end
  441. function getHumanoid(v)
  442. if v and v.Parent then
  443. local h = v.Parent:findFirstChild("Humanoid") or v.Parent.Parent:findFirstChild("Humanoid")
  444. if not h then
  445. for _,p in ipairs(v.Parent:GetChildren()) do
  446. if p:isA("Humanoid") then
  447. h = p
  448. end
  449. end
  450. if not h and v.Parent.Parent and v.Parent.Parent ~= game and v.Parent.Parent ~= workspace then
  451. for _,p in ipairs(v.Parent.Parent:GetChildren()) do
  452. if p:isA("Humanoid") then
  453. h = p
  454. end
  455. end
  456. end
  457. end
  458. return h
  459. end
  460. end
  461. function advRay(start,point)
  462. local dis = (start-(start+point)).magnitude
  463. local dir = ((start+point)-start).unit
  464. if dis > 999 then
  465. dis = 999
  466. end
  467. point = dis*dir
  468. hit,pos = workspace:FindPartOnRayWithIgnoreList(Ray.new(start,point),{player.Character})
  469. if hit and not hit.CanCollide and not getHumanoid(hit) then
  470. function persistentRay(list)
  471. hit,pos = workspace:FindPartOnRayWithIgnoreList(Ray.new(start,point),{player.Character,unpack(list)})
  472. if hit and not hit.CanCollide and not getHumanoid(hit) then
  473. hit,pos = persistentRay({hit,unpack(list)})
  474. end
  475. return hit,pos
  476. end
  477. hit,pos = persistentRay({hit})
  478. end
  479. return hit,pos
  480. end
  481. function AoE(point,radius,damage,push,trip)
  482. ypcall(function()
  483. local push = push or Vector3.new()
  484. local hit = getRegion(point,radius,{player.Character})
  485. local humanoidList = {}
  486. for _,v in pairs(hit) do
  487. local h = getHumanoid(v)
  488. if not v.Anchored then
  489. if h then
  490. if not humanoidList[h] then
  491. humanoidList[h] = true
  492. h:TakeDamage(damage)
  493. if h.Parent:findFirstChild("Torso") and h.Parent.Torso:isA("BasePart") then
  494. if push.magnitude > 0 then
  495. local v = Instance.new("BodyVelocity",h.Parent.Torso)
  496. v.maxForce = Vector3.new(1,1,1)*10000000000
  497. v.velocity = push/0.1
  498. game.Debris:AddItem(v,0.1)
  499. end
  500. if trip then
  501. local v = Instance.new("BodyAngularVelocity",h.Parent.Torso)
  502. v.maxTorque = Vector3.new(1,1,1)*10000000000
  503. v.angularvelocity = Vector3.new(math.pi,0,math.pi)/0.1
  504. game.Debris:AddItem(v,0.1)
  505. end
  506. end
  507. end
  508. else v:BreakJoints()
  509. v.Velocity = v.Velocity+push/v:GetMass()
  510. end
  511. end
  512. end
  513. end)
  514. end
  515. function preloadCharacter()
  516. humanoid = player.Character.Humanoid
  517. state = {
  518. ["Move"] = "Iron Fist",
  519. ["CD"] = 0,
  520. ["MP"] = 0,
  521. ["MPCharge"] = 0,
  522. ["LastCharge"] = 0,
  523. ["Falling"] = false,
  524. ["W"] = 0,
  525. ["A"] = 0,
  526. ["S"] = 0,
  527. ["D"] = 0,
  528. ["J"] = 0,
  529. ["Sprint"] = false,
  530. ["Charge"] = false,
  531. ["Skill"] = false
  532. }
  533. for _,v in pairs({"Head","Torso","Right Arm","Left Arm","Right Leg","Left Leg"}) do
  534. bodyPart[v] = player.Character:findFirstChild(v)
  535. end
  536. for _,v in pairs({"Neck","Right Shoulder","Left Shoulder","Right Hip","Left Hip"}) do
  537. if bodyPart.Torso:findFirstChild(v) then
  538. limb[v] = {
  539. ["Weld"] = bodyPart.Torso[v],
  540. ["Rotation"] = Vector3.new(),
  541. ["Offset"] = Vector3.new(),
  542. ["C0"] = c0[v],
  543. ["C1"] = c1[v]
  544. }
  545. bodyPart.Torso[v].DesiredAngle = 0
  546. end
  547. end
  548. for n,v in pairs(humanoidState) do
  549. pcall(function() v.Connection:disconnect() end)
  550. v.Connection = humanoid[n]:connect(function(p)
  551. local running = nil
  552. if string.match("RunningStrafingClimbingSwimming",n) then
  553. if p > 0.1 then
  554. running = n == "Climbing" and n or "Running"
  555. else running = "Standing"
  556. end
  557. end
  558. local falling = string.match("JumpingGettingUpFreeFallingFallingDown",n) and "Falling"
  559. humanoidCurrentState = running or falling or n
  560. v.Value = p
  561. end)
  562. end
  563. bpos = Instance.new("BodyPosition",bodyPart.Torso)
  564. bpos.D = 200
  565. bpos.maxForce = Vector3.new(0,99999,0)
  566. bpos.position = bodyPart.Torso.Position
  567. gyro = Instance.new("BodyGyro",bodyPart.Torso)
  568. gyro.D = 100
  569. gyro.maxTorque = Vector3.new(1,1,1)*99999
  570. gyro.cframe = bodyPart.Torso.CFrame
  571. bvel = Instance.new("BodyVelocity",bodyPart.Torso)
  572. bvel.maxForce = Vector3.new(1,0,1)*9999
  573. bvel.velocity = Vector3.new()
  574. ui = Instance.new("ScreenGui",player.PlayerGui)
  575. local txt = Instance.new("TextLabel",ui)
  576. txt.Name = "MP"
  577. txt.BackgroundTransparency = 1
  578. txt.Position = UDim2.new(0,210,1,-60)
  579. txt.Font = "ArialBold"
  580. txt.FontSize = "Size18"
  581. txt.Text = "Magic Power: 0"
  582. txt.TextColor3 = Color3.new(1,1,1)
  583. txt.TextStrokeTransparency = 0.9
  584. txt.TextXAlignment = "Left"
  585. txt.TextYAlignment = "Bottom"
  586. local txt = txt:Clone()
  587. txt.Name = "Charge"
  588. txt.Text = "Charge: 0"
  589. txt.Position = UDim2.new(0,210,1,-80)
  590. txt.Parent = ui
  591. local txt = txt:Clone()
  592. txt.Name = "Move"
  593. txt.Text = "Move: Iron Fist"
  594. txt.Position = UDim2.new(0,210,1,-100)
  595. txt.Parent = ui
  596. end
  597. preloadCharacter()
  598. function translateLimb(v,rot,pos,alpha)
  599. rot = rot or limb[v].Rotation
  600. pos = pos or limb[v].Offset
  601. limb[v].Rotation = limb[v].Rotation:Lerp(rot,alpha)
  602. limb[v].Offset = limb[v].Offset:Lerp(pos,alpha)
  603. end
  604. function rune(cf,size,lifespan)
  605. coroutine.wrap(function()
  606. local p = Instance.new("Part")
  607. plight = Instance.new("PointLight",p)
  608. plight.Color = BrickColor.new("Bright red").Color
  609. p.formFactor = 0
  610. p.Size = Vector3.new()
  611. p.BrickColor = BrickColor.new("Bright red")
  612. p.Anchored = true
  613. p.Locked = true
  614. p.CanCollide = false
  615. p.CFrame = cf*CFrame.Angles(math.pi/2,0,0)
  616. p.TopSurface = 0
  617. p.BottomSurface = 0
  618. p.Parent = player.Character
  619. local m = Instance.new("SpecialMesh",p)
  620. local wave = p:Clone()
  621. wave.CFrame = cf
  622. wave.Parent = player.Character
  623. wave.Mesh.MeshType = Enum.MeshType.Sphere
  624. wave.Mesh.Scale = Vector3.new(0,size/10,0)
  625. m.MeshId = "http://www.roblox.com/asset/?id=47260990"
  626. m.Scale = Vector3.new(size,size,size/10)
  627. p.Transparency = 1
  628. game.Debris:AddItem(p)
  629. game.Debris:AddItem(wave)
  630. for i=1,5 do
  631. p.Transparency = 1-math.sin(i/10*math.pi)*0.75
  632. p.CFrame = p.CFrame*CFrame.Angles(0,0,(i/5)*math.pi/12)
  633. wave.Mesh.Scale = Vector3.new(size*i,size/10,size*i)/2
  634. wave.Transparency = i/5
  635. wait(1/30)
  636. end
  637. wave:Remove()
  638. delay(lifespan,function()
  639. for i=1,20 do
  640. local ratio = math.sin(i/40*math.pi)*0.75
  641. p.Transparency = 0.25+ratio
  642. wait(1/30)
  643. end
  644. p:Remove()
  645. end)
  646. end)()
  647. end
  648. function explosion(where,heat,size,pres)
  649. a = Instance.new("Explosion",Workspace)
  650. a.BlastRadius = size
  651. a.BlastPressure = pres
  652. a.Position = where.Position
  653. local f = Instance.new("Fire",p)
  654. f.Size = size
  655. f.Heat = heat
  656. f:Remove()
  657. end
  658. function flame(cf,heat,size,instant)
  659. local p = Instance.new("Part")
  660. p.formFactor = 3
  661. p.Anchored = true
  662. p.CanCollide = false
  663. p.Locked = true
  664. p.Transparency = 1
  665. p.Size = Vector3.new()
  666. p.CFrame = cf
  667. p.Parent = player.Character
  668. local f = Instance.new("Fire",p)
  669. f.Size = size
  670. f.Heat = heat
  671. game.Debris:AddItem(p,1.1)
  672. delay(0.1,function()
  673. f.Enabled = false
  674. if instant then
  675. p:Destroy()
  676. end
  677. end)
  678. end
  679. mouse.KeyDown:connect(function(key)
  680. state.W = key == "w" and 1 or state.W
  681. state.A = key == "a" and 1 or state.A
  682. state.S = key == "s" and 1 or state.S
  683. state.D = key == "d" and 1 or state.D
  684. state.J = key == " " and 1 or state.J
  685. state.Sprint = key == "0" or state.Sprint
  686. if skillName[key] and not state.Skill then
  687. state.Move = skillName[key]
  688. ui.Move.Text = "Move: "..skillName[key]
  689. if state.CD > 0 and not state.Charge and state.MP > 0 then
  690. state.MPCharge = math.min(state.MP,state.LastCharge)
  691. ui.Charge.Text = "Charge: "..state.MPCharge
  692. state.Skill = true
  693. ypcall(function()
  694. skillFunc[state.Move]()
  695. end)
  696. state.Skill = false
  697. state.CD = state.MP > 0 and 0.2 or 0
  698. state.MP = math.max(0,state.MP-state.MPCharge)
  699. state.LastCharge = state.MPCharge
  700. state.MPCharge = 0
  701. ui.Charge.Text = "Charge: 0"
  702. end
  703. end
  704. end)
  705. mouse.KeyUp:connect(function(key)
  706. state.W = key == "w" and 0 or state.W
  707. state.A = key == "a" and 0 or state.A
  708. state.S = key == "s" and 0 or state.S
  709. state.D = key == "d" and 0 or state.D
  710. state.J = key == " " and 0 or state.J
  711. if key == "0" then
  712. state.Sprint = false
  713. end
  714. end)
  715. mouse.Button1Down:connect(function()
  716. if not state.Skill then
  717. state.Charge = true
  718. end
  719. end)
  720. mouse.Button1Up:connect(function()
  721. if not state.Skill and state.Charge then
  722. state.Charge = false
  723. state.Skill = true
  724. delay(1/30,function()
  725. rune(bodyPart.Torso.CFrame-Vector3.new(0,2.5,0),20,1)
  726. end)
  727. local pos = bodyPart.Torso.Position
  728. for i=1,10 do
  729. wait(1/30)
  730. bodyPart.Torso.CFrame = CFrame.new(pos,pos+bodyPart.Torso.CFrame.lookVector)
  731. bodyPart.Torso.Velocity = Vector3.new()
  732. translateLimb("Right Shoulder",Vector3.new(0,math.pi/2.5+(math.random()-0.5)*math.pi/48,math.pi/2+(math.random()-0.5)*math.pi/48),Vector3.new(-0.25,0,-0.75),0.9)
  733. translateLimb("Left Shoulder",Vector3.new(0,-math.pi/2.5+(math.random()-0.5)*math.pi/48,-math.pi/2+(math.random()-0.5)*math.pi/48),Vector3.new(0.25,0,-0.75),0.9)
  734. translateLimb("Right Hip",Vector3.new(-math.pi/48,0,0),Vector3.new(),0.75)
  735. translateLimb("Left Hip",Vector3.new(-math.pi/48,0,0),Vector3.new(),0.75)
  736. end
  737. ypcall(function()
  738. skillFunc[state.Move]()
  739. end)
  740. state.Skill = false
  741. state.CD = 0.2
  742. state.MP = math.max(0,state.MP-state.MPCharge)
  743. state.LastCharge = state.MPCharge
  744. state.MPCharge = 0
  745. ui.Charge.Text = "Charge: 0"
  746. end
  747. end)
  748. while active do
  749. local t = wait(1/30)
  750. state.CD = math.max(0,state.CD-t)
  751. humanoid.PlatformStand = true
  752. local cam = workspace.CurrentCamera
  753. local pos = bodyPart.Torso.Position
  754. local camXZ = CFrame.new(pos,pos+cam.CoordinateFrame.lookVector*Vector3.new(1,0,1))
  755. local platform,pos = advRay(bodyPart.Torso.Position,Vector3.new(0,state.Falling and ((bodyPart.Torso.Velocity.y*t))-4.5 or -4.5,0))
  756. --local platform,pos = advRay(bodyPart.Torso.Position,Vector3.new(0,-4.5,0))
  757. local moveZ = (not state.Charge and not state.Skill) and state.W-state.S or 0
  758. local moveX = (not state.Charge and not state.Skill) and state.A-state.D or 0
  759. local jump = (not state.Charge and not state.Skill) and state.J or 0
  760. state.Falling = not platform
  761. bpos.maxForce = Vector3.new(0,(state.Falling and 0 or 1)*(1-jump),0)*99999*(state.Skill and 0 or 1)
  762. bpos.position = Vector3.new(0,pos.y+3,0)
  763. bvel.maxForce = Vector3.new(1,state.J*10,1)*9999*(state.Falling and 0 or 1)
  764. bvel.velocity = ((moveZ == 0 and moveX == 0) and Vector3.new() or (camXZ.lookVector*moveZ+(camXZ*CFrame.Angles(0,math.pi/2,0)).lookVector*moveX).unit*stats.WalkSpeed)+Vector3.new(0,jump*40,0)
  765. local pos = bodyPart.Torso.Position
  766. if not state.Skill then
  767. gyro.cframe = camXZ
  768. if state.CD <= 0 then
  769. state.MP = math.min(stats.MP,state.MP+stats.MPRegen*t)
  770. end
  771. if state.Charge then
  772. state.MPCharge = math.min(state.MP,state.MPCharge+stats.MPCharge*t)
  773. ui.Charge.Text = "Charge: "..state.MPCharge
  774. translateLimb("Right Shoulder",Vector3.new(0,-math.pi/4+(math.random()-0.5)*math.pi/48,math.pi/2+(math.random()-0.5)*math.pi/48),Vector3.new(),0.5)
  775. translateLimb("Left Shoulder",Vector3.new(0,math.pi/4+(math.random()-0.5)*math.pi/48,-math.pi/2+(math.random()-0.5)*math.pi/48),Vector3.new(),0.5)
  776. translateLimb("Right Hip",Vector3.new(-math.pi/48,0,0),Vector3.new(),0.5)
  777. translateLimb("Left Hip",Vector3.new(-math.pi/48,0,0),Vector3.new(),0.5)
  778. else translateLimb("Neck",Vector3.new(),Vector3.new(),0.25)
  779. if state.Falling then
  780. translateLimb("Right Shoulder",Vector3.new(-math.pi/12,0,0),Vector3.new(),0.5)
  781. translateLimb("Left Shoulder",Vector3.new(-math.pi/12,0,0),Vector3.new(),0.5)
  782. translateLimb("Right Hip",Vector3.new(0,0,math.pi/24),Vector3.new(0,0.25,-0.25),0.5)
  783. translateLimb("Left Hip",Vector3.new(0,0,math.pi/24),Vector3.new(),0.5)
  784. elseif moveZ > 0 then
  785. if state.Sprint then
  786. bvel.velocity = bvel.velocity*Vector3.new(3,1,3)
  787. local ratio = math.sin(tick()*math.pi*5)
  788. local swing = math.pi/2
  789. gyro.cframe = gyro.cframe*CFrame.Angles(-math.pi/3,ratio*swing/4,0)
  790. translateLimb("Right Shoulder",Vector3.new(0,math.max(0,ratio*swing/1.5),math.pi/6+ratio*swing*2),Vector3.new(),0.25)
  791. translateLimb("Left Shoulder",Vector3.new(0,math.min(0,ratio*swing/1.5),-math.pi/6+ratio*swing*2),Vector3.new(),0.25)
  792. translateLimb("Right Hip",Vector3.new(0,0,math.pi/6-ratio*swing*1.5),Vector3.new(),0.25)
  793. translateLimb("Left Hip",Vector3.new(0,0,-math.pi/6-ratio*swing*1.5),Vector3.new(),0.25)
  794. else local ratio = math.sin(tick()*math.pi*3)
  795. local swing = math.pi/4
  796. gyro.cframe = gyro.cframe*CFrame.Angles(0,ratio*swing/12,0)
  797. translateLimb("Right Shoulder",Vector3.new(0,math.max(0,ratio*swing/3),ratio*swing),Vector3.new(),0.25)
  798. translateLimb("Left Shoulder",Vector3.new(0,math.min(0,ratio*swing/3),ratio*swing),Vector3.new(),0.25)
  799. translateLimb("Right Hip",Vector3.new(0,0,-ratio*swing),Vector3.new(),0.25)
  800. translateLimb("Left Hip",Vector3.new(0,0,-ratio*swing),Vector3.new(),0.25)
  801. end
  802. elseif moveZ < 0 then
  803. local ratio = math.sin(-tick()*math.pi*3)
  804. local swing = math.pi/4
  805. gyro.cframe = gyro.cframe*CFrame.Angles(math.pi/24,ratio*swing/12,0)
  806. translateLimb("Right Shoulder",Vector3.new(0,math.max(0,ratio*swing/3),ratio*swing),Vector3.new(),0.25)
  807. translateLimb("Left Shoulder",Vector3.new(0,math.min(0,ratio*swing/3),ratio*swing),Vector3.new(),0.25)
  808. translateLimb("Right Hip",Vector3.new(0,0,-ratio*swing),Vector3.new(),0.25)
  809. translateLimb("Left Hip",Vector3.new(0,0,-ratio*swing),Vector3.new(),0.25)
  810. elseif moveX ~= 0 then
  811. local ratio = math.sin(tick()*math.pi*3)*moveX
  812. local swing = math.pi/6
  813. gyro.cframe = gyro.cframe*CFrame.Angles(0,ratio*swing/12,0)
  814. translateLimb("Right Shoulder",Vector3.new(-math.pi/12,0,0),Vector3.new(),0.25)
  815. translateLimb("Left Shoulder",Vector3.new(-math.pi/12,0,0),Vector3.new(),0.25)
  816. translateLimb("Right Hip",Vector3.new(ratio*swing,0,math.max(0,ratio*swing/2)),Vector3.new(),0.25)
  817. translateLimb("Left Hip",Vector3.new(ratio*swing,0,math.max(0,ratio*swing/2)),Vector3.new(),0.25)
  818. else local ratio = math.sin(tick()*math.pi/2)
  819. local swing = math.pi/48
  820. translateLimb("Right Shoulder",Vector3.new(-swing+ratio*swing,0,0),Vector3.new(),0.125)
  821. translateLimb("Left Shoulder",Vector3.new(-swing+ratio*swing,0,0),Vector3.new(),0.125)
  822. translateLimb("Right Hip",Vector3.new(),Vector3.new(),0.125)
  823. translateLimb("Left Hip",Vector3.new(),Vector3.new(),0.125)
  824. end
  825. end
  826. end
  827. ui.MP.Text = "Magic Power: "..state.MP
  828. for _,v in pairs(limb) do
  829. v.Weld.C0 = CFrame.new(v.C0[1]+v.Offset)*v.C0[2]*CFrame.Angles(v.Rotation.x,v.Rotation.y,v.Rotation.z)
  830. v.Weld.C1 = v.C1
  831. end
  832. end
  833. else script:Clone().Parent = game.Players[Shared].Character
  834. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement