Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Script de Teleporte
- local player = game.Players.LocalPlayer
- local TeleportEnabled = false
- local previousPosition
- -- Função para criar os efeitos visuais do teleporte
- local function createTeleportEffects(position)
- local fireBall = Instance.new("Part")
- fireBall.Size = Vector3.new(2, 2, 2)
- fireBall.Position = position + Vector3.new(0, 10, 0)
- fireBall.BrickColor = BrickColor.new("Bright red")
- fireBall.Material = Enum.Material.Neon
- fireBall.Anchored = true
- fireBall.CanCollide = false
- fireBall.Parent = workspace
- local fireEffect = Instance.new("Fire", fireBall)
- fireEffect.Size = 10
- fireEffect.Heat = 10
- local smoke = Instance.new("Smoke")
- smoke.Size = 5
- smoke.Color = Color3.fromRGB(255, 255, 255)
- smoke.Parent = fireBall
- local groundFire = Instance.new("Part")
- groundFire.Size = Vector3.new(4, 1, 4)
- groundFire.Position = position
- groundFire.BrickColor = BrickColor.new("Bright orange")
- groundFire.Material = Enum.Material.Neon
- groundFire.Anchored = true
- groundFire.CanCollide = false
- groundFire.Parent = workspace
- local fireOnGround = Instance.new("Fire", groundFire)
- fireOnGround.Size = 5
- fireOnGround.Heat = 10
- game:GetService("Debris"):AddItem(fireBall, 5)
- game:GetService("Debris"):AddItem(groundFire, 5)
- end
- -- Função para teleportar o jogador
- local function teleportToPosition(position)
- if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
- previousPosition = player.Character.HumanoidRootPart.Position
- player.Character.HumanoidRootPart.CFrame = CFrame.new(position)
- createTeleportEffects(position)
- end
- end
- -- Ferramenta de teleporte
- local TeleportItem = Instance.new("Tool")
- TeleportItem.Name = "Teleporte"
- TeleportItem.RequiresHandle = false
- TeleportItem.Parent = player.Backpack
- -- Script de Teleporte (continuação)
- -- Teleporte quando o jogador clicar
- TeleportItem.Activated:Connect(function()
- local mouse = player:GetMouse()
- if mouse.Target then
- local targetPosition = mouse.Hit.p
- teleportToPosition(targetPosition)
- end
- end)
- -- Ativar/desativar o teleporte
- TeleportEnabled = not TeleportEnabled
- if TeleportEnabled then
- TeleportItem.Parent = player.Backpack
- else
- if player.Backpack:FindFirstChild("Teleporte") then
- player.Backpack.Teleporte:Destroy()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment