Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function grabandthrow(grab,part)
- local player=game.Players.LocalPlayer
- local mouse=player:GetMouse()
- local position=mouse.Hit.lookVector--player.Character.Head.CFrame
- local barrel
- print(position)
- --player.Character.HumanoidRootPart.CFrame=game.Workspace.NPCs.FinalNPC.HumanoidRootPart.CFrame+Vector3.new(0,2,0)
- --game.Workspace.NPCs.FinalNPC.HumanoidRootPart.CFrame=game.Players.LocalPlayer.Character.Head.CFrame+position*2
- for i,v in pairs(game.Workspace.Buildings:GetChildren()) do
- if v.Name=='Barrels' and v:FindFirstChild("Barrel") then
- barrel=v.Barrel
- break
- end
- end
- player.Character.HumanoidRootPart.CFrame=barrel.CFrame+Vector3.new(0,2,0)
- barrel.CFrame=game.Players.LocalPlayer.Character.Head.CFrame+position*2
- grab:Activate()
- wait(1)
- grab:Activate()
- player.Character.HumanoidRootPart.CFrame=part.CFrame
- grab:Activate()
- player.Character.HumanoidRootPart.Velocity=Vector3.new()
- game.ReplicatedStorage.Events.unRagdoll:FireServer(player.Character)
- end
- local player=game.Players.LocalPlayer
- local grab
- while wait() do
- for i,v in pairs(game.Workspace.Buildings:GetDescendants()) do
- if player.Backpack:FindFirstChild("Grab") then
- grab=player.Backpack:FindFirstChild("Grab")
- grab.Parent=player.Character
- end
- if v.ClassName=="Part" and v.Anchored==true then
- grabandthrow(grab,v)
- wait(4)
- end
- for i,v in pairs(game.Workspace:GetChildren()) do
- if v.Name=="Gem" and v.Owner.Value==game.Players.LocalPlayer.Name then
- player.Character.HumanoidRootPart.CFrame=v.CFrame
- player.Character.HumanoidRootPart.Velocity=Vector3.new()
- wait(0.1)
- end
- end
- end
- end
Advertisement
Advertisement