Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local char = owner.Character
- local remote = Instance.new("RemoteEvent",game.ReplicatedStorage)
- remote.Name = owner.Name
- function ihopethisworks(playe,otherplaye,grass)
- while wait() do
- if grass then
- otherplaye.HumanoidRootPart.Position = playe.Character.HumanoidRootPart.CFrame.LookVector*5 +
- playe.Character.HumanoidRootPart.Position
- end
- end
- end
- function otherfunction(playe,otherplaye,grass)
- while wait() do
- if grass then
- otherplaye.Torso.Position = playe.Character.HumanoidRootPart.CFrame.LookVector*5 + playe.Character.HumanoidRootPart.Position
- end
- end
- end
- NLS([[
- local mouse = owner:GetMouse()
- local char = owner.Character
- local grab = true
- local is = game:GetService("UserInputService")
- is.InputBegan:Connect(function(key)
- if key.KeyCode == Enum.KeyCode.E then
- if grab then
- grab = false
- game.ReplicatedStorage:FindFirstChild(owner.Name):FireServer(-1,-1,grab)
- else
- grab = true
- game.ReplicatedStorage:FindFirstChild(owner.Name):FireServer(-1,-1,grab)
- end
- end
- end)
- mouse.Button1Down:Connect(function(m)
- if mouse.Target.Parent:FindFirstChild("HumanoidRootPart") then
- game.ReplicatedStorage:FindFirstChild(owner.Name):FireServer(mouse.Target.Parent,0,grab)
- elseif mouse.Target.Parent:FindFirstChild("Torso") and not mouse.Target:FindFirstChild("HumanoidRootPart") then
- game.ReplicatedStorage:FindFirstChild(owner.Name):FireServer(mouse.Target.Parent,1,grab)
- end
- end)
- ]],char)
- remote.OnServerEvent:Connect(function(player,otherplayer,t,grab)
- print("sus")
- print(grab)
- if t == 0 then
- ihopethisworks(player,otherplayer,grab)
- end
- if t == 1 then
- otherfunction(player,otherplayer,grab)
- end
- end)
Add Comment
Please, Sign In to add comment