KrYn0MoRe

time accelerate

Sep 13th, 2023 (edited)
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 19.67 KB | None | 0 0
  1. do
  2.     -- Converted using Mokiros's Model to Script Version 3
  3.     -- Converted string size: 1244 characters
  4.     local function Decode(str)
  5.         local StringLength = #str
  6.  
  7.         -- Base64 decoding
  8.         do
  9.             local decoder = {}
  10.             for b64code, char in pairs(('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='):split('')) do
  11.                 decoder[char:byte()] = b64code-1
  12.             end
  13.             local n = StringLength
  14.             local t,k = table.create(math.floor(n/4)+1),1
  15.             local padding = str:sub(-2) == '==' and 2 or str:sub(-1) == '=' and 1 or 0
  16.             for i = 1, padding > 0 and n-4 or n, 4 do
  17.                 local a, b, c, d = str:byte(i,i+3)
  18.                 local v = decoder[a]*0x40000 + decoder[b]*0x1000 + decoder[c]*0x40 + decoder[d]
  19.                 t[k] = string.char(bit32.extract(v,16,8),bit32.extract(v,8,8),bit32.extract(v,0,8))
  20.                 k = k + 1
  21.             end
  22.             if padding == 1 then
  23.                 local a, b, c = str:byte(n-3,n-1)
  24.                 local v = decoder[a]*0x40000 + decoder[b]*0x1000 + decoder[c]*0x40
  25.                 t[k] = string.char(bit32.extract(v,16,8),bit32.extract(v,8,8))
  26.             elseif padding == 2 then
  27.                 local a, b = str:byte(n-3,n-2)
  28.                 local v = decoder[a]*0x40000 + decoder[b]*0x1000
  29.                 t[k] = string.char(bit32.extract(v,16,8))
  30.             end
  31.             str = table.concat(t)
  32.         end
  33.  
  34.         local Position = 1
  35.         local function Parse(fmt)
  36.             local Values = {string.unpack(fmt,str,Position)}
  37.             Position = table.remove(Values)
  38.             return table.unpack(Values)
  39.         end
  40.  
  41.         local Settings = Parse('B')
  42.         local Flags = Parse('B')
  43.         Flags = {
  44.             --[[ValueIndexByteLength]] bit32.extract(Flags,6,2)+1,
  45.             --[[InstanceIndexByteLength]] bit32.extract(Flags,4,2)+1,
  46.             --[[ConnectionsIndexByteLength]] bit32.extract(Flags,2,2)+1,
  47.             --[[MaxPropertiesLengthByteLength]] bit32.extract(Flags,0,2)+1,
  48.             --[[Use Double instead of Float]] bit32.band(Settings,0b1) > 0
  49.         }
  50.  
  51.         local ValueFMT = ('I'..Flags[1])
  52.         local InstanceFMT = ('I'..Flags[2])
  53.         local ConnectionFMT = ('I'..Flags[3])
  54.         local PropertyLengthFMT = ('I'..Flags[4])
  55.  
  56.         local ValuesLength = Parse(ValueFMT)
  57.         local Values = table.create(ValuesLength)
  58.         local CFrameIndexes = {}
  59.  
  60.         local ValueDecoders = {
  61.             --!!Start
  62.             [1] = function(Modifier)
  63.                 return Parse('s'..Modifier)
  64.             end,
  65.             --!!Split
  66.             [2] = function(Modifier)
  67.                 return Modifier ~= 0
  68.             end,
  69.             --!!Split
  70.             [3] = function()
  71.                 return Parse('d')
  72.             end,
  73.             --!!Split
  74.             [4] = function(_,Index)
  75.                 table.insert(CFrameIndexes,{Index,Parse(('I'..Flags[1]):rep(3))})
  76.             end,
  77.             --!!Split
  78.             [5] = {CFrame.new,Flags[5] and 'dddddddddddd' or 'ffffffffffff'},
  79.             --!!Split
  80.             [6] = {Color3.fromRGB,'BBB'},
  81.             --!!Split
  82.             [7] = {BrickColor.new,'I2'},
  83.             --!!Split
  84.             [8] = function(Modifier)
  85.                 local len = Parse('I'..Modifier)
  86.                 local kpts = table.create(len)
  87.                 for i = 1,len do
  88.                     kpts[i] = ColorSequenceKeypoint.new(Parse('f'),Color3.fromRGB(Parse('BBB')))
  89.                 end
  90.                 return ColorSequence.new(kpts)
  91.             end,
  92.             --!!Split
  93.             [9] = function(Modifier)
  94.                 local len = Parse('I'..Modifier)
  95.                 local kpts = table.create(len)
  96.                 for i = 1,len do
  97.                     kpts[i] = NumberSequenceKeypoint.new(Parse(Flags[5] and 'ddd' or 'fff'))
  98.                 end
  99.                 return NumberSequence.new(kpts)
  100.             end,
  101.             --!!Split
  102.             [10] = {Vector3.new,Flags[5] and 'ddd' or 'fff'},
  103.             --!!Split
  104.             [11] = {Vector2.new,Flags[5] and 'dd' or 'ff'},
  105.             --!!Split
  106.             [12] = {UDim2.new,Flags[5] and 'di2di2' or 'fi2fi2'},
  107.             --!!Split
  108.             [13] = {Rect.new,Flags[5] and 'dddd' or 'ffff'},
  109.             --!!Split
  110.             [14] = function()
  111.                 local flags = Parse('B')
  112.                 local ids = {"Top","Bottom","Left","Right","Front","Back"}
  113.                 local t = {}
  114.                 for i = 0,5 do
  115.                     if bit32.extract(flags,i,1)==1 then
  116.                         table.insert(t,Enum.NormalId[ids[i+1]])
  117.                     end
  118.                 end
  119.                 return Axes.new(unpack(t))
  120.             end,
  121.             --!!Split
  122.             [15] = function()
  123.                 local flags = Parse('B')
  124.                 local ids = {"Top","Bottom","Left","Right","Front","Back"}
  125.                 local t = {}
  126.                 for i = 0,5 do
  127.                     if bit32.extract(flags,i,1)==1 then
  128.                         table.insert(t,Enum.NormalId[ids[i+1]])
  129.                     end
  130.                 end
  131.                 return Faces.new(unpack(t))
  132.             end,
  133.             --!!Split
  134.             [16] = {PhysicalProperties.new,Flags[5] and 'ddddd' or 'fffff'},
  135.             --!!Split
  136.             [17] = {NumberRange.new,Flags[5] and 'dd' or 'ff'},
  137.             --!!Split
  138.             [18] = {UDim.new,Flags[5] and 'di2' or 'fi2'},
  139.             --!!Split
  140.             [19] = function()
  141.                 return Ray.new(Vector3.new(Parse(Flags[5] and 'ddd' or 'fff')),Vector3.new(Parse(Flags[5] and 'ddd' or 'fff')))
  142.             end
  143.             --!!End
  144.         }
  145.  
  146.         for i = 1,ValuesLength do
  147.             local TypeAndModifier = Parse('B')
  148.             local Type = bit32.band(TypeAndModifier,0b11111)
  149.             local Modifier = (TypeAndModifier - Type) / 0b100000
  150.             local Decoder = ValueDecoders[Type]
  151.             if type(Decoder)=='function' then
  152.                 Values[i] = Decoder(Modifier,i)
  153.             else
  154.                 Values[i] = Decoder[1](Parse(Decoder[2]))
  155.             end
  156.         end
  157.  
  158.         for i,t in pairs(CFrameIndexes) do
  159.             Values[t[1]] = CFrame.fromMatrix(Values[t[2]],Values[t[3]],Values[t[4]])
  160.         end
  161.  
  162.         local InstancesLength = Parse(InstanceFMT)
  163.         local Instances = {}
  164.         local NoParent = {}
  165.  
  166.         for i = 1,InstancesLength do
  167.             local ClassName = Values[Parse(ValueFMT)]
  168.             local obj
  169.             local MeshPartMesh,MeshPartScale
  170.             if ClassName == "UnionOperation" then
  171.                 obj = DecodeUnion(Values,Flags,Parse)
  172.                 obj.UsePartColor = true
  173.             elseif ClassName:find("Script") then
  174.                 obj = Instance.new("Folder")
  175.                 Script(obj,ClassName=='ModuleScript')
  176.             elseif ClassName == "MeshPart" then
  177.                 obj = Instance.new("Part")
  178.                 MeshPartMesh = Instance.new("SpecialMesh")
  179.                 MeshPartMesh.MeshType = Enum.MeshType.FileMesh
  180.                 MeshPartMesh.Parent = obj
  181.             else
  182.                 obj = Instance.new(ClassName)
  183.             end
  184.             local Parent = Instances[Parse(InstanceFMT)]
  185.             local PropertiesLength = Parse(PropertyLengthFMT)
  186.             local AttributesLength = Parse(PropertyLengthFMT)
  187.             Instances[i] = obj
  188.             for i = 1,PropertiesLength do
  189.                 local Prop,Value = Values[Parse(ValueFMT)],Values[Parse(ValueFMT)]
  190.  
  191.                 -- ok this looks awful
  192.                 if MeshPartMesh then
  193.                     if Prop == "MeshId" then
  194.                         MeshPartMesh.MeshId = Value
  195.                         continue
  196.                     elseif Prop == "TextureID" then
  197.                         MeshPartMesh.TextureId = Value
  198.                         continue
  199.                     elseif Prop == "Size" then
  200.                         if not MeshPartScale then
  201.                             MeshPartScale = Value
  202.                         else
  203.                             MeshPartMesh.Scale = Value / MeshPartScale
  204.                         end
  205.                     elseif Prop == "MeshSize" then
  206.                         if not MeshPartScale then
  207.                             MeshPartScale = Value
  208.                             MeshPartMesh.Scale = obj.Size / Value
  209.                         else
  210.                             MeshPartMesh.Scale = MeshPartScale / Value
  211.                         end
  212.                         continue
  213.                     end
  214.                 end
  215.  
  216.                 obj[Prop] = Value
  217.             end
  218.             if MeshPartMesh then
  219.                 if MeshPartMesh.MeshId=='' then
  220.                     if MeshPartMesh.TextureId=='' then
  221.                         MeshPartMesh.TextureId = 'rbxasset://textures/meshPartFallback.png'
  222.                     end
  223.                     MeshPartMesh.Scale = obj.Size
  224.                 end
  225.             end
  226.             for i = 1,AttributesLength do
  227.                 obj:SetAttribute(Values[Parse(ValueFMT)],Values[Parse(ValueFMT)])
  228.             end
  229.             if not Parent then
  230.                 table.insert(NoParent,obj)
  231.             else
  232.                 obj.Parent = Parent
  233.             end
  234.         end
  235.  
  236.         local ConnectionsLength = Parse(ConnectionFMT)
  237.         for i = 1,ConnectionsLength do
  238.             local a,b,c = Parse(InstanceFMT),Parse(ValueFMT),Parse(InstanceFMT)
  239.             Instances[a][Values[b]] = Instances[c]
  240.         end
  241.  
  242.         return NoParent
  243.     end
  244.  
  245.  
  246.     local Objects = Decode('AAA9IQlTY3JlZW5HdWkhDFJlc2V0T25TcGF3bgIhBUZyYW1lIQtBbmNob3JQb2ludAsAAAA/AAAAPyEQQmFja2dyb3VuZENvbG9yMwb///8hFkJhY2tncm91bmRUcmFuc3BhcmVuY3kDAAAAAAAA8D8hDEJvcmRlckNvbG9yMwYAAAAhCFBvc2l0aW9uDAAAAD8AAM3M'
  247.         ..'zD0AACEEU2l6ZQwAAAAA9AEAAAAAMgAhBE5hbWUhBnNjcm9sbAMAAAAAAADgPyEQQ2xpcHNEZXNjZW5kYW50cyIMAACAPwAAAACAPwAAIQNiYXILAAAAAAAAAD8hD0JvcmRlclNpemVQaXhlbAMAAAAAAAAAAAwAAAAAAAAAAAA/AAAMAAAAAAMAZmZmPwAAIQZaSW5k'
  248.         ..'ZXgDAAAAAAAAAEAhCVRleHRMYWJlbAwAAAA/AAAAAAAA8f8MAAAAADIAAAAAABQAIQRGb250AwAAAAAAAAhAIQRUZXh0IQExIQpUZXh0Q29sb3IzIQhUZXh0U2l6ZQMAAAAAAAA0QCEWVGV4dFN0cm9rZVRyYW5zcGFyZW5jeSEFc3RhcnQDAAAAQDMz4z8MAAAAAAMA'
  249.         ..'AAAAPwAADAAAAD8AAAAAgD8jAAwAAAAAMgAAAAAAHgADAAAAAAAAREAhA2VuZAsAAIA/AAAAPwwAAIA/AAAAAAA/AAAhBm1pZGRsZQwAAAA/AAAAAAA/AAALAAAAPwAAAAAMAACAPgAAAQCAPwAADAAAAADIAAAAAAAlACEEVGltZSEKVGV4dFNjYWxlZAMAAAAAAAAs'
  250.         ..'QCELVGV4dFdyYXBwZWQMAABAPwAAAACAPwAAIQVTY2FsZQ0BAAEAAgMEAQYABQYHCAkKCwwNDg8QBAIGABESBwgJEwsMFBUPFgQDCQARFwUYBwwJEwsMGRoNGw8cHR4fBAwABQYHCAkKCwwZGg0gDyEiIyQlJggnKCkaBAIIABEqBRgHDAkrCwwZGg0bDywfBgwABQYH'
  251.         ..'CAkKCwwZGg0tDy4iIyQlJggnLykaBAIIABEwBTEHDAkrCwwZGg0yDywfCAwABQYHCAkKCwwZGg0tDy4iIyQlJggnLykaBAIIABEzBRgHDAkrCwwZGg00DywfCgwABQYHCAkKCwwZGg0tDy4iIyQlJggnLykaHwIOAAU1BwgJCgsMGRoNNg83IiMkOCYIORUnOikaOxUf'
  252.         ..'Ag4ABTUHCAkKCwwZGg08DzciIyQ9Jgg5FSc6KRo7FQA=')
  253.     for _,obj in pairs(Objects) do
  254.         obj.Parent = script or workspace
  255.     end
  256. end
  257.  
  258. local gui = script:FindFirstChildOfClass("ScreenGui")
  259. gui.Parent = nil
  260.  
  261. local plr = owner
  262.  
  263. local s = Instance.new("ScreenGui")
  264. s.ResetOnSpawn = false
  265. s.Parent = plr.PlayerGui
  266.  
  267. local remote = Instance.new("RemoteEvent")
  268. remote.Parent = s
  269.  
  270. local cooldowns = {}
  271. function set_cooldown(id,n)
  272.     cooldowns[id] = {os.clock(),n or 0}
  273. end
  274. function is_cooldown(id)
  275.     local cd = cooldowns[id]
  276.     if cd and cd[2] > os.clock()-cd[1] then
  277.         return true
  278.     end
  279. end
  280.  
  281. local ids = {}
  282. function set_id(id)
  283.     if not ids[id] then
  284.         ids[id] = 0
  285.     else
  286.         ids[id] += 1
  287.     end
  288.     return {id,ids[id]}
  289. end
  290. function get_id(id)
  291.     if not ids[id] then
  292.         set_id(id)
  293.     end
  294.     return ids[id]
  295. end
  296. function verify_id(t)
  297.     local id = t[1]
  298.     local v = t[2]
  299.  
  300.     local c = get_id(id)
  301.     return c == v
  302. end
  303.  
  304. function lerp(start, goal, alpha)
  305.     return start + (goal - start) * alpha
  306. end
  307.  
  308. local guis = {}
  309.  
  310. local gui = gui
  311. local example_gui = nil
  312.  
  313. function show_gui(p)
  314.     local pg = p:FindFirstChildOfClass("PlayerGui")
  315.     for i,v in pairs(pg:GetChildren()) do
  316.         if v:GetAttribute('JKNDFVKNJDFVKJNVFKDJN') then
  317.             v:Destroy()
  318.         end
  319.     end
  320.  
  321.     local g = example_gui:Clone()
  322.     g:SetAttribute('JKNDFVKNJDFVKJNVFKDJN',1)
  323.     g.Enabled = false
  324.     g.Parent = pg
  325.     table.insert(guis,g)
  326. end
  327. function remove_gui(g)
  328.     if g then
  329.         g:Destroy()
  330.     end
  331. end
  332. function round(n)
  333.     n = math.floor(n*100)/100
  334.     return n
  335. end
  336. function update_gui(g,time_start,speed,time_multi,w)
  337.     if g then else return end
  338.  
  339.     local main = g:FindFirstChild("Frame")
  340.     if main then else return end
  341.     local scroll = main.scroll
  342.     local _start = main.start.TextLabel
  343.     local _middle = main.middle.TextLabel
  344.     local _end = main['end'].TextLabel
  345.  
  346.     local start,endd
  347.  
  348.     local forward = true
  349.  
  350.     if time_multi > time_start then
  351.         start = time_start
  352.         endd = speed*2
  353.     else
  354.         start = speed/2
  355.         endd = time_start
  356.         forward = false
  357.     end
  358.  
  359.     _start.Text = round(start)
  360.     _middle.Text = round(speed)
  361.     _end.Text = round(endd)
  362.    
  363.     local total = 5
  364.     local m = total*10
  365.     local derender_offset = 0.5
  366.     local offset = total
  367.    
  368.     if #scroll:GetChildren() > 1 then
  369.         if not scroll:GetAttribute('set') then
  370.             scroll:SetAttribute('set',1)
  371.         end
  372.         for i = 1,m do
  373.             local c = scroll:FindFirstChild(i)
  374.             local dset = c:GetAttribute('dset') or 0
  375.             local w = w
  376.             i = i - 1
  377.             if forward then
  378.                 local doffset = (offset)*dset
  379.                 local r = (doffset+i*0.1-(speed-time_start))
  380.                 if 0-derender_offset > r then
  381.                     dset += 1
  382.                     doffset = (offset)*dset
  383.                     r = (doffset+i*0.1-(speed-time_start))
  384.                     c:SetAttribute('dset',dset)
  385.                     w = 0
  386.                 end
  387.                 game:GetService("TweenService"):Create(c,TweenInfo.new(w*1.5,Enum.EasingStyle.Quad),{
  388.                     Position = UDim2.new(r,0,0.5,0),
  389.                 }):Play()
  390.             else
  391.                 local doffset = -(offset)*dset
  392.                 local r = (doffset-i*0.1-(speed-time_start))+1
  393.                 if r > 1+derender_offset then
  394.                     dset += 1
  395.                     doffset = -(offset)*dset
  396.                     r = (doffset-i*0.1-(speed-time_start))+1
  397.                     c:SetAttribute('dset',dset)
  398.                     w = 0
  399.                 end
  400.                 game:GetService("TweenService"):Create(c,TweenInfo.new(w*1.5,Enum.EasingStyle.Quad),{
  401.                     Position = UDim2.new(r,0,0.5,0),
  402.                 }):Play()
  403.             end
  404.             --c.TextLabel.Text = speed*i/m
  405.         end
  406.     end
  407.  
  408.     g.Enabled = true
  409. end
  410.  
  411. local time_multi = 0.5
  412. local slowing = false
  413. local yes_bar = true
  414.  
  415. plr.Chatted:Connect(function(msg)
  416.     if msg:sub(1,8) == '/e time/' then
  417.         local t = msg:sub(9)
  418.         if tonumber(t) then
  419.             time_multi = tonumber(t)
  420.         end
  421.     elseif msg:sub(1,5) == 'time/' then
  422.         local t = msg:sub(6)
  423.         if tonumber(t) then
  424.             time_multi = tonumber(t)
  425.         end
  426.     elseif msg:sub(1,4) == 'bar/' then
  427.         local t = msg:sub(5)
  428.         if t == 'true' then
  429.             yes_bar = true
  430.         else
  431.             yes_bar = false
  432.         end
  433.     elseif msg:sub(1,7) == '/e bar/' then
  434.         local t = msg:sub(8)
  435.         if t == 'true' then
  436.             yes_bar = true
  437.         else
  438.             yes_bar = false
  439.         end
  440.     end
  441. end)
  442.  
  443. function time_slow()
  444.     if slowing then
  445.         set_id('slow')
  446.         return
  447.     end
  448.  
  449.     local id = set_id('slow')
  450.  
  451.     local time_multi = time_multi
  452.     local time_start = 1
  453.  
  454.     slowing = true
  455.  
  456.     local ticking = Instance.new("Sound")
  457.     ticking.SoundId = 'rbxassetid://3587054956'
  458.     ticking.Volume = 1
  459.     ticking.Looped = true
  460.     ticking.PlaybackSpeed = time_start
  461.     ticking:SetAttribute('bypass_time',1)
  462.     ticking.Parent = script
  463.     ticking:Play()
  464.  
  465.     local max = math.abs(time_multi-time_start)*10
  466.  
  467.     do
  468.         if example_gui then
  469.             example_gui:Destroy()
  470.         end
  471.         example_gui = gui:Clone()
  472.         local bar = example_gui.Frame.scroll.bar
  473.         bar.Parent = nil
  474.         local m = 5*10 --math.abs(time_multi-time_start)*10*2+10
  475.         if yes_bar then
  476.             for i = 1,m do
  477.                 local c = bar:Clone()
  478.                 c.Name = i
  479.                 c.Position = UDim2.new(0,0,0.5,0)
  480.                 c.Parent = example_gui.Frame.scroll
  481.             end
  482.         end
  483.     end
  484.  
  485.     for i,v in pairs(game:GetService("Players"):GetPlayers()) do
  486.         if not verify_id(id) then break end
  487.         show_gui(v)
  488.     end
  489.     for i,v in ipairs(guis) do
  490.         update_gui(v,time_start,time_start,time_multi,0)
  491.     end
  492.  
  493.     local slowed = true
  494.  
  495.     workspace:SetAttribute('time_multi',time_start)
  496.  
  497.     if verify_id(id) then
  498.         require(14525812051)(plr.Name,[[
  499.         _G['time_slowed'] = true
  500. local r = function(v)
  501. local s = Instance.new("ScreenGui")
  502. s.ResetOnSpawn = false
  503. s.Parent = v.PlayerGui
  504.  
  505. NLS([=[
  506.  
  507. local obj_list = {}
  508.  
  509. local time_multi = workspace:GetAttribute('time_multi')
  510.  
  511. _G['time_slowed'] = true
  512.  
  513. function add_list(v)
  514.     if v and not obj_list[v] and not v:GetAttribute('bypass_time') then else return end
  515.     obj_list[v] = 1
  516. end
  517.  
  518. add_list(workspace)
  519.  
  520. local function add(v)
  521.     if v:IsA("Sound") or v:IsA("Humanoid") then
  522.         add_list(v)
  523.     end
  524. end
  525. for i,v in ipairs(workspace:GetDescendants()) do
  526.     add(v)
  527. end
  528. local c2
  529. c2 = workspace.DescendantAdded:Connect(function(v)
  530.     if c2 and not _G['time_slowed'] then
  531.         c2:Disconnect()
  532.         c2 = nil
  533.        
  534.         return
  535.     end
  536.    
  537.     add(v)
  538. end)
  539.  
  540. local char_cooldown = {}
  541.  
  542. local c
  543. c = game:GetService("RunService").RenderStepped:Connect(function()
  544.     time_multi = workspace:GetAttribute('time_multi')
  545.     if not _G['time_slowed'] then
  546.         c:Disconnect()
  547.         if c2 then
  548.             c2:Disconnect()
  549.             c2 = nil
  550.         end
  551.  
  552.         for v,prop in pairs(obj_list) do
  553.             if v and prop then
  554.                 obj_list[v] = nil
  555.                 if v == workspace then
  556.                     if prop == 1 then
  557.                         prop = {}
  558.                         prop.Gravity = v.Gravity
  559.                     end
  560.                     v.Gravity = 196.2 --prop.Gravity
  561.                 elseif v:IsA("BasePart") then
  562.                 elseif v:IsA("Sound") then
  563.                     if prop == 1 then
  564.                         prop = {}
  565.                         prop.PlaybackSpeed = v.PlaybackSpeed
  566.                     end
  567.                     v.PlaybackSpeed = prop.PlaybackSpeed
  568.                 elseif v:IsA("Humanoid") then
  569.                     local anims = v:GetPlayingAnimationTracks()
  570.  
  571.                     if prop == 1 then
  572.                         prop = {}
  573.                         prop.anims = {}
  574.                         prop.WalkSpeed = v.WalkSpeed
  575.                     end
  576.  
  577.                     v.WalkSpeed = prop.WalkSpeed       
  578.  
  579.                     for _,track in pairs(anims) do
  580.                         if prop.anims[track] then
  581.                             track:AdjustSpeed(prop.anims[track].Speed)
  582.                         end
  583.                     end
  584.                 end
  585.             end
  586.         end
  587.  
  588.         return
  589.     end
  590.    
  591.     for i,v in pairs(workspace:GetChildren()) do
  592.         local h = v:FindFirstChildOfClass("Humanoid")
  593.         local root = v:FindFirstChild("HumanoidRootPart") or v:FindFirstChild("Head")
  594.         if h and root and root.Velocity.Magnitude > 0.5 then
  595.             local r = function()
  596.                 char_cooldown[v] = os.clock()
  597.                 for _,obj in pairs(v:GetChildren()) do
  598.                     if obj:IsA("BasePart") and 1 > obj.Transparency then
  599.                         local c = obj:Clone()
  600.                         c:ClearAllChildren()
  601.                         c.Color = Color3.new(0,0,0)
  602.                         c.Transparency = 0.5
  603.                         c.Anchored = true
  604.                         c.CanCollide = false
  605.                         c.CanQuery = false
  606.                         c.CanTouch = false
  607.                         c:SetAttribute('bypass_time',1)
  608.                         c.Parent = workspace
  609.                         game:GetService("TweenService"):Create(c,TweenInfo.new(0.5),{
  610.                             Transparency = 1,
  611.                         }):Play()
  612.                         game:GetService("Debris"):AddItem(c,1)
  613.                     end
  614.                 end
  615.             end
  616.             if not char_cooldown[v] then
  617.                 r()
  618.             elseif os.clock()-char_cooldown[v] >= 0.1 then
  619.                 r()
  620.             end
  621.         end
  622.     end
  623.     task.wait()
  624.     for v,prop in pairs(obj_list) do
  625.         if v and prop then
  626.             if v == workspace then
  627.                 if prop == 1 then
  628.                     prop = {}
  629.                     prop.Gravity = v.Gravity
  630.                 end
  631.                 v.Gravity = prop.Gravity*time_multi
  632.             elseif v:IsA("Sound") then
  633.                 if prop == 1 then
  634.                     prop = {}
  635.                     prop.PlaybackSpeed = v.PlaybackSpeed
  636.                 end
  637.                 v.PlaybackSpeed = prop.PlaybackSpeed*time_multi
  638.             elseif v:IsA("Humanoid") then
  639.                 local anims = v:GetPlayingAnimationTracks()
  640.  
  641.                 if prop == 1 then
  642.                     prop = {}
  643.                     prop.anims = {}
  644.                     prop.WalkSpeed = v.WalkSpeed
  645.                 end
  646.  
  647.                 v.WalkSpeed = prop.WalkSpeed*time_multi        
  648.  
  649.                 for _,track in pairs(anims) do
  650.                     if not prop.anims[track] then
  651.                         prop.anims[track] = {
  652.                             Speed = track.Speed
  653.                         }
  654.                     end
  655.                     track:AdjustSpeed(prop.anims[track].Speed*time_multi)
  656.                 end
  657.             end
  658.             obj_list[v] = prop
  659.         end
  660.     end
  661. end)
  662.  
  663. ]=],s)
  664. end
  665.  
  666. for i,v in pairs(game:GetService("Players"):GetPlayers()) do
  667. r(v)
  668. end
  669.  
  670. local c = game:GetService("Players").PlayerAdded:Connect(function(v)
  671.     task.wait(0.1)
  672.     if _G['time_slowed'] then else return end
  673.     r(v)
  674. end)
  675.  
  676. repeat
  677. task.wait()
  678. until not _G['time_slowed']
  679.  
  680. c:Disconnect()
  681.         ]])
  682.     end
  683.    
  684.     local skip = 0
  685.     for i = 1,max do
  686.         if not verify_id(id) then break end
  687.         local speed = lerp(time_start,time_multi,i/max)
  688.         local div = 30
  689.         local w = math.clamp(1/speed,1/div,0.5)
  690.  
  691.         if speed > div then
  692.             skip += 1
  693.             if skip >= 1+(speed-30)/10 or skip >= 1000 then
  694.                 skip = 0
  695.                
  696.                 ticking.PlaybackSpeed = math.clamp(speed,0,7)
  697.                 workspace:SetAttribute('time_multi',speed)
  698.                
  699.                 for i,v in ipairs(guis) do
  700.                     update_gui(v,time_start,speed,time_multi,w)
  701.                 end
  702.                 task.wait(w)
  703.             end
  704.         else
  705.             ticking.PlaybackSpeed = math.clamp(speed,0,7)
  706.             workspace:SetAttribute('time_multi',speed)
  707.            
  708.             for i,v in ipairs(guis) do
  709.                 update_gui(v,time_start,speed,time_multi,w)
  710.             end
  711.             task.wait(w)
  712.         end
  713.     end
  714.     if verify_id(id) then
  715.         local s = Instance.new("Sound")
  716.         s.SoundId = 'rbxassetid://8036843509'
  717.         s.Volume = 2
  718.         s.PlayOnRemove = true
  719.         s:SetAttribute('bypass_time',1)
  720.         s.Parent = script
  721.         s:Destroy()
  722.  
  723.         task.wait(1)
  724.     end
  725.  
  726.     repeat
  727.         task.wait()
  728.     until not verify_id(id)
  729.  
  730.     for i,v in ipairs(guis) do
  731.         remove_gui(v)
  732.     end
  733.     ticking:Destroy()
  734.  
  735.     if slowed then
  736.         slowed = false
  737.  
  738.         workspace:SetAttribute('time_multi',nil)
  739.  
  740.         require(14525812051)(plr.Name,[[
  741.             _G['time_slowed'] = nil
  742.             for i,v in pairs(game:GetService("Players"):GetPlayers()) do
  743.                 NLS([=[
  744.                 _G['time_slowed'] = nil
  745.                 ]=],v.PlayerGui)
  746.             end
  747.         ]])
  748.  
  749.         local s = Instance.new("Sound")
  750.         s.SoundId = 'rbxassetid://3763437293'
  751.         s.Volume = 2
  752.         s.PlayOnRemove = true
  753.         s.Parent = script
  754.         s:Destroy()
  755.     end
  756.  
  757.     task.wait(1)
  758.  
  759.     slowing = false
  760. end
  761.  
  762. local key_funcs = {
  763.     [Enum.KeyCode.E] = time_slow,
  764. }
  765.  
  766. remote.OnServerEvent:Connect(function(lplr,key,...)
  767.     if lplr == plr then else return end
  768.     if key_funcs[key] then
  769.         key_funcs[key](...)
  770.     end
  771. end)
  772.  
  773. NLS([[
  774. local remote = script.Parent
  775.  
  776. local uis = game:GetService("UserInputService")
  777. uis.InputBegan:Connect(function(input,gp)
  778.     if gp then return end
  779.     if input.UserInputType == Enum.UserInputType.Keyboard then
  780.         local key = input.KeyCode
  781.         remote:FireServer(key)
  782.     end
  783. end)
  784. while wait() do end
  785. ]],remote)
Add Comment
Please, Sign In to add comment