local UserInputService = game:GetService("UserInputService")
local Tool = script.Parent
local IsEquiped = false
UserInputService.InputBegan:Connect(function(InputObject)
	if InputObject.KeyCode == Enum.KeyCode.ButtonR2 and IsEquiped then
		Tool:Activate()
	end
end)
UserInputService.InputEnded:Connect(function(InputObject)
	if InputObject.KeyCode == Enum.KeyCode.ButtonR2 and IsEquiped then
	Tool:Deactivate()
	end
end)
Tool.Equipped:Connect(function()
	IsEquiped = true
end)
Tool.Unequipped:Connect(function()
	IsEquiped = false
end)

For people telling that theres r2 to activate, support already, the vr script im using doesnt work activate tools unless i use this script. When I use this script, it works, but it doesnt deactivate my tool.