Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local box = script.Parent
- local function onFocus()
- box.BackgroundColor = Color3.new(255, 255, 255) -- We need a "on focus" function, and there is nothing to do when focused
- end
- local function onFocusLost(enterPressed, inputObject)
- if enterPressed then
- local guess = box.Text
- if guess == "roblox" then -- Change this to whatever you want
- box.Text = "Correct!"
- else
- box.Text = "Wrong!"
- end
- else
- box.Text = ""
- end
- end
- box.Focused:Connect(onFocus)
- box.FocusLost:Connect(onFocusLost)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement