Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local plr = game:GetService("Players").LocalPlayer
- local mouse,char = plr:GetMouse(),plr.Character
- local mouse = plr:getMouse()
- for i,v in pairs(game:GetService("Workspace").CurrentCamera:GetChildren()) do v:Destroy() end
- local toggle,cd = false,false
- mouse.KeyDown:connect(function(key)
- if key == "z" and plr.Character.Parent == workspace.Camera and part == nil then
- plr.Character.Torso.CFrame = CFrame.new(Vector3.new(mouse.hit.p.X,mouse.hit.p.Y+1.5,mouse.hit.p.Z),plr.Character.Torso.CFrame.p)
- elseif key == "r" then
- if cd == false then
- cd = true
- if toggle == false then
- toggle = true
- Instance.new("ForceField",char).Visible = false
- char.Parent = game:GetService("Workspace").CurrentCamera
- char:FindFirstChild("Head").Transparency = 1
- char:FindFirstChild("Torso").Transparency = 1
- char:FindFirstChild("Right Arm").Transparency = 1
- char:FindFirstChild("Left Arm").Transparency = 1
- char:FindFirstChild("Right Leg").Transparency = 1
- char:FindFirstChild("Left Leg").Transparency = 1
- for i,v in pairs(char:GetChildren()) do
- if v:IsA("Accessory") then
- v:FindFirstChild("Handle").Transparency = 1
- end
- end
- else
- toggle = false
- char.Parent = game:GetService("Workspace")
- char:FindFirstChild("ForceField"):Destroy()
- char:FindFirstChild("Head").Transparency = 0
- char:FindFirstChild("Torso").Transparency = 0
- char:FindFirstChild("Right Arm").Transparency = 0
- char:FindFirstChild("Left Arm").Transparency = 0
- char:FindFirstChild("Right Leg").Transparency = 0
- char:FindFirstChild("Left Leg").Transparency = 0
- for i,v in pairs(char:GetChildren()) do
- if v:IsA("Accessory") then
- v:FindFirstChild("Handle").Transparency = 0
- end
- end
- end
- cd = false
- end
- end
- end)
- game:GetService("RunService").RenderStepped:connect(function()
- if char.Parent == game:GetService("Workspace").CurrentCamera then
- for i,v in pairs(char:GetChildren()) do
- if v:IsA("Part") then if v.Name ~= "HumanoidRootPart" then
- local c = v:Clone()
- c.Parent = game:GetService("Workspace")
- c.BottomSurface = "Smooth"
- c.TopSurface = "Smooth"
- c:BreakJoints()
- c.Material = "ForceField"
- c.Anchored = true
- c.CanCollide = false
- c.Transparency = 0.9
- c.CFrame = v.CFrame
- game:GetService("Debris"):AddItem(c,0.1)
- end end
- if v:IsA("Accessory") then if v:FindFirstChild("Handle") then
- local c = v.Handle:Clone()
- c.Parent = game:GetService("Workspace")
- c.BottomSurface = "Smooth"
- c.TopSurface = "Smooth"
- c:BreakJoints()
- c.Material = "ForceField"
- c.Anchored = true
- c.CanCollide = false
- c.Transparency = 0.9
- c.CFrame = v.Handle.CFrame
- game:GetService("Debris"):AddItem(c,0.1)
- end end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement