Tanjiro-Kamado

Survive the killer | Teleport to an exit

Feb 3rd, 2020
678
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.98 KB | None | 0 0
  1. --[[
  2. Credits to; HamstaGang
  3. Official thread; https://v3rmillion.net/showthread.php?tid=942169
  4. --------------------------------------------------------------------------------
  5. Script was provided from the official Demon Slayers Community Server; https://discord.gg/ADEVZ5R
  6. Official thread; https://v3rmillion.net/showthread.php?tid=936292 |<-- More info
  7. ]]--
  8.  
  9. -- Teleport to an exit
  10. local LocalPlayer = game.Players.LocalPlayer
  11. local Mouse = LocalPlayer:GetMouse()
  12. Mouse.KeyDown:connect(function(KeyPressed)
  13.    if KeyPressed == "c" then -- Change keybind here to whatever key works best for you.
  14.        local Doors = game:GetService("Workspace").CurrentMap:GetChildren()
  15.        for i, door in ipairs(Doors) do
  16.             if door.Name == "ExitDoor" then
  17.                 local PlayerCFrame = LocalPlayer.Character.HumanoidRootPart.CFrame
  18.                LocalPlayer.Character.HumanoidRootPart.CFrame = door.Open.Door.CFrame + Vector3.new(0, -2, 0)
  19.             end
  20.         end
  21.    end
  22. end)
Advertisement
Add Comment
Please, Sign In to add comment