--l.WordWrap = word_wrap


closing=false
close.MouseButton1Click:connect(function()
	--close.Visible = false
	
	hidef()
	closing=true
	--cutoff.Visible = false

end)

function showf()
	script.scrollunroll.Pitch = math.random(900,1100)/1000
	script.scrollunroll:Play()
	close.Visible = true
	
	
	cutoff.Visible = false
	cutoff.Position = UDim2.new(0.5,-300,0,-300)
	cutoff.Visible = true
	cutoff:TweenPosition(
		originalpos
		, "In", "Quad", .5, true, nil
	)
	wait(.51)
	cutoff.Size = UDim2.new(0,600,0,cutoff_start)
	--cutoff.Visible = true
	cutoff:TweenSize(
		UDim2.new(0,600,0,cutoff_end)
		, "Out", "Quad", .8, true, nil
	)		
end

function hidef()
	if closing then return end
	script.scrollroll.Pitch = math.random(900,1100)/1000
	script.scrollroll:Play()
	cutoff:TweenSize(
		UDim2.new(0,600,0,cutoff_start)
		, "Out", "Quad", .3, true, nil
	)
	wait(.31)
	cutoff:TweenPosition(
		UDim2.new(0.5,-300,0,-300)
		, "Out", "Quad", .3, true, nil
	)
	wait(.31)
	cutoff.Visible = false
	--cutoff.Position = originalpos
	g:Destroy()
end
