Advertisement
jasonskg1234

-------------------------------------------------------- p

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