Draw, a really simple drawing application packed with features

Draw, A really simple, fun and is packed with over 15 drawing features such as, rainbow, a colour picker, rectangle pencils, and MANY MANY more! More to come! Enjoy!

Code:

supportedOrientations(LANDSCAPE_LEFT)
      function setup() 
    displayMode(OVERLAY)
backingMode(RETAINED)
    touches = {}
    words = ""
    speakWords = words
    --Parameters go here
     parameter.action("What's New In Draw?", function() alert("-1.5.01-\
\
1.5.01 is a minor update which now allows you to draw rectangles with the straight pencil!\
 * Many bug fixes\
\
-1.5-\
\
1.5, the tweak update, IS OUT! ENJOY THE NEW TWEAKS AND FEATURES!\
\
 * RAINBOW PLUS! The rainbow plus feature has finally come to Draw! experiment with it yourself! Its AWESOME! It also features Pencil, AND Outline!\
 * AUTO SETUP! A new button called Auto Setup, also another new button called Auto Setup With Outline, which setups the basics automatically with outlines, and Text Auto Setup, its the same thing but with text!\
\
-Tweaks-\
\
-Stroke is now called Outline!\
-Text is completely redone, its ALOT better!\
-All colours are set to begin black\
-Straight Pencil is ALOT better, now it starts off at 0 instead of 500, and it is now rendered to the screen limits!\
-Drawing is heaps smoother!\
\
 That's it for now, we hope you enjoy, and Keep on Creating!\
\
 Sincerely, Leedo Games", "What's New in 1.5.01?")end)
    parameter.action("Help", function() alert("WHY IS THE PENCIL BLACK!?\
 * Change the color.\
I CANT DRAW!\
 *  Increase the size parameter.\
DOES THE SMOOTHER GRAPHICS BUTTON EVEN WORK?\
 * Yes of course it does! But because the game has such good graphics by it self, there is only a minor difference.\
RAINBOW OUTLINE AND COLOUR DONT WORK TOGETHER!\
 * Sorry, but that will cause MAJOR lag and will look messy!\
WHATS UP WITH THE STRAIGHT PENCIL?\
 * Its just a little bit tricky to use, practice makes perfect!\
\
For more infomation, help or questions, visit my website : www.leedogames.com.au/help&faq","Help & FAQ")end)
    parameter.action("Auto Setup", function() Colour = color(math.random(255), math.random(255), math.random(255)) Size = 50 end)
    parameter.action("Auto Setup with Outline", function() Colour = color(math.random(255), math.random(255), math.random(255)) Size = 50 Outline_Size = 2.5 Outline_Colour = color(255)end)
     parameter.action("Text Auto Setup", function() Text_Colour = color(255) Text_Size = 50 end)
  parameter.color("Colour",0,0,0,255)
    parameter.color("Outline_Colour",0)
     parameter.color("Text_Colour", 0)
    parameter.number("Rotation", 0, 360, 0)
    parameter.number("Text_Size", 0, 500, 0)
    parameter.number("Size",0,1000,0) 
     parameter.number("Outline_Size",0,20,0)
     parameter.number("X", 0, 1025, 0)
    parameter.number("Y", 0, 770, 0)
    parameter.boolean("Smoother Graphics", true)
    parameter.boolean("Rectangle_Pencil", false)
    parameter.boolean("Rainbow", false)
    parameter.boolean("Outline_Rainbow", false)
    parameter.boolean("Straight_Pencil", false)
    parameter.boolean("Rainbow_Plus", false)
parameter.boolean("Outline_Rainbow_Plus", false)
    parameter.action("Play Music", function() music("A Hero's Quest:Exploration", true)end)
    parameter.action("Stop Music", function() music.stop()end)
    parameter.action("Lock Orientation", function() supportedOrientations(LANDSCAPE_LEFT) alert("Orientation has been locked","Orientation Locked")end)
    parameter.action("Unlock Orientation", function() supportedOrientations(ANY) alert("Orientation has been unlocked","Orientation Unlocked")end)
    parameter.action("Record", function() startRecording()end)
    parameter.action("Stop Recording", function() stopRecording()end)
     parameter.action("Restart", function() restart()end)
    parameter.action("Exit Draw", function() close() end)
    play = 1
    start = 2
    state = start
    --Text goes here
    print("Draw Anything!, Created By Leedo Games!")
    print("Version 1.5.01")
    print("To Erase, Change Colour To Black, (0, 0, 0, 255).")
    print("Thanks For Playing, We Hope You Enjoy!")
    print("To Bring Up The Keyboard For Text, Quickly Double Tap The Screen")

end
                            
function draw()
    stroke(Outline_Colour)
    strokeWidth(Outline_Size) 
    fill(Text_Colour)
    fontSize(Text_Size)
    font("ArialMT")
    rotate(Rotation)
    text(words, CurrentTouch.x, CurrentTouch.y)

    if Straight_Pencil and not Rectangle_Pencil == true then
        stroke(Outline_Colour)
        strokeWidth(Outline_Size)
        fill(Colour)
        rotate(Rotation)
        ellipse(X,Y, Size)
    end
    if Straight_Pencil and Rectangle_Pencil == true then
        stroke(Outline_Colour)
        strokeWidth(Outline_Size)
        fill(Colour)
        rotate(Rotation)
        rect(X,Y, Size)
        end
    for k,touch in pairs(touches) do
    if Rainbow == true then
        Outline_Rainbow = false 
        end
        
  
    stroke(Outline_Colour)
    strokeWidth(Outline_Size)
    fill(Colour)
    ellipseMode(CENTER)
rotate(Rotation)
    ellipse(touch.x, touch.y, Size)   
    
    fill(255, 255, 255, 255)
        font("ArialMT")
        fontSize(15)
        text("",670,750)
    
    if Rectangle_Pencil == true then
        stroke(Outline_Colour)
        strokeWidth(Outline_Size)
        rectMode(CENTER)
        fill(Colour)
            rotate(Rotation)
        rect(touch.x, touch.y, Size)  
    end 
  if Smoother_Graphics == true then
        smooth() else
        noSmooth()
end
           
    end
function colorChanged(c)

    
end

function backgroundChanged(b)
    
end






    

   
function touched(touch)
    if touch.state == ENDED then
    tapCount = 0 end
    if touch.tapCount == 2 then
        showKeyboard()
        end
    if Rainbow == true then
        Colour=color(math.random(255),math.random(255),math.random(255))
      elseif Outline_Rainbow == true then
        Outline_Colour=color(math.random(255), math.random(255), math.random(255))
            end
    if touch.state == ENDED then
        touches[touch.id] = nil
        else
        touches[touch.id] = touch
    end
    if Rainbow_Plus == true then
        Colour=color(math.random(255),math.random(255),math.random(255),math.random(255))
      elseif Outline_Rainbow_Plus == true then
        Outline_Colour=color(math.random(255), math.random(255), math.random(255), math.random(255))
            end
  function keyboard(key)
 words = words..key
            if key == BACKSPACE then
                words = ""
            end
        end
end
end
function speakWords()
    if words ~= "" then
        speech.say(words)
    end
end
-- 1.6 added/WIP features:
--(WIP)Tilt draw

Whole crap! It messed up! Wow sorry I’ll post it again!

Edit your post (cogwheel in top-right corner) and put three tildes ~~~ at the top and bottom of the code block. The forum FAQ has lots of useful tips for formatting posts

Thank you heaps!