Advertisement
Roblox_Xploits

Human Fire magic

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