Advertisement
Guest User

Untitled

a guest
Jan 28th, 2020
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.39 KB | None | 0 0
  1. plr = game.LocalPlayer
  2. ControlGui = Instance.new("ScreenGui")
  3. Frame = Instance.new("Frame")
  4. TextButton = Instance.new("TextButton")
  5. TextBox = Instance.new("TextBox")
  6.  
  7. ControlGui.Name = "ControlGui"
  8. ControlGui.Parent = plr.PlayerGui
  9.  
  10. Frame.Parent = ControlGui
  11. Frame.BackgroundColor3 = Color3.new(1, 1, 1)
  12. Frame.Position = UDim2.new(0, 300, 0, 200)
  13. Frame.Size = UDim2.new(0, 300, 0, 150)
  14. Frame.Active = true
  15. Frame.Draggable = true
  16.  
  17. TextButton.Parent = Frame
  18. TextButton.BackgroundColor3 = Color3.new(1, 1, 1)
  19. TextButton.Position = UDim2.new(0, 50, 0, 90)
  20. TextButton.Size = UDim2.new(0, 200, 0, 50)
  21. TextButton.Font = Enum.Font.SourceSans
  22. TextButton.FontSize = Enum.FontSize.Size32
  23. TextButton.Text = "Control"
  24. TextButton.TextSize = 30
  25. TextButton.MouseButton1Down:connect(function()
  26. if TextButton.Text == "Control" then
  27. TextButton.Text = "UnControl"
  28. workspace[TextBox.Text].Humanoid.PlatformStand = true
  29. W1 = Instance.new("Weld",workspace)
  30. W1.Name = "Weld1"
  31. W1.Part0 = plr.Character.Torso
  32. W1.Part1 = workspace[TextBox.Text].Torso
  33. W2 = Instance.new("Weld",workspace)
  34. W2.Name = "Weld2"
  35. W2.Part0 = plr.Character.Head
  36. W2.Part1 = workspace[TextBox.Text].Head
  37. W3 = Instance.new("Weld",workspace)
  38. W3.Name = "Weld3"
  39. W3.Part0 = plr.Character.HumanoidRootPart
  40. W3.Part1 = workspace[TextBox.Text].HumanoidRootPart
  41. W4 = Instance.new("Weld",workspace)
  42. W4.Name = "Weld4"
  43. W4.Part0 = plr.Character["Left Arm"]
  44. W4.Part1 = workspace[TextBox.Text]["Left Arm"]
  45. W5 = Instance.new("Weld",workspace)
  46. W5.Name = "Weld5"
  47. W5.Part0 = plr.Character["Left Leg"]
  48. W5.Part1 = workspace[TextBox.Text]["Left Leg"]
  49. W6 = Instance.new("Weld",workspace)
  50. W6.Name = "Weld6"
  51. W6.Part0 = plr.Character["Right Arm"]
  52. W6.Part1 = workspace[TextBox.Text]["Right Arm"]
  53. W7 = Instance.new("Weld",workspace)
  54. W7.Name = "Weld7"
  55. W7.Part0 = plr.Character["Right Leg"]
  56. W7.Part1 = workspace[TextBox.Text]["Right Leg"]
  57. for i,v in pairs(plr.Character:GetChildren()) do
  58. if v.ClassName == "Part" then
  59. v.Transparency = 1
  60. end
  61. plr.Character.HumanoidRootPart.Transparency = 1
  62. if v.ClassName == "Accessory" then
  63. v.Handle.Transparency = 1
  64. end
  65. plr.Character.Humanoid.NameOcclusion = "NoOcclusion"
  66. end
  67. elseif TextButton.Text == "UnControl" then
  68. TextButton.Text = "Control"
  69. workspace[TextBox.Text].Humanoid.PlatformStand = false
  70. workspace.Weld1:Remove()
  71. workspace.Weld2:Remove()
  72. workspace.Weld3:Remove()
  73. workspace.Weld4:Remove()
  74. workspace.Weld5:Remove()
  75. workspace.Weld6:Remove()
  76. workspace.Weld7:Remove()
  77. for i,v in pairs(plr.Character:GetChildren()) do
  78. if v.ClassName == "Part" then
  79. v.Transparency = 0
  80. end
  81. plr.Character.HumanoidRootPart.Transparency = 1
  82. if v.ClassName == "Accessory" then
  83. v.Handle.Transparency = 0
  84. end
  85. plr.Character.Humanoid.NameOcclusion = "OccludeAll"
  86. end
  87. end
  88. end)
  89.  
  90. TextBox.Parent = Frame
  91. TextBox.BackgroundColor3 = Color3.new(1, 1, 1)
  92. TextBox.Position = UDim2.new(0, 50, 0, 20)
  93. TextBox.Size = UDim2.new(0, 200, 0, 30)
  94. TextBox.Font = Enum.Font.SourceSans
  95. TextBox.FontSize = Enum.FontSize.Size28
  96. TextBox.Text = "Name"
  97. TextBox.TextSize = 25
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement