Webor7

Asgores's Trident

Apr 22nd, 2017
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.55 KB | None | 0 0
  1. pls = game:GetService'Players'
  2. rs = game:GetService'RunService'
  3. uinps = game:GetService'UserInputService'
  4. lp = pls.LocalPlayer
  5. mouse = lp:GetMouse()
  6. c = lp.Character
  7. human = c.Humanoid
  8. critTime = .27
  9.  
  10. --------------------------------------------------------
  11.  
  12. local h = Instance.new("Part",c)
  13. h.Name = "Trident"
  14. h.BrickColor = BrickColor.new(1,0,0)
  15. h.Material = "Neon"
  16. h.Size = Vector3.new(2,1,10)
  17. h.Locked = true
  18. h.CanCollide = false
  19. h.Name = "Handle"
  20. local m = Instance.new("SpecialMesh",h)
  21. m.MeshType = "FileMesh"
  22. m.Scale = Vector3.new(1.5,2.3,2.3)
  23. m.MeshId = "http://www.roblox.com/asset/?id=30694864"
  24. local hw = Instance.new("Motor",c.Torso)
  25. hw.Name = "HandleWeld"
  26. hw.Part0 = c.Torso
  27. hw.Part1 = h
  28. local l = Instance.new("PointLight",h)
  29. l.Range = 15
  30. l.Brightness = .6
  31. l.Color = Color3.new(1,0,0)
  32.  
  33. --------------------------------------------------------
  34.  
  35. Debounces = {
  36. FPS = 0;
  37. Mode = "Still";
  38. Debounce = false;
  39. wasCrit = false;
  40. SwitchingModes = false;
  41. attackNumber = 0;
  42. isAttacking = false;
  43. isMoving = false;
  44. isSprinting = false;
  45. isJumping = false;
  46. isPassive = false;
  47. isTyping = false;
  48. isAgg = false;
  49. musicOn = false;
  50. isCombo = 0;
  51. }
  52.  
  53. --------------------------------------------------------
  54.  
  55. numLerp = function(start, goal, alpha)
  56. return(((goal - start) * alpha) + start)
  57. end
  58.  
  59. CFrameZero = function()
  60. return CFrame.new(Vector3.new())
  61. end
  62.  
  63. rad = function(value)
  64. return math.rad(value)
  65. end
  66.  
  67. CFAngles = function(Vector)
  68. return CFrame.Angles(rad(Vector.x),rad(Vector.y),rad(Vector.z))
  69. end
  70.  
  71. --------------------------------------------------------
  72.  
  73. AnimStat = {
  74. lerpSpeed = .2;
  75. }
  76.  
  77. Joints = {
  78. c.HumanoidRootPart.RootJoint;
  79. c.Torso.Neck;
  80. c.Torso['Left Shoulder'];
  81. c.Torso['Right Shoulder'];
  82. c.Torso['Left Hip'];
  83. c.Torso['Right Hip'];
  84. hw;
  85. }
  86.  
  87. JointTargets = {
  88. CFrameZero();
  89. CFrameZero();
  90. CFrameZero();
  91. CFrameZero();
  92. CFrameZero();
  93. CFrameZero();
  94. CFrameZero();
  95. }
  96.  
  97.  
  98. --------------------------------------------------------
  99.  
  100. prepareCharacter = function()
  101. local music = Instance.new("Sound",c)
  102. music.SoundId = "rbxassetid://311086301"
  103. music.Looped = true
  104. music.Volume = 1
  105. fight = music
  106. local music2 = Instance.new("Sound",c)
  107. music2.SoundId = "rbxassetid://311086498"
  108. music2.Looped = true
  109. music2.Volume = 1
  110. pass = music2
  111. human.WalkSpeed = 0
  112. human.JumpPower = 0
  113. human.Animator:Destroy()
  114. human.MaxHealth = 5500
  115. c.Animate:Destroy()
  116. wait()
  117. human.Health = 5500
  118. c.Health:Destroy()
  119. end
  120.  
  121. uinps.InputBegan:connect(function(InputObject)
  122. if InputObject.KeyCode == Enum.KeyCode.K and Debounces.isTyping == false then
  123. Debounces.isPassive = not Debounces.isPassive
  124. end
  125. end)
  126.  
  127. uinps.InputBegan:connect(function(InputObject)
  128. if InputObject.KeyCode == Enum.KeyCode.J and Debounces.isTyping == false then
  129. Debounces.isAgg = not Debounces.isAgg
  130. end
  131. end)
  132.  
  133. uinps.InputBegan:connect(function(InputObject)
  134. if InputObject.KeyCode == Enum.KeyCode.L and Debounces.isTyping == false then
  135. Debounces.musicOn = not Debounces.musicOn
  136. end
  137. end)
  138.  
  139. setJointCFrames = function(table)
  140. for i = 1,#table do
  141. JointTargets[i] = table[i]
  142. end
  143. end
  144.  
  145. setLerp = function(speed)
  146. AnimStat.lerpSpeed = speed
  147. end
  148.  
  149. --------------------------------------------------------
  150.  
  151. prepareCharacter()
  152.  
  153. --------------------------------------------------------
  154.  
  155. spawn(function()
  156. local sine = 0
  157. while wait() do
  158. Debounces.isCombo = Debounces.isCombo + 1/30
  159. if Debounces.isAttacking == false and Debounces.isMoving == false and Debounces.isJumping == false and Debounces.Debounce == false then
  160. setLerp(.2)
  161. if Debounces.isPassive == true then
  162. setJointCFrames({
  163. CFrame.new(Vector3.new(0, -1 + math.sin(tick() * 1.8)/35, 0)) * CFAngles(Vector3.new(-5, 0, 0));
  164. CFrame.new(Vector3.new(0, 1.57 + math.sin(tick() * 1.8)/40, -0.18)) * CFAngles(Vector3.new(-13.501 + math.sin(tick() * 1.8 - 1) * 4, 3.663, 0.523));
  165. CFrame.new(Vector3.new(-1.5, 0.069 + math.sin(tick() * 1.8 + 1)/37, -0.56)) * CFAngles(Vector3.new(50.809, 0.672, 3.289));
  166. CFrame.new(Vector3.new(1.599, 0.109 + math.sin(tick() * 1.8 + 1)/37, 0.229)) * CFAngles(Vector3.new(-21.149, -1.645, 14.912));
  167. CFrame.new(Vector3.new(-0.63, -1.141 - math.sin(tick() * 1.8)/40, -0.64)) * CFAngles(Vector3.new(0.773, 6.984, -4.382));
  168. CFrame.new(Vector3.new(0.619, -1.20 - math.sin(tick() * 1.8)/40, 0.78)) * CFAngles(Vector3.new(-61.93, 0.603, 9.809));
  169. CFrame.new(Vector3.new(-0.776, -1.416 + math.sin(tick() * 1.8 + 1)/37, 1.533)) * CFAngles(Vector3.new(11.916 + math.sin(tick() * 1.8) * .4, 15.785, -177.784));
  170. })
  171. else
  172. setJointCFrames({
  173. CFrame.new(Vector3.new(0, 0 + math.sin(tick() * 1.8)/35, 0)) * CFAngles(Vector3.new(0, 0, 0));
  174. CFrame.new(Vector3.new(0, 1.5 + math.sin(tick() * 1.8)/60, -0.1)) * CFAngles(Vector3.new(-14.0871 + math.sin(tick() * 1.8 - 1) * 2, -4.516, -0.001));
  175. CFrame.new(Vector3.new(-1.5, -0.001 + math.sin(tick() * 1.8 + 1)/37, -0.4)) * CFAngles(Vector3.new(44.999 + math.sin(tick() * 1.8 - .3) * 2, 14.999, 0));
  176. CFrame.new(Vector3.new(1.599, 0.349 + math.sin(tick() * 1.8 + 1)/37, -0.401)) * CFAngles(Vector3.new(74.999 + math.sin(tick() * 1.8 - .3) * 2, 14.999, 0));
  177. CFrame.new(Vector3.new(-0.63, -2.02 - math.sin(tick() * 1.8)/40, 0)) * CFAngles(Vector3.new(0.773, 6.984, -4.382));
  178. CFrame.new(Vector3.new(0.569, -2 - math.sin(tick() * 1.8)/40, 0)) * CFAngles(Vector3.new(2.093, -9.162, 2.619));
  179. CFrame.new(Vector3.new(-1.586, -0.686 + math.sin(tick() * 1.8 - .3)/20, -1.387)) * CFAngles(Vector3.new(89.739, -74.514, -165.774));
  180. })
  181. end
  182. elseif Debounces.isAttacking == false and Debounces.isMoving == true and Debounces.isJumping == false and Debounces.Debounce == false then
  183. sine = sine + math.rad(15)
  184. human.WalkSpeed = 15
  185. setLerp(.25)
  186. setJointCFrames({
  187. CFrame.new(Vector3.new(0, math.sin(sine * 2)/17, 0)) * CFAngles(Vector3.new(0, math.sin(sine) * -2.5, 0));
  188. CFrame.new(Vector3.new(0, 1.499, -0.04)) * CFAngles(Vector3.new(-5.676, -0.001 - math.sin(sine) * -1, -0.001));
  189. CFrame.new(Vector3.new(-1.97, 0 + math.sin(sine + .5)/20, 0.1 + math.sin(-sine)/2)/1.3) * CFAngles(Vector3.new(-5 + math.sin(sine) * 23, 0,math.sin(sine - 2) * 2 - 5));
  190. CFrame.new(Vector3.new(1.97, 0 - math.sin(sine + .5)/20, 0.1 + math.sin(sine)/2)/1.3) * CFAngles(Vector3.new(-5 + math.sin(-sine) * 23, 0, math.sin(sine - 2) * 2 + 5));
  191. CFrame.new(Vector3.new(-0.5, -1.93 - math.cos(sine)/8.7, 0.2 + math.sin(sine)/2)) * CFAngles(Vector3.new(-15 + math.sin(-sine) * 30, 0, 0));
  192. CFrame.new(Vector3.new(0.5, -1.93 + math.cos(sine)/8.7, 0.2 + math.sin(-sine)/2)) * CFAngles(Vector3.new(-15 + math.sin(sine) * 30, 0, 0));
  193. CFrame.new(Vector3.new(-1.176, -.516 + math.sin(-sine)/2.2, 1.133 + math.sin(-sine)/1.6)) * CFAngles(Vector3.new(-22.916 + math.sin(sine) * 23, 11.785, -177.784));
  194. })
  195. elseif Debounces.isJumping == true and Debounces.Debounce == false then
  196. setLerp(.14)
  197. setJointCFrames({
  198. CFrame.new(Vector3.new(0, 0, 0)) * CFAngles(Vector3.new(-8, 0, 0));
  199. CFrame.new(Vector3.new(0, 1.5, -0.15)) * CFAngles(Vector3.new(-10.138, 3.687, 0.306));
  200. CFrame.new(Vector3.new(-1.23, 0.069, -0.56)) * CFAngles(Vector3.new(50.809, 0.672, 18.704));
  201. CFrame.new(Vector3.new(0.929, -0.031, -1.0912)) * CFAngles(Vector3.new(63.00, 13.85, -36.416));
  202. CFrame.new(Vector3.new(-0.63, -1.82, -0.74)) * CFAngles(Vector3.new(31.324, 3.424, -1.249));
  203. CFrame.new(Vector3.new(0.619, -1.331, 0.82)) * CFAngles(Vector3.new(-59.644, 0.998, 9.776));
  204. CFrame.new(Vector3.new(-1.466, -0.716, -1.287)) * CFAngles(Vector3.new(23.713, -68.012, 138.119));
  205. })
  206. end
  207. end
  208. end)
  209.  
  210. human.Changed:connect(function(prop)
  211. if prop == "MoveDirection" then
  212. if human.MoveDirection.magnitude > .02 then
  213. Debounces.isMoving = true
  214. else
  215. Debounces.isMoving = false
  216. end
  217. end
  218. end)
  219.  
  220. changeColor = function(mode)
  221. Debounces.SwitchingModes = true
  222. local color = Color3.new(0,0,0)
  223. if mode == "Still" then
  224. color = Color3.new(1,0,0)
  225. elseif mode == "Blue" then
  226. color = Color3.new(0,1,1)
  227. elseif mode == "Orange" then
  228. color = Color3.new(1,.5,1/5)
  229. elseif mode == "Heal" then
  230. color = Color3.new(.1,1,.1)
  231. end
  232. local s = Instance.new("Sound",h)
  233. s.SoundId = "rbxassetid://262249260"
  234. s.Volume = .5
  235. s.Pitch = math.random(95,105)/100
  236. s:Play()
  237. h.BrickColor = BrickColor.new(color)
  238. local e = Instance.new("Part",h)
  239. e.Size = Vector3.new(1,1,1)
  240. e.BrickColor = BrickColor.new(color)
  241. e.Anchored = false
  242. e.CanCollide = false
  243. local rm = Instance.new("SpecialMesh",e)
  244. rm.MeshType = "FileMesh"
  245. rm.MeshId = "rbxassetid://3270017"
  246. rm.Scale = Vector3.new(3.2,3.2,10)
  247. local ew = Instance.new("Weld",e)
  248. ew.Part0 = h
  249. ew.Part1 = e
  250. ew.C0 = CFrame.new(0,0,-5)
  251. l.Color = color
  252. local timer = 0
  253. while rs.RenderStepped:wait() do
  254. timer = timer + (1/60)/(Debounces.FPS/60)
  255. ew.C0 = ew.C0:lerp(CFrame.new(0,0,5),.08/(Debounces.FPS/60))
  256. e.Transparency = math.sin(ew.C0.p.z/2.5)
  257. if e.Transparency >= .95 then break end
  258. end
  259. e:Destroy()
  260. Debounces.Mode = mode
  261. Debounces.SwitchingModes = false
  262. wait(6)
  263. s:Destroy()
  264. end
  265.  
  266. uinps.InputBegan:connect(function(InputObj)
  267. if InputObj.KeyCode == Enum.KeyCode.Slash then
  268. local finishEvent = nil
  269. Debounces.isTyping = true
  270. finishEvent = uinps.InputBegan:connect(function(InputObj)
  271. if InputObj.KeyCode == Enum.KeyCode.Return or InputObj.UserInputType == Enum.UserInputType.MouseButton1 then
  272. Debounces.isTyping = false
  273. finishEvent:disconnect()
  274. end
  275. end)
  276. end
  277. end)
  278.  
  279. uinps.InputBegan:connect(function(InputObj)
  280. if InputObj.KeyCode == Enum.KeyCode.LeftShift then
  281. Debounces.isSprinting = true
  282. end
  283. end)
  284.  
  285. uinps.InputEnded:connect(function(InputObj)
  286. if InputObj.KeyCode == Enum.KeyCode.LeftShift then
  287. Debounces.isSprinting = false
  288. end
  289. end)
  290.  
  291. uinps.InputBegan:connect(function(InputObj)
  292. local e = nil
  293. local e2 = nil
  294. if InputObj.UserInputType == Enum.UserInputType.MouseButton1 and Debounces.isJumping == false and Debounces.isAttacking == false then
  295. if Debounces.isCombo <= critTime then
  296. Debounces.wasCrit = true
  297. else
  298. Debounces.wasCrit = false
  299. end
  300. Debounces.attackNumber = Debounces.attackNumber + 1
  301. Debounces.isCombo = 0
  302. Debounces.isAttacking = true
  303. setLerp(.23)
  304. local playAnim = (Debounces.attackNumber)%3 + 1
  305. local frame1 = {
  306. {
  307. CFrame.new(Vector3.new(math.random(-10,10)/200, 0, math.random(-10,10)/200)) * CFAngles(Vector3.new(0, math.random(-2,5), 0));
  308. CFrame.new(Vector3.new(0, 1.56, -0.01)) * CFAngles(Vector3.new(-5.914, -13.989, -1.015));
  309. CFrame.new(Vector3.new(-1.021, 0.329, -0.75)) * CFAngles(Vector3.new(82.382, 11.798, 41.905));
  310. CFrame.new(Vector3.new(1.649, 0.169, 0.749)) * CFAngles(Vector3.new(-77.626, 16.244, 21.328));
  311. CFrame.new(Vector3.new(-0.63, -1.871, -0.38)) * CFAngles(Vector3.new(-0.91, 3.562, 0.768));
  312. CFrame.new(Vector3.new(0.619, -2.011, 0.31)) * CFAngles(Vector3.new(-26.804, -12.884, -1.817));
  313. CFrame.new(Vector3.new(-0.666, 0.294, -1.807)) * CFAngles(Vector3.new(-28.48, 70.346, -83.191));
  314. };
  315. {
  316. CFrame.new(Vector3.new(math.random(-10,10)/200, 0, math.random(-10,10)/200)) * CFAngles(Vector3.new(0, math.random(-2,5), 0));
  317. CFrame.new(Vector3.new(0, 1.56, -0.01)) * CFAngles(Vector3.new(-14.957, 9.347, 1.86));
  318. CFrame.new(Vector3.new(-1.471, 0.239, -0.98)) * CFAngles(Vector3.new(50.874, -38.983, 14.74));
  319. CFrame.new(Vector3.new(1.789, 0.049, 0.249)) * CFAngles(Vector3.new(-39.301, 20.922, 22.363));
  320. CFrame.new(Vector3.new(-0.63, -2.02, -0.14)) * CFAngles(Vector3.new(0.523, 3.58, 0.679));
  321. CFrame.new(Vector3.new(0.62, -2.011, 0.31)) * CFAngles(Vector3.new(-32.649, -15.017, 6.958));
  322. CFrame.new(Vector3.new(-0.646, -0.576, -1.597)) * CFAngles(Vector3.new(-73.07, 86.04, -17.928));
  323. };
  324. {
  325. CFrame.new(Vector3.new(math.random(-10,10)/200, 0, math.random(-10,10)/200)) * CFAngles(Vector3.new(0, math.random(-2,5), 0));
  326. CFrame.new(Vector3.new(0.14, 1.56, -0.01)) * CFAngles(Vector3.new(-8.767, 9.322, 0.967));
  327. CFrame.new(Vector3.new(-1.711, -0.051, -0.28)) * CFAngles(Vector3.new(26.633, -15.091, -28.888));
  328. CFrame.new(Vector3.new(1.789, 0.049, 0.109)) * CFAngles(Vector3.new(-10.529, 11.255, 19.434));
  329. CFrame.new(Vector3.new(-0.59, -2.02, -0.14)) * CFAngles(Vector3.new(1.445, 18.442, -3.585));
  330. CFrame.new(Vector3.new(0.799, -2.031, -0.04)) * CFAngles(Vector3.new(1.339, -21.187, 15.748));
  331. CFrame.new(Vector3.new(-1.966, -0.756, -1.117)) * CFAngles(Vector3.new(177.818, -16.903, 86.063));
  332. };
  333. }
  334. local frame2 = {
  335. {
  336. CFrame.new(Vector3.new(0, 0, math.random(-10,10)/200)) * CFAngles(Vector3.new(0, math.random(-2,5), 0));
  337. CFrame.new(Vector3.new(0, 1.56, -0.01)) * CFAngles(Vector3.new(-8.241, 17.447, -0.169));
  338. CFrame.new(Vector3.new(-1.581, -0.151, -0.17)) * CFAngles(Vector3.new(69.448, 37.134, -78.032));
  339. CFrame.new(Vector3.new(1.789, 0.049, 0.609)) * CFAngles(Vector3.new(-54.033, 14.452, 26.869));
  340. CFrame.new(Vector3.new(-0.63, -2.02, -0.14)) * CFAngles(Vector3.new(-18.859, 3.152, 1.828));
  341. CFrame.new(Vector3.new(0.799, -2.011, 0.31)) * CFAngles(Vector3.new(-19.054, -13.009, 10.266));
  342. CFrame.new(Vector3.new(-2.386, -0.986, -2.477)) * CFAngles(Vector3.new(174.048, -0.303, 72.496));
  343. };
  344. {
  345. CFrame.new(Vector3.new(math.random(-10,10)/200, math.random(-10,10)/500, math.random(-10,10)/200)) * CFAngles(Vector3.new(0, math.random(-2,5), 0));
  346. CFrame.new(Vector3.new(0, 1.56, -0.01)) * CFAngles(Vector3.new(-9.096, 26.968, -0.885));
  347. CFrame.new(Vector3.new(-1.851, 0.239, -0.98)) * CFAngles(Vector3.new(46.523, -35.77, -44.203));
  348. CFrame.new(Vector3.new(1.789, 0.049, 0.249)) * CFAngles(Vector3.new(-20.556, 7.594, 51.7));
  349. CFrame.new(Vector3.new(-0.9, -2.02, -0.14)) * CFAngles(Vector3.new(0.523, 3.58, -17.2));
  350. CFrame.new(Vector3.new(0.889, -2.071, 0.19)) * CFAngles(Vector3.new(-4.831, -22.678, 13.441));
  351. CFrame.new(Vector3.new(-3.286, -0.016, -3.167)) * CFAngles(Vector3.new(177.818, -16.903, 86.063));
  352. };
  353. {
  354. CFrame.new(Vector3.new(math.random(-10,10)/200, math.random(-10,10)/500, math.random(-10,10)/200)) * CFAngles(Vector3.new(0, math.random(-2,5), 0));
  355. CFrame.new(Vector3.new(0.14, 1.56, -0.01)) * CFAngles(Vector3.new(-8.104, -7.695, 0.899));
  356. CFrame.new(Vector3.new(-1.191, 0.109, -0.86)) * CFAngles(Vector3.new(103.661, -62.452, 30.966));
  357. CFrame.new(Vector3.new(1.789, 0.049, 0.269)) * CFAngles(Vector3.new(-41.475, -0.825, 22.337));
  358. CFrame.new(Vector3.new(-0.69, -2.02, -0.14)) * CFAngles(Vector3.new(-6.435, 20.198, -11.958));
  359. CFrame.new(Vector3.new(0.71, -2.031, 0.25)) * CFAngles(Vector3.new(-31.549, -26.093, 2.237));
  360. CFrame.new(Vector3.new(0.504, -0.346, -2.117)) * CFAngles(Vector3.new(147.39, 81.207, 135.492));
  361. };
  362. }
  363. if Debounces.wasCrit == false then
  364. local e = Instance.new("Sound",c.Head)
  365. e.Volume = .5
  366. e.SoundId = "rbxassetid://145486992"
  367. e.Pitch = math.random(110,130)/100
  368. e:Play()
  369. setJointCFrames(frame1[playAnim])
  370. setLerp(.35)
  371. wait(.07)
  372. setJointCFrames(frame2[playAnim])
  373. wait(.05)
  374. else
  375. local e = Instance.new("Sound",c.Head)
  376. e.Volume = .5
  377. e.SoundId = "rbxassetid://181894961"
  378. e.Pitch = math.random(130,160)/100
  379. e:Play()
  380. local e2 = Instance.new("Sound",c.Head)
  381. e2.Volume = .6
  382. e2.Pitch = math.random(110,130)/100
  383. e2.SoundId = "rbxassetid://200632875"
  384. e2:Play()
  385. setLerp(.6)
  386. setJointCFrames(frame1[playAnim])
  387. setLerp(.7)
  388. wait(.02)
  389. setJointCFrames(frame2[playAnim])
  390. wait(.01)
  391. end
  392. Debounces.isAttacking = false
  393. end
  394. wait(5)
  395. if e then
  396. e:Destroy()
  397. e2:Destroy()
  398. end
  399. end)
  400.  
  401. uinps.InputBegan:connect(function(InputObj)
  402. if InputObj.KeyCode == Enum.KeyCode.Space and Debounces.isTyping == false and Debounces.isJumping == false and Debounces.Debounce == false then
  403. Debounces.Debounce = true
  404. human.WalkSpeed = 0
  405. setLerp(.2)
  406. setJointCFrames({
  407. CFrame.new(Vector3.new(0, -1, 0)) * CFAngles(Vector3.new(0, 0, 0));
  408. CFrame.new(Vector3.new(0, 1.5, -0.15)) * CFAngles(Vector3.new(-18.621, -3.513, 0.853));
  409. CFrame.new(Vector3.new(-1.01, 0.069, -0.69)) * CFAngles(Vector3.new(50.809, 0.672, 20.794));
  410. CFrame.new(Vector3.new(1.309, -0.031, -0.031)) * CFAngles(Vector3.new(-33.146, 36.092, 14.78));
  411. CFrame.new(Vector3.new(-0.63, -1.33, -0.74)) * CFAngles(Vector3.new(-13.998, 3.296, 1.554));
  412. CFrame.new(Vector3.new(0.619, -1.331, 0.42)) * CFAngles(Vector3.new(-58.408, 1.211, 9.751));
  413. CFrame.new(Vector3.new(-2.396, -0.596, -1.287)) * CFAngles(Vector3.new(0.315, -82.579, 125.578));
  414. })
  415. wait(.25)
  416. human.JumpPower = 60
  417. human.Jump = true
  418. Debounces.Debounce = false
  419. human.WalkSpeed = 35
  420. Debounces.isJumping = true
  421. wait()
  422. human.JumpPower = 0
  423. end
  424. end)
  425.  
  426. uinps.InputBegan:connect(function(InputObj)
  427. if InputObj.KeyCode == Enum.KeyCode.Space and Debounces.isTyping == false and Debounces.isSprinting == true and Debounces.isJumping == false and Debounces.Debounce == false then
  428. Debounces.Debounce = true
  429. human.WalkSpeed = 0
  430. setLerp(.2)
  431. setJointCFrames({
  432. CFrame.new(Vector3.new(0, -1, 0)) * CFAngles(Vector3.new(0, 0, 0));
  433. CFrame.new(Vector3.new(0, 1.5, -0.15)) * CFAngles(Vector3.new(-18.621, -3.513, 0.853));
  434. CFrame.new(Vector3.new(-1.01, 0.069, -0.69)) * CFAngles(Vector3.new(50.809, 0.672, 20.794));
  435. CFrame.new(Vector3.new(1.309, -0.031, -0.031)) * CFAngles(Vector3.new(-33.146, 36.092, 14.78));
  436. CFrame.new(Vector3.new(-0.63, -1.33, -0.74)) * CFAngles(Vector3.new(-13.998, 3.296, 1.554));
  437. CFrame.new(Vector3.new(0.619, -1.331, 0.42)) * CFAngles(Vector3.new(-58.408, 1.211, 9.751));
  438. CFrame.new(Vector3.new(-2.396, -0.596, -1.287)) * CFAngles(Vector3.new(0.315, -82.579, 125.578));
  439. })
  440. wait(.25)
  441. human.JumpPower = 150
  442. local e = Instance.new("Sound",c.Head)
  443. e.SoundId = "rbxassetid://180204603"
  444. e.Pitch = math.random(90,110)/100
  445. e.Volume = 1
  446. e:Play()
  447. local e2 = Instance.new("Part",h)
  448. e2.Size = Vector3.new(1,1,1)
  449. e2.CFrame = CFrame.new(c.HumanoidRootPart.CFrame.p - Vector3.new(0,3,0)) * CFrame.Angles(math.pi/2,0,0)
  450. e2.BrickColor = h.BrickColor
  451. e2.Anchored = true
  452. e2.CanCollide = false
  453. local rm = Instance.new("SpecialMesh",e2)
  454. rm.MeshType = "FileMesh"
  455. rm.MeshId = "rbxassetid://3270017"
  456. rm.Scale = Vector3.new(1,1,6)
  457. human.Jump = true
  458. Debounces.Debounce = false
  459. Debounces.isJumping = true
  460. human.WalkSpeed = 75
  461. wait()
  462. human.JumpPower = 0
  463. while rs.RenderStepped:wait() do
  464. rm.Scale = rm.Scale:lerp(Vector3.new(35,35,6),.15/(Debounces.FPS/60))
  465. e2.Transparency = numLerp(e2.Transparency,1,.15/(Debounces.FPS/60))
  466. if e2.Transparency >= .98 then
  467. break
  468. end
  469. end
  470. e2:Destroy()
  471. end
  472. end)
  473.  
  474. uinps.InputBegan:connect(function(InputObj)
  475. if Debounces.isTyping == false then
  476. if InputObj.KeyCode == Enum.KeyCode.Z and Debounces.SwitchingModes == false then
  477. changeColor("Still")
  478. elseif InputObj.KeyCode == Enum.KeyCode.X and Debounces.SwitchingModes == false then
  479. changeColor("Blue")
  480. elseif InputObj.KeyCode == Enum.KeyCode.C and Debounces.SwitchingModes == false then
  481. changeColor("Orange")
  482. elseif InputObj.KeyCode == Enum.KeyCode.V and Debounces.SwitchingModes == false then
  483. changeColor("Heal")
  484. end
  485. end
  486. end)
  487.  
  488. h.Touched:connect(function(part)
  489. local h2 = part.Parent:FindFirstChild("Humanoid")
  490. if h2 then
  491. canAttack = "false"
  492. if Debounces.Mode == "Still" then canAttack = "true" end
  493. if Debounces.Mode == "Blue" and part.Velocity.magnitude > 2 then canAttack = "true" end
  494. if Debounces.Mode == "Orange" and part.Velocity.magnitude < 2 then canAttack = "true" end
  495. if Debounces.Mode == "Heal" then canAttack = "heal" end
  496. if canAttack == "true" then
  497. if Debounces.isCombo <= critTime then
  498. h2:TakeDamage(math.random(3,7))
  499. else
  500. h2:TakeDamage(math.random(1,4))
  501. end
  502. elseif canAttack == "heal" then
  503. h2:TakeDamage(math.random(-4,-1))
  504. end
  505. end
  506. end)
  507.  
  508. human.StateChanged:connect(function(os,ns)
  509. if c.HumanoidRootPart.Velocity.Y < .1 and Debounces.isJumping == true and ns == Enum.HumanoidStateType.Landed then
  510. Debounces.isJumping = false
  511. end
  512. end)
  513.  
  514. rs.RenderStepped:connect(function()
  515. Debounces.FPS = 1/rs.RenderStepped:wait()
  516. if Debounces.isAgg == true then
  517. fight:Resume()
  518. pass:Pause()
  519. else
  520. fight:Pause()
  521. pass:Resume()
  522. end
  523. if Debounces.musicOn == true then
  524. pass.Volume = 1
  525. fight.Volume = 1
  526. else
  527. pass.Volume = 0
  528. fight.Volume = 0
  529. end
  530. l.Range = math.sin(tick() * 1.8) * 8 + 5
  531. local FPSLerp = AnimStat.lerpSpeed/(Debounces.FPS/60)
  532. for i = 1,#Joints do
  533. Joints[i].C0 = Joints[i].C0:lerp(JointTargets[i], FPSLerp)
  534. Joints[i].C1 = CFrameZero()
  535. end
  536. end)
Add Comment
Please, Sign In to add comment