uhh.... i run this code:
billy = workspace.billy
workspace.buildgui.Value = 0
script.Parent.Parent.Enabled = false
local SP = script.Parent
SP.youneedmoreerror.Text = ""
SP.youneedmoreerror.BackgroundTransparency = 1
local slideno = 0
local goleft = script.Parent.goleft
local goright = script.Parent.goright
local buildingsnames = {"hut","stone hut"}
while true do
wait(0.5)
if game.Workspace.buildgui.Value == 1 then
script.Parent.Parent.Enabled = true
if slideno == 0 then
SP.Dinfo.BackgroundTransparency = 1
SP.Dinfo.Text = ""
SP.Dbuy.BackgroundTransparency = 1
SP.Dbuy.Text = ""
SP.Einfo.BackgroundTransparency = 1
SP.Einfo.Text = ""
SP.Ebuy.BackgroundTransparency = 1
SP.Ebuy.Text = ""
SP.Finfo.BackgroundTransparency = 1
SP.Finfo.Text = ""
SP.Fbuy.BackgroundTransparency = 1
SP.Fbuy.Text = ""
SP.Ginfo.BackgroundTransparency = 1
SP.Ginfo.Text = ""
SP.Gbuy.BackgroundTransparency = 1
SP.Gbuy.Text = ""
SP.Hinfo.BackgroundTransparency = 1
SP.Hinfo.Text = ""
SP.Hbuy.BackgroundTransparency = 1
SP.Hbuy.Text = ""
SP.Ainfo.BackgroundTransparency = 0
SP.Ainfo.Text = "info"
SP.Abuy.BackgroundTransparency = 0
SP.Abuy.Text = "buy"
SP.Binfo.BackgroundTransparency = 0
SP.Binfo.Text = "info"
SP.Bbuy.BackgroundTransparency = 0
SP.Bbuy.Text = "buy"
SP.Cinfo.BackgroundTransparency = 1
SP.Cinfo.Text = ""
SP.Cbuy.BackgroundTransparency = 1
SP.Cbuy.Text = ""
SP.Cimage.Visible = false
SP.Dimage.Visible = false
SP.Eimage.Visible = false
SP.Fimage.Visible = false
SP.Gimage.Visible = false
SP.Himage.Visible = false
SP.Aimage.Visible = true
SP.Bimage.Visible = true
function onclickbuy(letter)
return function()
if letter == "A" then
print("bfhsfhsljchl;s")
if letter == "A" then
if workspace.invintory.trees.Value == 0 or workspace.invintory.trees.Value == 1 then
SP.youneedmoreerror.Text = "error: not enough matirails"
SP.youneedmoreerror.BackgroundTransparency = 0
wait(1.5)
SP.youneedmoreerror.Text = ""
SP.youneedmoreerror.BackgroundTransparency = 1
end
if workspace.hosuesbrought.A.Value == 1 then
SP.youneedmoreerror.Text = "error: you have allready got this!"
SP.youneedmoreerror.BackgroundTransparency = 0
wait(1.5)
SP.youneedmoreerror.Text = ""
SP.youneedmoreerror.BackgroundTransparency = 1
end
if workspace.invintory.trees.Value > 1 then
if workspace.hosuesbrought.A.Value == 0 then
workspace.invintory.trees.Value = workspace.invintory.trees.Value - 2
billy.busy.Value = 1
workspace.hosuesbrought.A.Value = 1
if billy.busy.Value == 0 then
billy.Head.Position = Vector3.new(-33, 6.5, -216.5)
billy.Torso.Position = Vector3.new(-33, 4.992, -216.5)
billy.RightArm.Position = Vector3.new(-34.5, 4.994, -216.5)
billy.LeftArm.Position = Vector3.new(-31.5, 4.995, -216.5)
billy.RightLeg.Position = Vector3.new(-33.5, 2.995, -216.5)
billy.LeftLeg.Position = Vector3.new(-32.5, 2.995, -216.5)
wait(10)
game.ReplicatedStorage.Abuy.parent = workspace
billy.Head.Position = Vector3.new(91, 6.5, -231.5)
billy.Torso.Position = Vector3.new(91, 5, -231.5)
billy.RightArm.Position = Vector3.new(89.5, 5, -231.5)
billy.LeftArm.Position = Vector3.new(92.5, 5, -231.5)
billy.RightLeg.Position = Vector3.new(90.5, 3, -231.5)
billy.LeftLeg.Position = Vector3.new(91.5, 3, -231.5)
billy.busy.Value = 0
end
if billy.busy.Value == 1 then
SP.youneedmoreerror.Text = "error: billy is busy!"
SP.youneedmoreerror.BackgroundTransparency = 0
wait(1.5)
SP.youneedmoreerror.Text = ""
SP.youneedmoreerror.BackgroundTransparency = 1
workspace.invintory.trees.Value = workspace.invintory.trees.Value + 2
workspace.hosuesbrought.A.Value = 0
end
end
wait(1)
end
end
end
end
end
end
script.Parent.Abuy.MouseButton1Click:Connect(onclickbuy("A"))
if workspace.buildgui.Value == 0 then
SP.Parent.Enabled = false
end
end
end
output i get: "you dont have enough marirails!" i go chop down a tree, getting me enough matirails. "you dont have enough matirails!" "you have allready got this!" what's going on? please help!
(sorry if me spelling was bad i just wanted to do this quick)
