local l=game:GetService("\082\117\110\083\101\114\118\105\099\101")return function(y,S,T)local s=time()local i i=l.RenderStepped:Connect(function()local l=time()-s local I=l/y if I>=1 then I=1 end S(I)if I==1 then i:Disconnect()if T then T()end end end)end
--Services
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
