Advertisement
Guest User

roblox gui script loader

a guest
Nov 12th, 2014
2,372
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. --Enter player name here so we know which player to load it into
  2. player = game.Players.Zzzip42Strike
  3.  
  4. --Master Container : Remember to parent it to load the gui.
  5.  
  6. scrLoader = Instance.New("ScreenGui")
  7. scrLoader.Name = "ScriptLoader"
  8.  
  9. --Heres a frame container
  10.  
  11. fraContainer = Instance.New("Frame", scrLoader)
  12. fraContainer.Name = "LoaderFrame"
  13.  
  14. --Not Complete fill in size/pos later
  15.  
  16. fraContainer.Size = UDim2.New(0.6, 0, 0.3, 0)
  17. fraContainer.Position = UDim2.New(0.5,0,0.75,0)
  18.  
  19. --Heres the Textbox which we will load our scripts in.
  20.  
  21. txtInput = Instance.New("Textbox", fraContainer)
  22. txtInput.Name = "ScriptInput"
  23. txtInput.Text = "Input Script Here"
  24. --Remember to fill in Position and Size!
  25.  
  26. txtInput.Position = UDim2.New(0,0,0.5,0)
  27. txtInput.Size = UDim2.New(0.75,0,0.25,0)
  28.  
  29. --Heres a button to load the script
  30.  
  31. btnLoad = Instance.New("TextButton", fraContainter)
  32. btnLoad.Name = "ScriptLoader"
  33.  
  34. --Remember to fill in buttons position and size.
  35.  
  36. btnLoad.Size = UDim2.New(0.25,0,0.25,0)
  37. btnLoad.Position = UDim2.New(0.75,0,0.5,0)
  38.  
  39. --Actual Load Code
  40.  
  41. function LoadTheCode()
  42. local c = txtInput.Text
  43. loadString(c)()
  44. end
  45.  
  46. --Connection
  47.  
  48. btnLoad.MouseButton1Down:connect(LoadTheCode)
  49.  
  50. --Activation
  51.  
  52. scrLoader.Parent = player.PlayerGui
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement