Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Players = game.Players
- local Player = Players.LocalPlayer
- local Mouse = Player:GetMouse()
- Mouse.KeyDown:Connect(function(Key)
- if Key == "z" then
- for i, v in pairs(game.Players:GetChildren())do
- if v:IsA("Player") and v.Name ~= Player.Name then
- local Hrp = v.Character:FindFirstChild("HumanoidRootPart")
- local Crp = Player.Character.HumanoidRootPart
- if v.Character ~= nil and Hrp ~= nil then
- local Anch = Instance.new("Part",v.Character)
- Anch.Name = "Anch"
- Anch.CFrame = Crp.CFrame + (Crp.CFrame.lookVector*3)
- Anch.Anchored = true
- local Wld = Instance.new("Weld",Anch)
- Wld.Name = "Wld"
- Wld.Part0 = Hrp
- Wld.Part1 = Anch
- Anch.CFrame = Crp.CFrame + (Crp.CFrame.lookVector*3)
- Anch.Anchored = false
- Anch.CFrame = Crp.CFrame + (Crp.CFrame.lookVector*3)
- Anch.Anchored = true
- Anch.CFrame = Crp.CFrame + (Crp.CFrame.lookVector*3)
- Hrp.CFrame = Anch.CFrame
- Hrp.Anchored = true
- end
- end
- end
- elseif Key == "x" then
- for i, v in pairs(game.Players:GetChildren())do
- if v:IsA("Player") and v.Name ~= Player.Name then
- local Hrp = v.Character:FindFirstChild("HumanoidRootPart")
- local Crp = Player.Character.HumanoidRootPart
- if v.Character ~= nil and Hrp ~= nil then
- local Anch = v.Character:FindFirstChild("Anch")
- if Anch ~= nil then
- Anch:Destroy()
- end
- Hrp.Anchored = false
- end
- end
- end
- end
- end)
Add Comment
Please, Sign In to add comment