Advertisement
Quoteory

Untitled

Nov 15th, 2019
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.22 KB | None | 0 0
  1. local tool = script.Parent
  2. local player = game.Players.LocalPlayer
  3. local player = game.Players.LocalPlayer
  4. local character = player.Character or player.CharacterAdded:Wait()
  5. local Humanoid = game.Players.LocalPlayer.Character:WaitForChild("Humanoid")
  6. local Particle = game.ReplicatedStorage.Part.ParticleEmitter:Clone()
  7. local lastPos = game.ReplicatedStorage.lastPos:Clone()
  8. lastPos.Parent = character
  9.  
  10. local CanTP = true
  11. local CanEscape = false
  12.  
  13. local function tp()
  14.     Particle.Parent = character.UpperTorso
  15.     Particle.Rate = 8
  16.     Humanoid.WalkSpeed = 4
  17.     wait(1.2)
  18.     lastPos.Value = character.HumanoidRootPart.Position
  19.     character.HumanoidRootPart.CFrame = CFrame.new(-323, 0.5, -68)
  20.     Humanoid.WalkSpeed = 8
  21.     wait(.5)
  22.     Particle.Rate = 0
  23.     Humanoid.WalkSpeed = 16
  24. end
  25.  
  26.  
  27. local function escape()
  28.     Particle.Parent = character.UpperTorso
  29.     Particle.Rate = 8
  30.     Humanoid.WalkSpeed = 4
  31.     wait(1.2)
  32.     character.HumanoidRootPart.CFrame = CFrame.new(lastPos.Value)
  33.     Humanoid.WalkSpeed = 8
  34.     wait(.5)
  35.     Particle.Rate = 0
  36.     Humanoid.WalkSpeed = 16
  37. end
  38.  
  39.  
  40. tool.Activated:Connect(function()
  41.     if CanTP then
  42.         CanTP = false
  43.         tp()
  44.         CanEscape = true
  45.     elseif CanEscape then
  46.         CanEscape = false
  47.         escape()
  48.         CanTP = true
  49.     end
  50. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement