minecrafter206

zone

Jul 13th, 2021
1,294
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local localPlayer = game:GetService("Players").LocalPlayer
  2. local character = localPlayer.Character
  3.  
  4. if _G.isLoaded == nil then --load check cuz of anti teleport
  5. _G.isLoaded = false
  6.  
  7. delay(8, function()
  8. _G.isLoaded = true
  9. end)
  10. end
  11.  
  12. if _G.isLoaded == false or _G.isLoaded == nil then
  13. game.StarterGui:SetCore("SendNotification", {
  14. Title = "LOADING",
  15. Text = "PLEASE WAIT UNTIL ANTI TELEPORT IS SAFE STILL WAITING. EXECUTE AGAIN",
  16. Duration = 2
  17. });
  18. return
  19. end
  20.  
  21. local bindable = game:GetService("CoreGui"):FindFirstChild("teleporter") or Instance.new("BindableFunction") bindable.Name = "teleporter" bindable.Parent = game:GetService("CoreGui")
  22.  
  23. if _G.canTeleport == nil then
  24. _G.canTeleport = false
  25. end
  26.  
  27. bindable.OnInvoke = function() -- preventing teleport ban
  28. if _G.canTeleport == false then
  29. _G.canTeleport = true
  30.  
  31. game:GetService("ReplicatedStorage").Remotes.Sync:InvokeServer("Player", "SpawnCharacter")
  32.  
  33. delay(9, function()
  34. _G.canTeleport = false
  35. end)
  36. return true, wait(1.2)
  37. else
  38. return false
  39. end
  40. end
  41.  
  42. local Material = loadstring(game:HttpGet("https://raw.githubusercontent.com/Kinlei/MaterialLua/master/Module.lua"))()
  43.  
  44. local X = Material.Load({
  45. Title = "Demonfall - Tp to Zones",
  46. Style = 2,
  47. SizeX = 500,
  48. SizeY = 350,
  49. Theme = "Dark"
  50. })
  51.  
  52.  
  53. local Main = X.New({
  54. Title = "Main"
  55. })
  56.  
  57. for i,v in ipairs(game:GetService("Workspace").Zones:GetChildren()) do
  58. Main.Button({
  59. Text = "Teleport to " .. v.Name,
  60. Callback = function()
  61. local canTeleport, duration = bindable:Invoke()
  62.  
  63. if canTeleport then
  64. wait(duration)
  65. character.HumanoidRootPart.CFrame = v.CFrame
  66. end
  67.  
  68. end
  69. })
  70. end
RAW Paste Data