Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How To Insert More Code For More Items?

Asked by 8 years ago

I wanna make it have diffrent codes with diffrent items.

local plr = script.Parent.Parent.Parent.Parent.Parent
script.Parent.MouseButton1Click:connect(function()
    if script.Parent.Parent.Input.Text == 'Code' then 
        script.Parent.Parent.Input.Text = ""
        script.Parent.Text = 'Success!'
        local b = game.Lighting.Sign:Clone()
        b.Parent = plr.Backpack
        wait(1)
        script.Parent.Text = 'Submit'
        script.Parent.Parent.Input.Text = 'Enter code here'
    else
        script.Parent.Parent.Input.Text = 'Enter code here'
        script.Parent.Text = 'Invalid Code'
        wait(1)
        script.Parent.Text = 'Submit'
    end
end)

Answer this question