Advertisement
Void_scripter0

Trident

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