Currently, the script will wait for a redstone state change, then error out due to spelling mistakes.
This block here:
while true do
event = os.pullEvent()
if event == "redstone" then
break
end
end
… could be re-written as just:
os.pullEvent("redstone")
Combining that with fixes for the other errors, we'd get:
os.pullEvent("redstone")
peripheral.call("top", "write" , "Hello world") -- Assuming a monitor is above, writes "Hello world" on that
sleep(10)
term.clearLine() -- Clears the current line on the computer's own display
sleep(10)
term.setCursorPos(1,1) -- Moves the cursor on the computer's own display
If this differs from what you "want", then it might pay to explain what exactly that is and what said differences are.