0JohnnyBe0

Papyrus

Jun 30th, 2017
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.90 KB | None | 0 0
  1. --------------------------------------------------------
  2.  
  3. pls = game:GetService'Players'
  4. rs = game:GetService'RunService'
  5. uinps = game:GetService'UserInputService'
  6. lp = pls.LocalPlayer
  7. mouse = lp:GetMouse()
  8. c = lp.Character
  9. rayModel = Instance.new("Model",c)
  10. human = c.Humanoid
  11. Cone = nil
  12. human.MaxHealth = 500
  13. wait()
  14. human.Health = 500
  15. c.Health:Destroy()
  16.  
  17. --------------------------------------------------------
  18.  
  19. Debounces = {
  20. FPS = 0;
  21. isAttacking = false;
  22. isMoving = false;
  23. isSprinting = false;
  24. Debounce = false;
  25. isTyping = false;
  26. isJumping = false;
  27. isFlash = false;
  28. }
  29.  
  30. --------------------------------------------------------
  31.  
  32. numLerp = function(start, goal, alpha)
  33. return(((goal - start) * alpha) + start)
  34. end
  35.  
  36. CFrameZero = function()
  37. return CFrame.new(Vector3.new())
  38. end
  39. local function a()
  40. local t=tick();
  41. local l=t%1*3;
  42. local t=.5*math.pi*(l%1);
  43. if l<1 then
  44. return Color3.new(1,1-math.cos(t),1-math.sin(t));
  45. elseif l<2 then
  46. return Color3.new(1-math.sin(t),1,1-math.cos(t));
  47. else
  48. return Color3.new(1-math.cos(t),1-math.sin(t),1);
  49. end;
  50. end;
  51. rad = function(value)
  52. return math.rad(value)
  53. end
  54.  
  55. CFAngles = function(Vector)
  56. return CFrame.Angles(rad(Vector.x),rad(Vector.y),rad(Vector.z))
  57. end
  58.  
  59. --------------------------------------------------------
  60.  
  61. AnimStat = {
  62. lerpSpeed = .2;
  63. lerpSpeed2 = .35;
  64. lerpTween = 0;
  65. }
  66.  
  67. Joints = {
  68. c.HumanoidRootPart.RootJoint;
  69. c.Torso.Neck;
  70. c.Torso['Left Shoulder'];
  71. c.Torso['Right Shoulder'];
  72. c.Torso['Left Hip'];
  73. c.Torso['Right Hip'];
  74. }
  75.  
  76. JointTargets = {
  77. CFrameZero();
  78. CFrameZero();
  79. CFrameZero();
  80. CFrameZero();
  81. CFrameZero();
  82. CFrameZero();
  83. }
  84.  
  85.  
  86. --------------------------------------------------------
  87.  
  88. prepareCharacter = function()
  89. music = Instance.new("Sound",c.HumanoidRootPart)
  90. music.SoundId = "rbxassetid://394144904"
  91. music.Looped = true
  92. music.Volume = .6
  93. music2 = Instance.new("Sound",c)
  94. music2.SoundId = "rbxassetid://259613634"
  95. music2.Looped = true
  96. music2.Volume = 1
  97. music3 = Instance.new("Sound",c.HumanoidRootPart)
  98. music3.SoundId = "rbxassetid://266530326"
  99. music3.Looped = true
  100. music3.Volume = 1
  101. music4 = Instance.new("Sound",c.HumanoidRootPart)
  102. music4.SoundId = "rbxassetid://155738252"
  103. music4.Looped = true
  104. music4.Volume = 1
  105. music5 = Instance.new("Sound",c.HumanoidRootPart)
  106. music5.SoundId = "rbxassetid://215391212"
  107. music5.Looped = true
  108. music5.Volume = 1
  109. human.WalkSpeed = 0
  110. human.JumpPower = 0
  111. for i,v in pairs (c:children()) do
  112. if v:isA"Hat" then v:Destroy() end
  113. if v:FindFirstChild("roblox") then v.roblox:Destroy() end
  114. if v.Name == "Head" then v.Transparency = 1 for _,x in pairs (v:children()) do if x.ClassName == "Sound" then x:Destroy() end end end
  115. if v:FindFirstChild("face") then v.face:Destroy() end
  116. if v:isA"Part" then v.BrickColor = BrickColor.new("White") end
  117. end
  118. local shirt = c:FindFirstChild("Shirt") or Instance.new("Shirt",c)
  119. local pants = c:FindFirstChild("Pants") or Instance.new("Pants",c)
  120. shirt.ShirtTemplate = "rbxassetid://429009258"
  121. pants.PantsTemplate = "rbxassetid://429011265"
  122. local Head = Instance.new("Part",c)
  123. Head.Size = Vector3.new(2,2,1)
  124. Head.Transparency = 1
  125. Head:BreakJoints()
  126. local hw = Instance.new("Weld",c.Head)
  127. hw.Part0 = c.Head
  128. hw.Part1 = Head
  129. hw.C0 = CFrame.new(0,.3,0)
  130. faceDecal = Instance.new("Decal",Head)
  131. faceDecal.Face = Enum.NormalId.Front
  132. faceDecal.Texture = "rbxassetid://409451128"
  133. local backDecal = Instance.new("Decal",Head)
  134. backDecal.Face = Enum.NormalId.Back
  135. backDecal.Texture = "rbxassetid://409451128"
  136. local mes = Instance.new("BlockMesh",Head)
  137. mes.Scale = Vector3.new(1,1,.4)
  138. local Anim = human:FindFirstChild("Animator")
  139. if Anim then Anim:Destroy() end
  140. end
  141.  
  142. setJointCFrames = function(table)
  143. for i = 1,#table do
  144. JointTargets[i] = table[i]
  145. end
  146. end
  147.  
  148. triWave = function(x) --> triangular sine
  149. local pi2 = math.pi/2
  150. return math.abs((x/pi2)%4-2)-1
  151. end
  152.  
  153. setLerp = function(speed)
  154. AnimStat.lerpSpeed = speed
  155. end
  156.  
  157. setTween = function(tween)
  158. AnimStat.lerpTween = tween
  159. end
  160.  
  161. playSound = function(id,part,vol,pitch)
  162. local vol = vol or 1
  163. local pitch = pitch or 1
  164. local x = Instance.new("Sound",part)
  165. x.Volume = vol
  166. x.Pitch = pitch
  167. x.SoundId = "rbxassetid://"..id
  168. spawn(function()
  169. wait()
  170. x:Play()
  171. wait(x.TimeLength + .2)
  172. x:Destroy()
  173. end)
  174. end
  175.  
  176. lerpBoom = function()
  177. if Cone then
  178. Cone.CFrame = CFrame.new(c.HumanoidRootPart.CFrame.p,c.HumanoidRootPart.CFrame.p + c.HumanoidRootPart.Velocity) * CFrame.Angles(-math.pi/2,0,0)
  179. cMesh.Scale = Vector3.new(20,20+c.HumanoidRootPart.Velocity.magnitude/10,20)
  180. Cone.Transparency = 1-c.HumanoidRootPart.Velocity.magnitude/1000
  181. else
  182. Cone = Instance.new("Part",c)
  183. Cone.Anchored = true
  184. Cone.CanCollide = false
  185. Cone.Transparency = math.random(50,70)/100
  186. Cone.Size = Vector3.new(1,1,1)
  187. Cone.CFrame = CFrame.new(c.HumanoidRootPart.CFrame.p,c.HumanoidRootPart.CFrame.p + c.HumanoidRootPart.Velocity) * CFrame.Angles(-math.pi/2,0,0)
  188. cMesh = Instance.new("SpecialMesh",Cone)
  189. cMesh.MeshId = "rbxassetid://1033714"
  190. cMesh.Scale = Vector3.new(20,50,20)
  191. end
  192. end
  193.  
  194. noBoom = function()
  195. if Cone then local x = Cone Cone = nil
  196. for i = 1,20 do
  197. wait()
  198. x.Mesh.Scale = x.Mesh.Scale + Vector3.new(-.5,1,-.5)
  199. x.Transparency = x.Transparency + 1/30
  200. end
  201. end
  202. end
  203.  
  204. gasterBlast = function(tCFrame,aimPos,charge)
  205. local aimTarget
  206. if aimPos then
  207. aimTarget = CFrame.new(tCFrame,aimPos)
  208. else
  209. aimTarget = tCFrame
  210. end
  211. local gast = Instance.new("Part",c)
  212. gast.Size = Vector3.new(12,.2,12)
  213. gast.CanCollide = false
  214. gast.Anchored = true
  215. gast.Transparency = 1
  216. if charge then
  217. playSound(130992510,gast,math.random(90,110)/100)
  218. end
  219. wait()
  220. for i = 1,2 do
  221. local decal = Instance.new("Decal",gast)
  222. decal.Texture = "rbxassetid://337889681"
  223. if i == 1 then
  224. decal.Face = Enum.NormalId.Top
  225. else
  226. decal.Face = Enum.NormalId.Bottom
  227. end
  228. end
  229. gast.CFrame = CFrame.new(aimTarget.p - Vector3.new(math.sin(tick()*10)*10,20,math.cos(tick()*10)*10))
  230. spawn(function()
  231. local tarCFrame = gast.CFrame
  232. local isLooping = true
  233. spawn(function()
  234. while rs.RenderStepped:wait() and isLooping do
  235. gast.CFrame = gast.CFrame:lerp(tarCFrame,.6/(Debounces.FPS/60))
  236. end
  237. end)
  238. for i = 1,30 do
  239. wait()
  240. tarCFrame = gast.CFrame:lerp(aimTarget,.24)
  241. end
  242. --playSound(340722848,gast,math.random(90,110)/100)
  243. isLooping = false
  244. wait(.08)
  245. local ray = Ray.new(aimTarget.p,aimTarget.lookVector.unit * 999)
  246. local _, pos = workspace:FindPartOnRay(ray,c)
  247. local dis = (aimTarget.p - pos).magnitude
  248. local rayCFrame = CFrame.new(gast.CFrame.p + (pos - gast.CFrame.p).unit * (dis/2 + 200),gast.CFrame.p + (pos - gast.CFrame.p).unit * dis * 2) * CFrame.Angles(0,math.pi/2,0)
  249. local rayPart = Instance.new("Part",rayModel)
  250. rayPart.Material = "Neon"
  251. rayPart.FormFactor = "Custom"
  252. rayPart.Color = a();
  253. rayPart.Anchored = true
  254. rayPart.CanCollide = false
  255. rayPart.Shape = "Cylinder"
  256. rayPart.Size = Vector3.new(dis + 400,8,8)
  257. rayPart.CFrame = rayCFrame
  258. gast:Destroy()
  259. end)
  260. end
  261.  
  262. largegasterBlast = function(tCFrame,aimPos)
  263. local aimTarget
  264. if aimPos then
  265. aimTarget = CFrame.new(tCFrame,aimPos)
  266. else
  267. aimTarget = tCFrame
  268. end
  269. local gast = Instance.new("Part",c)
  270. gast.Size = Vector3.new(25,.2,25)
  271. gast.CanCollide = false
  272. gast.Anchored = true
  273. gast.Transparency = 1
  274. playSound(130992510,gast,math.random(85,97)/100)
  275. wait()
  276. for i = 1,2 do
  277. local decal = Instance.new("Decal",gast)
  278. decal.Texture = "rbxassetid://337889681"
  279. if i == 1 then
  280. decal.Face = Enum.NormalId.Top
  281. else
  282. decal.Face = Enum.NormalId.Bottom
  283. end
  284. end
  285. gast.CFrame = CFrame.new(aimTarget.p - Vector3.new(math.sin(tick()*10)*10,20,math.cos(tick()*10)*10))
  286. spawn(function()
  287. local tarCFrame = gast.CFrame
  288. local isLooping = true
  289. spawn(function()
  290. while rs.RenderStepped:wait() and isLooping do
  291. gast.CFrame = gast.CFrame:lerp(tarCFrame,.6/(Debounces.FPS/60))
  292. end
  293. end)
  294. for i = 1,40 do
  295. wait()
  296. tarCFrame = gast.CFrame:lerp(aimTarget,.18)
  297. end
  298. --playSound(340722848,gast,math.random(80,95)/100)
  299. isLooping = false
  300. wait(.08)
  301. local ray = Ray.new(aimTarget.p,aimTarget.lookVector.unit * 999)
  302. local _, pos = workspace:FindPartOnRay(ray,c)
  303. local dis = (aimTarget.p - pos).magnitude
  304. local rayCFrame = CFrame.new(gast.CFrame.p + (pos - gast.CFrame.p).unit * (dis/2 + 200),gast.CFrame.p + (pos - gast.CFrame.p).unit * dis * 2) * CFrame.Angles(0,math.pi/2,0)
  305. local rayPart = Instance.new("Part",rayModel)
  306. rayPart.Material = "Neon"
  307. rayPart.FormFactor = "Custom"
  308. rayPart.Color = a();
  309. rayPart.Anchored = true
  310. rayPart.CanCollide = false
  311. rayPart.Shape = "Cylinder"
  312. rayPart.Size = Vector3.new(dis + 400,17,17)
  313. rayPart.CFrame = rayCFrame
  314. gast:Destroy()
  315. end)
  316. end
  317.  
  318. --------------------------------------------------------
  319.  
  320. prepareCharacter()
  321.  
  322. --------------------------------------------------------
  323.  
  324. spawn(function()
  325. local sine = 0
  326. while wait() do
  327. if Debounces.isFlash then
  328. if (tick()*8)%2 > 1 then
  329. faceDecal.Texture = "rbxassetid://409451128"
  330. else
  331. faceDecal.Texture = "rbxassetid://409451128"
  332. end
  333. else
  334. faceDecal.Texture = "rbxassetid://409451128"
  335. end
  336. if Debounces.isAttacking == false and Debounces.isMoving == false and Debounces.Debounce == false and Debounces.isJumping == false then
  337. setLerp(.8)
  338. local spasm = math.abs(math.sin(tick()*20))*1.1
  339. local spasm2 = math.abs(math.sin(tick()*20-2))*1.1
  340. local spasm3 = math.abs(math.sin(tick()*20-2.3))*1.1
  341. setJointCFrames({
  342. CFrame.new(Vector3.new(0, 0-spasm, 0)) * CFAngles(Vector3.new(0, 0, 0));
  343. CFrame.new(Vector3.new(0, 1.5, 0)) * CFAngles(Vector3.new(-0.011, -0.502, -1.177));
  344. CFrame.new(Vector3.new(-1.5-spasm2^2/3, -0.001, 0)) * CFAngles(Vector3.new(-2.344, 7.899, -2.82+spasm3^2*-60));
  345. CFrame.new(Vector3.new(1.569+spasm2^2/3, 0, -0.1)) * CFAngles(Vector3.new(4.822, 1.123, 6.383+spasm3^2*60));
  346. CFrame.new(Vector3.new(-0.61, -2+spasm/1.01, -.15)) * CFAngles(Vector3.new(-2.206, 0.767, -0.582));
  347. CFrame.new(Vector3.new(0.55, -2+spasm/1.01, -.1)) * CFAngles(Vector3.new(-0.026, 0.463, 3.184));
  348. })
  349. elseif Debounces.isAttacking == false and Debounces.isMoving == true and Debounces.Debounce == false and Debounces.isSprinting == false and Debounces.isJumping == false then
  350. sine = tick()*18
  351. human.WalkSpeed = 45
  352. setLerp(.35)
  353. setJointCFrames({
  354. CFrame.new(Vector3.new(0, math.sin(sine)/50-.3, 0)) * CFAngles(Vector3.new(-30-math.sin(sine*2)*3, math.sin(sine*2)*15, 0));
  355. CFrame.new(Vector3.new(0, 1.48, 0.099)) * CFAngles(Vector3.new(14.999, -0.001, 0));
  356. CFrame.new(Vector3.new(-1.5, -0.001, 0.2+math.sin(sine*2+math.pi)*1.2)) * CFAngles(Vector3.new(-25.001+math.sin(sine*2+math.pi)*-90, 0, -15));
  357. CFrame.new(Vector3.new(1.5, -0.001, 0.2+math.sin(sine*2)*1.2)) * CFAngles(Vector3.new(-25+math.sin(sine*2)*-90, -0.001, 14.999));
  358. CFrame.new(Vector3.new(-0.501, -2+math.cos(sine*2+math.pi)/3, .3+math.sin(sine*2))) * CFAngles(Vector3.new(-25+math.sin(sine*2)*-70, 0, -0.001));
  359. CFrame.new(Vector3.new(0.499, -2+math.cos(sine*2)/3, .3+math.sin(sine*2+math.pi))) * CFAngles(Vector3.new(-25+math.sin(sine*2)*70, 0, 0));
  360. })
  361. elseif Debounces.isAttacking == false and Debounces.isMoving == true and Debounces.Debounce == false and Debounces.isSprinting == true and Debounces.isJumping == false then
  362. sine = tick()*28
  363. human.WalkSpeed = 30
  364. lerpBoom()
  365. setLerp(.65)
  366. setJointCFrames({
  367. CFrame.new(Vector3.new(0, math.sin(sine)/50-.3, 0)) * CFAngles(Vector3.new(-30-math.sin(sine*2)*3, math.sin(sine*2)*15, 0));
  368. CFrame.new(Vector3.new(0, 1.48, 0.099)) * CFAngles(Vector3.new(14.999, -0.001, 0));
  369. CFrame.new(Vector3.new(-1.5, -0.001, 0.2+math.sin(sine*2+math.pi)*1.2)) * CFAngles(Vector3.new(-25.001+math.sin(sine*2+math.pi)*-90, 0, -15));
  370. CFrame.new(Vector3.new(1.5, -0.001, 0.2+math.sin(sine*2)*1.2)) * CFAngles(Vector3.new(-25+math.sin(sine*2)*-90, -0.001, 14.999));
  371. CFrame.new(Vector3.new(-0.501, -2+math.cos(sine*2+math.pi)/3, .3+math.sin(sine*2))) * CFAngles(Vector3.new(-25+math.sin(sine*2)*-70, 0, -0.001));
  372. CFrame.new(Vector3.new(0.499, -2+math.cos(sine*2)/3, .3+math.sin(sine*2+math.pi))) * CFAngles(Vector3.new(-25+math.sin(sine*2)*70, 0, 0));
  373. })
  374. elseif Debounces.isJumping == true and Debounces.Debounce == false then
  375. setLerp(.14)
  376. human.WalkSpeed = 45
  377. setJointCFrames({
  378. CFrame.new(Vector3.new(0, 0, 0)) * CFAngles(Vector3.new(-8, 0, 0));
  379. CFrame.new(Vector3.new(0, 1.5, -0.15)) * CFAngles(Vector3.new(-10.138, 3.687, 0.306));
  380. CFrame.new(Vector3.new(-1.23, 0.069, -0.56)) * CFAngles(Vector3.new(50.809, 0.672, 18.704));
  381. CFrame.new(Vector3.new(0.929, -0.031, -1.0912)) * CFAngles(Vector3.new(63.00, 13.85, -36.416));
  382. CFrame.new(Vector3.new(-0.63, -1.82, -0.74)) * CFAngles(Vector3.new(31.324, 3.424, -1.249));
  383. CFrame.new(Vector3.new(0.619, -1.331, 0.82)) * CFAngles(Vector3.new(-59.644, 0.998, 9.776));
  384. })
  385. end
  386. end
  387. end)
  388.  
  389. human.Changed:connect(function(prop)
  390. if prop == "MoveDirection" then
  391. if human.MoveDirection.magnitude > .02 then
  392. Debounces.isMoving = true
  393. else
  394. Debounces.isMoving = false
  395. end
  396. end
  397. end)
  398.  
  399. uinps.InputBegan:connect(function(InputObj)
  400. if InputObj.KeyCode == Enum.KeyCode.Slash then
  401. local finishEvent = nil
  402. Debounces.isTyping = true
  403. finishEvent = uinps.InputBegan:connect(function(InputObj)
  404. if InputObj.KeyCode == Enum.KeyCode.Return or InputObj.UserInputType == Enum.UserInputType.MouseButton1 then
  405. Debounces.isTyping = false
  406. finishEvent:disconnect()
  407. end
  408. end)
  409. end
  410. end)
  411.  
  412. mouse.KeyDown:connect(function(key)
  413. if key == "0" then
  414. Debounces.isSprinting = true
  415. playSound(160248522,c.Torso)
  416. for i = 1,3 do
  417. spawn(function()
  418. local e = Instance.new("Part",c)
  419. e.Size = Vector3.new(1,1,1)
  420. e.Material = "Neon"
  421. e.Color = a();
  422. e.Anchored = true
  423. e.CFrame = c.HumanoidRootPart.CFrame * CFrame.Angles(0,0,-math.pi/2)
  424. e.CanCollide = false
  425. local rm = Instance.new("SpecialMesh",e)
  426. rm.MeshType = "FileMesh"
  427. rm.MeshId = "rbxassetid://3270017"
  428. rm.Scale = Vector3.new(3.2,3.2,10)
  429. for x = 1,30 do
  430. wait()
  431. rm.Scale = rm.Scale:lerp(Vector3.new(i*30,i*30,(4-i)*450),.1)
  432. e.Transparency = x/30+.5
  433. end
  434. end)
  435. end
  436. c.HumanoidRootPart.Velocity = c.HumanoidRootPart.CFrame.lookVector * 200
  437. end
  438. end)
  439.  
  440. mouse.KeyUp:connect(function(key)
  441. if key == "0" then
  442. Debounces.isSprinting = false
  443. end
  444. end)
  445.  
  446. mouse.KeyDown:connect(function(key)
  447. if key == "v" then
  448. playSound(201858087,c.Torso,math.random(90,120)/100)
  449. local oldPos = c.HumanoidRootPart.CFrame.p
  450. local mHit = mouse.Hit.p
  451. for i = 1,2 do
  452. spawn(function()
  453. local pos
  454. if i == 1 then pos = oldPos else pos = mHit end
  455. local p = Instance.new("Part",workspace)
  456. p.Anchored = true
  457. p.CanCollide = false
  458. p.Color = a();
  459. p.FormFactor = "Custom"
  460. p.CFrame = CFrame.new(pos + Vector3.new(0,500,0))
  461. p.Transparency = .4
  462. p.Size = Vector3.new(20,1000,20)
  463. for i = 1,20 do
  464. wait()
  465. p.Transparency = .4 + (i/10)*.6
  466. p.Size = Vector3.new(20-i*1.5,1000,20-i*1.5)
  467. p.CFrame = CFrame.new(pos + Vector3.new(0,500,0))
  468. end
  469. p:Destroy()
  470. end)
  471. end
  472. if Debounces.isMoving then
  473. c.HumanoidRootPart.CFrame = CFrame.new(mouse.Hit.p + Vector3.new(0,4,0),Vector3.new(c.HumanoidRootPart.Velocity.x,mouse.Hit.p.y+4,c.HumanoidRootPart.Velocity.z))
  474. else
  475. c.HumanoidRootPart.CFrame = CFrame.new(mouse.Hit.p + Vector3.new(0,4,0),Vector3.new(oldPos.x,mouse.Hit.p.y+4,oldPos.z))
  476. end
  477. end
  478. end)
  479.  
  480. mouse.KeyDown:connect(function(key)
  481. if key == "r" then
  482. local pointTarget = mouse.Hit.p
  483. for i = 1,20 do
  484. wait()
  485. gasterBlast(CFrame.new(pointTarget + Vector3.new(math.sin(tick()*10)*20,5+math.abs(math.sin(tick()*5)*10),math.cos(tick()*10)*20),pointTarget))
  486. end
  487. wait()
  488. largegasterBlast(CFrame.new(pointTarget + Vector3.new(0,35,0),pointTarget))
  489. end
  490. end)
  491.  
  492. mouse.KeyDown:connect(function(key)
  493. if key == "f" then
  494. local pointTarget = mouse.Hit.p
  495. for i = 1,20 do
  496. wait()
  497. gasterBlast(CFrame.new(c.HumanoidRootPart.CFrame.p + Vector3.new(0,50,0),pointTarget):toWorldSpace(CFrame.new(math.sin(i/2)*(20-i),math.cos(i/2)*(20-i),-i)))
  498. end
  499. largegasterBlast(CFrame.new(c.HumanoidRootPart.CFrame.p + Vector3.new(0,50,0),pointTarget):toWorldSpace(CFrame.new(0,0,-25)))
  500. end
  501. end)
  502.  
  503. mouse.Button1Down:connect(function()
  504. Debounces.isFlash = true
  505. end)
  506.  
  507. mouse.Button1Up:connect(function()
  508. Debounces.isFlash = false
  509. end)
  510.  
  511. mouse.KeyDown:connect(function(key)
  512. if key == "k" then
  513. if music.isPlaying then music:Stop() else music:Play() end
  514. end
  515. end)
  516.  
  517. mouse.KeyDown:connect(function(key)
  518. if key == "j" then
  519. if music2.isPlaying then music2:Stop() else music2:Play() end
  520. end
  521. end)
  522.  
  523. mouse.KeyDown:connect(function(key)
  524. if key == "l" then
  525. if music3.isPlaying then music3:Stop() else music3:Play() end
  526. end
  527. end)
  528.  
  529. mouse.KeyDown:connect(function(key)
  530. if key == "p" then
  531. if music4.isPlaying then music4:Stop() else music4:Play() end
  532. end
  533. end)
  534.  
  535. mouse.KeyDown:connect(function(key)
  536. if key == "o" then
  537. if music5.isPlaying then music4:Stop() else music5:Play() end
  538. end
  539. end)
  540.  
  541. mouse.KeyDown:connect(function(key)
  542. if key == "e" then
  543. gasterBlast(c.Torso.CFrame.p + Vector3.new(math.sin(tick()*10)*10,12,math.cos(tick()*10)*10),mouse.Hit.p,true)
  544. end
  545. end)
  546.  
  547. mouse.KeyDown:connect(function(key)
  548. if key == "c" then
  549. largegasterBlast(c.Torso.CFrame.p + Vector3.new(math.sin(tick()*10)*10,12,math.cos(tick()*10)*10),mouse.Hit.p)
  550. end
  551. end)
  552.  
  553. mouse.KeyDown:connect(function(key)
  554. if key == "q" then
  555. for i = 1,5 do
  556. wait()
  557. gasterBlast(c.Torso.CFrame.p + Vector3.new(math.sin(tick()*10)*10,12,math.cos(tick()*10)*10),mouse.Hit.p)
  558. end
  559. largegasterBlast(c.Torso.CFrame.p + Vector3.new(0,25,0),mouse.Hit.p)
  560. end
  561. end)
  562.  
  563. mouse.KeyDown:connect(function(key)
  564. if key == "t" then
  565. local pointTarget = mouse.Hit.p
  566. for i = 1,20 do
  567. gasterBlast(pointTarget + Vector3.new(math.sin(math.deg((360/40)*i))*(20-i),5+i,math.cos(math.deg((360/40)*i))*(20-i)),pointTarget)
  568. end
  569. wait(.2)
  570. for i = 1,10 do
  571. largegasterBlast(pointTarget + Vector3.new(math.sin(math.deg((360/20)*i))*25,20,math.cos(math.deg((360/20)*i))*25),pointTarget)
  572. end
  573. end
  574. end)
  575.  
  576. human.StateChanged:connect(function(os,ns)
  577. if c.HumanoidRootPart.Velocity.Y < .1 and Debounces.isJumping == true and ns == Enum.HumanoidStateType.Landed then
  578. Debounces.isJumping = false
  579. end
  580. end)
  581.  
  582. for i = 1,#Joints do
  583. Joints[i].C1 = CFrameZero()
  584. end
  585.  
  586. rs.RenderStepped:connect(function()
  587. Debounces.FPS = 1/rs.RenderStepped:wait()
  588. if Debounces.FPS < 30 then
  589. Debounces.FPS = 30
  590. end
  591. if Debounces.isSprinting then
  592. lerpBoom()
  593. else
  594. noBoom()
  595. end
  596. for _,v in pairs (rayModel:children()) do
  597. v.Transparency = v.Transparency + .06/(Debounces.FPS/60)
  598. if v.Transparency > .99 then v:Destroy() return end
  599. v.CanCollide = true
  600. local tParts = v:GetTouchingParts()
  601. v.CanCollide = false
  602. local vCFrame = v.CFrame
  603. v.Size = v.Size + Vector3.new(0,1,1)/(Debounces.FPS/60)
  604. v.CFrame = vCFrame
  605. for _,x in pairs (tParts) do
  606. if x and x.Parent and x.Parent:FindFirstChild("Humanoid") and x.Parent.Humanoid:isA'Humanoid' and x.Parent ~= c then
  607. x.Parent.Humanoid:TakeDamage(1,2)
  608. end
  609. end
  610. end
  611. local FPSLerp = AnimStat.lerpSpeed/(Debounces.FPS/60)
  612. for i = 1,#Joints do
  613. Joints[i].C0 = Joints[i].C0:lerp(JointTargets[i], FPSLerp)
  614. end
  615. end)
Add Comment
Please, Sign In to add comment