i have tried this.
if script.Parent.Text == "while true do" then game.Players.plr.IntValue.Value = 25 end
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)
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
ok now how do you make it insert a xp box in the leaderboard could you tell me with the other script in it