Advertisement
StarzoZero

Roblox FE Sans Attempt #4

Jan 5th, 2019
309
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 48.63 KB | None | 0 0
  1. -- This script has been converted to FE by iPxter
  2.  
  3.  
  4. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  5. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  6. do
  7. print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  8. script.Parent = Player.Character
  9.  
  10. --RemoteEvent for communicating
  11. local Event = Instance.new("RemoteEvent")
  12. Event.Name = "UserInput_Event"
  13.  
  14. --Fake event to make stuff like Mouse.KeyDown work
  15. local function fakeEvent()
  16. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  17. t.connect = t.Connect
  18. return t
  19. end
  20.  
  21. --Creating fake input objects with fake variables
  22. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  23. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  24. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  25. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  26. end}
  27. --Merged 2 functions into one by checking amount of arguments
  28. CAS.UnbindAction = CAS.BindAction
  29.  
  30. --This function will trigger the events that have been :Connect()'ed
  31. local function te(self,ev,...)
  32. local t = m[ev]
  33. if t and t._fakeEvent and t.Function then
  34. t.Function(...)
  35. end
  36. end
  37. m.TrigEvent = te
  38. UIS.TrigEvent = te
  39.  
  40. Event.OnServerEvent:Connect(function(plr,io)
  41. if plr~=Player then return end
  42. if io.isMouse then
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. else
  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 UIS = game:GetService("UserInputService")
  66. local input = function(io,a)
  67. if a then return end
  68. --Since InputObject is a client-side instance, we create and pass table instead
  69. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  70. end
  71. UIS.InputBegan:Connect(input)
  72. UIS.InputEnded:Connect(input)
  73.  
  74. local Mouse = Player:GetMouse()
  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. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  85. end
  86. --------------------------------------------------------
  87.  
  88. pls = game:GetService'Players'
  89. rs = game:GetService'RunService'
  90. uinps = game:GetService'UserInputService'
  91. lp = owner
  92. c = lp.Character
  93. human = c.Humanoid
  94. human.MaxHealth = 50
  95. wait()
  96. human.Health = 50
  97. c.Health:Destroy()
  98.  
  99. --------------------------------------------------------
  100.  
  101. Debounces = {
  102. AnimationCycles = 0;
  103. FPS = 0;
  104. scalingDamage = false;
  105. damageLevel = 0;
  106. attackNumber = 0;
  107. isAttacking = false;
  108. isMoving = false;
  109. isSprinting = false;
  110. isBoosting = false;
  111. isPassive = false;
  112. isTyping = false;
  113. }
  114.  
  115. --------------------------------------------------------
  116.  
  117. numLerp = function(start, goal, alpha)
  118. return(((goal - start) * alpha) + start)
  119. end
  120.  
  121. CFrameZero = function()
  122. return CFrame.new(Vector3.new())
  123. end
  124.  
  125. rad = function(value)
  126. return math.rad(value)
  127. end
  128.  
  129. CFAngles = function(Vector)
  130. return CFrame.Angles(rad(Vector.x),rad(Vector.y),rad(Vector.z))
  131. end
  132.  
  133. --------------------------------------------------------
  134.  
  135. AnimStat = {
  136. lerpSpeed = .2;
  137. lerpSpeed2 = .35;
  138. lerpTween = 0;
  139. }
  140.  
  141. Joints = {
  142. c.HumanoidRootPart.RootJoint;
  143. c.Torso.Neck;
  144. c.Torso['Left Shoulder'];
  145. c.Torso['Right Shoulder'];
  146. c.Torso['Left Hip'];
  147. c.Torso['Right Hip'];
  148. }
  149.  
  150. JointTargets = {
  151. CFrameZero();
  152. CFrameZero();
  153. CFrameZero();
  154. CFrameZero();
  155. CFrameZero();
  156. CFrameZero();
  157. }
  158.  
  159. --------------------------------------------------------
  160.  
  161. BodyColors = {
  162. HeadColor = BrickColor.new("Institutional white");
  163. LeftArmColor = BrickColor.new("Institutional white");
  164. RightArmColor = BrickColor.new("Institutional white");
  165. LeftLegColor = BrickColor.new("Institutional white");
  166. RightLegColor = BrickColor.new("Institutional white");
  167. TorsoColor = BrickColor.new("Mid gray");
  168. }
  169.  
  170. Customs = {
  171. Face = "http://www.roblox.com/asset/?id=8560915";
  172. Shirt = "http://www.roblox.com/asset/?id=334781688";
  173. Pants = "http://www.roblox.com/asset/?id=335237283";
  174. }
  175.  
  176. --------------------------------------------------------
  177.  
  178. prepareCharacter = function()
  179. local transPoints = {
  180. NumberSequenceKeypoint.new(0,.819,.0375),
  181. NumberSequenceKeypoint.new(.207,.594,.0187),
  182. NumberSequenceKeypoint.new(.4,.55,.031),
  183. NumberSequenceKeypoint.new(.57,.619,.05),
  184. NumberSequenceKeypoint.new(.76,.8,.0375),
  185. NumberSequenceKeypoint.new(1,1,0),
  186. }
  187. local sizePoints = {
  188. NumberSequenceKeypoint.new(0,.687,0),
  189. NumberSequenceKeypoint.new(.111,.875,0),
  190. NumberSequenceKeypoint.new(.327,1.19,0),
  191. NumberSequenceKeypoint.new(.646,1.56,0),
  192. NumberSequenceKeypoint.new(.805,1.37,0),
  193. NumberSequenceKeypoint.new(.905,1.06,0),
  194. NumberSequenceKeypoint.new(.968,.938,0),
  195. NumberSequenceKeypoint.new(.984,1.13,0),
  196. NumberSequenceKeypoint.new(1,1.62,0),
  197. }
  198. local Size = NumberSequence.new(sizePoints)
  199. local Transparency = NumberSequence.new(transPoints)
  200. rayModel = Instance.new("Model",c)
  201. efxBlock = Instance.new("Part",c)
  202. efxBlock.BrickColor = BrickColor.new("Cyan")
  203. efxBlock.Material = "Neon"
  204. efxBlock.FormFactor = "Custom"
  205. efxBlock.Transparency = .3
  206. efxBlock.Size = Vector3.new(.3,.3,.3)
  207. local mesh = Instance.new("SpecialMesh",efxBlock)
  208. mesh.MeshType = Enum.MeshType.Sphere
  209. mesh.Scale = Vector3.new(1,1,1)
  210. light = Instance.new("PointLight",c.Head)
  211. light.Range = 10
  212. light.Color = Color3.new(0,200/255,1)
  213. light.Shadows = false
  214. local particles = Instance.new("ParticleEmitter",efxBlock)
  215. particles.Color = ColorSequence.new(Color3.new(0,0,225/255),Color3.new(20/255,190/255,205/255))
  216. particles.LightEmission = .95
  217. particles.Size = Size
  218. particles.Name = "Fire"
  219. particles.Transparency = Transparency
  220. particles.LockedToPart = true
  221. particles.VelocityInheritance = .5
  222. particles.LockedToPart = true
  223. particles.Rate = 70
  224. particles.Texture = "rbxassetid://56561915"
  225. particles.Lifetime = NumberRange.new(2,2)
  226. particles.RotSpeed = NumberRange.new(100,100)
  227. particles.Speed = NumberRange.new(7,7)
  228. script.Parent = efxBlock
  229. fire = particles
  230. local offset = Vector3.new(-0.11, .23, -0.5)
  231. local weld = Instance.new("Weld",c.Head)
  232. weld.Part0 = c.Head
  233. weld.Part1 = efxBlock
  234. weld.C0 = CFrame.new(offset) * CFrame.Angles(math.rad(-40),math.rad(10),math.rad(40))
  235. efxBlock.Parent = c
  236. local music = Instance.new("Sound",c)
  237. music.SoundId = "rbxassetid://316012176"
  238. music.Looped = true
  239. music.Volume = 0
  240. fight = music
  241. local music2 = Instance.new("Sound",c)
  242. music2.SoundId = "rbxassetid://316014309"
  243. music2.Looped = true
  244. music2.Volume = 0
  245. sans = music2
  246. pointGyro = Instance.new("BodyGyro",c.HumanoidRootPart)
  247. pointGyro.P = 1e7
  248. pointGyro.D = 1e3
  249. pointGyro.MaxTorque = Vector3.new(0,1e7,0)
  250. animator = c.Humanoid:FindFirstChild("Animator")
  251. if animator then
  252. animator:Destroy()
  253. end
  254. c.Torso.roblox:Destroy()
  255. for i,v in pairs (c.Head:children()) do
  256. if v.ClassName == "Sound" then
  257. v:Destroy()
  258. end
  259. end
  260. for i = 1,#Joints do
  261. Joints[i].C1 = CFrame.new(Vector3.new())
  262. end
  263. human.WalkSpeed = 0
  264. human.JumpPower = 0
  265. end
  266.  
  267. uinps.InputBegan:connect(function(InputObject)
  268. if InputObject.KeyCode == Enum.KeyCode.K and Debounces.isTyping == false then
  269. Debounces.isPassive = not Debounces.isPassive
  270. end
  271. end)
  272.  
  273. setJointCFrames = function(table)
  274. for i = 1,#table do
  275. JointTargets[i] = table[i]
  276. end
  277. AnimationCycles = 0
  278. end
  279.  
  280. setLerp = function(speed)
  281. AnimStat.lerpSpeed = speed
  282. end
  283.  
  284. setTween = function(tween)
  285. AnimStat.lerpTween = tween
  286. end
  287.  
  288. takeDamage = function(position,damage,distance,platformStand)
  289. for i,v in pairs (pls:children()) do
  290. if v.ClassName == "Player" and v:FindFirstChild("Character") then
  291. local torso = v.Character:FindFirstChild("Torso")
  292. if torso and (torso.Position - position).magnitude < distance then
  293. v.Character.Humanoid:TakeDamage(damage)
  294. if platformStand == true then
  295. v.Character.PlatformStand = platformStand
  296. end
  297. end
  298. end
  299. end
  300. end
  301.  
  302. --------------------------------------------------------
  303.  
  304. prepareCharacter()
  305.  
  306. --------------------------------------------------------
  307.  
  308. spawn(function()
  309. local sine = 0
  310. while wait() do
  311. pointGyro.CFrame = CFrame.new(Vector3.new(),(mouse.Hit.p - c.HumanoidRootPart.CFrame.p).unit * 100)
  312. if Debounces.isAttacking == false and Debounces.isMoving == false and Debounces.isBoosting == false then
  313. setLerp(.1)
  314. if Debounces.isPassive == true then
  315. setJointCFrames({
  316. CFrame.new(Vector3.new(0, -0.901 + math.sin(tick() * 1.5)/45, 0)) * CFAngles(Vector3.new(-22.001, 0, 0));
  317. CFrame.new(Vector3.new(-0.001, 1.52 + math.sin(tick() * -1.5)/35, math.sin(tick() * 1.5)/35)) * CFAngles(Vector3.new(-10.861 + math.sin((-tick() + 2) * 1.5) * 5, 13.765, -1.658));
  318. CFrame.new(Vector3.new(-1.5, -0.1 + math.sin(tick() * 1.5)/15, -0.801)) * CFAngles(Vector3.new(44.999, 0, 0));
  319. CFrame.new(Vector3.new(1.7, 0.2 + math.sin(tick() * 1.5)/15, 0.199)) * CFAngles(Vector3.new(-15.001, -15.001, 15));
  320. CFrame.new(Vector3.new(-0.7, -1.8, 0.6)) * CFAngles(Vector3.new(-59.511, 3.84, 0.489));
  321. CFrame.new(Vector3.new(0.5, -1, -0.801)) * CFAngles(Vector3.new(14.999, -15, -0.001));
  322. })
  323. else
  324. setJointCFrames({
  325. CFrame.new(Vector3.new(0, 0 + math.sin(tick() * 1.5)/25, 0)) * CFAngles(Vector3.new(0, 0, 0));
  326. CFrame.new(Vector3.new(0, 1.5 + math.sin(tick() * -1.5)/35, math.sin(tick() * 1.5)/35)) * CFAngles(Vector3.new(1.554 + math.sin((-tick() + 2) * 1.5) * 5, -0.001, -0.001));
  327. CFrame.new(Vector3.new(-1.06, -0.03 + math.sin(tick() * 1.5)/25, 0.449)) * CFAngles(Vector3.new(-29.511, 0, 29.51));
  328. CFrame.new(Vector3.new(1.059, -0.031 + math.sin(tick() * 1.5)/25, 0.449)) * CFAngles(Vector3.new(-29.511, -3.842, -29.511));
  329. CFrame.new(Vector3.new(-0.49, -2, -0.05/1.5)) * CFAngles(Vector3.new(0, 8.885, 0));
  330. CFrame.new(Vector3.new(0.49, -2, -0.05/1.5)) * CFAngles(Vector3.new(-0.001, -8.886, 0));
  331. })
  332. end
  333. elseif Debounces.isAttacking == false and Debounces.isMoving == true and Debounces.isBoosting == false then
  334. sine = sine + math.rad(12)
  335. human.WalkSpeed = 15
  336. setLerp(.15)
  337. setJointCFrames({
  338. CFrame.new(Vector3.new(0, 0, 0)) * CFAngles(Vector3.new(0, math.sin(sine) * -2.5, 0));
  339. CFrame.new(Vector3.new(0, 1.499, -0.04)) * CFAngles(Vector3.new(-5.676, -0.001 - math.sin(sine) * 3, -0.001));
  340. 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, 0));
  341. 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, 0));
  342. 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));
  343. 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));
  344. })
  345. end
  346. if Debounces.scalingDamage == true then
  347. takeDamage(c.HumanoidRootPart.Position,Debounces.damageLevel,8,true)
  348. end
  349. end
  350. end)
  351.  
  352. human.Changed:connect(function(prop)
  353. if prop == "MoveDirection" then
  354. if human.MoveDirection.magnitude > .02 then
  355. Debounces.isMoving = true
  356. else
  357. Debounces.isMoving = false
  358. end
  359. end
  360. end)
  361.  
  362. uinps.InputBegan:connect(function(InputObject)
  363. if InputObject.KeyCode == Enum.KeyCode.A and Debounces.isAttacking == false and Debounces.isSprinting == true and Debounces.isBoosting == false and Debounces.isPassive == true and Debounces.isTyping == false then
  364. Debounces.isBoosting = true
  365. Debounces.damageLevel = 10
  366. Debounces.scalingDamage = true
  367. local vel = Instance.new("BodyVelocity",c.HumanoidRootPart)
  368. setLerp(.15)
  369. setJointCFrames({
  370. CFrame.new(Vector3.new(0, -0.901, 0)) * CFAngles(Vector3.new(-22.001, 0, 20));
  371. CFrame.new(Vector3.new(-0.001, 1.52, 0)) * CFAngles(Vector3.new(-10.372, 28.758, -1.837));
  372. CFrame.new(Vector3.new(-0.7, -0.2, -0.801)) * CFAngles(Vector3.new(45, 0, 45));
  373. CFrame.new(Vector3.new(1.7, 0.2, 0.199)) * CFAngles(Vector3.new(-15.001, -15.001, 45));
  374. CFrame.new(Vector3.new(-0.3, -2, 0.2)) * CFAngles(Vector3.new(-11.283, -17.801, 19.495));
  375. CFrame.new(Vector3.new(0.9, -2, -0.201)) * CFAngles(Vector3.new(15, -15, 29.999));
  376. })
  377. local boostSpeed = 250
  378. local efx = Instance.new("Sound",c.Head)
  379. efx.SoundId = "rbxassetid://200632875"
  380. efx.Pitch = math.random(1100,1300)/1000
  381. efx.Volume = .5
  382. efx:Play()
  383. spawn(function()
  384. wait(5)
  385. efx:Destroy()
  386. end)
  387. vel.Velocity = (c.HumanoidRootPart.Position - c.HumanoidRootPart.CFrame:toWorldSpace(CFrame.new(1,0,0)).p).unit * boostSpeed
  388. vel.P = 1e3
  389. vel.MaxForce = Vector3.new(math.huge,0,math.huge)
  390. wait(.15)
  391. vel.P = 1000
  392. vel.MaxForce = Vector3.new(3000,0,3000)
  393. vel.Velocity = Vector3.new()
  394. wait(.3)
  395. setLerp(.3)
  396. setJointCFrames({
  397. CFrame.new(Vector3.new(0, -0.901, 0)) * CFAngles(Vector3.new(-22.001, 0, 13));
  398. CFrame.new(Vector3.new(-0.001, 1.52, 0)) * CFAngles(Vector3.new(-30.239, 42.47, 11.879));
  399. CFrame.new(Vector3.new(-1.9, -0.2, -0.401)) * CFAngles(Vector3.new(44.999, 0, -45));
  400. CFrame.new(Vector3.new(1.5, 0.4, 0.599)) * CFAngles(Vector3.new(-62.058, -21.088, -15.383));
  401. CFrame.new(Vector3.new(-0.7, -1.8, 0.6)) * CFAngles(Vector3.new(-59.239, -26.158, -14.457));
  402. CFrame.new(Vector3.new(0.5, -1, -0.801)) * CFAngles(Vector3.new(-0.505, -14.478, -18.968));
  403. })
  404. wait(.2)
  405. vel:Destroy()
  406. Debounces.damageLevel = 0
  407. Debounces.scalingDamage = false
  408. Debounces.isBoosting = false
  409. end
  410. end)
  411.  
  412. uinps.InputBegan:connect(function(InputObject)
  413. if InputObject.KeyCode == Enum.KeyCode.D and Debounces.isAttacking == false and Debounces.isSprinting == true and Debounces.isBoosting == false and Debounces.isPassive == true and Debounces.isTyping == false then
  414. Debounces.isBoosting = true
  415. Debounces.damageLevel = 10
  416. Debounces.scalingDamage = true
  417. local vel = Instance.new("BodyVelocity",c.HumanoidRootPart)
  418. setLerp(.15)
  419. setJointCFrames({
  420. CFrame.new(Vector3.new(0, -0.901, 0)) * CFAngles(Vector3.new(-22.001, 0, -15));
  421. CFrame.new(Vector3.new(-0.001, 1.52, 0)) * CFAngles(Vector3.new(-13.603, -45.662, -6.645));
  422. CFrame.new(Vector3.new(-1.9, 0, -0.201)) * CFAngles(Vector3.new(31.935, -7.436, -60.853));
  423. CFrame.new(Vector3.new(1.9, 0, 0.399)) * CFAngles(Vector3.new(-3.644, -23.448, 59.102));
  424. CFrame.new(Vector3.new(-1.1, -1.8, 0)) * CFAngles(Vector3.new(-3.616, -11.936, -29.566));
  425. CFrame.new(Vector3.new(0.1, -1.6, -0.601)) * CFAngles(Vector3.new(1.943, -7.181, -32.528));
  426. })
  427. local boostSpeed = 250
  428. local efx = Instance.new("Sound",c.Head)
  429. efx.SoundId = "rbxassetid://200632875"
  430. efx.Pitch = math.random(1100,1300)/1000
  431. efx.Volume = .5
  432. efx:Play()
  433. spawn(function()
  434. wait(5)
  435. efx:Destroy()
  436. end)
  437. vel.Velocity = (c.HumanoidRootPart.Position - c.HumanoidRootPart.CFrame:toWorldSpace(CFrame.new(-1,0,0)).p).unit * boostSpeed
  438. vel.P = 1e3
  439. vel.MaxForce = Vector3.new(math.huge,0,math.huge)
  440. wait(.15)
  441. vel.P = 1000
  442. vel.MaxForce = Vector3.new(3000,0,3000)
  443. vel.Velocity = Vector3.new()
  444. wait(.3)
  445. setLerp(.3)
  446. setJointCFrames({
  447. CFrame.new(Vector3.new(0, -0.901, 0)) * CFAngles(Vector3.new(-22.001, 0, -13));
  448. CFrame.new(Vector3.new(-0.001, 1.52, 0)) * CFAngles(Vector3.new(-12.936, -46.206, -2.327));
  449. CFrame.new(Vector3.new(-1.9, 0.2, -0.201)) * CFAngles(Vector3.new(45, 0, -60));
  450. CFrame.new(Vector3.new(1.7, 0, -0.401)) * CFAngles(Vector3.new(14.035, -5.69, 35.342));
  451. CFrame.new(Vector3.new(-0.3, -1.8, 0.6)) * CFAngles(Vector3.new(-55.479, -10.612, 15.729));
  452. CFrame.new(Vector3.new(0.5, -1, -0.801)) * CFAngles(Vector3.new(14.999, -15, 14.999));
  453. })
  454. wait(.2)
  455. vel:Destroy()
  456. Debounces.damageLevel = 0
  457. Debounces.scalingDamage = false
  458. Debounces.isBoosting = false
  459. end
  460. end)
  461.  
  462. uinps.InputBegan:connect(function(InputObject)
  463. if InputObject.KeyCode == Enum.KeyCode.W and Debounces.isAttacking == false and Debounces.isSprinting == true and Debounces.isBoosting == false and Debounces.isPassive == true and Debounces.isTyping == false then
  464. Debounces.isBoosting = true
  465. Debounces.damageLevel = 10
  466. Debounces.scalingDamage = true
  467. local vel = Instance.new("BodyVelocity",c.HumanoidRootPart)
  468. setLerp(.15)
  469. setJointCFrames({
  470. CFrame.new(Vector3.new(0, -0.901, 0)) * CFAngles(Vector3.new(-40.001, 0, 5));
  471. CFrame.new(Vector3.new(-0.001, 1.429, 0.2)) * CFAngles(Vector3.new(25.141, -8.347, 0.878));
  472. CFrame.new(Vector3.new(-1.5, 0, .101)) * CFAngles(Vector3.new(14.999, -0.001, 0));
  473. CFrame.new(Vector3.new(1.7, 0.199, -0.401)) * CFAngles(Vector3.new(28.08, -0.358, 21.087));
  474. CFrame.new(Vector3.new(-0.5, -1.8, 0.6)) * CFAngles(Vector3.new(-29.448, 3.57, -1.5));
  475. CFrame.new(Vector3.new(0.499, -1.6, -0.401)) * CFAngles(Vector3.new(-0.505, -14.478, -3.968));
  476. })
  477. local boostSpeed = 250
  478. local efx = Instance.new("Sound",c.Head)
  479. efx.SoundId = "rbxassetid://200632875"
  480. efx.Pitch = math.random(1100,1300)/1000
  481. efx.Volume = .5
  482. efx:Play()
  483. spawn(function()
  484. wait(5)
  485. efx:Destroy()
  486. end)
  487. vel.Velocity = (c.HumanoidRootPart.Position - c.HumanoidRootPart.CFrame:toWorldSpace(CFrame.new(0,0,1)).p).unit * boostSpeed
  488. vel.P = 1e3
  489. vel.MaxForce = Vector3.new(math.huge,0,math.huge)
  490. wait(.15)
  491. vel.P = 1000
  492. vel.MaxForce = Vector3.new(3000,0,3000)
  493. vel.Velocity = Vector3.new()
  494. wait(.3)
  495. setLerp(.3)
  496. setJointCFrames({
  497. CFrame.new(Vector3.new(0, -0.901, 0)) * CFAngles(Vector3.new(-22.001, 40, -13));
  498. CFrame.new(Vector3.new(-0.001, 1.52, 0)) * CFAngles(Vector3.new(-12.936, -46.206, -2.327));
  499. CFrame.new(Vector3.new(-1.9, 0.2, -0.201)) * CFAngles(Vector3.new(45, 0, -60));
  500. CFrame.new(Vector3.new(1.7, 0, -0.401)) * CFAngles(Vector3.new(14.035, -5.69, 35.342));
  501. CFrame.new(Vector3.new(-0.3, -1.8, 0.6)) * CFAngles(Vector3.new(-55.479, -10.612, 15.729));
  502. CFrame.new(Vector3.new(0.5, -1, -0.801)) * CFAngles(Vector3.new(14.999, -15, 14.999));
  503. })
  504. wait(.2)
  505. vel:Destroy()
  506. Debounces.damageLevel = 0
  507. Debounces.scalingDamage = false
  508. Debounces.isBoosting = false
  509. end
  510. end)
  511.  
  512. uinps.InputBegan:connect(function(InputObject)
  513. if InputObject.KeyCode == Enum.KeyCode.S and Debounces.isAttacking == false and Debounces.isSprinting == true and Debounces.isBoosting == false and Debounces.isPassive == true and Debounces.isTyping == false then
  514. Debounces.isBoosting = true
  515. Debounces.damageLevel = 10
  516. Debounces.scalingDamage = true
  517. local vel = Instance.new("BodyVelocity",c.HumanoidRootPart)
  518. setLerp(.15)
  519. setJointCFrames({
  520. CFrame.new(Vector3.new(0, -.3, 0)) * CFAngles(Vector3.new(15, 0, 0));
  521. CFrame.new(Vector3.new(-0.001, 1.52, -0.03)) * CFAngles(Vector3.new(-5.298, -1.305, -4.093));
  522. CFrame.new(Vector3.new(-1.7, 0, -0.201)) * CFAngles(Vector3.new(12.112, -6.562, -16.939));
  523. CFrame.new(Vector3.new(1.7, 0, -0.201)) * CFAngles(Vector3.new(8.817, 8.378, 20.465));
  524. CFrame.new(Vector3.new(-0.7, -1.8, 0.2)) * CFAngles(Vector3.new(-14.432, 3.06, -2.373));
  525. CFrame.new(Vector3.new(0.5, -1.8, -0.201)) * CFAngles(Vector3.new(-0.505, -14.478, -3.968));
  526. })
  527. local boostSpeed = 150
  528. local boostSpeed = 250
  529. local efx = Instance.new("Sound",c.Head)
  530. efx.SoundId = "rbxassetid://200632875"
  531. efx.Pitch = math.random(1100,1300)/1000
  532. efx.Volume = .5
  533. efx:Play()
  534. spawn(function()
  535. wait(5)
  536. efx:Destroy()
  537. end)
  538. vel.Velocity = (c.HumanoidRootPart.Position - c.HumanoidRootPart.CFrame:toWorldSpace(CFrame.new(0,0,-1)).p).unit * boostSpeed
  539. vel.P = 1e3
  540. vel.MaxForce = Vector3.new(math.huge,0,math.huge)
  541. wait(.15)
  542. vel.P = 1000
  543. vel.MaxForce = Vector3.new(3000,0,3000)
  544. vel.Velocity = Vector3.new()
  545. wait(.3)
  546. setLerp(.3)
  547. setJointCFrames({
  548. CFrame.new(Vector3.new(0, -.5, 0)) * CFAngles(Vector3.new(4, 0, 0));
  549. CFrame.new(Vector3.new(-0.001, 1.52, -0.03)) * CFAngles(Vector3.new(-20.081, 28.752, 3.598));
  550. CFrame.new(Vector3.new(-1.7, 0.2, -0.601)) * CFAngles(Vector3.new(59.51, -3.841, -14.511));
  551. CFrame.new(Vector3.new(1.7, 0.2, 0.399)) * CFAngles(Vector3.new(-47.597, -13.104, 17.887));
  552. CFrame.new(Vector3.new(-0.7, -1.4, 0.2)) * CFAngles(Vector3.new(-44.477, 3.836, -0.524));
  553. CFrame.new(Vector3.new(0.5, -1.4, -0.601)) * CFAngles(Vector3.new(-15.868, -12.953, -7.631));
  554. })
  555. wait(.2)
  556. vel:Destroy()
  557. Debounces.damageLevel = 0
  558. Debounces.scalingDamage = false
  559. Debounces.isBoosting = false
  560. end
  561. end)
  562.  
  563. uinps.InputBegan:connect(function(InputObject)
  564. if InputObject.KeyCode == Enum.KeyCode.Q and Debounces.isAttacking == false and Debounces.isSprinting == false and Debounces.isPassive == true and Debounces.isTyping == false then
  565. local isLooping = true
  566. uinps.InputEnded:connect(function(InputObject2)
  567. if InputObject2.KeyCode == Enum.KeyCode.Q then
  568. isLooping = false
  569. end
  570. end)
  571. while true do
  572. if isLooping == false then
  573. break
  574. end
  575. Debounces.attackNumber = Debounces.attackNumber + 1
  576. local aimPos = mouse.Hit.p
  577. local head = Instance.new("Part",c)
  578. head.Size = Vector3.new(12,.2,12)
  579. head.CanCollide = false
  580. head.Anchored = true
  581. head.Transparency = 1
  582. for i = 1,2 do
  583. local decal = Instance.new("Decal",head)
  584. decal.Texture = "rbxassetid://323497117"
  585. if i == 1 then
  586. decal.Face = Enum.NormalId.Top
  587. else
  588. decal.Face = Enum.NormalId.Bottom
  589. end
  590. end
  591. if Debounces.attackNumber%2 == 1 then
  592. head.CFrame = CFrame.new(c.Torso.CFrame:toWorldSpace(CFrame.new(8,8,.5)).p,aimPos)
  593. else
  594. head.CFrame = CFrame.new(c.Torso.CFrame:toWorldSpace(CFrame.new(-8,8,.5)).p,aimPos)
  595. end
  596. spawn(function()
  597. local timer = 0
  598.  
  599. end
  600. head.CFrame = CFrame.new(head.CFrame.p,aimPos)
  601. local ray = Ray.new(head.CFrame.p,(aimPos - head.CFrame.p).unit * 999)
  602. local hit, pos = workspace:FindPartOnRay(ray,c)
  603. local dis = (head.CFrame.p - pos).magnitude
  604. local rayPart = Instance.new("Part",rayModel)
  605. rayPart.Material = "Neon"
  606. rayPart.FormFactor = "Custom"
  607. rayPart.BrickColor = BrickColor.new(1,1,1)
  608. rayPart.Anchored = true
  609. rayPart.CanCollide = false
  610. rayPart.Size = Vector3.new(7,7,dis + 400)
  611. local rayCFrame = CFrame.new(head.CFrame.p + (aimPos - head.CFrame.p).unit * (dis/2 + 200),head.CFrame.p + (aimPos - head.CFrame.p).unit * dis * 2)
  612. rayPart.CFrame = rayCFrame
  613. head:Destroy()
  614. end)
  615. wait()
  616. local s = Instance.new("Sound",head)
  617. s.Volume = 1
  618. s.SoundId = "rbxassetid://332223043"
  619. s:Play()
  620. wait(.04)
  621. end
  622. end
  623. end)
  624.  
  625. uinps.InputBegan:connect(function(InputObj)
  626. if InputObj.KeyCode == Enum.KeyCode.E and Debounces.isAttacking == false and Debounces.isSprinting == false and Debounces.isPassive == true and Debounces.isTyping == false then
  627. Debounces.isAttacking = true
  628. local aimPos = c.HumanoidRootPart.CFrame:toWorldSpace(CFrame.new(0,0,-999)).p
  629. local head = Instance.new("Part",c)
  630. head.Size = Vector3.new(18,.2,18)
  631. head.CanCollide = false
  632. head.Anchored = true
  633. head.CFrame = CFrame.new(c.HumanoidRootPart.CFrame:toWorldSpace(CFrame.new(0,0,-9)).p,aimPos)
  634. head.Transparency = 1
  635. for i = 1,2 do
  636. local decal = Instance.new("Decal",head)
  637. decal.Texture = "rbxassetid://323497117"
  638. if i == 1 then
  639. decal.Face = Enum.NormalId.Top
  640. else
  641. decal.Face = Enum.NormalId.Bottom
  642. end
  643. end
  644. setLerp(.1)
  645. setJointCFrames({
  646. CFrame.new(Vector3.new(0, 0, 0)) * CFAngles(Vector3.new(0, 0, 0));
  647. CFrame.new(Vector3.new(0, 1.499, -0.09)) * CFAngles(Vector3.new(-11.676, -0.001, -0.001));
  648. CFrame.new(Vector3.new(-1.7, 0, 0)) * CFAngles(Vector3.new(-12.808, -28.88, -21.502));
  649. CFrame.new(Vector3.new(1.699, 1.2, 0.599)) * CFAngles(Vector3.new(-146.606, 16.571, 13.928));
  650. CFrame.new(Vector3.new(-0.501, -1.601, 0.6)) * CFAngles(Vector3.new(-60, 0, -0.001));
  651. CFrame.new(Vector3.new(0.5, -1.4, -0.4)) * CFAngles(Vector3.new(-15.001, -15.001, 0));
  652. })
  653. spawn(function()
  654. local timer = 0
  655.  
  656. end
  657. head.CFrame = CFrame.new(head.CFrame.p,aimPos)
  658. local ray = Ray.new(head.CFrame.p,(aimPos - head.CFrame.p).unit * 999)
  659. local hit, pos = workspace:FindPartOnRay(ray,c)
  660. local dis = (head.CFrame.p - pos).magnitude
  661. local rayPart = Instance.new("Part",rayModel)
  662. rayPart.Material = "Neon"
  663. rayPart.FormFactor = "Custom"
  664. rayPart.Name = "Punch"
  665. rayPart.BrickColor = BrickColor.new(1,1,1)
  666. rayPart.Anchored = true
  667. rayPart.CanCollide = false
  668. rayPart.Size = Vector3.new(28,28,dis + 400)
  669. local rayCFrame = CFrame.new(head.CFrame.p + (aimPos - head.CFrame.p).unit * (dis/2 + 200),head.CFrame.p + (aimPos - head.CFrame.p).unit * dis * 2)
  670. rayPart.CFrame = rayCFrame
  671. head:Destroy()
  672. end)
  673. wait()
  674. local s = Instance.new("Sound",head)
  675. s.Volume = 1
  676. s.SoundId = "rbxassetid://332223043"
  677. s.Pitch = .8
  678. s:Play()
  679. wait(.75)
  680. setLerp(.17)
  681. setJointCFrames({
  682. CFrame.new(Vector3.new(0, -.5, 0)) * CFAngles(Vector3.new(-20, 15, 0));
  683. CFrame.new(Vector3.new(0, 1.499, -0.09)) * CFAngles(Vector3.new(-11.676, 14.999, -0.001));
  684. CFrame.new(Vector3.new(-1.7, 0, 0.2)) * CFAngles(Vector3.new(-33.928, -4.374, -38.76));
  685. CFrame.new(Vector3.new(1.499, 0.4, -0.601)) * CFAngles(Vector3.new(74.335, 25.091, -6.155));
  686. CFrame.new(Vector3.new(-0.501, -1.601, 0.6)) * CFAngles(Vector3.new(-45, 0, -0.001));
  687. CFrame.new(Vector3.new(0.5, -1.8, -0.4)) * CFAngles(Vector3.new(-15, -15, 0));
  688. })
  689. wait(.5)
  690. Debounces.isAttacking = false
  691. end
  692. end)
  693.  
  694. reflect = function(d,n)
  695. local i, n = -1 * d.unit, n.unit
  696. local dot = n:Dot(i)
  697. return 2*dot*n - i
  698. end
  699.  
  700. makeReflectionBeam = function(pos,look,isCrit)
  701. local ray = Ray.new(pos,look)
  702. local hit,hitpos,norm = workspace:FindPartOnRay(ray,c)
  703. local e = Instance.new("Part",rayModel)
  704. e.Anchored = true
  705. e.CanCollide = false
  706. e.BrickColor = BrickColor.new("White")
  707. e.Material = "Neon"
  708. e.FormFactor = "Custom"
  709. e.Size = Vector3.new(6,6,(pos - hitpos).magnitude)
  710. if isCrit == true then
  711. e.Size = Vector3.new(16,16,(pos - hitpos).magnitude)
  712. e.Name = "Punch"
  713. end
  714. e.CFrame = CFrame.new(pos + (hitpos - pos)/2, pos)
  715. local e = Instance.new("Sound",c)
  716. if isCrit == true then
  717. e.Volume = .5
  718. else
  719. e.Volume = .3
  720. e.Pitch = 1.5
  721. end
  722. e.SoundId = "rbxassetid://200632875"
  723. e:Play()
  724. spawn(function()
  725. wait(6)
  726. e:Destroy()
  727. end)
  728. wait(.05)
  729. if hit ~= nil then
  730. newDir = reflect(look.unit,norm,isCrit)
  731. makeReflectionBeam(hitpos,newDir * 999,isCrit)
  732. end
  733. end
  734.  
  735. uinps.InputBegan:connect(function(InputObject)
  736. if InputObject.KeyCode == Enum.KeyCode.Q and Debounces.isAttacking == false and Debounces.isSprinting == true and Debounces.isPassive == true and Debounces.isTyping == false then
  737. local isLooping = true
  738. uinps.InputEnded:connect(function(InputObject2)
  739. if InputObject2.KeyCode == Enum.KeyCode.Q then
  740. isLooping = false
  741. end
  742. end)
  743. while true do
  744. if isLooping == false then
  745. break
  746. end
  747. Debounces.attackNumber = Debounces.attackNumber + 1
  748. local aimPos = mouse.Hit.p
  749. local head = Instance.new("Part",c)
  750. head.Size = Vector3.new(12,.2,12)
  751. head.CanCollide = false
  752. head.Anchored = true
  753. head.Transparency = 1
  754. for i = 1,2 do
  755. local decal = Instance.new("Decal",head)
  756. decal.Texture = "rbxassetid://323497117"
  757. if i == 1 then
  758. decal.Face = Enum.NormalId.Top
  759. else
  760. decal.Face = Enum.NormalId.Bottom
  761. end
  762. end
  763. if Debounces.attackNumber%2 == 1 then
  764. head.CFrame = CFrame.new(c.Torso.CFrame:toWorldSpace(CFrame.new(8,8,.5)).p,aimPos)
  765. else
  766. head.CFrame = CFrame.new(c.Torso.CFrame:toWorldSpace(CFrame.new(-8,8,.5)).p,aimPos)
  767. end
  768. spawn(function()
  769. local timer = 0
  770.  
  771. end)
  772.  
  773. wait()
  774. local s = Instance.new("Sound",head)
  775. s.Volume = 1
  776. s.SoundId = "rbxassetid://332223043"
  777. s.Pitch = 1.02
  778. s:Play()
  779. wait(.2)
  780. end
  781. end
  782. end)
  783.  
  784. uinps.InputBegan:connect(function(InputObj)
  785. if InputObj.KeyCode == Enum.KeyCode.E and Debounces.isAttacking == false and Debounces.isSprinting == true and Debounces.isPassive == true and Debounces.isTyping == false then
  786. Debounces.isAttacking = true
  787. local aimPos = c.HumanoidRootPart.CFrame:toWorldSpace(CFrame.new(0,0,-999)).p
  788. local head = Instance.new("Part",c)
  789. head.Size = Vector3.new(18,.2,18)
  790. head.CanCollide = false
  791. head.Anchored = true
  792. head.CFrame = CFrame.new(c.HumanoidRootPart.CFrame:toWorldSpace(CFrame.new(0,0,-9)).p,aimPos)
  793. head.Transparency = 1
  794. for i = 1,2 do
  795. local decal = Instance.new("Decal",head)
  796. decal.Texture = "rbxassetid://323497117"
  797. if i == 1 then
  798. decal.Face = Enum.NormalId.Top
  799. else
  800. decal.Face = Enum.NormalId.Bottom
  801. end
  802. end
  803. setLerp(.1)
  804. setJointCFrames({
  805. CFrame.new(Vector3.new(0, 0, 0)) * CFAngles(Vector3.new(0, 0, 0));
  806. CFrame.new(Vector3.new(0, 1.499, -0.09)) * CFAngles(Vector3.new(-11.676, -0.001, -0.001));
  807. CFrame.new(Vector3.new(-1.7, 0, 0)) * CFAngles(Vector3.new(-12.808, -28.88, -21.502));
  808. CFrame.new(Vector3.new(1.699, 1.2, 0.599)) * CFAngles(Vector3.new(-146.606, 16.571, 13.928));
  809. CFrame.new(Vector3.new(-0.501, -1.601, 0.6)) * CFAngles(Vector3.new(-60, 0, -0.001));
  810. CFrame.new(Vector3.new(0.5, -1.4, -0.4)) * CFAngles(Vector3.new(-15.001, -15.001, 0));
  811. })
  812. spawn(function()
  813. local timer = 0
  814.  
  815. end)
  816. wait()
  817. local s = Instance.new("Sound",head)
  818. s.Volume = 2
  819. s.SoundId = "rbxassetid://332223043"
  820. s.Pitch = .8
  821. s:Play()
  822. wait(.75)
  823. setLerp(.17)
  824. setJointCFrames({
  825. CFrame.new(Vector3.new(0, -.5, 0)) * CFAngles(Vector3.new(-20, 15, 0));
  826. CFrame.new(Vector3.new(0, 1.499, -0.09)) * CFAngles(Vector3.new(-11.676, 14.999, -0.001));
  827. CFrame.new(Vector3.new(-1.7, 0, 0.2)) * CFAngles(Vector3.new(-33.928, -4.374, -38.76));
  828. CFrame.new(Vector3.new(1.499, 0.4, -0.601)) * CFAngles(Vector3.new(74.335, 25.091, -6.155));
  829. CFrame.new(Vector3.new(-0.501, -1.601, 0.6)) * CFAngles(Vector3.new(-45, 0, -0.001));
  830. CFrame.new(Vector3.new(0.5, -1.8, -0.4)) * CFAngles(Vector3.new(-15, -15, 0));
  831. })
  832. wait(.5)
  833. Debounces.isAttacking = false
  834. end
  835. end)
  836.  
  837. uinps.InputBegan:connect(function(InputObj)
  838. if InputObj.KeyCode == Enum.KeyCode.Slash then
  839. local finishEvent = nil
  840. Debounces.isTyping = true
  841. finishEvent = uinps.InputBegan:connect(function(InputObj)
  842. if InputObj.KeyCode == Enum.KeyCode.Return or InputObj.UserInputType == Enum.UserInputType.MouseButton1 then
  843. Debounces.isTyping = false
  844. finishEvent:disconnect()
  845. end
  846. end)
  847. end
  848. end)
  849.  
  850. uinps.InputBegan:connect(function(InputObj)
  851. if InputObj.KeyCode == Enum.KeyCode.LeftShift then
  852. Debounces.isSprinting = true
  853. end
  854. end)
  855.  
  856. uinps.InputEnded:connect(function(InputObj)
  857. if InputObj.KeyCode == Enum.KeyCode.LeftShift then
  858. Debounces.isSprinting = false
  859. end
  860. end)
  861.  
  862. end
  863. for i,v in pairs (rayModel:children()) do
  864. if v.Transparency >= 1 then
  865. v:Destroy()
  866. else
  867. v.CanCollide = true
  868. local parts = v:GetTouchingParts()
  869. v.CanCollide = false
  870. for i = 1,#parts do
  871. if parts[i].Parent:FindFirstChild("Humanoid") and parts[i].Parent ~= c and v.Name ~= "Punch" then
  872. parts[i].Parent.Humanoid:TakeDamage(.5/(Debounces.FPS/60))
  873. elseif parts[i].Parent:FindFirstChild("Humanoid") and parts[i].Parent ~= c and v.Name == "Punch" then
  874. parts[i].Parent.Humanoid:TakeDamage(3.1/(Debounces.FPS/60))
  875. end
  876. end
  877. v.Size = v.Size + Vector3.new(1/(Debounces.FPS/60),1/(Debounces.FPS/60),0)
  878. v.Transparency = v.Transparency + .05/(Debounces.FPS/60)
  879. end
  880. end
  881. for i = 1,#Joints do
  882. Joints[i].C0 = Joints[i].C0:lerp(JointTargets[i], FPSLerp)
  883. end
  884. local sineval = math.sin(tick() * 2) * 3
  885. fire.Acceleration = Vector3.new(sineval,1,sineval)
  886. light.Brightness = math.sin(math.cos(tick() * 2) * 1.5)
  887. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement