I'll leave the sprite graphics up to you, but here's a working example using built-in graphics.
setVirtualResolution(800,600)
// Position of scrollbar
sx = 200
sy = 100
// Length of scroll bar
sLength = 200
// Height of scoll bar
sHeight = 10
// Thumb of the scrollbar
tx = 200
ty = 100
// Thumb width
tw = 10
repeat
// Draw the scroll bar
drawScrollbar(sx, sy, sLength, sHeight, 9,69,65)
// Draw the scroll bar thumb (the part the user slides)
drawBox(tx, ty, tx+tw, ty+tw, 0,184,182)
// User interaction with scrollbar
// if mouse button is down
if getPointerState() = 1
mx = getRawMouseX()
my = getRawMouseY()
// if not already dragging the thumb
if drag = 0
// if mouse was clicked within the thumb's boundaries
if mx >= tx and mx <= tx+tw and my >= ty and my <= ty+tw
// offset from where the mouse was clicked within the thumb.
// this prevents jumping effects
offsetX = tx - mx
offsetY = ty - my
// Initiate the drag
drag = 1
endif
else
// mouse is dragging the thumb, so update it's position
tx = mx + offsetX
endif
else
// mouse button release, stop dragging
drag = 0
endif
// Keep thumb within bounds of the scrollbar
if tx < sx then tx = sx
if tx > sx+sLength-tw then tx = sx+sLength-tw
// Calculate scroll bar value
// Total distance the thumb can travel
total_dist# = sLength - tw
// Get ratio from 0 to 1
ratio# = (tx - sx) / total_dist#
// Calculate value
value = 99*ratio# + 1
print("Value: "+str(value))
sync()
until getRawKeyPressed(27) = 1
end
function drawScrollBar(x, y, width, height, r,g,b)
drawBox(x, y, x+width, y+height, r,g,b)
endfunction
function drawBox(x1,y1,x2,y2, r, g, b)
for x = x1 to x2
drawLine(x,y1,x,y2,r,g,b)
next x
endfunction

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds