Advertisement
c00lkidd

Sensuke's Sans

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