Advertisement
ghostteen14

Untitled

May 12th, 2019
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.94 KB | None | 0 0
  1. -- This script has convert to FE by who i don't know?
  2.  
  3. -----------------------------------------------------
  4. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  5. local Player,game,owner = owner,game
  6. local RealPlayer = Player
  7. do
  8. print("FE Compatibility code by Joseph Deramus")
  9. local rp = RealPlayer
  10. script.Parent = rp.Character
  11.  
  12. --RemoteEvent for communicating
  13. local Event = Instance.new("RemoteEvent")
  14. Event.Name = "UserInput_Event"
  15.  
  16. --Fake event to make stuff like Mouse.KeyDown work
  17. local function fakeEvent()
  18. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  19. t.connect = t.Connect
  20. return t
  21. end
  22.  
  23. --Creating fake input objects with fake variables
  24. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  25. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  26. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  27. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  28. end}
  29. --Merged 2 functions into one by checking amount of arguments
  30. CAS.UnbindAction = CAS.BindAction
  31.  
  32. --This function will trigger the events that have been :Connect()'ed
  33. local function te(self,ev,...)
  34. local t = m[ev]
  35. if t and t._fakeEvent then
  36. for _,f in pairs(t.Functions) do
  37. f(...)
  38. end
  39. end
  40. end
  41. m.TrigEvent = te
  42. UIS.TrigEvent = te
  43.  
  44. Event.OnServerEvent:Connect(function(plr,io)
  45. if plr~=rp then return end
  46. m.Target = io.Target
  47. m.Hit = io.Hit
  48. if not io.isMouse then
  49. local b = io.UserInputState == Enum.UserInputState.Begin
  50. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  51. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  52. end
  53. for _,t in pairs(CAS.Actions) do
  54. for _,k in pairs(t.Keys) do
  55. if k==io.KeyCode then
  56. t.Function(t.Name,io.UserInputState,io)
  57. end
  58. end
  59. end
  60. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  61. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  62. end
  63. end)
  64. Event.Parent = NLS([==[
  65. local Player = game:GetService("Players").LocalPlayer
  66. local Event = script:WaitForChild("UserInput_Event")
  67.  
  68. local Mouse = Player:GetMouse()
  69. local UIS = game:GetService("UserInputService")
  70. local input = function(io,a)
  71. if a then return end
  72. --Since InputObject is a client-side instance, we create and pass table instead
  73. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  74. end
  75. UIS.InputBegan:Connect(input)
  76. UIS.InputEnded:Connect(input)
  77.  
  78. local h,t
  79. --Give the server mouse data 30 times every second, but only if the values changed
  80. --If player is not moving their mouse, client won't fire events
  81. while wait(1/30) do
  82. if h~=Mouse.Hit or t~=Mouse.Target then
  83. h,t=Mouse.Hit,Mouse.Target
  84. Event:FireServer({isMouse=true,Target=t,Hit=h})
  85. end
  86. end]==],Player.Character)
  87.  
  88. ----Sandboxed game object that allows the usage of client-side methods and services
  89. --Real game object
  90. local _rg = game
  91.  
  92. --Metatable for fake service
  93. local fsmt = {
  94. __index = function(self,k)
  95. local s = rawget(self,"_RealService")
  96. if s then return s[k] end
  97. end,
  98. __newindex = function(self,k,v)
  99. local s = rawget(self,"_RealService")
  100. if s then s[k]=v end
  101. end,
  102. __call = function(self,...)
  103. local s = rawget(self,"_RealService")
  104. if s then return s(...) end
  105. end
  106. }
  107. local function FakeService(t,RealService)
  108. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  109. return setmetatable(t,fsmt)
  110. end
  111.  
  112. --Fake game object
  113. local g = {
  114. GetService = function(self,s)
  115. return self[s]
  116. end,
  117. Players = FakeService({
  118. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  119. },"Players"),
  120. UserInputService = FakeService(UIS,"UserInputService"),
  121. ContextActionService = FakeService(CAS,"ContextActionService"),
  122. }
  123. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  124. g.service = g.GetService
  125.  
  126. g.RunService = FakeService({
  127. RenderStepped = _rg:GetService("RunService").Heartbeat,
  128. BindToRenderStep = function(self,name,_,fun)
  129.  
  130. end,
  131. UnbindFromRenderStep = function(self,name)
  132. self._btrs[name]:Disconnect()
  133. end,
  134. },"RunService")
  135.  
  136. setmetatable(g,{
  137. __index=function(self,s)
  138. return _rg:GetService(s) or typeof(_rg[s])=="function"
  139. and function(_,...)return _rg[s](_rg,...)end or _rg[s]
  140. end,
  141. __newindex = fsmt.__newindex,
  142. __call = fsmt.__call
  143. })
  144. --Changing owner to fake player object to support owner:GetMouse()
  145. game,owner = g,g.Players.LocalPlayer
  146. end
  147.  
  148. Save New Duplicate & Edit Just Text Twitter
  149. 1
  150. 2
  151. 3
  152. 4
  153. 5
  154. 6
  155. 7
  156. 8
  157. 9
  158. 10
  159. 11
  160. 12
  161. 13
  162. 14
  163. 15
  164. 16
  165. 17
  166. 18
  167. 19
  168. 20
  169. 21
  170. 22
  171. 23
  172. 24
  173. 25
  174. 26
  175. 27
  176. 28
  177. 29
  178. 30
  179. 31
  180. 32
  181. 33
  182. 34
  183. 35
  184. 36
  185. 37
  186. 38
  187. 39
  188. 40
  189. 41
  190. 42
  191. 43
  192. 44
  193. 45
  194. 46
  195. 47
  196. 48
  197. 49
  198. 50
  199. 51
  200. 52
  201. 53
  202. 54
  203. 55
  204. 56
  205. 57
  206. 58
  207. 59
  208. 60
  209. 61
  210. 62
  211. 63
  212. 64
  213. 65
  214. 66
  215. 67
  216. 68
  217. 69
  218. 70
  219. 71
  220. 72
  221. 73
  222. 74
  223. 75
  224. 76
  225. 77
  226. 78
  227. 79
  228. 80
  229. 81
  230. 82
  231. 83
  232. 84
  233. 85
  234. 86
  235. 87
  236. 88
  237. 89
  238. 90
  239. 91
  240. 92
  241. 93
  242. 94
  243. 95
  244. 96
  245. 97
  246. 98
  247. 99
  248. 100
  249. 101
  250. 102
  251. 103
  252. 104
  253. 105
  254. 106
  255. 107
  256. 108
  257. 109
  258. 110
  259. 111
  260. 112
  261. 113
  262. 114
  263. 115
  264. 116
  265. 117
  266. 118
  267. 119
  268. 120
  269. 121
  270. 122
  271. 123
  272. 124
  273. 125
  274. 126
  275. 127
  276. 128
  277. 129
  278. 130
  279. 131
  280. 132
  281. 133
  282. 134
  283. 135
  284. 136
  285. 137
  286. 138
  287. 139
  288. 140
  289. 141
  290. 142
  291. 143
  292. 144
  293. 145
  294. 146
  295. 147
  296. 148
  297. 149
  298. 150
  299. 151
  300. 152
  301. 153
  302. 154
  303. 155
  304. 156
  305. 157
  306. 158
  307. 159
  308. 160
  309. 161
  310. 162
  311. 163
  312. 164
  313. 165
  314. 166
  315. 167
  316. 168
  317. 169
  318. 170
  319. 171
  320. 172
  321. 173
  322. 174
  323. 175
  324. 176
  325. 177
  326. 178
  327. 179
  328. 180
  329. 181
  330. 182
  331. 183
  332. 184
  333. 185
  334. 186
  335. 187
  336. 188
  337. 189
  338. 190
  339. 191
  340. 192
  341. 193
  342. 194
  343. 195
  344. 196
  345. 197
  346. 198
  347. 199
  348. 200
  349. 201
  350. 202
  351. 203
  352. 204
  353. 205
  354. 206
  355. 207
  356. 208
  357. 209
  358. 210
  359. 211
  360. 212
  361. 213
  362. 214
  363. 215
  364. 216
  365. 217
  366. 218
  367. 219
  368. 220
  369. 221
  370. 222
  371. 223
  372. 224
  373. 225
  374. 226
  375. 227
  376. 228
  377. 229
  378. 230
  379. 231
  380. 232
  381. 233
  382. 234
  383. 235
  384. 236
  385. 237
  386. 238
  387. 239
  388. 240
  389. 241
  390. 242
  391. 243
  392. 244
  393. 245
  394. 246
  395. 247
  396. 248
  397. 249
  398. 250
  399. 251
  400. 252
  401. 253
  402. 254
  403. 255
  404. 256
  405. 257
  406. 258
  407. 259
  408. 260
  409. 261
  410. 262
  411. 263
  412. 264
  413. 265
  414. 266
  415. 267
  416. 268
  417. 269
  418. 270
  419. 271
  420. 272
  421. 273
  422. 274
  423. 275
  424. 276
  425. 277
  426. 278
  427. 279
  428. 280
  429. 281
  430. 282
  431. 283
  432. 284
  433. 285
  434. 286
  435. 287
  436. 288
  437. 289
  438. 290
  439. 291
  440. 292
  441. 293
  442. 294
  443. 295
  444. 296
  445. 297
  446. 298
  447. 299
  448. 300
  449. 301
  450. 302
  451. 303
  452. 304
  453. 305
  454. 306
  455. 307
  456. 308
  457. 309
  458. 310
  459. 311
  460. 312
  461. 313
  462. 314
  463. 315
  464. 316
  465. 317
  466. 318
  467. 319
  468. 320
  469. 321
  470. 322
  471. 323
  472. 324
  473. 325
  474. 326
  475. 327
  476. 328
  477. 329
  478. 330
  479. 331
  480. 332
  481. 333
  482. 334
  483. 335
  484. 336
  485. 337
  486. 338
  487. 339
  488. 340
  489. 341
  490. 342
  491. 343
  492. 344
  493. 345
  494. 346
  495. 347
  496. 348
  497. 349
  498. 350
  499. 351
  500. 352
  501. 353
  502. 354
  503. 355
  504. 356
  505. 357
  506. 358
  507. 359
  508. 360
  509. 361
  510. 362
  511. 363
  512. 364
  513. 365
  514. 366
  515. 367
  516. 368
  517. 369
  518. 370
  519. 371
  520. 372
  521. 373
  522. 374
  523. 375
  524. 376
  525. 377
  526. 378
  527. 379
  528. 380
  529. 381
  530. 382
  531. 383
  532. 384
  533. 385
  534. 386
  535. 387
  536. 388
  537. 389
  538. 390
  539. 391
  540. 392
  541. 393
  542. 394
  543. 395
  544. 396
  545. 397
  546. 398
  547. 399
  548. 400
  549. 401
  550. 402
  551. 403
  552. 404
  553. 405
  554. 406
  555. 407
  556. 408
  557. 409
  558. 410
  559. 411
  560. 412
  561. 413
  562. 414
  563. 415
  564. 416
  565. 417
  566. 418
  567. 419
  568. 420
  569. 421
  570. 422
  571. 423
  572. 424
  573. 425
  574. 426
  575. 427
  576. 428
  577. 429
  578. 430
  579. 431
  580. 432
  581. 433
  582. 434
  583. 435
  584. 436
  585. 437
  586. 438
  587. 439
  588. 440
  589. 441
  590. 442
  591. 443
  592. 444
  593. 445
  594. 446
  595. 447
  596. 448
  597. 449
  598. 450
  599. 451
  600. 452
  601. 453
  602. 454
  603. 455
  604. 456
  605. 457
  606. 458
  607. 459
  608. 460
  609. 461
  610. 462
  611. 463
  612. 464
  613. 465
  614. 466
  615. 467
  616. 468
  617. 469
  618. 470
  619. 471
  620. 472
  621. 473
  622. 474
  623. 475
  624. 476
  625. 477
  626. 478
  627. 479
  628. 480
  629. 481
  630. 482
  631. 483
  632. 484
  633. 485
  634. 486
  635. 487
  636. 488
  637. 489
  638. 490
  639. 491
  640. 492
  641. 493
  642. 494
  643. 495
  644. 496
  645. 497
  646. 498
  647. 499
  648. 500
  649. 501
  650. 502
  651. 503
  652. 504
  653. 505
  654. 506
  655. 507
  656. 508
  657. 509
  658. 510
  659. 511
  660. 512
  661. 513
  662. 514
  663. 515
  664. 516
  665. 517
  666. 518
  667. 519
  668. 520
  669. 521
  670. 522
  671. 523
  672. 524
  673. 525
  674. 526
  675. 527
  676. 528
  677. 529
  678. 530
  679. 531
  680. 532
  681. 533
  682. 534
  683. 535
  684. 536
  685. 537
  686. 538
  687. 539
  688. 540
  689. --[[ Time Testing ]]--
  690. -------------------------------------------------------
  691. --[[
  692.  
  693. This script was created by WafflesAreVeryGood.
  694. ATTACKS
  695. _______
  696.  
  697.  
  698. --]]
  699. -------------------------------------------------------
  700. print("This script was created by WafflesAreVeryGood!")
  701. --[[Changeable Variables]]--
  702. local multiplier = 1 --Attack multiplier (default is 1)
  703. local soundlist = {
  704. HardHit1 = "rbxassetid://565207203",
  705. HardHit2 = "rbxassetid://541909913",
  706. HardHit3 = "rbxassetid://541909983",
  707. WeakHit1 = "rbxassetid://558642292",
  708. WeakHit2 = "rbxassetid://541907812",
  709. Slice1 = "rbxassetid://260429964",
  710. Slice2 = "rbxassetid://260430015",
  711. Explosion1 = "rbxassetid://138186576",
  712. Explosion2 = "rbxassetid://157878578",
  713. Woosh1 = "rbxassetid://541909867",
  714. Woosh2 = "rbxassetid://541909763",
  715. TimeSlow = "rbxassetid://615678808",
  716. TimeStop = "rbxassetid://926382097",
  717. TimeResume = "rbxassetid://894793352",
  718. TimeFast = "rbxassetid://743499393",
  719. TimeReverse = "rbxassetid://618737332",
  720.  
  721. }
  722.  
  723. --[[Important Variables]]--
  724. local plr = game:GetService('Players').LocalPlayer
  725. local char = plr.Character
  726. local mouse = plr:GetMouse()
  727. local input = game:GetService('UserInputService')
  728. ----
  729. local joints = {"Right Shoulder", "Left Shoulder", "Right Hip", "Left Hip", "Neck", "RootJoint"}
  730. local torso,head,rootpart = char.Torso,char.Head,char.HumanoidRootPart
  731. local rs = torso["Right Shoulder"]
  732. local ls = torso["Left Shoulder"]
  733. local rh = torso["Right Hip"]
  734. local lh = torso["Left Hip"]
  735. local neck = torso.Neck
  736. local rj = rootpart["RootJoint"]
  737. ----
  738. local huge = Vector3.new(math.huge, math.huge, math.huge)
  739. local attacking = false
  740. local cananim = true
  741. local timestop = false
  742. local timeslow = false
  743. local timefast = false
  744. local reversing = false
  745. local unfreeze = {}
  746. local sounddata = {}
  747. local connections = {}
  748. local healthstuff = {}
  749.  
  750. --[[ Functions ]]--
  751. function addattack(keycode, func)
  752. input.InputBegan:connect(function(inp)
  753. if inp.KeyCode == keycode and not input:GetFocusedTextBox() then
  754. func()
  755. end
  756. end)
  757. end
  758. function attackend(keycode, func)
  759. input.InputEnded:connect(function(inp)
  760. if inp.KeyCode == keycode and not input:GetFocusedTextBox() then
  761. func()
  762. end
  763. end)
  764. end
  765. function swait(t)
  766. if t then
  767. for i = 0, t do
  768. game:GetService('RunService').Stepped:wait(0)
  769. end
  770. else
  771. game:GetService('RunService').Stepped:wait(0)
  772. end
  773. return true
  774. end
  775. function fade(obj, dest, grow)
  776. spawn(function()
  777. local oldcf = obj.CFrame
  778. for i = 0, 10 do
  779. if grow then
  780. obj.Size = obj.Size +Vector3.new(1,1,1)
  781. obj.CFrame = oldcf
  782. end
  783. obj.Transparency = obj.Transparency +0.1
  784. swait()
  785. end
  786. if dest then
  787. obj:Destroy()
  788. end
  789. end)
  790. end
  791. function replacejoint(name)
  792. local j = torso:FindFirstChild(name)
  793. if not j then j = char.HumanoidRootPart:FindFirstChild(name) end
  794. if j then
  795. if true then
  796. local already = j.Parent:FindFirstChild(j.Name.." Replacement")
  797. local new = Instance.new("Weld")
  798. local c0 = j.C0
  799. local c1 = j.C1
  800. new.Part0 = j.Part0
  801. j.Part0 = nil
  802. new.Name = j.Name.." Replacement"
  803. if already then c0 = already.C0 c1 = already.C1 already:Destroy() end
  804. new.Parent = j.Parent
  805. new.Part1 = j.Part1
  806. new.C0 = c0
  807. new.C1 = c1
  808. return new
  809. end
  810. end
  811. end
  812. function removejoint(name, fast)
  813. local j = torso:FindFirstChild(name.." Replacement")
  814. if not j then j = char.HumanoidRootPart:FindFirstChild(name.." Replacement") end
  815. if j then
  816. local p0 = j.Part0
  817. if p0 ~= nil then
  818. local c0 = j.C0
  819. local c1 = j.C1
  820. j:Destroy()
  821. local new = p0:FindFirstChild(name)
  822. local ac0 = new.C0
  823. local ac1 = new.C1
  824. new.Part0 = p0
  825. new.C0 = c0
  826. new.C1 = c1
  827. spawn(function()
  828. if name ~= "RootJoint" then
  829. if not fast then
  830. for i = 0, 0.6, 0.1 do
  831. new.C0 = new.C0:Lerp(ac0, 0.5)
  832. new.C1 = new.C1:lerp(ac1, 0.5)
  833. swait()
  834. end
  835. else
  836. new.C0 = new.C0:Lerp(ac0, 1)
  837. new.C1 = new.C1:lerp(ac1, 1)
  838. end
  839. end
  840. end)
  841. end
  842. end
  843. end
  844. function fixalljoints(fast)
  845. for i,v in pairs({"Right Shoulder", "Left Shoulder", "Right Hip", "Left Hip", "Neck", "RootJoint"}) do
  846. removejoint(v, fast)
  847. end
  848. end
  849. function getnewjoints()
  850. local rs = replacejoint("Right Shoulder")
  851. local ls = replacejoint("Left Shoulder")
  852. local rh = replacejoint("Right Hip")
  853. local lh = replacejoint("Left Hip")
  854. local neck = replacejoint("Neck")
  855. local rj = replacejoint("RootJoint")
  856. return rs,ls,rh,lh,neck,rj
  857. end
  858. function knockback(hit, force)
  859. local bv = Instance.new("BodyVelocity")
  860. bv.MaxForce = huge
  861. bv.Velocity = force
  862. bv.Parent = hit
  863. game:GetService('Debris'):AddItem(bv, 0.15)
  864. end
  865. function soundeffect(id, volume, speed, parent, forcewait)
  866. local func = function()
  867. local s = LoadLibrary("RbxUtility").Create("Sound")()
  868. s.Name = "SoundEffect"
  869. s.Volume = volume
  870. s.PlaybackSpeed = speed
  871. s.SoundId = id
  872. s.Name = "dont"
  873. s.Looped = false
  874. s.Parent = parent
  875. s:Play()
  876. repeat wait() until not s.Playing
  877. s:Destroy()
  878. end
  879. if forcewait then
  880. func()
  881. else
  882. spawn(func)
  883. end
  884. end
  885. function getascendants(obj)
  886. local par = obj
  887. local ret = {}
  888. pcall(function()
  889. repeat
  890. par = par.Parent
  891. if par ~= nil then
  892. table.insert(ret, par)
  893. end
  894. until par == nil
  895. end)
  896. return ret
  897. end
  898. function findascendant(obj, class)
  899. local par = obj
  900. local ret = nil
  901. pcall(function()
  902. repeat
  903. par = par.Parent
  904. if par:IsA(class) then
  905. ret = par
  906. break
  907. end
  908. until par == nil
  909. end)
  910. return ret
  911. end
  912. function hurt(hit, dmg)
  913. --pcall(function()
  914. local hum = hit.Parent:FindFirstChildOfClass("Humanoid")
  915. if hum then
  916. if hum.Parent ~= char then
  917. hum.Health = hum.Health - dmg
  918. hum.Health = hum.Health - dmg
  919. soundeffect(soundlist.Headshot, 1.5, 1, workspace.CurrentCamera)
  920. return true
  921. end
  922. end
  923. --end)
  924. end
  925. --[[ Actual script :OOOOOOOOOO ]]--
  926. addattack(Enum.KeyCode.G, function()
  927. if not timeslow and not timefast and not reversing then
  928. local p = Instance.new("Part")
  929. p.Anchored = true
  930. p.Material = "Glass"
  931. p.Size = Vector3.new(0.1,0.1,0.1)
  932. p.BrickColor = BrickColor.new("Toothpaste")
  933. p.CanCollide = false
  934. p.CFrame = char.HumanoidRootPart.CFrame
  935. local m = Instance.new("SpecialMesh")
  936. m.MeshType = "Sphere"
  937. m.Parent = p
  938. p.Parent = char
  939. spawn(function()
  940. for i = 1, 50 do
  941. p.Transparency = i/50
  942. p.Size = p.Size:Lerp(Vector3.new(40,40,40),0.1)
  943. p.CFrame = char.HumanoidRootPart.CFrame
  944. swait()
  945. end
  946. p:Destroy()
  947. end)
  948. if not timestop then
  949. local s = Instance.new("Sound")
  950. s.Volume = 3
  951. s.Name = "dont"
  952. s.SoundId = soundlist.TimeStop
  953. s.Parent = char
  954. s:Play()
  955. dcon = workspace.DescendantAdded:connect(function(obj)
  956. pcall(function()
  957. swait()
  958. local ok = true
  959. for i,v in pairs(getascendants(obj)) do
  960. if v.Name:lower():find("ignoremodel") then
  961. ok = false
  962. end
  963. end
  964. if obj:IsA("BasePart") and ok and not findascendant(obj, "Tool") and not findascendant(obj, "HopperBin") and not findascendant(obj, "Camera") then
  965. if not obj.Anchored and obj.Name ~= "HumanoidRootPart" then
  966. table.insert(unfreeze, obj)
  967. obj.Anchored = true
  968. end
  969. end
  970. if obj:IsA("Sound") and obj.Name ~= "dont" then
  971. if obj.Playing then
  972. obj:Pause()
  973. table.insert(unfreeze, obj)
  974. end
  975. end
  976. if obj:IsA("Humanoid") then
  977. local last = obj.Health
  978. local always = last
  979. local con = obj.HealthChanged:connect(function(health)
  980. if last-health > 0 then
  981. table.insert(healthstuff, {hum = obj, change = last-health})
  982. end
  983. last = health
  984. obj.Health = always
  985. end)
  986. table.insert(connections, con)
  987. end
  988. end)
  989. end)
  990. for i,v in pairs(workspace:GetDescendants()) do
  991. pcall(function()
  992. if v:IsA("BasePart") then
  993. local ok = true
  994. for i,e in pairs(getascendants(v)) do
  995. if e.Name:lower():find("ignore_model") then
  996. ok = false
  997. end
  998. if e:IsA("Camera") then
  999. ok = false
  1000. end
  1001. end
  1002. if not v.Anchored and ok and v.Parent ~= char and not findascendant(v, "Camera") and not findascendant(v, "Tool") and not findascendant(v, "HopperBin") then
  1003. local ok = true
  1004. if v.Parent:IsA("Accessory") then ok = false end
  1005. if ok and v.Name ~= "HumanoidRootPart" then
  1006. v.Anchored = true
  1007. table.insert(unfreeze, v)
  1008. end
  1009. end
  1010. end
  1011. end)
  1012. pcall(function()
  1013. if v:IsA("Sound") and v.Name ~= "dont" then
  1014. if v.Playing then
  1015. v:Pause()
  1016. table.insert(unfreeze, v)
  1017. end
  1018. end
  1019. end)
  1020. pcall(function()
  1021. if v:IsA("Humanoid") then
  1022. local last = v.Health
  1023. local always = last
  1024. local con = v.HealthChanged:connect(function(health)
  1025. if last-health > 0 then
  1026. table.insert(healthstuff, {hum = v, change = last-health})
  1027. end
  1028. last = health
  1029. v.Health = always
  1030. end)
  1031. table.insert(connections, con)
  1032. end
  1033. end)
  1034. end
  1035. timestop = true
  1036. local cor = Instance.new("ColorCorrectionEffect")
  1037. cor.Name = "tstopef"
  1038. cor.Parent = game:GetService('Lighting')
  1039. for i = 1, 50 do
  1040. cor.Saturation = Vector3.new(cor.Saturation,0,0):Lerp(Vector3.new(-5,0,0), 0.05).X
  1041. swait()
  1042. end
  1043. game.Debris:AddItem(s, 2)
  1044. else
  1045. local s = Instance.new("Sound")
  1046. s.Volume = 7
  1047. s.Name = "dont"
  1048. s.SoundId = soundlist.TimeResume
  1049. s.Parent = char
  1050. s:Play()
  1051. local cor = game:GetService('Lighting'):FindFirstChild("tstopef")
  1052. if cor then
  1053. for i = 1, 50 do
  1054. cor.Saturation = Vector3.new(cor.Saturation,0,0):Lerp(Vector3.new(0,0,0), 0.05).X
  1055. swait()
  1056. end
  1057. cor:Destroy()
  1058. end
  1059. game.Debris:AddItem(s, 2)
  1060. timestop = false
  1061. for i,v in pairs(unfreeze) do
  1062. pcall(function()
  1063. v.Anchored = false
  1064. end)
  1065. pcall(function()
  1066. v:Resume()
  1067. end)
  1068. end
  1069. for i,v in pairs(connections) do
  1070. pcall(function()
  1071. v:disconnect()
  1072. end)
  1073. end
  1074. for i,v in pairs(healthstuff) do
  1075. pcall(function()
  1076. local hum = v.hum
  1077. hum.Health = hum.Health - v.change
  1078. if hum.Parent:FindFirstChild("Health") then
  1079. pcall(function()
  1080. hum.Parent.Health.Disabled = false
  1081. end)
  1082. end
  1083. end)
  1084. end
  1085. pcall(function()
  1086. dcon:disconnect()
  1087. end)
  1088. healthstuff = {}
  1089. unfreeze = {}
  1090. end
  1091. end
  1092. end)
  1093. local humanoiddata = {}
  1094. local bodymoverdata = {}
  1095. local dcon2
  1096. local connectionsdata = {}
  1097. addattack(Enum.KeyCode.H, function()
  1098. if not timeslow and not timestop and not reversing then
  1099. local p = Instance.new("Part")
  1100. p.Anchored = true
  1101. p.Material = "Glass"
  1102. p.Size = Vector3.new(0.1,0.1,0.1)
  1103. p.BrickColor = BrickColor.new("Toothpaste")
  1104. p.CanCollide = false
  1105. p.CFrame = char.HumanoidRootPart.CFrame
  1106. local m = Instance.new("SpecialMesh")
  1107. m.MeshType = "Sphere"
  1108. m.Parent = p
  1109. p.Parent = char
  1110. spawn(function()
  1111. for i = 1, 50 do
  1112. p.Transparency = i/50
  1113. p.Size = p.Size:Lerp(Vector3.new(40,40,40),0.1)
  1114. p.CFrame = char.HumanoidRootPart.CFrame
  1115. swait()
  1116. end
  1117. p:Destroy()
  1118. end)
  1119. if not timefast then
  1120. timefast = true
  1121. soundeffect(soundlist.TimeFast, 1.5, 1, char)
  1122. for i,v in pairs(workspace:GetDescendants()) do
  1123. if v:IsA("Humanoid") then
  1124. table.insert(humanoiddata, {Hum = v, WS = v.WalkSpeed, JP = v.JumpPower})
  1125. for _,track in pairs(v:GetPlayingAnimationTracks()) do
  1126. end
  1127. local con = v.AnimationPlayed:connect(function(track)
  1128. end)
  1129. table.insert(connections, con)
  1130. end
  1131. if v:IsA("BodyVelocity") then
  1132. table.insert(bodymoverdata, {Mover = v, Vel = v.Velocity})
  1133. end
  1134. if v:IsA("BodyPosition") then
  1135. table.insert(bodymoverdata, {Mover = v, Vel = v.P})
  1136. end
  1137. if v.Name == "HumanoidRootPart" and v:IsA("BasePart") then
  1138. end
  1139. if v:IsA("Sound") and v.Name ~= "dont" then
  1140. table.insert(sounddata, {Sound = v, Speed = v.PlaybackSpeed})
  1141. end
  1142. end
  1143. dcon2 = workspace.DescendantAdded:connect(function(v)
  1144. swait(2)
  1145. if v:IsA("Humanoid") then
  1146. table.insert(humanoiddata, {Hum = v, WS = v.WalkSpeed, JP = v.JumpPower})
  1147. for _,track in pairs(v:GetPlayingAnimationTracks()) do
  1148. track:AdjustSpeed(1.4)
  1149. end
  1150. local con = v.AnimationPlayed:connect(function(track)
  1151. track:AdjustSpeed(1.4)
  1152. end)
  1153. table.insert(connections, con)
  1154. end
  1155. if v:IsA("BodyVelocity") then
  1156. table.insert(bodymoverdata, {Mover = v, Vel = v.Velocity})
  1157. end
  1158. if v:IsA("BodyPosition") then
  1159. table.insert(bodymoverdata, {Mover = v, Vel = v.P})
  1160. end
  1161. if v.Name == "HumanoidRootPart" and v:IsA("BasePart") then
  1162. end
  1163. if v:IsA("Sound") and v.Name ~= "dont" then
  1164. table.insert(sounddata, {Sound = v, Speed = v.PlaybackSpeed})
  1165. end
  1166. end)
  1167. else
  1168. timefast = false
  1169. soundeffect(soundlist.TimeResume, 1.5, 1, char)
  1170. for i,v in pairs(humanoiddata) do
  1171. pcall(function()
  1172. v["Hum"].WalkSpeed = v["WS"]
  1173. v["Hum"].JumpPower = v["JP"]
  1174. end)
  1175. end
  1176. for i,v in pairs(bodymoverdata) do
  1177. pcall(function()
  1178. if v["Mover"]:IsA("BodyVelocity") then
  1179. v["Mover"].Velocity = v["Vel"]
  1180. end
  1181. if v["Mover"]:IsA("BodyPosition") then
  1182. v["Mover"].P = v["Vel"]
  1183. end
  1184. end)
  1185. end
  1186. for i,v in pairs(sounddata) do
  1187. pcall(function()
  1188. v["Sound"].PlaybackSpeed = v["Speed"]
  1189. end)
  1190. end
  1191. for i,v in pairs(connections) do
  1192. pcall(function()
  1193. v:disconnect()
  1194. end)
  1195. end
  1196. connections = {}
  1197. pcall(function()
  1198. dcon2:disconnect()
  1199. end)
  1200. humanoiddata = {}
  1201. end
  1202. end
  1203. end)
  1204. local reversedata = {}
  1205. local saved = false
  1206. addattack(Enum.KeyCode.C, function()
  1207. if not timestop and not timeslow and not timefast then
  1208. if not saved then
  1209. saved = true
  1210. for i,v in pairs(workspace:GetDescendants()) do
  1211. end
  1212. else
  1213. reversing = true
  1214. saved = false
  1215. soundeffect(soundlist.TimeReverse, 2, 1, workspace)
  1216. for i = 1, 10 do
  1217. for _,v in pairs(reversedata) do
  1218. local obj = v.obj
  1219. local cf = v.cf obj.Anchored = true
  1220. end
  1221. end
  1222. swait()
  1223. end
  1224. char.HumanoidRootPart.Velocity = Vector3.new(0,0,0)
  1225. reversedata = {}
  1226. reversing = false
  1227. end
  1228. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement