AppleScript - Add userinput to text file?
Try the following:

set cheat1 to the quoted form of text returned of (display dialog "Enter Cheat" default answer "99 Gold, super health, unlimited Grenades..")

set newText to quoted form of "I am now
    adding
    a few
    test lines"

do shell script "echo " &amp; newText &amp; " &gt;&gt; ~/Desktop/test.txt"
do shell script "echo " &amp; cheat1 &amp; " &gt;&gt; ~/Desktop/test.txt"


Results:

I am now
    adding
    a few
    test lines
99 Gold, super health, unlimited Grenades..