Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- t="target"
- players = game:FindService("Players")
- lp = players.LocalPlayer
- local function hasProperty(object, prop)
- local t = object[prop]
- end
- target = players:FindFirstChild(t)
- function togglefreeze(char)
- for i,v in pairs(char:GetChildren()) do
- if v:IsA("Part") or v:IsA("MeshPart") then
- if v.Anchored == true then
- v.Anchored = false
- else v.Anchored =true end
- end
- end
- end
- if target then
- if target.Character and runningkill ~= true then
- runningkill = true
- arm = lp.Character:FindFirstChild("Right Arm") or lp.Character:FindFirstChild("RightHand")
- targetarm = target.Character:FindFirstChild("Right Arm") or
- target.Character:FindFirstChild("RightHand")
- oldpos = lp.Character.PrimaryPart.CFrame
- lp.Character:ClearAllChildren()
- lp.CharacterAdded:Wait()
- repeat task.wait() until lp.Character:FindFirstChild("HumanoidRootPart")
- lp.Character["HumanoidRootPart"].Anchored = false
- lp.Character["HumanoidRootPart"].CFrame = oldpos
- repeat task.wait() until lp.Character:FindFirstChildOfClass("Humanoid")
- repeat task.wait() until lp.Character:FindFirstChild("HumanoidRootPart")
- wait(0.3)
- local tool = lp.Backpack:FindFirstChildOfClass("Tool")
- humanoid = lp.Character:FindFirstChildOfClass("Humanoid")
- for i,v in pairs(lp.Character:GetChildren()) do
- if v:IsA("Accessory") then
- v:Destroy()
- end
- end
- clone = humanoid:Clone()
- clone.Parent = lp.Character
- humanoid:ClearAllChildren()
- wait()
- humanoid:Destroy()
- game:FindService("RunService").Stepped:Wait()
- tool.Parent = lp.Character
- loop = game:FindService("RunService").Stepped:Connect(function()
- togglefreeze(target.Character)
- if target.Character then
- target.Character.PrimaryPart.Anchored = true
- target.Character.PrimaryPart.CFrame = tool.Handle.CFrame
- end
- for i,v in pairs(target.Character:GetChildren()) do
- if pcall(function() hasProperty(v,"CanCollide") end) then
- v.CanCollide = true
- end
- end
- if not lp.Character or tool.Parent == target.Character or
- not tool or not target or not target.Character then
- loop:Disconnect()
- end
- end)
- if target then
- if target.Character then
- target.Character.PrimaryPart.Anchored = true
- togglefreeze(target.Character)
- end
- end
- oldchar = lp.Character
- oldchar.Head:Destroy()
- lp.Character = nil
- wait(1)
- lp.Character=oldchar
- lp.Character:ClearAllChildren()
- lp.CharacterAdded:Wait()
- repeat task.wait() until lp.Character:FindFirstChild("HumanoidRootPart")
- lp.Character["HumanoidRootPart"].Anchored = false
- lp.Character["HumanoidRootPart"].CFrame = oldpos
- runningkill=nil
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement