Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Players = game:GetService("Players")
- local player = Players.LocalPlayer
- local key = Enum.KeyCode.X -- key to toggle invisibility
- --// don't edit script Thx
- local invis_on = false
- function setTransparency(character, transparency)
- for _, part in pairs(character:GetDescendants()) do
- if part:IsA("BasePart") or part:IsA("Decal") or part:IsA("MeshPart") then
- part.Transparency = transparency
- end
- end
- end
- function onKeyPress(inputObject, chat)
- if chat then return end
- if inputObject.KeyCode == key then
- invis_on = not invis_on
- if invis_on then
- local savedpos = player.Character.HumanoidRootPart.CFrame
- wait()
- player.Character:MoveTo(Vector3.new(-25.95, 84, 3537.55))
- wait(.15)
- local Seat = Instance.new('Seat', game.Workspace)
- Seat.Anchored = false
- Seat.CanCollide = false
- Seat.Name = 'invischair'
- Seat.Transparency = 1
- Seat.Position = Vector3.new(-25.95, 84, 3537.55)
- local Weld = Instance.new("Weld", Seat)
- Weld.Part0 = Seat
- Weld.Part1 = player.Character:FindFirstChild("Torso") or player.Character.UpperTorso
- wait()
- Seat.CFrame = savedpos
- setTransparency(player.Character, 0.7) -- Set partial transparency
- player.Character.HumanoidRootPart.Transparency = 0.7
- game.StarterGui:SetCore("SendNotification", {
- Title = "Invis On";
- Duration = 1;
- Text = "";
- })
- else
- if workspace:FindFirstChild('invischair') then
- workspace:FindFirstChild('invischair'):Destroy()
- end
- setTransparency(player.Character, 0) -- Set transparency to visible
- player.Character.HumanoidRootPart.Transparency = 0
- game.StarterGui:SetCore("SendNotification", {
- Title = "Invis Off";
- Duration = 1;
- Text = "";
- })
- end
- end
- end
- game:GetService("UserInputService").InputBegan:connect(onKeyPress)
Advertisement
Add Comment
Please, Sign In to add comment