local f=game:GetService("\082\117\110\083\101\114\118\105\099\101")return function(S,v,h)local l=time()local u u=f.RenderStepped:Connect(function()local f=time()-l local N=f/S if N>=1 then N=1 end v(N)if N==1 then u:Disconnect()if h then h()end end end)end

local RunService = game:GetService("RunService")

return function(duration, callback, afterDone)
    local startTim = time()

    local con
    con = RunService.RenderStepped:Connect(function()
        local elapsed = time() - startTim
        local percentage = elapsed / duration

        if percentage >= 1 then
            percentage = 1
        end 

        callback(percentage)
        
        if percentage == 1 then
            con:Disconnect()

            if afterDone then 
                afterDone()
            end
        end
    end)
end 
