Advertisement
uor

respawn at death position script and fake lag switch

uor
Aug 29th, 2021
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.14 KB | None | 0 0
  1. --Original thread: https://v3rmillion.net/showthread.php?tid=1083897
  2. _G.key = Enum.KeyCode.LeftControl -- Change to whatever if you don't know Keycode go to roblox api doc
  3.  
  4. loadstring(game:HttpGet("https://paste.gg/p/anonymous/cb1c7198b269449eb8a2cf8ced061bed/files/4a98e88f82ee47388b3030a7f000b34e/raw", true))()
  5.  
  6. local stationaryrespawn = false
  7. local needsrespawning = false
  8. local haspos = false
  9. local pos = CFrame.new()
  10.  
  11. local Respawning = Instance.new("ScreenGui")
  12. local RespawningButton = Instance.new("TextButton")
  13.  
  14. Respawning.Name = "Respawning"
  15. Respawning.Parent = game.CoreGui
  16.  
  17.  
  18.  
  19. RespawningButton.Name = "RespawningButton"
  20. RespawningButton.Parent = Respawning
  21. RespawningButton.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647)
  22. RespawningButton.BackgroundTransparency = 0.30000001192093
  23. RespawningButton.BorderSizePixel = 0
  24. RespawningButton.Position = UDim2.new(0.0391057241, 0, 0.826617789, 0)
  25. RespawningButton.Size = UDim2.new(0, 83, 0, 34)
  26. RespawningButton.Font = Enum.Font.SourceSans
  27. RespawningButton.Text = "Not Returning"
  28. RespawningButton.TextColor3 = Color3.new(1, 1, 1)
  29. RespawningButton.TextSize = 20
  30. RespawningButton.TextScaled = true
  31. RespawningButton.Draggable = true
  32.  
  33.  
  34.  
  35.  
  36. function StatRespawn(inputObject, gameProcessedEvent)
  37. if inputObject.KeyCode == Enum.KeyCode.N and gameProcessedEvent == false then
  38. stationaryrespawn = not stationaryrespawn
  39. end
  40. end
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47. game:GetService("UserInputService").InputBegan:connect(StatRespawn)
  48.  
  49.  
  50.  
  51. game:GetService('RunService').Stepped:connect(function()
  52.  
  53.  
  54. if stationaryrespawn == true and game.Players.LocalPlayer.Character.Humanoid.Health == 0 then
  55. if haspos == false then
  56. pos = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame
  57. haspos = true
  58. end
  59.  
  60. needsrespawning = true
  61. end
  62.  
  63.  
  64. if needsrespawning == true then
  65. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = pos
  66. end
  67.  
  68.  
  69. if stationaryrespawn == true then
  70. RespawningButton.Text = "Returning"
  71. else
  72. RespawningButton.Text = "Not Returning"
  73. end
  74.  
  75.  
  76. end)
  77.  
  78. game.Players.LocalPlayer.CharacterAdded:connect(function()
  79. wait(0.6)
  80. needsrespawning = false
  81. haspos = false
  82. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement