Homestyle_chicken

asdasgfaf

Apr 23rd, 2020
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.37 KB | None | 0 0
  1. local ScreenGui = Instance.new("ScreenGui")
  2. local Frame = Instance.new("Frame")
  3. local on = Instance.new("TextButton")
  4. local off = Instance.new("TextButton")
  5.  
  6. --Properties:
  7.  
  8. ScreenGui.Parent = game.CoreGui
  9.  
  10. Frame.Parent = ScreenGui
  11. Frame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  12. Frame.Position = UDim2.new(0.0543615669, 0, 0.879947186, 0)
  13. Frame.Size = UDim2.new(0, 105, 0, 31)
  14.  
  15. on.Name = "on"
  16. on.Parent = Frame
  17. on.BackgroundColor3 = Color3.fromRGB(0, 255, 0)
  18. on.Size = UDim2.new(0, 105, 0, 31)
  19. on.Font = Enum.Font.SourceSans
  20. on.Text = "auto respawn on"
  21. on.TextColor3 = Color3.fromRGB(0, 0, 0)
  22. on.TextSize = 14.000
  23. on.Visible = false
  24. on.MouseButton1Down:Connect(function()
  25. on.Visible = false
  26. off.Visible = true
  27.  
  28. local blah = (game.Players.LocalPlayer.Name)
  29.  
  30. _G.Looop = false
  31.  
  32. while _G.Looop == true do wait(0.1)
  33. if game:GetService("Workspace")[blah].Humanoid.Health == 0 then
  34. saved = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame
  35. game:GetService("StarterGui"):SetCore("SendNotification", {
  36. Title = "Position Saved";
  37. Text = "Success";
  38. })
  39. local A_1 = "LocalPlayer"
  40.  
  41. local Event = game:GetService("Workspace").Remote.loadchar
  42. Event:InvokeServer(A_1)
  43.  
  44. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = saved
  45. game:GetService("StarterGui"):SetCore("SendNotification", {
  46. Title = "Position Loaded";
  47. Text = "Success";
  48. })
  49. end
  50. end
  51. end)
  52.  
  53. off.Name = "off"
  54. off.Parent = Frame
  55. off.BackgroundColor3 = Color3.fromRGB(255, 0, 4)
  56. off.Size = UDim2.new(0, 105, 0, 31)
  57. off.Font = Enum.Font.SourceSans
  58. off.Text = "auto respawn off"
  59. off.TextColor3 = Color3.fromRGB(0, 0, 0)
  60. off.TextSize = 14.000
  61. off.Visible = true
  62. off.MouseButton1Down:Connect(function()
  63. off.Visible = false
  64. on.Visible = true
  65.  
  66. local blah = (game.Players.LocalPlayer.Name)
  67.  
  68. _G.Looop = true
  69.  
  70. while _G.Looop == true do wait(0.1)
  71. if game:GetService("Workspace")[blah].Humanoid.Health == 0 then
  72. saved = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame
  73. game:GetService("StarterGui"):SetCore("SendNotification", {
  74. Title = "Position Saved";
  75. Text = "Success";
  76. })
  77. local A_1 = "LocalPlayer"
  78.  
  79. local Event = game:GetService("Workspace").Remote.loadchar
  80. Event:InvokeServer(A_1)
  81.  
  82. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = saved
  83. game:GetService("StarterGui"):SetCore("SendNotification", {
  84. Title = "Position Loaded";
  85. Text = "Success";
  86. })
  87. end
  88. end
  89. end)
Add Comment
Please, Sign In to add comment