Rotation Problem of pendulum

hi, i have a problem of rotation of pendulum,it will rotate 70 degree right and -70 left, m using GUI slider to adjust speed, but the pendulum is rotating very very slow, m attaching script please help…

1st script(GUIBUTTON)

``````var speedselection;

speedselection = GUI.HorizontalSlider (Rect (550, 45, 100, 30), speedselection, 0.5, 1.5);

(min_speed=0.5, max_speed=1.5)
``````

2nd script(pendulum_rotation)

``````var angle : float ;

var x : float ;

x = 0.0f;

var i:int=1;

var speed:float;

var time:float;

function Update ()

{

var guibutton:GUIBUTTON = GameObject.Find("Scene").GetComponent(GUIBUTTON);
time=guibutton.speedselection;

speed = 70/time;

angle = Time.deltaTime * speed;

if(x>69)
{
i =-1;
}
transform.Rotate (0,angle, 0 );

}
else if(x >= -70 && i== -1)
{
x -= angle;
if ( x < -69)
{
i =1;
}
transform.Rotate (0,-angle,0);
}
``````

i am getting error in transform.rotate(0,angle,0) but if i give value of time to 0.5 the whole script will work perfectly

edited script, 2nd script(pendulum_rotation)

var angle : float ;

var x : float ;

x = 0.0f;

var i:int=1;

var speed:float;

var time:float;

function Update ()

{

var guibutton:GUIBUTTON = GameObject.Find(“Scene”).GetComponent(GUIBUTTON);

time=guibutton.speedselection;

``````speed = 70/time;

angle = Time.deltaTime * speed;

if(x <= 70 && i==1)
{
x += angle;
if ( x>69)
{
i =-1;
}
transform.Rotate (0,angle, 0 );

}
else if(x >= -70 && i== -1)
{
x -= angle;
if ( x < -69)
{
i =1;
}
transform.Rotate (0,-angle,0);
}
``````

}