Gokussjg

Untitled

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