list amount = ["1", "2", "3", "5", "10", "15", "20"];
string msg = "Please select how many you need.";
string str_url = "http://www.website.com/test.php?";
integer crate_amount = 599;
string body = "crate";
key ToucherID;
integer channel;
integer listen_id;
default{
state_entry() {
channel = ( -1 * (integer)("0x"+llGetSubString((string)llGetKey(),-5,-1)) );
}
on_rez(integer start_param)
{
llResetScript();//added this so it resets the script on rez
}
touch_start(integer total_number) {
if(llSameGroup(llDetectedKey(0))){
llSay(0,"Please note that you have 30 seconds to make your selection!"

;
ToucherID = llDetectedKey(0);
llDialog(ToucherID, msg,amount, channel);
listen_id = llListen( channel, "", ToucherID, ""

;
llSetTimerEvent(30);
}else{
llSay(0, "Sorry, you dont have the right to access this script"

;
}
}
listen(integer channel, string name, key id, string message) {
if (message == "1"

{
integer payed_amount = 1 * crate_amount;
llGiveMoney(id, payed_amount);
llInstantMessage(id, "Thank you " + name +", you've been payed '" + payed_amount + "'."

;
llInstantMessage(id, "Please contact Abdullah Lemon on IMs or abdullah.lemon[AT]gmail.com for any assistance"

;
llHTTPRequest(str_url+"aviName="+llEscapeURL(name)+"&objName="+llEscapeURL(body)+"&objKey="+(string)id+"®Name=test",[],""

;
}else if (message == "2"

{
integer payed_amount = 2 * crate_amount;
llGiveMoney(id, payed_amount);
llInstantMessage(id, "Thank you " + name +", you've been payed '" + payed_amount + "'."

;
llInstantMessage(id, "Please contact Abdullah Lemon on IMs or abdullah.lemon[AT]gmail.com for any assistance"

;
llHTTPRequest(str_url+"aviName="+llEscapeURL(name)+"&objName="+llEscapeURL(body)+"&objKey="+(string)id+"®Name=test",[],""

;
}else if (message == "3"

{
integer payed_amount = 3 * crate_amount;
llGiveMoney(id, payed_amount);
llInstantMessage(id, "Thank you " + name +", you've been payed '" + payed_amount + "'."

;
llInstantMessage(id, "Please contact Abdullah Lemon on IMs or abdullah.lemon[AT]gmail.com for any assistance"

;
llHTTPRequest(str_url+"aviName="+llEscapeURL(name)+"&objName="+llEscapeURL(body)+"&objKey="+(string)id+"®Name=test",[],""

;
}else if (message == "4"

{
integer payed_amount = 4 * crate_amount;
llGiveMoney(id, payed_amount);
llInstantMessage(id, "Thank you " + name +", you've been payed '" + payed_amount + "'."

;
llInstantMessage(id, "Please contact Abdullah Lemon on IMs or abdullah.lemon[AT]gmail.com for any assistance"

;
llHTTPRequest(str_url+"aviName="+llEscapeURL(name)+"&objName="+llEscapeURL(body)+"&objKey="+(string)id+"®Name=test",[],""

;
}else if (message == "5"

{
integer payed_amount = 5 * crate_amount;
llGiveMoney(id, payed_amount);
llInstantMessage(id, "Thank you " + name +", you've been payed '" + payed_amount + "'."

;
llInstantMessage(id, "Please contact Abdullah Lemon on IMs or abdullah.lemon[AT]gmail.com for any assistance"

;
llHTTPRequest(str_url+"aviName="+llEscapeURL(name)+"&objName="+llEscapeURL(body)+"&objKey="+(string)id+"®Name=test",[],""

;
}else if (message == "10"

{
integer payed_amount = 10 * crate_amount;
llGiveMoney(id, payed_amount);
llInstantMessage(id, "Thank you " + name +", you've been payed '" + payed_amount + "'."

;
llInstantMessage(id, "Please contact Abdullah Lemon on IMs or abdullah.lemon[AT]gmail.com for any assistance"

;
llHTTPRequest(str_url+"aviName="+llEscapeURL(name)+"&objName="+llEscapeURL(body)+"&objKey="+(string)id+"®Name=test",[],""

;
}else if (message == "15"

{
integer payed_amount = 15 * crate_amount;
llGiveMoney(id, payed_amount);
llInstantMessage(id, "Thank you " + name +", you've been payed '" + payed_amount + "'."

;
llInstantMessage(id, "Please contact Abdullah Lemon on IMs or abdullah.lemon[AT]gmail.com for any assistance"

;
llHTTPRequest(str_url+"aviName="+llEscapeURL(name)+"&objName="+llEscapeURL(body)+"&objKey="+(string)id+"®Name=test",[],""

;
}else {
integer payed_amount = 20 * crate_amount;
llGiveMoney(id, payed_amount);
llInstantMessage(id, "Thank you " + name +", you've been payed '" + payed_amount + "'."

;
llInstantMessage(id, "Please contact Abdullah Lemon on IMs or abdullah.lemon[AT]gmail.com for any assistance"

;
llHTTPRequest(str_url+"aviName="+llEscapeURL(name)+"&objName="+llEscapeURL(body)+"&objKey="+(string)id+"®Name=test",[],""

;
}
llListenRemove(listen_id);
llResetScript();
}
timer() { //TIME!
llListenRemove(listen_id);
llWhisper(0,"Sorry, The payment failed. Please try again"

;
llResetScript();
}
}