So I want then you write a word like TEST it gives you a pet but this script wont work!
local pet = game.Lighting.Pet1:Clone() local plr = game.Players.LocalPlayer if script.Parent.Text == "TEST" then pet.Parent = plr.Character end
Because this is a TextBox there is no Text by default in the TextBox yet. You most likely want a Changed listener to fire when the text is updated and then compare it to "TEST".
it might be this one
local pet = game.Lighting.Pet1:Clone() local plr = game.Players.LocalPlayer local petplace = plr.Character local gui = game.StarterGui."Gui Name" if script.Parent.gui."Frame where is it or button".Text == "TEST" then pet.Parent = petplace.Parent end