Advertisement
Basykung7845

sans

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