Advertisement
Guest User

Untitled

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