Advertisement
Ban43_GodOfEdits

natsu

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