Advertisement
zza

Body Guard

zza
May 4th, 2019
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.35 KB | None | 0 0
  1. -- Instances:
  2. local ScreenGui = Instance.new("ScreenGui")
  3. local Frame = Instance.new("Frame")
  4. local Name = Instance.new("TextLabel")
  5. local Guard = Instance.new("TextButton")
  6. local Close = Instance.new("TextButton")
  7. --Properties:
  8. ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  9. ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  10. ScreenGui.Parent = game.CoreGui
  11.  
  12. Frame.Parent = ScreenGui
  13. Frame.Active = true
  14. Frame.BackgroundColor3 = Color3.new(0.254902, 0.254902, 0.254902)
  15. Frame.BackgroundTransparency = 0.20000000298023
  16. Frame.BorderColor3 = Color3.new(0.254902, 0.254902, 0.254902)
  17. Frame.Position = UDim2.new(0.0218270011, 0, 0.793103456, 0)
  18. Frame.Size = UDim2.new(0, 184, 0, 76)
  19. Frame.Draggable = true
  20.  
  21. Name.Name = "Name"
  22. Name.Parent = Frame
  23. Name.BackgroundColor3 = Color3.new(0.254902, 0.254902, 0.254902)
  24. Name.BackgroundTransparency = 1
  25. Name.BorderColor3 = Color3.new(0.254902, 0.254902, 0.254902)
  26. Name.Position = UDim2.new(0.125, 0, 0, 0)
  27. Name.Size = UDim2.new(0, 137, 0, 24)
  28. Name.Font = Enum.Font.SourceSans
  29. Name.Text = "BodyGuard Gui"
  30. Name.TextColor3 = Color3.new(0, 0, 0)
  31. Name.TextSize = 25
  32.  
  33. Guard.Name = "Guard"
  34. Guard.Parent = Frame
  35. Guard.BackgroundColor3 = Color3.new(0.254902, 0.254902, 0.254902)
  36. Guard.BorderColor3 = Color3.new(0.254902, 0.254902, 0.254902)
  37. Guard.Position = UDim2.new(0.0815217346, 0, 0.303246439, 0)
  38. Guard.Size = UDim2.new(0, 152, 0, 40)
  39. Guard.Font = Enum.Font.SourceSans
  40. Guard.Text = "Guard(OFF)"
  41. Guard.TextColor3 = Color3.new(0, 0, 0)
  42. Guard.TextSize = 14
  43. Guard.MouseButton1Click:Connect(function()
  44. if game.Players.LocalPlayer.Character.Torso.Anchored == true then
  45. Guard.Text = "Guard(OFF)"
  46. end
  47. if game.Players.LocalPlayer.Character.Torso.Anchored == false then
  48. Guard.Text = "Guard(ON)"
  49. end
  50. if Guard.Text == "Guard(ON)" then
  51. game.Players.LocalPlayer.Character.Torso.Anchored = true
  52. end
  53. if Guard.Text == "Guard(OFF)" then
  54. game.Players.LocalPlayer.Character.Torso.Anchored = false
  55. end
  56. end)
  57.  
  58. Close.Name = "Close"
  59. Close.Parent = Frame
  60. Close.BackgroundColor3 = Color3.new(1, 1, 1)
  61. Close.BackgroundTransparency = 1
  62. Close.Position = UDim2.new(0.907608688, 0, 0, 0)
  63. Close.Size = UDim2.new(0, 23, 0, 24)
  64. Close.Font = Enum.Font.SourceSans
  65. Close.Text = "X"
  66. Close.TextColor3 = Color3.new(1, 0, 0)
  67. Close.TextSize = 20
  68. Close.MouseButton1Click:Connect(function()
  69. Frame:Destroy()
  70. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement