tell application "Terminal"
do shell script "/usr/local/bin/blueutil status"
set _Result to the result
if _Result is "Status: on" then
do shell script "/usr/local/bin/blueutil off"
end if
if _Result is "Status: off" then
do shell script "/usr/local/bin/blueutil on"
end if
quit application "Terminal"
end tell