Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local ScreenGui = Instance.new("ScreenGui")
- local Frame = Instance.new("Frame")
- local on = Instance.new("TextButton")
- local off = Instance.new("TextButton")
- --Properties:
- ScreenGui.Parent = game.CoreGui
- Frame.Parent = ScreenGui
- Frame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Frame.Position = UDim2.new(0.0543615669, 0, 0.879947186, 0)
- Frame.Size = UDim2.new(0, 105, 0, 31)
- on.Name = "on"
- on.Parent = Frame
- on.BackgroundColor3 = Color3.fromRGB(0, 255, 0)
- on.Size = UDim2.new(0, 105, 0, 31)
- on.Font = Enum.Font.SourceSans
- on.Text = "auto respawn on"
- on.TextColor3 = Color3.fromRGB(0, 0, 0)
- on.TextSize = 14.000
- on.Visible = false
- on.MouseButton1Down:Connect(function()
- on.Visible = false
- off.Visible = true
- local blah = (game.Players.LocalPlayer.Name)
- _G.Looop = false
- while _G.Looop == true do wait(0.1)
- if game:GetService("Workspace")[blah].Humanoid.Health == 0 then
- saved = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame
- game:GetService("StarterGui"):SetCore("SendNotification", {
- Title = "Position Saved";
- Text = "Success";
- })
- local A_1 = "LocalPlayer"
- local Event = game:GetService("Workspace").Remote.loadchar
- Event:InvokeServer(A_1)
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = saved
- game:GetService("StarterGui"):SetCore("SendNotification", {
- Title = "Position Loaded";
- Text = "Success";
- })
- end
- end
- end)
- off.Name = "off"
- off.Parent = Frame
- off.BackgroundColor3 = Color3.fromRGB(255, 0, 4)
- off.Size = UDim2.new(0, 105, 0, 31)
- off.Font = Enum.Font.SourceSans
- off.Text = "auto respawn off"
- off.TextColor3 = Color3.fromRGB(0, 0, 0)
- off.TextSize = 14.000
- off.Visible = true
- off.MouseButton1Down:Connect(function()
- off.Visible = false
- on.Visible = true
- local blah = (game.Players.LocalPlayer.Name)
- _G.Looop = true
- while _G.Looop == true do wait(0.1)
- if game:GetService("Workspace")[blah].Humanoid.Health == 0 then
- saved = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame
- game:GetService("StarterGui"):SetCore("SendNotification", {
- Title = "Position Saved";
- Text = "Success";
- })
- local A_1 = "LocalPlayer"
- local Event = game:GetService("Workspace").Remote.loadchar
- Event:InvokeServer(A_1)
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = saved
- game:GetService("StarterGui"):SetCore("SendNotification", {
- Title = "Position Loaded";
- Text = "Success";
- })
- end
- end
- end)
Add Comment
Please, Sign In to add comment