Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local button = script.Parent
- local seeds = script.Parent.Parent.RiceSeedS
- local seedm = script.Parent.Parent.RiceSeedM
- local seedl = script.Parent.Parent.RiceSeedL
- local ricevalue = script.Parent.Parent.RiceValue
- button.Triggered:Connect(function()
- if ricevalue.Value == 0 then
- button.Enabled = false
- seeds.Transparency = 0
- wait(3)
- seeds.Transparency = 1
- seedm.Transparency = 0
- wait(3)
- seedm.Transparency = 1
- seedl.Transparency = 0
- button.ActionText = "เก็บเกี่ยวผลผลิต"
- button.ObjectText = "ได้รับข้าว2กำ/เมล็ดข้าว2ถุง"
- wait(1)
- button.Enabled = true
- ricevalue.Value = 1
- elseif ricevalue.Value == 1 then
- seedl.Transparency = 1
- button.ActionText = "หว่านเมล็ด"
- button.ObjectText = "ใช้เมล็ดข้าว1ถุง"
- wait(1)
- ricevalue.Value = 0
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement