Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do you make that when you put a correct word in a textbox you get xp?

i have tried this.

if script.Parent.Text == "while true do" then game.Players.plr.IntValue.Value = 25 end

2 answers

✓ Accepted answer
local uis = game:GetService("UserInputService")
local player = game.Players.LocalPlayer

uis.InputBegan:connect(function(key)
if key.KeyCode == Enum.KeyCode.Enter then
if script.Parent.Text == "I Luv XP" then
player.XP.Value = player.XP.Value + 25
end
end
end)

That will make it so when you press enter and the code is whatever you code is then it will give xp

Make sure it's in a local script in the textbox.

1 comment

0

ok now how do you make it insert a xp box in the leaderboard could you tell me with the other script in it

Just use the FocusLost event of textboxes.

TextBox.FocusLost:Connect(function()
	if TextBox.Text == "" then

	end
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.