Advertisement
Guest User

Untitled

a guest
Nov 15th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.19 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. local CanTP = true
  10. local CanEscape = false
  11. tool.Activated:Connect(function()
  12.     if CanTP == true then
  13.         CanTP = false
  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.         CanTP = false
  25.         CanEscape = true
  26.         end
  27.         if CanEscape == true then
  28.         CanEscape = false
  29.         Particle.Parent = character.UpperTorso
  30.         Particle.Rate = 8
  31.         Humanoid.WalkSpeed = 4
  32.         wait(1.2)
  33.         character.HumanoidRootPart.CFrame = CFrame.new(lastPos.Value)
  34.         Humanoid.WalkSpeed = 8
  35.         wait(.5)
  36.         Particle.Rate = 0
  37.         Humanoid.WalkSpeed = 16
  38.         CanTP = true
  39.     end
  40. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement