Advertisement
forscripts

sans

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