Advertisement
ou1z

Fast respawn

Jul 8th, 2020
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.14 KB | None | 0 0
  1. local player = game.Players.LocalPlayer
  2.  
  3.  
  4. player.Chatted:Connect(function(msg)
  5.     if msg == '/re' then
  6.         wait(0.35)
  7.         local char = player.Character
  8.         local root = char.HumanoidRootPart  
  9.  
  10.         local vector = {
  11.             x = root.Position.X,
  12.             y = root.Position.Y,
  13.             z = root.Position.Z,
  14.         }
  15.        
  16.         local json = game:GetService("HttpService"):JSONEncode(vector)
  17.        
  18.         writefile('cframe.json', json)
  19.        
  20.        
  21.         game:GetService("TeleportService"):TeleportToPlaceInstance(game.PlaceId, game.JobId)
  22.         syn.queue_on_teleport([[
  23.             game:GetService("ReplicatedFirst"):RemoveDefaultLoadingScreen();
  24.             local json = readfile("cframe.json")
  25.            
  26.             local tbl = game:GetService("HttpService"):JSONDecode(json)
  27.            
  28.             repeat wait() until game.Players.LocalPlayer
  29.             repeat wait() until game.Players.LocalPlayer.Character
  30.            
  31.            
  32.            
  33.             game.Players.LocalPlayer.Character:WaitForChild("HumanoidRootPart").CFrame = CFrame.new(tbl.x, tbl.y, tbl.z)
  34.             loadstring(game:HttpGet("https://pastebin.com/raw/CBD6Mfdn"))()
  35.         ]])
  36.     end
  37. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement