Advertisement
Liu-2

Classic Time Machine - [ Roblox ]

Jun 21st, 2019
437
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 8.92 KB | None | 0 0
  1. --- [[ "Classic" Time Machine ]] ---
  2.     --  By fo43123
  3.  
  4. h1 = game:GetService("Players").LocalPlayer.Character
  5. h2 = game:GetService("Players").LocalPlayer.Character.Humanoid
  6. p = game:GetService("Players").LocalPlayer
  7. cc = workspace.CurrentCamera
  8. hm1 = h1.Head
  9. hm2 = h1.Torso
  10. hm3 = h1["Right Arm"]
  11. hm4 = h1["Left Arm"]
  12. hm5 = h1["Right Leg"]
  13. hm6 = h1["Left Leg"]
  14. dct = Instance.new("Sound", hm1)
  15. dct.SoundId = "rbxassetid://142285965"
  16. dct.Volume = 5
  17. nst = Instance.new("Sound", hm1)
  18. nst.SoundId = "rbxassetid://2036678215"
  19. nst.Volume = 5.99
  20. nst.Pitch = 1
  21. nst.Looped = true
  22. plim = Instance.new('Sound', hm1)
  23. plim.Volume = 1
  24. hm = true
  25. ff = Instance.new("ForceField", h1)
  26. ff.Visible = false
  27. h2.MaxHealth = math.huge
  28. h2.Health = math.huge
  29. h2.HealthChanged:connect(function()
  30.     h2.MaxHealth = math.huge
  31.     h2.Health = math.huge
  32. end)
  33. sine = 0
  34. change = 1
  35. mm = p:GetMouse()
  36.  
  37. local favids = {
  38.    
  39.     effect1 = 'rbxassetid://743499393'
  40.    
  41. }
  42.  
  43. artificialhb = Instance.new('BindableEvent', script)
  44. artificialhb.Name = 'Heartbeat'
  45. script:WaitForChild('Heartbeat')
  46. frame = 1 / 60
  47. tf = 0
  48. allowframeloss = false
  49. tossreminder = false
  50. lastframe = tick()
  51. script.Heartbeat:Fire()
  52.  
  53. game:GetService('RunService').Heartbeat:connect(function(s, p)
  54.     tf = tf + s
  55.     if tf >= frame then
  56.         if allowframeloss then
  57.             script.Heartbeat:Fire()
  58.             lastframe = tick()
  59.         else
  60.             for i = 1, math.floor(tf / frame) do
  61.                 script.Heartbeat:Fire()
  62.             end
  63.             lastframe = tick()
  64.         end
  65.         if tossreminder then
  66.             tf = 0
  67.         else
  68.             tf = tf - frame * math.floor(tf / frame)
  69.         end
  70.     end
  71. end)
  72.  
  73.  
  74. function swait(t)
  75.     if t == 0 or t == nil then
  76.         script.Heartbeat.Event:Wait()
  77.     else
  78.         for i = 0, t do
  79.             script.Heartbeat.Event:Wait()
  80.         end
  81.     end
  82. end
  83.  
  84. function clerp(a, b, t)
  85.     return a:lerp(b, t)
  86. end
  87.  
  88. mm.KeyDown:connect(function(yes)
  89.     if yes == 'n' then
  90.         if hm == true then
  91.             hm = false
  92.         if h1:FindFirstChildOfClass('LocalScript').Name == 'Animate' then
  93.             h1:FindFirstChildOfClass('LocalScript'):Destroy()
  94.             for i,v in pairs(h2:GetPlayingAnimationTracks()) do
  95.                 v:Stop()
  96.             end
  97.         else
  98.             error('Animate LocalScript Nil')
  99.         end
  100.         dct:Play()
  101.         coroutine.wrap(function()
  102.             local h2camset = h2.CameraOffset
  103.             repeat
  104.                 cc.FieldOfView = 70 + dct.PlaybackLoudness/200
  105.                 h2.CameraOffset = clerp(h2.CameraOffset, h2camset + Vector3.new(math.random(-1, 1), math.random(-1, 1), math.random(-1, 1)), dct.PlaybackLoudness/5000)
  106.                 swait()
  107.             until dct.IsPlaying == false
  108.             --h2.CameraOffset = Vector3.new(0, 0, 0)
  109.         end)()
  110.         wait(1)
  111.         warn('!!')
  112.         wait()
  113.         local meshpart = Instance.new('Part', h1)
  114.         local specialMesh = Instance.new("SpecialMesh", meshpart)
  115.         meshpart.Anchored = true
  116.         meshpart.CanCollide = false
  117.         meshpart.CFrame = hm2.CFrame
  118.         specialMesh.Offset = Vector3.new(0, -15, 0)
  119.         specialMesh.MeshId = "rbxassetid://430080461"
  120.         specialMesh.TextureId = "rbxassetid://430080522"
  121.         specialMesh.Scale = Vector3.new(1, 1, 1)
  122.         hm2.Anchored = true
  123.         h2.WalkSpeed = 0
  124.         h2.JumpPower = 0
  125.         for i = 1, 100 do
  126.             specialMesh.Offset = specialMesh.Offset:lerp(Vector3.new(0, 2, 0), .070)
  127.             swait()
  128.         end
  129.         p:ClearCharacterAppearance()
  130.         local bds = Instance.new("BodyColors", h1)
  131.         bds.HeadColor = BrickColor.new("Bright yellow")
  132.         bds.TorsoColor = BrickColor.new("Bright blue")
  133.         bds.RightArmColor = BrickColor.new("Bright yellow")
  134.         bds.LeftArmColor = BrickColor.new("Bright yellow")
  135.         bds.RightLegColor = BrickColor.new("Br. yellowish green")
  136.         bds.LeftLegColor = BrickColor.new("Br. yellowish green")
  137.         hm1.Reflectance = 0.1
  138.         hm2.Reflectance = 0.1
  139.         hm1.Reflectance = 0.1
  140.         hm2.Reflectance = 0.1
  141.         hm3.Reflectance = 0.1
  142.         hm4.Reflectance = 0.1
  143.         hm5.Reflectance = 0.1
  144.         hm6.Reflectance = 0.1
  145.         h1.Head.face.Transparency = 1
  146.         hm1.Transparency = 1
  147.         hm2.Transparency = 1
  148.         hm3.Transparency = 1
  149.         hm4.Transparency = 1
  150.         hm5.Transparency = 1
  151.         hm6.Transparency = 1
  152.         wait(20)
  153.         coroutine.wrap(function()
  154.             for i = 1, 100 do
  155.                 dct.Volume = dct.Volume - .080
  156.                 if dct.Volume == 0 then
  157.                     dct:Stop()
  158.                 end
  159.                 swait()
  160.             end
  161.         end)()
  162.         coroutine.wrap(function()
  163.             for i = 1, 100 do
  164.                 specialMesh.Offset = specialMesh.Offset:lerp(Vector3.new(0, -20, 0), .1)
  165.                 swait()
  166.             end
  167.             meshpart:Destroy()
  168.         end)()
  169.         wait()
  170.         plim.Volume = 5
  171.         plim.TimePosition = 0.1
  172.         plim.PlaybackSpeed = 1.35
  173.         plim.SoundId = favids.effect1
  174.         Instance.new('DistortionSoundEffect', plim).Level = 0.5
  175.         plim:Play()
  176.         coroutine.wrap(function()
  177.             for i = 1, 16 do
  178.                 h2.CameraOffset = h2.CameraOffset:lerp(Vector3.new(math.random(-1, 1), math.random(-1, 1), math.random(-1, 1)), plim.PlaybackLoudness/1000)
  179.                 swait()
  180.             end
  181.             --h2.CameraOffset = Vector3.new(0, 0, 0)
  182.         end)()
  183.         wait()
  184.         coroutine.wrap(function()
  185.             local ball = Instance.new('Part', h1)
  186.             ball.Anchored = true
  187.             ball.CanCollide = false
  188.             ball.BrickColor = BrickColor.new('Bright yellow')
  189.             ball.Shape = 'Ball'
  190.             ball.Size = Vector3.new(0, 0, 0)
  191.             ball.Material = 'Neon'
  192.             ball.CFrame = hm2.CFrame
  193.             for i = 1, 100 do
  194.                 ball.Size = ball.Size:lerp(Vector3.new(60, 60, 60), .1)
  195.                 ball.Transparency = ball.Transparency + .050
  196.                 if ball.Transparency >= 1 then
  197.                     ball:Destroy()
  198.                 end
  199.                 swait()
  200.             end
  201.         end)()
  202.         hm1.Transparency = 0
  203.         h1.Head.face.Texture = 'rbxasset://textures/face.png'
  204.         h1.Head.face.Transparency = 0
  205.         hm2.Anchored = false
  206.         hm1.Transparency = 0
  207.         hm2.Transparency = 0
  208.         hm3.Transparency = 0
  209.         hm4.Transparency = 0
  210.         hm5.Transparency = 0
  211.         hm6.Transparency = 0
  212.         h2.WalkSpeed = 40
  213.         h2.JumpPower = 50
  214.         local root = h1.HumanoidRootPart
  215.         local nk = hm2['Neck']
  216.         local rs = hm2['Right Shoulder']
  217.         local ls = hm2['Left Shoulder']
  218.         local rh = hm2['Right Hip']
  219.         local lh = hm2['Left Hip']
  220.         local rj = h1.HumanoidRootPart['RootJoint']
  221.         local rs0 = rs.C0
  222.         local ls0 = ls.C0
  223.         local rh0 = rh.C0
  224.         local lh0 = lh.C0
  225.         local nk0 = nk.C0
  226.         local rj0 = rj.C0
  227.         print('Classic Times')
  228.         nst:Play()
  229.         while true do
  230.             sine = sine + change
  231.             cc.FieldOfView = 70 + nst.PlaybackLoudness/500
  232.             h2.CameraOffset = h2.CameraOffset:lerp(Vector3.new(math.random(-1, 1), math.random(-1, 1), math.random(-1, 1)), nst.PlaybackLoudness/5000)
  233.             if root.Velocity.y > 1 then
  234.                 change = 1
  235.                 h2.WalkSpeed = 30
  236.                 rj.C0 = clerp(rj.C0, rj0 * CFrame.Angles(math.rad(0), math.rad(0) - root.RotVelocity.Y/50, math.rad(0)), 1)
  237.                 rs.C0 = clerp(rs.C0, rs0 * CFrame.Angles(math.rad(0), math.rad(0), math.rad(180)), 1)
  238.                 ls.C0 = clerp(ls.C0, ls0 * CFrame.Angles(math.rad(0), math.rad(0), math.rad(180)), 1)
  239.                 rh.C0 = clerp(rh.C0, rh0 * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 1)
  240.                 lh.C0 = clerp(lh.C0, lh0 * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 1)
  241.             elseif root.Velocity.y < -1 then
  242.                 change = 1
  243.                 h2.WalkSpeed = 30
  244.                 rj.C0 = clerp(rj.C0, rj0 * CFrame.Angles(math.rad(0), math.rad(0) - root.RotVelocity.Y/50, math.rad(0)), 1)
  245.                 nk.C0 = clerp(nk.C0, nk0 * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 1)
  246.                 rs.C0 = clerp(rs.C0, rs0 * CFrame.Angles(math.rad(0), math.rad(0), math.rad(180)), 1)
  247.                 ls.C0 = clerp(ls.C0, ls0 * CFrame.Angles(math.rad(0), math.rad(0), math.rad(180)), 1)
  248.                 rh.C0 = clerp(rh.C0, rh0 * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 1)
  249.                 lh.C0 = clerp(lh.C0, lh0 * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 1)
  250.             elseif (root.Velocity * Vector3.new(1, 0, 1)).magnitude < 2 then
  251.                 change = 1
  252.                 h2.WalkSpeed = 40
  253.                 nk.C0 = clerp(nk.C0, nk0 * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 1)
  254.                 rj.C0 = clerp(rj.C0, rj0 * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 1)
  255.                 rs.C0 = clerp(rs.C0, rs0 * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 1)
  256.                 ls.C0 = clerp(ls.C0, ls0 * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 1)
  257.                 rh.C0 = clerp(rh.C0, rh0 * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 1)
  258.                 lh.C0 = clerp(lh.C0, lh0 * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 1)
  259.             elseif (root.Velocity * Vector3.new(1, 0, 1)).magnitude > 20 then
  260.                 change = 1
  261.                 h2.WalkSpeed = 40
  262.                 nk.C0 = clerp(nk.C0, nk0 * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0) - root.RotVelocity.Y/50), 1)
  263.                 rj.C0 = clerp(rj.C0, rj0 * CFrame.Angles(math.rad(0), math.rad(0) - root.RotVelocity.Y/50, math.rad(0)), 1)
  264.                 rs.C0 = clerp(rs.C0, rs0 * CFrame.Angles(math.rad(0), math.rad(0) - root.RotVelocity.Y/50, math.rad(60) * math.cos(sine/5)), 1)
  265.                 ls.C0 = clerp(ls.C0, ls0 * CFrame.Angles(math.rad(0), math.rad(0) - root.RotVelocity.Y/50, math.rad(60) * math.cos(sine/5)), 1)
  266.                 rh.C0 = clerp(rh.C0, rh0 * CFrame.Angles(math.rad(0), math.rad(0) - root.RotVelocity.Y/50, math.rad(-60) * math.cos(sine/5)), 1)
  267.                 lh.C0 = clerp(lh.C0, lh0 * CFrame.Angles(math.rad(0), math.rad(0) - root.RotVelocity.Y/50, math.rad(-60) * math.cos(sine/5)), 1)
  268.             end
  269.             swait()
  270.         end
  271.         end
  272.     end
  273. end)
  274.  
  275. --- [[ Where's mah tardis ]] ---
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement