This part is broken
if total > 1000 then
payment = "You can not afford this."
elseif total >= 1000 then
payment = "You can affort this, but you will be broke."
end
I bet you meant to do this:
if total < 1000 then
payment = "You can not afford this."
elseif total == 1000 then
payment = "You can affort this, but you will be broke."
end
regarding varSCondition: Your varSCondition is a String ("1"), but you're sometimes comparing it to integers (without the "-signs), for example here:
if varSCondition == 1 then
and sometimes to Strings , for example here:
if varSCondition == "20" then
All of them should be either a string, or an integer, but dont mix them. try this:
local varSCondition = 1 -- 5 = Uncurable, 10 = Well, 15 = Unknown, 20 = Surgery, 25 = Post Surgery, 29 = Bar Surgery
...
if varSCondition == 1 then
varExStatus = "Well"
end
if varSCondition == 5 then
varExStatus = "Uncurable"
end
if varSCondition == 15 then
varExStatus = "Unknown"
end
if varSCondition == 20 then
varExStatus = "Surgery"
end
if varSCondition == 25 then
varExStatus = "Post Surgery"
end
if varSCondition == 29 then
varExStatus = "Bar Surgery"
end