if script.Parent.Text == "while true do" then game.Players.plr.IntValue.Value = 25 end
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.
Just use the FocusLost
event of textboxes.
TextBox.FocusLost:Connect(function() if TextBox.Text == "" then end end)