Advertisement
killerboy634

tt

Jul 1st, 2016
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. A lil hard to explain, But I'll try to explain!
  2.  
  3. Okay, So lets say that you'd make a folder in workspace
  4. and put a TextBox in it
  5. And the value "Text" inside TextBox would be "Hello"
  6. So, And you would create a script inside TextBox with the script
  7.  
  8. "
  9. Message = script.Parent.Text
  10.  
  11. print(Message)
  12. "
  13. That would return the text inside TextBox!
  14. So, Now I'll tell you how you'd make a gui with such
  15. So lets say that you put the textbox inside of a ScreenGui inside of StarterGui!
  16. So, it'd be the same, the script inside of the TextBox
  17. But the script would be
  18. "
  19. te = script.Parent.Text
  20. script.Parent.FocusLost:connect(function(ep)
  21. if ep then
  22. loadstring(te)()
  23. end
  24. end)
  25. "
  26. So, That script will call a function called "FocusLost" when you click something else
  27. and lose focus of the textbox, So. If you lose focus because of pressing "Enter"
  28. then it will call a function called "EnterPressed" which i called "ep" in function
  29. So, when that happens it will continue to the script i wanted it to run
  30. which is "loadstring(ep)()" That will call the script! which will pretty much make the script run!!
  31.  
  32. BY THE WAY!! YOU NEED LOADSTRINGS ENABLED INSIDE OF SERVERSCRIPTSERVICE!!!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement